1var app=function(){"use strict";function noop$1(){}function assign(e,t){for(const n in t)e[n]=t[n];return e}function is_promise(e){return e&&"object"==typeof e&&"function"==typeof e.then}function run$1(e){return e()}function blank_object(){return Object.create(null)}function run_all(e){e.forEach(run$1)}function is_function(e){return"function"==typeof e}function safe_not_equal(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function is_empty(e){return 0===Object.keys(e).length}function create_slot(e,t,n,r){if(e){const i=get_slot_context(e,t,n,r);return e[0](i)}}function get_slot_context(e,t,n,r){return e[1]&&r?assign(n.ctx.slice(),e[1](r(t))):n.ctx}function get_slot_changes(e,t,n,r){if(e[2]&&r){const i=e[2](r(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let r=0;r<n;r+=1)e[r]=t.dirty[r]|i[r];return e}return t.dirty|i}return t.dirty}function update_slot(e,t,n,r,i,a,o){const s=get_slot_changes(t,r,i,a);if(s){const i=get_slot_context(t,n,r,o);e.p(i,s)}}function compute_slots(e){const t={};for(const n in e)t[n]=!0;return t}function null_to_empty(e){return null==e?"":e}function action_destroyer(e){return e&&is_function(e.destroy)?e.destroy:noop$1}function append(e,t){e.appendChild(t)}function insert(e,t,n){e.insertBefore(t,n||null)}function detach(e){e.parentNode.removeChild(e)}function destroy_each(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function element(e){return document.createElement(e)}function svg_element(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function text(e){return document.createTextNode(e)}function space(){return text(" ")}function empty(){return text("")}function listen(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function prevent_default(e){return function(t){return t.preventDefault(),e.call(this,t)}}function stop_propagation(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function attr(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function set_attributes(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set?e[r]=t[r]:attr(e,r,t[r])}function children(e){return Array.from(e.childNodes)}function set_data(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function set_input_value(e,t){e.value=null==t?"":t}function set_style(e,t,n,r){e.style.setProperty(t,n,r?"important":"")}function select_option(e,t){for(let n=0;n<e.options.length;n+=1){const r=e.options[n];if(r.__value===t)return void(r.selected=!0)}}function select_value(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function toggle_class(e,t,n){e.classList[n?"add":"remove"](t)}function custom_event(e,t){const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}class HtmlTag{constructor(e=null){this.a=e,this.e=this.n=null}m(e,t,n=null){this.e||(this.e=element(t.nodeName),this.t=t,this.h(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)insert(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(detach)}}let current_component;function set_current_component(e){current_component=e}function get_current_component(){if(!current_component)throw new Error("Function called outside component initialization");return current_component}function beforeUpdate(e){get_current_component().$$.before_update.push(e)}function onMount(e){get_current_component().$$.on_mount.push(e)}function onDestroy(e){get_current_component().$$.on_destroy.push(e)}function createEventDispatcher(){const e=get_current_component();return(t,n)=>{const r=e.$$.callbacks[t];if(r){const i=custom_event(t,n);r.slice().forEach((t=>{t.call(e,i)}))}}}function bubble(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach((e=>e(t)))}const dirty_components=[],binding_callbacks=[],render_callbacks=[],flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush$1))}function tick(){return schedule_update(),resolved_promise}function add_render_callback(e){render_callbacks.push(e)}function add_flush_callback(e){flush_callbacks.push(e)}let flushing=!1;const seen_callbacks=new Set;function flush$1(){if(!flushing){flushing=!0;do{for(let e=0;e<dirty_components.length;
1e+=1){const t=dirty_components[e];set_current_component(t),update(t.$$)}for(set_current_component(null),dirty_components.length=0;binding_callbacks.length;)binding_callbacks.pop()();for(let e=0;e<render_callbacks.length;e+=1){const t=render_callbacks[e];seen_callbacks.has(t)||(seen_callbacks.add(t),t())}render_callbacks.length=0}while(dirty_components.length);for(;flush_callbacks.length;)flush_callbacks.pop()();update_scheduled=!1,flushing=!1,seen_callbacks.clear()}}function update(e){if(null!==e.fragment){e.update(),run_all(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(add_render_callback)}}const outroing=new Set;let outros;function group_outros(){outros={r:0,c:[],p:outros}}function check_outros(){outros.r||run_all(outros.c),outros=outros.p}function transition_in(e,t){e&&e.i&&(outroing.delete(e),e.i(t))}function transition_out(e,t,n,r){if(e&&e.o){if(outroing.has(e))return;outroing.add(e),outros.c.push((()=>{outroing.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}}function handle_promise(e,t){const n=t.token={};function r(e,r,i,a){if(t.token!==n)return;t.resolved=a;let o=t.ctx;void 0!==i&&(o=o.slice(),o[i]=a);const s=e&&(t.current=e)(o);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(group_outros(),transition_out(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),check_outros())})):t.block.d(1),s.c(),transition_in(s,1),s.m(t.mount(),t.anchor),c=!0),t.block=s,t.blocks&&(t.blocks[r]=s),c&&flush$1()}if(is_promise(e)){const n=get_current_component();if(e.then((e=>{set_current_component(n),r(t.then,1,t.value,e),set_current_component(null)}),(e=>{if(set_current_component(n),r(t.catch,2,t.error,e),set_current_component(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}else{if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}}function update_await_block_branch(e,t,n){const r=t.slice(),{resolved:i}=e;e.current===e.then&&(r[e.value]=i),e.current===e.catch&&(r[e.error]=i),e.block.p(r,n)}const globals="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function get_spread_update(e,t){const n={},r={},i={$$scope:1};let a=e.length;for(;a--;){const o=e[a],s=t[a];if(s){for(const e in o)e in s||(r[e]=1);for(const e in s)i[e]||(n[e]=s[e],i[e]=1);e[a]=s}else for(const e in o)i[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}function bind$1(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function create_component(e){e&&e.c()}function mount_component(e,t,n,r){const{fragment:i,on_mount:a,on_destroy:o,after_update:s}=e.$$;i&&i.m(t,n),r||add_render_callback((()=>{const t=a.map(run$1).filter(is_function);o?o.push(...t):run_all(t),e.$$.on_mount=[]})),s.forEach(add_render_callback)}function destroy_component(e,t){const n=e.$$;null!==n.fragment&&(run_all(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function make_dirty(e,t){-1===e.$$.dirty[0]&&(dirty_components.push(e),schedule_update(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function init(e,t,n,r,i,a,o=[-1]){const s=current_component;set_current_component(e);const c=e.$$={fragment:null,ctx:null,props:a,update:noop$1,not_equal:i,bound:blank_object(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(s?s.$$.context:t.context||[]),callbacks:blank_object(),dirty:o,skip_bound:!1};let l=!1;if(c.ctx=n?n(e,t.props||{},((t,n,...r)=>{const a=r.length?r[0]:n;return c.ctx&&i(c.ctx[t],c.ctx[t]=a)&&(!c.skip_bound&&c.bound[t]&&c.bound[t](a),l&&make_dirty(e,t)),n})):[],c.update(),l=!0,run_all(c.before_update),c.fragment=!!r&&r(c.ctx),t.target){if(t.hydrate){const e=children(t.target);c.fragment&&c.fragment.l(e),e.forEach(detach)}else c.fragment&&c.fragment.c();t.intro&&transition_in(e.$$.fragment),mount_component(e,t.target,t.anchor,t.customElement),flush$1()}set_current_component(s)}class SvelteComponent{$destroy(){destroy_component(this,1),this.$destroy=noop$1}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!is_empty(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}var media={webm:"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAAoC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdmM1NS41Mi4xMDI
vendor: 4,633 bytes, line 1
1BBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvsGUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQghhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgydB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJqDSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EIDRkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAAoEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3btm3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0JBVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopxZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrWmOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+gwCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghhhhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAgAAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJIKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZaomZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNCQVQCADACAAAAcwzEkRXIsy9I0T/M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1VNVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkAkAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQcwtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRAAAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAAAAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIgTAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyApgFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma53meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICAByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUVVWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKpmmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1XVdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQKEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUmopVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScRUoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKSWEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRpmud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAEBwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQU
vendor: 7,015 bytes, line 1
1QgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAKSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4EDt4r3gQHxghEr8IEK",mp4:"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhmcmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8vd3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTcgcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNiBjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9MjEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxvb2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPTEgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZW5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0ZXA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAuMCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMDAAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaVAX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGagC/AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrAL8DJIQBJkAIZACOAAAAABkGa4C/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZsgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZuAL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvgL8DJIQBJkAIZACOAAAAABkGaAC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZqgL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsAL8DJIQBJkAIZACOAAAAABkGbIC/AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACGQAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAAAAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXyRPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHNzAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAIxzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwAAA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOAAAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gAAAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAABAAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHMAAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIHN0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"}
1;const{webm:webm,mp4:mp4}=media,oldIOS=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,nativeWakeLock=()=>"wakeLock"in navigator;class NoSleep{constructor(){if(this.enabled=!1,nativeWakeLock()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else oldIOS()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm",webm),this._addSourceToVideo(this.noSleepVideo,"mp4",mp4),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,t,n){var r=document.createElement("source");r.src=n,r.type=`video/${t}`,e.appendChild(r)}get isEnabled(){return this.enabled}enable(){if(nativeWakeLock())return navigator.wakeLock.request("screen").then((e=>{this._wakeLock=e,this.enabled=!0,console.log("Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{console.log("Wake Lock released.")}))})).catch((e=>{throw this.enabled=!1,console.error(`${e.name}, ${e.message}`),e}));if(oldIOS())return this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();return this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){nativeWakeLock()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):oldIOS()?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}var src=NoSleep,extendStatics$1=function(e,t){return(extendStatics$1=Object.
1setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)}; 2/*! ***************************************************************************** 3 Copyright (c) Microsoft Corporation. 4 5 Permission to use, copy, modify, and/or distribute this software for any 6 purpose with or without fee is hereby granted. 7 8 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 13 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14 PERFORMANCE OF THIS SOFTWARE. 15 ***************************************************************************** */function __extends$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics$1(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function __awaiter(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))}function __generator(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function __values$1(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)} 16/** 17 * @license 18 * Copyright 2017 Google LLC 19 * 20 * Licensed under the Apache License, Version 2.0 (the "License"); 21 * you may not use this file except in compliance with the License. 22 * You may obtain a copy of the License at 23 * 24 * http://www.apache.org/licenses/LICENSE-2.0 25 * 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * See the License for the specific language governing permissions and 30 * limitations under the License. 31 */var stringToByteArray=function(e){for(var t=[],n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);i<128?t[n++]=i:i<2048?(t[n++]=i>>6|192,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},byteArrayToString=function(e){for(var t=[],n=0,r=0;n<e.length;){var i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){var a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){var o=((7&i)<<18|(63&(a=e[n++]))<<12|(63&(s=e[n++]))<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(o>>10)),t[r++]=String.fromCharCode(56320+(1023&o))}else{a=e[n++];var s=e[n++];
31t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}}return t.join("")},base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i<e.length;i+=3){var a=e[i],o=i+1<e.length,s=o?e[i+1]:0,c=i+2<e.length,l=c?e[i+2]:0,u=a>>2,d=(3&a)<<4|s>>4,p=(15&s)<<2|l>>6,h=63&l;c||(h=64,o||(p=64)),r.push(n[u],n[d],n[p],n[h])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(stringToByteArray(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):byteArrayToString(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i<e.length;){var a=n[e.charAt(i++)],o=i<e.length?n[e.charAt(i)]:0,s=++i<e.length?n[e.charAt(i)]:64,c=++i<e.length?n[e.charAt(i)]:64;if(++i,null==a||null==o||null==s||null==c)throw Error();var l=a<<2|o>>4;if(r.push(l),64!==s){var u=o<<4&240|s>>2;if(r.push(u),64!==c){var d=s<<6&192|c;r.push(d)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}}; 32/** 33 * @license 34 * Copyright 2017 Google LLC 35 * 36 * Licensed under the Apache License, Version 2.0 (the "License"); 37 * you may not use this file except in compliance with the License. 38 * You may obtain a copy of the License at 39 * 40 * http://www.apache.org/licenses/LICENSE-2.0 41 * 42 * Unless required by applicable law or agreed to in writing, software 43 * distributed under the License is distributed on an "AS IS" BASIS, 44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 45 * See the License for the specific language governing permissions and 46 * limitations under the License. 47 */ 48function deepCopy(e){return deepExtend(void 0,e)}function deepExtend(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:return new Date(t.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return t}for(var n in t)t.hasOwnProperty(n)&&isValidKey(n)&&(e[n]=deepExtend(e[n],t[n]));return e}function isValidKey(e){return"__proto__"!==e} 49/** 50 * @license 51 * Copyright 2017 Google LLC 52 * 53 * Licensed under the Apache License, Version 2.0 (the "License"); 54 * you may not use this file except in compliance with the License. 55 * You may obtain a copy of the License at 56 * 57 * http://www.apache.org/licenses/LICENSE-2.0 58 * 59 * Unless required by applicable law or agreed to in writing, software 60 * distributed under the License is distributed on an "AS IS" BASIS, 61 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 62 * See the License for the specific language governing permissions and 63 * limitations under the License. 64 */var Deferred=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}(); 65/** 66 * @license 67 * Copyright 2021 Google LLC 68 * 69 * Licensed under the Apache License, Version 2.0 (the "License");
70 * you may not use this file except in compliance with the License. 71 * You may obtain a copy of the License at 72 * 73 * http://www.apache.org/licenses/LICENSE-2.0 74 * 75 * Unless required by applicable law or agreed to in writing, software 76 * distributed under the License is distributed on an "AS IS" BASIS, 77 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 78 * See the License for the specific language governing permissions and 79 * limitations under the License. 80 */function createMockUserToken(e,t){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');var n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");var a=__assign({iss:"https://securetoken.google.com/"+n,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[base64.encodeString(JSON.stringify({alg:"none",type:"JWT"}),!1),base64.encodeString(JSON.stringify(a),!1),""].join(".")} 81/** 82 * @license 83 * Copyright 2017 Google LLC 84 * 85 * Licensed under the Apache License, Version 2.0 (the "License"); 86 * you may not use this file except in compliance with the License. 87 * You may obtain a copy of the License at 88 * 89 * http://www.apache.org/licenses/LICENSE-2.0 90 * 91 * Unless required by applicable law or agreed to in writing, software 92 * distributed under the License is distributed on an "AS IS" BASIS, 93 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 94 * See the License for the specific language governing permissions and 95 * limitations under the License. 96 */function getUA(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function isMobileCordova(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA())}function isNode$1(){try{return"[object process]"===Object.prototype.toString.call(global.process)}catch(e){return!1}}function isBrowser$1(){return"object"==typeof self&&self.self===self}function isBrowserExtension(){var e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function isReactNative(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function isElectron(){return getUA().indexOf("Electron/")>=0}function isIE(){var e=getUA();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function isUWP(){return getUA().indexOf("MSAppHost/")>=0} 97/** 98 * @license 99 * Copyright 2017 Google LLC 100 * 101 * Licensed under the Apache License, Version 2.0 (the "License"); 102 * you may not use this file except in compliance with the License. 103 * You may obtain a copy of the License at 104 * 105 * http://www.apache.org/licenses/LICENSE-2.0 106 * 107 * Unless required by applicable law or agreed to in writing, software 108 * distributed under the License is distributed on an "AS IS" BASIS, 109 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110 * See the License for the specific language governing permissions and 111 * limitations under the License. 112 */var ERROR_NAME="FirebaseError",FirebaseError=function(e){function t(n,r,i){var a=e.call(this,r)||this;return a.code=n,a.customData=i,a.name=ERROR_NAME,Object.setPrototypeOf(a,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(a,ErrorFactory.prototype.create),a}return __extends$1(t,e),t}(Error),ErrorFactory=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=t[0]||{},i=this.service+"/"+e,a=this.errors[e],o=a?replaceTemplate(a,r):"Error",s=this.serviceName+": "+o+" ("+i+").",c=new FirebaseError(i,s,r);return c},e}();function replaceTemplate(e,t){return e.replace(PATTERN,(function(e,n){var r=t[n];return null!=r?String(r):"<"+n+"?>"}))}var PATTERN=/\{\$([^}]+)}/g; 113/** 114 * @license 115 * Copyright 2017 Google LLC 116 * 117 * Licensed under the Apache License, Version 2.0 (the "License");
118 * you may not use this file except in compliance with the License. 119 * You may obtain a copy of the License at 120 * 121 * http://www.apache.org/licenses/LICENSE-2.0 122 * 123 * Unless required by applicable law or agreed to in writing, software 124 * distributed under the License is distributed on an "AS IS" BASIS, 125 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 126 * See the License for the specific language governing permissions and 127 * limitations under the License. 128 */function contains(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function createSubscribe(e,t){var n=new ObserverProxy(e,t);return n.subscribe.bind(n)}var ObserverProxy=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,i=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=implementsAnyMethods(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=noop),void 0===r.error&&(r.error=noop),void 0===r.complete&&(r.complete=noop);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{i.finalError?r.error(i.finalError):r.complete()}catch(e){}})),this.observers.push(r),a},e.prototype.unsubscribeOne=function(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var t=0;t<this.observers.length;t++)this.sendOne(t,e)},e.prototype.sendOne=function(e,t){var n=this;this.task.then((function(){if(void 0!==n.observers&&void 0!==n.observers[e])try{t(n.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function implementsAnyMethods(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var i=r[n];if(i in e&&"function"==typeof e[i])return!0}return!1}function noop(){} 129/** 130 * @license 131 * Copyright 2021 Google LLC 132 * 133 * Licensed under the Apache License, Version 2.0 (the "License"); 134 * you may not use this file except in compliance with the License. 135 * You may obtain a copy of the License at 136 * 137 * http://www.apache.org/licenses/LICENSE-2.0 138 * 139 * Unless required by applicable law or agreed to in writing, software 140 * distributed under the License is distributed on an "AS IS" BASIS, 141 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 142 * See the License for the specific language governing permissions and 143 * limitations under the License. 144 */function getModularInstance(e){return e&&e._delegate?e._delegate:e}var Component=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),DEFAULT_ENTRY_NAME$1="[DEFAULT]",Provider=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new Deferred;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(e){var t,n;if(e.name!==this.name)throw Error("Mismatching Component "+e.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");
144if(this.component=e,this.shouldAutoInitialize()){if(isComponentEager(e))try{this.getOrInitializeService({instanceIdentifier:DEFAULT_ENTRY_NAME$1})}catch(e){}try{for(var r=__values$1(this.instancesDeferred.entries()),i=r.next();!i.done;i=r.next()){var a=__read(i.value,2),o=a[0],s=a[1],c=this.normalizeInstanceIdentifier(o);try{var l=this.getOrInitializeService({instanceIdentifier:c});s.resolve(l)}catch(e){}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=DEFAULT_ENTRY_NAME$1),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(__spreadArray(__spreadArray([],__read(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),__read(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=DEFAULT_ENTRY_NAME$1),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.options,i=void 0===r?{}:r,a=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(a))throw Error(this.name+"("+a+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var o=this.getOrInitializeService({instanceIdentifier:a,options:i});try{for(var s=__values$1(this.instancesDeferred.entries()),c=s.next();!c.done;c=s.next()){var l=__read(c.value,2),u=l[0],d=l[1];a===this.normalizeInstanceIdentifier(u)&&d.resolve(o)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);var a=this.instances.get(r);return a&&e(a,r),function(){i.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r,i=this.onInitCallbacks.get(t);if(i)try{for(var a=__values$1(i),o=a.next();!o.done;o=a.next()){var s=o.value;try{s(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t=e.instanceIdentifier,n=e.options,r=void 0===n?{}:n,i=this.instances.get(t);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:normalizeIdentifierForFactory(t),options:r}),this.instances.set(t,i),this.invokeOnInitCallbacks(i,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,i)}catch(e){}return i||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=DEFAULT_ENTRY_NAME$1),this.component?this.component.multipleInstances?e:DEFAULT_ENTRY_NAME$1:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}(); 145/** 146 * @license 147 * Copyright 2019 Google LLC 148 * 149 * Licensed under the Apache License, Version 2.0 (the "License"); 150 * you may not use this file except in compliance with the License. 151 * You may obtain a copy of the License at 152 * 153 * http://www.apache.org/licenses/LICENSE-2.0 154 * 155 * Unless required by applicable law or agreed to in writing, software 156 * distributed under the License is distributed on an "AS IS" BASIS, 157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 158 * See the License for the specific language governing permissions and 159 * limitations under the License. 160 */function normalizeIdentifierForFactory(e){return e===DEFAULT_ENTRY_NAME$1?void 0:e}function isComponentEager(e){return"EAGER"===e.instantiationMode} 161/** 162 * @license 163 * Copyright 2019 Google LLC 164 * 165 * Licensed under the Apache License, Version 2.0 (the "License");
166 * you may not use this file except in compliance with the License. 167 * You may obtain a copy of the License at 168 * 169 * http://www.apache.org/licenses/LICENSE-2.0 170 * 171 * Unless required by applicable law or agreed to in writing, software 172 * distributed under the License is distributed on an "AS IS" BASIS, 173 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 174 * See the License for the specific language governing permissions and 175 * limitations under the License. 176 */var ComponentContainer=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(e){var t=this.getProvider(e.name);if(t.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);t.setComponent(e)},e.prototype.addOrOverwriteComponent=function(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new Provider(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}(),_a$3; 177/*! ***************************************************************************** 178 Copyright (c) Microsoft Corporation. All rights reserved. 179 Licensed under the Apache License, Version 2.0 (the "License"); you may not use 180 this file except in compliance with the License. You may obtain a copy of the 181 License at http://www.apache.org/licenses/LICENSE-2.0 182 183 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 184 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 185 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 186 MERCHANTABLITY OR NON-INFRINGEMENT. 187 188 See the Apache Version 2.0 License for specific language governing permissions 189 and limitations under the License. 190 ***************************************************************************** */function __spreadArrays(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r} 191/** 192 * @license 193 * Copyright 2017 Google LLC 194 * 195 * Licensed under the Apache License, Version 2.0 (the "License"); 196 * you may not use this file except in compliance with the License. 197 * You may obtain a copy of the License at 198 * 199 * http://www.apache.org/licenses/LICENSE-2.0 200 * 201 * Unless required by applicable law or agreed to in writing, software 202 * distributed under the License is distributed on an "AS IS" BASIS, 203 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 204 * See the License for the specific language governing permissions and 205 * limitations under the License. 206 */var instances=[],LogLevel;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(LogLevel||(LogLevel={}));var levelStringToEnum={debug:LogLevel.DEBUG,verbose:LogLevel.VERBOSE,info:LogLevel.INFO,warn:LogLevel.WARN,error:LogLevel.ERROR,silent:LogLevel.SILENT},defaultLogLevel=LogLevel.INFO,ConsoleMethod=(_a$3={},_a$3[LogLevel.DEBUG]="log",_a$3[LogLevel.VERBOSE]="log",_a$3[LogLevel.INFO]="info",_a$3[LogLevel.WARN]="warn",_a$3[LogLevel.ERROR]="error",_a$3),defaultLogHandler=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var i=(new Date).toISOString(),a=ConsoleMethod[t];if(!a)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[a].apply(console,__spreadArrays(["["+i+"] "+e.name+":"],n))}},Logger=function(){function e(e){this.name=e,this._logLevel=defaultLogLevel,this._logHandler=defaultLogHandler,this._userLogHandler=null,instances.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in LogLevel))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e}
206,enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?levelStringToEnum[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,__spreadArrays([this,LogLevel.DEBUG],e)),this._logHandler.apply(this,__spreadArrays([this,LogLevel.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,__spreadArrays([this,LogLevel.VERBOSE],e)),this._logHandler.apply(this,__spreadArrays([this,LogLevel.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,__spreadArrays([this,LogLevel.INFO],e)),this._logHandler.apply(this,__spreadArrays([this,LogLevel.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,__spreadArrays([this,LogLevel.WARN],e)),this._logHandler.apply(this,__spreadArrays([this,LogLevel.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,__spreadArrays([this,LogLevel.ERROR],e)),this._logHandler.apply(this,__spreadArrays([this,LogLevel.ERROR],e))},e}(),_a$1;function setLogLevel(e){instances.forEach((function(t){t.setLogLevel(e)}))}function setUserLogHandler(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=levelStringToEnum[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var o=i.map((function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((function(e){return e})).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:LogLevel[n].toLowerCase(),message:o,args:i,type:t.name})}},r=0,i=instances;r<i.length;r++){n(i[r])}} 207/** 208 * @license 209 * Copyright 2019 Google LLC 210 * 211 * Licensed under the Apache License, Version 2.0 (the "License"); 212 * you may not use this file except in compliance with the License. 213 * You may obtain a copy of the License at 214 * 215 * http://www.apache.org/licenses/LICENSE-2.0 216 * 217 * Unless required by applicable law or agreed to in writing, software 218 * distributed under the License is distributed on an "AS IS" BASIS, 219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 220 * See the License for the specific language governing permissions and 221 * limitations under the License. 222 */var ERRORS=(_a$1={},_a$1["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",_a$1["bad-app-name"]="Illegal App name: '{$appName}",_a$1["duplicate-app"]="Firebase App named '{$appName}' already exists",_a$1["app-deleted"]="Firebase App named '{$appName}' already deleted",_a$1["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",_a$1["invalid-log-argument"]="First argument to `onLog` must be null or a function.",_a$1),ERROR_FACTORY=new ErrorFactory("app","Firebase",ERRORS),name$c="@firebase/app",version$1$1="0.6.28",name$b="@firebase/analytics",name$a="@firebase/app-check",name$9="@firebase/auth",name$8="@firebase/database",name$7="@firebase/functions",name$6="@firebase/installations",name$5="@firebase/messaging",name$4="@firebase/performance",name$3="@firebase/remote-config",name$2="@firebase/storage",name$1="@f
222irebase/firestore",name$d="firebase-wrapper",_a$2,DEFAULT_ENTRY_NAME="[DEFAULT]",PLATFORM_LOG_STRING=(_a$2={},_a$2[name$c]="fire-core",_a$2[name$b]="fire-analytics",_a$2[name$a]="fire-app-check",_a$2[name$9]="fire-auth",_a$2[name$8]="fire-rtdb",_a$2[name$7]="fire-fn",_a$2[name$6]="fire-iid",_a$2[name$5]="fire-fcm",_a$2[name$4]="fire-perf",_a$2[name$3]="fire-rc",_a$2[name$2]="fire-gcs",_a$2[name$1]="fire-fst",_a$2["fire-js"]="fire-js",_a$2[name$d]="fire-js-all",_a$2),logger=new Logger("@firebase/app"),FirebaseAppImpl=function(){function e(e,t,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=deepCopy(e),this.container=new ComponentContainer(t.name),this._addComponent(new Component("app",(function(){return r}),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(e){return r._addComponent(e)}))}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map((function(e){return e.delete()})))})).then((function(){e.isDeleted_=!0}))},e.prototype._getService=function(e,t){var n;void 0===t&&(t=DEFAULT_ENTRY_NAME),this.checkDestroyed_();var r=this.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=DEFAULT_ENTRY_NAME),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(t){logger.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,t)}},e.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},e.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw ERROR_FACTORY.create("app-deleted",{appName:this.name_})},e}();FirebaseAppImpl.prototype.name&&FirebaseAppImpl.prototype.options||FirebaseAppImpl.prototype.delete||console.log("dc");var version$2="8.7.0"; 223/** 224 * @license 225 * Copyright 2019 Google LLC 226 * 227 * Licensed under the Apache License, Version 2.0 (the "License"); 228 * you may not use this file except in compliance with the License. 229 * You may obtain a copy of the License at 230 * 231 * http://www.apache.org/licenses/LICENSE-2.0 232 * 233 * Unless required by applicable law or agreed to in writing, software 234 * distributed under the License is distributed on an "AS IS" BASIS, 235 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 236 * See the License for the specific language governing permissions and 237 * limitations under the License. 238 */function createFirebaseNamespaceCore(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,i){void 0===i&&(i={});if("object"!=typeof i||null===i){i={name:i}}var a=i;void 0===a.name&&(a.name=DEFAULT_ENTRY_NAME);var o=a.name;if("string"!=typeof o||!o)throw ERROR_FACTORY.create("bad-app-name",{appName:String(o)});if(contains(t,o))throw ERROR_FACTORY.create("duplicate-app",{appName:o});var s=new e(n,a,r);return t[o]=s,s},app:i,registerVersion:function(e,t,n){var r,i=null!==(r=PLATFORM_LOG_STRING[e])&&void 0!==r?r:e;n&&(i+="-"+n);var o=i.match(/\s|\//),s=t.match(/\s|\//);if(o||s){var c=['Unable to register library "'+i+'" with version "'+t+'":'];return o&&c.push('library name "'+i+'" contains illegal characters (whitespace or "/")'),o&&s&&c.push("and"),s&&c.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void logger.warn(c.join(" "))}a(new Component(i+"-version",(function(){return{library:i,version:t}}),"VERSION"))},setLogLevel:setLogLevel,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw ERROR_FACTORY.create("invalid-log-argument");setUserLogHandler(e,t)},apps:null,SDK_VERSION:version$2,INTERNAL:{registerComponent:a,removeApp:function(e){delete t[e]}
238,components:n,useAsService:function(e,t){if("serverAuth"===t)return null;return t}}};function i(e){if(!contains(t,e=e||DEFAULT_ENTRY_NAME))throw ERROR_FACTORY.create("no-app",{appName:e});return t[e]}function a(a){var o=a.name;if(n.has(o))return logger.debug("There were multiple attempts to register component "+o+"."),"PUBLIC"===a.type?r[o]:null;if(n.set(o,a),"PUBLIC"===a.type){var s=function(e){if(void 0===e&&(e=i()),"function"!=typeof e[o])throw ERROR_FACTORY.create("invalid-app-argument",{appName:o});return e[o]()};void 0!==a.serviceProps&&deepExtend(s,a.serviceProps),r[o]=s,e.prototype[o]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getService.bind(this,o);return n.apply(this,a.multipleInstances?e:[])}}for(var c=0,l=Object.keys(t);c<l.length;c++){var u=l[c];t[u]._addComponent(a)}return"PUBLIC"===a.type?r[o]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(t).map((function(e){return t[e]}))}}),i.App=e,r} 239/** 240 * @license 241 * Copyright 2019 Google LLC 242 * 243 * Licensed under the Apache License, Version 2.0 (the "License"); 244 * you may not use this file except in compliance with the License. 245 * You may obtain a copy of the License at 246 * 247 * http://www.apache.org/licenses/LICENSE-2.0 248 * 249 * Unless required by applicable law or agreed to in writing, software 250 * distributed under the License is distributed on an "AS IS" BASIS, 251 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 252 * See the License for the specific language governing permissions and 253 * limitations under the License. 254 */function createFirebaseNamespace(){var e=createFirebaseNamespaceCore(FirebaseAppImpl);return e.INTERNAL=__assign(__assign({},e.INTERNAL),{createFirebaseNamespace:createFirebaseNamespace,extendNamespace:function(t){deepExtend(e,t)},createSubscribe:createSubscribe,ErrorFactory:ErrorFactory,deepExtend:deepExtend}),e}var firebase$1=createFirebaseNamespace(),PlatformLoggerService=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(e){if(isVersionServiceProvider(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}(); 255/** 256 * @license 257 * Copyright 2019 Google LLC 258 * 259 * Licensed under the Apache License, Version 2.0 (the "License"); 260 * you may not use this file except in compliance with the License. 261 * You may obtain a copy of the License at 262 * 263 * http://www.apache.org/licenses/LICENSE-2.0 264 * 265 * Unless required by applicable law or agreed to in writing, software 266 * distributed under the License is distributed on an "AS IS" BASIS, 267 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 268 * See the License for the specific language governing permissions and 269 * limitations under the License. 270 */function isVersionServiceProvider(e){var t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)} 271/** 272 * @license 273 * Copyright 2019 Google LLC 274 * 275 * Licensed under the Apache License, Version 2.0 (the "License"); 276 * you may not use this file except in compliance with the License. 277 * You may obtain a copy of the License at 278 * 279 * http://www.apache.org/licenses/LICENSE-2.0 280 * 281 * Unless required by applicable law or agreed to in writing, software 282 * distributed under the License is distributed on an "AS IS" BASIS, 283 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 284 * See the License for the specific language governing permissions and 285 * limitations under the License. 286 */function registerCoreComponents(e,t){e.INTERNAL.registerComponent(new Component("platform-logger",(function(e){return new PlatformLoggerService(e)}),"PRIVATE")),e.registerVersion(name$c,version$1$1,t),e.registerVersion("fire-js","")} 287/** 288 * @license 289 * Copyright 2017 Google LLC 290 * 291 * Licensed under the Apache License, Version 2.0 (the "License");
292 * you may not use this file except in compliance with the License. 293 * You may obtain a copy of the License at 294 * 295 * http://www.apache.org/licenses/LICENSE-2.0 296 * 297 * Unless required by applicable law or agreed to in writing, software 298 * distributed under the License is distributed on an "AS IS" BASIS, 299 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 300 * See the License for the specific language governing permissions and 301 * limitations under the License. 302 */if(isBrowser$1()&&void 0!==self.firebase){logger.warn("\n Warning: Firebase is already defined in the global scope. Please make sure\n Firebase library is only loaded once.\n ");var sdkVersion=self.firebase.SDK_VERSION;sdkVersion&&sdkVersion.indexOf("LITE")>=0&&logger.warn("\n Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n ")}var initializeApp=firebase$1.initializeApp;firebase$1.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return isNode$1()&&logger.warn('\n Warning: This is a browser-targeted Firebase bundle but it appears it is being\n run in a Node environment. If running in a Node environment, make sure you\n are using the bundle specified by the "main" field in package.json.\n \n If you are using Webpack, you can specify "main" as the first item in\n "resolve.mainFields":\n https://webpack.js.org/configuration/resolve/#resolvemainfields\n \n If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n as the first item in "mainFields", e.g. [\'main\', \'module\'].\n https://github.com/rollup/@rollup/plugin-node-resolve\n '),initializeApp.apply(void 0,e)};var firebase=firebase$1;registerCoreComponents(firebase);var name="firebase",version$1="8.7.1"; 303/** 304 * @license 305 * Copyright 2018 Google LLC 306 * 307 * Licensed under the Apache License, Version 2.0 (the "License"); 308 * you may not use this file except in compliance with the License. 309 * You may obtain a copy of the License at 310 * 311 * http://www.apache.org/licenses/LICENSE-2.0 312 * 313 * Unless required by applicable law or agreed to in writing, software 314 * distributed under the License is distributed on an "AS IS" BASIS, 315 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 316 * See the License for the specific language governing permissions and 317 * limitations under the License. 318 */ 319firebase.registerVersion(name,version$1,"app"),firebase.SDK_VERSION=version$1;let allCards=[{id:0,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:1,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:2,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:3,box:["classics"],deck:"Persians",area:"PowerA",suits:[],icons:[],name:"Persians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:4,box:["classics"],deck:"Persians",area:"PowerB",suits:[],icons:[],name:"Persians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:5,box:["classics"],deck:"Persians",area:"Accession",suits:[],icons:["pinned","city"],name:"City of Persepolis",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:6,box:["classics"],deck:"Persians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Bactria",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:7,box:["classics"],deck:"Persians",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Zagros",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:8,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:9,box:["classics"],deck:"Persians",area:"Starter",suits:["trib"],icons:["barbarian"],name:"Lydians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:10,box:["classics"],deck:"Persians",area:"Nation",suits:["trib"],icons:["barbarian"],name:"Median Empire",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:11,box:["classics"],deck:"Persians",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Arachosia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:12,box:["classics"],deck:"Persians",area:"Nation",suits:["reg"],icons:["pinned","grain","grain"],name:"Nisaean Plain",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:13,box:["classics"],deck:"Persians",area:"Development",suits:["trib"],icons:["empire"],name:"Babylonians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:14,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","pinned"],name:"Windmills",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:15,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Satrap",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:16,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Development",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:17,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","attack"],name:"Persian Gold",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:18,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","attack"],name:"Battering Ram",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:19,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Darius I",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:20,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Shaduf",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:21,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Boats",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:22,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Diplomacy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:23,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Gambling",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:26,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Leadership",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:27,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian","pinned"],name:"Town",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:29,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","barbarian"],name:"Shrine",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:31,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Port",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:32,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Agriculture",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:34,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["scroll"],name:"Lost Scroll",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:36,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian"],name:"Rituals & Ceremonies",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:37,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Standing Army",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:38,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Triumphant",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:11},{id:39,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:["pinned"],name:"Awe-inspiring",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7},{id:40,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Great",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:42,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Glorious",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:6},{id:43,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Praiseworthy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:44,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Marvellous",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:9},{id:45,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Steppe",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:46,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","barbarian"],name:"Sacred Pass",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:47,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Hills",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:48,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","water"],name:"Oasis",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:49,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Forest",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:50,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Woodland",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:52,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","water"],name:"River",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:54,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Floodplain",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:59,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Urban Development",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:60,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Education",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:61,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Corruption",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:62,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Pharmacy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:63,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack","knight"],name:"Cataphract",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:64,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Exports",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:66,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Coinage",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:67,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Onager",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:68,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Temple",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:70,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Wonder",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:71,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Drama & Poetry",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:72,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Egyptians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:73,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Hittites",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:74,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Assyrians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:75,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Armenians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:76,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Qin",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:77,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Sumerians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:78,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Ionians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:79,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Aksumites",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:80,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["barbarian"],name:"Minoans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:81,box:["classics"],deck:"Carthaginians",area:"PowerA",suits:[],icons:[],name:"Carthaginians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:82,box:["classics"],deck:"Carthaginians",area:"PowerB",suits:[],icons:[],name:"Carthaginians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:84,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire","attack"],name:"Monopoly",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:85,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire"],name:"Hegemony",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:86,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire","attack"],name:"Elephants",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:87,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire"],name:"Hannibal",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:90,box:["classics"],deck:"Carthaginians",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Iberia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:93,box:["classics"],deck:"Carthaginians",area:"Nation",suits:[],icons:["pinned"],name:"Caravans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:95,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:[],name:"Prosperity",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:96,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:97,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Dido, Queen of Carthage",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:98,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:99,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Carthaginian Traders",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:100,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:101,box:["classics"],deck:"Carthaginians",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Mauretania",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:102,box:["classics"],deck:"Celts",area:"PowerA",suits:[],icons:[],name:"Celts",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:103,box:["classics"],deck:"Celts",area:"PowerB",suits:[],icons:[],name:"Celts",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:104,box:["classics"],deck:"Celts",area:"Accession",suits:[],icons:[],name:"Celtic Gold",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:105,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Chainmail",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:106,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","attack"],name:"Celtic Innovation",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:107,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Chariots",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:108,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Ogham Script",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:109,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire"],name:"Vercingetorix",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:110,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Armorica",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:111,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","grain"],name:"Hibernia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:112,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Britannia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:114,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","water"],name:"Belgica",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:115,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:116,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Boudicca",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:117,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Cattle Raid",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:119,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["pinned"],name:"Cauldron of Ceridwen",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:120,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:121,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:122,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:[],name:"Druids",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:123,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Marsh",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:125,box:["classics"],deck:"Greeks",area:"PowerA",suits:[],icons:[],name:"Greeks",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:126,box:["classics"],deck:"Greeks",area:"PowerB",suits:[],icons:[],name:"Greeks",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:127,box:["classics"],deck:"Greeks",area:"Accession",suits:[
319],icons:[],name:"Olympic Games",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:129,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire"],name:"Pericles",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:130,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned","city"],name:"City of Corinth",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:131,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Science",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:132,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","attack"],name:"Greek Innovation",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:133,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Direct Democracy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:134,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire"],name:"Philosophy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:135,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Lighthouse",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:136,box:["classics"],deck:"Greeks",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Plains of Thessaly",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:137,box:["classics"],deck:"Greeks",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Athens",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:138,box:["classics"],deck:"Greeks",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Forest of Pholoe",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:139,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["attack"],name:"Greek Mercenaries",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:140,box:["classics"],deck:"Greeks",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Peloponnese",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:141,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:142,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["pinned","barbarian","city"],name:"City of Sparta",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:143,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:144,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Settlers",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:145,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:146,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Code of Laws",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:147,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Water Mill",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:148,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Qanat",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:149,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Domestication",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:150,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["attack"],name:"Espionage",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:152,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","barbarian"],name:"Monument",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:154,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Art",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:155,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Road Building",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:157,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Mining",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:158,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","barbarian"],name:"Fortunate Isle",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:163,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack"],name:"Highlands",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:164,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Plain",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:165,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Grassland",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:166,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water","water"],name:"Lakes",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:169,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Rainforest",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:170,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Moor",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:171,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Civil Service",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:172,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Astronomy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:173,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Amphitheatre",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:174,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Olmecs",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:175,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Mauryans",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:176,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Cartography",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:177,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Masonry",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:178,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Persians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:179,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["empire","attack"],name:"Vikings",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:180,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],name:"Carthaginians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:181,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Macedonians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:182,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Scythians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:184,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["empire","pinned","metropolis"],name:"Greeks",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:185,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Phoenicians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:186,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["barbarian"],name:"Etruscans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:187,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],name:"Xiongnu",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:188,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Romans",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:189,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:[],name:"Sacred Grove",count:1,minplayers:3,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!0,scoretype:"Multiplier"},{id:190,box:["classics"],deck:"Macedonians",area:"PowerA",suits:[],icons:[],name:"Macedonians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:191,box:["classics"],deck:"Macedonians",area:"PowerB",suits:[],icons:[],name:"Macedonians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:192,box:["classics"],deck:"Macedonians",area:"Accession",suits:[],icons:[],name:"Alexander",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:193,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Alexander the Great",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:194,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned"],name:"Mosaics",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:195,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned"],name:"Companion Cavalry",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:196,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Development",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:197,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned","metropolis"],name:"Alexandria in Egypt",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:198,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Parmenion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:199,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned","city"],name:"Alexandria in Ariana",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:200,box:["classics"],deck:"Macedonians",area:"Nation",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:201,box:["classics"],deck:"Macedonians",area:"Nation",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:202,box:["classics"],deck:"Macedonians",area:"Nation",suits:["trib"],icons:["attack"],name:"Uxians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:203,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["pinned"],name:"Phalanx",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:204,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned","grain"],name:"Pelagonia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:205,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned","grain","water"],name:"Haliacmon Valley",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:206,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Orestis",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:207,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:208,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:209,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Philip II",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:210,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Acclaimed",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:211,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Proud",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:212,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Independent",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:213,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Magnificent",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:5},{id:214,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Eminent",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:8},{id:215,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Imperial",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:216,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Outstanding",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7},{id:217,box:["classics"],deck:"Romans",area:"PowerA",suits:[],icons:[],name:"Romans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:218,box:["classics"],deck:"Romans",area:"PowerB",suits:[],icons:[],name:"Romans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:219,box:["classics"],deck:"Romans",area:"Accession",suits:[],icons:["empire"],name:"Julius Caesar",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:220,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","attack"],name:"Roman Invasion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:221,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","pinned"],name:"Legions",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:222,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","attack"],name:"Military Engineering",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:223,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire"],name:"The Senate",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:224,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","pinned","metropolis"],name:"Rome, the Eternal City",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:225,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire"],name:"Emperor Trajan",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:226,box:["classics"],deck:"Romans",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Raetia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:227,box:["classics"],deck:"Romans",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Gallia Aquitania",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:229,box:["classics"],deck:"Romans",area:"Nation",suits:[],icons:["pinned"],name:"Bread and Circuses",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:230,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Roman Expansion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:231,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:232,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Triumvirate",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:233,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:234,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:235,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:[],name:"Prosperity",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:236,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["pinned","city"],name:"City of Rome",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:237,box:["classics"],deck:"Romans",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Dalmatia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:240,box:["classics"],deck:"Scythians",area:"Accession",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:241,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:[],name:"Jewellery",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7},{id:243,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:["empire","pinned","city"],name:"City of Gelonus",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:244,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:["empire","pinned"],name:"Kurgans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:245,box:["classics"],deck:"Scythians",area:"Nation",suits:[],icons:["barbarian","attack"],name:"Raiders",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:246,box:["classics"],deck:"Scythians",area:"Nation",suits:[],icons:["pinned"],name:"Tamga",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:247,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Tarim Basin",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:248,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Caucasia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:249,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Pontic Steppe",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:251,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:252,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["pinned","barbarian"],name:"Tents",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:253,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["pinned"],name:"Mounted Archers",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:254,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:255,box:["classics"],deck:"Scythians",area:"Starter",suits:["reg"],icons:["pinned","barbarian"],name:"Carpathian Mountains",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:256,box:["classics"],deck:"Scythians",area:"Starter",suits:["reg"],icons:["pinned","barbarian"],name:"Tian Shan",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:257,box:["classics"],deck:"Vikings",area:"PowerA",suits:[],icons:[],name:"Vikings",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:258,box:["classics"],deck:"Vikings",area:"PowerB",suits:[],icons:[],name:"Vikings",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:259,box:["classics"],deck:"Vikings",area:"Accession",suits:[],icons:["barbarian"],name:"Harald Hardrada",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:260,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian"],name:"Føroyar",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:261,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Sagas",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:262,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["barbarian","attack"],name:"Go A'Viking",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:263,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian","city"],name:"City of Dubh Linn",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:264,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Skis",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:265,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Longships",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:266,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Combs",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:267,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian","sack","water","grain"],name:"Vinland",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:268,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["barbarian"],name:"Rollo the Walker",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:269,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian"],name:"Graenland",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:270,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Iceland",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:271,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Gothja",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:272,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Jomsviking",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:273,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Althing",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:274,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:275,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:276,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Erik the Red",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:277,box:["classics"],deck:"Vikings",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Scandinavia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:278,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:279,box:["legends"],deck:"Arthurians",area:"PowerA",suits:[],icons:[],name:"Arthurians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0},{id:280,box:["legends"],deck:"Arthurians",area:"PowerB",suits:[],icons:[],name:"Arthurians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:6,hidden:!0},{id:"3MRT30A/30A",box:["merchants"],deck:"Martians",area:"Extra-State",suits:[],icons:["empire"],name:"Alien",changedOn:"16/08",count:1,hidden:!0,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",location:"play"},{id:"3MRT30B/30B",box:["merchants"],deck:"Martians",area:"Extra-State",suits:[],icons:["barbarian"],name:"Gone Native",count:1,hidden:!0,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",changedOn:"24/08",value:0,location:"play"},{id:"3TAI24/24",box:["merchants"],deck:"Taino",area:"Extra-State",suits:[],icons:["barbarian"],name:"Free Tribes",count:1,hidden:!0,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",location:"play"},{id:"3CUL29A/29A",box:["merchants"],deck:"Cultists",area:"State",suits:[],icons:["corrupted"],name:"Corrupted",count:1,minplayers:2,changedOn:"3/08",garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:""},{id:"3CUL29B/29B",box:["merchants"],deck:"Cultists",area:"State",suits:[],icons:["summoned"],name:"Summoned",changedOn:"3/08",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:"Number",value:5},{id:"3INU25B/25B",box:["merchants"],deck:"Inuit",area:"Extra-State",suits:[],icons:["barbarian"],name:"Winter",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:"",location:"play"},{id:"3INU25A/25A",box:["merchants"],deck:"Inuit",area:"Extra-State",suits:[],icons:["empire"],name:"Summer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:"",location:"play"},{id:"3POL30A/30",box:["merchants"],deck:"Polynesians",area:"Extra-State",suits:[],icons:["barbarian","foot"],name:"Isle-bound",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:"",location:"play"},{id:"3POL30B/30",box:["merchants"],deck:"Polynesians",area:"Extra-State",suits:[],icons:["barbarian","eye"],name:"Voyaging",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],hidden:!0,needsThem:!1,scoretype:""},{id:282,box:["legends"],deck:"Arthurians",area:"Extra-Court",suits:[],icons:[],name:"King Arthur'
319s Court",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",location:"play"},{id:283,box:["legends"],deck:"Arthurians",area:"Accession",suits:[],icons:["pinned"],name:"Gwaith Camlan",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:284,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["empire"],name:"Taliesin the Bard",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:285,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:[],name:"Excalibur",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:286,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:[],name:"Graal",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:8},{id:287,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["knight"],name:"Lawnslot y Llyn (Sir Lancelot)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:288,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["pinned"],name:"Twrch Trwyth",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:-4},{id:289,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Camelot",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:290,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["knight"],name:"Bedwyr (Sir Bedevire)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:291,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Britannia Flavia",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:292,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned","water"],name:"Viviane of the Lake",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:293,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["knight"],name:"Gwalchmei (Sir Gawain)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:294,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Ynys Afallach (Avalon)",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:295,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["attack"],name:"Lady Bertilak",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:296,box:["legends"],deck:"Arthurians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Britannia Secunda",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:297,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Myrddin Wyllt (Merlin)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:298,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Peredur (Sir Percival)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:300,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],name:"Guennuvar",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:301,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"King Arthur",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:302,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["attack"],name:"Morigena",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:303,box:["legends"],deck:"Arthurians",area:"Starter",suits:["reg"],icons:["pinned","grain"],name:"Britannia Prima",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:304,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Cai (Sir Kay)",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:305,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],name:"Uthyr Pendragon",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:308,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Development",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:309,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Kleito",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:311,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","pinned"],name:"Palace of Poseidon",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:5},{id:312,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","pinned"],name:"Moats and Walls",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:314,box:["legends"],deck:"Atlanteans",area:"Development",suits:["reg"],icons:["empire","pinned","grain","sack"],name:"Themiscyra",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:315,box:["legends"],deck:"Atlanteans",area:"Development",suits:["reg"],icons:["empire","pinned"],name:"Mountain of Atlantis",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:318,box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["empire"],name:"Flood",count:3,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:319,box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["empire"],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:321,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned"],name:"Thule",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:322,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned","sack"],name:"Hesperides",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:323,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned","sack","sack"],name:"Elysian Fields",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:324,box:["legends"],deck:"Egyptians",area:"PowerA",suits:[],icons:[],name:"Egyptians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:325,box:["legends"],deck:"Egyptians",area:"PowerB",suits:[],icons:[],name:"Egyptians",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:326,box:["legends"],deck:"Egyptians",area:"Accession",suits:[],icons:[],name:"Unification",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:327,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire"],name:"Development",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:328,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire"],name:"Ramesses II",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:329,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","attack"],name:"Egyptian Expansion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:330,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Pyramids",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:331,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","attack"],name:"Egyptian Legacy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:332,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Obelisk",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:333,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Embalming",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:334,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Medicine",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:335,box:["legends"],deck:"Egyptians",area:"Nation",suits:["trib"],icons:["barbarian"],name:"Kushites",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""}
319,{id:336,box:["legends"],deck:"Egyptians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Red Land",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:337,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Egyptian Incursion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:338,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["pinned"],name:"Egyptian Hieroglyphics",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:339,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:340,box:["legends"],deck:"Egyptians",area:"Starter",suits:["reg"],icons:["pinned","sack","water","grain"],name:"Nile Valley",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:341,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:342,box:["legends"],deck:"Egyptians",area:"Starter",suits:["reg"],icons:["pinned","water"],name:"Lower Nile",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:343,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Flood of the Nile",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:344,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:345,box:["legends"],deck:"Mauryans",area:"PowerA",suits:[],icons:[],name:"Mauryans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:346,box:["legends"],deck:"Mauryans",area:"PowerB",suits:[],icons:[],name:"Mauryans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:347,box:["legends"],deck:"Mauryans",area:"Accession",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:348,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire"],name:"Ashoka",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:349,box:["legends"],deck:"Mauryans",area:"Development",suits:["reg","reg"],icons:["empire","pinned"],name:"Grand Trunk Road",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:350,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Punch-marked Coins",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:351,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Edicts of Ashoka",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:352,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Mathematics",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:353,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Buddhism",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:354,box:["legends"],deck:"Mauryans",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Gandhara",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:356,box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["pinned"],name:"Arthashastra",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:357,box:["legends"],deck:"Mauryans",area:"Nation",suits:["trib"],icons:[],name:"Nanda Dynasty",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:358,box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Pataliputra",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:359,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:361,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:["barbarian"],name:"Chanakya",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:362,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:363,box:["legends"],deck:"Mauryans",area:"Starter",suits:["reg"],icons:["pinned","sack","grain","water"],name:"Indus Valley",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:364,box:["legends"],deck:"Mauryans",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Magadha",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:365,box:["legends"],deck:"Minoans",area:"PowerA",suits:[],icons:[],name:"Minoans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0},{id:366,box:["legends"],deck:"Minoans",area:"PowerB",suits:[],icons:[],name:"Minoans",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:367,box:["legends"],deck:"Minoans",area:"Accession",suits:[],icons:[],name:"King Minos",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:369,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Drainage System",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:370,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Architecture",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:371,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Frescos",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:372,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Labyrinth",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:373,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","attack"],name:"Minoan Expansion",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:374,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:[],name:"Seal Stones",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:375,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:376,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:["pinned"],name:"Writing Systems",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:377,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:["pinned","metropolis"],name:"Knossos",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:378,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:379,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:381,box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Thera",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:383,box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Cyprus",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:384,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:385,box:["legends"],deck:"Olmecs",area:"PowerA",suits:[],icons:[],name:"Olmecs",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0},{id:386,box:["legends"],deck:"Olmecs",area:"PowerB",suits:[],icons:[],name:"Olmecs",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0},{id:387,box:["legends"],deck:"Olmecs",area:"Accession",suits:[],icons:["pinned","metropolis"],name:"San Lorenzo Tenochtitlán",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:388,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Step Pyramids",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:389,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire"],name:"Ritual Sacrifice",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:390,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","attack"],name:"Olmec Traders",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:391,box:["legends"],deck:"Olmecs",area:"Development",suits:["reg"],icons:["empire","pinned","sack","grain"],name:"Tres Zapotes",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:392,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Stone Heads",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:393,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Drainage System",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:394,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:[],name:"Cacao",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:395,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:["pinned"],name:"Olmec Hieroglyphics",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:396,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:["pinned"],name:"Calendar",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:398,box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["pinned"],name:"Loadstone Compass",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:400,box:["legends"],deck:"Olmecs",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Laguna de los Cerros",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:401,box:["legends"],deck:"Olmecs",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"La Venta",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:402,box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["mask"],name:"Stone Mask",count:8,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:403,box:["legends"],deck:"Qin",area:"PowerA",suits:[],icons:[],name:"Qin",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:404,box:["legends"],deck:"Qin",area:"PowerB",suits:[],icons:[],name:"Qin",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0},{id:405,box:["legends"],deck:"Qin",area:"Accession",suits:[],icons:["empire","pinned"],name:"Long Walls I",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:406,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Metallurgy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:407,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:[],name:"Terracotta Warriors",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:408,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Mathematics",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3},{id:409,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls II",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:410,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls III",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:411,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls IV",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:412,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire"],name:"Emperor Qin Shi Huang",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:413,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire"],name:"King Wu of Qin",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:414,box:["legends"],deck:"Qin",area:"Nation",suits:[],icons:["pinned"],name:"Writing Systems",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:415,box:["legends"],deck:"Qin",area:"Nation",suits:[],icons:[],name:"Glory",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:416,box:["legends"],deck:"Qin",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Eastern Zhou",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:417,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Mandate of Heaven",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:418,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Confucianism",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:419,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Legalism",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:420,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:[],name:"Prosperity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:421,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["attack"],name:"School of Diplomacy",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:422,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:423,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["barbarian"],name:"Duke Zhuang of Qin",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:424,box:["legends"],deck:"Qin",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Western Zhou",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:427,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Visions of Shangri-La",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",location:"play"},{id:427.5,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Path to Shangri-La",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",location:"play"},{id:429,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Daoc
319hang",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:430,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["scroll"],name:"Sacred Scroll",count:5,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional"},{id:431,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Tree of Knowledge",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:432,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Monastery",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:435,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:[],name:"Charity",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:436,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:[],name:"Meditation",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""},{id:437,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Mountain Retreat",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:-1,box:[],name:"No card",deck:"",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0},{id:"KoKA",side:"A",box:["classics","legends","merchants"],name:"King of Kings (side A)",deck:"King of Kings",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0},{id:"KoKB",side:"B",box:["classics","legends","merchants"],name:"King of Kings (side B)",deck:"King of Kings",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0},{id:"StateBarbarian",side:"A",box:["classics","legends","merchants"],name:"State: Barbarian",deck:"State",area:"StateA",state:"barbarian",suits:[],icons:["barbarian"],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0},{id:"StateEmpire",side:"B",box:["classics","legends","merchants"],name:"State: Empire",deck:"State",area:"StateB",state:"empire",suits:[],icons:["empire"],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0},{autoSynced:!0,RefNumber:"3FAM3/10",id:"3FAM3/10",name:"Welcoming",changedOn:"17/9",box:["merchants","classics","legends"],deck:"Fame",area:"Fame",suits:["fame","trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:5},{autoSynced:!0,RefNumber:"3FAM4/10",id:"3FAM4/10",name:"Determined",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:["knight"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"card in [[region-small]]",targets:["garrisoned"]}],origCondition:"1 VP per garrisoned card in [[region-small]]"}},{autoSynced:!0,RefNumber:"3FAM5/10",id:"3FAM5/10",name:"Canny",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:6},{autoSynced:!0,RefNumber:"3FAM6/10",id:"3FAM6/10",name:"Honourable",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:5},{autoSynced:!0,RefNumber:"3FAM7/10",id:"3FAM7/10",name:"Brave",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:8},{autoSynced:!0,RefNumber:"3FAM8/10",id:"3FAM8/10",name:"Intrepid",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:5},{autoSynced:!0,RefNumber:"3FAM9/10",id:"3FAM9/10",name:"Influential",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3UNC1/25",id:"3UNC1/25",name:"Navigation",changedOn:"06/09",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned"],area:"Uncivilised",minplayers:4,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC2/25",id:"3UNC2/25",name:"Undecipherable Scroll",changedOn:"06/09",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["barbarian","scroll"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC4/25",id:"3UNC4/25",name:"Trade Caravans",changedOn:"15/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned","barbarian","sack"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC5/25",id:"3UNC5/25",name:"Warfare",changedOn:"15/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["attack"],exp
319ansions:["blood"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC6/25",id:"3UNC6/25",name:"Altar",changedOn:"6/7",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned","barbarian"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[river-small]]","[[fertile-small]]","[[ocean-small]]"]}],origCondition:"1 VP per 2 [[river-small]]/[[fertile-small]]/[[ocean-small]]."}},{autoSynced:!0,RefNumber:"3UNC7/25",id:"3UNC7/25",name:"Trading Post",changedOn:"",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned","barbarian","sack","city","merchant"],expansions:["traderoute"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[river-small]]"]}],origCondition:" 2 VP per [[river-small]]"}},{autoSynced:!0,RefNumber:"3UNC8/25",id:"3UNC8/25",name:"Priesthood",changedOn:"8/9",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned","miracle"],area:"Uncivilised",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC10/25",id:"3UNC10/25",name:"Vineyards",changedOn:"15/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[fertile-small]]"]}],origCondition:"2 VP per [[fertile-small]]."}},{autoSynced:!0,RefNumber:"3UNC11/25",id:"3UNC11/25",name:"Catamarans",changedOn:"15/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[ocean-small]]"]}],origCondition:"2VP per [[ocean-small]]."}},{autoSynced:!0,RefNumber:"3UNC12/25",id:"3UNC12/25",name:"Terraces",changedOn:"15/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["pinned","sack"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[production-small]]"]}],origCondition:"1VP per 3 [[production-small]]."}},{autoSynced:!0,RefNumber:"3UNC13/25",id:"3UNC13/25",name:"Hunters and Trackers",changedOn:"23/08",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["barbarian","hunt"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[Hunt-small]]"]}],origCondition:"1 VP per [[Hunt-small]]"}},{autoSynced:!0,RefNumber:"3UNC14/25",id:"3UNC14/25",name:"River Raiders",changedOn:"6/9",box:["merchants"],deck:"Commons",suits:["unciv"],icons:["attack","barbarian"],expansions:["blood"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[river-small]]"]}],origCondition:" 2 VP per [[river-small]]"}},{autoSynced:!0,RefNumber:"3UNC19/25",id:"3UNC19/25",name:"Cultural Diversity",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:[],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC20/25",id:"3UNC20/25",name:"Seaport",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:["pinned","ocean","city","sack"],expansions:["traderoute"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[trade route-small]]"]}],origCondition:"1 VP per [[trade route-small]]"}},{autoSynced:!0,RefNumber:"3UNC21/25",id:"3UNC21/25",name:"Travellers",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:[],area:"Uncivilised",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in your history",targets:["[[regi
319on-small]]","[[tributary-small]] "]}],origCondition:"1 VP per [[region-small]]/[[tributary-small]] in your history."}},{autoSynced:!0,RefNumber:"3UNC22/25",id:"3UNC22/25",name:"Barter",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:[],expansions:["traderoute"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC23/25",id:"3UNC23/25",name:"Protection",changedOn:"25/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:["pinned"],expansions:["blood"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3UNC24/25",id:"3UNC24/25",name:"Golden Mask",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:["mask"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:2,test:"in history"}],otherwise:0,origCondition:"2 VP if in history"}},{autoSynced:!0,RefNumber:"3UNC25/25",id:"3UNC25/25",name:"Pirates",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:["attack","ocean"],expansions:["blood"],area:"Uncivilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3REG1/14",id:"3REG1/14",name:"Volcano",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","barbarian","grain"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:3,test:"in play"}],otherwise:0,origCondition:"3VP if in play."}},{autoSynced:!0,RefNumber:"3REG2/14",id:"3REG2/14",name:"Mangrove",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","grain","ocean"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG3/14",id:"3REG3/14",name:"Lagoon",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","ocean"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG4/14",id:"3REG4/14",name:"River Delta",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","grain","water"],expansions:["traderoute"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG5/14",id:"3REG5/14",name:"Rift Valley",changedOn:"30/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","water"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG6/14",id:"3REG6/14",name:"Glacier",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","hunt"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:2,test:"in history"}],otherwise:0,origCondition:"2 VP if in history"}},{autoSynced:!0,RefNumber:"3REG7/14",id:"3REG7/14",name:"Savannah",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","hunt","water"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG8/14",id:"3REG8/14",name:"Scrubland",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","sack"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG9/14",id:"3REG9/14",name:"Bogs",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","water"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG10/14",id:"3REG10/14",name:"Valley",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","sack","grain"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG11/14",id:"3REG11/14",name:"Borderland",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","water"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:5,modifier:null,targets:["[[population-small]]"]}],origCondition:"1 VP per 5 [[population-small]]."}},{autoSynced:!0,RefNumber:"3REG12/14",id:"3REG12/14",name:"Alluvial Plain",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","water","grain"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG13/14",id:"3REG13/14",name:"Heath",changedOn:"7/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","hunt"],area:"Regions",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3REG14/14",id:"3REG14/14",name:"Distant Island",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["reg"],icons:["pinned","sack","ocean"],area:"Regions",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3TRI1/13",id:"3TRI1/13",name:"Melayu Kingdom",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI2/13",id:"3TRI2/13",name:"Harrapans",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["trib"],icons:["pinned","empire","metropolis"],area:"Tributary",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI3/13",id:"3TRI3/13",name:"Goryeo",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI4/13",id:"3TRI4/13",name:"Akkadians",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[tributary-small]]"]}],origCondition:"1 VP per [[tributary-small]]."}},{autoSynced:!0,RefNumber:"3TRI5/13",id:"3TRI5/13",name:"Byzantines",box:["merchants"],deck:"Commons",suits:["trib"],icons:["empire"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI6/13",id:"3TRI6/13",name:"Punt",changedOn:"",box:["merchants"],deck:"Commons",suits:["trib"],icons:["barbarian"],exp
319ansions:["traderoute"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI7/13",id:"3TRI7/13",name:"Seleucid Empire",changedOn:"16/8",box:["merchants"],deck:"Commons",suits:["trib"],icons:["pinned","city","sack"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI8/13",id:"3TRI8/13",name:"Carolingian Kingdom",box:["merchants"],deck:"Commons",suits:["trib"],icons:["knight"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI9/13",id:"3TRI9/13",name:"Khmer Empire",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:4,modifier:null,targets:["[[region-small]]"]}],origCondition:"1 VP per 4 [[region-small]]."}},{autoSynced:!0,RefNumber:"3TRI10/13",id:"3TRI10/13",name:"Sabaeans",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI11/13",id:"3TRI11/13",name:"Cimmerians",box:["merchants"],deck:"Commons",suits:["trib"],icons:[],area:"Tributary",minplayers:4,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI12/13",id:"3TRI12/13",name:"Illyrians",changedOn:"",box:["merchants"],deck:"Commons",suits:["trib"],icons:["pinned","barbarian"],expansions:["blood"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TRI13/13",id:"3TRI13/13",name:"Tyrrhenians",changedOn:"5/8",box:["merchants"],deck:"Commons",suits:["trib"],icons:["attack"],expansions:["blood"],area:"Tributary",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[attack-small]] "]}],origCondition:"1 VP per [[attack-small]] "}},{autoSynced:!0,RefNumber:"3CIV1/18",id:"3CIV1/18",name:"Taxation",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire"],area:"Civilised",minplayers:4,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV2/18",id:"3CIV2/18",name:"Epic Poetry",changedOn:"22/8",box:["merchants"],deck:"Commons",suits:["civ"],icons:["pinned","empire"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV4/18",id:"3CIV4/18",name:"Nabataean Kingdom",changedOn:"",box:["merchants"],deck:"Commons",suits:["civ","trib"],icons:["empire"],expansions:["traderoute"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3CIV5/18",id:"3CIV5/18",name:"Scribes",changedOn:"22/6",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:"in History",targets:["cards"]}],origCondition:"1 VP per 3 cards in History"}},{autoSynced:!0,RefNumber:"3CIV7/18",id:"3CIV7/18",name:"Warehouse",changedOn:"",box:["merchants"],deck:"Commons",suits:["civ"],icons:["pinned","empire"],expansions:["traderoute"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV8/18",id:"3CIV8/18",name:"Harbor City",changedOn:"01/09",box:["merchants"],deck:"Commons",suits:["civ"],icons:["pinned","empire","city","sack","ocean"],area:"Civilised",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV9/18",id:"3CIV9/18",name:"Magistrate",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire"],area:"Civilised",minplayers:4,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[production-small]]"]}],origCondition:" 1 VP per 2 [[production-small]]."}},{autoSynced:!0,RefNumber:"3CIV10/18",id:"3CIV10/18",name:"Couriers",changedOn:"16/8",box:["merchants"],deck:"Commons",suits:["civ"],icons:["pinned","empire"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV11/18",id:"3CIV11/18",name:"Smugglers",changedOn:"5/8",box:["merchants"],deck:"Commons",suits:["civ"],icons:["attack","empire"],expansions:["blood"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:10,modifier:null,targets:["cards"]}],origCondition:"1 VP per 10 cards"}},{autoSynced:!0,RefNumber:"3CIV12/18",id:"3CIV12/18",name:"Market Stalls",changedOn:"8/4",box:["merchants"],deck:"Commons",suits:["civ"],icons:["pinned","empire","merchant"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[trade good-small]]"]}],origCondition:"1 VP per [[trade good-small]]"}}
319,{autoSynced:!0,RefNumber:"3CIV14/18",id:"3CIV14/18",name:"Gardening",changedOn:"5/7",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[city-small]] "," [[metropolis-small]]"]}],origCondition:"1 VP per [[city-small]] / [[metropolis-small]]"}},{autoSynced:!0,RefNumber:"3CIV15/18",id:"3CIV15/18",name:"Bucellarii",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire","knight"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV16/18",id:"3CIV16/18",name:"Tyranny",changedOn:"29/06",box:["merchants"],deck:"Commons",suits:["civ"],icons:["attack","empire"],expansions:["blood"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:4,test:"in history"}],otherwise:0,origCondition:"4 VP if in history"}},{autoSynced:!0,RefNumber:"3CIV17/18",id:"3CIV17/18",name:"Triremes",changedOn:"26/04",box:["merchants"],deck:"Commons",suits:["civ"],icons:["attack","empire"],expansions:["blood"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3CIV18/18",id:"3CIV18/18",name:"Imports",changedOn:"29/9",box:["merchants"],deck:"Commons",suits:["civ"],icons:["empire"],expansions:["traderoute"],area:"Civilised",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:10,modifier:null,targets:["cards"]}],origCondition:"1 VP per 10 cards"}},{autoSynced:!0,RefNumber:"3TRO1/9",id:"3TRO1/9",name:"Cornwall Tin Road",changedOn:"13/08",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"([[green-small]]/[[region-small]]/[[tributary-small]] only)",targets:["[[barbarian-small]] "]}],origCondition:"1 VP per [[barbarian-small]] ([[green-small]]/[[region-small]]/[[tributary-small]] only)"}},{autoSynced:!0,RefNumber:"3TRO2/9",id:"3TRO2/9",name:"Lapis Lazuli Trade",changedOn:"18/0
3195",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO3/9",id:"3TRO3/9",name:"Philippines Jade Trade",changedOn:"02/08",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin","ocean"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO4/9",id:"3TRO4/9",name:"Baltic Amber Road",changedOn:"15/07",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO5/9",id:"3TRO5/9",name:"Hopewell Exchange System",changedOn:"17/05",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin","hunt"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO6/9",id:"3TRO6/9",name:"Swahili Coast",changedOn:"05/08",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin","grain"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO7/9",id:"3TRO7/9",name:"The Nile Corridor",changedOn:"13/08",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin","water"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:2,test:"in history"}],otherwise:0,origCondition:"2 VP if in history"}},{autoSynced:!0,RefNumber:"3TRO8/9",id:"3TRO8/9",name:"Andes Highway",changedOn:"22/06",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],area:"Trade routes",minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TRO9/9",id:"3TRO9/9",name:"Mediterranean Circle",changedOn:"05/08",box:["merchants","classics","legends"],deck:"Commons",suits:["trade_route"],icons:["traderoute-pin","city"],expansions:["traderoute"],area:"Trade routes",minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[ocean-small]]"]}],origCondition:"1 VP per [[ocean-small]]"}},{autoSynced:!0,RefNumber:"3AKS1A/23",id:"3AKS1A/23",name:"Aksumites",changedOn:"28/7",box:["merchants"],deck:"Aksumites",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:6,modifier:null,targets:["[[material-small]]"]}],origCondition:"1 VP per 6 [[material-small]]"}},{autoSynced:!0,RefNumber:"3AKS1B/23",id:"3AKS1B/23",name:"Aksumites",changedOn:"",box:["merchants"],deck:"Aksumites",area:"PowerB",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[production-small]]"]}],origCondition:"1 VP per [[production-small]]"}},{autoSynced:!0,RefNumber:"3AKS2/23",id:"3AKS2/23",name:"Maritime Spice Route",changedOn:"19/08",box:["merchants"],deck:"Aksumites",area:"Accession",suits:["trade_route"],icons:["traderoute-pin","ocean"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS3/23",id:"3AKS3/23",name:"King Endubis",changedOn:"8/4",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[material]] x2, [[Population]] x3",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[production-small]]"]}],origCondition:"1 VP per 2 [[production-small]]"}},{autoSynced:!0,RefNumber:"3AKS4/23",id:"3AKS4/23",name:"Aksumite Coinage",changedOn:"26/10",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x3",suits:[],icons:["pinned","empire","sack","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3AKS5/23",id:"3AKS5/23",name:"Himyarite Kingdom",changedOn:"26/10",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[Population]] x2",suits:["trib"],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3AKS6/23",id:"3AKS6/23",name:"Conversion to Christianity",changedOn:"14/3",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[material]] x5",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in play",targets:["[[Region-small]] "]}],origCondition:"1 VP per [[Region-small]] in play"}},{autoSynced:!0,RefNumber:"3AKS7/23",id:"3AKS7/23",name:"Land of Sheba",changedOn:"21/8",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[Population]] x2",suits:["reg"],icons:["pinned","sack","sack","grain"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3AKS8/23",id:"3AKS8/23",name:"Exotic Trade",changedOn:"26/10",box:["merchants"],deck:"Aksumites",area:"Development",devCost:"Development cost: [[trade good]] x1, [[material]] x3 OR free if *Land of Sheba* is in play",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3AKS9/23",id:"3AKS9/23",name:"Stelae",changedOn:"31/8",box:["merchants"],deck:"Aksumites",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:"cards here",targets:["garrisoned"]}],origCondition:"1 VP per 2 garrisoned cards here"}},{autoSynced:!0,RefNumber:"3AKS10/23",id:"3AKS10/23",name:"Kingdom of Kush",changedOn:"20/3",box:["merchants"],deck:"Aksumites",area:"Nation",suits:["trib"],icons:["barbarian"],exp
319ansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS11/23",id:"3AKS11/23",name:"City of Adulis",changedOn:"1/9",box:["merchants"],deck:"Aksumites",area:"Nation",suits:[],icons:["pinned","ocean","city"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS12/23",id:"3AKS12/23",name:"Glory",changedOn:"30/10",box:["merchants"],deck:"Aksumites",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS13/23",id:"3AKS13/23",name:"Unrest",changedOn:"14/3",hidden:!0,box:["merchants"],deck:"Aksumites",area:"Nation",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3AKS14/23",id:"3AKS14/23",name:"City of Axum",changedOn:"",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:["pinned","city"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS15/23",id:"3AKS15/23",name:"Eritrean Highlands",changedOn:"14/3",box:["merchants"],deck:"Aksumites",area:"Starter",suits:["reg"],icons:["pinned","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3AKS16/23",id:"3AKS16/23",name:"Amhara",changedOn:"9/8",box:["merchants"],deck:"Aksumites",area:"Starter",suits:["reg"],icons:["pinned","water","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3AKS17/23",id:"3AKS17/23",name:"Salt Mines",changedOn:"29/9",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:1,test:"in history"}],otherwise:0,origCondition:"1 VP if in history."}},{autoSynced:!0,RefNumber:"3AKS18/23",id:"3AKS18/23",name:"Ge'ez Script",changedOn:"31/3",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS19/23",id:"3AKS19/23",name:"Prosperity",changedOn:"14/3",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS20/23",id:"3AKS20/23",name:"Advance",changedOn:"14/3",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3AKS21/23",id:"3AKS21/23",name:"Conquer",changedOn:"14/3",box:["merchants"],deck:"Aksumites",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI1A/24",id:"3TAI1A/24",name:"Taino",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI1B/24",id:"3TAI1B/24",name:"Taino",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[fertile-small]] "," [[ocean-small]]"]}],origCondition:"1 VP per [[fertile-small]] / [[ocean-small]]"}},{autoSynced:!0,RefNumber:"3TAI2/24",id:"3TAI2/24",name:"Ayiti (Hispaniola)",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Accession",suits:["reg"],icons:["pinned","sack","grain"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3TAI3/24",id:"3TAI3/24",name:"Enriquillo",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Development",devCost:"Development cost: [[population]] x5",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[tributary-small]]"]}],origCondition:"1 VP per [[tributary-small]]."}},{autoSynced:!0,RefNumber:"3TAI4/24",id:"3TAI4/24",name:"Borinquen (Puerto Rico)",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Development",devCost:"Development cost: [[material]] x5",suits:["reg"],icons:["pinned","sack","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:2}
319,{autoSynced:!0,RefNumber:"3TAI5/24",id:"3TAI5/24",name:"Caribbean Sea",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Development",devCost:"Development cost: [[progress]] x2",suits:["reg"],icons:["pinned","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:6,modifier:"on your cards",targets:["resources"]}],origCondition:"1 VP per 6 resources on your cards."}},{autoSynced:!0,RefNumber:"3TAI6/24",id:"3TAI6/24",name:"Gift Exchange",changedOn:"6/6",box:["merchants"],deck:"Taino",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x1",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3TAI7/24",id:"3TAI7/24",name:"Cuba",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Development",devCost:"Development cost: [[material]] x5",suits:["reg"],icons:["pinned","sack","grain"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3TAI8/24",id:"3TAI8/24",name:"Migration",changedOn:"15/8",box:["merchants"],deck:"Taino",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI9/24",id:"3TAI9/24",name:"Sol de Jayuya",changedOn:"6/9",box:["merchants"],deck:"Taino",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI10/24",id:"3TAI10/24",name:"Guanahani (San Salvador)",changedOn:"7/8",box:["merchants"],deck:"Taino",area:"Nation",suits:["reg"],icons:["pinned","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3TAI11/24",id:"3TAI11/24",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Taino",area:"Nation",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3TAI12/24",id:"3TAI12/24",name:"Caribs",changedOn:"16/8",box:["merchants"],deck:"Taino",area:"Nation",suits:["trib"],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI13/24",id:"3TAI13/24",name:"Soil Rotations",changedOn:"15/8",box:["merchants"],deck:"Taino",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI14/24",id:"3TAI14/24",name:"Orinoco Valley",changedOn:"7/8",box:["merchants"],deck:"Taino",area:"Starter",suits:["reg"],icons:["pinned","sack","water","grain"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3TAI15/24",id:"3TAI15/24",name:"Batey (Ball Games)",changedOn:"21/3",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI16/24",id:"3TAI16/24",name:"Petroglyphs",changedOn:"15/8",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI17/24",id:"3TAI17/24",name:"Bohio",changedOn:"13/10",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI18/24",id:"3TAI18/24",name:"Cacique",changedOn:"27/2",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI19/24",id:"3TAI19/24",name:"Canoes",changedOn:"27/2",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAI20/24",id:"3TAI20/24",name:"Fishing",changedOn:"15/8",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:4,modifier:"here",targets:["resources"]}],origCondition:"1 VP per 4 resources here"}}
319,{autoSynced:!0,RefNumber:"3TAI21/24",id:"3TAI21/24",name:"Zemi",changedOn:"15/8",box:["merchants"],deck:"Taino",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:5,modifier:"here",targets:["resources"]}],origCondition:"1 VP per 5 resources here"}},{autoSynced:!0,RefNumber:"3SAS1A/24",id:"3SAS1A/24",name:"Sassanids",changedOn:"9/7",box:["merchants"],deck:"Sassanids",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:"in your history",targets:["[[tributary-small]] "]}],origCondition:"1 VP per 2 [[tributary-small]] in your history"}},{autoSynced:!0,RefNumber:"3SAS1B/24",id:"3SAS1B/24",name:"Sassanids",changedOn:"",box:["merchants"],deck:"Sassanids",area:"PowerB",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[tributary-small]]"]}],origCondition:"1 VP per [[tributary-small]]"}},{autoSynced:!0,RefNumber:"3SAS2/24",id:"3SAS2/24",name:"Khosrau I",changedOn:"22/7",box:["merchants"],deck:"Sassanids",area:"Accession",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS3/24",id:"3SAS3/24",name:"Shah",changedOn:"22/6",box:["merchants"],deck:"Sassanids",area:"Development",devCost:"Development cost: [[material]] x3, [[Population]] x2",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[fame-small]]"]}],origCondition:"1 VP per [[fame-small]]"}},{autoSynced:!0,RefNumber:"3SAS4/24",id:"3SAS4/24",name:"Kushan Empire",changedOn:"22/6",box:["merchants"],deck:"Sassanids",area:"Development",devCost:"Development cost: [[Population]] x3",suits:["trib"],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3SAS5/24",id:"3SAS5/24",name:"Academy of Gondishapur",changedOn:"7/10",box:["merchants"],deck:"Sassanids",area:"Development",devCost:"Development cost: [[Material]] x5",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[city-small]]","[[metropolis-small]]"]}],origCondition:"1 VP per [[city-small]]/[[metropolis-small]]"}},{autoSynced:!0,RefNumber:"3SAS6/24",id:"3SAS6/24",name:"Bozorgan",changedOn:"7/10",box:["merchants"],deck:"Sassanids",area:"Development",devCost:"Development cost: [[material]] x4, [[population]] x2",suits:[],icons:["empire","knight"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3SAS7/24",id:"3SAS7/24",name:"Dreaded",changedOn:"6/7",box:["merchants"],deck:"Sassanids",area:"Development",devCost:"Development cost: [[material]] x2, [[Population]] x3",suits:["fame"],icons:["attack","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3SAS8/24",id:"3SAS8/24",name:"Sogdia",changedOn:"22/6",box:["merchants"],deck:"Sassanids",area:"Nation",suits:["reg"],icons:["pinned","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS9/24",id:"3SAS9/24",name:"City of Taysafun",changedOn:"6/6",box:["merchants"],deck:"Sassanids",area:"Nation",suits:[],icons:["pinned","city","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS10/24",id:"3SAS10/24",name:"Aswaran (Cavalry)",changedOn:"7/10",box:["merchants"],deck:"Sassanids",area:"Nation",suits:[],icons:["knight"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS11/24",id:"3SAS11/24",name:"Atar",changedOn:"5/8",box:["merchants"],deck:"Sassanids",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS12/24",id:"3SAS12/24",name:"Clibanarii",changedOn:"2/8",box:["merchants"],deck:"Sassanids",area:"Nation",suits:[],icons:["attack","knight"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""}
319,{autoSynced:!0,RefNumber:"3SAS15/24",id:"3SAS15/24",name:"Parthian Empire",changedOn:"08/12",box:["merchants"],deck:"Sassanids",area:"Starter",suits:["trib"],icons:["barbarian","knight"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS16/24",id:"3SAS16/24",name:"Fars",changedOn:"",box:["merchants"],deck:"Sassanids",area:"Starter",suits:["reg"],icons:["pinned","grain"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS17/24",id:"3SAS17/24",name:"Huzistan",changedOn:"5/8",box:["merchants"],deck:"Sassanids",area:"Starter",suits:["reg"],icons:["pinned","barbarian","water","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3SAS18/24",id:"3SAS18/24",name:"Prosperity",changedOn:"",box:["merchants"],deck:"Sassanids",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS19/24",id:"3SAS19/24",name:"Unrest",changedOn:"2/8",hidden:!0,box:["merchants"],deck:"Sassanids",area:"Starter",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3SAS20/24",id:"3SAS20/24",name:"Advance",changedOn:"",box:["merchants"],deck:"Sassanids",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS21/24",id:"3SAS21/24",name:"Western Silk Road",changedOn:"15/07",box:["merchants"],deck:"Sassanids",area:"Starter",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS22/24",id:"3SAS22/24",name:"Zoroastrianism",changedOn:"9/7",box:["merchants"],deck:"Sassanids",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS23/24",id:"3SAS23/24",name:"Aban",changedOn:"1/8",box:["merchants"],deck:"Sassanids",area:"Starter",suits:[],icons:["pinned","water"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3SAS24/24",id:"3SAS24/24",name:"Ardashir I",changedOn:"25/6",box:["merchants"],deck:"Sassanids",area:"Starter",suits:[],icons:["attack","barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG1A/23",id:"3WAG1A/23",name:"Wagadou",changedOn:"04/08",box:["merchants"],deck:"Wagadou",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:10,modifier:null,targets:["[[material-small]]"]}],origCondition:"1 VP per 10 [[material-small]]"}},{autoSynced:!0,RefNumber:"3WAG1B/23",id:"3WAG1B/23",name:"Wagadou",changedOn:"4/8",box:["merchants"],deck:"Wagadou",area:"PowerB",suits:[],icons:["sack","sack"],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[material-small]]"]}],origCondition:"1 VP per 2 [[material-small]]"}},{autoSynced:!0,RefNumber:"3WAG2/23",id:"3WAG2/23",name:"City of Koumbi Saleh",changedOn:"6/6",box:["merchants"],deck:"Wagadou",area:"Accession",suits:[],icons:["pinned","city","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG3/23",id:"3WAG3/23",name:"City of Aoudaghost",changedOn:"25/06",box:["merchants"],deck:"Wagadou",area:"Development",devCost:"Development cost: [[population]] x5",suits:[],icons:["pinned","empire","city","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[city-small]]","[[metropolis-small]]"]}],origCondition:"1 VP per [[city-small]]/[[metropolis-small]]"}},{autoSynced:!0,RefNumber:"3WAG4/23",id:"3WAG4/23",name:"Controlling the Trade",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Development",devCost:"Development cost: [[population]] x3",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[production-small]]"]}],origCondition:"1 VP per 3 [[production-small]]."}},{autoSynced:!0,RefNumber:"3WAG5/23",id:"3WAG5/23",name:"Great Mosque of Djenne",changedOn:"04/08",box:["merchants"],deck:"Wagadou",area:"Development",devCost:"Development cost: [[population]] x4",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3WAG6/23",id:"3WAG6/23",name:"Adoption of Islam",changedOn:"04/08",box:["merchants"],deck:"Wagadou",area:"Development",devCost:"Development cost: [[population]] x3",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:4,modifier:"in your history",targets:["cards"]}],origCondition:"1 VP per 4 cards in your history"}},{autoSynced:!0,RefNumber:"3WAG7/23",id:"3WAG7/23",name:"Great Wealth",changedOn:"04/08",box:["merchants"],deck:"Wagadou",area:"Development",devCost:"Development cost: [[population]] x5",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:5,modifier:null,targets:["[[material-small]]"]}],origCondition:"1 VP per 5 [[material-small]]"}},{autoSynced:!0,RefNumber:"3WAG8/23",id:"3WAG8/23",name:"Dinga Cissé",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:[],icons:["barbarian"],exp
319ansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG9/23",id:"3WAG9/23",name:"Salt Merchants",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:[],icons:["pinned","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG10/23",id:"3WAG10/23",name:"Berber Traders",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG11/23",id:"3WAG11/23",name:"Niger River Valley",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG12/23",id:"3WAG12/23",name:"Bambouk",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:["reg"],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG13/23",id:"3WAG13/23",name:"Golden Prosperity",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG14/23",id:"3WAG14/23",name:"Unrest",changedOn:"03/08",hidden:!0,box:["merchants"],deck:"Wagadou",area:"Nation",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3WAG15/23",id:"3WAG15/23",name:"Trans-saharan Trade Route",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:["trade_route"],icons:["traderoute-pin","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG16/23",id:"3WAG16/23",name:"Dhar Tichitt",changedOn:"29/09",box:["merchants"],deck:"Wagadou",area:"Starter",suits:[],icons:["pinned","barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG17/23",id:"3WAG17/23",name:"Pact with Bida",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:[],icons:["pinned","barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3WAG18/23",id:"3WAG18/23",name:"Guidimaka",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:["reg"],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG19/23",id:"3WAG19/23",name:"Northern Mali",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:["reg"],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG20/23",id:"3WAG20/23",name:"Gold Merchants",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:[],icons:["pinned","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3WAG21/23",id:"3WAG21/23",name:"Pride",changedOn:"03/08",box:["merchants"],deck:"Wagadou",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY1A/28",id:"3MAY1A/28",name:"Mayans",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY1B/28",id:"3MAY1B/28",name:"Mayans",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:"in play",targets:["[[city-small]]","[[metropolis-small]] "]}],origCondition:"2 VP per [[city-small]]/[[metropolis-small]] in play"}},{autoSynced:!0,RefNumber:"3MAY2/28",id:"3MAY2/28",name:"King K'inich Janaab' Pakal",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Accession",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY3/28",id:"3MAY3/28",name:"Codices and Prophecies",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x2",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"3MAY4/28",id:"3MAY4/28",name:"Popol Vuh",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x2",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"3MAY5/28",id:"3MAY5/28",name:"Turquoise Mask",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x2",suits:[],icons:["empire","mask"],minplayers:2,count:1,extra:{3:0,4:0}
319,garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:4,test:"in History"}],otherwise:0,origCondition:"4VP if in History"}},{autoSynced:!0,RefNumber:"3MAY6/28",id:"3MAY6/28",name:"Mayan Traders",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x2",suits:[],icons:["attack","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"3MAY7/28",id:"3MAY7/28",name:"Chichen Itza",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x4, [[Population]] x2",suits:[],icons:["pinned","empire","metropolis"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[trade good-small]]"]}],origCondition:"1 VP per 2 [[trade good-small]]"}},{autoSynced:!0,RefNumber:"3MAY11/28",id:"3MAY11/28",name:"Fine Featherwork",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY12/28",id:"3MAY12/28",name:"Stone Mask",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["mask"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:1,test:"in History"}],otherwise:0,origCondition:"1VP if in History"}},{autoSynced:!0,RefNumber:"3MAY13/28",id:"3MAY13/28",name:"Mayan Writing",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY14/28",id:"3MAY14/28",name:"Palenque",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["pinned","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY15/28",id:"3MAY15/28",name:"Patolli",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY16/28",id:"3MAY16/28",name:"Tikal",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["pinned","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY17/28",id:"3MAY17/28",name:"Advanced Mathematics",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY19/28",id:"3MAY19/28",name:"Pok-ta-Pok",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY21/28",id:"3MAY21/28",name:"Caracol",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:["pinned","barbarian","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY22/28",id:"3MAY22/28",name:"Road Networks",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY26/28",id:"3MAY26/28",name:"Chultuns",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY27/28",id:"3MAY27/28",name:"Halach Uinic",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAY28/28",id:"3MAY28/28",name:"Unrest",changedOn:"15/8",hidden:!0,box:["merchants"],deck:"Mayans",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MRT1A/30",id:"3MRT1A/30",name:"Martians",changedOn:"03/09",box:["merchants"],deck:"Martians",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT1B/30",id:"3MRT1B/30",name:"Martians",changedOn:"28/09",box:["merchants"],deck:"Martians",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT2/30",id:"3MRT2/30",name:"Reactor Explosion",changedOn:"01/09",box:["merchants"],deck:"Martians",area:"Accession",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT3/29",id:"3MRT3/29",name:"Permanent Settlement",changedOn:"19/8",box:["merchants"],deck:"Martians",area:"Development",devCost:"Development cost: [[Population]] x3",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:"in play",targets:["[[pin-small]] "]}],origCondition:"1 VP per 3 [[pin-small]] in play"}},{autoSynced:!0,RefNumber:"3MRT4/29",id:"3MRT4/29",name:"Rituals of Earthlings",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Development",devCost:"Development cost: [[Population]] x3",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[green-small]] "," [[white-small]]"]}],origCondition:"1 VP per 2 [[green-small]] / [[white-small]]."}},{autoSynced:!0,RefNumber:"3MRT5/29",id:"3MRT5/29",name:"Alien Overlord",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Development",devCost:"Development cost: [[Population]] x3",suits:[],icons:["attack","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[tributary-small]]","[[Region-small]]"]}],origCondition:"1 VP per 2 [[tributary-small]]/[[Region-small]]."}},{autoSynced:!0,RefNumber:"3MRT6/29",id:"3MRT6/29",name:"Maps of Nibiru",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","civ"],icons:["empire","scroll"],minplayers:2,count:1,extra:{3:0,4:0}
319,garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-2,origCondition:"-2 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT7/29",id:"3MRT7/29",name:"Teleportation",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","unciv"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-5,origCondition:"-5 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT8/29",id:"3MRT8/29",name:"Fracture of Time",changedOn:"29/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","unciv"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-3,origCondition:"-3 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT9/29",id:"3MRT9/29",name:"Eco-bubble",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","reg"],icons:["pinned","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-1,origCondition:"-1 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT10/29",id:"3MRT10/29",name:"Chariot of the gods",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","trib"],icons:["attack","knight"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-3,origCondition:"-3 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT11/29",id:"3MRT11/29",name:"Resurrection Stone",changedOn:"22/11",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","unciv"],icons:["miracle"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-3,origCondition:"-3 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT12/29",id:"3MRT12/29",name:"Crystal Skull",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","unciv"],icons:["mask"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-2,origCondition:"-2 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT13/29",id:"3MRT13/29",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Martians",area:"Nation",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MRT14/29",id:"3MRT14/29",name:"Cloning Vats",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Nation",suits:["gadget","civ"],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-3,origCondition:"-3 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT15/29",id:"3MRT15/29",name:"Take me to your Leader",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT16/29",id:"3MRT16/29",name:"Flying Drone",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT17/29",id:"3MRT17/29",name:"Sharing our Secrets",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT18/29",id:"3MRT18/29",name:"Ancient Astronauts",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT19/29",id:"3MRT19/29",name:"Signals to space",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT20/29",id:"3MRT20/29",name:"Glorious Uplifting",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT21/29",id:"3MRT21/29",name:"Sword of Power",changedOn:"22/11",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT22/29",id:"3MRT22/29",name:"Oannes, the sage",changedOn:"19/8",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT23/29",id:"3MRT23/29",name:"Cryostasis",changedOn:"06/09",box:["merchants"],deck:"Martians",area:"Starter",suits:["gadget","reg"],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0}
319,garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:0,test:"in History"}],otherwise:-1,origCondition:"-1 VP unless in History"}},{autoSynced:!0,RefNumber:"3MRT24/29",id:"3MRT24/29",name:"Landing Site",changedOn:"6/9",box:["merchants"],deck:"Martians",area:"Starter",suits:["reg"],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3MRT25/29",id:"3MRT25/29",name:"Thoats",changedOn:"24/8",box:["merchants"],deck:"Martians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MRT26/29",id:"3MRT26/29",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Martians",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MAG1A/27",id:"3MAG1A/27",name:"Magyars",changedOn:"09/09",box:["merchants"],deck:"Magyars",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[region-small]]"]}],origCondition:"1 VP per 3 [[region-small]]"}},{autoSynced:!0,RefNumber:"3MAG1B/27",id:"3MAG1B/27",name:"Magyars",box:["merchants"],deck:"Magyars",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[region-small]]"]}],origCondition:"1 VP per [[region-small]]"}},{autoSynced:!0,RefNumber:"3MAG2/27",id:"3MAG2/27",name:"Conversion to Christianity",changedOn:"27/02",box:["merchants"],deck:"Magyars",area:"Accession",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in play",targets:["[[Region-small]] "]}],origCondition:"1 VP per [[Region-small]] in play"}},{autoSynced:!0,RefNumber:"3MAG3/27",id:"3MAG3/27",name:"Saint Stephen I",changedOn:"21/03",box:["merchants"],deck:"Magyars",area:"Development",devCost:"Development cost: [[population]] x5",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"3MAG4/27",id:"3MAG4/27",name:"Bishoprics",changedOn:"17/03",box:["merchants"],deck:"Magyars",area:"Development",devCost:"Development cost: [[material]] x5",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[white-small]]"]}],origCondition:"1 VP per [[white-small]]"}},{autoSynced:!0,RefNumber:"3MAG5/27",id:"3MAG5/27",name:"Holy Right",changedOn:"07/10",box:["merchants"],deck:"Magyars",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x4. *Saint Stephen I* and *Conversion to Christianity* must both be in your history.",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:8},{autoSynced:!0,RefNumber:"3MAG6/27",id:"3MAG6/27",name:"Plundering",changedOn:"24/01",box:["merchants"],deck:"Magyars",area:"Nation",suits:[],icons:["attack","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG7/27",id:"3MAG7/27",name:"Pannonia",changedOn:"27/02",box:["merchants"],deck:"Magyars",area:"Nation",suits:["reg"],icons:["pinned","grain","sack","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3MAG8/27",id:"3MAG8/27",name:"Great Hungarian Plain",changedOn:"10/06",box:["merchants"],deck:"Magyars",area:"Nation",suits:["reg"],icons:["pinned","hunt","grain","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3MAG9/27",id:"3MAG9/27",name:"Arpad",changedOn:"17/03",box:["merchants"],deck:"Magyars",area:"Nation",suits:[],icons:["attack","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG10/27",id:"3MAG10/27",name:"Advance",changedOn:"27/02",box:["merchants"],deck:"Magyars",area:"Nation",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG11/27",id:"3MAG11/27",name:"Great Moravia",box:["merchants"],deck:"Magyars",area:"Nation",suits:["trib"],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG14/27",id:"3MAG14/27",name:"Blood Oath",changedOn:"27/2",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["pinned","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG15/27",id:"3MAG15/27",name:"Mounted Archers",changedOn:"19/8",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG16/27",id:"3MAG16/27",name:"Etelkoz",changedOn:"01/03",box:["merchants"],deck:"Magyars",area:"Starter",suits:["reg"],icons:["pinned","barbarian","hunt","water","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3MAG17/27",id:"3MAG17/27",name:"Levedia",changedOn:"01/03",box:["merchants"],deck:"Magyars",area:"Starter",suits:["reg"],icons:["pinned","barbarian","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3MAG18/27",id:"3MAG18/27",name:"Conquer",changedOn:"27/2",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG19/27",id:"3MAG19/27",name:"Glory",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG20/27",id:"3MAG20/27",name:"Hunters and Nomads",changedOn:"05/10",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG21/27",id:"3MAG21/27",name:"Emese",changedOn:"27/02",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG22/27",id:"3MAG22/27",name:"Almos",changedOn:"28/2",box:["merchants"],deck:"Magyars",area:"Starter",suits:[],icons:["attack","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MAG23/27",id:"3MAG23/27",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Magyars",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3CUL1A/29",id:"3CUL1A/29",name:"Cultists",changedOn:"6/8",box:["merchants"],deck:"Cultists",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL1B/29",id:"3CUL1B/29",name:"Cultists",changedOn:"3/8",box:["merchants"],deck:"Cultists",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[unrest-small]]"]}],origCondition:"1 VP per [[unrest-small]]"}},{autoSynced:!0,RefNumber:"3CUL2A/29",id:"3CUL2A/29",name:"Research the Ceremony",changedOn:"27/02",box:["merchants"],deck:"Cultists",area:"Extra-Ceremony",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"",location:"play"},{autoSynced:!0,RefNumber:"3CUL2B/29",id:"3CUL2B/29",name:"Prepare the Ceremony",changedOn:"27/02",box:["merchants"],deck:"Cultists",area:"Extra-Ceremony",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"",location:"play"},{autoSynced:!0,RefNumber:"3CUL3A/29",id:"3CUL3A/29",name:"Ceremonial Gathering",changedOn:"03/08",box:["merchants"],deck:"Cultists",area:"Extra-Ceremony",suits:["unrest"],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"",location:"play"},{autoSynced:!0,RefNumber:"3CUL3B/29",id:"3CUL3B/29",name:"Ceremony of the Key",changedOn:"8/9",box:["merchants"],deck:"Cultists",area:"Extra-Ceremony",suits:["unrest","unrest"],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"",location:"play"},{autoSynced:!0,RefNumber:"3CUL4/30",id:"3CUL4/30",name:"Dark Ritual",changedOn:"11/08",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["corrupted"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL5/30",id:"3CUL5/30",name:"Indoctrination",changedOn:"27/02",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["barbarian","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL6/30",id:"3CUL6/30",name:"Blood Sacrifice",changedOn:"11/08",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["barbarian","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL7/30",id:"3CUL7/30",name:"Temptation",changedOn:"26/2",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[green-small]]"]}],origCondition:"1 VP per [[green-small]]"}},{autoSynced:!0,RefNumber:"3CUL8/30",id:"3CUL8/30",name:"Unholy Shrine",changedOn:"7/11",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL9/30",id:"3CUL9/30",name:"Spreading Chaos",changedOn:"06/09",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL10/30",id:"3CUL10/30",name:"Cloak and dagger",changedOn:"5/8",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[tributary-small]]"]}],origCondition:"1 VP per [[tributary-small]]"}},{autoSynced:!0,RefNumber:"3CUL11/30",id:"3CUL11/30",name:"Fallen Town",changedOn:"27/02",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL12/30",id:"3CUL12/30",name:"Corruption",changedOn:"17/5",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["attack","corrupted"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL13/30",id:"3CUL13/30",name:"Strange Signs",changedOn:"11/08",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["corrupted"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3CUL14/30",id:"3CUL14/30",name:"Cursed Library",changedOn:"6/9",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[
319white-small]]"]}],origCondition:"1 VP per [[white-small]]"}},{autoSynced:!0,RefNumber:"3CUL15/30",id:"3CUL15/30",name:"Frozen Waste",changedOn:"07/11",box:["merchants"],deck:"Cultists",area:"Starter",suits:["reg"],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[region-small]]"]}],origCondition:"1 VP per [[region-small]]"}},{autoSynced:!0,RefNumber:"3CUL16/30",id:"3CUL16/30",name:"Lure of Decadence",changedOn:"27/02",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["attack","corrupted"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3CUL17/30",id:"3CUL17/30",name:"Oracle",changedOn:"27/2",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[Fame-small]]"]}],origCondition:"2 VP per [[Fame-small]]"}},{autoSynced:!0,RefNumber:"3CUL18/30",id:"3CUL18/30",name:"Unspeakable Worship",changedOn:"5/8",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["pinned","corrupted"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3CUL19/30",id:"3CUL19/30",name:"Summon aid",changedOn:"06/09",box:["merchants"],deck:"Cultists",area:"Starter",suits:[],icons:["barbarian","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3CUL20/30",id:"3CUL20/30",name:"Twisted Grove",changedOn:"17/05",box:["merchants"],deck:"Cultists",area:"Starter",suits:["reg"],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3INU1A/25",id:"3INU1A/25",name:"Inuit",changedOn:"26/8",box:["merchants"],deck:"Inuit",area:"PowerA",suits:[],icons:["ocean"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[green-small]]","[[white-small]]"]}],origCondition:"1 VP per 2 [[green-small]]/[[white-small]]"}},{autoSynced:!0,RefNumber:"3INU1B/25",id:"3INU1B/25",name:"Inuit",changedOn:"24/8",box:["merchants"],deck:"Inuit",area:"PowerB",suits:[],icons:["ocean"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:5},{autoSynced:!0,RefNumber:"3INU2/25",id:"3INU2/25",name:"Nunavut",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:["reg","reg"],icons:["pinned","empire","hunt","sack","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3INU3/25",id:"3INU3/25",name:"Siku (Sea Ice)",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:["reg"],icons:["pinned","barbarian","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3INU4/25",id:"3INU4/25",name:"Nunatsiavut",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:["reg"],icons:["pinned","empire","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3INU5/25",id:"3INU5/25",name:"Kalaallit Nunaat",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:["reg"],icons:["pinned","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3INU6/25",id:"3INU6/25",name:"Advance",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3INU7/25",id:"3INU7/25",name:"Iglu",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3INU8/25",id:"3INU8/25",name:"Qarmaq",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Starter",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3INU9/25",id:"3INU9/25",name:"Dog Sleds",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Starter",suits:[],icons:["pinned","empire","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in play",targets:["[[Production-small]] "]}],origCondition:"1 VP per [[Production-small]] in play"}},{autoSynced:!0,RefNumber:"3INU10/25",id:"3INU10/25",name:"Harpoons",changedOn:"26/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[Population]] x1",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3INU11/25",id:"3INU11/25",name:"Nunavik",changedOn:"26/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x1",suits:["reg"],icons:["pinned","barbarian","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3INU12/25",id:"3INU12/25",name:"Imaq (Arctic Sea)",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x1",suits:["reg"],icons:["pinned","empire","hunt","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3INU13/25",id:"3INU13/25",name:"Oral History",changedOn:"26/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x3",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"garrisoned here",targets:["card"]}],origCondition:"1 VP per card garrisoned here"}},{autoSynced:!0,RefNumber:"3INU14/25",id:"3INU14/25",name:"Exploration",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[Population]] x2",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3}
319,{autoSynced:!0,RefNumber:"3INU15/25",id:"3INU15/25",name:"Kayaks",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x3, OR free if *Imaq (Arctic Sea)* is in play",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3INU16/25",id:"3INU16/25",name:"Tattoos",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[Population]] x2",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3INU17/25",id:"3INU17/25",name:"Angakkuq (Shaman)",changedOn:"15/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[Population]] x2",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3INU18/25",id:"3INU18/25",name:"Qulliq (Oil Lamp)",changedOn:"12/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x4",suits:[],icons:["pinned","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3INU19/25",id:"3INU19/25",name:"Throat Singing",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[Population]] x2",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3INU20/25",id:"3INU20/25",name:"Inuksuk",changedOn:"26/8",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x4",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in play",targets:["[[Hunt-small]] "]}],origCondition:"1 VP per [[Hunt-small]] in play"}},{autoSynced:!0,RefNumber:"3INU21/25",id:"3INU21/25",name:"Bone Carving",changedOn:"6/9",box:["merchants"],deck:"Inuit",area:"Development",devCost:"Development cost: [[material]] x3",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3JAP1A/24",id:"3JAP1A/24",name:"Japanese",changedOn:"12/10",box:["merchants"],deck:"Japanese",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP1B/24",id:"3JAP1B/24",name:"Japanese",changedOn:"12/10",box:["merchants"],deck:"Japanese",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[white-small]]"]}],origCondition:"2 VP per [[white-small]]"}},{autoSynced:!0,RefNumber:"3JAP2/24",id:"3JAP2/24",name:"Emperor Kanmu",changedOn:"27/2",box:["merchants"],deck:"Japanese",area:"Accession",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP3/24",id:"3JAP3/24",name:"Heian-kyo (Kyoto)",changedOn:"28/2",box:["merchants"],deck:"Japanese",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x2",suits:[],icons:["pinned","empire","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3JAP4/24",id:"3JAP4/24",name:"Jingu-Ji (Shrine Temple)",changedOn:"27/4",box:["merchants"],deck:"Japanese",area:"Development",devCost:"Development cost: [[material]] x5",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[fame-small]]"]}],origCondition:"2 VP per [[fame-small]]"}},{autoSynced:!0,RefNumber:"3JAP5/24",id:"3JAP5/24",name:"Tea Ceremony",changedOn:"20/3",box:["merchants"],deck:"Japanese",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x1",suits:["civ"],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3JAP6/24",id:"3JAP6/24",name:"Miyabi",changedOn:"27/08",box:["merchants"],deck:"Japanese",area:"Development",devCost:"Development cost: [[trade good]] x2, [[population]] x1",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3JAP7/24",id:"3JAP7/24",name:"Shogun",changedOn:"8/6",box:["merchants"],deck:"Japanese",area:"Development",devCost:"Development cost: [[material]] x2, [[population]] x3",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[
319white-small]]"]}],origCondition:"1 VP per [[white-small]]"}},{autoSynced:!0,RefNumber:"3JAP8/24",id:"3JAP8/24",name:"Unrest",changedOn:"25/04",hidden:!0,box:["merchants"],deck:"Japanese",area:"Nation",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3JAP9/24",id:"3JAP9/24",name:"Kanji",changedOn:"27/2",box:["merchants"],deck:"Japanese",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP10/24",id:"3JAP10/24",name:"Tendai Buddhism",changedOn:"4/5",box:["merchants"],deck:"Japanese",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP11/24",id:"3JAP11/24",name:"Prosperity",changedOn:"28/2",box:["merchants"],deck:"Japanese",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP12/24",id:"3JAP12/24",name:"Kanto Plain",changedOn:"15/3",box:["merchants"],deck:"Japanese",area:"Nation",suits:["reg"],icons:["pinned","sack","sack","water"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3JAP13/24",id:"3JAP13/24",name:"Manno Reservoir",changedOn:"27/2",box:["merchants"],deck:"Japanese",area:"Nation",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP14/24",id:"3JAP14/24",name:"Nara",changedOn:"28/2",box:["merchants"],deck:"Japanese",area:"Nation",suits:[],icons:["pinned","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP15/24",id:"3JAP15/24",name:"Appeal to China",changedOn:"27/2",box:["merchants"],deck:"Japanese",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP16/24",id:"3JAP16/24",name:"Kansai",changedOn:"25/4",box:["merchants"],deck:"Japanese",area:"Starter",suits:["reg"],icons:["pinned","water"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3JAP17/24",id:"3JAP17/24",name:"Kyushu",changedOn:"25/4",box:["merchants"],deck:"Japanese",area:"Starter",suits:["reg"],icons:["pinned","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3JAP18/24",id:"3JAP18/24",name:"Shinto",changedOn:"25/4",box:["merchants"],deck:"Japanese",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP19/24",id:"3JAP19/24",name:"Clans",changedOn:"26/2",box:["merchants"],deck:"Japanese",area:"Starter",suits:["unciv"],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP20/24",id:"3JAP20/24",name:"Advance",changedOn:"27/2",box:["merchants"],deck:"Japanese",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP21/24",id:"3JAP21/24",name:"Glory",changedOn:"29/11",box:["merchants"],deck:"Japanese",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3JAP22/24",id:"3JAP22/24",name:"Prince Shotoku Taishi",changedOn:"14/9",box:["merchants"],deck:"Japanese",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN1A/27",id:"3TAN1A/27",name:"Tang",changedOn:"12/10",box:["merchants"],deck:"Tang",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:"in play",targets:["[[pin-small]] "],exception:"[[region-small]]"}],origCondition:"1 VP per 3 [[pin-small]] in play, except [[region-small]]"}},{autoSynced:!0,RefNumber:"3TAN1B/27",id:"3TAN1B/27",name:"Tang",changedOn:"12/10",box:["merchants"],deck:"Tang",area:"PowerB",suits:[],icons:[],exp
319ansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"in play",targets:["[[pin-small]] "],exception:"[[region-small]]"}],origCondition:"1 VP per [[pin-small]] in play, except [[region-small]]"}},{autoSynced:!0,RefNumber:"3TAN2/27",id:"3TAN2/27",name:"Poetry",changedOn:"4/4",box:["merchants"],deck:"Tang",area:"Accession",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN3/27",id:"3TAN3/27",name:"Salt Industry Commission",changedOn:"1/8",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x4, [[population]] x1",suits:[],icons:["pinned","empire","merchant","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:4,test:"in play"}],otherwise:2,origCondition:"4 VP if in play, 2 VP otherwise."}},{autoSynced:!0,RefNumber:"3TAN4/27",id:"3TAN4/27",name:"Eastern Silk Road",changedOn:"13/06",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x1",suits:["trade_route"],icons:["traderoute-pin","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:3,test:"in history"}],otherwise:0,origCondition:"3VP if in history"}},{autoSynced:!0,RefNumber:"3TAN5/27",id:"3TAN5/27",name:"Tea Drinking",changedOn:"4/4",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x1",suits:["civ"],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3TAN6/27",id:"3TAN6/27",name:"Confucianism",changedOn:"22/6",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[population]] x4",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3TAN7/27",id:"3TAN7/27",name:"Porcelain",changedOn:"2/7",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x1",suits:[],icons:["pinned","empire","sack","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:5,modifier:null,targets:["[[progress-small]]"]}],origCondition:"1 VP Per 5 [[progress-small]]"}},{autoSynced:!0,RefNumber:"3TAN8/27",id:"3TAN8/27",name:"Fireworks",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x2, [[population]] x1",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3TAN9/27",id:"3TAN9/27",name:"Wood Block Printing",changedOn:"22/6",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[material]] x3, [[population]] x2",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[trade route-small]]"]}],origCondition:"1 VP per [[trade route-small]]"}},{autoSynced:!0,RefNumber:"3TAN10/27",id:"3TAN10/27",name:"Yu Xuanji",changedOn:"22/6",box:["merchants"],deck:"Tang",area:"Development",devCost:"Development cost: [[population]] x4",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3TAN11/27",id:"3TAN11/27",name:"Cosmopolitan Culture",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Nation",suits:[],icons:["city"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN12/27",id:"3TAN12/27",name:"Luoyang",changedOn:"",box:["merchants"],deck:"Tang",area:"Nation",suits:[],icons:["pinned","metropolis"],exp
319ansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN13/27",id:"3TAN13/27",name:"Chan Buddhism",changedOn:"13/6",box:["merchants"],deck:"Tang",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN14/27",id:"3TAN14/27",name:"Empress Wu Zetian",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:1,test:"in history"}],otherwise:0,origCondition:"1 VP if in history"}},{autoSynced:!0,RefNumber:"3TAN15/27",id:"3TAN15/27",name:"Taoism",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN16/27",id:"3TAN16/27",name:"Imperial Examinations",changedOn:"28/6",box:["merchants"],deck:"Tang",area:"Starter",suits:["civ"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN17/27",id:"3TAN17/27",name:"Scholar Officials",changedOn:"28/6",box:["merchants"],deck:"Tang",area:"Starter",suits:["civ"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN18/27",id:"3TAN18/27",name:"Ministry of the Army",changedOn:"30/7",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN19/27",id:"3TAN19/27",name:"Chang'an",changedOn:"17/3",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["pinned","metropolis"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN20/27",id:"3TAN20/27",name:"Guangzhou",changedOn:"6/6",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["pinned","city","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN21/27",id:"3TAN21/27",name:"Tang Prosperity",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN22/27",id:"3TAN22/27",name:"Emperor Taizong",changedOn:"4/4",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3TAN23/27",id:"3TAN23/27",name:"Mandate of Heaven",changedOn:"",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"not in play"}],otherwise:0,origCondition:"-2 VP if not in play"}},{autoSynced:!0,RefNumber:"3TAN24/27",id:"3TAN24/27",name:"Rebellion",changedOn:"11/9",box:["merchants"],deck:"Tang",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP1A/24",id:"3GUP1A/24",name:"Guptas",changedOn:"22/6",box:["merchants"],deck:"Guptas",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[trade good-small]]"]}],origCondition:"1 VP per 3 [[trade good-small]]"}},{autoSynced:!0,RefNumber:"3GUP1B/24",id:"3GUP1B/24",name:"Guptas",changedOn:"23/6",box:["merchants"],deck:"Guptas",area:"PowerB",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:3,divisor:1,modifier:null,targets:["[[trade route-small]]"]}],origCondition:"3 VP per [[trade route-small]]"}},{autoSynced:!0,RefNumber:"3GUP2/24",id:"3GUP2/24",name:"Glory",changedOn:"15/9",box:["merchants"],deck:"Guptas",area:"Accession",suits:[],icons:[],exp
319ansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP3/24",id:"3GUP3/24",name:"Chandragupta I",changedOn:"15/9",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x1, [[material]] x2, [[Population]] x1",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3GUP4/24",id:"3GUP4/24",name:"Chandragupta II",changedOn:"26/10",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x1, [[material]] x2, [[Population]] x2",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[White-small]]"]}],origCondition:"1 VP per [[White-small]]"}},{autoSynced:!0,RefNumber:"3GUP5/24",id:"3GUP5/24",name:"Judicial System",changedOn:"26/10",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x2, [[material]] x2, [[Population]] x2",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"3GUP6/24",id:"3GUP6/24",name:"Science",changedOn:"11/10",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x1, [[Population]] x2",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3GUP7/24",id:"3GUP7/24",name:"Philosophy",changedOn:"13/3",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x1, [[material]] x2, [[Population]] x1",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:5,modifier:null,targets:["cards"]}],origCondition:"1 VP per 5 cards"}},{autoSynced:!0,RefNumber:"3GUP8/24",id:"3GUP8/24",name:"Mahabharata",changedOn:"11/10",box:["merchants"],deck:"Guptas",area:"Development",devCost:"Development cost: [[trade good]] x2, [[material]] x2, [[Population]] x2",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3GUP9/24",id:"3GUP9/24",name:"Advanced Mathematics",changedOn:"28/6",box:["merchants"],deck:"Guptas",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP10/24",id:"3GUP10/24",name:"Shreni",changedOn:"30/3",box:["merchants"],deck:"Guptas",area:"Nation",suits:[],icons:["pinned","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP11/24",id:"3GUP11/24",name:"Sarthavaha",changedOn:"13/3",box:["merchants"],deck:"Guptas",area:"Nation",suits:[],icons:["pinned","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP12/24",id:"3GUP12/24",name:"Height of Civilisation",changedOn:"29/6",box:["merchants"],deck:"Guptas",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP13/24",id:"3GUP13/24",name:"Rock Cut Architecture",changedOn:"29/9",box:["merchants"],deck:"Guptas",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP14/24",id:"3GUP14/24",name:"Ayurveda",changedOn:"6/9",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:["pinned","barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP15/24",id:"3GUP15/24",name:"Ganga River Valley",changedOn:"14/8",box:["merchants"],deck:"Guptas",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3GUP16/24",id:"3GUP16/24",name:"Indus River Valley",changedOn:"13/3",box:["merchants"],deck:"Guptas",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3GUP17/24",id:"3GUP17/24",name:"Sri Gupta",changedOn:"15/9",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:["barbarian"],exp
319ansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP18/24",id:"3GUP18/24",name:"Advance",changedOn:"13/3",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP19/24",id:"3GUP19/24",name:"Conquer",changedOn:"13/3",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP20/24",id:"3GUP20/24",name:"Prosperity",changedOn:"19/12",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP21/24",id:"3GUP21/24",name:"The Great Pataliputra",changedOn:"6/6",box:["merchants"],deck:"Guptas",area:"Starter",suits:[],icons:["pinned","city","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3GUP24/24",id:"3GUP24/24",name:"Unrest",changedOn:"13/3",hidden:!0,box:["merchants"],deck:"Guptas",area:"Supply",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3ABB1A/23",id:"3ABB1A/23",name:"Abbasids",changedOn:"22/06",box:["merchants"],deck:"Abbasids",area:"PowerA",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:7,modifier:null,targets:["cards"]}],origCondition:"1 VP per 7 cards"}},{autoSynced:!0,RefNumber:"3ABB1B/23",id:"3ABB1B/23",name:"Abbasids",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"PowerB",suits:[],icons:[],expansions:["traderoute"],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["cards"]}],origCondition:"1 VP Per 3 cards"}},{autoSynced:!0,RefNumber:"3ABB2/23",id:"3ABB2/23",name:"Baghdad",changedOn:"07/05",box:["merchants"],deck:"Abbasids",area:"Accession",suits:[],icons:["pinned","metropolis","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB3/23",id:"3ABB3/23",name:"Dredging the Tigris",changedOn:"26/10",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[material]] x5",suits:[],icons:["pinned","empire","merchant"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[River-small]]","[[Ocean-small]]"]}],origCondition:"1 VP per [[River-small]]/[[Ocean-small]]"}},{autoSynced:!0,RefNumber:"3ABB4/23",id:"3ABB4/23",name:"Glass Working",changedOn:"26/10",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[material]] x4, [[population]] x2",suits:[],icons:["pinned","empire","merchant","sack","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:"here",targets:["[[trade good-small]] "]}],origCondition:"1 VP per 2 [[trade good-small]] here"}},{autoSynced:!0,RefNumber:"3ABB5/23",id:"3ABB5/23",name:"Al-Ma'mun",changedOn:"26/10",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[population]] x3, [[trade good]] x2",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[trade route-small]]"]}],origCondition:"1 VP per [[trade route-small]]"}},{autoSynced:!0,RefNumber:"3ABB6/23",id:"3ABB6/23",name:"Grand Library of Baghdad",changedOn:"26/10",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[material]] x4, [[population]] x2, *Baghdad* must be in play.",suits:[],icons:["pinned","empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"card here",targets:["garrisoned"]}],origCondition:"1 VP per garrisoned card here"}},{autoSynced:!0,RefNumber:"3ABB7/23",id:"3ABB7/23",name:"Grand Caliphate",changedOn:"19/08",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[progress]] x1, [[trade good]] x1",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0}
319,garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:3,test:"in history"}],otherwise:0,origCondition:"3 VP if in history"}},{autoSynced:!0,RefNumber:"3ABB8/23",id:"3ABB8/23",name:"Turkish Mercenaries",changedOn:"26/10",box:["merchants"],deck:"Abbasids",area:"Development",devCost:"Development cost: [[population]] x4",suits:[],icons:["empire"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:3,test:"in history"}],otherwise:0,origCondition:"3 VP if in history"}},{autoSynced:!0,RefNumber:"3ABB9/23",id:"3ABB9/23",name:"Glory",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB10/23",id:"3ABB10/23",name:"Al Mansur",changedOn:"29/09",box:["merchants"],deck:"Abbasids",area:"Nation",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB11/23",id:"3ABB11/23",name:"Maritime Spice Route",changedOn:"19/08",box:["merchants"],deck:"Abbasids",area:"Nation",suits:["trade_route"],icons:["traderoute-pin","ocean"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB12/23",id:"3ABB12/23",name:"Western Silk Road",changedOn:"15/07",box:["merchants"],deck:"Abbasids",area:"Nation",suits:["trade_route"],icons:["traderoute-pin"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB13/23",id:"3ABB13/23",name:"Jazira",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Nation",suits:["reg"],icons:["pinned","water"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3ABB14/23",id:"3ABB14/23",name:"Great Mosque of Damascus",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Nation",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB16/23",id:"3ABB16/23",name:"Prosperity",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Starter",suits:[],icons:[],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB17/23",id:"3ABB17/23",name:"Advance",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB18/23",id:"3ABB18/23",name:"Abbasid Revolution",changedOn:"07/04",box:["merchants"],deck:"Abbasids",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB19/23",id:"3ABB19/23",name:"Khorosan",changedOn:"19/08",box:["merchants"],deck:"Abbasids",area:"Starter",suits:["reg"],icons:["pinned","sack","sack"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"3ABB20/23",id:"3ABB20/23",name:"Conquer",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Starter",suits:[],icons:["barbarian"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3ABB21/23",id:"3ABB21/23",name:"Irrigation",changedOn:"22/03",box:["merchants"],deck:"Abbasids",area:"Starter",suits:[],icons:["pinned"],expansions:["traderoute"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL1A/29",id:"3POL1A/29",name:"Polynesians",changedOn:"11/5",box:["merchants"],deck:"Polynesians",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL1B/29",id:"3POL1B/29",name:"Polynesians",changedOn:"17/5",box:["merchants"],deck:"Polynesians",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[Fame-small]]"]}],origCondition:"1 VP per [[Fame-small]]"}},{autoSynced:!0,RefNumber:"3POL2/29",id:"3POL2/29",name:"Mana",changedOn:"23/5",box:["merchants"],deck:"Polynesians",area:"Extra-Mana",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"",location:"play"},{autoSynced:!0,RefNumber:"3POL3/29",id:"3POL3/29",name:"Kupe",changedOn:"1/6",box:["merchants"],deck:"Polynesians",area:"Accession",suits:[],icons:["foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:"in play",targets:["[[Ocean-small]] "]}],origCondition:"1 VP per 2 [[Ocean-small]] in play"}},{autoSynced:!0,RefNumber:"3POL4/29",id:"3POL4/29",name:"Aotearoa (New Zealand)",changedOn:"23/5",box:["merchants"],deck:"Polynesians",area:"Development",devCost:"Development cost: Put 1 mana into legends. *Cannot be developed unless it is the last card in the development area*",suits:["reg"],icons:["pinned","eye","grain","hunt","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"3POL5/29",id:"3POL5/29",name:"Rupa Nui (Easter Island)",changedOn:"21/9",box:["merchants"],deck:"Polynesians",area:"Development",devCost:"Development cost: Discard 3 mana, *Rarotonga* must be in play",suits:["reg"],icons:["pinned","eye","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:"in legends",targets:["cards"]}],origCondition:"1 VP per 3 cards in legends"}},{autoSynced:!0,RefNumber:"3POL6/29",id:"3POL6/29",name:"Hawaii",changedOn:"20/9",box:["merchants"],deck:"Polynesians",area:"Development",devCost:"Development cost: Discard 3 mana",suits:["reg"],icons:["pinned","eye","sack","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[Empire-small]]"]}],origCondition:"2 VP per [[Empire-small]]"}},{autoSynced:!0,RefNumber:"3POL7/29",id:"3POL7/29",name:"Rarotonga",changedOn:"20/9",box:["merchants"],deck:"Polynesians",area:"Development",devCost:"Development cost: Discard 2 mana",suits:["reg"],icons:["pinned","eye","grain","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[green-small]]"]}],origCondition:"1 VP per [[green-small]]"}},{autoSynced:!0,RefNumber:"3POL8/29",id:"3POL8/29",name:"Wayfinding",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:["pinned","foot"],minplayers:2,count:1,extra:{3:0,4:0}
319,garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"in legends"}],otherwise:0,origCondition:"-2 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL9/29",id:"3POL9/29",name:"Tattoos",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL10/29",id:"3POL10/29",name:"Waka Taua (War Canoes)",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"in legends"}],otherwise:0,origCondition:"-2 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL11/29",id:"3POL11/29",name:"Haka",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"in legends"}],otherwise:0,origCondition:"-2 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL12/29",id:"3POL12/29",name:"Tohunga",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"in legends"}],otherwise:0,origCondition:"-2 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL13/29",id:"3POL13/29",name:"Nafanua",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:1,test:"in legends"}],otherwise:0,origCondition:"1 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL14/29",id:"3POL14/29",name:"Tutu-te-aroaro",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:["foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL15/29",id:"3POL15/29",name:"Kumara (Sweet potato)",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:[],icons:["pinned","foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:-2,test:"in legends"}],otherwise:0,origCondition:"-2 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL16/29",id:"3POL16/29",name:"Tahiti",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Nation",suits:["reg"],icons:["pinned","foot","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:-1,test:"in legends"}],otherwise:0,origCondition:"-1 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL17/29",id:"3POL17/29",name:"Overpopulation",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["pinned","foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-4},{autoSynced:!0,RefNumber:"3POL18/29",id:"3POL18/29",name:"Waka Hourua (Large Canoes)",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL19/29",id:"3POL19/29",name:"Explorers",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["eye"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL20/29",id:"3POL20/29",name:"Tutuila",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:["reg"],icons:["pinned","foot","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:-1,test:"in legends"}],otherwise:0,origCondition:"-1 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL21/29",id:"3POL21/29",name:"Savai'i",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:["reg"],icons:["pinned","foot","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Conditional",scoredata:{conditions:[{amount:-1,test:"in legends"}],otherwise:0,origCondition:"-1 VP if in legends"}},{autoSynced:!0,RefNumber:"3POL22/29",id:"3POL22/29",name:"Outriggers",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL23/29",id:"3POL23/29",name:"Whakapapa",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["pinned","foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL24/29",id:"3POL24/29",name:"Advance",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL25/29",id:"3POL25/29",name:"Islander Prosperity",changedOn:"18/10",box:["merchants"],deck:"Polynesians",area:"Starter",suits:[],icons:["foot"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3POL26/29",id:"3POL26/29",name:"Unrest",changedOn:"18/10",hidden:!0,box:["merchants"],deck:"Polynesians",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"9FAM1/?",id:"9FAM1/?",name:"Bountiful",changedOn:"31/8",box:["promos"],deck:"Promos",area:"Fame",suits:["fame","reg"],icons:["pinned","sack","grain","water","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"9UNC1/?",id:"9UNC1/?",name:"Heir Presumptive",changedOn:"19/8",box:["promos"],deck:"Promos",area:"Uncivilised",suits:["unciv","civ"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"9FAM2/?",id:"9FAM2/?",name:"Undaunted",changedOn:"13/10",box:["promos"],deck:"Promos",area:"Fame",suits:["fame"],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:2,divisor:1,modifier:null,targets:["[[unrest-small]]"]}],origCondition:"2 VP per [[unrest-small]]"}},{id:24,box:["classics","legends","merchants"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian"],name:"Oracle",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:25,box:["classics","legends","merchants"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned","city"],name:"City",count:3,minplayers:2,garrisoning:!1,extra:{3:1,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:33,box:["classics","legends","merchants"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:[],name:"Elders",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:58,box:["classics","legends","merchants"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Moneylenders",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:65,box:["classics","legends","merchants"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Mercenaries",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier"},{id:69,box:["classics","legends","merchants"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned","metropolis"],name:"Metropolis",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2},{id:281,box:["classics","legends","merchants"],deck:"Commons",area:"Unrest",suits:["unrest"],icons:[],name:"Unrest",count:108,minplayers:2,garrisoning:!1,extra:{3:2,4:2},contributedTo:[],needsThem:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3FAM1/10",id:"3FAM1/10",name:"Supreme",changedOn:"15/9",box:["merchants"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:11},{autoSynced:!0,RefNumber:"3UNC15/25",id:"3UNC15/25",name:"Trading City",changedOn:"15/8",box:["merchants"],deck:"Commons",suits:["unciv","civ"],icons:["pinned","city","sack"],area:"Uncivilised",minplayers:2,count:2,extra:{3:1,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"3MERC1A/4",id:"3MERC1A/4",name:"Merchants",changedOn:"21/05",box:["merchants"],deck:"Commons",suits:[],icons:["merchant"],expansions:["traderoute"],area:"PowerA",hidden:!0,minplayers:2,count:2,extra:{3:1,4:1},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"3MERC1B/4",id:"3MERC1B/4",name:"Merchant Empire",changedOn:"13/06",box:["merchants"],deck:"Commons",suits:[],icons:["merchant","sack","sack"],exp
319ansions:["traderoute"],area:"PowerB",minplayers:2,count:4,extra:{3:0,4:0},hidden:!0,garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:"in play",targets:["[[production-small]] "]}],origCondition:"1 VP per 2 [[production-small]] in play"}},{autoSynced:!0,RefNumber:"3AKS22/23",id:"3AKS22/23",name:"Unrest",changedOn:"14/3",hidden:!0,box:["merchants"],deck:"Aksumites",area:"Starter",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3TAI22/24",id:"3TAI22/24",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Taino",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3SAS13/24",id:"3SAS13/24",name:"Unrest",changedOn:"",hidden:!0,box:["merchants"],deck:"Sassanids",area:"Nation",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3WAG22/23",id:"3WAG22/23",name:"Unrest",changedOn:"03/08",hidden:!0,box:["merchants"],deck:"Wagadou",area:"Starter",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MAY8/28",id:"3MAY8/28",name:"Headpiece",changedOn:"6/9",box:["merchants"],deck:"Mayans",area:"Development",devCost:"Development cost: [[material]] x2",suits:[],icons:["mask"],minplayers:2,count:3,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:2,test:"in History"}],otherwise:0,origCondition:"2VP if in History"}},{autoSynced:!0,RefNumber:"3MAY18/28",id:"3MAY18/28",name:"Unrest",changedOn:"15/8",hidden:!0,box:["merchants"],deck:"Mayans",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MAY23/28",id:"3MAY23/28",name:"Stone Mask",changedOn:"15/8",box:["merchants"],deck:"Mayans",area:"Starter",suits:[],icons:["mask"],minplayers:2,count:3,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:1,test:"in History"}],otherwise:0,origCondition:"1VP if in History"}},{autoSynced:!0,RefNumber:"3MRT27/29",id:"3MRT27/29",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Martians",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MAG12/27",id:"3MAG12/27",name:"Unrest",changedOn:"27/02",hidden:!0,box:["merchants"],deck:"Magyars",area:"Nation",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3MAG24/27",id:"3MAG24/27",name:"Unrest",changedOn:"16/4",hidden:!0,box:["merchants"],deck:"Magyars",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:1,4:1},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3CUL21/30",id:"3CUL21/30",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Cultists",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:4,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3CUL25/30",id:"3CUL25/30",name:"Chaos",changedOn:"3/8",box:["merchants"],deck:"Cultists",area:"Chaos",suits:["unrest"],icons:[],minplayers:2,count:3,extra:{3:1,4:1},garrisoning:!1,scoretype:"Number",value:-3},{autoSynced:!0,RefNumber:"3INU22/25",id:"3INU22/25",name:"Unrest",changedOn:"15/8",hidden:!0,box:["merchants"],deck:"Inuit",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:1,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3JAP23/24",id:"3JAP23/24",name:"Unrest",changedOn:"27/2",hidden:!0,box:["merchants"],deck:"Japanese",area:"Starter",suits:["unrest"],icons:[],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3TAN25/27",id:"3TAN25/27",name:"Unrest",changedOn:"11/9",hidden:!0,box:["merchants"],deck:"Tang",area:"Supply",suits:["unrest"],icons:[],exp
319ansions:["traderoute"],minplayers:2,count:3,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3GUP22/24",id:"3GUP22/24",name:"Unrest",changedOn:"13/3",hidden:!0,box:["merchants"],deck:"Guptas",area:"Starter",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:2,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3ABB15/23",id:"3ABB15/23",name:"Unrest",changedOn:"29/03",hidden:!0,box:["merchants"],deck:"Abbasids",area:"Starter",suits:["unrest"],icons:[],expansions:["traderoute"],minplayers:2,count:3,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"3POL27/29",id:"3POL27/29",name:"Unrest",changedOn:"18/10",hidden:!0,box:["merchants"],deck:"Polynesians",area:"Supply",suits:["unrest"],icons:[],minplayers:2,count:1,extra:{3:1,4:0},garrisoning:!1,scoretype:"Number",value:-2},{autoSynced:!0,RefNumber:"9ABU1/4",id:"9ABU1/4",name:"Abundance",changedOn:"8/9",box:["promos"],deck:"Promos",area:"",suits:[],icons:[],minplayers:2,count:2,extra:{3:1,4:1},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"1REG12X/14",id:"1REG12X/14",name:"Cape",changedOn:"28/2",box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"1REG1X/14",id:"1REG1X/14",name:"Wilderness",changedOn:"28/2",box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","hunt"],minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"1REG3X/14",id:"1REG3X/14",name:"Mountains",changedOn:"30/4",box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"1REG4X/14",id:"1REG4X/14",name:"Coast",box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"1REG2X/14",id:"1REG2X/14",name:"Jungle",changedOn:"30/4",box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"1SCY14X/24",id:"1SCY14X/24",name:"Nomads",changedOn:"2/7",box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"1SCY15X/24",id:"1SCY15X/24",name:"Nomads",changedOn:"2/7",box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"1SCY1AX/24",id:"1SCY1AX/24",name:"Scythians",changedOn:"21/3",box:["classics"],deck:"Scythians",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:6,modifier:null,targets:["[[material-small]]"]}],origCondition:"1 VP per 6 [[material-small]]"}},{autoSynced:!0,RefNumber:"1SCY1BX/24",id:"1SCY1BX/24",name:"Scythians",changedOn:"21/3",box:["classics"],deck:"Scythians",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[material-small]]","[[region-small]]"]}],origCondition:"1 VP per 3 [[material-small]]/[[region-small]]"}}
319,{autoSynced:!0,RefNumber:"1SCY3X/24",id:"1SCY3X/24",name:"Ateas",changedOn:"7/5",box:["classics"],deck:"Scythians",area:"Development",devCost:"Development cost: [[population]] x4",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[Green-small]]"]}],origCondition:"1 VP per [[Green-small]]"}},{autoSynced:!0,RefNumber:"2ATL1AX/22",id:"2ATL1AX/22",name:"Atlanteans",changedOn:"4/9",box:["legends"],deck:"Atlanteans",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:"sunk",targets:["[[green-small]]","[[fame-small]]","[[tributary-small]]","[[trade route-small]]"]}],origCondition:"1 VP per sunk [[green-small]]/[[fame-small]]/[[tributary-small]]/[[trade route-small]]."}},{autoSynced:!0,RefNumber:"2ATL1BX/22",id:"2ATL1BX/22",name:"Atlanteans",changedOn:"4/9",box:["legends"],deck:"Atlanteans",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[region-small]]"],exception:"[[ocean-small]]"}],origCondition:"1 VP per [[region-small]], except [[ocean-small]]"}},{autoSynced:!0,RefNumber:"2ATL2X/22",id:"2ATL2X/22",name:"Advanced Culture",changedOn:"15/11",box:["legends"],deck:"Atlanteans",area:"Development",devCost:"Development cost: [[progress]] x1, [[material]] x5",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[region-small]]"],exception:"[[ocean-small]]"}],origCondition:"1 VP per 2 [[region-small]], except [[ocean-small]]"}},{autoSynced:!0,RefNumber:"2ATL4X/22",id:"2ATL4X/22",name:"Spread of Atlantis",changedOn:"28/2",box:["legends"],deck:"Atlanteans",area:"Development",devCost:"Development cost: [[material]] x4, take an [[unrest]]",suits:[],icons:["attack","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"2ATL7X/22",id:"2ATL7X/22",name:"Myths and Legends",changedOn:"28/2",box:["legends"],deck:"Atlanteans",area:"Development",devCost:"Development cost: [[progress]] x2",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"2ATL8X/22",id:"2ATL8X/22",name:"Vast Wealth",changedOn:"4/9",box:["legends"],deck:"Atlanteans",area:"Development",devCost:"Development cost: [[material]] x5, take an [[unrest]]",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2REG11X/14",id:"2REG11X/14",name:"Archipelago",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"2REG12X/14",id:"2REG12X/14",name:"Fortified Region",changedOn:"30/04",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"2REG14X/14",id:"2REG14X/14",name:"Island",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"2REG3X/14",id:"2REG3X/14",name:"Peak",changedOn:"30/4",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","water","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"2REG4X/14",id:"2REG4X/14",name:"Peninsula",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"2REG8X/14",id:"2REG8X/14",name:"Lowlands",changedOn:"30/04",box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"2UTO1AX/21",id:"2UTO1AX/21",name:"Utopians",changedOn:"28/7",box:["legends"],deck:"Utopians",area:"PowerA",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:4,modifier:null,targets:["[[population-small]]"]}],origCondition:"1 VP per 4 [[population-small]]"}}
319,{autoSynced:!0,RefNumber:"2UTO1BX/21",id:"2UTO1BX/21",name:"Utopians",changedOn:"29/9",box:["legends"],deck:"Utopians",area:"PowerB",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:3,modifier:null,targets:["[[population-small]]"]}],origCondition:"1 VP per 3 [[population-small]]"}},{autoSynced:!0,RefNumber:"2UTO3AX/21 ",id:"2UTO3AX/21",name:"Gates of Shangri-La",changedOn:"15/9",box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],hidden:!0,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2UTO3BX/21",id:"2UTO3BX/21",name:"Shangri-La",changedOn:"27/5",box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],hidden:!1,minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:3,test:"in play"},{amount:10,test:"in History"}],otherwise:0,origCondition:"3 VP if in play, 10 VP if in History"}},{autoSynced:!0,RefNumber:"1FAM3X/9",id:"1FAM3X/9",name:"Notorious",changedOn:"28/2",box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[attack-small]]"]}],origCondition:"1 VP per [[attack-small]]"}},{autoSynced:!0,RefNumber:"1UNC8X/22",id:"1UNC8X/22",name:"Mysticism",changedOn:"08/09",box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","miracle"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"2UNC8X/22",id:"2UNC8X/22",name:"Religion",changedOn:"08/09",box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","miracle"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"2ART25X/29",id:"2ART25X/29",name:"Cafall",changedOn:"28/02",box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[hunt-small]]"]}],origCondition:"1 VP per [[hunt-small]]"}},{autoSynced:!0,RefNumber:"1CEL21X/28",id:"1CEL21X/28",name:"Celtica",changedOn:"28/02",box:["classics"],deck:"Celts",area:"Starter",suits:["reg"],icons:["pinned","sack","hunt"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"1CAR2X/23",id:"1CAR2X/23",name:"City of Carthage",changedOn:"01/09",box:["classics"],deck:"Carthaginians",area:"Accession",suits:[],icons:["pinned","ocean","city"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"1CAR20X/23",id:"1CAR20X/23",name:"Balearic Islands",changedOn:"02/07",box:["classics"],deck:"Carthaginians",area:"Starter",suits:["reg"],icons:["pinned","sack","sack","ocean"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"1CAR7X/23",id:"1CAR7X/23",name:"Trading Ships",box:["classics"],deck:"Carthaginians",area:"Development",devCost:"Development cost: [[material]] x4, [[population]] x1",suits:[],icons:["pinned","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:4},{autoSynced:!0,RefNumber:"2MIN18X/23",id:"2MIN18X/23",name:"Crete",changedOn:"06/07",box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],icons:["pinned","sack","ocean","grain"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:""},{autoSynced:!0,RefNumber:"2MAU18X/23",id:"2MAU18X/23",name:"Chandragupta",changedOn:"5/5",box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2MAU12X/23",id:"2MAU12X/23",name:"Indian Elephants",changedOn:"5/5",box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2MAU13X/23",id:"2MAU13X/23",name:"Indian Elephants",changedOn:"5/5",box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["attack","barbarian"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""}
319,{autoSynced:!0,RefNumber:"2TRI9X/11",id:"2TRI9X/11",name:"Celts",changedOn:"7/5",box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:3},{autoSynced:!0,RefNumber:"1GRE3X/23",id:"1GRE3X/23",name:"Greek Prosperity",changedOn:"15/6",box:["classics"],deck:"Greeks",area:"Development",devCost:"Development cost: [[material]] x2, [[population]] x2",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:2},{autoSynced:!0,RefNumber:"2ATL20X/22",id:"2ATL20X/22",name:"Atlantean Fleet",changedOn:"15/6",box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["attack","empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"1UNC14X/22",id:"1UNC14X/22",name:"Ambassador",changedOn:"24/6",box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned","merchant"],minplayers:3,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"2UTO5X/21",id:"2UTO5X/21",name:"Portals",changedOn:"15/6",box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[region-small]]"]}],origCondition:"1 VP per [[region-small]]"}},{autoSynced:!0,RefNumber:"2UTO7X/21",id:"2UTO7X/21",name:"Lost Tomes",changedOn:"15/9",box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!0,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:1,modifier:null,targets:["[[fame-small]]"]}],origCondition:"1 VP per [[fame-small]]"}},{autoSynced:!0,RefNumber:"2MIN3X/23",id:"2MIN3X/23",name:"Minoan Traders",changedOn:"23/07",box:["legends"],deck:"Minoans",area:"Development",devCost:"Development cost: [[progress]] x1, [[material]] x2, [[population]] x1",suits:[],icons:["empire"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Multiplier",scoredata:{counters:[{multiplier:1,divisor:2,modifier:null,targets:["[[production-small]]"]}],origCondition:"1 VP per 2 [[production-small]]"}},{autoSynced:!0,RefNumber:"1CAR13X/23",id:"1CAR13X/23",name:"Berbers",changedOn:"2/7",box:["classics"],deck:"Carthaginians",area:"Nation",suits:["trib"],icons:[],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2MIN16X/23",id:"2MIN16X/23",name:"Pottery",changedOn:"8/11",box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["pinned","barbarian","sack","sack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2OLM14X/26",id:"2OLM14X/26",name:"Lodestone Compasss",changedOn:"10/10",box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["pinned","merchant"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2OLM15X/26",id:"2OLM15X/26",name:"Ball Games",changedOn:"10/10",box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["pinned"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:""},{autoSynced:!0,RefNumber:"2UNC5X/22",id:"2UNC5X/22",name:"Invasion",changedOn:"28/2",box:["legends","classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["attack"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Number",value:1},{autoSynced:!0,RefNumber:"1UNC2X/22",id:"1UNC2X/22",name:"Jade Mask",changedOn:"10/10",box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["mask"],minplayers:2,count:1,extra:{3:0,4:0},garrisoning:!1,scoretype:"Conditional",scoredata:{conditions:[{amount:2,test:"in history"}],otherwise:0,origCondition:"2 VP if in history"}}];function getCards(){return allCards}let langs={en:{}},langList=[{name:"English",code:"en",ocrCode:"eng"},{name:"Français",code:"fr",ocrCode:"fre"},{name:"Deutsch",code:"de",ocrCode:"ger"},{name:"Español",code:"es",ocrCode:"spa"},{name:"ÄeÅ¡tina",code:"cs",ocrCode:"cze"},{name:"Polski",code:"pl",ocrCode:"pol"},{name:"Ð ÑÑÑкий",code:"ru",ocrCode:"rus"},{name:"Português (Brasil)",code:"pt_br",ocrCode:"por"},{name:"䏿",code:"zh",ocrCode:"chs"}],userLang="en";function setLang(e){userLang=e}function interpolate(e,t){Array.isArray(t)||(t=[t]);
319let n=e.replaceAll(/\$(\d+)/g,((e,n)=>t.length>n?t[n]:""));return n=n.replaceAll(/{{\s*(\d+)\s*,\s*(\w+)\s*((,\s*\d+=\w+\s*)+)}}/g,((e,n,r,i)=>{if(t.length>n){if(1==t[n])return r;let e=i.matchAll(/(,\s*(?<trigger>\d+)=(?<form>\w+)\s*)/g),a=r;for(let r of e)t[n]>=r.groups.trigger&&(a=r.groups.form);return a}return""})),n=n.replaceAll(/{\s*(\d+)\s*,\s*(\w+)\s*}/g,((e,n,r)=>t.length>n?1==t[n]?"":r:"")),n=n.replaceAll(/{\s*(\d+)\s*,\s*(\w+),\s*(\w+)\s*}/g,((e,n,r,i)=>t.length>n?1==t[n]?r:3:"")),n}function l$1(e,...t){if(!langs[userLang])return interpolate(e,t);e.startsWith("Urban Development")&&e.endsWith("L")&&(console.log(userLang),"cs"!=userLang&&(e=e.slice(0,e.length-1)));let n=langs[userLang][e];if(!n){let n=Object.keys(langs[userLang]).find((t=>t.toLowerCase()==e.toLowerCase()));return interpolate(n?langs[userLang][n]:e,t)}return interpolate(n,t)}function reverseL(e,t){if(!langs[userLang])return interpolate(e,t);let n=Object.keys(langs[userLang]).find((t=>langs[userLang][t]&&langs[userLang][t].toLowerCase()==e.toLowerCase()));return interpolate(n||e,t)}langs={fr:{Persians:"Perses","City of Persepolis":"Cité de Persépolis","Battering Ram":"Bélier",Development:"Développement",Windmills:"Moulins à Vent",Satrap:"Satrape","Persian Gold":"Or des Perses",Babylonians:"Babyloniens","Darius I":"Darius I","Median Empire":"Empire Mède","Nisaean Plain":"Plaine de Nisaean",Arachosia:"Arachosie",Unrest:"Instabilités",Glory:"Gloire",Prosperity:"Prospérité",Advance:"Progrès",Conquer:"Conquête",Lydians:"Lydiens",Zagros:"Zagros",Bactria:"Bactrie","Standing Army":"Armée de métier","Jade Mask":"Masque de Jade",Elders:"Anciens",Town:"Ville",Shrine:"Sanctuaire",Invasion:"Invasion",Mysticism:"Mysticisme",Oracle:"Oracle",Agriculture:"Agriculture",Boats:"Navires",Leadership:"Commandement",Shaduf:"Chadouf","Lost Scroll":"Parchemin Perdu","Rituals & Ceremonies":"Rituels et Cérémonies",Ambassador:"Ambassadeur",City:"Cité",Gambling:"Jeu",Port:"Port",Diplomacy:"Diplomatie",Wilderness:"Région Sauvage",Jungle:"Jungle",Mountain:"Montagne",Coast:"Côte",Floodplain:"Plaine inondable",Forest:"Fôret",Oasis:"Oasis",Hills:"Collines",Marsh:"Marais",Steppe:"Steppe",River:"Rivière",Cape:"Cap",Woodland:"Région Boisée","Sacred Pass":"Voie Sacrée",Armenians:"Arméniens",Assyrians:"Assyriens",Egyptians:"Egyptiens",Ionians:"Ioniens",Qin:"Qin",Olmecs:"Olmèques",Sumerians:"Sumériens",Aksumites:"Aksoumites",Minoans:"Minoens",Mauryans:"Maurya",Hittites:"Hittites","Drama & Poetry":"Drame et Poésie",Education:"Education",Moneylenders:"Usuriers",Corruption:"Corruption",Onager:"Onagre",Temple:"Temple",Cataphract:"Cataphractaire",Metropolis:"Métropole",Pharmacy:"Pharmacie",Wonder:"Merveille",Coinage:"Monnaie",Exports:"Exportations","Urban Development":"Développement Urbain",Mercenaries:"Mercenaires",Mining:"Exploitation Minière",Espionage:"Espionnage",Monument:"Monument","Code of Laws":"Code Juridique",Religion:"Religion",Domestication:"Domestication","Water Mill":"Moulin à Eau",Qanat:"Qanat","Road Building":"Construction de Routes",Art:"Arts","Fortunate Isle":"Iles des Bie
319nheureux",Rainforest:"Forêt Humide","Mountainâ":"Montagne",Peninsula:"Péninsule",Lakes:"Lacs",Highlands:"Hautes Terres","Sacred Grove":"Bois Sacré",Lowlands:"Basses Terres",Moor:"Lande",Plain:"Plaine",Archipelago:"Archipel","Fortified Region":"Région Fortifiée",Grassland:"Prairie",Island:"Ile",Etruscans:"Etrusques",Scythians:"Scythes",Vikings:"Vikings",Phoenicians:"Phéniciens",Romans:"Romains",Greeks:"Grecs",Carthaginians:"Carthaginois",Celts:"Celtes",Macedonians:"Macédoniens",Xiongnu:"Xionghu",Astronomy:"Astronomie",Cartography:"Cartographie",Masonry:"Maçonnerie","Civil Service":"Service Civil",Amphitheatre:"Amphithéâtre","King of Kings":"Roi des Rois",Praiseworthy:"Eloges",Great:"Grandeur",Notorious:"Infamie",Marvellous:"Magnificence",Glorious:"Glorieux",Triumphant:"Triomphe","Awe-inspiring":"Grandiose",Imperial:"Impérial",Independent:"Indépendant",Magnificent:"Grandiose",Outstanding:"Exceptionnel",Proud:"Fier",Eminent:"Illustre",Acclaimed:"Acclamé","City of Carthage":"Cité de Carthage",Elephants:"Eléphants",Hegemony:"Hégémonie",Hannibal:"Hannibal","Trading Ships":"Navires Marchands",Monopoly:"Monopole",Caravans:"Caravanes",Iberia:"Ibérie",Berbers:"Berbères","Dido, Queen of Carthage":"Didon, Reine de Carthage","Carthaginian Traders":"Marchand Carthaginois","Balearic Islands":"Iles Baléares",Mauretania:"Maurétanie","Celtic Gold":"Or des Celtes","Celtic Innovation":"Innovation Celtique",Chainmail:"Cotte de Mailles",Chariots:"Chars","Ogham Script":"Ecriture Oghamique",Vercingetorix:"Vercingétorix",Armorica:"Armorique",Belgica:"Gaule Belge",Britannia:"Britannie",Hibernia:"Hibernie",Druids:"Druides",Boudicca:"Boadicée","Cattle Raid":"Vol de Bétail","Cauldron of Ceridwen":"Chaudron de CeridWen",Celtica:"Celtica","Olympic Games":"Jeux Olympiques",Philosophy:"Philosophie",Lighthouse:"Phare","Direct Democracy":"Démocratie Directe","Greek Innovation":"Innovation Grecque",Science:"Science","City of Corinth":"Cité de Corynthe",Pericles:"Périclès","Greek Prosperity":"Prospérité Gracque","City of Athens":"Cité d'Athènes","Plains of Thessaly":"Plaine de Thessalie",Settlers:"Colons","Greek Mercenaries":"Mercenaires Grecs","City of Sparta":"Cité de Sparte","Forest of Pholoe":"Forêt de Pholos",Peleponnese:"Péloponnèse",Alexander:"Alexandre","Alexander the Great":"Alexandre le Grand",Parmenion:"Parménion","Alexandria in Ariana":"Alexandrie en Ariana","Alexandria in Egypt":"Alexandrie en Egypte",Mosaics:"Mosaïques","Companion Cavalry":"Cavalerie des compagnons",Uxians:"Ouxiens","Philip II":"Philippe II",Phalanx:"Phalange",Pelagonia:"Pélagonie","Haliacmon Valley":"Vallée de l'Aliakmon",Orestis:"Orestide","Julius Caesar":"Jules César","Military Engineering":"Génie Militaire","Roman Invasion":"Invasion Romaine",Legions:"Légions","The Senate":"Le sénat","Rome, the Eternal City":"Rome, la Cité Eternelle","Emperor Trajan":"Empereur Trajan","Bread and Circuses":"Du pain et des Jeux","Gallia Aquitania":"Gaule Aquitaine",Raetia:"Rhétie",Triumvirate:"Triumvirat","City of Rome":"Cité de Rome",Dalmatia:"Dalmatie","Roman Expansion":"Expansion Romaine",Jewellery:"Joaillerie",Ateas:"Ateas",Kurgans:"Kourganes","City of Gelonus":"Cité de Gélongs",Raiders:"Pillards",Tamga:"Tamga","Pontic Steppe":"Steppe Pontique","Tarim Basin":"Bassin du Tarim",Caucasia:"Caucase",Nomads:"Nomades",Tents:"Tentes","Mounted Archers":"Archers Montés","Carpathian Mountains":"Carpates","Tian Shan":"Tian Shan","Harald Hardrada":"Harald Hardrada","Go A'Viking":"Raid Viking",Combs:"Peignes","Rollo the Walker":"Rollon le Marcheur",Skis:"Skis",Longships:"Drakkars",Sagas:"Sagas","City of Dubh Linn":"Cité de Dubh Linn",Graenland:"Groenland","Føroyar":"Iles Féroé",Iceland:"Islande",Vinland:"Vinland",Jomsviking:"Jomsviking",Gothja:"Gothja",Althing:"Althing",Scandinavia:"Scandinavie","Erik the Red":"Erik le Rouge",Arthurians:"Arthuriens","King Arthur's Court":"Cour du Roi Arthur","Gwaith Camlan":"Gwaith Camlan",Graal:"Graal","Lawnslot y Llyn (Sir Lancelot)":"Lawnslot y Llyn (Lancelot)","Twrch Trwyth":"Twrch Trwyth","Taliesin the Bard":"Taliesin le Barde",Excalibur:"Excalibur","Bedwyr (Sir Bedevire)":"Bedwyr (Bédivère)","Viviane of the Lake":"La Dame du Lac (Viviane)","City of Camelot":"Cité de Camelot","Britannia Flavia":"Flavie Césarienne","Ynys Afallach (Avalon)":"Ynys Afallach (Avalon)","Gwalchmei (Sir Gawain)":"Gwalchmei (Gauvin)","Lady Bertilak":"Lady Bertilak",Morigena:"Morgane","Peredur (Sir Percival)":"Peredur (Perceval)","Cai (Sir Kay)":"Cai (Kay)","King Arthur":"Roi Arthur","Uthyr Pendragon":"Uther Pendragon","Britannia Prima":"Britannia Prima","Britannia Secunda":"Britannia Secunda","Myrddin Wyllt (Merlin)":"Myrddin Wyllt (Merlin)",Guennuvar:"Gwenhwyfar (Guenièvre)",Cafall:"Cavall",Atlanteans:"Atlantes","Advanced Culture":"Culture Evoluée","Palace of Poseidon":"Palais de Poséidon","Spread of Atlantis":"Expansion d'Atlantis","Moats and Walls":"Douves et Remparts","Myths and Legends":"Mythes et Légendes","Vast Wealth":"Immenses Richesses",Kleito:"Cleito","Mountain of Atlantis":"Montagne d'Atlantis",Themiscyra:"Thémiscyre",Flood:"Submersion",Thule:"Thulé",Hesperides:"Hespérides","Elysian Fields":"Champs Elysées","Atlantean Fleet":"Flotte Atlante",Unification:"Unification",Embalming:"Embaumement",Obelisk:"Obélisque","Ramesses II":"Ramsès II","Egyptian Expansion":"Expansion Egyptienne",Medicine:"Médecine",Pyramids:"Pyramides","Egyptian Legacy":"Héritage Egyptien",Kushites:"Kushites","Red Land":"Terre Rouge","Flood of the Nile":"Crue du Nil","Egyptian Incursion":"Incursion Egyptienne","Egyptian Hieroglyphics":"Hiéroglyphes Egyptiens","Nile Valley":"Vallée du Nil","Lower Nile":"Basse Vallée du Nil",Mathematics:"Mathématiques","Grand Trunk Road":"Grande Route",Ashoka:"Ashoka",Buddhism:"Bouddhisme","Edicts of Ashoka":"Edits d'Ashoka","Punch-Marked Coins":"Monnaie Poinçonnée",Arthashastra:"Arthashâstra","Nanda Dynasty":"Dynastie Nanda","City of Pataliputra":"Cité de Pataliputra","Indian Elephants":"Eléphants Indiens",Gandhara:"Gandhara",Chandragupta:"Chandragupta",Chanakya:"Chanakya",Magadha:"Magadha","Indus Valley":"Vallée de l'Indus","King Minos":"Roi Minos","Minoan Traders":"Marchands Minoens","Drainage System":"Système de Drainage",Architecture:"Architecture",Frescos:"Fresques",Labyrinth:"Labyrinthe","Minoan Expansion":"Expansion Minoenne","Seal Stones":"Sceaux Minoens","Writing Systems":"Systèmes d'Ecriture",Knossos:"Cnossos",Pottery:"Poterie",Thera:"Théra",Crete:"Crête",Cyprus:"Chypre","San Lorenzo Tenochtitlán":"San Lorenzo Tenochtitlãn","Step Pyramids":"Pyramides à Degrés","Ritual Sacrifice":"Sacrifice Rituel","Olmec Traders":"Marchands Olmèques","Tres Zapotes":"Tres Zapotes","Stone Heads":"Têtes Colossales",Cacao:"Cacao","Olmec Hieroglyphics":"Hiéroglyphes Olmèques",Calendar:"Calendrier","Stone Mask":"Masque de Pierre","Loadstone Compass":"Compas Magnétique","Ball Games":"Jeux de Balle","Laguna de los Cerros":"Laguna de los Cerros","La Venta":"La venta","
319Long Walls I":"Grande Muraille I","Long Walls II":"Grande Muraille II","Long Walls III":"Grande Muraille III","Long Walls IV":"Grande Muraille IV","Emperor Qin Shi Huang":"Emperuer Qin Shi Huang","King Wu of Qin":"Roi Wu de Qin",Metallurgy:"Métallurgie","Terracotta Warriors":"Guerriers d'Argile","Eastern Zhou":"Zhou de l'Est","Mandate of Heaven":"Mandat Céleste","Duke Zhuang of Qin":"Duc Zhuang de Qin","School of Diplomacy":"Ecole de Diplomatie",Confucianism:"Confucianisme",Legalism:"Légalisme","Western Zhou":"Zhou de l'Ouest",Utopians:"Utopiens","Visions of Shangri-La":"Vision de Shangri-La","Path to Shangri-La":"Passage vers Shangri-La","Gates of Shangri-La":"Portes de Shangri-La","Shangri-La":"Shangri-La",Monastery:"Monastère",Portals:"Portails",Daochang:"Daochang","Lost Tomes":"Grimoires Perdus","Tree of Knowledge":"Arbre de la Connaissance",Charity:"Charité",Meditation:"Méditation","Mountain Retreat":"Retraite Montagnarde","Sacred Scroll":"Parchemin Sacré",Back:"Précédent",Next:"Suivant","Conditional cards":"Cartes conditionelles","Multiplier cards":"Cartes avec multiplicateurs de score","Numeric cards":"Cartes avec valeurs numériques","Unrest cards":"Cartes Instabilités","These score differently depending on certain conditions.":"Celle-ci vaut le nombre de points indiqué si les conditions spécifiées ont été remplies. Sinon, elle ne rapporte aucun point.","Include the civilisation's power card. No individual card may score more than 10 points.":"Un même carte ne peut jamais vous rapporter plus de 10 points. N'oubliez pas votre carte Puissance.","Score the number on the card.":"Chaque carte rapporte le nombre de points de Victoire indiqué.","Progress tokens":"Jetons Progrès","Population tokens":"Jetons Population","Material tokens":"Jetons Matériaux","Each progress token scores 1 point.":"Chaque jeton devant vous vaut 1 point de Victoire.","Not scored directly, but may be referred to by other cards.":"Ces jetons ne valent rien, mais peuvent compter pour certaines cartes.","Resource tokens":"Jetons Matériaux","Each Unrest card scores -2 points.":"Chaque carte vaut -2 points de Victoire.","The bot always scores the higher value for these cards.":"Cartes conditionelles rapporte toujours à la C.I.V. le plus grand nombre de points de victoire indiqué.","The bot scores 5 points for each of these cards. Do not include the power card.":"Cartes multiplicateurs rapportent 5 points de victoire à la C.I.V. Ignorez la carte Puissance.","The bot scores 1 point for every 10 Resource and Population tokens combined.":"La C.I.V. gagne 1 point de victoire tous les 10 jetons Population et Matériaux en sa possession.","The bot scores 1 point for every 5 Resource and Population tokens combined.":"La C.I.V. gagne 1 point de victoire tous les 5 jetons Population et Matériaux en sa possession.","Save score":"Enregistrer le score","New game":"Nouvelle partie","WINNER!":"GAGNANT!","DRAW!":"ÃGALITÃ!",Close:"Fermer","Game mode":"Mode de jeu","Single game":"Jeu standard","Solo campaign":"Campagne solo","Join game in progress":"Rejoindre une partie en cours","Enemy civilisation":"Civilisation ennemie","Boxes available":"Boite de jeu possédée","Number of players":"Nombre de joueurs",Random:"Aléatoire","Surprise me!":"Surprenez moi!",Level:"Niveau",Chieftain:"Chef de clan",Warlord:"Seigneur de guerre",Imperator:"Imperator",Sovereign:"Souverain",Overlord:"Suzerain","Supreme Ruler":"Maître suprême","This bot has a hand size of 4 (place an exhaust token on slot 5).":"Le C.I.V. utilise 4 marqueurs d'emplacement seulement (placez un jeton Ãpuisé non utilisé sur le cinqième).","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"à la fin du tour de la C.I.V., après avoir rempli les différents emplacements, placez la première carte de son deck dans sa défausse.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"La C.I.V. commence avec 3 Matériaux, 2 Population et 1 Progrès en sa possession, et marque 1 point de Victoire tous les 5 Population et Máteriaux en sa possession à la fin de la partie","This bot has a hand size of 6 (add slot marker 6).":"Le C.I.V. utilise 6 marqueurs d'emplacement seulement (placez le marqueuer emplacement 6 à droite du marqueur emplacement 5 au cours de la mise en place).","Whenever the bot returns an Unrest card it gains 1 progress.":"à chaque fois que la C.I.V. renvoie une carte Instabilités, elle gagne aussi 1 Progrès.","Scoring method":"Méthode de décompte","Full scoring (enter your cards and the app automatically scores them)":"Décompte automatique (saissisez vos cartes et l'app comptera les points de victoire)","Basic scoring (enter score of scoring cards yourself)":"Décompte manuel (saissisez vous-même vos points carte par carte)","Automatically save score after each game?":"Enregistrer le score automatiquement après chaque partie?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"Ajouter vos scores à la base de données en ligne (de manière anonyme), pour générer des statistiques communautaires ?","No username at present":"Pas de nom d'utilisateur pour le moment","Set username":"Définir un nom d'utilisateur","Installing as a web app":"Installation en tant qu'application web","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":"Cette page peut être installée en tant qu'application Web sur la plupart des téléphones ou tablettes, ce qui vous permettra d'y accéder depuis votre écran d'accueil et hors ligne. Vous pouvez généralement le faire en choisissant « Ajouter à l'écran d'accueil » dans votre navigateur.","This page has more detailed instructions.":"Cette page contient des instructions plus détaillées.","Loading games in progress":"Chargement des jeux en cours","N
319o games available to join at the moment. Sorry!":"Actuellement aucune partie disponible. Désolé!","This will delete your game in progress. Do you really want to do this?":"Cela supprimera votre partie en cours. Voulez-vous vraiment le faire ?","Which game do you want to join?":"Quelle partie voulez-vous rejoindre ?","Which player are you?":"Quel joueur êtes-vous?","Ask permission to join":"Demander la permission à l'hôte du jeu","Awaiting response from game host...":"En attente de réponse de l'hôte du jeu...","Permission denied. Try another game.":"Permission refusée. Essayez un autre jeu.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 a demandé à rejoindre le jeu en tant que $1 ($2). Acceptez-vous?","Are you sure you want to trigger the end of the game through Collapse?":"Voulez-vous vraiment déclencher un Effondrement et terminer de jeu?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":"Les $1 ont un score final étonnamement bas de $0. Ãtes-vous sûr de vouloir enregistrer ce jeux ? (S'il s'agissait d'un jeu de test ou simplement d'essayer l'application, appuyez sur « Annuler » et elle ne sera pas enregistrée ou téléchargée dans la base de données de la communauté.)","Game left unfinished last time. Resume?":"Partie laissée inachevée la dernière fois. Continuer ?","Power card{0,s}":"Carte{0,s} Puissance{0,s}","Select the side of the $0 power card you have been using":"Sélectionnez la face de la carte Puissance $0 qui est devant vous","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(La face A est conçue pour les joueurs plus expérimentés, la face B pour vos premières fois avec cette civilisation.)","The $0 also have their separate $1.":"Les $0 ont également leur carte{2,s} de $1.","Any score from the $0 is tracked here too.":"Tout score de cette carte{1,s} $0 est également enregistré ici. ","Journey cards":"cartes Voyage","in play":"dans zone de jeu",garrisoned:"réservées","in history":"dans votre Histoire","in deck/hand":"en main ou dans votre deck","in exile (optional)":"en exil (en option)","in exile":"en exil",flooded:"submergées","Use photo...":"Décompte par photo...","Click on the icons to filter available cards by suit or civilisation.":"Cliquez sur les icônes pour filtrer les cartes disponibles par catégorie ou civilisation.","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"Il n'y a aucune carte capable de réserver dans votre zone de jeu. Mettez d'abord en jeu des régions ou d'autres cartes avec le mot-clef réserver.","Card $0 garrisoned under card $1":"Carte $0 réservée sous carte $1","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"Entrez le nombre de cartes dans la pile Exil. (Ceci est optionel à moins que vous ne jouiez une carte telle que le Monastère des Utopiens, dont le score est basé sur ce nombre).","Count from photo...":"Décompte par photo...","Add your own notes about strategy here.":"Ajoutez vos propres notes sur votre stratégie ici.","Game end trigger:":"Fin de la partie déclenchée par...","King of Kings (last fame card)":"Roi des Rois (dernière carte Rénommée)","Main deck empty":"Pioche Principale épuisée","Player's final development":"La zone de Développement d'un joueur est vide","Discovery of Graal":"Le joueur Arthuriens joue sa carte Graal","Arrival of Harald Hardrada":"Le joueur Vikings défausse sa carte Harald Hardrada","Arrival at Shangri-La":"Le joueur Utopiens déclenche Shangri-La avec au moins 24 Population","Most crucial cards (in player's strategy)":"Cartes les plus cruciales (dans la stratégie du joueur) ","Score all bot cards in a single pile. The bot does not score the power card":"Décomptez toutes les cartes de la C.I.V. ensemble. Ignorez sa carte Puissance.","but any score from the $0 card{1,s} will be included in the final score.":"mais les points de victoire de{1,s} carte{1,s} $0 seront inclus{1,es} dans le score final",Highscores:"Tableau des scores","Click on a player to get a breakdown of their score. Sort by:":"Cliquez sur un joueur pour obtenir le détail de son score. Trier par:","Most recent first":"Jeu le plus récent","Highest score first":"Score le plus élevé","Highest average score first":"Score moyen le plus élevé","Greatest score difference first":"Le plus grande différence de score","Winning civilisation":"Civilisation gagnante","Single games only":"Jeux standards uniquement","Campaigns only":"Campagnes uniquement","All games":"Tous modes de jeu","Display single games only":"Jeux standards uniquement","Display campaigns only":"Campagnes uniquement","Display all games":"Tous modes de jeu",Stats:"Statistiques",Statistics:"Statistiques","Number of games played:":"Nombre de parties jouées :","Best score":"Meilleur score","Worst score":"Pire score","Player-specific details:":"Détails spécifiques au joueur :","Average score":"Score moyen","Import from another device":"Importer depuis un autre appareil","Import data from clipboard":"Importer des données depuis le presse-papiers ","Copy data to clipboard":"Copier des données dans le presse-papiers","Overall score":"Score total",Classics:"Antique",Legends:"Légendes","Classics only":"Antique seulement","Legends only":"Légendes seulement","Classics and Legends":"Antique et Légendes","Player $0":"Joueur $0",Civilisation:"Civilisation",Bot:"C.I.
319V. (bot)","Use Commons and Fame cards from":"Utiliser les cartes Communes et Renommée de","Let me know on BGG (username hutchies) if you find any scoring errors!":"Si vous trouvez des erreurs, dites le moi sur BGG (nom d'utilisateur hutchies)!",player:"joueur",players:"joueurs","$0 player{0,s}":"$0 joueur{0,s}",Note:"N.B.",Setup:"Mise en place","Final results":"Résultats finaux","Game results":"Résultats de la partie","Campaign update":"Journal de campagne",Collapse:"Effondrement",Gameplay:"Partie en cours","You can view statistics for just this device on ImperiumStats by clicking here.":"Cliquez ici pour consulter les statistiques de cet appareil uniquement sur ImperiumStats","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Vous pouvez saisir un nom d'utilisateur (par exemple, votre nom d'utilisateur BGG) à associer à cet appareil, si vous souhaitez voir les résultats de vos différents appareils regroupés sur ImperiumStats.","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"Cela permettra également aux joueurs de retrouver plus facilement votre partie pour un décompte partagé (en utilisant « Joindre une partie en cours » dans le menu « Mode de jeu »).",Scoring:"Décompte","cards in":"cartes dans","Cards in":"Cartes dans",Cancel:"Annuller",tokens:"jetons",cards:"cartes","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Saisissez un nom d'utilisateur visible publiquement à associer à cet appareil (ou laissez ce champ vide pour le supprimer)","ImperiumStats website":"ImperiumStats",Change:"Changer","Unable to access online scores database: ":"Impossible d'accéder à la base de données des scores en ligne :",Edit:"Modifier",optional:"en option","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"Impossible de copier dans le presse-papiers : $0. Vous pouvez copier les données manuellement à partir de la zone de texte ci-dessous.","Really delete all record of previous scores?":"Voulez-vous vraiment supprimer tous les enregistrements de vos scores précédents ?","Scores deleted":"Scores supprimés","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"Impossible de lire à partir du presse-papiers (peut-être que l'autorisation a été refusée ?). Assurez-vous que vous accédez à cette page via https plutôt que http. Vous pouvez coller manuellement le presse-papiers ci-dessous pour importer.","Problem parsing data: $0":"Problème d'analyse des données : $0","Saved scores":"Scores enregistrés","Click on a game to get a breakdown of the score.":"Cliquez sur une partie pour obtenir le détail du score.","card{0,s}":"carte{0,s}",VP:"pts","Click here to visit ImperiumStats":"Cliquez ici pour visiter ImperiumStats","Upload score":"Mettre en ligne","Score saved":"Score enregistré",as:"en tant que","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 gagnant{0,s}, $1 perdant{1,s}, $2 égalité{2,s}","won $0, lost $1, drew $2":"$0 gagnant, $1 perdant, $2 égalité","point{0,s}":"point{0,s} de Victoire",scored:"marque","Game $0 of $1 in":"Partie $0 de $1 en","completed campaign":"campagne terminée","ongoing campaign":"campagne en cours","Bot level":"Niveau de la C.I.V.","View on stats site":"Voir sur ImperiumStats","Edit game":"Modifier la partie","Delete game":"Supprimer la partie","You have successfully defeated the":"Vous avez vaincu les","You have won $0 game{0,s} so far.":"Vous avez gagné $0 jeu{0,x} jusqu'à présent.","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":"Puisque vous jouez contre le Maître suprême, vous devez maintenant retirer 1 carte Instabilités de la pioche des cartes communes ; elle ne sera plus utilisée pendant le restant de la campagne.","In your next game, the bot will be at $0 level.":"Dans votre prochaine partie, la C.I.V. sera au niveau $0.","Please choose":"Choissisez","Add one of your Commons cards to your starting deck":"Ajoutez une carte à votre deck de départ","Remove one of your starting cards from the game":"Retirez une carte de votre deck de départ","Name of card":"Nom de la carte",grande:"Grande","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"Vous avez vaincu 5 civilisations différentes et remportez la $0campagne! Félicitations!","You were unable to defeat the $0.":"Vous n'avez pas réussi à vaincre les $0.","You were defeated by the $0.":"Vous avez été vaincu par les $0.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"Vous avez été vaincu 4 fois et terminez la $0campagne en défaite. Meilleure chance la prochaine fois!","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"Vous avez déjà été vaincu $0 fois (sur 4 possible avant de perdre la campagne).","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":"Puisque vous jouez contre le Maître suprême, vous devez maintenant renvoyer si possible une carte Instabilités mise de côté (y compris celles marquées avec '3+' ou '4'), dans la pioche commune.","Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"Votre prochaine partie sera à nouveau contre une C.I.V. de niveau $0, mais vous commencez avec deux fois plus de jetons Matériaux, Population et Progrès que normalement.","Awaiting final scores":"En attente des scores finales","Save progress":"Enregistrer","Complete campaign":"Terminer la campagne","Log cards":"Enregistrez vos cartes",Tokens:"Jetons",Notes:"Notes","by player":"par joueur","Cards in exile":"Cartes en exil",Display:"Afficher","Edit scores":"Modifier scores","Export a CSV file for analysis":"Exporter un fichier CSV pour analyse","Export data in CSV format":"Exporter les données au format CSV ","Include full scores breakdown in CSV?":"Inclure le détail complet du score dans le CSV ?","Delete all scores":"Supprimer tous les scores ",Victory:"Victoire",Draw:"Ãgalité",Defeat:"Défaite",Add:"Ajoutez",Remove:"Retirez","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"Retirez une carte <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> de la pioche des cartes communes.","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"Commencez la prochaine partie avec 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> et 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>.","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"Renvoyez si possible une carte <img src='unrest.png' style=\"width: 3vmin; height: 3vmin\"/> mise de côté, dans la pioche commune.",Campaign:"Campagne","Grand campaign":"Grande campagne",Win:"Victoire",Loss:"Défaite",ongoing:"en cours",completed:"terminée","ended in victory":"remportée","ended in defeat":"perdue","Completed on":"Terminée en","Next game at $0 level":"Prochaine partie au niveau $0",Cards:"Cartes","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"N'oubliez pas d'ignorer jusqu'à 2 cartes Instabilités ! (L'app ne le fera pas automatiquement pour vous.) ","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":"Le bot a terminé ce jeu sans aucun jeton, ce qui est assez inhabituel. Ãtes-vous sûr de vouloir l'enregistrer ? (S'il s'agissait d'un jeu de test ou simplement d'essayer l'application, appuyez sur « Annuler » et il ne sera pas enregistré.)","Scores copied to clipboard":"Scores copiés dans le presse-papiers","Unable to load games in progress:":"Impossible de charger les parties en cours : ","$0 game{0,s} available to join at the moment.":"$0 partie{0,s} disponible en ce moment","Which do you want to join?":"Quelle partie voulez-vous rejoindre ?","A player":"Un joueur","Game in progress. Really quit?":"Partie en cours. V
319oulez-vous vraiment abandonner?","Processing image...":"Traitement de l'image en cours...","No cards found: was the image in the right orientation?":"Aucune carte trouvée : l'image était-elle dans le bon sens ?","$0 cards counted in exile.":"$0 cartes en exil comptées.","$0 cards automatically garrisoned":"$0 cartes automatiquement reservées.","$0 cards automatically put in history":"$0 cartes placées dans votre Histoire","$0 cards automatically flooded":"$0 cartes submergées","$0 cards added to deck/hand/discard":"$0 cartes ajoutées à votre deck/main","$0 cards identified. $1 cards added to $2$3.":"$0 cartes identifiées. $1 cartes ajoutées à $2$3.","Solo grand campaign":"Grande campagne solo","played $0, won $1, lost $2, drew $3":"$0 jouée{0,s}, $1 gagnant, $2 perdant, $3 égalité","Start new campaign":"Commencer une nouvelle campagne","Player name":"Nom de joueur","Campaign log to date":"Journal de campagne à ce moment","Grand campaign log to date":"Journal de Grand campagne à ce moment","Enemy civilisation for game $0":"Civilisation ennemie pour la partie $0","Difficulty level":"Niveau de la C.I.V.",default:"défaut","OCR doesn't work offline...":"L'OCR ne fonctionne pas hors ligne","Choose an end-game trigger":"Fin de la partie déclenché par...","$0 game{0,s} played":"$0 partie{0,s} jouées",side:"face",on:"sur","token{0,s}":"jeton{0,s}","Court card":"carte Cour"},de:{Persians:"Perser","City of Persepolis":"Stadt Persepolis","Battering Ram":"Rammbock",Development:"Entwicklung",Windmills:"Persische Windmühlen",Satrap:"Satrap","Persian Gold":"Persisches Gold",Babylonians:"Babylonier","Darius I":"Dareios I.","Median Empire":"Medisches Reich","Nisaean Plain":"Nisäische Ebene",Arachosia:"Arachosien",Unrest:"Aufstand",Glory:"Ehre",Prosperity:"Wohlstand",Advance:"Fortschritt",Conquer:"Eroberung",Lydians:"Lyder",Zagros:"Zagros-Gebirge",Bactria:"Baktrien","Standing Army":"Stehendes Heer","Jade Mask":"Jademaske",Elders:"Ãlteste",Town:"Dorf",Shrine:"Schrein",Invasion:"Invasion",Mysticism:"Mystik",Oracle:"Orakel",Agriculture:"Ackerbau",Boats:"Boote",Leadership:"Herrschaft",Shaduf:"Schaduf","Lost Scroll":"Verlorene Schrift","Rituals & Ceremonies":"Rituale und Zermonien",Ambassador:"Gesandter",City:"Stadt",Gambling:"Glücksspiel",Port:"Hafen",Diplomacy:"Diplomatie",Wilderness:"Wildnis",Jungle:"Dschungel",Mountain:"Gebirge",Coast:"Küste",Floodplain:"Flussaue",Forest:"Nadelwald",Oasis:"Oase",Hills:"Hügel",Marsh:"Sumpf",Steppe:"Steppe",River:"Fluss",Cape:"Kap",Woodland:"Wald","Sacred Pass":"Heiliger Pass",Armenians:"Armenier",Assyrians:"Assyrer",Egyptians:"Ãgypter",Ionians:"Ionier",Qin:"Qin",Olmecs:"Olmeken",Sumerians:"Sumerer",Aksumites:"Aksumiten",Minoans:"Minoer",Mauryans:"Maurya",Hittites:"Hethiter","Drama & Poetry":"Drama und Poesie",Education:"Bildung",Moneylenders:"Geldverleiher",Corruption:"Korruption",Onager:"Onager",Temple:"Tempel",Cataphract:"Kataphrakt",Metropolis:"Metropole",Pharmacy:"Arzneikunde",Wonder:"Wunder",Coinage:"Münzgeld",Exports:"Exportgeschäfte","Urban Development":"Städtebau",Mercenaries:"Söldner",Mining:"Bergbau",Espionage:"Spionage",Monument:"Monument","Code of Laws":"Gesetze",Religion:"Religion",Domestication:"Domestizierung","Water Mill":"Wassermühle",Qanat:"Qanat","Road Building":"Strassenbau",Art:"Kunst","Fortunate Isle":"VerheiÃungsvolle Insel",Rainforest:"Regenwald","Mountainâ":"Gletscher",Peninsula:"Halbinsel",Lakes:"Seen",Highlands:"Hochland","Sacred Grove":"Heiliger Hain",Lowlands:"Flachland",Moor:"Moor",Plain:"Ebene",Archipelago:"Archipel","Fortified Region":"Befestigter Landstrich",Grassland:"Weide",Island:"Insel",Etruscans:"Etrusker",Scythians:"Skythen",Vikings:"Wikinger",Phoenicians:"Phönizier",Romans:"Römer",Greeks:"Griechen",Carthaginians:"Karthager",Celts:"Kelten",Macedonians:"Makedonen",Xiongnu:"Xiongnu",Astronomy:"Astronomie",Cartography:"Kartografie",Masonry:"Maurerhandwerk","Civil Service":"Verwaltung",Amphitheatre:"Amphitheater","King of Kings":"König aller Könige",Praiseworthy:"Verehrungswürdig",Great:"Imposant",Notorious:"Berüchtigt",Marvellous:"Atemberaubend",Glorious:"Glorreich",Triumphant:"Siegreich","Awe-inspiring":"Ehrfurchtgebietend",Imperial:"Kaiserlich",Independent:"Unabhängig",Magnificent:"Prächtig",Outstanding:"Herausragend",Proud:"Stolz",Eminent:"Angesehen",Acclaimed:"Bejubelt","City of Carthage":"Stadt Karthago",Elephants:"Elefanten",Hegemony:"Hegemonie",Hannibal:"Hannibal","Trading Ships":"Handelsschiffe",Monopoly:"Monopol",Caravans:"Karawane",Iberia:"Iberia",Berbers:"Berber","Dido, Queen of Carthage":"Dido, Königin von Karthago","Carthaginian Traders":"Karthagische Handelsleute","Balearic Islands":"Balearische Inseln",Mauretania:"Mauretanien","Celtic Gold":"Keltengold","Celtic Innovation":"Keltische Erfindungen",Chainmail:"Kettenhemd",Chariots:"Streitwagen","Ogham Script":"Ogham-Schrift",Vercingetorix:"Vercingetorix",Armorica:"Armorica",Belgica:"Belgica",Britannia:"Britannien",Hibernia:"Hibernien",Druids:"Druiden",Boudicca:"Boudicca","Cattle Raid":"Viehdiebstahl","Cauldron of Ceridwen":"Kessel der Ceridwen",Celtica:"Celtica","Olympic Games":"Olympische Spiele",Philosophy:"Philosophie",Lighthouse:"Leuchtturm","Direct Democracy":"Direkte Demokratie","Greek Innovation":"Griechische Erfindung",Science:"Wissenschaft","City of Corinth":"Stadt Korinth",Pericles:"Perikles","Greek Prosperity":"Griechischer Wohlstand","City of Athens":"Stadt Athen","Plains of Thessaly":"Thessalische Ebene",Settlers:"Siedler","Greek Mercenaries":"Griechische Söldner","City of Sparta":"Stadt Sparta","Forest of Pholoe":"Foloi-Wald",Peleponnese:"Peloponnes",Alexander:"Alexander","Alexander the Great":"Alexander der Grosse",Parmenion:"Parmenion","Alexandria in Ariana":"Alexandria in Ariana","Alexandria in Egypt":"Alexandria in Ãgypten",Mosaics:"Mosaik","Companion Cavalry":"Hetairenreiterei",Uxians:"Uxier","Philip II":"Philipp II.",Phalanx:"Phalanx",Pelagonia:"Pelagonien","Hali
319acmon Valley":"Aliakmonas-Tal",Orestis:"Orestis","Julius Caesar":"Julius Cäsar","Military Engineering":"Militärtechnologie","Roman Invasion":"Römische Invasion",Legions:"Legionen","The Senate":"Römischer Senat","Rome, the Eternal City":"Rom, die ewige Stadt","Emperor Trajan":"Kaiser Trajan","Bread and Circuses":"Brot und Spiele","Gallia Aquitania":"Gallia Aquitania",Raetia:"Rätien",Triumvirate:"Triumvirat","City of Rome":"Stadt Rom",Dalmatia:"Dalmatia","Roman Expansion":"Römische Expansion",Jewellery:"Reichtümer",Ateas:"Atheas",Kurgans:"Kurgane","City of Gelonus":"Stadt Gelonos",Raiders:"Plünderer",Tamga:"Tamga","Pontic Steppe":"Pontische Steppe","Tarim Basin":"Tarimbecken",Caucasia:"Kaukasus",Nomads:"Nomaden",Tents:"Zelte","Mounted Archers":"Berittene Bogenschützen","Carpathian Mountains":"Karpaten","Tian Shan":"Tian-Shan-Gebirge","Harald Hardrada":"Harald HardrÃ¥de","Go A'Viking":"Raubzug",Combs:"Kämme","Rollo the Walker":"Rollo der Geher",Skis:"Ski",Longships:"Langschiffe",Sagas:"Sagen","City of Dubh Linn":"Stadt Dubh Linn",Graenland:"Grænland","Føroyar":"Føroyar",Iceland:"Island",Vinland:"Vinland",Jomsviking:"Jomswikinger",Gothja:"Gothja",Althing:"Althing",Scandinavia:"Skandinavien","Erik the Red":"Erik der Rote",Arthurians:"Avalonier","King Arthur's Court":"Hof von König Artus","Gwaith Camlan":"Schlacht von Camlann",Graal:"Heiliger Gral","Lawnslot y Llyn (Sir Lancelot)":"Lawnslot y Llyn (Sir Lancelot)","Twrch Trwyth":"Twrch Trwyth","Taliesin the Bard":"Taliesin, der Barde",Excalibur:"Excalibur","Bedwyr (Sir Bedevire)":"Bedwyr (Sir Bedevire)","Viviane of the Lake":"Herrin vom See","City of Camelot":"Camelot","Britannia Flavia":"Flavia Caesariensis","Ynys Afallach (Avalon)":"Ynys Avallach (Avalon)","Gwalchmei (Sir Gawain)":"Gwalchmei (Sir Gawain)","Lady Bertilak":"Lady Bertilak",Morigena:"Morgan le Fay","Peredur (Sir Percival)":"Peredur (Sir Percival)","Cai (Sir Kay)":"Cai (Sir Kay)","King Arthur":"König Artus","Uthyr Pendragon":"Uther Pendragon","Britannia Prima":"Britannia Prima","Britannia Secunda":"Britannia Secunda","Myrddin Wyllt (Merlin)":"Myrddin Wyllt (Merlin)",Guennuvar:"Guinevere",Cafall:"Cavall",Atlanteans:"Atlanter","Advanced Culture":"Hochentwickelte Kultur","Palace of Poseidon":"Palast des Poseidon","Spread of Atlantis":"Atlantische Ausbreitung","Moats and Walls":"Mauern und Burggräben","Myths and Legends":"Mythen und Legenden","Vast Wealth":"Unermesslicher Reichtum",Kleito:"Kleito","Mountain of Atlantis":"Berg von Atlantis",Themiscyra:"Themiskyra",Flood:"Flut",Thule:"Thule",Hesperides:"Hesperiden","Elysian Fields":"Elysische Gefilde","Atlantean Fleet":"Atlantische Flotte",Unification:"Reichseinigung",Embalming:"Einbalsamierung",Obelisk:"Obelisk","Ramesses II":"Ramses II.","Egyptian Expansion":"Ãgyptische Expansion",Medicine:"Medizin",Pyramids:"Pyramiden","Egyptian Legacy":"Ãgyptisches Vermächtnis",Kushites:"Kuschiten","Red Land":"Rotes Land","Flood of the Nile":"Nilflut","Egyptian Incursion":"Ãgyptische Invasion","Egyptian Hieroglyphics":"Ãgyptische Hieroglyphen","Nile Valley":"Niltal","Lower Nile":"Nil",Mathematics:"Mathematik","Grand Trunk Road":"Fernhandelsstrasse",Ashoka:"Ashoka",Buddhism:"Buddhismus","Edicts of Ashoka":"Ashoka-Edikte","Punch-Marked Coins":"Münzprägung",Arthashastra:"Arthashastra","Nanda Dynasty":"Nanda-Dynastie","City of Pataliputra":"Stadt Pataliputra","Indian Elephants":"Indische Elefanten",Gandhara:"Gandhara",Chandragupta:"Chandragupta",Chanakya:"Chanakya",Magadha:"Magadha","Indus Valley":"Industal","King Minos":"König Minos","Minoan Traders":"Minoische Handelsleute","Drainage System":"Entwässerungssystem",Architecture:"Architektur",Frescos:"Fresken",Labyrinth:"Labyrinth","Minoan Expansion":"Minoische Expansion","Seal Stones":"Siegelsteine","Writing Systems":"Schriftsysteme",Knossos:"Knossos",Pottery:"Töpferwaren",Thera:"Thera",Crete:"Kreta",Cyprus:"Zypern","San Lorenzo Tenochtitlán":"San Lorenzo Tenochtitlán","Step Pyramids":"Stufenpyramiden","Ritual Sacrifice":"Rituelle Opferung","Olmec Traders":"Olmekische Handelsleute","Tres Zapotes":"Tres Zapotes","Stone Heads":"Kolossalköpfe",Cacao:"Kakao","Olmec Hieroglyphics":"Olmekische Hieroglyphen",Calendar:"Kalender","Stone Mask":"Steinmaske","Loadstone Compass":"Magnetstein-Kompass","Ball Games":"Ballspiele","Laguna de los Cerros":"Laguna de los Cerros","La Venta":"La Venta","Long Walls I":"Lange Mauer I","Long Walls II":"Lange Mauer II","Long Walls III":"Lange Mauer III","Long Walls IV":"Lange Mauer IV","Emperor Qin Shi Huang":"Kaiser Qin Shi Huangdi","King Wu of Qin":"König Wu von Qin",Metallurgy:"Metallurgie","Terracotta Warriors":"Terrakotta-Armee","Eastern Zhou":"Land der östlichen Zhou","Mandate of Heaven":"Mandat des Himmels","Duke Zhuang of Qin":"Herzog Zhuang von Qin","School of Diplomacy":"Schule der Verhandlungen",Confucianism:"Konfuzianismus",Legalism:"Legalismus","Western Zhou":"Land der westlichen Zhou",Utopians:"Utopisten","Visions of Shangri-La":"Visionen von Shangri-La","Path to Shangri-La":"Weg nach Shangri-La","Gates of Shangri-La":"Tore von Shangri-La","Shangri-La":"Shangri-La",Monastery:"Kloster",Portals:"Portal",Daochang:"Daochang","Lost Tomes":"Verschollene Folianten","Tree of Knowledge":"Wissensbaum",Charity:"Barmherzigkeit",Meditation:"Meditation","Mountain Retreat":"Rückzugsort","Sacred Scroll":"Heilige Schrift",Back:"Zurück",Next:"Weiter","Conditional cards":"Karten mit bedingten Siegpunkten","Multiplier cards":"Karten mit variablen Siegpunkten","Numeric cards":"Karten mit einfachen Siegpunkten","Unrest cards":"Aufstand-Karten","These score differently depending on certain conditions.":"Der Siegpunktwert ändert sich je nach Bedingung.","Include the civilisation's power card. No individual card may score more than 10 points.":"Machtkarte der Zivilisation eingeschlossen. Keine einzelne Karte kann mehr als 10 Siegpunkte ergeben.","Score the number on the card.":"Zählt als die auf der Karte angegebenen Siegpunkte.","Progress tokens":"Fortschrittsplättchen","Population tokens":"Bevölkerungsplättchen","Material tokens":"Rohstoffplättchen","Each progress token scores 1 point.":"Jedes Fortschrittsplättchen zählt als 1 Siegpunkt.","Not scored directly, but may be referred to by other cards.":"Keine direkten Siegpunkte, kann aber über andere Karten zu Siegpunkten führen.","Resource tokens":"Rohstoffplättchen","Each
319Unrest card scores -2 points.":"Jede Aufstand-Karte zählt als -2 Siegpunkte.","The bot always scores the higher value for these cards.":"Der Automa erhält immer die höhere Anzahl an Siegpunkten für diese Karten.","The bot scores 5 points for each of these cards. Do not include the power card.":"Der Automa erhält immer 5 Siegpunkte für diese Karten (auÃer der Machtkarte).","The bot scores 1 point for every 10 Resource and Population tokens combined.":"Der Automa erhält 1 Siegpunkt für je 10 Rohstoff und Bevölkerung in Summe.","The bot scores 1 point for every 5 Resource and Population tokens combined.":"Der Automa erhält 1 Siegpunkt für je 5 Rohstoff und Bevölkerung in Summe.","Save score":"Spielergebnis speichern","New game":"Neue Partie","WINNER!":"SIEGER!","DRAW!":"UNENTSCHIEDEN!",Close:"SchlieÃen","Game mode":"Spielmodus","Single game":"Einzelspiel","Solo campaign":"Solo-Kampagne","Join game in progress":"Laufender Partie beitreten","Enemy civilisation":"Gegnerische Zivilisation","Boxes available":"Verfügbare Spieleboxen","Number of players":"Anzahl Spieler",Random:"Zufall","Surprise me!":"Ãberrasche mich!",Level:"Schwierigkeitsgrad",Chieftain:"Dorfältester",Warlord:"Stammesfürst",Imperator:"Kriegsherr",Sovereign:"König",Overlord:"Kaiser","Supreme Ruler":"Oberster Imperator","This bot has a hand size of 4 (place an exhaust token on slot 5).":"Dieser Automa hat ein Handkartenlimit von 4 (platziere ein Erschöpfungsplättchen auf den 5. Slot).","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"Am Ende des Automa-Spielzugs, nachdem die Automa-Kartenhand aufgefüllt wurde, lege die oberste Karte des Automa-Nachziehstapels auf den Automa-Abwurfstapel.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"Dieser Automa fängt mit der gleichen Anzahl an Forschritt, Bevölkerung und Rohstoffen an wie Spieler und erhält 1 Siegpunkt für je 5 Rohstoff und Bevölkerung.","This bot has a hand size of 6 (add slot marker 6).":"Dieser Automa hat ein Handkartenlimit von 6 (füge ein Plättchen für einen 6. Slot hinzu).","Whenever the bot returns an Unrest card it gains 1 progress.":"Wann immer der Automa eine Aufstand-Karte zurücklegt, erhält er einen Fortschritt.","Scoring method":"Wertungsmethode","Full scoring (enter your cards and the app automatically scores them)":"Automatische Wertung (gib deine Karten ein und die App berechnet die Punktezahl)","Basic scoring (enter score of scoring cards yourself)":"Manuelle Wertung (gib die Punkte pro Karte selbst ein)","Automatically save score after each game?":"Spielergebnis nach jeder Partie automatisch speichern?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"Spielergebnis automatisch in der Online-Datenbank zu Statistikzwecken speichern (Daten werden anonym gespeichert)?","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"Benutzername (z.B. BGG Benutzername), mit dem Daten dieses Geräts auf ImperiumStats gespeichert werden. Andere können nach Benutzernamen suchen.","No username at present":"Kein Benutzername konfiguriert","Set username":"Benutzername konfigurieren","Installing as a web app":"Als Web App installieren","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":'Diese Seite kann auf den meisten Smartphones oder Tables als Web App installiert werden. Auf diese Weise kann sie auch offline verwendet werden. Ãblicherweise funktioniert das über "Zum Startbildschirm hinzufügen" im Browser.',"This page has more detailed instructions.":"Diese Seite hat weiterführende Informationen.","Loading games in progress":"Spielstand lädt gerade","No games available to join at the moment. Sorry!":"Keine Partien zum Beitreten vorhanden, sorry.","This will delete your game in progress. Do you really want to do this?":"Die aktuelle Partie wird gelöscht, wirklich fortsetzen?","Which game do you want to join?":"Welcher Partie willst du beitreten?","Which player are you?":"Welcher Spieler bist du?","Ask permission to join":"Um Erlaubnis zum Beitreten fragen","Awaiting response from game host...":"Warte auf Antwort vom Partie-Eigentümer.","Permission denied. Try another game.":"Erlaubnis verweigert. Versuche ein andere Partie.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 möchte der Partie als $1 ($2) beitreten. Erlauben?","Are you sure you want to trigger the end of the game through Collapse?":"Bist du sicher, das Spielende durch Zusammenbruch auszulösen?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":"Diese Partie hat eine ungewöhnlich niedrige Endwertung von $0 für $1. Bist du sicher, dass es gespeichert werden soll? (Wenn es ein Testspiel war, bitte 'Abbrechen' auswählen, damit es nicht in der Online-Datenbank gespeichert wird.)","Game left unfinished last time. Resume?":"Die Partie wurde letztes Mal unvollendet verlassen. Weiterspielen?","Power card{0,s}":"Machtkarte","Select the side of the $0 power card you have been using":"Wähle die Seite der Machtkarte der $0 aus, mit der gespielt wurde","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(Die A-Seite ist für fortgeschrittene Spieler, die B-Seite wird bei der ersten Partie mit einer neuen Zivilisation empfohlen.)","The $0 also have their separate $1.":"Die $0 haben ihre separate{2,n} $1 Karte{2,n}.","Any score from the $0 is tracked here too.":"Punkte der $0 Karte{1,n} eingeschlossen.","Journey cards":"Reisekarten","in play":"im Spiel",garrisoned:"untergeschoben","in history":"in der Geschichte","in deck/hand":"in der Hand oder im Zugstapel","in exile (optional)":"im Exil (optional)","in exile":"im Exil",flooded:"überflutet","Use photo...":"Benutze Foto...","Click on the icons to filter available cards by suit or civilisation.":"Klicke auf die Icons um die verfügbaren Karten nach Farbe oder Zivilisation zu filtern.","No cards capable of garr
319isoning in play area. Put some regions or other cards capable of garrisoning into play first.":"Keine Karten im Spielbereich vorhanden, Unterschieben nicht möglich. Spiele zuerst Gebiete oder andere Karten in deinen Spielbereich aus.","Card $0 garrisoned under card $1":"Karte $0 unter Karte $1 geschoben","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"Gib die Anzahl Karten im Exil an (nur notwendig für Karten wie das Kloster der Utopisten, deren Wert davon abhängt).","Count from photo...":"Zähle vom Foto...","Add your own notes about strategy here.":"Füge eigene Strategie-Notizen hinzu.","Game end trigger:":"Auslöser für das Spielende:","King of Kings (last fame card)":"König der Könige (letzte Karte des Ruhm-Stapels)","Main deck empty":"Hauptstapel leer","Player's final development":"Entwicklungsstapel eines Spielers leer","Discovery of Graal":"Entdeckung des Heiligen Grals (Avalonier)","Arrival of Harald Hardrada":"Ankunft von Harald HardrÃ¥de (Wikinger)","Arrival at Shangri-La":"Ankunft bei Shangri-La (Utopisten)","Most crucial cards (in player's strategy)":"Die wichtigsten Karten (in der Spielerstrategie)","Score all bot cards in a single pile. The bot does not score the power card":"Werte alle Karten des Automas in einem einzigen Stapel. Der Automa erhält keine Punkte für seine Machtkarte.","but any score from the $0 card{1,s} will be included in the final score.":"aber Punkte aus $0 Karte{1,n} werden im Endergebnis berücksichtigt.",Highscores:"Highscores","Click on a player to get a breakdown of their score. Sort by:":"Klicke auf einen Spieler, um Details zu sehen. Sortieren nach:","Most recent first":"Neueste zuerst","Highest score first":"Höchste Punktezahl zuerst","Highest average score first":"Höchster Durchschnitt zuerst","Greatest score difference first":"GröÃte Punktedifferenz zuerst","Winning civilisation":"Siegende Zivilisation","Single games only":"Nur Einzelspiele","Campaigns only":"Nur Kampagnen","All games":"Alle Spiele","Display single games only":"Zeige nur Einzelspiele an","Display campaigns only":"Zeige nur Kampagnenspiele an","Display all games":"Zeige alle Spiele an",Stats:"Statistiken",Statistics:"Statistiken","Number of games played:":"Anzahl gespielter Partien:","Best score":"Höchster Punktestand","Worst score":"Schlechtester Punktestand","Player-specific details:":"Details per Spieler:","Average score":"Durchschnittspunktestand","Import from another device":"Importiere von einem anderen Gerät","Import data from clipboard":"Importiere aus der Zwischenablage","Copy data to clipboard":"Kopieren Daten in die Zwischenablage","Overall score":"Endpunktestand",Classics:"Klassik",Legends:"Legenden","Classics only":"Nur Klassik","Legends only":"Nur Legenden","Classics and Legends":"Klassik und Legenden","Player $0":"Spieler $0",Civilisation:"Zivilisation",Bot:"Automa","Use Commons and Fame cards from":"Benutze Allgemeine Karten aus","Let me know on BGG (username hutchies) if you find any scoring errors!":"Gib mir auf BGG (Benutzername hutchies) bescheid, wenn es Fehler in der Wertung gibt!",player:"Spieler",players:"Spieler","$0 player{0,s}":"$0 Spieler",Note:"Anmerkung",Setup:"Aufbau","Final results":"Endergebnis","Game results":"Ergebnis der Partie","Campaign update":"Kampagnen-Info",Collapse:"Zusammenbruch",Gameplay:"Spielablauf","You can view statistics for just this device on ImperiumStats by clicking here.":"Klicke hier, um Statistiken auf ImperiumStats für dieses Endgerät einzusehen.","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Benutzername (z.B. BGG Benutzername), mit dem Daten dieses Endgeräts auf ImperiumStats gespeichert werden.","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"Das erlaubt anderen Spielern deine Spiele für eine gemeinsame Wertung zu finden (über 'Laufender Partie beitreten' im Menü 'Spielmodus').",Scoring:"Wertung","cards in":"Karten in","Cards in":"Karten in",Cancel:"Abbruch",tokens:"Plättchen",cards:"Karten","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Gib einen öffentlichen Benutzernamen für dieses Endgerät ein (oder leer zum Entfernen).","ImperiumStats website":"ImperiumStats-Webseite",Change:"Ãndern","Unable to access online scores database: ":"Kann nicht auf Online-Datenbank zugreifen: ",Edit:"Editieren",optional:"optional","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"Kann nicht in Zwischenablage kopieren: $0. Du kannst die Daten manuell aus dem Eingabefeld unten kopieren.","Really delete all record of previous scores?":"Wirklic
319h alle vorherigen Wertungen löschen?","Scores deleted":"Wertungen gelöscht","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"Kann nicht aus Zwischenablage lesen (keine Zugriffsrechte?). Stelle sicher, dass du auf die Seite über https und nicht http zugreifst. Du kannst die Zwischenablage unten manuell einsetzen um zu importieren.","Problem parsing data: $0":"Problem beim Einlesen der Daten: $0","Saved scores":"Gespeicherte Wertungen","Click on a game to get a breakdown of the score.":"Klicke auf ein Spiel um Details der Wertung zu sehen.","card{0,s}":"Karte{0,n}",VP:"SP","Click here to visit ImperiumStats":"Klicke hier um zu ImperiumStats zu gelangen","Upload score":"Wertung hochladen","Score saved":"Wertung gespeichert",as:"als","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 Sieg{0,e}, $1 Niederlage{1,n}, $2 Unentschieden","won $0, lost $1, drew $2":"gewonnen $0, verloren $1, unentschieden $2","point{0,s}":"Punkt{0,e}",scored:"gewertet","Game $0 of $1 in":"Spiel $0 von $1 in","completed campaign":"abgeschlossene Kampagne","ongoing campaign":"laufende Kampagne","Bot level":"Schwierigkeitsgrad des Automas","View on stats site":"Anzeige auf ImperiumStats","Edit game":"Partie editieren","Delete game":"Partie löschen","You have successfully defeated the":"Du hast erfolgreich besiegt: ","You have won $0 game{0,s} so far.":"Du hast bisher $0 Spiel{0,e} gewonnen.","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":"Da du gegen den Obersten Imperator spielst, musst du für den Rest der Kampagne 1 Aufstand-Karte aus dem gemeinsamen Karten entfernen.","In your next game, the bot will be at $0 level.":"In deiner nächsten Partie wird der Automa mit Level $0 spielen.","Please choose":"Bitte auswählen","Add one of your Commons cards to your starting deck":"Füge eine Allgemeine Karte deinem Startdeck hinzu","Remove one of your starting cards from the game":"Entferne eine deiner Startkarten aus dem Spiel","Name of card":"Kartenname",grande:"GroÃe","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"Du hast 5 verschiedene Zivilisationen besiegt und die $0Kampagne vollendet. Gratulation!","You were unable to defeat the $0.":"Du warst unfähig, die $0 zu besiegen.","You were defeated by the $0.":"Du wurdest von den $0 besiegt.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"Du wurdest 4 mal besiegt und beendest die $0Kampagne mit einer Niederlage. Viel Glück nächstes Mal!","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"Du wurdest bisher $0 mal besiegt (bei 4 Niederlagen verlierst du die Kampagne).","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":"Da du gegen den Obersten Imperator spielst, musst du für den Rest der Kampagne 1 Aufstand-Karte den gemeinsamen Karten hinzufügen. (Das können die Karten für 3+ oder 4 Spieler sein, die beim Aufbau entfernt wurden).","Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"In deiner nächsten Partie wird der Automa nochmal mit Level $0 spielen, aber du beginnst die Partie mit den doppelten Ressourcen.","Awaiting final scores":"Warte auf die Endwertung","Save progress":"Speicher-Fortschritt","Complete campaign":"Kampagne beenden","Log cards":"Kartenprotokoll",Tokens:"Plättchen",Notes:"Notizen","by player":"von Spieler","Cards in exile":"Karten im Exil",Display:"Anzeigen","Edit scores":"Wertung editieren","Export a CSV file for analysis":"CSV zur Analyse exportieren","Export data in CSV format":"Exportiere Daten im CVS-Format","Include full scores breakdown in CSV?":"Wertungsdetails im CSV einschlieÃen","Delete all scores":"Lösche alle Wertungen",Victory:"Sieg",Draw:"Unentschieden",Defeat:"Niederlage",Add:"Hinzufügen",Remove:"Entfernen","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"Entferne 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> von den gemeinsamen Karten.","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"Beginne die nächste Partie mit 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"Lege 1 entfernten <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> zurück in den allgemeinen Vorrat, wenn möglich.",Campaign:"Kampagne","Grand campaign":"GroÃe Kampagne",Win:"Sieg",Loss:"Niederlage",ongoing:"laufend",completed:"beendet","ended in victory":"gewonnen","ended in defeat":"verloren","Completed on":"Beendet am","Next game at $0 level":"Nächste Partie mit Level $0",Cards:"Karten","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"Verg
319iss nicht, 2 Aufstand vor der Wertung zu entfernen! (Die App macht das nicht automatisch.)","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":"Der Automa hat diese Partie ohne Plättechen beendet, was ziemlich ungewöhntlich ist. Bist du sicher, dass du das Ergebnis speichern willst? (Wenn es ein Testspiel war, bitte 'Abbrechen' auswählen, damit es nicht in der Online-Datenbank gespeichert wird.)","Scores copied to clipboard":"Wertung wurde in die Zwischenablage kopiert","Unable to load games in progress:":"Konnte laufende Partien nicht laden:","$0 game{0,s} available to join at the moment.":"$0 Spiel{0,e} momentan zum Beitreten verfügbar.","Which do you want to join?":"Welcher Partie willst du beitreten?","A player":"Ein Spieler","Game in progress. Really quit?":"Partie läuft. Wirklich verlassen?","Processing image...":"Bild wird verarbeitet...","No cards found: was the image in the right orientation?":"Keine Karten gefunden: War die Bildausrichtung korrekt?","$0 cards counted in exile.":"$0 Karte{0,n} im Exil gezählt.","$0 cards automatically garrisoned":"$0 Karte{0,n} automatisch untergeschoben.","$0 cards automatically put in history":"$0 Karte{0,n} automatisch in der Geschichte.","$0 cards automatically flooded":"$0 Karte{0,n} automatisch geflutet.","$0 cards added to deck/hand/discard":"$0 Karte{0,n} automatisch in Zugstapel/Abwurfstapel/auf der Hand.","$0 cards identified. $1 cards added to $2$3.":"$0 Karte{0,n} identifiziert. $1 Karte{1,n} zu $2$3 hinzugefügt.","Solo grand campaign":"GroÃe Solo-Kampagne","played $0, won $1, lost $2, drew $3":"$0 gespielt, $1 gewonnen, $2 verloren, $3 unentschieden","Start new campaign":"Beginne neue Kampagne","Player name":"Spielername","Campaign log to date":"Protokoll der Kampagne","Grand campaign log to date":"Protokoll der GroÃen Kampagne","Enemy civilisation for game $0":"Gegnerische Zivilisation für Partie $0","Difficulty level":"Schwierigkeitslevel",default:"standard","OCR doesn't work offline...":"OCR offline nicht möglich","Choose an end-game trigger":"Wähle den Auslöser für das Spielende","$0 game{0,s} played":"$0 Spiel{0,e} gespielt",side:"Seite",on:"auf","token{0,s}":"Plättchen","Court card":"Hofkarte"},es:{"Jade Mask":"Máscara de jade",Elders:"Ancianos",Town:"Pueblo",Shrine:"Santuario",Invasion:"Invasión",Mysticism:"Misticismo",Oracle:"Oráculo",Agriculture:"Agricultura",Boats:"Botes",Leadership:"Liderazgo",Shaduf:"Cigoñal","Lost Scroll":"Pergamino perdido","Rituals & Ceremonies":"Rituales y ceremonias",Ambassador:"Embajador",City:"Ciudad",Gambling:"Apuestas",Port:"Puerto",Diplomacy:"Diplomacia",Wilderness:"Región salvaje",Jungle:"Jungla",Mountain:"Montaña",Coast:"Costa",Floodplain:"Terreno inundable",Forest:"Bosque",Oasis:"Oasis",Hills:"Colinas",Marsh:"Pantano",Steppe:"Estepa",River:"RÃo",Cape:"Cabo",Woodland:"Arboleda","Sacred Pass":"Paso sagrado",Armenians:"Armenios",Assyrians:"Asirios",Egyptians:"Egipcios",Ionians:"Jónicos",Qin:"Qin",Olmecs:"Olmec
319as",Sumerians:"Sumerios",Aksumites:"Aksumitas","King of Kings":"Rey de reyes",Praiseworthy:"Loable",Great:"Grandioso",Notorious:"Infame",Marvellous:"Excelente",Glorious:"Glorioso",Triumphant:"Triunfante","Awe-inspiring":"Impresionante",Imperial:"Imperial",Independent:"Independiente",Magnificent:"MagnÃfico",Outstanding:"Excepcional",Proud:"Orgulloso",Eminent:"Eminente",Acclaimed:"Alabado",Carthaginians:"Cartagineses",Celts:"Celtas",Greeks:"Griegos",Macedonians:"Macedonios",Persians:"Persas",Romans:"Romanos",Scythians:"Escitas",Vikings:"Vikingos",Arthurians:"Artúricos",Atlanteans:"Atlantes",Mauryans:"Mauryas",Minoans:"Minoicos",Utopians:"Utópicos",Back:"Atrás",Next:"Siguiente","Conditional cards":"Cartas con condiciones","Multiplier cards":"Cartas con multiplicadores","Numeric cards":"Cartas con valor numérico","Unrest cards":"Cartas de Disturbios","These score differently depending on certain conditions.":"Estas puntúan si cumplen ciertas condiciones. ","Include the civilisation's power card. No individual card may score more than 10 points.":"No olvides los puntos por la carta de poder de tu civilización. Ninguna carta puede superar los 10 puntos de puntuación. ","Score the number on the card.":"Cada carta vale tantos puntos como indique la carta.","Progress tokens":"Fichas de Progreso","Population tokens":"Fichas de Población","Material tokens":"Fichas de Materiales","Each progress token scores 1 point.":"Cada ficha de progreso otorga 1 punto.","Not scored directly, but may be referred to by other cards.":"Estas fichas no otorgan puntos, pero el valor de otras cartas puede depender de ellas.","Resource tokens":"Fichas de Materiales","Each Unrest card scores -2 points.":"Cada carta de Disturbios otorga -2 puntos.","The bot always scores the higher value for these cards.":"El bot siempre puntúa el máximo valor por estas cartas. ","The bot scores 5 points for each of these cards. Do not include the power card.":"El bot puntúa 5 puntos por cada una de estas cartas; sin incluir la carta de Poder de la civilización.","The bot scores 1 point for every 10 Resource and Population tokens combined.":"Por cada 10 fichas de Materiales o Población, en cualquier combinación, el bot gana 1 punto. ","The bot scores 1 point for every 5 Resource and Population tokens combined.":"Por cada 5 fichas de Materiales o Población, en cualquier combinación, el bot gana 1 punto. ","Save score":"Guardar la puntuación","New game":"Nueva partida","WINNER!":"¡GANADOR!","DRAW!":"¡EMPATE!",Close:"Cerrar","Game mode":"Modo de juego","Single game":"Partida normal","Solo campaign":"Campaña en solitario","Join game in progress":"Unirse a una partida en marcha","Enemy civilisation":"Civilización enemiga","Boxes available":"Cajas disponibles","Number of players":"Número de jugadores",Random:"Al azar","Surprise me!":"¡Sorpréndeme!",Level:"Nivel",Chieftain:"Chieftain",Warlord:"Warlord",Imperator:"Imperator",Sovereign:"Sovereign",Overlord:"Overlord","Supreme Ruler":"Supreme Ruler","This bot has a hand size of 4 (place an exhaust token on slot 5).":'Este bot tiene una mano de 4 cartas (coloca una ficha de "agotado" en el 5º espacio). ',"At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"Al final del turno del bot, tras rellenar su mano, descarta la carta superior de su mazo.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"Este bot comienza las mismas fichas de Progreso, Población y Materiales que un jugador humano, y por cada combinación de 5 fichas de Población o Materiales obtiene 1 punto de victoria.","This bot has a hand size of 6 (add slot marker 6).":"Este bot tiene una mano de 6 cartas (añade un sexto espacio con el marcador rotulado con el número 6).","Whenever the bot returns an Unrest card it gains 1 progress.":"El bot gana 1 ficha de Progreso cuando devuelve una carta de Disturbios.","Scoring method":"Método de puntuación","Full scoring (enter your cards and the app automatically scores them)":"Puntuación automática (introduce tus cartas y la app las puntuará automáticamente)","Basic scoring (enter score of scoring cards yourself)":"Puntuación manual (calcula tus puntos e introduce la puntuación)","Automatically save score after each game?":"¿Guardar la puntuación automáticamente después de cada partida?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"¿Añadir tu puntuación a la base de datos online para datos estadÃsticos? (Es anónimo. No se incluyen tus datos)","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":'Puedes añadir un n
319ombre de usuario (p. ej.: tu usuario en la BGG) para asociarlo a este dispositivo. Si quieres ver los resultados de diferentes dispositivos, agrúpalos en ImperiumStats. Esto también permite que los jugadores encuentren fácilmente sus puntuaciones (utilizando "Unirse a una partida en marcha" en el menú "Modo de juego").',"No username at present":"De momento no hay nombre de usuario","Set username":"Escoge nombre de usuario","Installing as a web app":"Instalar como web app","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":'Esta página puede instalarse como web app en la mayorÃa de teléfonos o tablets, lo que te permitirÃa acceder desde tu pantalla de inicio y utilizarla sin conexión. Elige "Añadir a la pantalla de inicio" en tu navegador. ',"This page has more detailed instructions.":"Esta página ofrece instrucciones más detalladas.","Loading games in progress":"Cargando partidas en marcha","N
319o games available to join at the moment. Sorry!":"¡Disculpa! No hay partidas disponibles en este momento.","This will delete your game in progress. Do you really want to do this?":"Eso borrará la partida que tienes en marcha. ¿Realmente quieres hacerlo?","Which game do you want to join?":"¿A qué partida quieres unirte?","Which player are you?":"¿Qué jugador eres tú?","Ask permission to join":"Solicitar permiso para unirse","Awaiting response from game host...":"Esperando respuesta del anfitrión de la partida.","Permission denied. Try another game.":"Permiso denegado. Prueba con otra partida.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 ha solicitado unirse a la partida como $1 ($2). ¿Es correcto?","Are you sure you want to trigger the end of the game through Collapse?":"¿Seguro que quieres provocar el final de la partida mediante el Colapso?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":'Las bajas puntuaciones de esta partida son inauditas: $0 para los $1. ¿Seguro que quieres registrarlas? (Si era una partida de prueba o simplemente estabas probando la app, selecciona "Cancelar" para que no sea registrada ni compartida en la base de datos de la comunidad).',"Game left unfinished last time. Resume?":"La partida quedó inacabada la última vez. ¿Quieres seguir donde lo dejaste?","Power card{0,s}":"Carta{0,s} de poder","Select the side of the $0 power card you have been using":"Selecciona la cara de la carta de poder $0 que has utilizado.","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(Las caras están especialmente diseñadas según tu nivel de experiencia: A para jugadores experimentados, B para tus primeras partidas).","The $0 also have their separate $1.":"Los $0 también tienen carta{2,s} $1.","Any score from the $0 is tracked here too.":"Las puntuaciones de la{1,s} carta{1,s} de los $0 también se registran aquÃ.","Journey cards":'Cartas "Journey"',"in play":"en la zona de juego",garrisoned:"acuarteladas","in history":"en la historia","in deck/hand":"en el mazo o en tu mano","in exile (optional)":"en el exilio (opcional)","in exile":"en el exilio",flooded:"sumergidas","Use photo...":"Utilizar una foto...","Click on the icons to filter available cards by suit or civilisation.":"Haz clic en los iconos para filtrar las cartas según su clase o su civilización","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"No hay cartas que permitan acuartelar en tu zona de juego. Juega primero algunas regiones u otras cartas que te permitan hacerlo.","Card $0 garrisoned under card $1":"Carta $0 acuartelada bajo la carta $1","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":'Introduce el número de cartas en el exilio. Esto es opcional, salvo que estés usando una carta como "Monastery" (de los Utópicos), cuya puntuación dependerÃa de ello.',"Count from photo...":"Puntuar a través de una foto.","Add your own notes about strategy here.":"Apunta aquà notas sobre tu estrategia.","Game end trigger:":"Fin del juego provocado por:","King of Kings (last fame card)":"Rey de reyes (última carta de fama)","Main deck empty":"Mazo principal agotado","Player's final development":"El mazo de desarrollo de un jugador se ha agotado","Discovery of Graal":'Se ha jugado la carta "Graal" (Artúricos)',"Arrival of Harald Hardrada":'Se ha jugado la carta "Harald Hardrada" (Vikingos)',"Arrival at Shangri-La":'Se ha activado la carta "Shangri-La" con al menos 24 de Población (Utópìcos)',"Most crucial cards (in player's strategy)":"Cartas cruciales en la estrategia del jugador","Score all bot cards in a single pile. The bot does not score the power card":"Puntúa todas las cartas del bot en una única pila. El bot no obtiene puntos por su carta de poder.","but any score from the $0 card{1,s} will be included in the final score.":"pero las puntuaciones de la{1,s} carta{1,s} $0 se incluirán en el total.",Highscores:"Mayores puntuaciones","Click on a player to get a breakdown of their score. Sort by:":"Haz clic en un jugador para ver los detalles de su puntuación. Ordenar por:","Most recent first":"Más reciente","Highest score first":"Mayor puntuación","Highest average score first":"Mayor puntuación promedio","Greatest score difference first":"Mayor diferencia de puntuación","Winning civilisation":"Civilización ganadora","Single games only":"Solo partidas normales (no en campaña)","Campaigns only":"Solo partidas en campaña","All games":"Todos los modos de juego","Display single games only":"Muestra únicamente partidas normales (no en campaña)","Display campaigns only":"Muestra únicamente partidas en campaña","Display all games":"Muestra todas las partidas ",Stats:"EstadÃsticas",Statistics:"EstadÃsticas","Number of games played:":"Número de partidas jugadas:","Best score":"Mejor puntuación:","Worst score":"Peor puntuación:","Player-specific details:":"Detalles especÃficos del jugador:","Average score":"Puntuación media:","Import from another device":"Importar desde otro dispositivo","Import data from clipboard":"Importar datos desde el portapapeles","Copy data to clipboard":"Copiar datos en el portapapeles","Overall score":"Puntuación total",Classics:"Classics",Legends:"Legends","Classics only":"Solo Classics","Legends only":"Solo Legends","Classics and Legends":"Classics y Legends","Player $0":"Jugador $0",Civilisation:"Civilización",Bot:"Bot","Use Commons and Fame cards from":"Utilizar cartas Commons y Fame de...","Let me know on BGG (username hutchies) if you find any scoring errors!":"¡Si encuentras un error de puntuación, avÃsame en la BGG (nombre de usuario hutchies)!",player:"jugador",players:"jugadores","$0 player{0,s}":"$0 jugador{0,es}",Note:"Nota",Setup:"Preparación","Final results":"Resultados finales","Game results":"Resultados de la partida","Campaign update":"Actualización de la campaña",Collapse:"Colapso",Gameplay:"Partida en marcha","You can view statistics for just this device on ImperiumStats by clicking here.":"Puedes ver estadÃsticas en ImperiumStats haciendo clic aquà (solo se mostrarán las de este dispositivo).","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Puedes añadir un n
319ombre de usuario (p. ej.: tu usuario en la BGG) para asociarlo a este dispositivo. Si quieres ver los resultados de diferentes dispositivos, agrúpalos en ImperiumStats. ","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":'Además, esto permite que los jugadores encuentren fácilmente sus puntuaciones (utilizando "Unirse a una partida en marcha" en el menú "Modo de juego").',Scoring:"Puntuación","cards in":"cartas en","Cards in":"Cartas en",Cancel:"Cancelar",tokens:"fichas",cards:"cartas","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Introduce un nombre de usuario (público) para asociarlo a este dispositivo (o déjalo en blanco para borrarlo).","ImperiumStats website":"ImperiumStats",Change:"Cambiar","Unable to access online scores database: ":"No se puede conectar con la base de datos de las puntuaciones",Edit:"Modificar",optional:"opcional","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"No se puede copiar en el portapapeles: $0. Puedes anotar manualmente los datos mostrados en el recuadro de texto inferior.","Really delete all record of previous scores?":"¿De verdad quieres borrar todas las puntuaciones registradas hasta ahora?","Scores deleted":"Puntuaciones borradas","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"No se puede leer desde el portapapeles (¿quizá tiene el acceso denegado?). Asegúrate de que has llegado a esta página mediante https y no http. Puedes pegar manualmente el portapapeles abajo para importarlo.","Problem parsing data: $0":"Problema de análisis de datos: $0","Saved scores":"Puntuaciones registradas","Click on a game to get a breakdown of the score.":"Haz clic en una partida para ver los detalles de su puntuación","card{0,s}":"carta{0,s}",VP:"PV","Click here to visit ImperiumStats":"Haz clic aquà para ir a ImperiumStats","Upload score":"Subir puntuación","Score saved":"Puntuación registrada",as:"como","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 victoria{0,s}, $1 derrota{1,s}, $2 empate{2,s}","won $0, lost $1, drew $2":"ganó $0 veces, perdió $1 veces, empató $2 veces","point{0,s}":"punto{0,s} de victoria",scored:"puntuó","Game $0 of $1 in":"Partida $0 de $1 en","completed campaign":"campaña acabada","ongoing campaign":"campaña en marcha","Bot level":"Nivel del bot","View on stats site":"Ver en ImperiumStats","Edit game":"Editar partida","Delete game":"Eliminar partida","You have successfully defeated the":"Has derrotado exitosamente a los","You have won $0 game{0,s} so far.":"Has ganado $0 partida{0,s} hasta ahora.","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":'Como te has enfrentado a un bot de nivel "Supreme Ruler", debes eliminar 1 carta de Disturbios del mazo Commons durante el resto de la campaña.',"In your next game, the bot will be at $0 level.":'El bot tendrá el nivel "$0" en tu próxima partida.',"Please choose":"Por favor, elige","Add one of your Commons cards to your starting deck":'Añade una de tus cartas de "Commons" a tu mazo inicial',"Remove one of your starting cards from the game":"Elimina una de tus cartas iniciales de la partida","Name of card":"Nombre de la carta",grande:"grande","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"¡Has derrotado exitosamente a 5 civilizaciones diferentes y completado la campaña$0! ¡Enhorabuena!","You were unable to defeat the $0.":"No has podido derrotar a los $0.","You were defeated by the $0.":"Has sido derrotado por los $0.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"Has sido derrotado 4 veces y por tanto has perdido la campaña$0. ¡Más suerte la próxima vez!","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"Has sufrido $0 derrota{0,s} hasta ahora. Recuerda que con 4 derrotas, pierdes la campaña.","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":'Como te has enfrentado a un bot de nivel "Supreme Ruler", debes devolver 1 carta de Disturbios eliminada al mazo Commons para el resto de la campaña. (Puede ser una carta indicada para 3+ o 4 jugadores, si hay disponibles).',"Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"En tu próxima partida te enfrentarás a un bot de nivel $0, nuevamente, pero al comienzo tendrás el doble de fic
319has de materiales, población y progreso de las habituales.","Awaiting final scores":"Esperando la puntuación final.","Save progress":"Guardando","Complete campaign":"Terminar la campaña","Log cards":"Registra tus cartas",Tokens:"Fichas",Notes:"Notas","by player":"por jugador","Cards in exile":"Cartas en el exilio",Display:"Desplegar","Edit scores":"Modificar puntuaciones","Export a CSV file for analysis":"Exportar un archivo CSV para realizar análisis","Export data in CSV format":"Exportar datos en formato CSV","Include full scores breakdown in CSV?":"¿Incluir los detalles de la puntuación en el CSV?","Delete all scores":"Borrar todas las puntuaciones",Victory:"Victoria",Draw:"Empate",Defeat:"Derrota",Add:"Añadir",Remove:"Eliminar","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"Eliminar 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> de las cartas comunes.","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"Comenzar la nueva partida con 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height:","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"Devuelve 1 carta <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> eliminada a las cartas comunes, si es posible.",Campaign:"Campaña","Grand campaign":"Gran campaña",Win:"Victoria",Loss:"Derrota",ongoing:"en marcha",completed:"terminada","ended in victory":"ganó","ended in defeat":"perdió","Completed on":"Terminada en","Next game at $0 level":"Próxima partida a nivel $0",Cards:"Cartas","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"¡No olvides eliminar hasta 2 cartas de Disturbios de tu puntuación! (La app no lo hará por ti.)","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":'El bot terminó la partida sin fichas, lo que es bastante raro. ¿Seguro que quieres registrar la partida? (Si estabas probando la app o realizando una partida de prueba, aprieta "Cancelar" y no se registrará.)',"Scores copied to clipboard":"Puntuaciones copiadas en el portapapeles","Unable to load games in progress:":"No se puede cargar partidas en marcha:","$0 game{0,s} available to join at the moment.":"Hay $0 partida{0,s} disponible{0,s} para unirse, en este momento.","Which do you want to join?":"¿A cuál te quieres unir?","A player":"Un jugador","Game in progress. Really quit?":"Partida en marcha. ¿De verdad quieres salir?","Processing image...":"Procesando la imagen...","No cards found: was the image in the right orientation?":"No se han detectado cartas. ¿La imagen tenÃa la orientación adecuada?","$0 cards counted in exile.":"Se han contado $0 carta{0,s} en el exilio","$0 cards automatically garrisoned":"$0 carta{0,s} acuartelada{0,s}.","$0 cards automatically put in history":"$0 carta{0,s} en tu historia.","$0 cards automatically flooded":"$0 carta{0,s} sumergida{0,s}.","$0 cards added to deck/hand/discard":"$0 carta{0,s} en tu mazo/mano/descartes.","$0 cards identified. $1 cards added to $2$3.":"$0 cartas identificadas. $1 cartas añadidas a $2$3.","Solo grand campaign":"Gran campaña en solitario","played $0, won $1, lost $2, drew $3":"$0 jugada{0,s}, $1 ganada{0,s}, $2 perdida{0,s}, $3 empatada{0,s}.","Start new campaign":"Comenzar una nueva campaña","Player name":"Nombre del jugador","Campaign log to date":"Registro de la campaña hasta ahora","Grand campaign log to date":"Registro de la gran campaña hasta ahora","Enemy civilisation for game $0":"Civilización enemiga para la partida $0","Difficulty level":"Nivel de dificultad",default:"por defecto","OCR doesn't work offline...":"El OCR no funciona sin conexión...","Choose an end-game trigger":"¿Qué desencadenó el final de la partida?","$0 game{0,s} played":"$0 partida{0,s} jugada{0,s}",side:"cara",on:"sobre","token{0,s}":"ficha{0,s}"},cs:{Persians:"PerÅ¡ané","City of Persepolis":"MÄsto Persepolis","Battering Ram":"Beranidlo",Development:"Výstavba",Windmills:"VÄtrné mlýny",Satrap:"Satrapa","Persian Gold":"Perské zlato",Babylonians:"BabyloÅané","Darius I":"Dareios I.","Median Empire":"Medská ÅÃÅ¡e","Nisaean Plain":"Nisánská pláÅ",Arachosia:"Arachózie",Unrest:"Nepokoje",Glory:"Sláva",Prosperity:"Blahobyt",Advance:"Pokrok",Conquer:"DobývánÃ",Lydians:"Lýdové",Zagros:"Zagros",Bactria:"Baktrie","Standing Army":"Stálá armáda","Jade Mask":"Nefritová maska",Elders:"StaÅeÅ¡inové",Town:"Osada",Shrine:"SvatynÄ",Invasion:"Invaze",Mysticism:"Mysticismus",Oracle:"Orákulum",Agriculture:"ZemÄdÄlstvÃ",Boats:"LodÄ",Leadership:"VelenÃ",Shaduf:"Shaduf","Lost Scroll":"Ztracený svitek","Rituals & Ceremonies":"Rituály a obÅady",Ambassador:"Velvyslanec",City:"MÄsto",Gambling:"Hazard",Port:"PÅÃstav",Diplomacy:"Diplomacie",Wilderness:"DivoÄina",Jungle:"Prales",Mountain:"PohoÅÃ",Coast:"PobÅežÃ",Floodplain:"ÅÃÄnà niva",Forest:"Les",Oasis:"Oáza",Hills:"Kopce",Marsh:"MokÅady",Steppe:"Step",River:"Åeka",Cape:"Mys",Woodland:"Hvozd","Sacred Pass":"Posvátný průsmyk",Armenians:"Arménci",Assyrians:"AsyÅané",Egyptians:"EgypÅ¥ané",Ionians:"Iónové",Qin:"Ächinové",Olmecs:"Olmekové",Sumerians:"Sumerové",Aksumites:"Aksumité",Minoans:"MÃnojci",Mauryans:"Maurjové",Hittites:"Chetité","Drama & Poetry":"Drama a poezie",Education:"VzdÄlávánÃ",Moneylenders:"LichváÅi",Corruption:"Korupce",Onager:"Onager",Temple:"Chrám",Cataphract:"Katafrakt",Metropolis:"Metropole",Pharmacy:"LékárnictvÃ",Wonder:"Div svÄta",Coinage:"MincovnictvÃ",Exports:"Vývoz","Urban Development":"Urbanizace",Mercenaries:"Žoldáci",Mining:"TÄžba",Espionage:"ZvÄdové",Monument:"Monument","Code of Laws":"ZákonÃk",Religion:"NáboženstvÃ",Domestication:"Domestikace","Water Mill":"Vodnà mlýn",Qanat:"Kanát","Road Building":"Stavba silnic",Art:"UmÄnÃ","Fortunate Isle":"Blažený ostrov",Rainforest:"DeÅ¡tný prales","Mountainâ":"PohoÅÃ",Peninsula:"Poloostrov",Lakes:"Jezera",Highlands:"Vrchovina","Sacred Grove":"Posvátný háj",Lowlands:"NÞina",Moor:"VÅesoviÅ¡tÄ",Plain:"PláÅ",Archipelago:"SouostrovÃ","Fortified Region":"OpevnÄné územÃ",Grassland:"LuÄina",Island:"Ostrov",Etruscans:"Etruskové",Scythians:"Skytové",Vikings:"Vikingové",Phoenicians:"FéniÄané",Romans:"ÅÃmané",Greeks:"Åekové",Carthaginians:"Kartaginci",Celts:"Keltové",Macedonians:"MakedoÅané",Xiongnu:"Siungnuové",Astronomy:"Astronomie",Cartography:"Kartografie",Masonry:"KamenictvÃ","Civil Service":"VeÅejná správa",Amphitheatre:"Amfiteátr","King of Kings":"Král králů",Praiseworthy:"Chvályhodný",Great:"Veliký",Notorious:"NechvalnÄ proslulý",Marvellous:"Þasný",Glorious:"Slavný",Triumphant:"VÃtÄzný","Awe-inspiring":"Obdivuhodný",Imperial:"CÃsaÅský",Independent:"Nezávislý",Magnificent:"Velk
319olepý",Outstanding:"VýjimeÄný",Proud:"PyÅ¡ný",Eminent:"VzneÅ¡ený",Acclaimed:"Uznávaný","City of Carthage":"MÄsto Kartágo",Elephants:"Sloni",Hegemony:"Nadvláda",Hannibal:"Hannibal","Trading Ships":"Obchodnà lodÄ",Monopoly:"Monopol",Caravans:"Karavany",Iberia:"Ibérie",Berbers:"BerbeÅi","Dido, Queen of Carthage":"DÃdó, královna Kartága","Carthaginian Traders":"KartaginÅ¡tà obchodnÃci","Balearic Islands":"Baleáry",Mauretania:"Mauretánie","Celtic Gold":"Keltské zlato","Celtic Innovation":"Keltské vynálezy",Chainmail:"Kroužková zbroj",Chariots:"VáleÄné vozy","Ogham Script":"Ogamské pÃsmo",Vercingetorix:"Vercingetorix",Armorica:"Armorika",Belgica:"Belgika",Britannia:"Britannia",Hibernia:"Hibernia",Druids:"Druidové",Boudicca:"Boudicca","Cattle Raid":"Krádež dobytka","Cauldron of Ceridwen":"Cerridwenin kotel",Celtica:"Celtica","Olympic Games":"Olympijské hry",Philosophy:"Filozofie",Lighthouse:"Maják","Direct Democracy":"PÅÃmá demokracie","Greek Innovation":"Åecké vynálezy",Science:"VÄda","City of Corinth":"MÄsto Korint",Pericles:"Periklés","Greek Prosperity":"Åecký blahobyt","City of Athens":"MÄsto Athény","Plains of Thessaly":"PlánÄ Thesálie",Settlers:"OsadnÃci","Greek Mercenaries":"ÅeÄtà žoldáci","City of Sparta":"MÄsto Sparta","Forest of Pholoe":"Folójský les",Peleponnese:"Peloponés",Alexander:"Alexandr","Alexander the Great":"Alexandr Veliký",Parmenion:"Parmenion","Alexandria in Ariana":"Alexandrie v ArianÄ","Alexandria in Egypt":"Alexandrie v EgyptÄ",Mosaics:"Mozaiky","Companion Cavalry":"Doprovodná jÃzda",Uxians:"Uxiové","Philip II":"Filip II.",Phalanx:"Falanga",Pelagonia:"Pelagonie","Haliacmon Valley":"Ãdolà Aliákmonu",Orestis:"Orestis","Julius Caesar":"Julius Caesar","Military Engineering":"Vojenské inženýrstvÃ","Roman Invasion":"Vpád ÅÃmanů",Legions:"Legie","The Senate":"Senát","Rome, the Eternal City":"ÅÃm, vÄÄné mÄsto","Emperor Trajan":"CÃsaÅ Traján","Bread and Circuses":"Chléb a hry","Gallia Aquitania":"Gallia Aquitania",Raetia:"Raetia",Triumvirate:"Triumvirát","City of Rome":"MÄsto ÅÃm",Dalmatia:"Dalmácie","Roman Expansion":"ÅÃmská rozpÃnavost",Jewellery:"Å perky",Ateas:"Ateas",Kurgans:"Kurgany","City of Gelonus":"MÄsto Gelonus",Raiders:"NájezdnÃci",Tamga:"Tamga","Pontic Steppe":"Pontská step","Tarim Basin":"Tarimská pánev",Caucasia:"Kavkaz",Nomads:"Nomádi",Tents:"Stany","Mounted Archers":"JÃzdnà luÄiÅ¡tnÃci","Carpathian Mountains":"Karpaty","Tian Shan":"Ťan-Å¡an","Harald Hardrada":"Harald Hardrada","Go A'Viking":"BuÄ Vikingem",Combs:"HÅebeny","Rollo the Walker":"Rollo",Skis:"Lyže",Longships:"Langskipy",Sagas:"Ságy","City of Dubh Linn":"MÄsto Dubh Linn",Graenland:"Grónsko","Føroyar":"Faerské ostrovy",Iceland:"Island",Vinland:"Vinland",Jomsviking:"Jómský viking",Gothja:"Gothja",Althing:"Althing",Scandinavia:"Skandinávie","Erik the Red":"Erik Rudý",Arthurians:"ArtuÅ¡ovci","King Arthur's Court":"Dvůr krále ArtuÅ¡e","Gwaith Camlan":"Gwaith Camlan",Graal:"Grál","Lawnslot y Llyn (Sir Lancelot)":"Lawnslot Y Llyn (Sir Lancelot)","Twrch Trwyth":"Twech Trwyth","Taliesin the Bard":"Bard Taliesin",Excalibur:"Excalibur","Bedwyr (Sir Bedevire)":"Bedwyr (Sir Bedevire)","Viviane of the Lake":"Vivian z jezera","City of Camelot":"MÄsto Kamelot","Britannia Flavia":"Britannia Flavia","Ynys Afallach (Avalon)":"Ynys Afallach (Avalon)","Gwalchmei (Sir Gawain)":"Gwalchmei (Sir Gawain)","Lady Bertilak":"Lady Bertilak",Morigena:"Morigena","Peredur (Sir Percival)":"Peredur (Sir Percival)","Cai (Sir Kay)":"Cai (Sir Kay)","King Arthur":"Král ArtuÅ¡","Uthyr Pendragon":"Uther Pendragon","Britannia Prima":"Britannia Prima","Britannia Secunda":"Britannia Secunda","Myrddin Wyllt (Merlin)":"Myrddin Wyllt (Merlin)",Guennuvar:"Guennuvar",Cafall:"Cafall",Atlanteans:"AtlanÅ¥ané","Advanced Culture":"VyspÄlá kultura","Palace of Poseidon":"Poseidonův palác","Spread of Atlantis":"RozÅ¡iÅovánà Atlantidy","Moats and Walls":"Hradby a vodnà pÅÃkopy","Myths and Legends":"Mýty a legendy","Vast Wealth":"NesmÃrné bohatstvÃ",Kleito:"Kleitó","Mountain of Atlantis":"Hora Atlantidy",Themiscyra:"Themiskyra",Flood:"Potopa",Thule:"Thúlé",Hesperides:"Zahrada Hesperidek","Elysian Fields":"Elysium","Atlantean Fleet":"Atlantská flotila",Unification:"SjednocenÃ",Embalming:"BalzamovánÃ",Obelisk:"Obelisk","Ramesses II":"Ramesse II.","Egyptian Expansion":"Egyptská rozpÃnavost",Medicine:"LékaÅstvÃ",Pyramids:"Pyramidy","Egyptian Legacy":"Odkaz Egypta",Kushites:"KuÅ¡ité","Red Land":"Rudá zemÄ","Flood of the Nile":"Nilské záplavy","Egyptian Incursion":"Egyptské nájezdy","Egyptian Hieroglyphics":"Egyptské hieroglyfy","Nile Valley":"Ãdolà Nilu","Lower Nile":"Dolnà Egypt",Mathematics:"Matematika","Grand Trunk Road":"Velká hlav
319nà silnice",Ashoka:"Ašóka",Buddhism:"Buddhismus","Edicts of Ashoka":"Ašókovy edikty","Punch-Marked Coins":"Puncované mince",Arthashastra:"Arthašástra","Nanda Dynasty":"Dynastie Nandovců","City of Pataliputra":"MÄsto Patáliputra","Indian Elephants":"IndiÄtà sloni",Gandhara:"Gandhára",Chandragupta:"Äandragupta",Chanakya:"Äánakja",Magadha:"Magadha","Indus Valley":"Ãdolà Indu","King Minos":"Král MÃnós","Minoan Traders":"MÃnojÅ¡tà obchodnÃci","Drainage System":"Kanalizace",Architecture:"Architektura",Frescos:"Fresky",Labyrinth:"Labyrint","Minoan Expansion":"MÃnojská rozpÃnavost","Seal Stones":"PeÄetnà kameny","Writing Systems":"PÃsmo",Knossos:"Knóssos",Pottery:"Keramika",Thera:"Théra",Crete:"Kréta",Cyprus:"Kypr","San Lorenzo Tenochtitlán":"San Lorenzo Tenochtitlán","Step Pyramids":"Schodovité pyramidy","Ritual Sacrifice":"Rituálnà obÄÅ¥","Olmec Traders":"OlméÄtà obchodnÃci","Tres Zapotes":"Tres Zapotes","Stone Heads":"Kamenné hlavy",Cacao:"Kakao","Olmec Hieroglyphics":"Olmécké hieroglyfy",Calendar:"KalendáÅ","Stone Mask":"Kamenná maska","Loadstone Compass":"Kompas z magnetitu","Ball Games":"MÃÄové hry","Laguna de los Cerros":"Laguna de los Cerros","La Venta":"La Venta","Long Walls I":"Velká zeÄ I","Long Walls II":"Velká zeÄ II","Long Walls III":"Velká zeÄ III","Long Walls IV":"Velká zeÄ IV","Emperor Qin Shi Huang":"CÃsaÅ Ächin Å '-Chuang-Ti","King Wu of Qin":"Král Wu z dynastie Ächin",Metallurgy:"Metalurgie","Terracotta Warriors":"Terakotová armáda","Eastern Zhou":"Východnà Äou","Mandate of Heaven":"Mandát Nebes","Duke Zhuang of Qin":"Vévoda Äuang z dynastie Ächin","School of Diplomacy":"Å kola diplomacie",Confucianism:"Konfucianismus",Legalism:"Legismus","Western Zhou":"Západnà Äou",Utopians:"Utopisté","Visions of Shangri-La":"Vize o Å angri-la","Path to Shangri-La":"Stezka do Å angri-la","Gates of Shangri-La":"Brány Å angri-la","Shangri-La":"Å angri-la",Monastery:"Klášter",Portals:"Portály",Daochang:"Daochang","Lost Tomes":"Ztracené svazky","Tree of Knowledge":"Strom poznánÃ",Charity:"Charita",Meditation:"Meditace","Mountain Retreat":"Horské útoÄiÅ¡tÄ","Sacred Scroll":"Posvátný svitek",Back:"ZpÄt",Next:"DalÅ¡Ã","Conditional cards":"Karty s podmÃnÄnou bodovou hodnotou","Multiplier cards":"Karty s variabilnÃm bodovou hodnotou","Numeric cards":"Karty s fixnà bodovou hodnotou","Unrest cards":"Karty nepokoje","These score differently depending on certain conditions.":"Toto bodovánà se lišà v závislosti na různých podmÃnkách.","Include the civilisation's power card. No individual card may score more than 10 points.":"VÄetnÄ karty mocnosti národa. Za každou kartu lze zÃskat maximálnÄ 10 bodů.","Score the number on the card.":"Za každou kartu zÃskáš uvedený poÄet bodů.","Progress tokens":"Žeton rozvoje","Population tokens":"Žeton populace","Material tokens":"Žeton materiálu","Each progress token scores 1 point.":"Každý žeton rozvoje pÅinášà jeden vÃtÄzný bod.","Not scored directly, but may be referred to by other cards.":"Nejsou obodovány pÅÃmo, ale může na nÄ být odkazováno jinými kartami.","Resource tokens":"Žetony materiálů","Each Unrest card scores -2 points.":"Každá karta nepokoje je za -2 body.","The bot always scores the higher value for these cards.":"Bot za tyto karty zÃská maximálnà možné množstvà bodů.","The bot scores 5 points for each of these cards. Do not include the power card.":"Bot zÃská za tyto karty 5 bodů. Neboduj kartu mocnosti.","The bot scores 1 point for every 10 Resource and Population tokens combined.":"Bot zÃská 1 bod za každých 10 žetonů materiálů a populace, v libovolné kombinaci.","The bot scores 1 point for every 5 Resource and Population tokens combined.":"Bot zÃská 1 bod za každých 5 žetonů materiálů a populace, v libovolné kombinaci.","Save score":"Uložit skóre","New game":"Nová hra","WINNER!":"VÃTÄZ!","DRAW!":"REMÃZA!",Close:"ZavÅÃt","Game mode":"Mód hry","Single game":"Jednotlivá hra","Solo campaign":"Sólo kampaÅ","Join game in progress":"PÅipojit se k probÃhajÃcà hÅe","Enemy civilisation":"NepÅátelská civilizace","Bo
319xes available":"Dostupné krabice","Number of players":"PoÄet hráÄů",Random:"Náhodný","Surprise me!":"PÅekvap mÄ!",Level:"ÃroveÅ obtÞnosti",Chieftain:"NáÄelnÃk",Warlord:"KnÞe",Imperator:"Vévoda",Sovereign:"Král",Overlord:"Imperátor","Supreme Ruler":"Hegemon","This bot has a hand size of 4 (place an exhaust token on slot 5).":"Bot použije 4 pozice na karty (na pátou pozici umÃsti žeton vyÄerpánÃ).","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"Na konci botova tahu, poté co doplnÃÅ¡ prázdné pozice, odhoÄ vrchnà kartu jeho dobÃracÃho balÃÄku do jeho odhazovacÃho balÃÄku.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"Bot zaÄÃná hru se stejným poÄtem žetonů rozvoje, populace a materiálu jako lidský hráÄ{0,s} a zÃská vÃtÄzný bod za každých 5 žetonů populace a materiálů, v libovolné kombinaci.","This bot has a hand size of 6 (add slot marker 6).":"Tento bot použÃvá Å¡est pozic pro karty (pÅidej žeton pozice 6).","Whenever the bot returns an Unrest card it gains 1 progress.":"Kdykoliv bot vrátà kartu nepokoje, zÃská 1 bod Rozvoje.","Scoring method":"Metoda bodovánÃ","Full scoring (enter your cards and the app automatically scores them)":"Kompletnà bodovánà (zadej karty a aplikace je automaticky oboduje)","Basic scoring (enter score of scoring cards yourself)":"Základnà bodovánà (zadej skóre karet ruÄnÄ)","Automatically save score after each game?":"Automaticky uložit skóre po každé hÅe?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"PÅidat tvé skóre do online databáze spoleÄných statistik? (VÅ¡echny identifikaÄnà údaje budou odebrány)","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":'Pokud chceÅ¡ vidÄt své výsledky z různých zaÅÃzenà sjednocené na ImperiumStats, můžeÅ¡ pÅidat své uživatelské jméno (napÅ. tvé uživatelské jméno na BGG) a tÃm ho pÅidružit k tomuto zaÅÃzenÃ. To také dovolà ostatnÃm hráÄům snáze najÃt hru pro spoleÄné bodovánà (použitÃm "pÅipojit k probÃhajÃcà hÅe" v "hernÃm módu" v menu).',"No username at present":"Nenà užito uživatelské jméno","Set username":"Nastavit uživatelské jméno","Installing as a web app":"Instalovat jako webovou aplikaci","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":'Tato stránka může být nainstalována jako webová aplikace na vÄtÅ¡inÄ telefonů nebo tabletů, což ti dovolà spouÅ¡tÄt jà z domovské obrazovky a nebo offline. Obvykle to můžeÅ¡ udÄlat vybránÃm "PÅidat na domovskou obrazovku" ve svém prohlÞeÄi.',"This page has more detailed instructions.":"Tato stránka má detailnÄjšà instrukce.","Loading games in progress":"Nahrávám probÃhajÃcà hry","No games available to join at the moment. Sorry!":"V souÄasné dobÄ neprobÃhajà žádné hry. PromiÅ!","This will delete your game in progress. Do you really want to do this?":"Toto vymaže probÃhajÃcà hru. Opravdu to chceÅ¡ udÄlat?","Which game do you want to join?":"K jaké hÅe se chceÅ¡ pÅipojit?","Which player are you?":"Který hrÃ¡Ä jsi ty?","Ask permission to join":"Požádat o povolenà k pÅipojenÃ.","Awaiting response from game host...":"Äekám na odpovÄÄ od hostitele hry...","Permission denied. Try another game.":"Povolenà zamÃtnuto. Zkus jinou hru.","$0 has asked to join the game as $1 ($2). Is this ok?":"$ se chce pÅipojit ke hÅe jako $1 ($2). Je to v poÅádku?","Are you sure you want to trigger the end of the game through Collapse?":"JseÅ¡ si jistý, že chceÅ¡ spustit konec hry Kolapsem?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":'Tato hra má pÅekvapivÄ nÃzké závÄreÄné bodovánà $0 za $1. JseÅ¡ si jistý, že ji chceÅ¡ uložit? (Pokud to byla testovacà hra nebo jen zkouÅ¡ÃÅ¡ aplikaci zvol "ZruÅ¡it" a hra nebude uložena ani nahrána do spoleÄné databáze).',"Game left unfinished last time. Resume?":"Poslednà hra nebyla dohrána. Obnovit?","Power card{0,s}":"Karta mocnosti{0,s}","Select the side of the $0 power card you have been using":"Vyber stranu karty mocnosti národa $0, kterou jsi použil","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(Strana A je urÄená pro zkuÅ¡enÄjšà hráÄe, strana B
319je pro nÄkolik prvnÃch her s danou civilizacÃ.)","The $0 also have their separate $1.":"$0 majà také svoji kartu $1 {2}.","Any score from the $0 is tracked here too.":"Jakékoliv body z karty $0{1} jsou zde také zohlednÄny.","Journey cards":"Putovánà karty","in play":"ve hÅe",garrisoned:"v posádce","in history":"v historii","in deck/hand":"v dobÃracÃm balÃÄku/v ruce","in exile (optional)":"vyhoÅ¡tÄné (dobrovolné)","in exile":"vyhoÅ¡tÄné",flooded:"potopené","Use photo...":"PoužÃt fotku...","Click on the icons to filter available cards by suit or civilisation.":"KliknÄte na ikonu k filtrovánà karet dle symbolu Äi civilizace.","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"Ve hÅe nejsou karty schopné vytvoÅit posádku. Nejprve vložte nÄjaké územà Äi karty schopné vytvoÅit posádku.","Card $0 garrisoned under card $1":"Karta $0 v posádce v $1","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"Zadej poÄet vyhoÅ¡tÄných karet. Je to dobrovolné, pokud nehrajeÅ¡ kartu jako Utopistický Klášter, který na základÄ tohoto poÄtu boduje.","Count from photo...":"SpoÄÃtat z fotky...","Add your own notes about strategy here.":"Zde pÅidejte vlastnà poznámky o strategii.","Game end trigger:":"SpouÅ¡tÄÄ konce hry:","King of Kings (last fame card)":"Král králů (poslednà karta vÄhlasu).","Main deck empty":"Prázdný hlavnà balÃÄek.","Player's final development":"HrÃ¡Ä vybudoval poslednà kartu z balÃÄku budovánÃ.","Discovery of Graal":"Objev Grálu.","Arrival of Harald Hardrada":"PÅÃchod Haralda Hardrady.","Arrival at Shangri-La":"PÅÃchod do Å angri-la.","Most crucial cards (in player's strategy)":"NejzásadnÄjšà karty (v hráÄovÄ strategii)","Score all bot cards in a single pile. The bot does not score the power card":"Oboduj vÅ¡echny botovi karty v jednom balÃÄku. Bot neboduje kartu mocnosti","but any score from the $0 card{1,s} will be included in the final score.":"ale jakékoliv body z $0 karty{1,s} budou zahrnuty ve finálnÃm bodovánÃ.",Highscores:"Nejvyššà skóre","Click on a player to get a breakdown of their score. Sort by:":"Klikni na hráÄe k zobrazenà detailů jeho bodovánÃ. SeÅadit:","Most recent first":"Od nejposlednÄjÅ¡Ã","Highest score first":"Od nejvyššÃho skóre","Highest average score first":"Od nejvyššÃho průmÄrného skóre","Greatest score difference first":"Od nejvÄtÅ¡Ãho rozdÃlu bodů","Winning civilisation":"VÃtÄzná civilizace","Single games only":"Pouze jednotlivé hry","Campaigns only":"Pouze kampanÄ","All games":"VÅ¡echny hry","Display single games only":"Zobraz pouze jednotlivé hry","Display campaigns only":"Zobraz pouze kampanÄ","Display all games":"Zobraz vÅ¡echny hry",Stats:"Statistiky",Statistics:"Statistiky","Number of games played:":"PoÄet odehraných her:","Best score":"Nejlepšà skóre","Worst score":"Nejhoršà skóre","Player-specific details:":"Specifické údaje o hráÄi:","Average score":"PrůmÄrné skóre","Import from another device":"Importuj z jiného zaÅÃzenÃ","Import data from clipboard":"Importuj data ze schránky","Copy data to clipboard":"KopÃruj data do schránky","Overall score":"Celkové skóre",Classics:"DÄjiny",Legends:"Legendy","Classics only":"Pouze DÄjiny","Legends only":"Pouze Legendy","Classics and Legends":"DÄjiny a Legendy","Player $0":"HrÃ¡Ä $0",Civilisation:"Civilizace",Bot:"Bot","Use Commons and Fame cards from":"PoužÃt spoleÄné karty a karty vÄhlasu z","Let me know on BGG (username hutchies) if you find any scoring errors!":"Dej mi vÄdÄt na BGG (uživatelské jméno hutchies) pokud najdeÅ¡ nÄjakou bodovacà chybu!",player:"hráÄ",players:"hráÄi","$0 player{0,s}":"$0 hráÄ{0,s}",Note:"Poznámka",Setup:"NastavenÃ","Final results":"Finálnà výsledky","Game results":"Výsledky hry","Campaign update":"Aktualizace kampanÄ",Collapse:"Kolaps",Gameplay:"PrůbÄh hry","You can view statistics for just this device on ImperiumStats by clicking here.":"Zde můžeÅ¡ vidÄt statistiky na ImperiumStats jen ze svého zaÅÃzenÃ.","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Pokud chceÅ¡ vidÄt své výsledky z různých zaÅÃzenà sjednocené na ImperiumStats, můžeÅ¡ pÅidat své uživatelské jméno (napÅ. tvé uživatelské jméno na BGG) a tÃm ho pÅidružit k tomuto zaÅÃzenÃ.","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":'To dovolà ostatnÃm hráÄům snáze najÃt hru pro spoleÄné bodovánà (použitÃm "pÅipojit k probÃhajÃcà hÅe" v "hernÃm módu" v menu).',Scoring:"BodovánÃ","cards in":"karty v","Cards in":"Karty v",Cancel:"ZruÅ¡it",tokens:"žetony",cards:"karty","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Zadej veÅejné uživatelské jméno ke spojenà s tÃmto zaÅÃzenÃm (nebo zanech k prázdné ke smazánÃ)","ImperiumStats website":"stránka ImperiumStats",Change:"ZmÄÅ","Unable to access online scores database: ":"Nelze zÃskat pÅÃstup k online bodovacà databázi:",Edit:"Editovat",optional:"volitelný","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"Nenà možno zkopÃrovat do schránky: $0. MůžeÅ¡ zkopÃrovat data ruÄnÄ z následujÃcÃho textového pole.","Really delete all record of previous scores?":"Opravdu chceÅ¡ smazat vÅ¡echny záznamy pÅedeÅ¡lých bodovánÃ?","Scores deleted":"Bodovánà vymazána","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"Nelze naÄÃst ze schránky (možná bylo zamÃtnuto oprávnÄnÃ?). Ujisti se, že na tuto stránku pÅistupujeÅ¡ skrze https a ne http. Data můžeÅ¡ okopÃrovat ruÄnÄ z odkazu nÞe.","Problem parsing data: $0":"Problém s parsovánÃm dat: $0","Saved scores":"Uložená bodovánÃ","Click on a game to get a breakdown of the score.":"Klikni na hru k zobrazenà detailů bodovánÃ.","card{0,s}":"{{0,karta,2=karty,5=karet}}",VP:"VB","Click here to visit ImperiumStats":"Klikni zde k návÅ¡tÄvÄ ImperiumStats","Upload score":"Nahrát skóre","Score saved":"Skóre uloženo",as:"jako","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 výher{0,s}, $1 proher{1,es}, $2 remÃz{2,s}","won $0, lost $1, drew $2":"vyhrál $0, prohrál $1, remizoval $2","point{0,s}":"bod{0,s}",scored:"bodoval","Game $0 of $1 in":"hra $0 z $1 v","completed campaign":"ukonÄená kampaÅ","ongoing campaign":"probÃhajÃcà kampaÅ","Bot level":"ObtÞnost bota","Vie
319w on stats site":"Prohlédnout na ImperiumStats","Edit game":"Editovat hru","Delete game":"Vymazat hru","You have successfully defeated the":"ÃspÄÅ¡nÄ jsi porazil","You have won $0 game{0,s} so far.":"ZatÃm jsem vyhrál $0 her{0,s}","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":"Jelikož hrajeÅ¡ proti Hegemonovi, musÃÅ¡ nynà odstranit 1 kartu nepokoje ze spoleÄného balÃÄku po zbytek kampanÄ.","In your next game, the bot will be at $0 level.":"Ve tvé pÅÃÅ¡tà hÅe bude bot na obtÞnosti $0.","Please choose":"ProsÃm vyber","Add one of your Commons cards to your starting deck":"PÅidej jednu ze spoleÄných karet do svého dobÃracÃho balÃÄku","Remove one of your starting cards from the game":"OdstraÅ jednu ze svých poÄáteÄnÃch karet ze hry","Name of card":"Název karty",grande:"Velká","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"ÃspÄÅ¡nÄ jsi porazil 5 různých civilizacà a dokonÄil $0 kampaÅ! Gratuluji!","You were unable to defeat the $0.":"Nedokázal jsi porazit $0.","You were defeated by the $0.":"Byl jsi poražen $0.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"Byl jsi 4krát poražen a tvá $0kampaÅ skonÄila prohrou. Snad budeÅ¡ mÃt pÅÃÅ¡tÄ vÃce Å¡tÄstÃ!","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"Byl jsi zatÃm poražen $0krát z {0,s} (z možných 4 her než prohrajeÅ¡ kampaÅ).","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":"Jelikož hrajeÅ¡ proti Hegemonovi, musÃÅ¡ nynà vrátit 1 odstranÄnou kartu nepokoje do spoleÄného balÃÄku po zbytek kampanÄ. (může se jednat o kartu pro 3+ nebo 4 hráÄe, odstranÄnou bÄhem pÅÃpravy hry).","Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"Tvá pÅÃÅ¡tà hra bude opÄt proti botovi úrovnÄ $0, ale zaÄneÅ¡ hru s dvojnásobkem bÄžných startovnÃch žetonů materiálu, populace a rozvoje.","Awaiting final scores":"Äekám na finálnà bodovánÃ","Save progress":"Uložit pokrok","Complete campaign":"UkonÄit kampaÅ","Log cards":"PÅehled karet",Tokens:"Žetony",Notes:"Poznámky","by player":"hráÄem","Cards in exile":"VyhoÅ¡tÄné karty",Display:"zobraz","Edit scores":"Editovat bodovánÃ","Export a CSV file for analysis":"Exportovat CSV soubor k analýze","Export data in CSV format":"Exportovat data ve formátu CSV","Include full scores breakdown in CSV?":"Zahrnout kompletnà pÅehled bodovánà v CSV?","Delete all scores":"Vymazat vÅ¡echna bodovánÃ",Victory:"VÃtÄzstvÃ",Draw:"RemÃza",Defeat:"Porážka",Add:"PÅidána karta",Remove:"Odebrána karta","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"OdstraÅ 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> ze spoleÄných karet.","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"ZaÄni pÅÃÅ¡tà hru s 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> a 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"VraÅ¥ 1 odstranÄný <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> do spoleÄných karet, pokud je to možné.",Campaign:"KampaÅ","Grand campaign":"Velká kampaÅ",Win:"Výhra",Loss:"Prohra",ongoing:"probÃhajÃcÃ",completed:"ukonÄený","ended in victory":"skonÄila výhrou","ended in defeat":"skonÄila prohrou","Completed on":"DokonÄeno na","Next game at $0 level":"PÅÃÅ¡tà hra na $0 úrovni",Cards:"Karty","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"NezapomeÅ odstranit až 2 Nepokoje pÅed obodovánÃm (Aplikace to za tebe neudÄlá).","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":'Bot skonÄil hru bez jakýchkoliv žetonů, což je velmi neobvyklé. Jsi si jist že chceÅ¡ hru uložit? (Pokud Å¡lo o testovacà hru nebo jen zkouÅ¡ÃÅ¡ aplikaci zmáÄkni "ZruÅ¡it" a hra nebude uložena.)',"Scores copied to clipboard":"Bodovánà zkopÃrováno do schr
319ánky","Unable to load games in progress:":"Nelze nahrát probÃhajÃcà hry:","$0 game{0,s} available to join at the moment.":"V tento moment $0 her{0,s} dostupných k pÅipojenÃ.","Which do you want to join?":"Ke které se chceÅ¡ pÅipojit?","A player":"HráÄ","Game in progress. Really quit?":"ProbÃhá hra. Opravdu ukonÄit?","Processing image...":"Zpracovávám obrázek...","No cards found: was the image in the right orientation?":"Nenalezeny žádné karty: Je obrázek správnÄ orientován?","$0 cards counted in exile.":"NapoÄÃtáno $0 vyhoÅ¡tÄných karet.","$0 cards automatically garrisoned":"NapoÄÃtáno $0 karet v posádce.","$0 cards automatically put in history":"NapoÄÃtáno $0 karet v historii.","$0 cards automatically flooded":"NapoÄÃtáno $0 potopených karet.","$0 cards added to deck/hand/discard":"$0 pÅidáno do balÃÄku/ruky/odhazováku.","$0 cards identified. $1 cards added to $2$3.":"$0 karet rozpoznáno. $1 karet pÅidáno do $2$3.","Solo grand campaign":"Velká kampaÅ","played $0, won $1, lost $2, drew $3":"hráno $0, vyhráno $1, prohráno $2, remizováno $3","Start new campaign":"ZaÄÃt novou kampaÅ","Player name":"Jméno hráÄe","Campaign log to date":"Záznam kampanÄ","Grand campaign log to date":"Záznam Velké kampanÄ","Enemy civilisation for game $0":"NepÅátelská civilizace pro hru $0","Difficulty level":"ÃroveÅ obtÞnosti",default:"výchozÃ","OCR doesn't work offline...":"OCR nefunguje offline...","Choose an end-game trigger":"Vyber podmÃnku spuÅ¡tÄnà konce hry","$0 game{0,s} played":"$0 her{0,s} odehráno",side:"strana",on:"na","token{0,s}":"žeton{0,s}","Court card":"Dvora krále ArtuÅ¡e"},ru:{Persians:"ÐеÑÑÑ","City of Persepolis":"ÐеÑÑеполÑ","Battering Ram":"ТаÑан",Development:"РазвиÑие",Windmills:"ÐеÑÑÑнÑе ÐелÑниÑÑ",Satrap:"СаÑÑап","Persian Gold":"ÐолоÑо ÐеÑÑов",Babylonians:"ÐавилонÑне","Darius I":"ÐаÑий I","Median Empire":"ÐидийÑкое ЦаÑÑÑво","Nisaean Plain":"ÐиÑейÑÐºÐ°Ñ Ð Ð°Ð²Ð½Ð¸Ð½Ð°",Arachosia:"ÐÑаÑ
озиÑ",Unrest:"ÐеÑпоÑÑдки",Glory:"ÐелиÑие",Prosperity:"ÐÑоÑвеÑание",Advance:"РеÑоÑмÑ",Conquer:"Ðавоевание",Lydians:"ÐидийÑÑ",Zagros:"ÐагÑоÑ",Bactria:"ÐакÑÑиÑ","Standing Army":"РегÑлÑÑÐ½Ð°Ñ ÐÑмиÑ","Jade Mask":"ÐеÑÑиÑÐ¾Ð²Ð°Ñ ÐаÑка",Elders:"СÑаÑейÑинÑ",Town:"ÐоÑеление",Shrine:"СвÑÑилиÑе",Invasion:"ÐÑоÑжение",Mysticism:"ТаинÑÑва",Oracle:"ÐÑакÑл",Agriculture:"Ðемледелие",Boats:"Ðодки",Leadership:"ÐидеÑÑÑво",Shaduf:"ÐолодеÑ-ÐÑÑавлÑ","Lost Scroll":"УÑеÑÑннÑй СвиÑок","Rituals & Ceremonies":"РиÑÑÐ°Ð»Ñ Ð¸ ЦеÑемонии",Ambassador:"ÐоÑол",City:"ÐоÑод",Gambling:"ÐзаÑÑнÑе ÐгÑÑ",Port:"ÐоÑÑ",Diplomacy:"ÐипломаÑиÑ",Wilderness:"ÐÑÑÑоÑÑ",Jungle:"ÐжÑнгли",Mountain:"ÐоÑнÑй Ð¥ÑебеÑ",Coast:"ÐобеÑежÑе",Floodplain:"Ðойма Реки",Forest:"ÐеÑ",Oasis:"ÐазиÑ",Hills:"ХолмÑ",Marsh:"Топи",Steppe:"СÑепи",River:"Река",Cape:"ÐÑÑ",Woodland:"ЧаÑа","Sacred Pass":"СвÑÑеннÑй ÐÑÑÑ",Armenians:"ÐÑмÑне",Assyrians:"ÐÑÑиÑийÑÑ",Egyptians:"ÐгипÑÑне",Ionians:"ÐонийÑÑ",Qin:"ÐмпеÑÐ¸Ñ Ð¦Ð¸Ð½Ñ",Olmecs:"ÐлÑмеки",Sumerians:"ШÑмеÑÑ",Aksumites:"ÐкÑÑмиÑÑ",Minoans:"ÐинойÑÑ",Mauryans:"ÐмпеÑÐ¸Ñ ÐаÑÑÑев",Hittites:"ХеÑÑÑ","Drama & Poetry":"ТеаÑÑ Ð¸ ÐоÑзиÑ",Education:"ÐбÑазование",Moneylenders:"РоÑÑовÑики",Corruption:"ÐоÑÑÑпÑиÑ",Onager:"ÐнагÑ",Temple:"Ð¥Ñам",Cataphract:"ТÑжÑÐ»Ð°Ñ ÐавалеÑиÑ",Metropolis:"ÐеÑÑополиÑ",Pharmacy:"ФаÑмаÑевÑика",Wonder:"ЧÑдо СвеÑа",Coinage:"Чеканка ÐонеÑ",Exports:"ÐкÑпоÑÑ","Urban Development":"ÐÑадоÑÑÑоиÑелÑÑÑво",Mercenaries:"ÐаÑмники",Mining:"ÐоÑÐ½Ð°Ñ ÐÑомÑÑленноÑÑÑ",Espionage:"Шпионаж",Monument:"ÐонÑменÑ","Code of Laws":"Свод Ðаконов",Religion:"РелигиÑ",Domestication:"ÐдомаÑнивание","Water Mill":"ÐодÑÐ½Ð°Ñ ÐелÑниÑа",Qanat:"ÐÑÑиз","Road Building":"СÑÑоиÑелÑÑÑво ÐоÑог",Art:"ÐÑкÑÑÑÑво","Fortunate Isle":"ÐлаженнÑй ÐÑÑÑов",Rainforest:"Ðождевой ÐеÑ","Mountainâ":"ÐоÑÑ",Peninsula:"ÐолÑоÑÑÑов",Lakes:"ÐзÑÑа",Highlands:"ÐагоÑÑе","Sacred Grove":"СвÑÑÐµÐ½Ð½Ð°Ñ Ð Ð¾Ñа",Lowlands:"ÐизинÑ",Moor:"ÐолоÑо",Plain:"Равнина",Archipelago:"ÐÑÑ
ипелаг","Fortified Region":"УкÑеплÑннÑй Район",Grassland:"ÐÑга",Island:"ÐÑÑÑов",Etruscans:"ÐÑÑÑÑки",Scythians:"СкиÑÑ",Vikings:"Ðикинги",Phoenicians:"ФиникийÑÑ",Romans:"РимлÑне",Greeks:"ÐÑеки",Carthaginians:"ÐаÑÑагенÑне",Celts:"ÐелÑÑÑ",Macedonians:"ÐакедонÑне",Xiongnu:"Ð¥ÑннÑ",Astronomy:"ÐÑÑÑономиÑ",Cartography:"ÐаÑÑогÑаÑиÑ",Masonry:"ÐÐ°Ð¼ÐµÐ½Ð½Ð°Ñ Ðладка","Civil Service":"ÐоÑÑдаÑÑÑÐ²ÐµÐ½Ð½Ð°Ñ Ð¡Ð»Ñжба",Amphitheatre:"ÐмÑиÑеаÑÑ","King of Kings":"ЦаÑÑ Ð¦Ð°Ñей",Praiseworthy:"ÐоÑÑ
валение",Great:"ÐоÑиÑание",Notorious:"ÐÑÑÐ½Ð°Ñ Ð¡Ð»Ð°Ð²Ð°",Marvellous:"ÐÑевоÑÑ
одÑÑво (Ðл.)",Glorious:"ЧеÑÑвование",Triumphant:"ТÑиÑмÑ","Awe-inspiring":"Ðлагоговение",Imperial:"ÐмпеÑÑкие ÐмбиÑии",Independent:"ÐезавиÑимоÑÑÑ",Magnificent:"Ðеликолепие",Outstanding:"ÐÑевоÑÑ
одÑÑво (Ðег.)",Proud:"ÐÑÑокомеÑие",Eminent:"ÐÑÑÑее ÐбÑеÑÑво",Acclaimed:"ÐÑенаÑодное ÐÑизнание","City of Carthage":"ÐаÑÑаген",Elephants:"ÐоевÑе СлонÑ",Hegemony:"ÐегемониÑ",Hannibal:"Ðаннибал","Trading Ships":"ТоÑговÑе СÑда",Monopoly:"ÐонополиÑ",Caravans:"ÐаÑаванÑ",Iberia:"ÐбеÑиÑ",Berbers:"ÐеÑбеÑÑ","Dido, Queen of Carthage":"ЦаÑиÑа ÐаÑÑагена Ðидона","Carthaginian Traders":"ÐаÑÑагенÑкие ТоÑговÑÑ","Balearic Islands":"ÐалеаÑÑкие ÐÑÑÑова",Mauretania:"ÐавÑиÑаниÑ","Celtic Gold":"ÐолоÑо ÐелÑÑов","Celtic Innovation":"ÐзобÑеÑÐµÐ½Ð¸Ñ ÐелÑÑов",Chainmail:"ÐолÑÑÑга",Chariots:"ÐоевÑе ÐолеÑниÑÑ","Ogham Script":"ÐгамиÑеÑкое ÐиÑÑмо",Vercingetorix:"ÐеÑÑингеÑоÑиг",Armorica:"ÐÑмоÑика",Belgica:"ÐÑовинÑÐ¸Ñ Ðелгика",Britannia:"ÐÑовинÑÐ¸Ñ ÐÑиÑаниÑ",Hibernia:"ÐибеÑниÑ",Druids:"ÐÑÑидÑ",Boudicca:"ÐоиÑелÑниÑа ÐоÑдикка","Cattle Raid":"Угон СкоÑа","Cauldron of Ceridwen":"ÐоÑÑл ÐеÑидвен",Celtica:"ÐелÑÑика","Olympic Games":"ÐлимпийÑкие ÐгÑÑ",Philosophy:"ФилоÑоÑиÑ",Lighthouse:"ÐлекÑандÑийÑкий ÐаÑк","Direct Democracy":"ÐÑÑÐ¼Ð°Ñ ÐемокÑаÑиÑ","Greek Innovation":"ÐзобÑеÑÐµÐ½Ð¸Ñ ÐÑеков",Science:"ÐаÑка","City of Corinth":"ÐоÑинÑ",Pericles:"ÐеÑикл","Greek Prosperity":"ÐÑоÑвеÑание ÐÑеков","City of Athens":"ÐÑинÑ","Plains of Thessaly":"ФеÑÑалийÑÐºÐ°Ñ Ð Ð°Ð²Ð½Ð¸Ð½Ð°",Settlers:"ÐоÑеленÑÑ","Greek Mercenaries":"ÐÑеÑеÑкие ÐаÑмники","City of Sparta":"СпаÑÑа","Forest of Pholoe":"ФолойÑкие ÐеÑа",Peleponnese:"ÐелопоннеÑ",Alexander:"ЦаÑÐµÐ²Ð¸Ñ ÐлекÑандÑ","Alexander the Great":"ÐлекÑÐ°Ð½Ð´Ñ ÐакедонÑкий",Parmenion:"ÐаÑменион","Alexandria in Ariana":"ÐлекÑандÑÐ¸Ñ Ð² ÐÑиане","Alexandria in Egypt":"ÐлекÑандÑÐ¸Ñ ÐгипеÑÑкаÑ",Mosaics:"Ðозаики","Companion Cavalry":"ÐеÑайÑÑ",Uxians:"УкÑии","Philip II":"Филипп II ÐакедонÑкий",Phalanx:"ÐакедонÑкие Фаланги",Pelagonia:"ÐелагониÑ","Hali
319acmon Valley":"Ðолина Реки ÐлÑÑкмон",Orestis:"ÐÑеÑÑида","Julius Caesar":"Ðай Юлий ЦезаÑÑ","Military Engineering":"ÐÐ¾ÐµÐ½Ð½Ð°Ñ ÐнженеÑиÑ","Roman Invasion":"ÐÑоÑжение РимлÑн",Legions:"РимÑкие ÐегионÑ","The Senate":"СенаÑ","Rome, the Eternal City":"ÐеÑнÑй ÐоÑод Рим","Emperor Trajan":"ÐмпеÑаÑÐ¾Ñ Ð¢ÑаÑн","Bread and Circuses":"Хлеба и ÐÑелиÑ","Gallia Aquitania":"ÐÑовинÑÐ¸Ñ ÐквиÑаниÑ",Raetia:"ÐÑовинÑÐ¸Ñ Ð ÐµÑиÑ",Triumvirate:"ТÑиÑмвиÑаÑ","City of Rome":"Рим",Dalmatia:"ÐÑовинÑÐ¸Ñ ÐалмаÑиÑ","Roman Expansion":"РимÑÐºÐ°Ñ ÐкÑпанÑиÑ",Jewellery:"ÐÑагоÑенноÑÑи",Ateas:"ЦаÑÑ ÐÑей",Kurgans:"СкиÑÑкие ÐÑÑганÑ","City of Gelonus":"Ðелон",Raiders:"ÐÑабиÑели",Tamga:"ФамилÑÐ½Ð°Ñ Ð¢Ð°Ð¼Ð³Ð°","Pontic Steppe":"ÐонÑийÑÐºÐ°Ñ Ð¡ÑепÑ","Tarim Basin":"ТаÑимÑÐºÐ°Ñ Ðпадина",Caucasia:"ÐоÑÑ Ðавказа",Nomads:"ÐоÑевники",Tents:"ШаÑÑÑ","Mounted Archers":"ÐоннÑе ÐÑÑники","Carpathian Mountains":"СаÑмаÑÑкие ÐоÑÑ","Tian Shan":"ÐоÑÑ Ð¢ÑнÑ-ШанÑ","Harald Hardrada":"ХаÑалÑд III СÑÑовÑй","Go A'Viking":"ЯÑоÑÑÑ Ðикингов",Combs:"ÐÑебни","Rollo the Walker":"РолÑÑ ÐеÑеÑ
од",Skis:"ÐÑжи",Longships:"ÐÑаккаÑÑ",Sagas:"Саги","City of Dubh Linn":"ÐÑблин",Graenland:"ÐÑенландиÑ","Føroyar":"ФаÑеÑÑкие ÐÑÑÑова",Iceland:"ÐÑландиÑ",Vinland:"Ðинланд",Jomsviking:"ÐомÑвикинги",Gothja:"ÐоÑиÑ",Althing:"ÐлÑÑинг",Scandinavia:"СкандинавиÑ","Erik the Red":"ÐÑик Ð Ñжий",Arthurians:"ÐоÑÐ¾Ð»Ñ ÐÑÑÑÑ Ð¸ Ðго ÐаÑод","King Arthur's Court":"ÐÐ²Ð¾Ñ ÐоÑÐ¾Ð»Ñ ÐÑÑÑÑа","Gwaith Camlan":"ÐиÑва пÑи Ðамланне",Graal:"СвÑÑой ÐÑаалÑ","Lawnslot y Llyn (Sir Lancelot)":"ÐанÑÐµÐ»Ð¾Ñ ÐзÑÑнÑй","Twrch Trwyth":"ТвÑÑ
ТÑвиÑ","Taliesin the Bard":"ÐаÑд ТалиеÑин",Excalibur:"ÐкÑкалибÑÑ","Bedwyr (Sir Bedevire)":"СÑÑ ÐедивеÑ","Viviane of the Lake":"ÐладÑÑиÑа ÐзеÑа","City of Camelot":"Ðамок ÐамелоÑ","Britannia Flavia":"ÐÑиÑÐ°Ð½Ð¸Ñ Ð¤Ð»Ð°Ð²Ð¸Ñ","Ynys Afallach (Avalon)":"Ðвалон","Gwalchmei (Sir Gawain)":"СÑÑ Ðавейн","Lady Bertilak":"Ðеди ÐеÑÑилак",Morigena:"Ð¤ÐµÑ ÐоÑгана","Peredur (Sir Percival)":"СÑÑ ÐеÑÑивалÑ","Cai (Sir Kay)":"СÑÑ Ðей","King Arthur":"ÐоÑÐ¾Ð»Ñ ÐÑÑÑÑ","Uthyr Pendragon":"УÑÐµÑ ÐендÑагон","Britannia Prima":"ÐÑиÑÐ°Ð½Ð¸Ñ ÐÑима","Britannia Secunda":"ÐÑиÑÐ°Ð½Ð¸Ñ Ð¡ÐµÐºÑнда","Myrddin Wyllt (Merlin)":"ÐеÑлин",Guennuvar:"ÐвиневÑа",Cafall:"Ðавалл",Atlanteans:"ÐÑланÑÑ","Advanced Culture":"ÐеÑÐµÐ´Ð¾Ð²Ð°Ñ ÐÑлÑÑÑÑа","Palace of Poseidon":"ÐвоÑÐµÑ ÐоÑейдона","Spread of Atlantis":"ÐмбиÑии ÐÑланÑидÑ","Moats and Walls":"Ð Ð²Ñ Ð¸ СÑенÑ","Myths and Legends":"ÐиÑÑ Ð¸ ÐегендÑ","Vast Wealth":"ÐеÑмеÑное ÐогаÑÑÑво",Kleito:"ÐлейÑо","Mountain of Atlantis":"ÐоÑа ÐÑланÑидÑ",Themiscyra:"ТемиÑкиÑа",Flood:"ÐолÑÑÐ°Ñ Ðолна",Thule:"ÐÑÑÑов-ÐÑизÑак ТÑле",Hesperides:"ÐеÑпеÑидÑ","Elysian Fields":"Ðлизий","Atlantean Fleet":"Ð¤Ð»Ð¾Ñ ÐÑланÑидÑ",Unification:"ÐоалиÑиÑ",Embalming:"ÐалÑзамиÑование",Obelisk:"ÐбелиÑк","Ramesses II":"РамÑÐµÑ II Ðеликий","Egyptian Expansion":"ÐгипеÑÑÐºÐ°Ñ ÐкÑпанÑиÑ",Medicine:"ÐÑаÑевание",Pyramids:"ÐиÑамидÑ","Egyptian Legacy":"ÐаÑледие ФаÑаонов",Kushites:"ÐÑÑиÑÑ","Red Land":"ÐеÑÑеÑ","Flood of the Nile":"Разлив Ðила","Egyptian Incursion":"ÐаÑÑÑпление ÐгипÑÑн","Egyptian Hieroglyphics":"ÐгипеÑÑÐºÐ°Ñ ÐеÑоглиÑика","Nile Valley":"ÐолиÐ
319½Ð° Ðила","Lower Nile":"ÐелÑÑа Ðила",Mathematics:"ÐаÑемаÑика","Grand Trunk Road":"Ðеликий ÐолÑÑнÑй ÐÑÑÑ",Ashoka:"ÐÑока",Buddhism:"ÐÑддизм","Edicts of Ashoka":"ÐдикÑÑ ÐÑоки","Punch-Marked Coins":"ЧеканнÑе ÐонеÑÑ",Arthashastra:"ÐÑÑÑ
аÑаÑÑÑа","Nanda Dynasty":"ÐинаÑÑÐ¸Ñ Ðанда","City of Pataliputra":"ÐаÑалипÑÑÑа","Indian Elephants":"ÐндийÑкие СлонÑ",Gandhara:"ÐандÑ
аÑа",Chandragupta:"ЧандÑагÑпÑа ÐаÑÑÑÑ",Chanakya:"ÐаÑÑилÑÑ",Magadha:"ÐагадÑ
а","Indus Valley":"Ðолина Ðнда","King Minos":"ЦаÑÑ ÐиноÑ","Minoan Traders":"ÐинойÑкие ТоÑговÑÑ","Drainage System":"СиÑÑема ÐанализаÑии",Architecture:"ÐÑÑ
иÑекÑÑÑа",Frescos:"ФÑеÑки",Labyrinth:"ÐабиÑинÑ","Minoan Expansion":"ÐинойÑÐºÐ°Ñ ÐкÑпанÑиÑ","Seal Stones":"ÐинойÑкие ÐеммÑ","Writing Systems":"ÐиÑÑменноÑÑÑ",Knossos:"ÐноÑÑ",Pottery:"ÐонÑаÑное Ðело",Thera:"ÐÑевнÑÑ Ð¢ÐµÑа",Crete:"ÐÑÑÑов ÐÑиÑ",Cyprus:"ÐÑÑÑов ÐипÑ","San Lorenzo Tenochtitlán":"Сан-ÐоÑенÑо-ТеноÑÑиÑлан","Step Pyramids":"ÐиккÑÑаÑÑ","Ritual Sacrifice":"РиÑÑалÑнÑе ÐеÑÑвопÑиноÑениÑ","Olmec Traders":"ÐлÑмекÑкие ТоÑговÑÑ","Tres Zapotes":"ТÑеÑ-СапоÑеÑ","Stone Heads":"ÐаменнÑе ÐоловÑ",Cacao:"Ðакао","Olmec Hieroglyphics":"ÐлÑмекÑкие ÐиÑÑмена",Calendar:"ÐалендаÑÑ","Stone Mask":"ÐÐ°Ð¼ÐµÐ½Ð½Ð°Ñ ÐаÑка","Loadstone Compass":"ÐзобÑеÑение ÐомпаÑа","Ball Games":"ÐгÑа в ÐÑÑ","Laguna de los Cerros":"ÐагÑна-де-ÐоÑ-СеÑÑоÑ","La Venta":"Ðа-ÐенÑа","Long Walls I":"ÐÐµÐ»Ð¸ÐºÐ°Ñ Ð¡Ñена (УÑаÑÑок I)","Long Walls II":"ÐÐµÐ»Ð¸ÐºÐ°Ñ Ð¡Ñена (УÑаÑÑок II)","Long Walls III":"ÐÐµÐ»Ð¸ÐºÐ°Ñ Ð¡Ñена (УÑаÑÑок III)","Long Walls IV":"ÐÐµÐ»Ð¸ÐºÐ°Ñ Ð¡Ñена (УÑаÑÑок IV)","Emperor Qin Shi Huang":"ÐмпеÑаÑÐ¾Ñ Ð¦Ð¸Ð½Ñ Ð¨Ð¸Ñ
Ñанди","King Wu of Qin":"ÐоÑÐ¾Ð»Ñ Ð¦Ð¸Ð½Ñ Ð£",Metallurgy:"ÐеÑаллÑÑгиÑ","Terracotta Warriors":"ТеÑÑакоÑÐ¾Ð²Ð°Ñ ÐÑмиÑ","Eastern Zhou":"ÐоÑÑоÑнÑе ÐкÑаинÑ","Mandate of Heaven":"ÐебеÑнÑй ÐандаÑ","Duke Zhuang of Qin":"ÐеÑÑог Ð¦Ð¸Ð½Ñ Ð§Ð¶Ñан","School of Diplomacy":"Школа ÐипломаÑии",Confucianism:"ÐонÑÑÑианÑÑво",Legalism:"Ðегизм","Western Zhou":"ÐападнÑе ÐкÑаинÑ",Utopians:"ÐÑоÑвеÑлÑннÑе","Visions of Shangri-La":"ÐÐ¸Ð´ÐµÐ½Ð¸Ñ Ð¨Ð°Ð½Ð³Ñи-Ðа","Path to Shangri-La":"ÐоÑога к ШангÑи-Ðа","Gates of Shangri-La":"ÐÑаÑа ШангÑи-Ðа","Shangri-La":"ШангÑи-Ðа",Monastery:"ÐбиÑелÑ",Portals:"ÐоÑÑалÑ",Daochang:"ÐодÑ
имана","Lost Tomes":"УÑÑаÑеннÑе Ð ÑкопиÑи","Tree of Knowledge":"ÐеÑево ÐодÑ
и",Charity:"ÐилоÑеÑдие",Meditation:"ÐедиÑаÑиÑ","Mountain Retreat":"Уединение в ÐоÑаÑ
","Sacred Scroll":"СвÑÑеннÑй СвиÑок",Back:"Ðазад",Next:"Ðалее","Conditional cards":"ÐаÑÑÑ Ñ ÑÑловнÑм ÑиÑлом ÐÐ","Multiplier cards":"ÐаÑÑÑ Ñ Ð¿ÐµÑеменнÑм ÑиÑлом ÐÐ","Numeric cards":"ÐаÑÑÑ Ñ ÑикÑиÑованнÑми ÑиÑлом ÐÐ","Unrest cards":"ÐаÑÑÑ Ð±ÐµÑпоÑÑдков","These score differently depending on certain conditions.":"ЧиÑло ÐРполÑÑеннÑÑ
за ÑÑи каÑÑÑ Ð·Ð°Ð²Ð¸ÑÐ¸Ñ Ð¾Ñ Ð²ÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑÑловий","Include the civilisation's power card. No individual card may score more than 10 points.":"Ð Ñом ÑиÑле каÑÑа ÑпоÑобноÑÑи наÑода. Ðа каждÑÑ ÐºÐ°ÑÑÑ Ð½ÐµÐ»ÑÐ·Ñ Ð¿Ð¾Ð»ÑÑиÑÑ Ð±Ð¾Ð»ÑÑе 10 ÐÐ.","Score the number on the card.":"ÐаÑÑÑ Ð¿ÑиноÑÑÑ Ñказанное на ниÑ
ÑиÑло ÐÐ.","Progress tokens":"ÐеÑÐ¾Ð½Ñ Ð¼Ð¾Ð´ÐµÑнизаÑии","Population tokens":"ÐеÑÐ¾Ð½Ñ Ð½Ð°ÑелениÑ","Material tokens":"ÐеÑÐ¾Ð½Ñ ÑеÑÑÑÑов","Each progress token scores 1 point.":"ÐаждÑй жеÑон модеÑнизаÑии пÑиноÑÐ¸Ñ 1 ÐÐ.","Not scored directly, but may be referred to by other cards.":"Ðе пÑиноÑÑÑ Ð¾Ñки Ñами по Ñебе, но иÑ
могÑÑ ÑÑиÑÑваÑÑ Ð´ÑÑгие каÑÑÑ.","Resource tokens":"ÐеÑÐ¾Ð½Ñ ÑеÑÑÑÑов","Each Unrest card scores -2 points.":"ÐÐ°Ð¶Ð´Ð°Ñ ÐºÐ°ÑÑа беÑпоÑÑдков оÑÐ½Ð¸Ð¼Ð°ÐµÑ 2 ÐÐ.","The bot always scores the higher value for these cards.":"Ðа ÑÑи каÑÑÑ Ð±Ð¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ Ð¼Ð°ÐºÑималÑно возможное знаÑение ÐÐ.","The bot scores 5 points for each of these cards. Do not include the power card.":"Ðа каждÑÑ ÐºÐ°ÑÑÑ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ Ñипа Ð±Ð¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ 5 ÐÐ. Ðе ÑÑиÑÑвайÑе ÐРза каÑÑÑ ÑпоÑобноÑÑи боÑа.","The bot scores 1 point for every 10 Re
319source and Population tokens combined.":"ÐÐ¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ 1 ÐРза каждÑе 10 жеÑонов ÑеÑÑÑÑов или наÑÐµÐ»ÐµÐ½Ð¸Ñ Ð² лÑбой комбинаÑии. ","The bot scores 1 point for every 5 Resource and Population tokens combined.":"ÐÐ¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ 1 ÐРза каждÑе 5 жеÑонов ÑеÑÑÑÑов или наÑÐµÐ»ÐµÐ½Ð¸Ñ Ð² лÑбой комбинаÑии. ","Save score":"СоÑ
ÑаниÑÑ ÑезÑлÑÑаÑ","New game":"ÐÐ¾Ð²Ð°Ñ Ð¸Ð³Ñа","WINNER!":"ÐÐÐÐÐÐТÐÐЬ!","DRAW!":"ÐÐЧЬЯ!",Close:"ÐакÑÑÑÑ","Game mode":"Режим игÑÑ","Single game":"ÐдиноÑÐ½Ð°Ñ Ð¸Ð³Ñа","Solo campaign":"ÐдиноÑÐ½Ð°Ñ ÐºÐ°Ð¼Ð¿Ð°Ð½Ð¸Ñ","Join game in progress":"ÐÑиÑоединиÑÑÑÑ Ðº ÑекÑÑей игÑе","Enemy civilisation":"ÐаÑод пÑоÑивника","Boxes available":"ÐоÑÑÑпнÑе вÑпÑÑки игÑÑ","Number of players":"ЧиÑло игÑоков",Random:"СлÑÑайно","Surprise me!":"Удиви менÑ!",Level:"УÑовенÑ",Chieftain:"ÐождÑ",Warlord:"ÐолководеÑ",Imperator:"ÐмпеÑаÑоÑ",Sovereign:"ÐовелиÑелÑ",Overlord:"ÐлаÑÑелин","Supreme Ruler":"ÐеÑÑ
овнÑй пÑавиÑелÑ","This bot has a hand size of 4 (place an exhaust token on slot 5).":"ÐаннÑй Ð±Ð¾Ñ Ð¸ÑполÑзÑÐµÑ 4 ÑлоÑа Ð´Ð»Ñ ÐºÐ°ÑÑ (вÑложиÑе жеÑон ÑкÑплÑаÑаÑии под маÑÐºÐµÑ ÑÑнка 5)","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"РконÑе Ñ
ода боÑа в Ñазе Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ñле Ð¿Ð¾Ð¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑÑда каÑÑ Ð±Ð¾Ñа ниже маÑкеÑов ÑÑнка пеÑемеÑÑиÑе Ð¾Ð´Ð½Ñ ÐºÐ°ÑÑÑ Ñ Ð²ÐµÑÑ
а ÐºÐ¾Ð»Ð¾Ð´Ñ Ð±Ð¾Ñа в ÑбÑоÑ, еÑли можеÑе.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"ÐаннÑй Ð±Ð¾Ñ Ð½Ð°ÑÐ¸Ð½Ð°ÐµÑ Ñ Ñем же ÑиÑлом ÑеÑÑÑÑов, ÑÑо и игÑок. ÐÑи подÑÑеÑе ÐÐ Ð±Ð¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ 1 ÐРза каждÑе пÑÑÑ Ð¶ÐµÑонов ÑеÑÑÑÑов и наÑÐµÐ»ÐµÐ½Ð¸Ñ Ð² лÑбой комбинаÑии.","This bot has a hand size of 6 (add slot marker 6).":"УвелиÑÑÑе ÑÐ°Ð·Ð¼ÐµÑ ÑÑки данного боÑа до 6, добавив маÑÐºÐµÑ ÑÑнка 6.","Whenever the bot returns an Unrest card it gains 1 progress.":"ÐÐ¾Ñ Ð¿Ð¾Ð»ÑÑÐ°ÐµÑ 1 жеÑон модеÑнизаÑии каждÑй Ñаз, когда возвÑаÑÐ°ÐµÑ ÐºÐ°ÑÑÑ Ð±ÐµÑпоÑÑдков в ÐºÐ¾Ð»Ð¾Ð´Ñ Ð±ÐµÑпоÑÑдков.","Scoring method":"ÐеÑод подÑÑеÑа оÑков","Full scoring (enter your cards and the app automatically scores them)":"ÐвÑомаÑиÑеÑкий подÑÑÐµÑ (пÑиложение Ñамо ÑÑиÑÐ°ÐµÑ ÐРза оÑмеÑеннÑе вами каÑÑÑ)","Basic scoring (enter score of scoring cards yourself)":"Ð ÑÑной подÑÑÐµÑ (введиÑе оÑки за каÑÑÑ ÑамоÑÑоÑÑелÑно)","Automatically save score after each game?":"СоÑ
ÑанÑÑÑ ÑезÑлÑÑÐ°Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ игÑÑ Ð°Ð²ÑомаÑиÑеÑки?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"ÐобавиÑÑ ÑезÑлÑÑаÑÑ ÑÑгÑаннÑÑ
Ð¸Ð³Ñ Ð² ÑанаÑÑкÑÑ Ð¾Ð½Ð»Ð°Ð¹Ð½ Ð±Ð°Ð·Ñ Ð´Ð»Ñ ÑбоÑа ÑÑаÑиÑÑики? (ÐÑÑ Ð¿ÐµÑÑоналÑÐ½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð±ÑÐ´ÐµÑ Ñдалена)","No username at present":"ÐÐ¼Ñ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ Ð½Ðµ Ñказано","Set username":"УказаÑÑ Ð¸Ð¼Ñ Ð¿Ð¾Ð»ÑзоваÑелÑ","Installing as a web app":"УÑÑановиÑÑ ÐºÐ°Ðº web-пÑиложение","This page has more detailed instructions.":"ÐдеÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ пÑоÑиÑаÑÑ Ð±Ð¾Ð»ÐµÐµ подÑобнÑÑ Ð¸Ð½ÑÑÑÑкÑиÑ.","Loading games in progress":"ÐагÑÑзка наÑаÑÑÑ
игÑ","No games available to join at the moment. Sorry!":"Ð ÑожалениÑ, в наÑÑоÑÑий Ð¼Ð¾Ð¼ÐµÐ½Ñ Ð½ÐµÑ Ð¸Ð³Ñ, к коÑоÑÑм можно пÑиÑоединиÑÑÑÑ. ","This will delete your game in progress. Do you really want to do this?":"Ð
319аÑа наÑаÑÐ°Ñ Ð¸Ð³Ñа бÑÐ´ÐµÑ Ñдалена. ÐÑ ÑвеÑенÑ, ÑÑо Ñ
оÑиÑе пÑодолжиÑÑ?","Which game do you want to join?":"Ркакой игÑе Ð²Ñ Ñ
оÑиÑе пÑиÑоединиÑÑÑÑ?","Which player are you?":"ÐÑо из игÑоков ÑÑо вÑ?","Ask permission to join":"ÐапÑоÑиÑÑ ÑазÑеÑение пÑиÑоединиÑÑÑÑ Ðº игÑе","Awaiting response from game host...":"Ðжидание оÑвеÑа Ð¾Ñ Ñ
озÑина игÑÑ...","Permission denied. Try another game.":"РдоÑÑÑпе оÑказано. ÐопÑобÑйÑе пÑиÑоединиÑÑÑÑ Ðº дÑÑгой игÑе.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 Ñ
оÑÐµÑ Ð¿ÑиÑоединиÑÑÑÑ Ðº игÑе в Ñоли $1 ($2). РазÑеÑиÑÑ?","Game left unfinished last time. Resume?":"ÐоÑледнÑÑ Ð¸Ð³Ñа не бÑла законÑена. ÐÑодолжиÑÑ?","Power card{0,s}":"ÐаÑÑ{{0,ÐаÑÑа,2=ÐаÑÑÑ,5=ÐаÑÑ}} ÑпоÑобноÑÑи","Select the side of the $0 power card you have been using":"ÐÑбеÑиÑе ÑÑоÑÐ¾Ð½Ñ ÐºÐ°ÑÑÑ ÑпоÑобноÑÑи наÑода $0, коÑоÑÑÑ Ð²Ñ Ð¸ÑполÑзовали","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(СÑоÑона A ÑекомендÑеÑÑÑ Ð´Ð»Ñ Ð¾Ð¿ÑÑнÑÑ
игÑоков, ÑÑоÑона Ð ÑекомендÑеÑÑÑ Ð´Ð»Ñ Ð¿ÐµÑвÑÑ
Ð¸Ð³Ñ Ð·Ð° новÑй наÑод)","Count from photo...":"ÐоÑÑиÑаÑÑ Ð¿Ð¾ ÑоÑо...","Add your own notes about strategy here.":"ÐдеÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ добавиÑÑ Ñвои замеÑки о ÑÑÑаÑегии."},pt_br:{Persians:"Persas","City of Persepolis":"Cidade de Persépolis","Battering Ram":"ArÃete",Development:"Desenvolvimento",Windmills:"Moinhos de Vento",Satrap:"Sátrapa","Persian Gold":"Ouro Persa",Babylonians:"Babilônios","Darius I":"Dário I","Median Empire":"Império Medo","Nisaean Plain":"PlanÃcie de Nisaia",Arachosia:"Aracósia",Unrest:"Desordem",Glory:"Glória",Prosperity:"Prosperidade",Advance:"Avançar",Conquer:"Conquistar",Lydians:"LÃdios",Zagros:"Montes Zagros",Bactria:"Báctria","Standing Army":"Exército Permanente","Jade Mask":"Máscara de Jade",Elders:"Anciões",Town:"Vila",Shrine:"Santuário",Invasion:"Invasão",Mysticism:"Misticismo",Oracle:"Ãraculo",Agriculture:"Agricultura",Boats:"Barcos",Leadership:"Liderança",Shaduf:"Shaduf","Lost Scroll":"Manuscrito Perdido","Rituals & Ceremonies":"Rituais e Cerimônias",Ambassador:"Embaixador",City:"Cidade",Gambling:"Jogatina",Port:"Porto",Diplomacy:"Diplomacia",Wilderness:"Ermo",Jungle:"Selva",Mountain:"Montanha",Coast:"Litoral",Floodplain:"Várzea",Forest:"Floresta",Oasis:"Oásis",Hills:"Colinas",Marsh:"Brejo",Steppe:"Estepe",River:"Rio",Cape:"Cabo",Woodland:"Mata","Sacred Pass":"Desfiladeiro Sagrado",Armenians:"Armênios",Assyrians:"AssÃrios",Egyptians:"EgÃpcios",Ionians:"Jônios",Qin:"Qin",Olmecs:"Olmec
319as",Sumerians:"Sumérios",Aksumites:"Axumitas",Minoans:"Minoicos",Mauryans:"Máuria",Hittites:"Hititas","Drama & Poetry":"Poesia e Dramaturgia",Education:"Educação",Moneylenders:"Agiotas",Corruption:"Corrupção",Onager:"Onagro",Temple:"Templo",Cataphract:"Catafractário",Metropolis:"Metrópole",Pharmacy:"Farmacêutica",Wonder:"Maravilha",Coinage:"Cunhagem",Exports:"Exportações","Urban Development":"Desenvolvimento Urbano",Mercenaries:"Mercenários",Mining:"Mineração",Espionage:"Espionagem",Monument:"Monumento","Code of Laws":"Código Legal",Religion:"Religião",Domestication:"Domesticação","Water Mill":"Moinho de Ãgua",Qanat:"Qanat","Road Building":"Construção de Estradas",Art:"Arte","Fortunate Isle":"Ilha dos Bem-Aventurados",Rainforest:"Floresta Tropical","Mountainâ":"Montanha",Peninsula:"PenÃnsula",Lakes:"Lagos",Highlands:"Terras Altas","Sacred Grove":"Bosque Sagrado",Lowlands:"Terras Baixas",Moor:"Charco",Plain:"PlanÃcie",Archipelago:"Arquipélago","Fortified Region":"Região Fortificada",Grassland:"Pradaria",Island:"Ilha",Etruscans:"Etruscos",Scythians:"Citas",Vikings:"Vikings",Phoenicians:"FenÃcios",Romans:"Romanos",Greeks:"Gregos",Carthaginians:"Cartagineses",Celts:"Celtas",Macedonians:"Macedônios",Xiongnu:"Xiongnu",Astronomy:"Astronomia",Cartography:"Cartografia",Masonry:"Cantaria","Civil Service":"Funcionalismo Público",Amphitheatre:"Anfiteatro","King of Kings":"Rei dos Reis",Praiseworthy:"Louvável",Great:"Grandioso",Notorious:"Famigerado",Marvellous:"Maravilhoso",Glorious:"Glorioso",Triumphant:"Triunfante","Awe-inspiring":"Admirável",Imperial:"Imperial",Independent:"Independente",Magnificent:"MagnÃfico",Outstanding:"Extraordinário",Proud:"Soberbo",Eminent:"Eminente",Acclaimed:"Aclamado","City of Carthage":"Cidade de Cartago",Elephants:"Elefantes",Hegemony:"Hegemonia",Hannibal:"AnÃbal","Trading Ships":"Navios Mercantes",Monopoly:"Monopólio",Caravans:"Caravanas",Iberia:"Ibéria",Berbers:"Bérberes","Dido, Queen of Carthage":"Dido, Rainha de Cartago","Carthaginian Traders":"Mercadores Cartagineses","Balearic Islands":"Ilhas Baleares",Mauretania:"Mauritânia","Celtic Gold":"Ouro Celta","Celtic Innovation":"Inovação Celta",Chainmail:"Cota de Malha",Chariots:"Carros de Combate","Ogham Script":"Alfabeto Ogham",Vercingetorix:"Vercingetórix",Armorica:"Armórica",Belgica:"Bélgica",Britannia:"Britânia",Hibernia:"Hibérnia",Druids:"Druidas",Boudicca:"Boadiceia","Cattle Raid":"Roubo de Gado","Cauldron of Ceridwen":"Caldeirão de Cerridwen",Celtica:"Gália Céltica","Olympic Games":"Jogos OlÃmpicos",Philosophy:"Filosofia",Lighthouse:"Farol","Direct Democracy":"Democracia Direta","Greek Innovation":"Inovação Grega",Science:"Ciência","City of Corinth":"Cidade de Corinto",Pericles:"Péricles","Greek Prosperity":"Prosperidade Grega","City of Athens":"Cidade de Atenas","Plains of Thessaly":"PlanÃcies de Tessália",Settlers:"Colonos","Greek Mercenaries":"Mercenários Gregos","City of Sparta":"Cidade de Esparta","Forest of Pholoe":"Floresta de Foloi",Peleponnese:"Peloponeso",Alexander:"Alexandre","Alexander the Great":"Alexandre, o Grande",Parmenion:"Parmênio","Alexandria in Ariana":"Alexandria na Ãria","Alexandria in Egypt":"Alexandria no Egito",Mosaics:"Mosaicos","Companion Cavalry":"Cavalaria dos Companheiros",Uxians:"Uxianos","Philip II":"Filipe II",Phalanx:"Falange",Pelagonia:"Pelagônia","Haliacmon Valley":"Vale do Haliácmon",Orestis:"Oréstide","Julius Caesar":"Júlio César","Military Engineering":"Engenharia Militar","Roman Invasion":"Invasão Romana",Legions:"Legiões","The Senate":"O Senado","Rome, the Eternal City":"Roma, a Cidade Eterna","Emperor Trajan":"Imperador Trajano","Bread and Circuses":"Pão e Circo","Gallia Aquitania":"Gália Aquitânia",Raetia:"Récia",Triumvirate:"Triunvirato","City of Rome":"Cidade de Roma",Dalmatia:"Dalmácia","Roman Expansion":"Expansão Romana",Jewellery:"Joias",Ateas:"Ãteas",Kurgans:"Kurgans","City of Gelonus":"Cidade de Gelonos",Raiders:"Saqueadores",Tamga:"Tamga","Pontic Steppe":"Estepe Pôntica","Tarim Basin":"Bacia do Tarim",Caucasia:"Caucásia",Nomads:"Nômades",Tents:"Tendas","Mounted Archers":"Arqueiros a Cavalo","Carpathian Mountains":"Montes Cárpatos","Tian Shan":"Tian Shan","Harald Hardrada":"Harald Hardrada","Go A'Viking":"Expedição Viking",Combs:"Pentes","Rollo the Walker":"Rollo, o Andarilho",Skis:"Esquis",Longships:"Dracáres",Sagas:"Sagas","City of Dubh Linn":"Cidade de Dubh Linn",Graenland:"Groenlândia","Føroyar":"Ilhas Faroé",Iceland:"Islândia",Vinland:"Vinlândia",Jomsviking:"Jomsviking",Gothja:"Gothja",Althing:"Althing",Scandinavia:"Escandinávia","Erik the Red":"Erik, o Ruivo",Arthurians:"Arturianos","King Arthur'
319s Court":"Corte do Rei Artur","Gwaith Camlan":"Gwaith Camlan",Graal:"Graal","Lawnslot y Llyn (Sir Lancelot)":"Lawnslot Y Llyn (Lancelot)","Twrch Trwyth":"Twrch Trwyth","Taliesin the Bard":"Taliesin, o Bardo",Excalibur:"Excalibur","Bedwyr (Sir Bedevire)":"Bedwyr (Bedivere)","Viviane of the Lake":"Viviane do Lago","City of Camelot":"Cidade de Camelot","Britannia Flavia":"Flávia Cesariense","Ynys Afallach (Avalon)":"Ynys Afallach (Avalon)","Gwalchmei (Sir Gawain)":"Gwalchmei (Gawain)","Lady Bertilak":"Lady Bertilak",Morigena:"Morigena","Peredur (Sir Percival)":"Peredur (Perceval)","Cai (Sir Kay)":"Cai","King Arthur":"Rei Artur","Uthyr Pendragon":"Uthyr Pendragon","Britannia Prima":"Britânia Prima","Britannia Secunda":"Britânia Segunda","Myrddin Wyllt (Merlin)":"Myrddin Wyllt (Merlin)",Guennuvar:"Guennuvar",Cafall:"Caffal (Cabal)",Atlanteans:"Atlantes","Advanced Culture":"Cultura Avançada","Palace of Poseidon":"Palácio de Poseidon","Spread of Atlantis":"Disseminação de Atlântida","Moats and Walls":"Fossos e Muralhas","Myths and Legends":"Mitos e Lendas","Vast Wealth":"Vastas Riquezas",Kleito:"Clito","Mountain of Atlantis":"Montanhas de Atlântida",Themiscyra:"Temiscira",Flood:"Inundação",Thule:"Thule",Hesperides:"Hespérides","Elysian Fields":"Campos ElÃsios","Atlantean Fleet":"Armada Atlante",Unification:"Unificação",Embalming:"Embalsamamento",Obelisk:"Obelisco","Ramesses II":"Ramsés II","Egyptian Expansion":"Expansão EgÃpcia",Medicine:"Medicina",Pyramids:"Pirâmides","Egyptian Legacy":"Legado EgÃpcio",Kushites:"Cuxitas","Red Land":"Terra Vermelha","Flood of the Nile":"Cheia do Nilo","Egyptian Incursion":"Incursão EgÃpcia","Egyptian Hieroglyphics":"Hieróglifos EgÃpcios","Nile Valley":"Vale do Nilo","Lower Nile":"Baixo Nilo",Mathematics:"Matemática","Grand Trunk Road":"Grande Estrada mestra",Ashoka:"Asoka",Buddhism:"Budismo","Edicts of Ashoka":"Ãditos de Asoka","Punch-Marked Coins":"Moedas Cunhadas",Arthashastra:"Artaxastra","Nanda Dynasty":"Dinastia Nanda","City of Pataliputra":"Cidade de Pataliputra","Indian Elephants":"Elefantes Indianos",Gandhara:"Gandara",Chandragupta:"Chandragupta",Chanakya:"Chanaquia",Magadha:"Mágada","Indus Valley":"Vale do Indo","King Minos":"Rei Minos","Minoan Traders":"Mercadores Minoicos","Drainage System":"Sistema de Drenagem",Architecture:"Arquitetura",Frescos:"Frescos",Labyrinth:"Labirinto","Minoan Expansion":"Expansão Minoica","Seal Stones":"Sinetes de Pedra","Writing Systems":"Sistemas de Escrita",Knossos:"Cnossos",Pottery:"Cerâmica",Thera:"Tera",Crete:"Creta",Cyprus:"Chipre","San Lorenzo Tenochtitlán":"San Lorenzo Tenochtitlán","Step Pyramids":"Pirâmides de Degraus","Ritual Sacrifice":"SacrifÃcio RitualÃstico","Olmec Traders":"Mercadores Olmecas","Tres Zapotes":"Tres Zapotes","Stone Heads":"Cabeças de Pedra",Cacao:"Cacau","Olmec Hieroglyphics":"Hieróglifos Olmecas",Calendar:"Calendário","Stone Mask":"Máscara de Pedra","Loadstone Compass":"Bússola de Magnetita","Ball Games":"Jogos com Bola","Laguna de los Cerros":"Laguna de Los Cerros","La Venta":"La Venta","Long Walls I":"Muralha Extensa I","Long Walls II":"Muralha Extensa II","Long Walls III":"Muralha Extensa III","Long Walls IV":"Muralha Extensa IV","Emperor Qin Shi Huang":"Imperador Qin Shi Huang","King Wu of Qin":"Rei Wu de Qin",Metallurgy:"Metalurgia","Terracotta Warriors":"Guerreiros de Terracota","Eastern Zhou":"Zhou Oriental","Mandate of Heaven":"Mandato Celestial","Duke Zhuang of Qin":"Duque Zhuang de Qin","School of Diplomacy":"Escola de Diplomacia",Confucianism:"Confucionismo",Legalism:"Legalismo","Western Zhou":"Zhou Ocidental",Utopians:"Utopianos","Visions of Shangri-La":"Visões de Shangri-Lá","Path to Shangri-La":"Caminho para Shangri-Lá","Gates of Shangri-La":"Portões de Shangri-Lá","Shangri-La":"Shangri-Lá",Monastery:"Monastério",Portals:"Portais",Daochang:"Daochang","Lost Tomes":"Tomos Perdidos","Tree of Knowledge":"Ãrvore do Conhecimento",Charity:"Caridade",Meditation:"Meditar","Mountain Retreat":"Retiro nas Montanhas","Sacred Scroll":"Manuscrito Sagrado",Back:"Voltar",Next:"Próximo","Conditional cards":"Cartas com Condicionais","Multiplier cards":"Cartas com Multiplicadores","Numeric cards":"Cartas Numéricas","Unrest cards":"Cartas de Desordem","These score differently depending on certain conditions.":"Essas pontuam de maneira diferente dependendo de certas condições.","Include the civilisation's power card. No individual card may score more than 10 points.":"Inclui a carta de poder da civilização. Nenhuma carta pode pontuar mais do que 10 pontos.","Score the number on the card.":"Pontua o valor na carta.","Progress tokens":"Fichas de progresso","Population tokens":"Fichas de população","Material tokens":"Fichas de material","Each progress token scores 1 point.":"Cada ficha de progresso vale 1 ponto.","Not scored directly, but may be referred to by other cards.":"Não pontua diretamente, mas pode ser referenciada por outras cartas.","Resource tokens":"Fichas de recursos","Each
319Unrest card scores -2 points.":"Cada carta de Desordem vale -2 pontos.","The bot always scores the higher value for these cards.":"O autômato sempre pontua o maior valor para essas cartas.","The bot scores 5 points for each of these cards. Do not include the power card.":"O autômato pontua 5 pontos para cada carta dessas. Não inclui a carta de poder.","The bot scores 1 point for every 10 Resource and Population tokens combined.":"O autômato pontua 1 ponto para cada 10 fichas de população e material combinadas.","The bot scores 1 point for every 5 Resource and Population tokens combined.":"O autômato pontua 1 ponto para cada 5 fichas de população e material combinadas.","Save score":"Salvar pontuação","New game":"Nova partida","WINNER!":"VENCEDOR!","DRAW!":"EMPATE!",Close:"Fechar","Game mode":"Modo de Partida","Single game":"Partida única","Solo campaign":"Campanha Solo","Join game in progress":"Juntar-se a partida em andamento","Enemy civilisation":"Civilização inimiga","Boxes available":"Caixas disponÃveis","Number of players":"Número de jogadores",Random:"Aleatório","Surprise me!":"Me surpreenda!",Level:"NÃvel",Chieftain:"Chefe",Warlord:"Caudilho",Imperator:"Imperador",Sovereign:"Soberano",Overlord:"Suserano","Supreme Ruler":"LÃder Supremo","This bot has a hand size of 4 (place an exhaust token on slot 5).":"Esse autômato tem uma mão de 4 cartas (coloque uma ficha de exaustão no espaço 5).","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"Ao final de cada turno do autômato, após completar os espaços com as cartas do autômato, coloque a carta do topo do baralho do automâto na pilha de descarte.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"Esse autômato começa com as mesmas fichas de progresso, população e material que o jogador humano, e pontua 1 VP para cada 5 fichas de população e material.","This bot has a hand size of 6 (add slot marker 6).":"Esse autômato tem uma mão de 6 cartas (adicione o marcador de espaço 6).","Whenever the bot returns an Unrest card it gains 1 progress.":"A qualquer momento que o autômato devolve uma carta de Desordem, ele ganha 1 ficha de progresso.","Scoring method":"Método de pontuação","Full scoring (enter your cards and the app automatically scores them)":"Pontuação completa (informe suas cartas e o app irá calcular a pontuação automaticamente)","Basic scoring (enter score of scoring cards yourself)":"Pontuação básica (informe manualmente a pontuação das cartas)","Automatically save score after each game?":"Salvar automaticamente a pontuação após cada jogo?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"Adicionar suas pontuações salvas no banco de dados online para estatÃsticas da comunidade? Toda a informação identificatória será removida)","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"Você pode adicionar um nome de usuário (por exemplo, nome de usuário no BGG) para relacionar esse dispositivo, se quiser ver os resultados de diferentes dispositivos agrupados no ImperiumStats. Isso também permitirá que jogadores encontrem a sua partida mais facilmente para pontuações compartilhadas (usando 'Juntar-se a jogo em andamento' no menu de Modo de Partida).","No username at present":"Nenhum nome de usuário no momento","Set username":"Informar nome de usuário","Installing as a web app":"Instalar como um web app","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":"Essa página pode ser instalada como um web app na maioria dos celulares e tablets, o que permitirá o uso a partir da sua tela inicial e em modo offline. Você pode geralmente fazer isso escolhendo 'Adicionar à tela inicial' no seu navegador.","This page has more detailed instructions.":"Essa página tem informações mais detalhadas","Loa
319ding games in progress":"Carregando partidas em andamento","No games available to join at the moment. Sorry!":"Nenhuma partida disponÃvel para se juntar no momento. Desculpe!","This will delete your game in progress. Do you really want to do this?":"Isso irá apagar a partida em andamento. Realmente quer fazer isso?","Which game do you want to join?":"A qual partida gostaria de se juntar?","Which player are you?":"Qual jogador(a) é você?","Ask permission to join":"Peça permissão para se juntar","Awaiting response from game host...":"Aguardando permissão do anfitrião da partida...","Permission denied. Try another game.":"Permissão negada. Tente outra partida.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 pediu para se juntar à partida como $1 ($2). Tudo bem?","Are you sure you want to trigger the end of the game through Collapse?":"Tem certeza que quer disparar o final da partida através do Colapso?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":"Essa partida teve uma pontuação extremamente baixa de $0 por $1. Tem certeza que quer salvar? (Se foi uma partida de teste ou apenas estava experimentando o app, escolhar 'Cancelar' e a pontuação não será salva ou enviada para o banco de dados da comunidade.)","Game left unfinished last time. Resume?":"Partida incompleta da última vez. Continuar aquela partida?","Power card{0,s}":"Carta{0,s} de Poder","Select the side of the $0 power card you have been using":"Escolha a face da carta de poder $0 que estava em uso","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(A face A é voltara para jogadores mais experientes, a face B é para as suas primeiras partidas com uma civilização.)","The $0 also have their separate $1.":"$0 também tem carta{2,s} separadas.","Any score from the $0 is tracked here too.":"Qualquer ponto da carta{1,s} $0 é apresentado aqui também.","Journey cards":"Cartas de jornada","in play":"Em jogo",garrisoned:"Guarnecidas","in history":"na história","in deck/hand":"no baralho/na mão","in exile (optional)":"Exiladas (opcional)","in exile":"Exiladas",flooded:"Afundadas","Use photo...":"Usar foto...","Click on the icons to filter available cards by suit or civilisation.":"Clique nos Ãcones para filtrar as cartas disponÃveis por naipes ou civilização.","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"Nenhuma carta com habilidade de Guarnecer na área de jogo. Coloque algumas regiões ou outras cartas capazes de guarnecer em jogo primeiro.","Card $0 garrisoned under card $1":"Carta $0 guarnecida sob carta $1","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"Informe o número de cartas no exilo. Isso é opcional a menos que jogando uma carta como Monastério Utopiano que pontua baseada nesse número.","Count from photo...":"Contar a partir de foto...","Add your own notes about strategy here.":"Adicione suas anotações sobre estratégia aqui.","Game end trigger:":"Fim de Partida disparado por:","King of Kings (last fame card)":"Rei dos Reis (última carta de fama)","Main deck empty":"Pilha principal vazia","Player's final development":"Ãltima carta de desenvolvimento de um jogador","Discovery of Graal":"Descoberta do Graal","Arrival of Harald Hardrada":"Chegada de Harald Hardrada","Arrival at Shangri-La":"Chegada em Shangri-la","Most crucial cards (in player's strategy)":"Principais cartas (na estratégia do jogador)","Score all bot cards in a single pile. The bot does not score the power card":"Pontue todas as cartas do autômato em uma pilha única. O autômato não pontua sua carta de poder.","but any score from the $0 card{1,s} will be included in the final score.":"mas qualquer pontuação da carta{1,s} $0 será incluÃda na pontuação final.",Highscores:"Maiores Pontuações","Click on a player to get a breakdown of their score. Sort by:":"Clique em um jogador para obter mais informações sobre sua pontuação. Ordene por:","Most recent first":"Mais recente primeiro","Highest score first":"Maior pontuação primeiro","Highest average score first":"Maior média de pontuação primeiro","Greatest score difference first":"Maior diferença de pontuação primeiro","Winning civilisation":"Civilização vitoriosa","Single games only":"Partidas únicas apenas","Campaigns only":"Campanhas apenas","All games":"Todas partidas","Display single games only":"Mostrar partidas únicas apenas","Display campaigns only":"Mostrar campanhas apenas","Display all games":"Mostrar todas partidas",Stats:"EstatÃsticas",Statistics:"EstatÃsticas","Number of games played:":"Número de partidas jogadas:","Best score":"Melhor pontuação:","Worst score":"Pior pontuação:","Player-specific details:":"Detalhes especÃficos do jogador:","Average score":"Pontuação média","Import from another device":"Importar de outro dispositivo","Import data from clipboard":"Importar dados do clipboard","Copy data to clipboard":"Copiar dados para clipboard","Overall score":"Pontuação geral",Classics:"Clássicos",Legends:"Lendas","Classics only":"Clássicos apenas","Legends only":"Lendas apenas","Classics and Legends":"Clássicos e Lendas","Player $0":"Jogador $0",Civilisation:"Civilização",Bot:"Autômato","Use Commons and Fame cards from":"Usar cartas comuns e de Fama de:","Let me know on BGG (username hutchies) if you find any scoring errors!":"Me informe no BGG (usuário hutchies) se você encontrar qualquer erro de pontuação!",player:"jogador",players:"jogadores","$0 player{0,s}":"$0 jogador{0,es}",Note:"Anotações",Setup:"Preparação","Final results":"Resultado Final","Game results":"Resultado da Partida","Campaign update":"Atualização da Campanha",Collapse:"Colapso",Gameplay:"Gameplay","You can view statistics for just this device on ImperiumStats by clicking here.":"Você pode visualizar estatÃsticas apenas desse dispositivo em ImperiumStats clicando aqui.","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Você pode adicionar um nome de usuário (por exemplo, nome de usuário no BGG) para relacionar esse dispositivo, se quiser ver os resultados de diferentes dispositivos agrupados no ImperiumStats.","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":" Isso também permitirá que jogadores encontrem a sua partida mais facilmente para pontuações compartilhadas (usando 'Juntar-se a jogo em andamento' no menu de Modo de Partida).",Scoring:"Pontuação","cards in":"cartas em","Cards in":"Cartas em",Cancel:"Cancelar",tokens:"fichas",cards:"cartas","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Informe um nome de usuário visÃvel publicamente para relacionar esse dispositivo (ou deixe em branco para apagar)","ImperiumStats website":"ImperiumStats website",Change:"Mudar","Unable to access online scores database: ":"Não é possÃvel acessar o banco de dados online de pontuação",Edit:"Editar",optional:"opcional","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"Não foi possÃvel copiar para o clipboard: $0. Você pode copiar os dados manualmente a partir da caixa de texto abaixo.","Really delete all record of previous scores?":"Realmente quer apagar todos os registros de pontuação anteriores?","Scores deleted":"Pontuações apagadas","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"Não foi possÃvel ler do clipboard (talvez permissão negada?). Garanta que está acessando essa página via https e não http. Você pode copiar manualmente o clipboard abaixo para importar.","Problem parsing data: $0":"Problema ao parsear os dados: $0","Saved scores":"Pontuações salvas","Click on a game to get a breakdown of the score.":"Clique em uma partida para obter detalhes da pontuação.","card{0,s}
319":"carta{0,s} ",VP:"VP","Click here to visit ImperiumStats":"Clique aqui para visitar ImperiumStats","Upload score":"Enviar pontuação","Score saved":"Pontuação salva",as:"como","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 vitória{0,s}, $1 derrota{1,es}, $2 empate{2,s}","won $0, lost $1, drew $2":"Ganhou $0, perdeu $1, empatou $2","point{0,s}":"ponto{0,s}",scored:"pontuado","Game $0 of $1 in":"Partida $0 de $1 em","completed campaign":"campanha finalizada","ongoing campaign":"campanha em andamento","Bot level":"NÃvel do autômato","View on stats site":"Visualizar no site de estatÃsticas","Edit game":"Editar partida","Delete game":"Apagar partida","You have successfully defeated the":"Você derrotou com sucesso o","You have won $0 game{0,s} so far.":"Você venceu $0 partida{0,s} até o momento.","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":"Já que você está jogando contra o LÃder Supremo, você deve remover 1 carta de Desordem da pilha comum durante o restante da campanha.","In your next game, the bot will be at $0 level.":"Em sua próxima partida, o autômato será do nÃvel $0.","Please choose":"Por favor escolha","Add one of your Commons cards to your starting deck":"Adicione umas das suas cartas comuns ao seu baralho inicial","Remove one of your starting cards from the game":"Remova uma das suas cartas iniciais da partida.","Name of card":"Nome da carta",grande:"Grande","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"Você derrotou 5 civilizações diferentes e completou a campanha $0! Parabéns!","You were unable to defeat the $0.":"Você não conseguiu derrotar o $0.","You were defeated by the $0.":"Você foi derrotado pelo $0.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"Você foi derrotado 4 vezes e finalizou a campanha $0 derrotado. Mais sorte da próxima vez!","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"Você foi derrotado $0 vez{0,s} até o momento (de 4 possÃveis derrotas antes que você perca a campanha).","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":"Já que você está jogando contra o LÃder Supremo, você deve remover 1 carta de Desordem da pilha comum durante o restante da campanha. (Isso pode ser uma das cartas 3+ ou 4 jogadores removidas da preparação, se disponÃvel).","Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"Sua próxima partida será contra autômato de nÃvel $0 novamente, mas você começará com o dobro das fichas de material, população e progresso.","Awaiting final scores":"Aguardando pontuações finais","Save progress":"Salvar progresso","Complete campaign":"Completar campanha","Log cards":"Log das cartas",Tokens:"Fichas",Notes:"Anotações","by player":"por jogador","Cards in exile":"Cartas exiladas",Display:"Mostrar","Edit scores":"Editar pontuações","Export a CSV file for analysis":"Exportar um arquivo CSV para análise","Export data in CSV format":"Exportar dados em formato CSV","Include full scores breakdown in CSV?":"Incluir pontuação detalhada no CSV?","Delete all scores":"Apagar todas as pontuação",Victory:"Vitória",Draw:"Empate ",Defeat:"Derrota",Add:"Adicionar",Remove:"Remover","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"Remover 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> da pilha comum","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"Comece a próxima partida com 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> e 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"Devolva 1 removida <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> para a pilha comum, se possÃvel.",Campaign:"Campanha","Grand campaign":"Grande Campanha",Win:"Vitória",Loss:"Derrota",ongoing:"Em Andamento",completed:"Finalizada","ended in victory":"encerrada com vitória","ended in defeat":"encerrada com derrota","Completed on":"Finalizada em","Next game at $0 level":"Próxima partida com nÃvel $0",Cards:"Cartas","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"Não esqueça de remover até 2 Desordem da sua pontuação! (O app não fará isso para você.)","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":"O autômato encerrou a partida sem nenhuma ficha, o que é bem incomum. Tem certeza que você quer salvar? (Se foi só uma partida de teste ou se estava apenas testando o app, pressione 'Cancelar' e a partida não será salva).","Scores copied to clipboard":"Pontuações copiadas para o clipboard","Unable to load games in progress:":"Não foi possÃvel carregar partidas em andamento:","$0 game{0,s} available to join at the moment.":"$0 partida{0,s} disponÃveis para se juntar no momento.","Which do you want to join?":"A qual gostaria de se juntar?","A player":"Um jogador","Game in progress. Really quit?":"Partida em progresso. Quer realmente sair?","Processing image...":"Processando imagem...","No cards foun
319d: was the image in the right orientation?":"Nenhuma carta encontrada: a imagem está rotacionada corretamente?","$0 cards counted in exile.":"$0 cartas contadas no exilo","$0 cards automatically garrisoned":"$0 cartas guarnecidas automaticamente","$0 cards automatically put in history":"$0 cartas colocadas na história automaticamente","$0 cards automatically flooded":"$0 cartas afundadas automaticamente","$0 cards added to deck/hand/discard":"$0 cartas adicionards ao baralho/mão/descarte","$0 cards identified. $1 cards added to $2$3.":"$0 cartas identificadas. $1 cartas adicionadas à $2$3.","Solo grand campaign":"Grande Campanha Solo","played $0, won $1, lost $2, drew $3":"jogados $0, Vitórias $1, Derrotas $2, Empates $3","Start new campaign":"Começar nova campanha","Player name":"Nome do jogador","Campaign log to date":"Log atual da campanha","Grand campaign log to date":"Log atual da Grande Campanha","Enemy civilisation for game $0":"Civilização adversária para partida $0","Difficulty level":"Dificuldade do adversário",default:"padrão","OCR doesn't work offline...":"OCR não funciona em modo offline...","Choose an end-game trigger":"Escolha como o fim do jogo foi disparado","$0 game{0,s} played":"$0 partida{0,s} jogados",side:"face",on:"sobre","token{0,s}":"ficha{0,s}","Court card":"Carta de Corte"},zh:{Persians:"æ³¢æ¯","City of Persepolis":"æ³¢æ¯æ³¢å©æ¯å","Battering Ram":"æ»åæ§",Development:"åå±",Windmills:"é£è½¦",Satrap:"æ»ç£","Persian Gold":"æ³¢æ¯é»é",Babylonians:"å·´æ¯ä¼¦","Darius I":"大æµå£«ä¸ä¸","Median Empire":"ç±³åºçå½","Nisaean Plain":"å°¼è¨å¹³å",Arachosia:"é¿æé西äº",Unrest:"å¨ä¹±",Glory:"è£è",Prosperity:"ç¹è£",Advance:"è¿æ¥",Conquer:"徿",Lydians:"ååºäº",Zagros:"ææ ¼ç½æ¯",Bactria:"å·´å
ç¹éäº","Standing Army":"常å¤å","Jade Mask":"ç¿¡ç¿ é¢å
·",Elders:"é¿è",Town:"æé",Shrine:"å£ç¥ ",Invasion:"å
¥ä¾µ",Mysticism:"ç¥ç§ä¸»ä¹",Oracle:"ç¥è°",Agriculture:"åä¸",Boats:"è¹åª",Leadership:"é¢å¯¼",Shaduf:"æ¡æ§","Lost Scroll":"失è½å¤å·","Rituals & Ceremonies":"仪å¼ä¸å
¸ç¤¼",Ambassador:"使è",City:"åå¸",Gambling:"èµå",Port:"港å£",Diplomacy:"å¤äº¤",Wilderness:"èå",Jungle:"䏿",Mountain:"å±±è",Coast:"海岸",Floodplain:"æ³æ»¥å¹³å",Forest:"森æ",Oasis:"绿洲",Hills:"ä¸éµ",Marsh:"湿å°",Steppe:"èå",River:"æ²³æµ",Cape:"海岬",Woodland:"æå°","Sacred Pass":"ç¥å£å±±å£",Armenians:"äºç¾å°¼äº",Assyrians:"äºè¿°",Egyptians:"åå",Ionians:"ç±å¥¥å°¼äº",Qin:"大秦",Olmecs:"奥尿¢
å
",Sumerians:"èç¾å°",Aksumites:"é¿å
èå§",Minoans:"米诺æ¯",Mauryans:"åéçæ",Hittites:"赫梯","Drama & Poetry":"æå§ä¸è¯æ",Education:"æè²",Moneylenders:"æ¾åºè
",Corruption:"è
è´¥",Onager:"æç³è½¦",Temple:"ç¥æ®¿",Cataphract:"éç²éªå
µ",Metropolis:"é¦é½",Pharmacy:"å»å¦",Wonder:"å¥è§",Coinage:"é¸å¸",Exports:"åºå£","Urban Development":"åå¸åå±",Mercenaries:"ä½£å
µ",Mining:"å¼é",Espionage:"åºæ¢",Monument:"丰ç¢","Code of Laws":"æ³å
¸",Religion:"ä¿¡ä»°",Domestication:"驯å","Water Mill":"水车",Qanat:"ææ¸ ","Road Building":"é路建设",Art:"èºæ¯","Fortunate Isle":"åºä½ä¹å²",Rainforest:"鍿","Mountainâ":"å±±è",Peninsula:"åå²",Lakes:"æ¹æ³",Highlands:"é«å","Sacred Grove":"ç¥å£åæ",Lowlands:"ä½å°",Moor:"èæ³½",Plain:"å¹³å",Archipelago:"群å²","Fortified Region":"é©»é²åº",Grassland:"èå",Island:"æµ·å²",Etruscans:"ä¼ç¹é²éäº",Scythians:"æ¯åºæ³°",Vikings:"维京",Phoenicians:"è
å°¼åº",Romans:"ç½é©¬",Greeks:"å¸è
",Carthaginians:"迦太åº",Celts:"å¯å°ç¹",Macedonians:"马å
¶é¡¿",Xiongnu:"å奴",Astronomy:"天æå¦",Cartography:"å¶å¾å¦",Masonry:"ç³å·¥","Civil Service":"è¡æ¿é¨é¨",Amphitheatre:"åå½¢ç«æåº","King of Kings":"ä¼çä¹ç",Praiseworthy:"颿¬",Great:"éä¼",Notorious:"æ¶å",Marvellous:"é¸ä¸",Glorious:"å
è£",Triumphant:"坿","Awe-inspiring":"æ¬ç",Imperial:"è³é«",Independent:"ç¬ç«",Magnificent:"壮丽",Outstanding:"æ°åº",Proud:"éªå²",Eminent:"æ¾èµ«",Acclaimed:"èµèª","City of Carthage":"迦太åºå",Elephants:"æè±¡",Hegemony:"鏿",Hannibal:"æ±å°¼æ","Trading Ships":"åè¹",Monopoly:"åæ",Caravans:"åé",Iberia:"伿¯å©äº",Berbers:"ææå°","Dido, Queen of Carthage":"çå¤ï¼è¿¦å¤ªåºå¥³ç","Carthaginian Traders":"迦太åºå人","Balearic Islands":"å·´å©äºé群å²",Mauretania:"æ¯éå¡å°¼äº","Celtic Gold":"å¯å°ç¹é»é","Celtic Innovation":"å¯å°ç¹åæ°",Chainmail:"é¾ç²",Chariots:"æè½¦","Ogham Script":"欧ç忝",Vercingetorix:"ç»´é¦æå©",Armorica:"é¿è«éå¡",Belgica:"è´å°åå¡",Britannia:"ä¸åé¢ å°¼äº",Hibernia:"å¸ä¼¯å°¼äº",Druids:"å¾·é²ä¼",Boudicca:"å¸çå¡","Cattle Raid":"嫿 ç²ç","Cauldron of Ceridwen":"å¯ä¸½å¾·æ¸©ç大é
",Celtica:"å¯å°æå¡","Olympic Games":"奥æå¹å
è¿å¨ä¼",Philosophy:"å²å¦",Lighthouse:"ç¯å¡","Direct Democracy":"ç´æ¥é举","Greek Innovation":"å¸è
åæ°",
319Science:"ç§å¦","City of Corinth":"ç§ææ¯å",Pericles:"伯éå
å©","Greek Prosperity":"å¸è
ç¹è£","City of Athens":"é
å
¸å","Plains of Thessaly":"è²è¨å©å¹³å",Settlers:"ç§»æ°","Greek Mercenaries":"å¸è
ä½£å
µ","City of Sparta":"æ¯å·´è¾¾å","Forest of Pholoe":"ç¦ç½å森æ",Peleponnese:"伯ç½å¥å°¼æ",Alexander:"äºå山大","Alexander the Great":"äºå山大大å¸",Parmenion:"叿¼çº½","Alexandria in Ariana":"é¿éäºçº³çäºå山大å","Alexandria in Egypt":"ååçäºå山大å",Mosaics:"é¶åµå£ç»","Companion Cavalry":"ä¼åéªå
µ",Uxians:"æ¸å
西äº","Philip II":"è
åäºä¸",Phalanx:"æ¹éµ",Pelagonia:"佩æåå°¼äº","Haliacmon Valley":"é¿å©é¿å
è山谷",Orestis:"奥鷿¯èæ¯","Julius Caesar":"å°¤å©ä¹æ¯Â·å¯æ","Military Engineering":"åäºå·¥ç¨å¦","Roman Invasion":"ç½é©¬å
¥ä¾µ",Legions:"åå¢","The Senate":"å
èé¢","Rome, the Eternal City":"ç½é©¬ï¼æ°¸æä¹å","Emperor Trajan":"徿ç大å¸","Bread and Circuses":"é¢å
å马æ","Gallia Aquitania":"é¿åºå¦é«å¢",Raetia:"é·èäº",Triumvirate:"ä¸å¤´åç","City of Rome":"ç½é©¬å",Dalmatia:"è¾¾å°é©¬æäº","Roman Expansion":"ç½é©¬æ©å¼ ",Jewellery:"éé¶ç å®",Ateas:"é¿æäºæ¯",Kurgans:"åºå°å¹²","City of Gelonus":"çæ´è¯ºæ¯å",Raiders:"嫿 ",Tamga:"塿¨å ","Pontic Steppe":"黿µ·å¤§èå","Tarim Basin":"å¡éæ¨çå°",Caucasia:"é«å ç´¢",Nomads:"æ¸¸ç§æ°",Tents:"å¸ç¯·","Mounted Archers":"å¼éªå
µ","Carpathian Mountains":"åå°å·´é¡å±±è","Tian Shan":"天山","Harald Hardrada":"åæå°å¾·Â·åå¾·æè¾¾","Go A'Viking":"åºæµ·æ 夺",Combs:"梳æ´","Rollo the Walker":"æ¥è¡è
ç½æ´",Skis:"æ»éª",Longships:"é¿è¹",Sagas:"ä¼ å¥æ
äº","City of Dubh Linn":"齿æå",Graenland:"æ ¼éµå
°å²","Føroyar":"æ³ç½ç¾¤å²",Iceland:"å°å²",Vinland:"æå
°",Jomsviking:"çº¦å§æ¯ç»´äº¬",Gothja:"女é
é¿",Althing:"å
¨ä½è®®ä¼",Scandinavia:"æ¯å ªç纳维äº","Erik the Red":"红ååéå
",Arthurians:"äºççæ","King Arthur's Court":"äºççå»·","Gwaith Camlan":"å¡å§å
°ä¹æ",Graal:"壿¯","Lawnslot y Llyn (Sir Lancelot)":"æ¹ä¸éªå£«å
°æ¯æ´ç¹","Twrch Trwyth":"å¾é²å¤«Â·å¾é²ç»´æ¯","Taliesin the Bard":"è¯äººå¡å©åè¾",Excalibur:"æ¹ä¸å","Bedwyr (Sir Bedevire)":"è´å¾·ç»´å°çµå£«","Viviane of the Lake":"æ¹ä¹ä»å¥³èèå®","City of Camelot":"å¡ç¾æ´å","Britannia Flavia":"ä¸åé¢ å°¼äºå¼æç»´äº","Ynys Afallach (Avalon)":"é¿ç¦é","Gwalchmei (Sir Gawain)":"髿çµå£«","Lady Bertilak":"è´èæå
夫人",Morigena:"è«éçå¨","Peredur (Sir Percival)":"å¸è¥¿ç¦å°çµå£«","Cai (Sir Kay)":"å¯çµå£«","King Arthur":"äºçç","Uthyr Pendragon":"å°¤ç·æ½å¾·æè´¡","Britannia Prima":"第ä¸ä¸åé¢ å°¼äº","Britannia Secunda":"第äºä¸åé¢ å°¼äº","Myrddin Wyllt (Merlin)":"æ¢
æ",Guennuvar:"æ¡å¦®èå°",Cafall:"塿³å°",Atlanteans:"äºç¹å
°èæ¯","Advanced Culture":"å
è¿æå","Palace of Poseidon":"æ³¢å¡å¬å®«æ®¿","Spread of Atlantis":"äºç¹å
°èæ¯æ©å±","Moats and Walls":"æ¤åæ²³ä¸åå¢","Myths and Legends":"ç¥è¯ä¸ä¼ 说","Vast Wealth":"é山鶿µ·",Kleito:"å
è±æ","Mountain of Atlantis":"äºç¹å
°èæ¯å±±",Themiscyra:"å¿å¼¥æ¯åºæ",Flood:"洪水",Thule:"æåä¹å°",Hesperides:"éè¹æå","Elysian Fields":"æä¹ä¹å¢","Atlantean Fleet":"äºç¹å
°èæ¯è°é",Unification:"ç»ä¸",Embalming:"å°¸ä½é²è
",Obelisk:"æ¹å°ç¢","Ramesses II":"æç¾è¥¿æ¯äºä¸","Egyptian Expansion":"ååæ©å¼ ",Medicine:"å»å¦",Pyramids:"éåå¡","Egyptian Legacy":"ååé产",Kushites:"åºæ½","Red Land":"红åå°","Flood of the Nile":"å°¼ç½æ²³æ³æ»¥","Egyptian Incursion":"ååå
¥ä¾µ","Egyptian Hieroglyphics":"åå象形æå","Nile Valley":"å°¼ç½æ²³è°·","Lower Nile":"å°¼ç½æ²³ä¸æ¸¸",Mathematics:"ç®æ¯","Grand Trunk Road":"大干é",Ashoka:"é¿è²ç",Buddhism:"使","Edicts of Ashoka":"é¿è²çè¯ä¹¦","Punch-Marked Coins":"å²åé±å¸",Arthashastra:"æ¿äºè®º","Nanda Dynasty":"é¾éçæ","City of Pataliputra":"åæ°å","Indian Elephants":"å°åº¦æè±¡",Gandhara:"çéç½",Chandragupta:"æéç½ç¬å¤",Chanakya:"éé£è¿¦",Magadha:"æ©æé","Indus Valley":"å°åº¦æ²³è°·","King Minos":"米诺æ¯ç","Minoan Traders":"米诺æ¯å人","Drainage System":"ææ°´ç³»ç»",Architecture:"建çå¦",Frescos:"å£ç»",Labyrinth:"迷宫","Minoan Expansion":"ç±³è¯ºæ¯æ©å¼ ","Seal Stones":"å°ç³","Writing Systems":"书åç³»ç»",Knossos:"å
诺索æ¯",Pottery:"é¶å¨",Thera:"顿å²",Crete:"å
éç¹å²",Cyprus:"塿µ¦è·¯æ¯å²","San Lorenzo Tenochtitlán":"壿´ä¼¦ç´¢Â·ç¹è¯ºå¥æç¹æ","Step Pyramids":"é¶æ¢¯éåå¡","Ritual Sacrifice":"ç¥ç¥ä»ªå¼","Olmec Traders":"奥尿¢
å
å人","Tres Zapotes":"ç¹é·æ¯Â·è¨æ³¢ç¹æ¯","Stone Heads":"å·¨ç³å¤´å",Cacao:"å¯å¯","Olmec Hieroglyphics":"奥尿¢
å
象形æå",Calendar:"åæ³","Stone Mask":"ç³è´¨é¢å
·","Loadstone Compass":"ç£ç³æåé","Ball Games":"çèµ","Laguna de los Cerros":"æå¤çº³Â·å¾·Â·æ´æ¯å¡ç½æ¯","La Venta":"ææå¡","Long Walls I":"é¿å 壹","Long Walls II":"é¿å è´°","Long Walls III":"é¿å å","Long Walls IV":"é¿å è","Emperor Qin Shi Huang":"秦å§ç","King Wu of Qin":"秦æ¦ç",Metallurgy:"å¶é","Terracotta Warriors":"å
µé©¬ä¿","Eastern Zhou":"ä¸å¨","Mandate of Heaven":"åå½äºå¤©","Duke Zhuang of Qin":"秦åºå
¬","School of Diplomacy":"纵横家",Confucianism:"åå®¶ææ³",Legalism:"æ³å®¶ææ³","Western Zhou":"西å¨",Utopians:"乿é¦","Visions of Shangri-La":"馿 ¼éæä¹æ¯","Path to Shangri-La":"馿 ¼éæä¹è·¯","Gates of Shangri-La":"馿 ¼éæä¹é¨","Shangri-La":"馿 ¼éæ",Monastery:"ç¦
寺",Portals:"ä¼ éé¨",Daochang:"éåº","Lost Tomes":"失è½å¤ç±","Tree of Knowledge":"æºæ
§æ ",Charity:"ä»ç±",Meditation:"奿³","Mountain Retreat":"å±±ä¸éä¿®","Sacred Scroll":"ç¥å£å¤å·",Back:"è¿å",Next:"ä¸ä¸æ¥","Conditional cards":"æ¡ä»¶è®¡åç","Multiplier cards":"å¯åæ°å¼è®¡åç","Numeric cards":"æ°å¼è®¡åç","Unrest cards":"å¨ä¹±ç","These score differently depending on certain conditions.":"æ ¹æ®ç¹å®æ¡ä»¶è·å¾çåæ°ä¸åã","Include the civilisation's power card. No individual card may score more than 10 points.":"å
æ¬è¯¥ææçå¿åçï¼åå¼ çå¾åä¸å¾å¤äº10åã","Score the number on the card.":"è·å¾å¡çä¸å¯¹åºæ°åçåæ°ã","Progress tokens":"è¿åº¦æç¤ºç©","Population tokens":"äººå£æç¤ºç©","Material tokens":"æææç¤ºç©","Each progress token scores 1 point.":"æ¯ä¸ªè¿åº¦æ è®°è·å¾1åã","Not scored directly, but may be referred to by other cards.":"æ æ³ç´æ¥å¾åï¼ä½å¯è¢«å
¶ä»å¡çæåã","Resource tokens":"èµæºæç¤ºç©","Each Unrest card scores -2 points.":"æ¯å¼ å¨ä¹±çå¾-2åã","The bot always scores the higher value for these cards.":"èªå¨æºè·å¾æç¤ºå¾æé«èå©åæ°ã","The bot scores 5 points for each of these cards. Do not include the power card.":"èªå¨æºæ¤ç±»å¡çè·å¾5èå©åæ°ï¼ä¸å
æ
319¬å¿åçã","The bot scores 1 point for every 10 Resource and Population tokens combined.":"èªå¨æºæ¯10个人å£åæææç¤ºç©ï¼ä»»æç»åï¼å¯ä»¥è·å¾1èå©åæ°ã","The bot scores 1 point for every 5 Resource and Population tokens combined.":"èªå¨æºæ¯5个人å£åæææç¤ºç©ï¼ä»»æç»åï¼å¯ä»¥è·å¾2èå©åæ°ã","Save score":"ä¿ååæ°","New game":"æ°æ¸¸æ","WINNER!":"èå©ï¼","DRAW!":"å¹³æï¼",Close:"å
³é","Game mode":"æ¸¸ææ¨¡å¼","Single game":"å屿¸¸æ","Solo campaign":"å人æå½¹","Join game in progress":"å å
¥è¿è¡ä¸ç对å±","Enemy civilisation":"ææ¹ææ","Boxes available":"游ç©å
容","Number of players":"游æäººæ°",Random:"éæºéå","Surprise me!":"æ¥ç¹ææ",Level:"ç级",Chieftain:"é
é¿",Warlord:"åé",Imperator:"ç»å¸
",Sovereign:"åç",Overlord:"é¸ä¸»","Supreme Ruler":"è³å°","This bot has a hand size of 4 (place an exhaust token on slot 5).":"该èªå¨æºæçåºååªæ4æ ¼ï¼å¨æ è®°5䏿¾ç½®ä¸ä¸ªèç«æç¤ºç©ï¼ã","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"å¨èªå¨æºååç»ææ¶ï¼å¨éæ°å¡«æ»¡å¡æ§½åï¼å°èªå¨æºçåºé¡¶ç1å¼ çæ¾å
¥èªå¨æºå¼çå ã","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"ä¸ç»å¸
级å«ç³»ç»ï¼ä½å¨è®¾ç½®ä¸ä¼ç»èªå¨æºä¸æ®éç©å®¶åæ ·æ°éçææã人å£åè¿æ¥æç¤ºç©ï¼èªå¨æºæ¯æ5ä¸ªäººå£æææçç»åå°±ä¼è·å¾1èå©åæ°ã","This bot has a hand size of 6 (add slot marker 6).":"该èªå¨æºæ6ä¸ªå¡æ§½ï¼å å
¥å¡æ§½æ è®°6ã","Whenever the bot returns an Unrest card it gains 1 progress.":"å½èªå¨æºè¿è¿1å¼ å¨ä¹±çæ¶è·å¾1è¿æ¥æç¤ºç©ã","Scoring method":"è®¡åæ¹å¼","Full scoring (enter your cards and the app automatically scores them)":"详ç»è®¡åï¼è¾å
¥ä½ çå¡çç¶åappèªå¨å¸®ä½ 计åï¼","Basic scoring (enter score of scoring cards yourself)":"åºç¡è®¡åï¼èªå©è¾å
¥å¡çèå©åæ°ï¼","Automatically save score after each game?":"æ¯å±æ¸¸ææ¯å¦èªå¨ä¿ååæ°ï¼","Add your saved scores to online database for community statistics? (All identifying information is removed)":"æ¯å¦å
许å°ä½ ä¿åçåæ°è®°å½å å
¥å¨çº¿æ°æ®åºï¼ä»¥ä¾ç¤¾ç¾¤æ°æ®åæï¼ææçææä¿¡æ¯å°è¢«ç§»é¤ï¼ï¼","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"å¦æä½ æ³å¨ImperiumStatsä¸ä½¿ç¨ä¸åç设å¤ä¸æ¥ç对å±ä¿¡æ¯çè¯ï¼ä½ å¯ä»¥æ·»å ä¸ä¸ªç¨æ·åï¼æ¯å¦ä½ å¨BGGçç¨æ·åï¼æ¥å
³èæ¬è®¾å¤ãè¿æ ·åä¹å¯è½è®©å
¶ä»ç©å®¶æ´å®¹ææ¾å°ä½ ç坹屿¥è¿è¡å享ï¼å¨âæ¸¸ææ¨¡å¼âä¸éæ©âå å
¥ä¸ä¸ªè¿è¡ä¸ç对å±âï¼ã","No username at present":"ææ ç¨æ·å","Set username":"è®¾ç½®ç¨æ·å","Installing as a web app":"ä½ä¸ºä¸ä¸ªWeb Appè¿è¡å®è£
","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":"å¨å¤§å¤æ°ææºæå¹³æ¿ä¸é½å¯ä»¥å®è£
æ¬é¡µé¢ä½ä¸ºä¸ä¸ªWeb Appãè¿æ ·åå¯ä»¥è®©ä½ æ¹ä¾¿å°å¨ä¸»é¡µè®¿é®æ¬åºç¨ã","This page has more detailed instructions.":"æ¬é¡µé¢ææ´è¯¦ç»ç说æã","Loading games in progress":"å 载对å±ä¸","No games available to join at the moment. Sorry!":"æ±æï¼ç®å没æå¯¹å±å¯ä»¥å å
¥ã","This will delete your game in progress. Do you really want to do this?":"è¿æ ·åä¼å é¤è¿è¡ä¸ç对å±ä¿¡æ¯ï¼ç¡®å®åï¼","Which game do you want to join?":"ä½ æ³å å
¥åªä¸ä¸ªå¯¹å±ï¼","Which player are you?":"ä½ æ¯åªä½ç©å®¶ï¼","Ask permission to join":"请æ±å å
¥å¯¹å±","Awaiting response from game host...":"çå¾
对å±å建è
åºçä¸â¦","Permission denied. Try another game.":"请æ±è¢«æç»ãå°è¯å
¶ä»å¯¹å±ã","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 请æ±å å
¥å¯¹å±ï¼æä¸º $1 ($2). æ¯å¦å
许?","Are you sure you want to trigger the end of the game through Collapse?":"ç¡®å®è§¦åå´©æºæ¥ç»ææ¬å±æ¸¸æåï¼
319","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":"æ¬å±æ¸¸æçèå©å¾åé常ä½ï¼$1è·å¾äº$0èå©åãä½ ç¡®å®è¦ä¿åæ¬å¯¹å±åï¼ï¼å¦æåªæ¯ä¸æ¬¡æµè¯ï¼ä½ å¯ä»¥ç¹å»âéåºâæé®ï¼é£ä¹æ¬å±æ°æ®å°ä¸ä¼ä¸ä¼ å°ç¤¾åºæ°æ®åºä¸ãï¼","Game left unfinished last time. Resume?":"䏿¬¡å¯¹å±è¿æªç»æï¼æ¯å¦æ¢å¤è¯¥å¯¹å±ï¼","Power card{0,s}":"å¿åç","Select the side of the $0 power card you have been using":"使ç¨çæ¯$0å¿åççåªä¸é¢","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"ï¼Aé¢éåæ´æç»éªçç©å®¶ï¼Bé¢éåå䏿æä¸ªæææ¶ä½¿ç¨ãï¼","The $0 also have their separate $1.":"$0乿ç¬ç«ç$1ã","Any score from the $0 is tracked here too.":"$0ä¸çåæ°ä¹å¨è¿éè®°å½ã","Journey cards":"æ
ç¨ç","in play":"å¨åºä¸",garrisoned:"å·²è¿é©»","in history":"å¨åå²ä¸","in deck/hand":"卿ç/çåºä¸","in exile (optional)":"被æ¾éï¼å¯éï¼","in exile":"被æ¾é",flooded:"被淹没","Use photo...":"ä¸ä¼ ç
§çâ¦","Click on the icons to filter available cards by suit or civilisation.":"ç¹å»å¯¹åºå¾æ è¿è¡çé","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"游æåºä¸æ²¡æå¯è¿é©»çå¡çã请å
æ¾å
¥å°åçæå
¶ä»å¸¦æè¿é©»å
³é®è¯çå¡çã","Card $0 garrisoned under card $1":"å¡ç$0è¿é©»å°å¡ç$1","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"è¾å
¥æ¾éçå ä¸çå¡çæ°éãè¿æ¯å¯éçï¼é¤éä½ æåºäºç±»ä¼¼â乿é¦çä¿®éé¢âè¿æ ·éè¦æ ¹æ®æ¾éçæ°é计åçå¡çã","Count from photo...":"ä»ç
§ç读åä¸â¦","Add your own notes about strategy here.":"æ·»å 夿³¨æå说æä½ æ¬æ¬¡å¯¹å±ççç¥","Game end trigger:":"游æç»æè§¦åï¼","King of Kings (last fame card)":"ä¼çä¹ç被翻é¢ï¼æåä¸å¼ 声æçï¼","Main deck empty":"主çåºæ²¡æå©ä½å¡ç","Player's final development":"ä¸ä½ç©å®¶åå±äºä»æåä¸å¼ åå±ç","Discovery of Graal":"äºççæç©å®¶æåºä»çâ壿¯âç","Arrival of Harald Hardrada":"维京ç©å®¶å°ä»çâåæå°å¾·Â·åå¾·æè¾¾âæ¾å
¥ä»çå¼çå ","Arrival at Shangri-La":"乿é¦ç©å®¶å°è¾¾äºâ馿 ¼éæâ","Most crucial cards (in player's strategy)":"å
³é®çï¼ç©å®¶çç¥ä¸çï¼","Score all bot cards in a single pile. The bot does not score the power card":"ä¸èµ·è®¡ç®ææèªå¨æºå¡ççèå©å¾åãèªå¨æºä¸éè¦è®¡ç®å¿åçå¾åã","but any score from the $0 card{1,s} will be included in the final score.":"使¯$0å¼ çä¼å
å«å¨æç»èå©å¾åä¸ã",Highscores:"é«åæ¦","Click on a player to get a breakdown of their score. Sort by:":"ç¹å»ä¸åç©å®¶ä»¥æ¥çä»ç对å±å¾åãææ¤æåºï¼","Most recent first":"æè¿å¯¹å±","Highest score first":"æé«å¾å","Highest average score first":"æé«å¹³åå¾å","Greatest score difference first":"æé«åå·®","Winning civilisation":"è·èææ","Single games only":"ä»
å屿¸¸æ","Campaigns only":"ä»
å人æå½¹æ¨¡å¼","All games":"ææå¯¹å±","Dis
319play single games only":"ä»
æ¾ç¤ºå屿¸¸æ","Display campaigns only":"ä»
æ¾ç¤ºå人æå½¹","Display all games":"æ¾ç¤ºææå¯¹å±",Stats:"æ°æ®",Statistics:"æ°æ®åæ","Number of games played:":"坹屿°ï¼","Best score":"æé«å","Worst score":"æä½å","Player-specific details:":"ç©å®¶å
·ä½ä¿¡æ¯","Average score":"å¹³åå","Import from another device":"ä»å
¶ä»è®¾å¤å¯¼å
¥","Import data from clipboard":"ä»åªè´´æ¿å¯¼å
¥","Copy data to clipboard":"å¤å¶å°åªè´´æ¿","Overall score":"æ»å¾å",Classics:"ç»å
¸",Legends:"ä¼ å¥","Classics only":"ä»
ç»å
¸","Legends only":"ä»
ä¼ å¥","Classics and Legends":"ç»å
¸ + ä¼ å¥","Player $0":"ç©å®¶$0",Civilisation:"ææ",Bot:"èªå¨æº","Use Commons and Fame cards from":"使ç¨çå
¬ç¨çå声æçæ¥èª","Let me know on BGG (username hutchies) if you find any scoring errors!":"妿åç°ä»»ä½è®¡åé误ï¼è¯·ä¸BGGèç³»æï¼ç¨æ·åhutchiesï¼",player:"ç©å®¶",players:"ç©å®¶","$0 player{0,s}":"$0åç©å®¶",Note:"夿³¨",Setup:"åå§è®¾ç½®","Final results":"æç»ç»æ","Game results":"对å±ç»æ","Campaign update":"æ´æ°æå½¹",Collapse:"å´©æº",Gameplay:"游æè¿ç¨","You can view statistics for just this device on ImperiumStats by clicking here.":"ä»
ç¨æ¤è®¾å¤è®¿é®ImperiumStatsçæ°æ®ï¼ç¹å»æ¤å¤","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"å¦æä½ æ³å¨ImperiumStatsä¸ä½¿ç¨ä¸åç设å¤ä¸æ¥ç对å±ä¿¡æ¯çè¯ï¼ä½ å¯ä»¥æ·»å ä¸ä¸ªç¨æ·åï¼æ¯å¦ä½ å¨BGGçç¨æ·åï¼æ¥å
³èæ¬è®¾å¤ã","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"è¿æ ·åä¹å¯è½è®©å
¶ä»ç©å®¶æ´å®¹ææ¾å°ä½ ç坹屿¥è¿è¡å享ï¼å¨âæ¸¸ææ¨¡å¼âä¸éæ©âå å
¥ä¸ä¸ªè¿è¡ä¸ç对å±âï¼ã",Scoring:"计å","cards in":"å¼ ç","Cards in":"å¼ ç",Cancel:"éåº",tokens:"个æç¤ºç©",cards:"å¼ ç","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"è¾å
¥ä¸ä¸ªç¨æ·åï¼å
¬å¼å¯è§ï¼å
³èæ¬è®¾å¤ï¼ç空以å é¤ï¼","ImperiumStats website":"ImperiumStatsç½ç«",Change:"åæ´","Unable to access online scores database: ":"æ æ³è¿æ¥å¨çº¿è®¡åæ°æ®åºï¼",Edit:"ç¼è¾",optional:"å¯é","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"æ æ³å¤å¶å°åªè´´æ¿ï¼$0ãä½ å¯ä»¥ä»ä¸æ¹çææ¬æ¡æå¨å¤å¶ã","Really delete all record of previous scores?":"确认å é¤ä¹åçææè®¡ååï¼","Scores deleted":"计åå·²å é¤","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"æ æ³è¯»ååªè´´æ¿ï¼æè®¸è¯»å请æ±è¢«æç»ï¼ï¼ãç¡®ä¿ä½ éè¿httpsè䏿¯httpè®¿é®æ¬é¡µé¢ãä½ å¯ä»¥æå¨ç²è´´å°ä¸æ¹çææ¬æ¡æ¥å¯¼å
¥ã","Problem parsing data: $0":"æ°æ®è§£æåºéï¼$0","Saved scores":"ä¿åçå¾åè®°å½","Click on a game to get a breakdown of the score.":"ç¹å»ä¸ä¸ªå¯¹å±æ¥ç详ç»çå¾åæ
åµ","card{0,s}":"å¡ç{0,s}",VP:"èå©åæ°","Click here to visit ImperiumStats":"ç¹æ¤è®¿é®ImperiumStats","Upload score":"ä¸ä¼ å¾åè®°å½","Score saved":"è®°å½å·²ä¿å",as:"ä½ä¸º","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 èå©ï¼$1 失败ï¼$2 å¹³å±","won $0, lost $1, drew $2":"èå© $0, 失败 $1, å¹³å± $2","point{0,s}":"ç¹",scored:"已计å","Game $0 of $1 in":"$0/$1对å±","completed campaign":"宿çæå½¹","ongoing campaign":"è¿è¡ä¸çæå½¹","Bot level":"èªå¨æºç级","View on stats site":"åæ°æ®é¡µé¢æ¥ç","Edit game":"ç¼è¾å¯¹å±","Delete game":"å é¤å¯¹å±","You have successfully defeated the":"ä½ å·²æåå»è´¥","You have won $0 game{0,s} so far.":"ç®åï¼ä½ å·²ç»è·è$0次对å±ã","Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.":"ç±äºä½ 对æçæ¯è³å°çº§çèªå¨æºï¼æ¬å±æ¸¸æä¸ä½ å¿
é¡»ä»å
¬ç¨çåºç§»é¤1å¼ å¨ä¹±çã","In your next game, the bot will be at $0 level.":"ä¸ä¸å±ï¼ä½ 对æçèªå¨æºä¸º$0级ã","Please choose":"è¯·éæ©","Add one of your Commons cards to your starting deck":"èµ·å§çåºä¸å å
¥ä¸å¼ ä½ çå
¬ç¨ç","Remove one of your starting cards from the game":"æ¬å±æ¸¸æä¸ç§»é¤ä¸å¼ ä½ çèµ·å§å¡ç","Name of card":"å¡çåç§°",grande:"æ¾è¦ç","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"ä½ æåå»è´¥äº5个ä¸åçææå®æäºæå½¹$0ï¼æåï¼~","You were unable to defeat the $0.":"ä½ æ²¡è½å»è´¥$0ã","You were defeated by the $0.":"ä½ è¢«$0å»è´¥ã","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"ä½ å·²å¤±è´¥4æ¬¡ï¼æ¬æ¬¡æå½¹ä»¥å¤±è´¥åç»ã䏿¬¡å¥½è¿ï¼","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"å°ç°å¨ä¸ºæ¢ï¼ä½ 已被å»è´¥$0次ã","Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)":"ç±äºä½ 对æçæ¯è³å°çº§çèªå¨æºï¼æ¬æ¬¡æå½¹ä½ å¿
é¡»æ¾å1å¼ ç§»é¤çå¨ä¹±çå°å
¬ç¨çåºï¼è¿å¯è½æ¯ä¸å¼ 3+æ4ç©å®¶çå¡çï¼ã","Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens. ":"ä¸ä¸å±ä½ ä¼å次对æ$0级çèªå¨æºï¼ä½ä½ åå§ä¼è·å¾ååçèµ·å§èµæºã","Awaiting final scores":"çå¾
æç»è®¡å","Save progress":"ä¿åå½åè¿åº¦","Complete campaign":"宿æå½¹","Log cards":"æ¥å¿å¡ç",Tokens:"æç¤ºç©",Notes:"夿³¨","by player":"ç±ç©å®¶","Cards in exile":"æ¾éçå¡ç",Display:"æ¾ç¤º","Edit scores":"ç¼è¾å¾å","Export a CSV file for analysis":"导åºä¸ä¸ªcsvæä»¶","Export data in CSV format":"å¯¼åºæ°æ®ä¸ºCSV","Include full scores breakdown in CSV?":"å
æ¬ææCSVä¸çå¾åæ°æ®ï¼","Delete all scores":"å 餿æå¾åè®°å½",Victory:"èå©",Draw:"å¹³å±",Defeat:"失败",Add:"å¢å ",Remove:"å é¤","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"ä»å
Œ
±çåºç§»é¤ 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> ã","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"ä¸ä¸å±èµ·å§æ¥æ 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> å 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"妿å¯è½ï¼å° 1 ç§»é¤ç <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> æ¾åå
¬ç¨çåºã",Campaign:"æå½¹","Grand campaign":"大æå½¹",Win:"èå©",Loss:"失败",ongoing:"è¿è¡ä¸çæå½¹",completed:"宿çæå½¹","ended in victory":"以èå©ç»æ","ended in defeat":"ä»¥å¤±è´¥ç»æ","Completed on":"宿äº","Next game at $0 level":"ä¸ä¸å±$0级é¾åº¦",Cards:"å¡ç","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"è®°å¾ä»ä½ ç计åä¸ç§»é¤è³å¤2å¨ä¹±çï¼ï¼APPæ æ³èªå¨å¤çï¼","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":"å¾å¥æªï¼æ¬å±èªå¨æºæ²¡è·å¾ä»»ä½æç¤ºç©ãä½ ç¡®å®è¦ä¿åæ¬æ¬¡å¯¹å±åï¼ï¼å¦æåªæ¯æµè¯ï¼è¯·ç¹å»âè¿åâæé®ï¼ã","Scores copied to clipboard":"å¾åè®°å½å·²å¤å¶å°åªè´´æ¿","Unable to load games in progress:":"æ æ³å è½½è¿è¡ä¸ç对å±ï¼","$0 game{0,s} available to join at the moment.":"ç®åæ $0 个对å±å
许å å
¥ã","Which do you want to join?":"ä½ è¦å å
¥åªä¸ªå¯¹å±ï¼","A player":"ä¸ä½ç©å®¶","Game in progress. Really quit?":"坹屿£å¨è¿è¡ä¸ï¼ç¡®å®éåºåï¼","Processing image...":"å¤çå¾çä¸â¦","No cards foun
319d: was the image in the right orientation?":"没æåç°å¡çä¿¡æ¯ï¼å¾çæ¹åæ£ç¡®åï¼","$0 cards counted in exile.":"$0 å¼ å¡ç卿¾éåºã","$0 cards automatically garrisoned":"$0 å¼ å¡çå·²èªå¨è¿é©»","$0 cards automatically put in history":"$0 å¼ å¡çå·²èªå¨æ¾å
¥åå²","$0 cards automatically flooded":"$0 å¼ å¡çå·²æ²æ²¡","$0 cards added to deck/hand/discard":"$0 å¼ å¡çå·²å å
¥çå /æç/å¼çå ","$0 cards identified. $1 cards added to $2$3.":"$0 å¼ å¡çå·²è¯å«ã$1å¼ å¡çå å
¥å°$2$3ã","Solo grand campaign":"å人大åæå½¹","played $0, won $1, lost $2, drew $3":"坹屿° $0ï¼èå© $1ï¼å¤±è´¥ $2ï¼å¹³å± $3","Start new campaign":"å¼å§æ°æå½¹","Player name":"ç©å®¶åç§°","Campaign log to date":"æè¿æå½¹è®°å½","Grand campaign log to date":"æè¿å¤§åæå½¹è®°å½","Enemy civilisation for game $0":"æ¬å±ææ¹ææ$0","Difficulty level":"é¾åº¦ç级",default:"é»è®¤","OCR doesn't work offline...":"OCRæ æ³ç¦»çº¿å·¥ä½","Choose an end-game trigger":"éæ©ä¸ä¸ªæ¸¸æä»ç»è§¦åæ¡ä»¶","$0 game{0,s} played":"已宿 $0 åºå¯¹å±",side:"é¢",on:"æä¸","token{0,s}":"æç¤ºç©","Court card":"人头ç"},pl:{Persians:"Persowie","City of Persepolis":"Persepolis","Battering Ram":"Taran",Development:"Rozkwit",Windmills:"Wiatraki",Satrap:"Satrapa","Persian Gold":"Perskie zÅoto",Babylonians:"BabiloÅczycy","Darius I":"Dariusz I","Median Empire":"Medowie","Nisaean Plain":"Równina nizejska",Arachosia:"Arachozja",Unrest:"Bunt",Glory:"ChwaÅa",Prosperity:"Dobrobyt",Advance:"PostÄp",Conquer:"Podbój",Lydians:"Lidyjczycy",Zagros:"Zagros",Bactria:"Baktria","Standing Army":"Armia w gotowoÅci","Jade Mask":"Jadeitowa maska",Elders:"Starszyzna",Town:"Osada",Shrine:"Kaplica",Invasion:"Inwazja",Mysticism:"Mistycyzm",Oracle:"Wyrocznia",Agriculture:"Rolnictwo",Boats:"Åodzie",Leadership:"Przywództwo",Shaduf:"Szaduf","Lost Scroll":"Zaginiony zwój","Rituals & Ceremonies":"RytuaÅy i ceremonie",Ambassador:"Ambasador",City:"Miasto",Gambling:"Hazard",Port:"Port",Diplomacy:"Dyplomacja",Wilderness:"Pustkowie",Jungle:"Dżungla",Mountain:"Góry",Coast:"Wybrzeże",Floodplain:"Równina zalewowa",Forest:"Las",Oasis:"Oaza",Hills:"Wzgórza",Marsh:"MokradÅa",Steppe:"Stepy",River:"Rzeka",Cape:"PrzylÄ
dek",Woodland:"Puszcza","Sacred Pass":"ÅwiÄta przeÅÄcz",Armenians:"Ormianie",Assyrians:"Asyryjczycy",Egyptians:"Egipcjanie",Ionians:"Jonowie",Qin:"Qin",Olmecs:"Olmekowie",Sumerians:"Sumerowie",Aksumites:"Aksumici",Minoans:"Minojczycy",Mauryans:"Maurjowie",Hittites:"Hetyci","Drama & Poetry":"Dramat i poezja",Education:"Edukacja",Moneylenders:"Lichwiarze",Corruption:"Korupcja",Onager:"Onager",Temple:"ÅwiÄ
tynia",Cataphract:"Katafrakt",Metropolis:"Metropolia",Pharmacy:"Farmacja",Wonder:"Monument",Coinage:"Mennictwo",Exports:"Eksport","Urban Development":"Urbanizacja",Mercenaries:"Najemnicy",Mining:"Górnictwo",Espionage:"Szpiegostwo",Monument:"Menhir","Code of Laws":"Kodeks",Religion:"Religia",Domestication:"Udomowienie","Water Mill":"MÅyn wodny",Qanat:"Kanat","Road Building":"Budowa dróg",Art:"Sztuka","Fortunate Isle":"Wyspa szczÄÅcia",Rainforest:"Las deszczowy","Mountainâ":"Góry",Peninsula:"PóÅwysep",
319Lakes:"Pojezierze",Highlands:"Wyżyny","Sacred Grove":"ÅwiÄty gaj",Lowlands:"Niziny",Moor:"Wrzosowisko",Plain:"Równiny",Archipelago:"Archipelag","Fortified Region":"Ufortyfikowana prowincja",Grassland:"Pastwiska",Island:"Wyspa",Etruscans:"Etruskowie",Scythians:"Scytowie",Vikings:"Wikingowie",Phoenicians:"Fenicjanie",Romans:"Rzymianie",Greeks:"Grecy",Carthaginians:"KartagiÅczycy",Celts:"Celtowie",Macedonians:"MacedoÅczycy",Xiongnu:"Xiongnu",Astronomy:"Astronomia",Cartography:"Kartografia",Masonry:"Kamieniarstwo","Civil Service":"SÅużba cywilna",Amphitheatre:"Amfiteatr","King of Kings":"Król królów",Praiseworthy:"Zaszczytny",Great:"Wielki",Notorious:"SÅawetny",Marvellous:"Cudowny",Glorious:"Chwalebny",Triumphant:"TriumfujÄ
cy","Awe-inspiring":"BudzÄ
cy podziw",Imperial:"Cesarski",Independent:"Niezależny",Magnificent:"WspaniaÅy",Outstanding:"Wybitny",Proud:"Dumny",Eminent:"Dostojny",Acclaimed:"Szanowany","City of Carthage":"Kartagina",Elephants:"SÅonie bojowe",Hegemony:"Hegemonia",Hannibal:"Hannibal","Trading Ships":"Statki kupieckie",Monopoly:"Monopol",Caravans:"Karawany",Iberia:"Iberia",Berbers:"Berberowie","Dido, Queen of Carthage":"Dydona, królowa Kartaginy","Carthaginian Traders":"KartagiÅscy kupcy","Balearic Islands":"Baleary",Mauretania:"Mauretania","Celtic Gold":"Celtyckie zÅoto","Celtic Innovation":"Celtycki wynalazek",Chainmail:"Kolczuga",Chariots:"Rydwany","Ogham Script":"Pismo ogamiczne",Vercingetorix:"Wercyngetoryks",Armorica:"Armoryka",Belgica:"Belgica",Britannia:"Brytania",Hibernia:"Hibernia",Druids:"Druidzi",Boudicca:"Boudika","Cattle Raid":"Kradzież bydÅa","Cauldron of Ceridwen":"KocioÅ bogini Ceridwen",Celtica:"Kraina celtycka","Olympic Games":"Igrzystka olimpijskie",Philosophy:"Filozofia",Lighthouse:"Latarnia morska","Direct Democracy":"Demokracja bezpoÅrednia","Greek Innovation":"Grecki wynalazek",Science:"Nauka","City of Corinth":"Korynt",Pericles:"Perykles","Greek Prosperity":"Grecki dobrobyt","City of Athens":"Ateny","Plains of Thessaly":"Równiny Tesalii",Settlers:"Osadnicy","Greek Mercenaries":"Greccy najemnicy","City of Sparta":"Sparta","Forest of Pholoe":"Las Foloi",Peleponnese:"Peloponez",Alexander:"Aleksander","Alexander the Great":"Aleksander Wielki",Parmenion:"Parmenion","Alexandria in Ariana":"Aleksandria w Arianie","Alexandria in Egypt":"Aleksandria w Egipcie",Mosaics:"Mozaiki","Companion Cavalry":"Hetajrowie",Uxians:"Utruskowie","Philip II":"Filip II",Phalanx:"Falanga",Pelagonia:"Pelagonia","Haliacmon Valley":"Dolina Aliakmon",Orestis:"Orestis","Julius Caesar":"Juliusz Cezar","Military Engineering":"Inżynieria wojskowa","Roman Invasion":"Rzymska inwazja",Legions:"Legiony","The Senate":"Senat rzymski","Rome, the Eternal City":"Wieczne miasto Rzym","Emperor Trajan":"Cesarz Trajan","Bread and Circuses":"Chleba i igrzysk","Gallia Aquitania":"Galia Akwitania",Raetia:"Recja",Triumvirate:"Triumwirat","City of Rome":"Rzym",Dalmatia:"Dalmacja","Roman Expansion":"Ekspansja Rzymu",Jewellery:"Precjoza",Ateas:"Ateas",Kurgans:"Kurhany","City of Gelonus":"Gelonos",Raiders:"Najeźdźcy",Tamga:"Tamga","Pontic Steppe":"Pontyjskie stepy","Tarim Basin":"Tarym",Caucasia:"Kaukaz",Nomads:"Nomadzi",Tents:"Jurty","Mounted Archers":"Åucznicy konni Saka","Carpathian Mountains":"Karpaty","Tian Shan":"Tienszan","Harald Hardrada":"Harald III Srogi","Go A'Viking":"Naprzód Wikingowie!",Combs:"GrzebieÅ","Rollo the Walker":"Rolf",Skis:"Narty",Longships:"Drakkary",Sagas:"Sagi o Wikingach","City of Dubh Linn":"Dublin",Graenland:"Grenlandia","Føroyar":"Wyspy owcze",Iceland:"Islandia",Vinland:"Winlandia",Jomsviking:"Jomswikingowie",Gothja:"Gotka",Althing:"Althing",Scandinavia:"Skandynawia","Erik the Red":"Eryk Rudy",Arthurians:"Arturianie","King Arthur's Court":"Dwór Króla Artura","Gwaith Camlan":"Gwaith Camlan",Graal:"Graal","Lawnslot y Llyn (Sir Lancelot)":"Lawnslot Llyn (Sir Lancelot)","Twrch Trwyth":"Twrch Trwyth","Taliesin the Bard":"Bard Taliesin",Excalibur:"Ekskalibur","Bedwyr (Sir Bedevire)":"Bedwyr (Sir Bedevire)","Viviane of the Lake":"Pani jeziora","City of Camelot":"Camelot","Britannia Flavia":"Britannia Flavia","Ynys Afallach (Avalon)":"Ynys Afallach (Avalon)","Gwalchmei (Sir Gawain)":"Gwalchmei (Si Gawain)","Lady Bertilak":"Lady Bertilak",Morigena:"Morgana","Peredur (Sir Percival)":"Peredur (Sir Percival)","Cai (Sir Kay)":"Cai (Sir Kay)","King Arthur":"Król Artur","Uthyr Pendragon":"Uther Pendragon","Britannia Prima":"Britannia Prima","Britannia Secunda":"Britannia Secunda","Myrddin Wyllt (Merlin)":"Myrddin Wyllt (Merlin)",Guennuvar:"Ginewra",Cafall:"Cafall",Atlanteans:"Atlantydzi","Advanced Culture":"Rozkwit kulturowy","Palace of Poseidon":"PaÅac Posejdona","Spread of Atlantis":"Ekspansja Atlantydów","Moats and Walls":"Fosy i mury","Myths and Legends":"Mity i legendy","Vast Wealth":"Orgomne bogactwo",Kleito:"Kleito","Mountain of Atlantis":"Szczyt Atlantydy",Themiscyra:"Themiscyra",Flood:"Potop",Thule:"Thule",Hesperides:"Kraina Hesperyd","Elysian Fields":"Elizjum","Atlantean Fleet":"Flota Atlantydy",Unification:"Unifikacja",Embalming:"Balsamowanie",Obelisk:"Obelisk","Ramesses II":"Ramzes II","Egyptian Expansion":"Egipska ekspansja",Medicine:"Medycyna",Pyramids:"Piramidy","Egyptian Legacy":"Egipskie dziedzictwo",Kushites:"Kuszyci","Red Land":"Czerwony lÄ
d","Flood of the Nile":"Wylew Nilu","Egyptian Incursion":"Egipska inwazja","Egyptian Hieroglyphics":"Hieroglify","Nile Valley":"Dolina Nilu","Lower Nile":"Dolny Nil",Mathematics:"Matematyka","Grand Trunk Road":"Uttarapatha",Ashoka:"AÅoka",Buddhism:"Buddyzm","Edicts of Ashoka":"Edykty AÅoki","Punch-Marked Coins":"Bicie monet",Arthashastra:"ArthaÅastra","Nanda Dynasty":"Dynastia Nandów","City of Pataliputra":"Pataliputra","Indian Elephants":"SÅonie indyjskie",Gandhara:"Gandhara",Chandragupta:"Äandragupta",Chanakya:"Äanakja Kautilja",Magadha:"Magadha","Indus Valley":"Dolina Indusu","King Minos":"Król Minos","Minoan Traders":"Kupcy minojscy","Drainage System":"System NawadniajÄ
cy",Architecture:"Architektura",Frescos:"Freski",Labyrinth:"Labirynt","Minoan Expansion":"Ekspansja minojska","Seal Stones":"PieczÄci minojskie","Writing Systems":"System pisma",Knossos:"Knossos",Pottery:"Garncarstwo",Thera:"Thera",Crete:"Kreta",Cyprus:"Cypr","San Lorenzo Tenochtitlán":"San Lorenzo Tenochtitlán","Step Pyramids":"Piramidy schodkowe","Ritual Sacrifice":"RytuaÅ poÅwiÄcenia","Olmec Traders":"Olmeccy handlarze","Tres Zapotes":"Tres Zapotes","Stone Heads":"Kamienne gÅowy",Cacao:"Kakao","Olmec Hieroglyphics":"Pismo hieroglificzne",Calendar:"Kalendarz","Stone Mask":"Kamienna maska","Loadstone Compass":"Kompas z magnetytu","Ball Games":"Ullamaliztli","Laguna de los Cerros":"Laguna de los Cerros","La Venta":"La Venta","Long Walls I":"Wielki mur I","Long Walls II":"Wielki mur II","Long Walls III":"Wielki mur III","Long Walls IV":"Wielki mur IV","Emperor Qin Shi Huang":"Cesarz Qin Shi Huang","King Wu of Qin":"Król Wu paÅstwa Qin",Metallurgy:"Metalurgia","Terracotta Warriors":"Terakotowa Armia","Eastern Zhou":"Wschodnie Zhou","Mandate of Heaven":"Mandat niebios","Duke Zhuang of Qin":"KsiÄ
Å¼Ä Zhuang paÅstwa Qin","School of Diplomacy":"SzkoÅa dyplomacji",Confucianism:"Konfucjanizm",Legalism:"Legalizm","Western Zhou":"Zachodnie Zhou",Utopians:"Utopijczycy","Visions of Shangri-La":"Wizje Shangri-la","Path to Shangri-La":"Szlak do Sharngri-la","Gates of Shangri-La":"Bramy Shangri-la","Shangri-La":"Shangri-la",Monastery:"Klasztor",Portals:"Portale",Daochang:"Daochang","Lost Tomes":"Zaginione tomy","Tree of Knowledge":"Drzewo wiedzy",Charity:"DobroczynnoÅÄ",Meditation:"Medytacja","Mountain Retreat":"Górska pustelnia","Sacred Scroll":"ÅwiÄty zwój",Back:"Wstecz",Next:"Dalej","Conditional cards":"Karty warunkowe","Multiplier cards":"Karty z mnożnikiem","Numeric cards":"Karty z wartoÅciÄ
","Unrest cards":"Karty buntu","These score differently depending on certain conditions.":"ZapewniajÄ
różnÄ
liczbÄ punktów w zależnoÅci od warunków opisanych na kartach.","Include the civilisation's power card. No individual card may score more than 10 points.":"WliczajÄ
c kartÄ potÄgi. Każda taka karta może dostarczyÄ maksymalnie 10 punktów zwyciÄstwa.","Score the number on the card.":"Zapewniaja konkretnie okreÅlonÄ
liczbÄ punktów zwyciÄstwa.","Progress tokens":"Å»etony postÄpu","Population tokens":"Å»etony populacji","Material tokens":"Å»etony zasobów","Each progress token scores 1 point.":"Każdy żeton postÄpu zapewnia 1 pu
319nkt zwyciÄstwa.","Not scored directly, but may be referred to by other cards.":"Nie punktowana samodzielnie wpÅywu na grÄ, ale może siÄ odnosiÄ do dziaÅania innych kart.","Resource tokens":"Å»etony zasobów","Each Unrest card scores -2 points.":"Każda karta buntu dostarcza -2 punkty.","The bot always scores the higher value for these cards.":"Te karty sÄ
warte dla centurion najwiÄkszÄ
wskazanÄ
na nich wartoÅÄ punktów zwyciÄstwa.","The bot scores 5 points for each of these cards. Do not include the power card.":"Te karty sÄ
warte dla centuriona 5 punktów zwyciÄstwa.","The bot scores 1 point for every 10 Resource and Population tokens combined.":"Każde 10 populacji i/albo zasobów w dowolnej kombinacji jest warte dla centuriona 1 punkt zwyciÄstwa.","The bot scores 1 point for every 5 Resource and Population tokens combined.":"Każde 5 populacji i/albo zasobów w dowolnej kombinacji jest warte dla centuriona 1 punkt zwyciÄstwa.","Save score":"Zapisz wynik","New game":"Nowa gra","WINNER!":"ZWYCIÄZCA!","DRAW!":"REMIS!",Close:"Zamknij","Game mode":"Tryb gry","Single game":"Pojedyncza rozgrywka","Solo campaign":"Kampania solo","Join game in progress":"DoÅÄ
cz do trwajÄ
cej gry","Enemy civilisation":"Nacja przeciwnika","Boxes available":"DostÄpne czÄÅci gry","Number of players":"Liczba graczy",Random:"Losowa","Surprise me!":"Zaskocz mnie!",Level:"Poziom",Chieftain:"Wódz",Warlord:"Przywódca",Imperator:"Imperator",Sovereign:"Monarcha",Overlord:"WÅadca","Supreme Ruler":"Najwyższy wÅadca","This bot has a hand size of 4 (place an exhaust token on slot 5).":"Centurion korzysta z 4 miejsc na karty (poÅóż niewykorzystywany żeton wyczerpania na 5 miejscu).","At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.":"Na koÅcu tury centuriona, a przed uzupeÅnieniem kart, umieÅÄ wierzchniÄ
kartÄ z talii centuriona na jego stosie kart odrzuconych.","This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.":"Podczas przygotowania gry centurion otrzymuje 3 zasoby, 2 populacji i 1 postÄpu, tak jak gracz. Podczas punktacji każde 5 populacji i/albo zesobów w dowolnej kombinacji jest warte dla centuriona 1 punkt zwyciÄstwa (a nie każde 10).","This bot has a hand size of 6 (add slot marker 6).":"Centurion korzysta z dodtkowego miejsca na 6 kartÄ (doÅóż żeton z cyfrÄ
6).","Whenever the bot returns an Unrest card it gains 1 progress.":"Za każdym razem, gdy centurion zwraca bunt, dodatkowo otrzymuje 1 postÄpu.","Scoring method":"Metoda punktacji","Full scoring (enter your cards and the app automatically scores them)":"Automatyczna punktacja (wprowadźasz karty, a aplikacja sama podliczy punkty)","Basic scoring (enter score of scoring cards yourself)":"RÄczna punktacja (sam wprowadzasz punktacjÄ kart)","Automatically save score after each game?":"Autmatycznie zapisaÄ punktacjÄ po zakoÅczeniu gry?","Add your saved scores to online database for community statistics? (All identifying information is removed)":"Dodawaj zapisane wyniki do wspólnej bazy w celach statystycznych? (Wszystkie dane osobowe zostanÄ
wczeÅniej usuniÄte)","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats. This will also allow players to find your game easier for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"Podaj nazwÄ użytkownika (np. z BGG) by pozwiÄ
zaÄ jÄ
z tym urzÄ
dzeniem, co pozwoli na grupowanie zapisywanych wyników oraz uÅatwi innym graczom odnajdywanie twoich gier na potrzeby wspólnej punktacji (korzystajÄ
c z opcji 'DoÅÄ
cz do trajÄ
cej gry').","No username at present":"Brak nazwy użytkownika","Set username":"Ustaw nazwÄ użytkownika","Installing as a web app":"Zainstaluj jako web-app","This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.":'Na wiÄkszoÅci urzÄ
dzeÅ mobilnych możesz zainstalowaÄ tÄ
stronÄ jako web-app by mieÄ do niej dostÄp z ektanu gÅównego i móc korzystaÄ z niej offline. Zazwyczaj możesz to zrobiÄ korzystajÄ
c z opcji "Dodaj do ekranu gÅówngo" w swojej przeglÄ
darce.',"This page has more detailed instructions.":"Na strona ma szczegóÅowe instrukcje.","Loading games in progress":"Trwa Åadowanie trwajÄ
cych gier","No games available to join at the moment. Sorry!":"Brak gier dostÄpnych do doÅÄ
czenia.","This will delete your game in progress. Do you really want to do this?":"PostÄp zaczÄtej gry zostanie skasowany. KontynuowaÄ?","Which game do you want to join?":"Do której gry chcesz doÅÄ
czyÄ?","Which player are you?":"Którym graczem jesteÅ?","Ask permission to join":"Zapytaj o pozwolenie do doÅÄ
czenia.","Awaiting response from game host...":"Oczekiwanie na odpowied
319ź od gospodarza...","Permission denied. Try another game.":"Odmówiono. Wybierz innÄ
grÄ.","$0 has asked to join the game as $1 ($2). Is this ok?":"$0 prosi o pozwolenie na doÅÄ
czenie do gry jako $1 ($2). ZezwoliÄ?","Are you sure you want to trigger the end of the game through Collapse?":"Na pewno chcesz teraz zakoÅczyÄ grÄ przez upadek?","This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)":"Gra ma nietypowo niski wyniki, $0 do $1. Na pewno chcesz jÄ
zapisaÄ? (JeÅli byÅa to gra próbna, wybierz 'Anuluj' by nie zapisywaÄ wyniku)","Game left unfinished last time. Resume?":"Ostatnia gra nie zostaÅa dokoÅczona. WznowiÄ?","Power card{0,s}":"{{0,karta,2=karty}} potÄgi","Select the side of the $0 power card you have been using":"Wybierz użytÄ
stronÄ karty potÄgi dla nacji $0.","(The A side is designed for more experienced players, the B side for your first few times playing a civilisation.)":"(Strona A jest zaprojektowana dla bardziej doÅwiadczonych graczy; poczÄ
tkujÄ
cym zaleca siÄ skorzystanie ze strony B.)","The $0 also have their separate $1.":"$0 ma także wÅasnÄ
kartÄ $1.","Any score from the $0 is tracked here too.":"Punkty $0 sÄ
widoczne tutaj","Journey cards":"Karty podróży","in play":"w grze",garrisoned:"garnizonowane","in history":"w historii","in deck/hand":"w talli i n
319a rÄce","in exile (optional)":"wygnane (opcjonalnie)","in exile":"wygnane",flooded:"zatopione","Use photo...":"Użyj zdjÄcia","Click on the icons to filter available cards by suit or civilisation.":"KlikajÄ
c na ikony możesz filtrowaÄ karty po typie lub nacji.","No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.":"W obrzarze gry nie ma kart-garnizonów. Prze garnizonowaniem wprowadź do gry odpowiednie karty.","Card $0 garrisoned under card $1":"Karta $0 zostaÅa umieszczona w garnizonie karty $1.","Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.":"Podaj liczbÄ wygnanych kart. Możesz pominÄ
Ä ten krok, o ile nie grasz kart przyznajÄ
cych punkty za wygnane karty.","Count from photo...":"Policz ze zdjÄcia...","Add your own notes about strategy here.":"Dodaj tu swoje nonatki z gry i uwagi o strategii.","Game end trigger:":"Zdarzenie koÅczÄ
ce grÄ:","King of Kings (last fame card)":"Karta 'Król królów' zostaÅa odwrócona (ostatnia karta talii sÅawy)","Main deck empty":"SkoÅczyÅy siÄ karty w talii gÅównej","Player's final development":"KtóryÅ z graczy rozwinÄ
Å swojÄ
ostatniÄ
kartÄ","Discovery of Graal":"Arturianie zakoÅczyli poszukiwanie Graala","Arrival of Harald Hardrada":"Wikingowie umieÅcili kartÄ Harald III Srogi na swoim stosie kart odrzuconych","Arrival at Shangri-La":"Utopijczycy zakoÅczyli podróż do Shangri-La","Most crucial cards (in player's strategy)":"Karty kluczowe dla strategii","Score all bot cards in a single pile. The bot does not score the power card":"Zbierz karty centuriona razem i zlicz uzyskane przez niego punkty. Centurion nie zyskuje punktów z karty potÄgi.","but any score from the $0 card{1,s} will be included in the final score.":"ale punkty uzyskane z $0 {{1,kart,1=karty,2=kart}} zostanÄ
uwzglÄdnione w punktacji koÅcowej.",Highscores:"Najlepsze wyniki","Click on a player to get a breakdown of their score. Sort by:":"Wybierz gracza, żeby zobaczyÄ jego wyniki. Sortuj wedÅug:","Most recent first":"Od ostatnich","Highest score first":"Od najlepszych wyników","Highest average score first":"Od najwyższego Åredniego wyniku","Greatest score difference first":"Od najwiÄkszej różnicy w wyniku","Winning civilisation":"ZwyciÄzka nacja","Single games only":"Tylko gry solo","Campaigns only":"Tylko kampanie","All games":"Wszystkie gry","Display single games only":"Pokaż tylko pojedyncze gry","Display campaigns only":"Pokaż tylko kampanie","Display all games":"Pokaż wszystkie gry",Stats:"Statystyki",Statistics:"Statystyki","Number of games played:":"Liczba zagranych gier:","Best score":"Najlepszy wynik","Worst score":"Najgorszy wynik","Player-specific details:":"Informacje o graczu:","Average score":"Åredni wynik","Import from another device":"Importuj z innego urzÄ
dzenia","Import data from clipboard":"Importuj ze schowka","Copy data to clipboard":"Kopiuj do schowka","Overall score":"CaÅkowity wynik",Classics:"Antyk",Legends:"Legendy","Classics only":"Tylko Antyk","Legends only":"Tylko Legendy","Classics and Legends":"Antyk i Legendy","Player $0":"Gracz $0",Civilisation:"Nacja przeciwnika",Bot:"Centurion","Use Commons and Fame cards from":"Użyj kart wspólnych oraz kart sÅawy z","Let me know on BGG (username hutchies) if you find any scoring errors!":"JeÅli zauważysz bÅÄ
d w punktacji, daj znaÄ na BGG! (uzytkownik: hutchies)",player:"gracz $0",players:"gracze","$0 player{0,s}":"gracz{0,y}",Note:"Uwaga",Setup:"Przygotowanie","Final results":"Wyniki koÅcowe","Game results":"Wynik gry","Campaign update":"Aktualizacja kampanii",Collapse:"Upadek",Gameplay:"Rozgrywka","You can view statistics for just this device on ImperiumStats by clicking here.":"Kliknij tutaj, żeby zobaczyÄ statystyki powiÄ
zane z tym urzÄ
dzeniem.","You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.":"Podaj nazwÄ użytkownika (np. z BGG) by pozwiÄ
zaÄ jÄ
z tym urzÄ
dzeniem, co pozwoli ImperiumStats na grupowanie Twoich wyników z różnych urzÄ
dzeÅ.","This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).":"To pozwoli na Åatwiejsze odnalezienie Twoich partii na potrzeby wspólnej punktacji (korzystajÄ
c z opcji 'DoÅÄ
cz do trwajÄ
cej gry' z menu 'Tryb gry').",Scoring:"Punktacja","cards in":"karty w","Cards in":"Karty w",Cancel:"Anuluj",tokens:"żetony",cards:"karty","Enter a publicly-visible username to associate with this device (or leave blank to delete)":"Podaj publicznÄ
nazwÄ użytkownika, która ma byÄ powiÄ
zana z tym urzÄ
dzeniem (pozostaw puste, by usunÄ
Ä powiÄ
zanie)","ImperiumStats website":"Strona ImperiumStats",Change:"ZmieÅ","Unable to access online scores database: ":"Nie udaÅo siÄ poÅÄ
czyÄ z internetowÄ
bazÄ
wyników:",Edit:"Edytuj",optional:"opcjonalne","Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.":"Kopiowanie do sc
319howka niepowiodÅo siÄ: $0. Możesz rÄcznie skopiowaÄ dane z pola poniżej.","Really delete all record of previous scores?":"UsunÄ
Ä wszystkie wczeÅniejsze wyniki?","Scores deleted":"Wyniki usuniÄte","Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import.":"Odczyt ze schowka nie powiódÅ siÄ. Możliwy brak uprawnieÅ. Upewnij siÄ, że korzystasz z tej strony przez HTTPS. Możesz rÄcznie wkleiÄ zawartoÅÄ schowka do pola poniżej.","Problem parsing data: $0":"WystÄ
piÅ bÅÄ
d podczas parsowania danych: $0","Saved scores":"Zapisane wyniki","Click on a game to get a breakdown of the score.":"Kliknij na grÄ, żeby zobaczyÄ szczegóÅy punktacji","card{0,s}":"{{0,kart,1=karta,2=karty,5=kart}}",VP:"PZ","Click here to visit ImperiumStats":"Kilknij, żeby przejÅÄ do strony ImperiumStats","Upload score":"Wczytaj punktacjÄ","Score saved":"Wynik zapisany",as:"jako","$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}":"$0 {{0,zwyciÄstw,1=zwyciÄstwo,2=zwyciÄstwa,5=zwyciÄstw}}, $1 {{1,przeganych,1=przegana,2=przegane,5=przeganych}}, $2 {{2,remisów,1=remis,2=remisy,5=remisów}}","won $0, lost $1, drew $2":"wygranych $0, przegranych $1, remisów $2","point{0,s}":"{{0,punktów,1=punkt,2=punkty,5=punktów}}",scored:"podliczone","Game $0 of $1 in":"Gra $0 z $1 w","completed campaign":"zakoÅczona kapania","ongoing campaign":"trwajÄ
ca kampania","Bot level":"Poziom centuriona","View on stats site":"Zobacz na ImperiumStats","Edit game":"Edytuj grÄ","Delete game":"UsuÅ grÄ","You have successfully defeated the":"PokonaÅeÅ","You have won $0 game{0,s} so far.":"Dotychczas wygraÅeÅ $0 {{0,gier,1=grÄ,2=gry,5=gier}}.","In your next game, the bot will be at $0 level.":"Podczas nastÄpnej gry centurion zagra na poziomie: $0.","Please choose":"Wybierz","Add one of your Commons cards to your starting deck":"Dodaj jednÄ
z kart wspólnych (z symbolem →) do swojej talii","Remove one of your starting cards from the game":"UsuÅ z gry jednÄ
ze swoich kart poczÄ
tkowych.","Name of card":"Nazwa karty",grande:"wielka","You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!":"PokonaÅeÅ 5 róznych nacji i zakoÅczyÅeÅ $0 kampaniÄ! Gratulacje!","You were unable to defeat the $0.":"Nie udaÅo Ci siÄ pokonaÄ $0.","You were defeated by the $0.":"ZostaÅeÅ pokonany przez $0.","You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!":"ZostaÅeÅ pokonany 4 razy. Twoja kampania koÅczy siÄ porażkÄ
. Powodzenia nastÄpnym razem.","You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).":"OdniosÅeÅ dotychczas $0 {{0,porażek,1=porażkÄ,2=porażki,5=porażek}} (po 4 porażce kampania koÅczy siÄ).","Awaiting final scores":"Oczekiwanie na ostateczne wyniki","Save progress":"Zapis postÄp","Complete campaign":"ZakoÅcz kampaniÄ","Log cards":"PrzeglÄ
d kart",Tokens:"Å»etony",Notes:"Uwagi","by player":"na gracza","Cards in exile":"UsuniÄte karty",Display:"WyÅwietl","Edit scores":"Edytuj punktacjÄ","Export a CSV file for analysis":"Eksportuj plik CSV","Export data in CSV format":"Eksportuj do CSV","Include full scores breakdown in CSV?":"ZawszeÄ w pliku CSV szczegóÅy punktacji?","Delete all scores":"UsuÅ wszystkie wyniki",Victory:"ZwyciÄstwo",Draw:"Remis",Defeat:"Porażka",Add:"Dodaj",Remove:"UsuÅ","Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.":"UsuÅ 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> ze stosu buntów.","Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>":"Zacznij nastÄpnÄ
grÄ z 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>","Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.":"JeÅli to możliwe, zwrÃ³Ä 1 usuniÄty <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> na stos buntów.",Campaign:"Kampania","Grand campaign":"Wielka kampania",Win:"zwyciÄstwo",Loss:"przegrana",ongoing:"trwajÄ
ca",completed:"zakoÅczona","ended in victory":"zakoÅczona zwyciÄstwem","ended in defeat":"zakoÅczona porażkÄ
","Completed on":"ZakoÅczono na","Next game at $0 level":"NastÄpna gra na poziomie $0",Cards:"Karty","Don't forget to remove up to 2 Unrest from your scoring! (The app won't do this for you.)":"PamiÄtaj by usunÄ
Ä do 2 kart Buntu ze swojej punktacji! (nie dizeje siÄto autmatycznie)","The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)":"Centurion zakoÅczyÅ grÄ bez żetonów, co nie jest zwyczajne. Napewno chcesz zapisaÄ ten wynik? (JeÅli byÅa to gra próbna, wybierz 'Anuluj'.)","Scores copied to clipboard":"Wyniki skopiowano do schowka","Unable to load games in progress:":"Nie można zaÅadowaÄ gry:","$0 game{0,s} available to join at the moment.":"$0 {{0,0=gier,1=gra,2=gry,5=gier}} dostÄpnych do doÅÄ
czenia.","Which do you want to join?":"Do której gry chcesz doÅÄ
czyÄ?","A player":"Gracz","Game in progress. Really quit?":"Gra w toku. OpuÅciÄ?","Processing image...":"Przetwarzanie zdjÄcia...","No cards foun
319d: was the image in the right orientation?":"Nie znaleziono kart. Upewnij siÄ, że zdjÄcie byÅo poprawnie obrócone.","$0 cards counted in exile.":"$0 {{0,0=usuniÄtych kart,1=usuniÄta karta,2=usuniÄte karty,5=usuniÄtych kart}}","$0 cards automatically garrisoned":"$0 {{0,0=kart automatycznie garnizonowanych,1=karta automatycznie garnizonowana,2=karty automatycznie garnizonowana,5=kart automatycznie garnizonowanych}}","$0 cards automatically put in history":"$0 {{0,0=kart automatycznie przeniesionych,1=karta automatycznie przeniesiona,2=karty automatycznie przeniesione,5=kart automatycznie przeniesionych}} do historii","$0 cards automatically flooded":"$0 {{0,0=kart automatycznie zatopionych,1=karta automatycznie zatopiona,2=karty automatycznie zatopione,5=kart automatycznie zatopionych}}","$0 cards added to deck/hand/discard":"$0 {{0,0=kart dodanych,1=karta dodana,2=karty dodane,5=kart dodanych}} do talii/rÄki/stosu","$0 cards identified. $1 cards added to $2$3.":"Rozpoznano $0 {{0,0=kart,1=kartÄ,2=karty,5=kart}}. $1 {{0,kart,1=kartÄ,2=karty,5=kart}} dodajo do $2$3","Solo grand campaign":"Wielka kampania solo","played $0, won $1, lost $2, drew $3":"Rozegrane $0, wygrane $1, przegrane $2, zremisowane $3","Start new campaign":"Rozpocznij nowÄ
kampaniÄ","Player name":"ImiÄ gracza","Campaign log to date":"Dotychczasowy dziennik kampanii","Grand campaign log to date":"Dotychczasowy dziennik wielkiej kampanii","Enemy civilisation for game $0":"Nacja przeciwnika w gre $0","Difficulty level":"Poziom trudnoÅci",default:"domyÅlny","OCR doesn't work offline...":"OCR nie dziaÅa offline...","Choose an end-game trigger":"Wybierz zdarzenie koÅczÄ
ce grÄ","$0 game{0,s} played":"Zagranych gier: $0",side:"strona",on:"na","token{0,s}":"żeton{0,y}","Court card":"Dwór króla Artura"}};let tokenCards=[{name:"Fishing",deck:"Taino",location:"play"},{name:"Zemi",deck:"Taino",location:"play"},{name:"Canoes",deck:"Taino",location:"play"},{name:"Pottery",location:"play"},{name:"Glass Working",location:"play"},{name:"Porcelain",location:"play"}];function fixNests(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?(console.log(`Found nest! ${t}[${n}]`,e,n,r),e=[...e.slice(0,n),...fixNests(e[n],`${t}[${n}}]`),...e.slice(n+1)]):e[n]=fixNests(r,`${t}[${n}]`)}else if(e&&"object"==typeof e)for(let n of Object.keys(e))e[n]=fixNests(e[n],`${t}.${n}`);return e}function canHaveTokens(e){if(e.suits.includes("trade_route")&&"play"==e.location)return!0;for(let t of tokenCards){let n=!0;for(let r of Object.keys(t))if(e[r]!=t[r]){n=!1;break}if(n)return!0}return!1}function doTokensCountFor(e){return!(e.bot||!e.civ||"Taino"!=e.civ.name)}function tokens(e,t){let n=parseInt(e[t])||0;return doTokensCountFor(e)?(n+=e.cards.reduce(((e,n)=>void 0!==n[t]?e+parseInt(n[t]):e),0),n):n}function proAll(e){return tokens(e,"pro")}function resAll(e){return tokens(e,"res")}function popAll(e){return tokens(e,"pop")}function tradeAll(e){return tokens(e,"trade")}let specialScoringRules={"3MRT30A/30A":(e,t)=>(t-=proAll(e),t+=Math.floor(proAll(e)/3))},collapseRules={"3CUL1A/29":(e,t)=>(t.hasOwnProperty("chaosEmpty")||(t.chaosEmpty=confirm("Is the Chaos pile empty?")),!!t.chaosEmpty&&(t.winner="WINNER!",!0)),"3CUL1B/29":(e,t)=>(t.hasOwnProperty("chaosEmpty")||(t.chaosEmpty=confirm("Is the Chaos pile empty?")),!!t.chaosEmpty&&(t.winner="WINNER!",!0))},factionsToAdd=["Magyars","Taino","Mayans","Martians","Cultists","Inuit"],tokenMaps={population:"pop",material:"res",progress:"pro","trade good":"trade"},iconMaps={Red_Flag:"barbarian",barbarian:"barbarian",empire:"empire",Blue_Flag:"empire",PINNED:"pinned",production:"sack",metropolis:"metropolis",ocean:"ocean",scroll:"scroll",ATTACK:"attack",city:"city",merchant:"merchant",mask:"mask",fertile:"grain",river:"water",hunt:"hunt",knight:"knight",miracle:"miracle",gadget:"gadget",Corrupt_Flag:"corrupted","traderoute-pin":"traderoute-pin","pin-small":"pinned",foot:"foot",eye:"eye"},suitMaps={FAME:"fame",GREEN:"unciv",WHITE:"civ",REGION:"reg",TRIBUTARY:"trib",UNREST:"unrest",POWER:"power","TRADE ROUTE":"trade_route",GADGET:"gadget"},targetElements=[{type:"icons",text:Object.keys(iconMaps),counter:(e,t)=>{let n=null;
319return Object.keys(iconMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=iconMaps[e])})),e.cards.reduce(((e,t)=>e+t.icons.filter((e=>e==n)).length),0)},contribs:(e,t)=>{let n=null;return Object.keys(iconMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=iconMaps[e])})),Array.from(new Set(e.cards.reduce(((e,t)=>{let r=t.icons.filter((e=>e==n)).length;return r>0?[...e,{card:t,count:r}]:e}),[])))}},{type:"suits",text:Object.keys(suitMaps),counter:(e,t)=>{let n=null;return Object.keys(suitMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=suitMaps[e])})),e.cards.reduce(((e,t)=>e+t.suits.filter((e=>e==n)).length),0)},contribs:(e,t)=>{let n=null;return Object.keys(suitMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=suitMaps[e])})),e.cards.reduce(((e,t)=>{let r=t.suits.filter((e=>e==n)).length;return r>0?[...e,{card:t,count:r}]:e}),[])}},{type:"tokens",text:Object.keys(tokenMaps),counter:(e,t)=>{let n=null;return Object.keys(tokenMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=tokenMaps[e])})),e.players.reduce(((e,t)=>void 0===t[n]?e:t.hasOwnProperty("cards")?e+tokens(t,n):e+parseInt(t[n])),0)},contribs:(e,t)=>{let n=null;return Object.keys(tokenMaps).forEach((e=>{t.toLowerCase().includes(e.toLowerCase())&&(n=tokenMaps[e])})),e.players.reduce(((e,t)=>{if(!t.hasOwnProperty("id"))return[...e];let r=0;return void 0!==t[n]&&(r=parseInt(t[n])),r>0?[...e,{card:t,count:r}]:e}),[])}},{type:"all resources",text:["resources"],counter:(e,t)=>e.players.reduce(((e,t)=>e+Object.values(tokenMaps).reduce(((e,n)=>void 0===t[n]?e:t.hasOwnProperty("cards")?tokens(t,n):e+t[n]),0)),0),contribs:(e,t)=>e.players.reduce(((e,t)=>{if(!t.hasOwnProperty("id"))return[...e];let n=Object.values(tokenMaps).reduce(((e,n)=>void 0===t[n]?e:e+t[n]),0);return n>0?[...e,{card:t,count:n}]:e}),[])},{type:"garrisoned cards",text:["garrisoned"],counter:(e,t)=>e.cards.filter((e=>"garrison"==e.location||"mana"==e.location)).length,contribs:(e,t)=>e.cards.filter((e=>"garrison"==e.location||"mana"==e.location)).reduce(((e,t)=>[...e,{card:t,count:1}]),[])},{type:"cards",text:["cards","card"],counter:(e,t)=>e.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length,contribs:(e,t)=>e.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).reduce(((e,t)=>[...e,{card:t,count:1}]),[])},{type:"mana",text:["mana"],counter:(e,t)=>e.cards.filter((e=>"mana"==e.location)).length,contribs:(e,t)=>e.cards.filter((e=>"mana"==e.location)).reduce(((e,t)=>[...e,{card:t,count:1}]),[])}],conditions=[{text:["not in play"],verify:(e,t,n)=>"play"!=e.location},{text:["in play"],verify:(e,t,n)=>"play"==e.location},{text:["in history","in your history"],verify:(e,t,n)=>"history"==e.location},{text:["in legends","in your legends"],verify:(e,t,n)=>"legends"==e.location},{text:["garrisoned"],verify:(e,t,n)=>"garrison"==e.location||"mana"==e.location},{text:["summoned"],verify:(e,t,n)=>!!t[n].hasOwnProperty("summonedState")&&(!(!t[n].summonedState||"Summoned"!=t[n].summonedState.name)||void 0)},{text:["empire"],verify:(e,t,n)=>e.hasOwnProperty("empire")?e.empire:t[n].decks&&t[n].decks.state&&t[n].decks.state.length>0&&t[n].decks.state[0].icons?t[n].decks.state[0].icons.includes("empire"):(e.empire=confirm("Is your State card turned to Empire?"),e.empire)}],sourceModifiers=[{text:["in play"],effect:(e,t)=>(e.cards=e.cards.filter((e=>"play"==e.location)),e)},{text:["in history","in your history"],effect:(e,t)=>(e.cards=e.cards.filter((e=>"history"==e.location)),e)},{text:["in legends"],effect:(e,t)=>(e.cards=e.cards.filter((e=>"legends"==e.location)),e)},{text:["in flooded pile","sunk"],effect:(e,t)=>(e.cards=e.cards.filter((e=>"flooded"==e.location)),e)},{text:["on your cards"],effect:(e,t)=>(e.players=e.cards,e)},{text:["card here","cards here","garrisoned here"],effect:(e,t)=>(e.cards=e.cards.filter((t=>t.garrisoning==e.thisCard||t.garrisoning&&t.garrisoning==e.thisCard.uniqueID)),e)},{text:["on this card","here"],effect:(e,t)=>(e.players=[e.thisCard],e)},{text:["garrisoned in","card in","cards in"],effect:(e,t)=>{let n=/.*in\s\W?(?<card>.*?)\W?(\.|,)?$/gi.exec(t);if(n&&n.groups&&n.groups.card){let t=e.cards.find((e=>e.name.replaceAll().toLowerCase()==n.groups.card.toLowerCase()));if(t)return e.cards=e.cards.filter((e=>e.garrisoning==t||e.garrisoning&&e.garrisoning==t.uniqueID)),e;if(n.groups.card){let t=n.groups.card.toLowerCase().split("/"),r=[];for(let n of t){let t=targetElements.find((e=>e.text.some((e=>n.toLowerCase().includes(e.toLowerCase())))));if(t){let i=t.contribs(e,n).map((e=>e.card));r=[...r.filter((e=>!i.includes(e))),...i]}}return e.cards=e.cards.filter((e=>r.some((t=>e.garrisoning==t||e.garrisoning&&e.garrisoning==t.uniqueID)))),e}e.cards=[]}else console.log("Error: unable to find target for "+e.thisCard.name+" scoring");return e.cards=e.cards.filter((t=>t.garrisoning==e.thisCard||t.garrisoning&&t.garrisoning==e.thisCard.uniqueID)),e}},{text:["only"],effect:(e,t)=>
319{let n=t.split("/"),r=[];for(let t of n){let n=targetElements.find((e=>e.text.some((e=>t.toLowerCase().includes(e.toLowerCase())))));if(n){let i=n.contribs(e,t).map((e=>e.card));r=[...r.filter((e=>!i.includes(e))),...i]}else console.log('error: unable to find target for "'+t+'"')}return e.cards=r,e},description:(e,t)=>t}];function countForScore(e,t,n,r,i,a){let o=0,s={players:[e[t]],cards:e[t].cards,thisCard:n},c="";if(i){let e=sourceModifiers.find((e=>e.text.includes(i.toLowerCase())));e||(e=sourceModifiers.find((e=>e.text.some((e=>i.includes(e.toLowerCase()))))),e||console.log("Note: unmatched modifier on card "+n.name+" - ",i)),e&&(s=e.effect(s,i),c+="limitation '"+(e.hasOwnProperty("description")?e.description(s,i):e.text[0])+"', ")}for(let e of r){let t=targetElements.find((t=>t.text.some((t=>e.toLowerCase().includes(t.toLowerCase())))));if(t){let n=t.counter(s,e);o+=n,c+="found "+n+" "+e+"; "}else console.log('error: unable to find target for "'+e+'"')}if(a){let e=targetElements.find((e=>e.text.some((e=>a.toLowerCase().includes(e.toLowerCase()))))).counter(s,a);o-=e,c+="lost "+e+" fitting exception "+a+"; "}return c+=" total count "+o,n.countWorking=c,o}function countForContribs(e,t,n,r,i,a){let o=[],s={players:[e[t]],cards:e[t].cards,thisCard:n};if(i){let e=sourceModifiers.find((e=>e.text.includes(i.toLowerCase())));e||(e=sourceModifiers.find((e=>e.text.some((e=>i.includes(e.toLowerCase()))))),e||console.log("Note: unmatched modifier on card "+n.name+" - ",i)),e&&(s=e.effect(s,i))}for(let e of r){let t=targetElements.find((t=>t.text.some((t=>e.toLowerCase().includes(t.toLowerCase())))));t&&(o=[...o,...t.contribs(s,e)])}if(a){let e=targetElements.find((e=>e.text.some((e=>a.toLowerCase().includes(e.toLowerCase()))))).contribs(s,a);o=o.filter((t=>!e.map((e=>e.card)).includes(t.card)))}return o}function getWorking(e){if(!e)return;if(!e.hasOwnProperty("scoredata")||!e.hasOwnProperty("countWorking")){if(""==e.scoretype||!e.scoretype)return e.name+" doesn't score anything.";if("Number"==e.scoretype)return e.name+" scores "+e.value+"VP.";let t=e.name+" scores as a "+e.scoretype.toLowerCase();return e.hasOwnProperty("contributingCards")&&(t+=". Contributors: "+e.contributingCards.map((e=>e.cardName+" ("+e.pts.toFixed(1)+"VP)")).join(", ")),t}let t=e.name+" scores "+e.scoredata.origCondition+". Count process: "+e.countWorking+". ";return e.hasOwnProperty("contributingCards")&&(t+="Contributors: "+e.contributingCards.map((e=>e.cardName+" ("+e.pts.toFixed(1)+"VP)")).join(", ")),t}function scoreMultiplier(e,t,n){let r=0,i=[];for(let a of e.scoredata.counters)r+=Math.floor(countForScore(t,n,e,a.targets,a.modifier,a.exception)*a.multiplier/a.divisor),i.push(e.countWorking);return e.countWorking=i.join("; "),r>10&&(r=10),r<-10&&(r=-10),e.scoreWorking=getWorking(e),r}function scoreConditional(e,t,n){if(e.scoreWorking=e.name+" scoring condition: "+e.scoredata.origCondition+". ",t[n].bot)return Math.max(...e.scoredata.conditions.map((e=>e.amount)),e.scoredata.otherwise);for(let r of e.scoredata.conditions){let i=conditions.find((e=>e.text.some((e=>r.test.toLowerCase().includes(e.toLowerCase())))));if(i){if(i.verify(e,t,n))return e.scoreWorking+=`Met condition '${r.test}'.`,r.amount}else console.log('error: unable to find condition matching "'+r.test+'"')}return e.scoreWorking+="No conditions met.",e.scoredata.otherwise}function contribMultiplier(e,t,n){let r=[];if(!e.scoredata)return r;for(let i of e.scoredata.counters){let a=countForContribs(t,n,e,i.targets,i.modifier,i.exception),o=i.multiplier/i.divisor;for(let e of a)e.pts=e.count*o;r=[...r,...a]}return r}let cardScoreFunctions={},cardContribFunctions={};function scoreCard(e,t){if(!e.id||-1==e.id)return 0;let n=e.id;"Unrest"==e.name&&(n=281);let r=0;if(t.some((e=>"Cultists"==e.civ.name))&&e.suits.includes("unrest")){console.log("Special unrest rules",t,e);let n=t.find((e=>"Cultists"==e.civ.name));if("B"==n.power&&n.cards.includes(e))return 0;if(n.bot&&n.cards.includes(e))return 0==n.botLevel?0:n.botLevel>=4?2:1}return r=e.score&&"function"==typeof e.score?e.score(t):cardScoreFunctions[n]?cardScoreFunctions[n].call(e,t):scoreNewCard(e,t),r}function getContribsCard(e,t){if(e.id&&-1!=e.id)return e.getContributors&&"function"==typeof e.getContributors?e.getContributors(t):cardContribFunctions[e.id]?cardContribFunctions[e.id].call(e,t):newContribs(e,t)}function replaceCardFunctions(e){for(let t of e)void 0!==t.id&&t.score&&"function"==typeof t.score&&(cardScoreFunctions[t.id]=t.score,delete t.score),void 0!==t.id&&t.getContributors&&"function"==typeof t.getContributors&&(cardContribFunctions[t.id]=t.getContributors,delete t.getContributors)}function mergeCivs(e,t=!1){let n=new Set(allCards.reduce(((e,t)=>"Commons"==t.deck||"Fame"==t.deck?e:[...e,t.deck]),[])),r=[];r=1==t?Array.from(n).filter((e=>"patches"!=e)).map((e=>({name:e,style:"color: rgb(255, 255, 255);",box:"merchants"}))):Array.isArray(t)?t.map((e=>({name:e,style:"color: rgb(255, 255, 255);",box:"merchants"}))):factionsToAdd.map((e=>({name:e,style:"color: rgb(255, 255, 255);",box:"merchants"})));let i=[...e,...r].sort(((e,t)=>e.name.localeCompare(t.name))),a=[{name:"Martians",fieldsToChange:{extraDefault:"Alien",extraChoices:["Alien","Gone Native"],extraCanBeEmpty:!1}},{name:"Utopians",fieldsToChange:{extraDefault:"Visions of Shangri-La",extraChoices:["Visions of Shangri-La","Path to Shangri-La","Gates of Shangri-La","Shangri-La"],extraCanBeEmpty:!1}},{name:"Cultists",fieldsToChange:{extraDefault:"Research the Ceremony",extraChoices:["Research the Ceremony","Prepare the Ceremony","Ceremonial Gathering","Ceremony of the Key"],extraCanBeEmpty:!1}}];for(let e of a){let t=i.find((t=>t.name==e.name));if(t)for(let n of Object.keys(e.fieldsToChange))t[n]=e.fieldsToChange[n]}return i}function scoreNewCard(e,t){if(!e)return 0;if(""==e.scoretype)return e.scoreWorking=e.name+" doesn't score anything.",0;if("Number"==e.scoretype){if(e.suits&&e.suits.includes("gadget")){let n=t.findIndex((t=>t.cards.some((t=>t==e))));return-1==n?0:scoreGadget(e.value,t[n])}return e.scoreWorking=e.name+" scores "+e.value+"VP.",e.value}if("Conditional"==e.scoretype){let n=t.findIndex((t=>t.cards.some((t=>t==e))));if(-1==n)return 0;if(e.suits&&e.suits.includes("gadget")){return scoreGadget(scoreConditional(e,t,n),t[n])}return 0==e.scoredata.conditions.length?0:scoreConditional(e,t,n)}if("Multiplier"==e.scoretype){let n=t.findIndex((t=>t.cards.some((t=>t==e))));if(-1==n)return 0;if(e.suits&&e.suits.includes("gadget")){return scoreGadget(scoreMultiplier(e,t,n),t[n])}return t[n].bot?5:0==e.scoredata.counters.length?0:scoreMultiplier(e,t,n)}return 0}function scoreGadget(e,t,n){return e}function newContribs(e,t){if("Multiplier"!=e.scoretype)return;let n=t.findIndex((t=>t.cards.some((t=>t==e))));if(-1==n)return;if(t[n].bot)return;let r=contribMultiplier(e,t,n);r.length>0&&(e.contributingCards=r.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts}))));
319for(let t of r)t.card.contributedTo.push({cardName:e.name,cardID:e.id,pts:t.pts})}function get_each_context$3(e,t,n){const r=e.slice();return r[68]=t[n],r}function get_each_context_1$3(e,t,n){const r=e.slice();return r[71]=t[n],r}function get_each_context_2$2(e,t,n){const r=e.slice();return r[74]=t[n],r}function get_each_context_3$2(e,t,n){const r=e.slice();return r[71]=t[n],r}function get_each_context_4$1(e,t,n){const r=e.slice();return r[79]=t[n],r[80]=t,r[81]=n,r}function get_each_context_10$1(e,t,n){const r=e.slice();return r[68]=t[n],r[94]=n,r}function get_each_context_11$1(e,t,n){const r=e.slice();return r[71]=t[n],r}function get_each_context_5$1(e,t,n){const r=e.slice();return r[68]=t[n],r}function get_each_context_7$1(e,t,n){const r=e.slice();return r[86]=t[n],r}function get_each_context_8$1(e,t,n){const r=e.slice();return r[71]=t[n],r}function get_each_context_6$1(e,t,n){const r=e.slice();return r[79]=t[n],r}function get_each_context_9$1(e,t,n){const r=e.slice();return r[71]=t[n],r}function create_if_block_13$3(e){let t;function n(e,t){return"garrison"==e[4]||"tokens"==e[4]?create_if_block_14$2:create_else_block_7$1}let r=n(e),i=r(e);return{c(){i.c(),t=empty()},m(e,n){i.m(e,n),insert(e,t,n)},p(e,a){r===(r=n(e))&&i?i.p(e,a):(i.d(1),i=r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i.d(e),e&&detach(t)}}}function create_else_block_7$1(e){let t,n=e[0][e[11]].cards,r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_10$1(get_each_context_10$1(e,n,t));return{c(){t=element("div");for(let e=0;e<r.length;e+=1)r[e].c();attr(t,"class","list svelte-9urw67")},m(n,i){insert(n,t,i);for(let e=0;e<r.length;e+=1)r[e].m(t,null);e[49](t)},p(e,i){if(67110929&i[0]){let a;for(n=e[0][e[11]].cards,a=0;a<n.length;a+=1){const o=get_each_context_10$1(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_10$1(o),r[a].c(),r[a].m(t,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(n){n&&detach(t),destroy_each(r,n),e[49](null)}}}function create_if_block_14$2(e){let t,n,r,i=e[4]==e[10]&&create_if_block_26$1(),a=[...e[0][e[11]].cards.filter(e[40])],o=[];for(let t=0;t<a.length;t+=1)o[t]=create_each_block_5$1(get_each_context_5$1(e,a,t));return{c(){i&&i.c(),t=space(),n=element("div");for(let e=0;e<o.length;e+=1)o[e].c();attr(n,"class",r=null_to_empty(e[4]+"_list")+" svelte-9urw67")},m(e,r){i&&i.m(e,r),insert(e,t,r),insert(e,n,r);for(let e=0;e<o.length;e+=1)o[e].m(n,null)},p(e,s){if(e[4]==e[10]?i||(i=create_if_block_26$1(),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),67111955&s[0]){let t;for(a=[...e[0][e[11]].cards.filter(e[40])],t=0;t<a.length;t+=1){const r=get_each_context_5$1(e,a,t);o[t]?o[t].p(r,s):(o[t]=create_each_block_5$1(r),o[t].c(),o[t].m(n,null))}for(;t<o.length;t+=1)o[t].d(1);o.length=a.length}16&s[0]&&r!==(r=null_to_empty(e[4]+"_list")+" svelte-9urw67")&&attr(n,"class",r)},d(e){i&&i.d(e),e&&detach(t),e&&detach(n),destroy_each(o,e)}}}function create_if_block_27$1(e){let t,n,r,i,a,o,s,c,l,u,d=e[0].some(h),p=l$1(e[68].name)+"";function h(...t){return e[38](e[68],...t)}let f=d&&create_if_block_29$1(e),m=e[68].suits,g=[];for(let t=0;t<m.length;t+=1)g[t]=create_each_block_11$1(get_each_context_11$1(e,m,t));let y=e[68].scoretype&&create_if_block_28$1(e);function b(...t){return e[48](e[68],...t)}return{c(){t=element("button"),f&&f.c(),n=space();for(let e=0;e<g.length;e+=1)g[e].c();r=space(),i=text(p),a=space(),y&&y.c(),o=space(),attr(t,"title",s=e[68].scoreWorking||""),attr(t,"class",c=null_to_empty("card "+e[68].suits[0])+" svelte-9urw67")},m(e,s){insert(e,t,s),f&&f.m(t,null),append(t,n);for(let e=0;e<g.length;e+=1)g[e].m(t,null);append(t,r),append(t,i),append(t,a),y&&y.m(t,null),append(t,o),l||(u=listen(t,"click",b),l=!0)},p(a,l){if(e=a,2049&l[0]&&(d=e[0].some(h)),d?f?f.p(e,l):(f=create_if_block_29$1(e),f.c(),f.m(t,n)):f&&(f.d(1),f=null),2049&l[0]){let n;for(m=e[68].suits,n=0;n<m.length;n+=1){const i=get_each_context_11$1(e,m,n);g[n]?g[n].p(i,l):(g[n]=create_each_block_11$1(i),g[n].c(),g[n].m(t,r))}for(;n<g.length;n+=1)g[n].d(1);g.length=m.length}2049&l[0]&&p!==(p=l$1(e[68].name)+"")&&set_data(i,p),e[68].scoretype?y?y.p(e,l):(y=create_if_block_28$1(e),y.c(),y.m(t,o)):y&&(y.d(1),y=null),2049&l[0]&&s!==(s=e[68].scoreWorking||"")&&attr(t,"title",s),2049&l[0]&&c!==(c=null_to_empty("card "+e[68].suits[0])+" svelte-9urw67")&&attr(t,"class",c)},d(e){e&&detach(t),f&&f.d(),destroy_each(g,e),y&&y.d(),l=!1,u()}}}function create_if_block_29$1(e){let t,n;function r(...t){return e[39](e[68],...t)}function i(e,n){return(null==t||2049&n[0])&&(t=!("merchants"!=e[0].find(r).civ.box)),t?create_if_block_30$1:create_else_block_8$1}let a=i(e,[-1]),o=a(e);return{c(){o.c(),n=empty()},m(e,t){o.m(e,t),insert(e,n,t)},p(t,r){a===(a=i(e=t,r))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(n.parentNode,n)))},d(e){o.d(e),e&&detach(n)}}}function create_else_block_8$1(e){let t,n,r;function i(...t){return e[47](e[68],...t)}return{c(){t=element("div"),n=element("div"),attr(n,"class","triangle_small svelte-9urw67"),attr(n,"style",r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";"),set_style(t,"width","3vmin"),attr(t,"class","svelte-9urw67")},m(e,r){insert(e,t,r),append(t,n)},p(t,a){e=t,2049&a[0]&&r!==(r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";")&&attr(n,"style",r)},d(e){e&&detach(t)}}}function create_if_block_30$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img clip_triangle svelte-9urw67"),t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){2049&r[0]&&t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_each_block_11$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n=e[71]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){2049&r[0]&&t.src!==(n=e[71]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_28$1(e){let t,n,r,i=scoreCard(e[68],e[0])+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-9urw67"),attr(t,"class","cardscore svelte-9urw67")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){2049&t[0]&&i!==(i=scoreCard(e[68],e[0])+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_each_block_10$1(e){let t,n=!(e[4]&&e[68].location!=e[4]||e[68].hasOwnProperty("hidden")&&"play"!=e[4]&&"Shangri-La"!=e[68].name),r=n&&create_if_block_27$1(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,i){2065&i[0]&&(n=!(e[4]&&e[68].location!=e[4]||e[68].hasOwnProperty("hidden")&&"play"!=e[4]&&"Shangri-La"!=e[68].name)),n?r?r.p(e,i):(r=create_if_block_27$1(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&detach(t)}}}function create_if_block_26$1(e){let t;return{c(){t=text("Note: tokens on cards do not count towards end-game scoring unless you are Taino.")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_else_block_6$1(e){let t;return{c(){t=text("Under")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_if_block_25$1(e){let t;return{c(){t=text("On")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_if_block_23$1(e){let t,n;function r(...t){return e[37](e[68],...t)}function i(e,n){return(null==t||3089&n[0])&&(t=!("merchants"!=e[0].find(r).civ.box)),t?create_if_block_24$1:create_else_block_5$1}let a=i(e,[-1]),o=a(e);return{c(){o.c(),n=empty()},m(e,t){o.m(e,t),insert(e,n,t)},p(t,r){a===(a=i(e=t,r))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(n.parentNode,n)))},d(e){o.d(e),e&&detach(n)}}}function create_else_block_5$1(e){let t,n,r;function i(...t){return e[41](e[68],...t)}return{c(){t=element("div"),n=element("div"),attr(n,"class","triangle_small svelte-9urw67"),attr(n,"style",r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";"),set_style(t,"width","3vmin"),attr(t,"class","svelte-9urw67")},m(e,r){insert(e,t,r),append(t,n)},p(t,a){e=t,3089&a[0]&&r!==(r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";")&&attr(n,"style",r)},d(e){e&&detach(t)}}}function create_if_block_24$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img clip_triangle svelte-9urw67"),t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)}
319,p(e,r){3089&r[0]&&t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_each_block_9$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n=e[71]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){3089&r[0]&&t.src!==(n=e[71]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_21$2(e){let t,n=e[68].scoretype&&create_if_block_22$2(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,r){e[68].scoretype?n?n.p(e,r):(n=create_if_block_22$2(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&detach(t)}}}function create_if_block_22$2(e){let t,n,r,i=scoreCard(e[68],e[0])+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-9urw67"),attr(t,"class","cardscore svelte-9urw67")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){3089&t[0]&&i!==(i=scoreCard(e[68],e[0])+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_else_block_3$1(e){let t;function n(...t){return e[43](e[68],...t)}let r=e[0][e[11]].cards.filter(n),i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block_7$1(get_each_context_7$1(e,r,t));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=empty()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);insert(e,t,n)},p(a,o){if(e=a,67111953&o[0]){let a;for(r=e[0][e[11]].cards.filter(n),a=0;a<r.length;a+=1){const n=get_each_context_7$1(e,r,a);i[a]?i[a].p(n,o):(i[a]=create_each_block_7$1(n),i[a].c(),i[a].m(t.parentNode,t))}for(;a<i.length;a+=1)i[a].d(1);i.length=r.length}},d(e){destroy_each(i,e),e&&detach(t)}}}function create_if_block_15$2(e){let t,n=e[10],r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_6$1(get_each_context_6$1(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(3089&i[0]){let a;for(n=e[10],a=0;a<n.length;a+=1){const o=get_each_context_6$1(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_6$1(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_if_block_19$2(e){let t,n;function r(...t){return e[35](e[86],...t)}function i(e,n){return(null==t||3089&n[0])&&(t=!("merchants"!=e[0].find(r).civ.box)),t?create_if_block_20$2:create_else_block_4$1}let a=i(e,[-1]),o=a(e);return{c(){o.c(),n=empty()},m(e,t){o.m(e,t),insert(e,n,t)},p(t,r){a===(a=i(e=t,r))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(n.parentNode,n)))},d(e){o.d(e),e&&detach(n)}}}function create_else_block_4$1(e){let t,n,r;function i(...t){return e[44](e[86],...t)}return{c(){t=element("div"),n=element("div"),attr(n,"class","triangle_small svelte-9urw67"),attr(n,"style",r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";"),set_style(t,"width","3vmin"),attr(t,"class","svelte-9urw67")},m(e,r){insert(e,t,r),append(t,n)},p(t,a){e=t,3089&a[0]&&r!==(r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";")&&attr(n,"style",r)},d(e){e&&detach(t)}}}function create_if_block_20$2(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img clip_triangle svelte-9urw67"),t.src!==(n=e[86].deck.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)}
319,p(e,r){3089&r[0]&&t.src!==(n=e[86].deck.toLowerCase()+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_each_block_8$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n=e[71]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){3089&r[0]&&t.src!==(n=e[71]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_18$2(e){let t,n,r,i=scoreCard(e[86],e[0])+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-9urw67"),attr(t,"class","cardscore svelte-9urw67")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){3089&t[0]&&i!==(i=scoreCard(e[86],e[0])+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_each_block_7$1(e){let t,n,r,i,a,o,s,c,l,u,d=e[0].some(h),p=e[86].name+"";function h(...t){return e[34](e[86],...t)}let f=d&&create_if_block_19$2(e),m=e[86].suits,g=[];for(let t=0;t<m.length;t+=1)g[t]=create_each_block_8$1(get_each_context_8$1(e,m,t));let y=e[86].scoretype&&create_if_block_18$2(e);function b(...t){return e[45](e[86],...t)}return{c(){t=element("button"),f&&f.c(),n=space();for(let e=0;e<g.length;e+=1)g[e].c();r=space(),i=text(p),a=space(),y&&y.c(),o=space(),attr(t,"title",s=e[86].scoreWorking||""),attr(t,"class",c=null_to_empty("card "+e[86].suits[0])+" svelte-9urw67")},m(e,s){insert(e,t,s),f&&f.m(t,null),append(t,n);for(let e=0;e<g.length;e+=1)g[e].m(t,null);append(t,r),append(t,i),append(t,a),y&&y.m(t,null),append(t,o),l||(u=listen(t,"click",b),l=!0)},p(a,l){if(e=a,3089&l[0]&&(d=e[0].some(h)),d?f?f.p(e,l):(f=create_if_block_19$2(e),f.c(),f.m(t,n)):f&&(f.d(1),f=null),3089&l[0]){let n;for(m=e[86].suits,n=0;n<m.length;n+=1){const i=get_each_context_8$1(e,m,n);g[n]?g[n].p(i,l):(g[n]=create_each_block_8$1(i),g[n].c(),g[n].m(t,r))}for(;n<g.length;n+=1)g[n].d(1);g.length=m.length}3089&l[0]&&p!==(p=e[86].name+"")&&set_data(i,p),e[86].scoretype?y?y.p(e,l):(y=create_if_block_18$2(e),y.c(),y.m(t,o)):y&&(y.d(1),y=null),3089&l[0]&&s!==(s=e[86].scoreWorking||"")&&attr(t,"title",s),3089&l[0]&&c!==(c=null_to_empty("card "+e[86].suits[0])+" svelte-9urw67")&&attr(t,"class",c)},d(e){e&&detach(t),f&&f.d(),destroy_each(g,e),y&&y.d(),l=!1,u()}}}function create_if_block_16$2(e){let t,n,r,i,a=e[68][e[79]]>1&&create_if_block_17$2(e);return{c(){t=element("div"),n=element("div"),r=space(),a&&a.c(),i=space(),attr(n,"class","imagediv svelte-9urw67"),set_style(n,"background-image","url("+e[79]+".png)"),attr(t,"class","token_small svelte-9urw67")},m(e,o){insert(e,t,o),append(t,n),append(t,r),a&&a.m(t,null),append(t,i)},p(e,r){1024&r[0]&&set_style(n,"background-image","url("+e[79]+".png)"),e[68][e[79]]>1?a?a.p(e,r):(a=create_if_block_17$2(e),a.c(),a.m(t,i)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_if_block_17$2(e){let t,n,r=e[68][e[79]]+"";return{c(){t=element("div"),n=text(r),attr(t,"class","tokencount_small svelte-9urw67")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){3089&t[0]&&r!==(r=e[68][e[79]]+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_each_block_6$1(e){let t,n=e[68][e[79]]&&create_if_block_16$2(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,r){e[68][e[79]]?n?n.p(e,r):(n=create_if_block_16$2(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&detach(t)}}}function create_each_block_5$1(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b=e[0].some(A),v=l$1(e[68].name)+"";function A(...t){return e[36](e[68],...t)}function _(e,t){return e[10]?create_if_block_25$1:create_else_block_6$1}let x=_(e),k=x(e),w=b&&create_if_block_23$1(e),T=e[68].suits,S=[];for(let t=0;t<T.length;t+=1)S[t]=create_each_block_9$1(get_each_context_9$1(e,T,t));let C=e[68].scoretype&&create_if_block_21$2(e);function I(...t){return e[42](e[68],...t)}function N(e,t){return"tokens"==e[4]?create_if_block_15$2:create_else_block_3$1}let E=N(e),P=E(e);function $(...t){return e[46](e[68],...t)}return{c(){t=element("div"),n=element("div"),k.c(),r=space(),i=element("button"),w&&w.c(),a=space();for(let e=0;e<S.length;e+=1)S[e].c();o=space(),s=text(v),c=space(),C&&C.c(),d=space(),p=element("div"),p.textContent="â",h=space(),P.c(),f=space(),set_style(n,"font-size","3vmin"),attr(n,"class","svelte-9urw67"),attr(i,"title",l=e[68].scoreWorking||""),attr(i,"class",u=null_to_empty("card "+e[68].suits[0])+" svelte-9urw67"),set_style(p,"font-size","3vmin"),attr(p,"class","svelte-9urw67"),attr(t,"class",m=null_to_empty("garr
319ison_row"+(e[1]==e[68]?" selected":""))+" svelte-9urw67")},m(e,l){insert(e,t,l),append(t,n),k.m(n,null),append(t,r),append(t,i),w&&w.m(i,null),append(i,a);for(let e=0;e<S.length;e+=1)S[e].m(i,null);append(i,o),append(i,s),append(i,c),C&&C.m(i,null),append(t,d),append(t,p),append(t,h),P.m(t,null),append(t,f),g||(y=[listen(i,"click",I),listen(t,"click",$)],g=!0)},p(r,c){if(x!==(x=_(e=r))&&(k.d(1),k=x(e),k&&(k.c(),k.m(n,null))),3089&c[0]&&(b=e[0].some(A)),b?w?w.p(e,c):(w=create_if_block_23$1(e),w.c(),w.m(i,a)):w&&(w.d(1),w=null),3089&c[0]){let t;for(T=e[68].suits,t=0;t<T.length;t+=1){const n=get_each_context_9$1(e,T,t);S[t]?S[t].p(n,c):(S[t]=create_each_block_9$1(n),S[t].c(),S[t].m(i,o))}for(;t<S.length;t+=1)S[t].d(1);S.length=T.length}3089&c[0]&&v!==(v=l$1(e[68].name)+"")&&set_data(s,v),e[68].scoretype?C?C.p(e,c):(C=create_if_block_21$2(e),C.c(),C.m(i,null)):C&&(C.d(1),C=null),3089&c[0]&&l!==(l=e[68].scoreWorking||"")&&attr(i,"title",l),3089&c[0]&&u!==(u=null_to_empty("card "+e[68].suits[0])+" svelte-9urw67")&&attr(i,"class",u),E===(E=N(e))&&P?P.p(e,c):(P.d(1),P=E(e),P&&(P.c(),P.m(t,f))),3091&c[0]&&m!==(m=null_to_empty("garrison_row"+(e[1]==e[68]?" selected":""))+" svelte-9urw67")&&attr(t,"class",m)},d(e){e&&detach(t),k.d(),w&&w.d(),destroy_each(S,e),C&&C.d(),P.d(),g=!1,run_all(y)}}}function create_if_block_11$3(e){let t,n=e[10],r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_4$1(get_each_context_4$1(e,n,t));return{c(){t=element("div");for(let e=0;e<r.length;e+=1)r[e].c();attr(t,"class","token_buttons svelte-9urw67")},m(e,n){insert(e,t,n);for(let e=0;e<r.length;e+=1)r[e].m(t,null)},p(e,i){if(14779394&i[0]){let a;for(n=e[10],a=0;a<n.length;a+=1){const o=get_each_context_4$1(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_4$1(o),r[a].c(),r[a].m(t,null))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){e&&detach(t),destroy_each(r,e)}}}function create_else_block_2$1(e){let t,n=(e[1][e[79]]||"0")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){1026&r[0]&&n!==(n=(e[1][e[79]]||"0")+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_12$3(e){let t,n,r;function i(){e[51].call(t,e[79])}return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(a,o){insert(a,t,o),set_input_value(t,e[1][e[79]]),n||(r=[listen(t,"input",i),listen(t,"blur",e[21]),listen(t,"keyup",e[52]),listen(t,"input",e[22])],n=!0)},p(n,r){e=n,1026&r[0]&&t.value!==e[1][e[79]]&&set_input_value(t,e[1][e[79]])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_4$1(e){let t,n,r,i,a,o,s,c,l,u,d,p;function h(...t){return e[50](e[79],...t)}function f(e,t){return e[15]&&e[15]==e[79]?create_if_block_12$3:create_else_block_2$1}let m=f(e),g=m(e);function y(...t){return e[53](e[79],...t)}function b(...t){return e[54](e[79],...t)}return{c(){t=element("div"),n=element("button"),n.textContent="-",r=space(),i=element("div"),a=element("div"),o=space(),s=element("div"),g.c(),c=space(),l=element("button"),l.textContent="+",u=space(),attr(n,"class","incdec svelte-9urw67"),attr(a,"class","imagediv svelte-9urw67"),set_style(a,"background-image","url("+e[79]+".png)"),attr(s,"class","tokencount svelte-9urw67"),attr(i,"class","token svelte-9urw67"),attr(l,"class","incdec svelte-9urw67"),attr(t,"class","token_row svelte-9urw67")},m(e,f){insert(e,t,f),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),g.m(s,null),append(t,c),append(t,l),append(t,u),d||(p=[listen(n,"click",h),listen(s,"click",y),listen(l,"click",b)],d=!0)},p(t,n){e=t,1024&n[0]&&set_style(a,"background-image","url("+e[79]+".png)"),m===(m=f(e))&&g?g.p(e,n):(g.d(1),g=m(e),g&&(g.c(),g.m(s,null)))},d(e){e&&detach(t),g.d(),d=!1,run_all(p)}}}function create_if_block_2$3(e){let t,n,r=e[7]&&create_if_block_9$3(e),i=e[12].filter(e[57]).sort(e[58]),a=[];for(let t=0;t<i.length;t+=1)a[t]=create_each_block$3(get_each_context$3(e,i,t));return{c(){r&&r.c(),t=space(),n=element("div");for(let e=0;e<a.length;e+=1)a[e].c();attr(n,"class","choose svelte-9urw67")},m(e,i){r&&r.m(e,i),insert(e,t,i),insert(e,n,i);for(let e=0;e<a.length;e+=1)a[e].m(n,null)},p(e,o){if(e[7]?r?r.p(e,o):(r=create_if_block_9$3(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),16790397&o[0]){let t;for(i=e[12].filter(e[57]).sort(e[58]),t=0;t<i.length;t+=1){const r=get_each_context$3(e,i,t);a[t]?a[t].p(r,o):(a[t]=create_each_block$3(r),a[t].c(),a[t].m(n,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=i.length}},d(e){r&&r.d(e),e&&detach(t),e&&detach(n),destroy_each(a,e)}}}function create_if_block_1$3(e){let t;return{c(){t=element("div"),t.innerHTML='<div class="message svelte-9urw67">No cards in play area. Put some cards into play before adding tokens.</div>',set_style(t,"height","100%"),set_style(t,"display","flex"),set_style(t,"flex-direction","column"),set_style(t,"justify-content","space-evenly"),set_style(t,"align-items","center")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block$3(e){let t;return{c(){t=element("div"),t.innerHTML='<div class="message svelte-9urw67">
319No cards capable of garrisoning in play area. Put some regions or other cards capable of garrisoning into play first.</div>',set_style(t,"height","100%"),set_style(t,"display","flex"),set_style(t,"flex-direction","column"),set_style(t,"justify-content","space-evenly"),set_style(t,"align-items","center")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_9$3(e){let t,n,r,i,a,o=e[20],s=[];for(let t=0;t<o.length;t+=1)s[t]=create_each_block_3$2(get_each_context_3$2(e,o,t));let c=e[25](),l=[];for(let t=0;t<c.length;t+=1)l[t]=create_each_block_2$2(get_each_context_2$2(e,c,t));return{c(){t=element("div"),t.textContent="Click on the icons to filter available cards by suit or civilisation.",n=space(),r=element("div"),i=element("div");for(let e=0;e<s.length;e+=1)s[e].c();a=space();for(let e=0;e<l.length;e+=1)l[e].c();set_style(t,"text-align","center"),set_style(t,"font-size","2vmin"),attr(i,"class","filter_row svelte-9urw67")},m(e,o){insert(e,t,o),insert(e,n,o),insert(e,r,o),append(r,i);for(let e=0;e<s.length;e+=1)s[e].m(i,null);append(i,a);for(let e=0;e<l.length;e+=1)l[e].m(i,null)},p(e,t){if(1597440&t[0]){let n;for(o=e[20],n=0;n<o.length;n+=1){const r=get_each_context_3$2(e,o,n);s[n]?s[n].p(r,t):(s[n]=create_each_block_3$2(r),s[n].c(),s[n].m(i,a))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}if(34365440&t[0]){let n;for(c=e[25](),n=0;n<c.length;n+=1){const r=get_each_context_2$2(e,c,n);l[n]?l[n].p(r,t):(l[n]=create_each_block_2$2(r),l[n].c(),l[n].m(i,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=c.length}},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_each(s,e),destroy_each(l,e)}}}function create_each_block_3$2(e){let t,n,r,i,a;function o(...t){return e[55](e[71],...t)}return{c(){t=element("img"),t.src!==(n=e[71]+".png")&&attr(t,"src",n),attr(t,"class",r=null_to_empty(e[14]==e[71]?e[71]:"")+" svelte-9urw67"),set_style(t,"width","6vmin"),set_style(t,"height","6vmin"),set_style(t,"min-width","0"),set_style(t,"padding","0.5vmin"),set_style(t,"cursor","pointer"),attr(t,"alt",e[71])},m(e,n){insert(e,t,n),i||(a=listen(t,"click",o),i=!0)},p(n,i){e=n,16384&i[0]&&r!==(r=null_to_empty(e[14]==e[71]?e[71]:"")+" svelte-9urw67")&&attr(t,"class",r)},d(e){e&&detach(t),i=!1,a()}}}function create_else_block_1$1(e){let t;return{c(){t=element("div"),attr(t,"class","triangle svelte-9urw67"),attr(t,"style","border-color: transparent transparent transparent "+e[74].justColor+";")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_10$3(e){let t,n;return{c(){t=element("img"),attr(t,"class","clip_triangle svelte-9urw67"),set_style(t,"width","5vmin"),set_style(t,"height","5vmin"),set_style(t,"min-width","0"),set_style(t,"padding","0.5vmin"),set_style(t,"cursor","pointer"),attr(t,"alt",e[74].name),t.src!==(n=e[74].name.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_each_block_2$2(e){let t,n,r,i,a,o,s,c,l,u=e[74].name.slice(0,3)+"";let d=function(e,t){return"merchants"==e[74].box?create_if_block_10$3:create_else_block_1$1}(e)(e);function p(...t){return e[56](e[74],...t)}return{c(){t=element("button"),d.c(),n=space(),r=element("span"),i=text(u),a=space(),attr(r,"class",null_to_empty(civStyle(e[74]))+" svelte-9urw67"),attr(t,"style",o="Minoans"==e[74].name&&e[14]!=e[74].name||"Egyptians"==e[74].name&&e[14]==e[74].name?"background-color: white; ":""),attr(t,"class",s=null_to_empty(e[14]==e[74].name?"civcard selected":"civcard")+" svelte-9urw67")},m(e,o){insert(e,t,o),d.m(t,null),append(t,n),append(t,r),append(r,i),append(t,a),c||(l=listen(t,"click",p),c=!0)},p(n,r){e=n,d.p(e,r),16384&r[0]&&o!==(o="Minoans"==e[74].name&&e[14]!=e[74].name||"Egyptians"==e[74].name&&e[14]==e[74].name?"background-color: white; ":"")&&attr(t,"style",o),16384&r[0]&&s!==(s=null_to_empty(e[14]==e[74].name?"civcard selected":"civcard")+" svelte-9urw67")&&attr(t,"class",s)},d(e){e&&detach(t),d.d(),c=!1,l()}}}function create_if_block_7$3(e){let t,n;function r(...t){return e[33](e[68],...t)}function i(e,n){return(null==t||13145&n[0])&&(t=!("merchants"!=e[0].find(r).civ.box)),t?create_if_block_8$3:create_else_block$3}let a=i(e,[-1]),o=a(e);return{c(){o.c(),n=empty()},m(e,t){o.m(e,t),insert(e,n,t)},p(t,r){a===(a=i(e=t,r))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(n.parentNode,n)))},d(e){o.d(e),e&&detach(n)}}}function create_else_block$3(e){let t,n,r;function i(...t){return e[59](e[68],...t)}return{c(){t=element("div"),n=element("div"),attr(n,"class","triangle_small svelte-9urw67"),attr(n,"style",r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";"),set_style(t,"width","3vmin"),attr(t,"class","svelte-9urw67")},m(e,r){insert(e,t,r),append(t,n)},p(t,a){e=t,13145&a[0]&&r!==(r="border-color: transparent transparent transparent "+e[0].find(i).civ.justColor+";")&&attr(n,"style",r)},d(e){e&&detach(t)}}}function create_if_block_8$3(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img clip_triangle svelte-9urw67"),t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){13145&r[0]&&t.src!==(n=e[68].deck.toLowerCase()+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_each_block_1$3(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n=e[71]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){13145&r[0]&&t.src!==(n=e[71]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_3$3(e){let t;function n(e,t){return"Number"==e[68].scoretype?create_if_block_4$3:"Conditional"==e[68].scoretype?create_if_block_5$3:"Multiplier"==e[68].scoretype?create_if_block_6$3:void 0}let r=n(e),i=r&&r(e);return{c(){i&&i.c(),t=empty()},m(e,n){i&&i.m(e,n),insert(e,t,n)},p(e,a){r===(r=n(e))&&i?i.p(e,a):(i&&i.d(1),i=r&&r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i&&i.d(e),e&&detach(t)}}}function create_if_block_6$3(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n="star.png")&&attr(t,"src","star.png")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_5$3(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-9urw67"),t.src!==(n="question.png")&&attr(t,"src","question.png")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_4$3(e){let t,n,r,i=e[68].value+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-9urw67"),attr(t,"class","cardscore svelte-9urw67")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){13145&t[0]&&i!==(i=e[68].value+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_each_block$3(e){let t,n,r,i,a,o,s,c,l,u,d=e[0].some(h),p=l$1(e[68].name)+"";function h(...t){return e[32](e[68],...t)}let f=d&&create_if_block_7$3(e),m=e[68].suits,g=[];for(let t=0;t<m.length;t+=1)g[t]=create_each_block_1$3(get_each_context_1$3(e,m,t));let y=e[68].scoretype&&create_if_block_3$3(e);function b(...t){return e[60](e[68],...t)}return{c(){t=element("button"),f&&f.c(),n=space();for(let e=0;e<g.length;e+=1)g[e].c();r=space(),i=text(p),a=space(),y&&y.c(),o=space(),attr(t,"title",s=e[68].scoreWorking||""),attr(t,"class",c=null_to_empty("card "+e[68].suits[0]+(e[5]&&e[2]==e[68]?" selected":""))+" svelte-9urw67")},m(e,s){insert(e,t,s),f&&f.m(t,null),append(t,n);for(let e=0;e<g.length;e+=1)g[e].m(t,null);append(t,r),append(t,i),append(t,a),y&&y.m(t,null),append(t,o),l||(u=listen(t,"click",b),l=!0)},p(a,l){if(e=a,13145&l[0]&&(d=e[0].some(h)),d?f?f.p(e,l):(f=create_if_block_7$3(e),f.c(),f.m(t,n)):f&&(f.d(1),f=null),13145&l[0]){let n;for(m=e[68].suits,n=0;n<m.length;n+=1){const i=get_each_context_1$3(e,m,n);g[n]?g[n].p(i,l):(g[n]=create_each_block_1$3(i),g[n].c(),g[n].m(t,r))}for(;n<g.length;n+=1)g[n].d(1);g.length=m.length}13145&l[0]&&p!==(p=l$1(e[68].name)+"")&&set_data(i,p),e[68].scoretype?y?y.p(e,l):(y=create_if_block_3$3(e),y.c(),y.m(t,o)):y&&(y.d(1),y=null),13145&l[0]&&s!==(s=e[68].scoreWorking||"")&&attr(t,"title",s),13181&l[0]&&c!==(c=null_to_empty("card "+e[68].suits[0]+(e[5]&&e[2]==e[68]?" selected":""))+" svelte-9urw67")&&attr(t,"class",c)},d(e){e&&detach(t),f&&f.d(),destroy_each(g,e),y&&y.d(),l=!1,u()}}}function create_fragment$6(e){let t,n,r,i=!e[5]&&create_if_block_13$3(e),a="tokens"==e[4]&&e[1]&&create_if_block_11$3(e);function o(e,t){return"garrison"==e[4]&&null==e[1]?create_if_block$3:"tokens"==e[4]&&null==e[1]?create_if_block_1$3:"tokens"!=e[4]?create_if_block_2$3:void 0}let s=o(e),c=s&&s(e);return{c(){i&&i.c(),t=space(),a&&a.c(),n=space(),c&&c.c(),r=empty()},m(e,o){i&&i.m(e,o),insert(e,t,o),a&&a.m(e,o),insert(e,n,o),c&&c.m(e,o),insert(e,r,o)},p(e,l){e[5]?i&&(i.d(1),i=null):i?i.p(e,l):(i=create_if_block_13$3(e),i.c(),i.m(t.parentNode,t)),"tokens"==e[4]&&e[1]?a?a.p(e,l):(a=create_if_block_11$3(e),a.c(),a.m(n.parentNode,n)):a&&(a.d(1),a=null),s===(s=o(e))&&c?c.p(e,l):(c&&c.d(1),c=s&&s(e),c&&(c.c(),c.m(r.parentNode,r)))},i:noop$1,o:noop$1,d(e){i&&i.d(e),e&&detach(t),a&&a.d(e),e&&detach(n),c&&c.d(e),e&&detach(r)}}}function civStyle(e,t=null){let n=e.name.toLowerCase();return t?n+"_"+t:n}function instance$3(e,t,n){let r,i,{box:a}=t,{exp:o}=t,{players:s}=t,{numPlayers:c=2}=t,{location:l=null}=t,{selectSingle:u=!1}=t,{selected:d=null}=t,{selectedName:p=null}=t,{extraFilter:h=(e=>!0)}=t,{showFilters:f=!0}=t,{excludePlayerDecks:m=!0}=t,{showAllVisibleCards:g=!1}=t,{garrisoning:y}=t,{tokens:b=!1}=t,{replacementTribs:v=[]}=t,{current:A}=t,{promos:_=[]}=t,x="",{cards:k=getCards()}=t;function w(e){return!!_.filter((e=>e.use||e.usePlayer&&e.usePlayer.some((e=>1==e)))).some((t=>t.card.id==e.id))}function T(e,t){if(!w(e))return!1;let n=_.find((t=>t.card.id==e.id));if(!n||!n.usePlayer)return!1;let r=s.findIndex((e=>e.civ.name==t));return!(-1==r||!n.usePlayer[r])}p&&(d=k.find((e=>e.name==p&&h(e))));let S,C=e=>!e.hasOwnProperty("hidden")&&!e.area.startsWith("Extra")&&(!(e.minplayers>2&&e.minPlayers>c)&&(e.deck==s[A].civ.name||("Tributary"==e.area&&"Commons"==e.deck&&function(){let e=s.filter(((e,t)=>t<c)).map((e=>e.civ.name)),t=a.flatMap((e=>k.filter((t=>t.box.includes(e)&&"Commons"==t.deck&&t.suits.includes("trib")))));return!!e.some((e=>t.some((t=>t.name==e))))}()&&!s.some(((t,n)=>n<c&&t.civ.name==e.name))?0==v.length||e.box.filter((e=>a.includes(e))).length>=1||v.map((e=>e.value)).includes(e.name):!s.some(((t,n)=>n<c&&t.civ.name==e.name))&&(!(e.box.filter((e=>a.includes(e))).length<1&&!w(e))&&(!(e.hasOwnProperty("expansions")&&e.expansions.filter((e=>o.includes(e))).length<1)&&("Commons"==e.deck||"Fame"==e.deck||"Promos"==e.deck)))))),I=Array.from(new Set(k.filter((e=>C(e))).flatMap((e=>e.suits)))).filter((e=>""!=e)).sort(),N=e=>C(e);function E(e){i.contains(e.target)||P()}function P(){r&&(isNaN(y[r])&&n(1,y[r]=0,y),n(1,y[r]=parseInt(y[r]),y)),n(15,r=void 0),n(16,i=void 0),document.removeEventListener("click",E),n(0,s)}async function $(e,t){await tick(),n(15,r=e),n(16,i=t),await tick();let a=t.getElementsByTagName("input")[0];a&&(a.style.width=i.clientWidth+"px",a.select(),a.addEventListener("keyup",(e=>{13==e.keyCode&&P()}))),document.addEventListener("click",E)}async function R(e){if(u)return n(2,d=e),void n(27,p=e.name);console.log(e);let t=Object.assign({},e);l&&(t.location=l),"garrison"==l&&(t.garrisoning=y),n(0,s[A].cards=[...s[A].cards,t],s),await tick(),S&&n(17,S.scrollTop=S.scrollHeight,S),"Sumerians"!=t.name||s[A].bot||alert("Don't forget to return up to 2 Unrest before scoring! (The app won't do this for you.)")}function O(e){let t=s[A].cards.filter((t=>t.garrisoning==e));
319for(let e of t)console.log("removing garrisoned"),O(e);let r=s[A].cards.findIndex((t=>t==e));console.log("removing "+e.name),n(0,s[A].cards=[...s[A].cards.slice(0,r),...s[A].cards.slice(r+1,s[A].cards.length)],s)}return e.$$set=e=>{"box"in e&&n(28,a=e.box),"exp"in e&&n(29,o=e.exp),"players"in e&&n(0,s=e.players),"numPlayers"in e&&n(3,c=e.numPlayers),"location"in e&&n(4,l=e.location),"selectSingle"in e&&n(5,u=e.selectSingle),"selected"in e&&n(2,d=e.selected),"selectedName"in e&&n(27,p=e.selectedName),"extraFilter"in e&&n(6,h=e.extraFilter),"showFilters"in e&&n(7,f=e.showFilters),"excludePlayerDecks"in e&&n(8,m=e.excludePlayerDecks),"showAllVisibleCards"in e&&n(9,g=e.showAllVisibleCards),"garrisoning"in e&&n(1,y=e.garrisoning),"tokens"in e&&n(10,b=e.tokens),"replacementTribs"in e&&n(30,v=e.replacementTribs),"current"in e&&n(11,A=e.current),"promos"in e&&n(31,_=e.promos),"cards"in e&&n(12,k=e.cards)},e.$$.update=()=>{if(2049&e.$$.dirty[0]&&console.log(s[A].cards),268443648&e.$$.dirty[0]&&a&&(n(13,N),n(28,a)),2067&e.$$.dirty[0]&&"tokens"==l){let e=s[A].cards.filter((e=>canHaveTokens(e)));!(e.length>0)||y&&e.some((e=>e==y))||n(1,y=e[0]),0==e.length&&n(1,y=null)}if(2067&e.$$.dirty[0]&&"garrison"==l){let e=[...s[A].cards.filter((e=>e.garrisoning&&"play"==e.location))];!(e.length>0)||y&&e.some((e=>e==y))||n(1,y=e[0]),0==e.length&&n(1,y=null)}},[s,y,d,c,l,u,h,f,m,g,b,A,k,N,x,r,i,S,T,C,I,P,function(e){r&&(n(1,y[r]=y[r].replace(/[^0-9]/g,""),y),n(1,y[r]=parseInt(y[r]),y),isNaN(y[r])&&n(1,y[r]=0,y)),13==e.keyPress&&P(),n(0,s)},$,R,function(){return[s[A].civ,...s.filter(((e,t)=>t<c&&e!=s[A])).map((e=>e.civ))]},O,p,a,o,v,_,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,(e,t)=>t.civ.name==e.deck,e=>"tokens"==l&&b&&canHaveTokens(e)||"garrison"==l&&"play"==e.location&&e.garrisoning&&"Mana"!=e.name,(e,t)=>t.civ.name==e.deck,(e,t)=>n(1,y=e),(e,t)=>"garrison"==t.location&&(t.garrisoning==e||t.garrisoning&&t.garrisoning==e.uniqueID),(e,t)=>t.civ.name==e.deck,(e,t)=>O(e),(e,t)=>{n(1,y=e),console.log(y,e)},(e,t)=>t.civ.name==e.deck,(e,t)=>{e.hasOwnProperty("hidden")||O(e)},function(e){binding_callbacks[e?"unshift":"push"]((()=>{S=e,n(17,S)}))},(e,t)=>{void 0===y[e]||y[e]<=0?n(1,y[e]=0,y):n(1,y[e]--,y),n(1,y),n(4,l),n(0,s),n(11,A)},function(e){y[e]=this.value,n(1,y),n(4,l),n(0,s),n(11,A),n(10,b)},e=>{13==e.keyPress&&P()},(e,t)=>{i!=t.target&&$(e,t.target)},(e,t)=>{void 0===y[e]?n(1,y[e]=1,y):n(1,y[e]++,y),n(1,y),n(4,l),n(0,s),n(11,A)},(e,t)=>{x!=e?(n(14,x=e),n(13,N=t=>C(t)&&t.suits.includes(e))):(n(14,x=""),n(13,N=e=>C(e)))},(e,t)=>{x!=e.name?(n(14,x=e.name),n(13,N=t=>(t.deck==e.name||T(t,e.name))&&!t.hasOwnProperty("hidden"))):(n(14,x=""),n(13,N=e=>C(e)))},e=>N(e)&&h(e)&&("play"!=l||e.icons.includes("pinned")||e.suits.includes("trade_route"))&&(e.suits.includes("unrest")||!m||g||s.flatMap((t=>t.cards.filter((t=>t.id==e.id)))).length<e.count+(c>2?e.extra[c]:0)),(e,t)=>l$1(e.name).localeCompare(l$1(t.name)),(e,t)=>t.civ.name==e.deck,(e,t)=>R(e)]}class CardSelect extends SvelteComponent{constructor(e){super(),init(this,e,instance$3,create_fragment$6,safe_not_equal,{box:28,exp:29,players:0,numPlayers:3,location:4,selectSingle:5,selected:2,selectedName:27,extraFilter:6,showFilters:7,excludePlayerDecks:8,showAllVisibleCards:9,garrisoning:1,tokens:10,replacementTribs:30,current:11,promos:31,cards:12},[-1,-1,-1,-1])}}const min$7=Math.min,max$3=Math.max,round=Math.round,floor$8=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,n){return max$3(e,min$7(t,n))}function evaluate(e,t){return"function"==typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){void 0===n&&(n=!1);const r=getAlignment(e),i=getAlignmentAxis(e),a=getAxisLength(i);let o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=getOppositePlacement(o)),[o,getOppositePlacement(o)]}
vendor: 10,428 bytes, line 319
319function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,(e=>oppositeAlignmentMap[e]))}function getSideList(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function getOppositeAxisPlacements(e,t,n,r){const i=getAlignment(e);let a=getSideList(getSide(e),"start"===n,r);return i&&(a=a.map((e=>e+"-"+i)),t&&(a=a.concat(a.map(getOppositeAlignmentPlacement)))),a}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(e=>oppositeSideMap[e]))}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!=typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function computeCoordsFromPlacement(e,t,n){let{reference:r,floating:i}=e;const a=getSideAxis(t),o=getAlignmentAxis(t),s=getAxisLength(o),c=getSide(t),l="y"===a,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let h;switch(c){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(getAlignment(t)){case"start":h[o]-=p*(n&&l?-1:1);break;case"end":h[o]+=p*(n&&l?-1:1)}return h}const computePosition$1=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(null==o.isRTL?void 0:o.isRTL(t));let l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=computeCoordsFromPlacement(l,r,c),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:a,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:h,rects:l,platform:o,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[a]:{...h[a],...b}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(p=v.placement),v.rects&&(l=!0===v.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):v.rects),({x:u,y:d}=computeCoordsFromPlacement(l,p,c))),n=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}};async function detectOverflow(e,t){var n;void 0===t&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=evaluate(t,e),f=getPaddingObject(h),m=s[p?"floating"===d?"reference":"floating":d],g=rectToClientRect(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),y="floating"===d?{...o.floating,x:r,y:i}:o.reference,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),v=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},A=rectToClientRect(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:c}):y);return{top:(g.top-A.top+f.top)/v.y,bottom:(A.bottom-g.bottom+f.bottom)/v.y,left:(g.left-A.left+f.left)/v.x,right:(A.right-g.right+f.right)/v.x}}const flip$1=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...g}=evaluate(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const y=getSide(i),b=getSide(s)===s,v=await(null==c.isRTL?void 0:c.isRTL(l.floating)),A=p||(b||!m?[getOppositePlacement(s)]:getExpandedPlacements(s));p||"none"===f||A.push(...getOppositeAxisPlacements(s,m,f,v));const _=[s,...A],x=await detectOverflow(t,g),k=[];let w=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&k.push(x[y]),d){const e=getAlignmentSides(i,o,v);k.push(x[e[0]],x[e[1]])}if(w=[...w,{placement:i,overflows:k}],!k.every((e=>e<=0))){var T,S;const e=((null==(T=a.flip)?void 0:T.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:w},reset:{placement:t}};let n=null==(S=w.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(h){case"bestFit":{var C;const e=null==(C=w.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=s}if(i!==n)return{reset:{placement:n}}}return{}}}};async function convertValueToCoords(e,t){const{placement:n,platform:r,elements:i}=e,a=await(null==r.isRTL?void 0:r.isRTL(i.floating)),o=getSide(n),s=getAlignment(n),c="y"===getSideAxis(n),l=["left","top"].includes(o)?-1:1,u=a&&c?-1:1,d=evaluate(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),c?{x:h*u,y:p*l}:{x:p*l,y:h*u}}const offset=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,c=await convertValueToCoords(t,e);return o===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},shift$1=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=evaluate(e,t),l={x:n,y:r},u=await detectOverflow(t,c),d=getSideAxis(getSide(i)),p=getOppositeAxis(d);let h=l[p],f=l[d];if(a){const e="y"===p?"bottom":"right";h=clamp(h+u["y"===p?"top":"left"],h,h-u[e])}if(o){const e="y"===d?"bottom":"right";f=clamp(f+u["y"===d?"top":"left"],f,f-u[e])}const m=s.fn({...t,[p]:h,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return e instanceof Node||e instanceof getWindow(e).Node}function isElement(e){return e instanceof Element||e instanceof getWindow(e).Element}function isHTMLElement(e){return e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=getComputedStyle(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isContainingBlock(e){const t=isWebKit(),n=getComputedStyle(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const i=getNearestOverflowAncestor(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=getWindow(i);return a?t.concat(o,o.visualViewport||[],isOverflowElement(i)?i:[],o.frameElement&&n?getOverflowAncestors(o.frameElement):[]):t.concat(i,getOverflowAncestors(i,[],n))}function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=isHTMLElement(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=round(n)!==a||round(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=getCssDimensions(t);let o=(a?round(n.width):n.width)/r,s=(a?round(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==getWindow(e))&&t}function getBoundingClientRect(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const i=e.getBoundingClientRect(),a=unwrapElement(e);let o=createCoords(1);t&&(r?isElement(r)&&(o=getScale(r)):o=getScale(e));const s=shouldAddVisualOffsets(a,n,r)?getVisualOffsets(a):createCoords(0);let c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){const e=getWindow(a),t=r&&isElement(r)?getWindow(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=getScale(n),t=n.getBoundingClientRect(),r=getComputedStyle(n),i=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.to
319p+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=i,l+=a,n=getWindow(n).frameElement}}return rectToClientRect({width:u,height:d,x:c,y:l})}const topLayerSelectors=[":popover-open",":modal"];function topLayer(e){let t=!1,n=0,r=0;if(topLayerSelectors.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch(e){}}(n)})),t){const t=getContainingBlock(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=getDocumentElement(r),[o]=t?topLayer(t.floating):[!1];if(r===a||o)return n;let s={scrollLeft:0,scrollTop:0},c=createCoords(1);const l=createCoords(0),u=isHTMLElement(r);if((u||!u&&"fixed"!==i)&&(("body"!==getNodeName(r)||isOverflowElement(a))&&(s=getNodeScroll(r)),isHTMLElement(r))){const e=getBoundingClientRect(r);c=getScale(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getNodeScroll(e).scrollLeft}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),r=e.ownerDocument.body,i=max$3(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=max$3(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+getWindowScrollBarX(e);const s=-n.scrollTop;return"rtl"===getComputedStyle(r).direction&&(o+=max$3(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function getViewportRect(e,t){const n=getWindow(e),r=getDocumentElement(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=isHTMLElement(e)?getScale(e):createCoords(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function getClientRectFromClippingAncestor(e,t,n){let r;if("viewport"===t)r=getViewportRect(e,n);else if("document"===t)r=getDocumentRect(getDocumentElement(e));else if(isElement(t))r=getInnerBoundingClientRect(t,n);else{const n=getVisualOffsets(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return rectToClientRect(r)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return!(n===t||!isElement(n)||isLastTraversableNode(n))&&("fixed"===getComputedStyle(n).position||hasFixedPositionAncestor(n,t))}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let r=getOverflowAncestors(e,[],!1).filter((e=>isElement(e)&&"body"!==getNodeName(e))),i=null;const a="fixed"===getComputedStyle(e).position;let o=a?getParentNode(e):e;for(;isElement(o)&&!isLastTraversableNode(o);){const t=getComputedStyle(o),n=isContainingBlock(o);n||"fixed"!==t.position||(i=null);(a?!n&&!i:!n&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||isOverflowElement(o)&&!n&&hasFixedPositionAncestor(e,o))?r=r.filter((e=>e!==o)):i=t,o=getParentNode(o)}return t.set(e,r),r}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[..."clippingAncestors"===n?getClippingElementAncestors(t,this._c):[].concat(n),r],o=a[0],s=a.reduce(((e,n)=>{const r=getClientRectFromClippingAncestor(t,n,i);return e.top=max$3(r.top,e.top),e.right=min$7(r.right,e.right),e.bottom=min$7(r.bottom,e.bottom),e.left=max$3(r.left,e.left),e}),getClientRectFromClippingAncestor(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n,r){const i=isHTMLElement(t),a=getDocumentElement(t),o="fixed"===n,s=getBoundingClientRect(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const l=createCoords(0);if(i||!i&&!o)if(("body"!==getNodeName(t)||isOverflowElement(a))&&(c=getNodeScroll(t)),i){const e=getBoundingClientRect(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&(l.x=getWindowScrollBarX(a));let u=s.left+c.scrollLeft-l.x,d=s.top+c.scrollTop-l.y;const[p,h,f]=topLayer(r);
319return p&&(u+=h,d+=f,i&&(u+=t.clientLeft,d+=t.clientTop)),{x:u,y:d,width:s.width,height:s.height}}function getTrueOffsetParent(e,t){return isHTMLElement(e)&&"fixed"!==getComputedStyle(e).position?t?t(e):e.offsetParent:null}function getOffsetParent(e,t){const n=getWindow(e);if(!isHTMLElement(e))return n;let r=getTrueOffsetParent(e,t);for(;r&&isTableElement(r)&&"static"===getComputedStyle(r).position;)r=getTrueOffsetParent(r,t);return r&&("html"===getNodeName(r)||"body"===getNodeName(r)&&"static"===getComputedStyle(r).position&&!isContainingBlock(r))?n:r||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions;return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function isRTL(e){return"rtl"===getComputedStyle(e).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement,getClippingRect:getClippingRect,getOffsetParent:getOffsetParent,getElementRects:getElementRects,getClientRects:getClientRects,getDimensions:getDimensions,getScale:getScale,isElement:isElement,isRTL:isRTL};function observeMove(e,t){let n,r=null;const i=getDocumentElement(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function o(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),a();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const h={rootMargin:-floor$8(u)+"px "+-floor$8(i.clientWidth-(l+d))+"px "+-floor$8(i.clientHeight-(u+p))+"px "+-floor$8(l)+"px",threshold:max$3(0,min$7(1,c))||1};let f=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!f)return o();t?o(!1,t):n=setTimeout((()=>{o(!1,1e-7)}),100)}f=!1}try{r=new IntersectionObserver(m,{...h,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(m,h)}r.observe(e)}(!0),a}function autoUpdate(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=unwrapElement(e),u=i||a?[...l?getOverflowAncestors(l):[],...getOverflowAncestors(t)]:[];u.forEach((e=>{i&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const d=l&&s?observeMove(l,n):null;let p,h=-1,f=null;o&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),l&&!c&&f.observe(l),f.observe(t));let m=c?getBoundingClientRect(e):null;return c&&function t(){const r=getBoundingClientRect(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{i&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(p)}}const shift=shift$1,flip=flip$1,computePosition=(e,t,n)=>{const r=new Map,i={platform:platform,...n},a={...i.platform,_c:r};return computePosition$1(e,t,{...i,platform:a})};function createFloatingActions(e){let t,n;const r={autoUpdate:!0};let i=e;const a=t=>({...r,...e||{},...t||{}}),o=e=>{t&&n&&(i=a(e),computePosition(t,n,i).then((e=>{Object.assign(n.style,{position:e.strategy,left:`${e.x}px`,top:`${e.y}px`}),i?.onComputed&&i.onComputed(e)})))},s=e=>{onDestroy(e.subscribe((e=>{void 0===t?(t=e,o()):(Object.assign(t,e),o())})))};return[e=>{if("subscribe"in e)return s(e),{};t=e,o()},(e,r)=>{let s;n=e,i=a(r),setTimeout((()=>o(r)),0),o(r);const c=()=>{s&&(s(),s=void 0)},l=({autoUpdate:e}=i||{})=>{c(),!1!==e&&tick().then((()=>autoUpdate(t,n,(()=>o(i)),!0===e?{}:e)))};return s=l(),{update(e){o(e),s=l(e)},destroy(){c()}}},o]}function filter({loadOptions:e,filterText:t,items:n,multiple:r,value:i,itemId:a,groupBy:o,filterSelectedItems:s,itemFilter:c,convertStringItemsToObjects:l,filterGroupedItems:u,label:d}){if(n&&e)return n;if(!n)return[];n&&n.length>0&&"object"!=typeof n[0]&&(n=l(n));let p=n.filter((e=>{let n=c(e[d],t,e);return n&&r&&i?.length&&(n=!i.some((t=>!!s&&t[a]===e[a]))),n}));return o&&(p=u(p)),p}async function getItems({dispatch:e,loadOptions:t,convertStringItemsToObjects:n,filterText:r}){let i=await t(r).catch((t=>{console.warn("svelte-select loadOptions error :>> ",t),e("error",{type:"loadOptions",details:t})}));if(i&&!i.cancelled)return i?(i&&i.length>0&&"object"!=typeof i[0]&&(i=n(i)),e("loaded",{items:i})):i=[],{filteredItems:i,loading:!1,focused:!0,listOpen:!0}}function create_fragment$5(e){let t,n;
319return{c(){t=svg_element("svg"),n=svg_element("path"),attr(n,"fill","currentColor"),attr(n,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),attr(t,"width","100%"),attr(t,"height","100%"),attr(t,"viewBox","0 0 20 20"),attr(t,"focusable","false"),attr(t,"aria-hidden","true"),attr(t,"class","svelte-qbd276")},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,i:noop$1,o:noop$1,d(e){e&&detach(t)}}}class ChevronIcon extends SvelteComponent{constructor(e){super(),init(this,e,null,create_fragment$5,safe_not_equal,{})}}function create_fragment$4(e){let t,n;return{c(){t=svg_element("svg"),n=svg_element("path"),attr(n,"fill","currentColor"),attr(n,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),attr(t,"width","100%"),attr(t,"height","100%"),attr(t,"viewBox","-2 -2 50 50"),attr(t,"focusable","false"),attr(t,"aria-hidden","true"),attr(t,"role","presentation"),attr(t,"class","svelte-whdbu1")},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,i:noop$1,o:noop$1,d(e){e&&detach(t)}}}class ClearIcon extends SvelteComponent{constructor(e){super(),init(this,e,null,create_fragment$4,safe_not_equal,{})}}function create_fragment$3(e){let t,n;return{c(){t=svg_element("svg"),n=svg_element("circle"),attr(n,"class","circle_path svelte-1p3nqvd"),attr(n,"cx","50"),attr(n,"cy","50"),attr(n,"r","20"),attr(n,"fill","none"),attr(n,"stroke","currentColor"),attr(n,"stroke-width","5"),attr(n,"stroke-miterlimit","10"),attr(t,"class","loading svelte-1p3nqvd"),attr(t,"viewBox","25 25 50 50")},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,i:noop$1,o:noop$1,d(e){e&&detach(t)}}}class LoadingIcon extends SvelteComponent{constructor(e){super(),init(this,e,null,create_fragment$3,safe_not_equal,{})}}const get_required_slot_changes=e=>({value:8&e[0]}),get_required_slot_context=e=>({value:e[3]}),get_input_hidden_slot_changes=e=>({value:8&e[0]}),get_input_hidden_slot_context=e=>({value:e[3]}),get_chevron_icon_slot_changes=e=>({listOpen:64&e[0]}),get_chevron_icon_slot_context=e=>({listOpen:e[6]}),get_clear_icon_slot_changes=e=>({}),get_clear_icon_slot_context=e=>({}),get_loading_icon_slot_changes=e=>({}),get_loading_icon_slot_context=e=>({}),get_selection_slot_changes_1=e=>({selection:8&e[0]}),get_selection_slot_context_1=e=>({selection:e[3]});function get_each_context$2(e,t,n){const r=e.slice();return r[126]=t[n],r[128]=n,r}const get_multi_clear_icon_slot_changes=e=>({}),get_multi_clear_icon_slot_context=e=>({}),get_selection_slot_changes=e=>({selection:8&e[0]}),get_selection_slot_context=e=>({selection:e[126],index:e[128]}),get_prepend_slot_changes=e=>({}),get_prepend_slot_context=e=>({}),get_list_append_slot_changes=e=>({}),get_list_append_slot_context=e=>({}),get_empty_slot_changes=e=>({}),get_empty_slot_context=e=>({});function get_each_context_1$2(e,t,n){const r=e.slice();return r[126]=t[n],r[128]=n,r}const get_item_slot_changes=e=>({item:16777216&e[0]}),get_item_slot_context=e=>({item:e[126],index:e[128]}),get_list_slot_changes=e=>({filteredItems:16777216&e[0]}),get_list_slot_context=e=>({filteredItems:e[24]}),get_list_prepend_slot_changes=e=>({}),get_list_prepend_slot_context=e=>({});function create_if_block_8$2(e){let t,n,r,i,a,o,s,c,l=e[50]["list-prepend"]&&create_if_block_13$2(e);const u=[create_if_block_10$2,create_if_block_11$2,create_if_block_12$2],d=[];function p(e,t){return e[50].list?0:e[24].length>0?1:e[19]?-1:2}~(r=p(e))&&(i=d[r]=u[r](e));let h=e[50]["list-append"]&&create_if_block_9$2(e);return{c(){t=element("div"),l&&l.c(),n=space(),i&&i.c(),a=space(),h&&h.c(),attr(t,"class","svelte-select-list svelte-82qwg8"),attr(t,"role","none"),toggle_class(t,"prefloat",e[28])},m(i,u){insert(i,t,u),l&&l.m(t,null),append(t,n),~r&&d[r].m(t,null),append(t,a),h&&h.m(t,null),e[91](t),o=!0,s||(c=[action_destroyer(e[49].call(null,t)),listen(t,"scroll",e[41]),listen(t,"pointerup",stop_propagation(prevent_default(e[85]))),listen(t,"mousedown",stop_propagation(prevent_default(e[86])))],s=!0)},p(e,o){e[50]["list-prepend"]?l?(l.p(e,o),524288&o[1]&&transition_in(l,1)):(l=create_if_block_13$2(e),l.c(),transition_in(l,1),l.m(t,n)):l&&(group_outros(),transition_out(l,1,1,(()=>{l=null})),check_outros());let s=r;r=p(e),r===s?~r&&d[r].p(e,o):(i&&(group_outros(),transition_out(d[s],1,1,(()=>{d[s]=null})),check_outros()),~r?(i=d[r],i?i.p(e,o):(i=d[r]=u[r](e),i.c()),transition_in(i,1),i.m(t,a)):i=null),e[50]["list-append"]?h?(h.p(e,o),524288&o[1]&&transition_in(h,1)):(h=create_if_block_9$2(e),h.c(),transition_in(h,1),h.m(t,null)):h&&(group_outros(),transition_out(h,1,1,(()=>{h=null})),check_outros()),268435456&o[0]&&toggle_class(t,"prefloat",e[28])},i(e){o||(transition_in(l),transition_in(i),transition_in(h),o=!0)},o(e){transition_out(l),transition_out(i),transition_out(h),o=!1},d(n){n&&detach(t),l&&l.d(),~r&&d[r].d(),h&&h.d(),e[91](null),s=!1,run_all(c)}}}function create_if_block_13$2(e){let t;const n=e[83]["list-prepend"],r=create_slot(n,e,e[82],get_list_prepend_slot_context);return{c(){r&&r.c()},m(e,n){r&&r.m(e,n),t=!0},p(e,i){r&&r.p&&(!t||1048576&i[2])&&update_slot(r,n,e,e[82],i,get_list_prepend_slot_changes,get_list_prepend_slot_context)},i(e){t||(transition_in(r,e),t=!0)},o(e){transition_out(r,e),t=!1},d(e){r&&r.d(e)}}}function create_if_block_12$2(e){let t;const n=e[83].empty,r=create_slot(n,e,e[82],get_empty_slot_context),i=r||fallback_block_9();return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,i){r&&r.p&&(!t||1048576&i[2])&&update_slot(r,n,e,e[82],i,get_empty_slot_changes,get_empty_slot_context)},i(e){t||(transition_in(i,e),t=!0)},o(e){transition_out(i,e),t=!1},d(e){i&&i.d(e)}}}function create_if_block_11$2(e){let t,n,r=e[24],i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block_1$2(get_each_context_1$2(e,r,t));const a=e=>transition_out(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();
319t=empty()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);insert(e,t,r),n=!0},p(e,n){if(16789640&n[0]|28696&n[1]|1048576&n[2]){let o;for(r=e[24],o=0;o<r.length;o+=1){const a=get_each_context_1$2(e,r,o);i[o]?(i[o].p(a,n),transition_in(i[o],1)):(i[o]=create_each_block_1$2(a),i[o].c(),transition_in(i[o],1),i[o].m(t.parentNode,t))}for(group_outros(),o=r.length;o<i.length;o+=1)a(o);check_outros()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)transition_in(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)transition_out(i[e]);n=!1},d(e){destroy_each(i,e),e&&detach(t)}}}function create_if_block_10$2(e){let t;const n=e[83].list,r=create_slot(n,e,e[82],get_list_slot_context);return{c(){r&&r.c()},m(e,n){r&&r.m(e,n),t=!0},p(e,i){r&&r.p&&(!t||16777216&i[0]|1048576&i[2])&&update_slot(r,n,e,e[82],i,get_list_slot_changes,get_list_slot_context)},i(e){t||(transition_in(r,e),t=!0)},o(e){transition_out(r,e),t=!1},d(e){r&&r.d(e)}}}function fallback_block_9(e){let t;return{c(){t=element("div"),t.textContent="No options",attr(t,"class","empty svelte-82qwg8")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function fallback_block_8(e){let t,n=e[126]?.[e[12]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){16781312&r[0]&&n!==(n=e[126]?.[e[12]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_each_block_1$2(e){let t,n,r,i,a,o,s,c;const l=e[83].item,u=create_slot(l,e,e[82],get_item_slot_context),d=u||fallback_block_8(e);function p(){return e[88](e[128])}function h(){return e[89](e[128])}function f(){return e[90](e[126],e[128])}return{c(){t=element("div"),n=element("div"),d&&d.c(),a=space(),attr(n,"class","item svelte-82qwg8"),toggle_class(n,"list-group-title",e[126].groupHeader),toggle_class(n,"active",e[45](e[126],e[3],e[13])),toggle_class(n,"first",isItemFirst(e[128])),toggle_class(n,"hover",e[7]===e[128]),toggle_class(n,"group-item",e[126].groupItem),toggle_class(n,"not-selectable",!1===e[126]?.selectable),attr(t,"class","list-item svelte-82qwg8"),attr(t,"tabindex","-1"),attr(t,"role","none")},m(l,u){insert(l,t,u),append(t,n),d&&d.m(n,null),append(t,a),o=!0,s||(c=[action_destroyer(r=e[46].call(null,n,{scroll:e[45](e[126],e[3],e[13]),listDom:e[34]})),action_destroyer(i=e[47].call(null,n,{scroll:e[35]===e[128],listDom:e[34]})),listen(t,"mouseover",p),listen(t,"focus",h),listen(t,"click",stop_propagation(f)),listen(t,"keydown",stop_propagation(prevent_default(e[87])))],s=!0)},p(t,a){e=t,u?u.p&&(!o||16777216&a[0]|1048576&a[2])&&update_slot(u,l,e,e[82],a,get_item_slot_changes,get_item_slot_context):d&&d.p&&16781312&a[0]&&d.p(e,a),r&&is_function(r.update)&&16785416&a[0]|8&a[1]&&r.update.call(null,{scroll:e[45](e[126],e[3],e[13]),listDom:e[34]}),i&&is_function(i.update)&&24&a[1]&&i.update.call(null,{scroll:e[35]===e[128],listDom:e[34]}),16777216&a[0]&&toggle_class(n,"list-group-title",e[126].groupHeader),16785416&a[0]|16384&a[1]&&toggle_class(n,"active",e[45](e[126],e[3],e[13])),128&a[0]&&toggle_class(n,"hover",e[7]===e[128]),16777216&a[0]&&toggle_class(n,"group-item",e[126].groupItem),16777216&a[0]&&toggle_class(n,"not-selectable",!1===e[126]?.selectable)},i(e){o||(transition_in(d,e),o=!0)},o(e){transition_out(d,e),o=!1},d(e){e&&detach(t),d&&d.d(e),s=!1,run_all(c)}}}function create_if_block_9$2(e){let t;const n=e[83]["list-append"],r=create_slot(n,e,e[82],get_list_append_slot_context);return{c(){r&&r.c()},m(e,n){r&&r.m(e,n),t=!0},p(e,i){r&&r.p&&(!t||1048576&i[2])&&update_slot(r,n,e,e[82],i,get_list_append_slot_changes,get_list_append_slot_context)},i(e){t||(transition_in(r,e),t=!0)},o(e){transition_out(r,e),t=!1},d(e){r&&r.d(e)}}}function create_if_block_7$2(e){let t,n,r,i,a;return{c(){t=element("span"),n=text(e[32]),r=space(),i=element("span"),a=text(e[33]),attr(t,"id","aria-selection"),attr(t,"class","svelte-82qwg8"),attr(i,"id","aria-context"),attr(i,"class","svelte-82qwg8")},m(e,o){insert(e,t,o),append(t,n),insert(e,r,o),insert(e,i,o),append(i,a)},p(e,t){2&t[1]&&set_data(n,e[32]),4&t[1]&&set_data(a,e[33])},d(e){e&&detach(t),e&&detach(r),e&&detach(i)}}}function create_if_block_4$2(e){let t,n,r,i;const a=[create_if_block_5$2,create_else_block$2],o=[];function s(e,t){return e[9]?0:1}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=empty()},m(e,n){o[t].m(e,n),insert(e,r,n),i=!0},p(e,i){let c=t;t=s(e),t===c?o[t].p(e,i):(group_outros(),transition_out(o[c],1,1,(()=>{o[c]=null})),check_outros(),n=o[t],n?n.p(e,i):(n=o[t]=a[t](e),n.c()),transition_in(n,1),n.m(r.parentNode,r))},i(e){i||(transition_in(n),i=!0)},o(e){transition_out(n),i=!1},d(e){o[t].d(e),e&&detach(r)}}}function create_else_block$2(e){let t,n;const r=e[83].selection,i=create_slot(r,e,e[82],get_selection_slot_context_1),a=i||fallback_block_7(e);return{c(){t=element("div"),a&&a.c(),attr(t,"class","selected-item svelte-82qwg8"),toggle_class(t,"hide-selected-item",e[29])},m(e,r){insert(e,t,r),a&&a.m(t,null),n=!0},p(e,o){i?i.p&&(!n||8&o[0]|1048576&o[2])&&update_slot(i,r,e,e[82],o,get_selection_slot_changes_1,get_selection_slot_context_1):a&&a.p&&4104&o[0]&&a.p(e,o),536870912&o[0]&&toggle_class(t,"hide-selected-item",e[29])},i(e){n||(transition_in(a,e),n=!0)},o(e){transition_out(a,e),n=!1},d(e){e&&detach(t),a&&a.d(e)}}}function create_if_block_5$2(e){let t,n,r=e[3],i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block$2(get_each_context$2(e,r,t));const a=e=>transition_out(i[e],1,1,(()=>{i[e]=null}));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();
319t=empty()},m(e,r){for(let t=0;t<i.length;t+=1)i[t].m(e,r);insert(e,t,r),n=!0},p(e,n){if(67116040&n[0]|32&n[1]|1048576&n[2]){let o;for(r=e[3],o=0;o<r.length;o+=1){const a=get_each_context$2(e,r,o);i[o]?(i[o].p(a,n),transition_in(i[o],1)):(i[o]=create_each_block$2(a),i[o].c(),transition_in(i[o],1),i[o].m(t.parentNode,t))}for(group_outros(),o=r.length;o<i.length;o+=1)a(o);check_outros()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)transition_in(i[e]);n=!0}},o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)transition_out(i[e]);n=!1},d(e){destroy_each(i,e),e&&detach(t)}}}function fallback_block_7(e){let t,n=e[3][e[12]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){4104&r[0]&&n!==(n=e[3][e[12]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function fallback_block_6(e){let t,n=e[126][e[12]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){4104&r[0]&&n!==(n=e[126][e[12]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_6$2(e){let t,n,r,i;const a=e[83]["multi-clear-icon"],o=create_slot(a,e,e[82],get_multi_clear_icon_slot_context),s=o||fallback_block_5();function c(){return e[92](e[128])}return{c(){t=element("div"),s&&s.c(),attr(t,"class","multi-item-clear svelte-82qwg8")},m(e,a){insert(e,t,a),s&&s.m(t,null),n=!0,r||(i=listen(t,"pointerup",stop_propagation(prevent_default(c))),r=!0)},p(t,r){e=t,o&&o.p&&(!n||1048576&r[2])&&update_slot(o,a,e,e[82],r,get_multi_clear_icon_slot_changes,get_multi_clear_icon_slot_context)},i(e){n||(transition_in(s,e),n=!0)},o(e){transition_out(s,e),n=!1},d(e){e&&detach(t),s&&s.d(e),r=!1,i()}}}function fallback_block_5(e){let t,n;return t=new ClearIcon({}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_each_block$2(e){let t,n,r,i,a,o,s;const c=e[83].selection,l=create_slot(c,e,e[82],get_selection_slot_context),u=l||fallback_block_6(e);let d=!e[11]&&!e[10]&&ClearIcon&&create_if_block_6$2(e);function p(){return e[93](e[128])}return{c(){t=element("div"),n=element("span"),u&&u.c(),r=space(),d&&d.c(),i=space(),attr(n,"class","multi-item-text svelte-82qwg8"),attr(t,"class","multi-item svelte-82qwg8"),attr(t,"role","none"),toggle_class(t,"active",e[26]===e[128]),toggle_class(t,"disabled",e[11])},m(c,l){insert(c,t,l),append(t,n),u&&u.m(n,null),append(t,r),d&&d.m(t,null),append(t,i),a=!0,o||(s=[listen(t,"click",prevent_default(p)),listen(t,"keydown",stop_propagation(prevent_default(e[84])))],o=!0)},p(n,r){e=n,l?l.p&&(!a||8&r[0]|1048576&r[2])&&update_slot(l,c,e,e[82],r,get_selection_slot_changes,get_selection_slot_context):u&&u.p&&4104&r[0]&&u.p(e,r),e[11]||e[10]||!ClearIcon?d&&(group_outros(),transition_out(d,1,1,(()=>{d=null})),check_outros()):d?(d.p(e,r),3072&r[0]&&transition_in(d,1)):(d=create_if_block_6$2(e),d.c(),transition_in(d,1),d.m(t,i)),67108864&r[0]&&toggle_class(t,"active",e[26]===e[128]),2048&r[0]&&toggle_class(t,"disabled",e[11])},i(e){a||(transition_in(u,e),transition_in(d),a=!0)},o(e){transition_out(u,e),transition_out(d),a=!1},d(e){e&&detach(t),u&&u.d(e),d&&d.d(),o=!1,run_all(s)}}}function create_if_block_3$2(e){let t,n;const r=e[83]["loading-icon"],i=create_slot(r,e,e[82],get_loading_icon_slot_context),a=i||fallback_block_4();return{c(){t=element("div"),a&&a.c(),attr(t,"class","icon loading svelte-82qwg8"),attr(t,"aria-hidden","true")},m(e,r){insert(e,t,r),a&&a.m(t,null),n=!0},p(e,t){i&&i.p&&(!n||1048576&t[2])&&update_slot(i,r,e,e[82],t,get_loading_icon_slot_changes,get_loading_icon_slot_context)},i(e){n||(transition_in(a,e),n=!0)},o(e){transition_out(a,e),n=!1},d(e){e&&detach(t),a&&a.d(e)}}}function fallback_block_4(e){let t,n;return t=new LoadingIcon({}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block_2$2(e){let t,n,r,i;const a=e[83]["clear-icon"],o=create_slot(a,e,e[82],get_clear_icon_slot_context),s=o||fallback_block_3();return{c(){t=element("button"),s&&s.c(),attr(t,"type","button"),attr(t,"class","icon clear-select svelte-82qwg8")},m(a,o){insert(a,t,o),s&&s.m(t,null),n=!0,r||(i=listen(t,"click",e[22]),r=!0)},p(e,t){o&&o.p&&(!n||1048576&t[2])&&update_slot(o,a,e,e[82],t,get_clear_icon_slot_changes,get_clear_icon_slot_context)},i(e){n||(transition_in(s,e),n=!0)},o(e){transition_out(s,e),n=!1},d(e){e&&detach(t),s&&s.d(e),r=!1,i()}}}function fallback_block_3(e){let t,n;return t=new ClearIcon({}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block_1$2(e){let t,n;const r=e[83]["chevron-icon"],i=create_slot(r,e,e[82],get_chevron_icon_slot_context),a=i||fallback_block_2();return{c(){t=element("div"),a&&a.c(),attr(t,"class","icon chevron svelte-82qwg8"),attr(t,"aria-hidden","true")},m(e,r){insert(e,t,r),a&&a.m(t,null),n=!0},p(e,t){i&&i.p&&(!n||64&t[0]|1048576&t[2])&&update_slot(i,r,e,e[82],t,get_chevron_icon_slot_changes,get_chevron_icon_slot_context)},i(e){n||(transition_in(a,e),n=!0)},o(e){transition_out(a,e),n=!1},d(e){e&&detach(t),a&&a.d(e)}}}function fallback_block_2(e){let t,n;return t=new ChevronIcon({}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function fallback_block_1(e){let t,n;return{c(){t=element("input"),attr(t,"name",e[8]),attr(t,"type","hidden"),t.value=n=e[3]?JSON.stringify(e[3]):null,attr(t,"class","svelte-82qwg8")},m(e,n){insert(e,t,n)},p(e,r){256&r[0]&&attr(t,"name",e[8]),8&r[0]&&n!==(n=e[3]?JSON.stringify(e[3]):null)&&(t.value=n)},d(e){e&&detach(t)}}}function create_if_block$2(e){let t;const n=e[83].required,r=create_slot(n,e,e[82],get_required_slot_context),i=r||fallback_block();return{c(){i&&i.c()},m(e,n){i&&i.m(e,n),t=!0},p(e,i){r&&r.p&&(!t||8&i[0]|1048576&i[2])&&update_slot(r,n,e,e[82],i,get_required_slot_changes,get_required_slot_context)},i(e){t||(transition_in(i,e),t=!0)},o(e){transition_out(i,e),t=!1},d(e){i&&i.d(e)}}}function fallback_block(e){let t;return{c(){t=element("select"),attr(t,"class","required svelte-82qwg8"),t.required=!0,attr(t,"tabindex","-1"),attr(t,"aria-hidden","true")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_fragment$2(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_=e[6]&&create_if_block_8$2(e),x=e[2]&&create_if_block_7$2(e);const k=e[83].prepend,w=create_slot(k,e,e[82],get_prepend_slot_context);let T=e[25]&&create_if_block_4$2(e),S=[{readOnly:u=!e[17]},e[27],{placeholder:e[31]},{style:e[18]},{disabled:e[11]}],C={};for(let e=0;e<S.length;e+=1)C=assign(C,S[e]);let I=e[5]&&create_if_block_3$2(e),N=e[30]&&create_if_block_2$2(e),E=e[20]&&create_if_block_1$2(e);const P=e[83]["input-hidden"],$=create_slot(P,e,e[82],get_input_hidden_slot_context),R=$||fallback_block_1(e);let O=e[16]&&(!e[3]||0===e[3].length)&&create_if_block$2(e);return{c(){t=element("div"),_&&_.c(),n=space(),r=element("span"),x&&x.c(),i=space(),a=element("div"),w&&w.c(),o=space(),s=element("div"),T&&T.c(),c=space(),l=element("input"),d=space(),p=element("div"),I&&I.c(),h=space(),N&&N.c(),f=space(),E&&E.c(),m=space(),R&&R.c(),g=space(),O&&O.c(),attr(r,"aria-live","polite"),attr(r,"aria-atomic","fal
319se"),attr(r,"aria-relevant","additions text"),attr(r,"class","a11y-text svelte-82qwg8"),attr(a,"class","prepend svelte-82qwg8"),set_attributes(l,C),toggle_class(l,"svelte-82qwg8",!0),attr(s,"class","value-container svelte-82qwg8"),attr(p,"class","indicators svelte-82qwg8"),attr(t,"class",y="svelte-select "+e[21]+" svelte-82qwg8"),attr(t,"style",e[14]),attr(t,"role","none"),toggle_class(t,"multi",e[9]),toggle_class(t,"disabled",e[11]),toggle_class(t,"focused",e[2]),toggle_class(t,"list-open",e[6]),toggle_class(t,"show-chevron",e[20]),toggle_class(t,"error",e[15])},m(u,y){insert(u,t,y),_&&_.m(t,null),append(t,n),append(t,r),x&&x.m(r,null),append(t,i),append(t,a),w&&w.m(a,null),append(t,o),append(t,s),T&&T.m(s,null),append(s,c),append(s,l),e[94](l),set_input_value(l,e[4]),append(t,d),append(t,p),I&&I.m(p,null),append(p,h),N&&N.m(p,null),append(p,f),E&&E.m(p,null),append(t,m),R&&R.m(t,null),append(t,g),O&&O.m(t,null),e[96](t),b=!0,v||(A=[listen(window,"click",e[42]),listen(window,"keydown",e[37]),listen(l,"keydown",e[37]),listen(l,"blur",e[39]),listen(l,"focus",e[38]),listen(l,"input",e[95]),listen(t,"pointerup",prevent_default(e[40])),action_destroyer(e[48].call(null,t))],v=!0)},p(e,i){e[6]?_?(_.p(e,i),64&i[0]&&transition_in(_,1)):(_=create_if_block_8$2(e),_.c(),transition_in(_,1),_.m(t,n)):_&&(group_outros(),transition_out(_,1,1,(()=>{_=null})),check_outros()),e[2]?x?x.p(e,i):(x=create_if_block_7$2(e),x.c(),x.m(r,null)):x&&(x.d(1),x=null),w&&w.p&&(!b||1048576&i[2])&&update_slot(w,k,e,e[82],i,get_prepend_slot_changes,get_prepend_slot_context),e[25]?T?(T.p(e,i),33554432&i[0]&&transition_in(T,1)):(T=create_if_block_4$2(e),T.c(),transition_in(T,1),T.m(s,c)):T&&(group_outros(),transition_out(T,1,1,(()=>{T=null})),check_outros()),set_attributes(l,C=get_spread_update(S,[(!b||131072&i[0]&&u!==(u=!e[17]))&&{readOnly:u},134217728&i[0]&&e[27],(!b||1&i[1])&&{placeholder:e[31]},(!b||262144&i[0])&&{style:e[18]},(!b||2048&i[0])&&{disabled:e[11]}])),16&i[0]&&l.value!==e[4]&&set_input_value(l,e[4]),toggle_class(l,"svelte-82qwg8",!0),e[5]?I?(I.p(e,i),32&i[0]&&transition_in(I,1)):(I=create_if_block_3$2(e),I.c(),transition_in(I,1),I.m(p,h)):I&&(group_outros(),transition_out(I,1,1,(()=>{I=null})),check_outros()),e[30]?N?(N.p(e,i),1073741824&i[0]&&transition_in(N,1)):(N=create_if_block_2$2(e),N.c(),transition_in(N,1),N.m(p,f)):N&&(group_outros(),transition_out(N,1,1,(()=>{N=null})),check_outros()),e[20]?E?(E.p(e,i),1048576&i[0]&&transition_in(E,1)):(E=create_if_block_1$2(e),E.c(),transition_in(E,1),E.m(p,null)):E&&(group_outros(),transition_out(E,1,1,(()=>{E=null})),check_outros()),$?$.p&&(!b||8&i[0]|1048576&i[2])&&update_slot($,P,e,e[82],i,get_input_hidden_slot_changes,get_input_hidden_slot_context):R&&R.p&&264&i[0]&&R.p(e,i),!e[16]||e[3]&&0!==e[3].length?O&&(group_outros(),transition_out(O,1,1,(()=>{O=null})),check_outros()):O?(O.p(e,i),65544&i[0]&&transition_in(O,1)):(O=create_if_block$2(e),O.c(),transition_in(O,1),O.m(t,null)),(!b||2097152&i[0]&&y!==(y="svelte-select "+e[21]+" svelte-82qwg8"))&&attr(t,"class",y),(!b||16384&i[0])&&attr(t,"style",e[14]),2097664&i[0]&&toggle_class(t,"multi",e[9]),2099200&i[0]&&toggle_class(t,"disabled",e[11]),2097156&i[0]&&toggle_class(t,"focused",e[2]),2097216&i[0]&&toggle_class(t,"list-open",e[6]),3145728&i[0]&&toggle_class(t,"show-chevron",e[20]),2129920&i[0]&&toggle_class(t,"error",e[15])},i(e){b||(transition_in(_),transition_in(w,e),transition_in(T),transition_in(I),transition_in(N),transition_in(E),transition_in(R,e),transition_in(O),b=!0)},o(e){transition_out(_),transition_out(w,e),transition_out(T),transition_out(I),transition_out(N),transition_out(E),transition_out(R,e),transition_out(O),b=!1},d(n){n&&detach(t),_&&_.d(),x&&x.d(),w&&w.d(n),T&&T.d(),e[94](null),I&&I.d(),N&&N.d(),E&&E.d(),R&&R.d(n),O&&O.d(),e[96](null),v=!1,run_all(A)}}}function convertStringItemsToObjects(e){return e.map(((e,t)=>({index:t,value:e,label:`${e}`})))}function isItemFirst(e){return 0===e}function isItemSelectable(e){return e.groupHeader&&e.selectable||e.selectable||!e.hasOwnProperty("selectable")}function instance$2(e,t,n){let r,i,a,o,s,c,l,u,d,{$$slots:p={},$$scope:h}=t;const f=compute_slots(p),m=createEventDispatcher();let{justValue:g=null}=t,{filter:y=filter}=t,{getItems:b=getItems}=t,{id:v=null}=t,{name:A=null}=t,{container:_}=t,{input:x}=t,{multiple:k=!1}=t,{multiFullItemClearable:w=!1}=t,{disabled:T=!1}=t,{focused:S=!1}=t,{value:C=null}=t,{filterText:I=""}=t,{placeholder:N="Please select"}=t,{placeholderAlwaysShow:E=!1}=t,{items:P=null}=t,{label:$="label"}=t,{itemFilter:R=((e,t,n)=>`${e}`.toLowerCase().includes(t.toLowerCase()))}=t,{groupBy:O}=t,{groupFilter:M=(e=>e)}=t,{groupHeaderSelectable:D=!1}=t,{itemId:L="value"}=t,{loadOptions:U}=t,{containerStyles:B=""}=t,{hasError:G=!1}=t,{filterSelectedItems:j=!0}=t,{required:V=!1}=t,{closeListOnChange:F=!0}=t,{clearFilterTextOnBlur:z=!0}=t,{createGroupHeaderItem:q=((e,t)=>({value:e,[$]:e}))}=t;let W,H,K,Y,Q,J,{searchable:Z=!0}=t,{inputStyles:X=""}=t,{clearable:ee=!0}=t,{loading:te=!1}=t,{listOpen:ne=!1}=t,{debounce:re=((e,t=1)=>{clearTimeout(W),W=setTimeout(e,t)})}=t,{debounceWait:ie=300}=t,{hideEmptyState:ae=!1}=t,{inputAttributes:oe={}}=t,{listAutoWidth:se=!0}=t,{showChevron:ce=!1}=t,{listOffset:le=5}=t,{hoverItemIndex:ue=0}=t,{floatingConfig:de={}}=t,{class:pe=""}=t;function he(e){const t=[],n={};e.forEach((e=>{const r=O(e);t.includes(r)||(t.push(r),n[r]=[],r&&n[r].push(Object.assign(q(r,e),{id:r,groupHeader:!0,selectable:D}))),n[r].push(Object.assign({groupItem:!!r},e))}));const r=[];return M(t).forEach((e=>{n[e]&&r.push(...n[e])})),r}function fe(e=0,t){n(7,ue=e<0?0:e),!t&&O&&l[ue]&&!l[ue].selectable&&Pe(1)}function me(){let e=!0;if(C){const t=[],r=[];
319C.forEach((n=>{t.includes(n[L])?e=!1:(t.push(n[L]),r.push(n))})),e||n(3,C=r)}return e}function ge(e){let t=e?e[L]:C[L];return P.find((e=>e[L]===t))}async function ye(e){const t=C[e];1===C.length?n(3,C=void 0):n(3,C=C.filter((e=>e!==t))),m("clear",t)}function be(e){S&&x===document?.activeElement||(e&&m("focus",e),x?.focus(),n(2,S=!0))}async function ve(e){Ce||(ne||S)&&(m("blur",e),Ae(),n(2,S=!1),n(26,H=void 0),x?.blur())}function Ae(){z&&n(4,I=""),n(6,ne=!1)}beforeUpdate((async()=>{n(78,K=C),n(79,Y=I),n(80,Q=k)})),onMount((()=>{ne&&n(2,S=!0),S&&x&&x.focus()}));let{ariaValues:_e=(e=>`Option ${e}, selected.`)}=t,{ariaListOpen:xe=((e,t)=>`You are currently focused on option ${e}. There are ${t} results available.`)}=t,{ariaFocused:ke=(()=>"Select is focused, type to refine list, press down to open the menu.")}=t;let we,Te=null;function Se(){clearTimeout(we),we=setTimeout((()=>{Ce=!1}),100)}onDestroy((()=>{Te?.remove()}));let Ce=!1;function Ie(e){e&&!1!==e.selectable&&function(e){if(e){n(4,I="");const t=Object.assign({},e);if(t.groupHeader&&!t.selectable)return;n(3,C=k?C?C.concat([t]):[t]:n(3,C=t)),setTimeout((()=>{F&&Ae(),n(26,H=void 0),m("change",C),m("select",e)}))}}(e)}function Ne(e){Ce||n(7,ue=e)}function Ee(e){const{item:t,i:r}=e;if(!1!==t?.selectable)return C&&!k&&C[L]===t[L]?Ae():void(isItemSelectable(t)&&(n(7,ue=r),Ie(t)))}function Pe(e){if(0===l.filter((e=>!Object.hasOwn(e,"selectable")||!0===e.selectable)).length)return n(7,ue=0);e>0&&ue===l.length-1?n(7,ue=0):n(7,e<0&&0===ue?ue=l.length-1:ue+=e);const t=l[ue];t&&!1===t.selectable&&(1!==e&&-1!==e||Pe(e))}const $e=Oe,Re=Oe;function Oe(e){return{update(t){t.scroll&&(Se(),e.scrollIntoView({behavior:"auto",block:"nearest"}))}}}let Me={strategy:"absolute",placement:"bottom-start",middleware:[offset(le),flip(),shift()],autoUpdate:!1};const[De,Le,Ue]=createFloatingActions(Me);let Be=!0;return e.$$set=e=>{"justValue"in e&&n(52,g=e.justValue),"filter"in e&&n(53,y=e.filter),"getItems"in e&&n(54,b=e.getItems),"id"in e&&n(55,v=e.id),"name"in e&&n(8,A=e.name),"container"in e&&n(0,_=e.container),"input"in e&&n(1,x=e.input),"multiple"in e&&n(9,k=e.multiple),"multiFullItemClearable"in e&&n(10,w=e.multiFullItemClearable),"disabled"in e&&n(11,T=e.disabled),"focused"in e&&n(2,S=e.focused),"value"in e&&n(3,C=e.value),"filterText"in e&&n(4,I=e.filterText),"placeholder"in e&&n(56,N=e.placeholder),"placeholderAlwaysShow"in e&&n(57,E=e.placeholderAlwaysShow),"items"in e&&n(51,P=e.items),"label"in e&&n(12,$=e.label),"itemFilter"in e&&n(58,R=e.itemFilter),"groupBy"in e&&n(59,O=e.groupBy),"groupFilter"in e&&n(60,M=e.groupFilter),"groupHeaderSelectable"in e&&n(61,D=e.groupHeaderSelectable),"itemId"in e&&n(13,L=e.itemId),"loadOptions"in e&&n(62,U=e.loadOptions),"containerStyles"in e&&n(14,B=e.containerStyles),"hasError"in e&&n(15,G=e.hasError),"filterSelectedItems"in e&&n(63,j=e.filterSelectedItems),"required"in e&&n(16,V=e.required),"closeListOnChange"in e&&n(64,F=e.closeListOnChange),"clearFilterTextOnBlur"in e&&n(65,z=e.clearFilterTextOnBlur),"createGroupHeaderItem"in e&&n(66,q=e.createGroupHeaderItem),"searchable"in e&&n(17,Z=e.searchable),"inputStyles"in e&&n(18,X=e.inputStyles),"clearable"in e&&n(68,ee=e.clearable),"loading"in e&&n(5,te=e.loading),"listOpen"in e&&n(6,ne=e.listOpen),"debounce"in e&&n(69,re=e.debounce),"debounceWait"in e&&n(70,ie=e.debounceWait),"hideEmptyState"in e&&n(19,ae=e.hideEmptyState),"inputAttributes"in e&&n(71,oe=e.inputAttributes),"listAutoWidth"in e&&n(72,se=e.listAutoWidth),"showChevron"in e&&n(20,ce=e.showChevron),"listOffset"in e&&n(73,le=e.listOffset),"hoverItemIndex"in e&&n(7,ue=e.hoverItemIndex),"floatingConfig"in e&&n(74,de=e.floatingConfig),"class"in e&&n(21,pe=e.class),"ariaValues"in e&&n(75,_e=e.ariaValues),"ariaListOpen"in e&&n(76,xe=e.ariaListOpen),"ariaFocused"in e&&n(77,ke=e.ariaFocused),"$$scope"in e&&n(82,h=e.$$scope)},e.$$.update=()=>{8&e.$$.dirty[0]|1048576&e.$$.dirty[1]&&C&&function(){if("string"==typeof C){let e=(P||[]).find((e=>e[L]===C));n(3,C=e||{[L]:C,label:C})}else k&&Array.isArray(C)&&C.length>0&&n(3,C=C.map((e=>"string"==typeof e?{value:e,label:e}:e)))}(),131072&e.$$.dirty[0]|512&e.$$.dirty[2]&&(!oe&&Z||(n(27,J=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},oe)),v&&n(27,J.id=v,J),Z||n(27,J.readonly=!0,J))),512&e.$$.dirty[0]&&k&&C&&(Array.isArray(C)?n(3,C=[...C]):n(3,C=[C])),512&e.$$.dirty[0]|262144&e.$$.dirty[2]&&Q&&!k&&C&&n(3,C=null),520&e.$$.dirty[0]&&k&&C&&C.length>1&&me(),8&e.$$.dirty[0]&&C&&(k?JSON.stringify(C)!==JSON.stringify(K)&&me()&&m("input",C):K&&JSON.stringify(C[L])===JSON.stringify(K[L])||m("input",C)),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&!C&&k&&K&&m("input",C),6&e.$$.dirty[0]&&!S&&x&&Ae(),16&e.$$.dirty[0]|131072&e.$$.dirty[2]&&I!==Y&&(U||0!==I.length)&&(U?re((async function(){n(5,te=!0);let e=await b({dispatch:m,loadOptions:U,convertStringItemsToObjects:convertStringItemsToObjects,filterText:I});e?(n(5,te=e.loading),n(6,ne=ne?e.listOpen:I.length>
3190),n(2,S=ne&&e.focused),n(51,P=O?he(e.filteredItems):e.filteredItems)):(n(5,te=!1),n(2,S=!0),n(6,ne=!0))}),ie):(n(6,ne=!0),k&&n(26,H=void 0))),12824&e.$$.dirty[0]|407896064&e.$$.dirty[1]|3&e.$$.dirty[2]&&n(24,l=y({loadOptions:U,filterText:I,items:P,multiple:k,value:C,itemId:L,groupBy:O,label:$,filterSelectedItems:j,itemFilter:R,convertStringItemsToObjects:convertStringItemsToObjects,filterGroupedItems:he})),16777800&e.$$.dirty[0]&&!k&&ne&&C&&l&&fe(l.findIndex((e=>e[L]===C[L])),!0),576&e.$$.dirty[0]&&ne&&k&&n(7,ue=0),16&e.$$.dirty[0]&&I&&n(7,ue=0),128&e.$$.dirty[0]&&m("hoverItem",ue),520&e.$$.dirty[0]&&n(25,r=k?C&&C.length>0:C),33554448&e.$$.dirty[0]&&n(29,i=r&&I.length>0),33556512&e.$$.dirty[0]|64&e.$$.dirty[2]&&n(30,a=r&&ee&&!T&&!te),520&e.$$.dirty[0]|100663296&e.$$.dirty[1]&&n(31,o=E&&k||k&&0===C?.length?N:C?"":N),520&e.$$.dirty[0]&&n(32,s=C?function(e){let t;return t=e&&C.length>0?C.map((e=>e[$])).join(", "):C[$],_e(t)}(k):""),16777412&e.$$.dirty[0]&&n(33,c=function(){if(!l||0===l.length)return"";let e=l[ue];if(ne&&e){let t=l?l.length:0;return xe(e[$],t)}return ke()}()),1048576&e.$$.dirty[1]&&function(e){e&&0!==e.length&&!e.some((e=>"object"!=typeof e))&&C&&(k?!C.some((e=>!e||!e[L])):C[L])&&(Array.isArray(C)?n(3,C=C.map((e=>ge(e)||e))):n(3,C=ge()||C))}(P),8712&e.$$.dirty[0]&&n(52,g=k?C?C.map((e=>e[L])):null:C?C[L]:C),520&e.$$.dirty[0]|65536&e.$$.dirty[2]&&(k||!K||C||m("input",C)),16777800&e.$$.dirty[0]&&ne&&l&&!k&&!C&&fe(),16777216&e.$$.dirty[0]&&function(e){ne&&m("filter",e)}(l),1&e.$$.dirty[0]|4096&e.$$.dirty[2]&&_&&void 0===de?.autoUpdate&&n(81,Me.autoUpdate=!0,Me),1&e.$$.dirty[0]|528384&e.$$.dirty[2]&&_&&de&&Ue(Object.assign(Me,de)),8388608&e.$$.dirty[0]&&n(34,u=!!Te),8388672&e.$$.dirty[0]&&function(e,t){if(!e||!t)return n(28,Be=!0);setTimeout((()=>{n(28,Be=!1)}),0)}(Te,ne),8388673&e.$$.dirty[0]&&ne&&_&&Te&&function(){const{width:e}=_.getBoundingClientRect();n(23,Te.style.width=se?e+"px":"auto",Te)}(),128&e.$$.dirty[0]&&n(35,d=ue),70&e.$$.dirty[0]&&x&&ne&&!S&&be()},[_,x,S,C,I,te,ne,ue,A,k,w,T,$,L,B,G,V,Z,X,ae,ce,pe,function(){m("clear",C),n(3,C=void 0),Ae(),be()},Te,l,r,H,J,Be,i,a,o,s,c,u,d,ye,function(e){if(S)switch(e.stopPropagation(),e.key){case"Escape":e.preventDefault(),Ae();break;case"Enter":if(e.preventDefault(),ne){if(0===l.length)break;const e=l[ue];if(C&&!k&&C[L]===e[L]){Ae();break}Ie(l[ue])}break;case"ArrowDown":e.preventDefault(),ne?Pe(1):(n(6,ne=!0),n(26,H=void 0));break;case"ArrowUp":e.preventDefault(),ne?Pe(-1):(n(6,ne=!0),n(26,H=void 0));break;case"Tab":if(ne&&S){if(0===l.length||C&&C[L]===l[ue][L])return Ae();e.preventDefault(),Ie(l[ue]),Ae()}break;case"Backspace":if(!k||I.length>0)return;if(k&&C&&C.length>0){if(ye(void 0!==H?H:C.length-1),0===H||void 0===H)break;n(26,H=C.length>H?H-1:void 0)}break;case"ArrowLeft":if(!C||!k||I.length>0)return;void 0===H?n(26,H=C.length-1):C.length>H&&0!==H&&n(26,H-=1);break;case"ArrowRight":if(!C||!k||I.length>0||void 0===H)return;H===C.length-1?n(26,H=void 0):H<C.length-1&&n(26,H+=1)}},be,ve,function(){if(!T)return I.length>0?n(6,ne=!0):void n(6,ne=!ne)},Se,function(e){ne||S||!_||_.contains(e.target)||Te?.contains(e.target)||ve()},Ne,Ee,function(e,t,n){if(!k)return t&&t[n]===e[n]},$e,Re,De,Le,f,P,g,y,b,v,N,E,R,O,M,D,U,j,F,z,q,()=>l,ee,re,ie,oe,se,le,de,_e,xe,ke,K,Y,Q,Me,h,p,function(t){bubble(e,t)},function(t){bubble(e,t)},function(t){bubble(e,t)},function(t){bubble(e,t)},e=>Ne(e),e=>Ne(e),(e,t)=>Ee({item:e,i:t}),function(e){binding_callbacks[e?"unshift":"push"]((()=>{Te=e,n(23,Te)}))},e=>ye(e),e=>w?ye(e):{},function(e){binding_callbacks[e?"unshift":"push"]((()=>{x=e,n(1,x)}))},function(){I=this.value,n(4,I)},function(e){binding_callbacks[e?"unshift":"push"]((()=>{_=e,n(0,_)}))}]}class Select extends SvelteComponent{constructor(e){super(),init(this,e,instance$2,create_fragment$2,safe_not_equal,{justValue:52,filter:53,getItems:54,id:55,name:8,container:0,input:1,multiple:9,multiFullItemClearable:10,disabled:11,focused:2,value:3,filterText:4,placeholder:56,placeholderAlwaysShow:57,items:51,label:12,itemFilter:58,groupBy:59,groupFilter:60,groupHeaderSelectable:61,itemId:13,loadOptions:62,containerStyles:14,hasError:15,filterSelectedItems:63,required:16,closeListOnChange:64,clearFilterTextOnBlur:65,createGroupHeaderItem:66,getFilteredItems:67,searchable:17,inputStyles:18,clearable:68,loading:5,listOpen:6,debounce:69,debounceWait:70,hideEmptyState:19,inputAttributes:71,listAutoWidth:72,showChevron:20,listOffset:73,hoverItemIndex:7,floatingConfig:74,class:21,handleClear:22,ariaValues:75,ariaListOpen:76,ariaFocused:77},[-1,-1,-1,-1,-1])}get getFilteredItems(){return this.$$.ctx[67]}get handleClear(){return this.$$.ctx[22]}}
319function get_each_context$1(e,t,n){const r=e.slice();return r[31]=t[n],r}function get_each_context_1$1(e,t,n){const r=e.slice();return r[31]=t[n],r}function get_each_context_2$1(e,t,n){const r=e.slice();return r[36]=t[n],r}function get_each_context_3$1(e,t,n){const r=e.slice();return r[36]=t[n],r}function create_if_block_21$1(e){let t,n;function r(e,n){return(null==t||36&n[0])&&(t=!("merchants"!=e[5].find(e[20]).civ.box)),t?create_if_block_22$1:create_else_block$1}let i=r(e,[-1]),a=i(e);return{c(){a.c(),n=empty()},m(e,t){a.m(e,t),insert(e,n,t)},p(e,t){i===(i=r(e,t))&&a?a.p(e,t):(a.d(1),a=i(e),a&&(a.c(),a.m(n.parentNode,n)))},d(e){a.d(e),e&&detach(n)}}}function create_else_block$1(e){let t,n,r;return{c(){t=element("div"),n=element("div"),attr(n,"class","triangle_small svelte-e6yb3z"),attr(n,"style",r="border-color: transparent transparent transparent "+e[5].find(e[21]).civ.justColor+";"),set_style(t,"width","3vmin"),attr(t,"class","svelte-e6yb3z")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){36&t[0]&&r!==(r="border-color: transparent transparent transparent "+e[5].find(e[21]).civ.justColor+";")&&attr(n,"style",r)},d(e){e&&detach(t)}}}function create_if_block_22$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-e6yb3z"),t.src!==(n=e[2].deck.toLowerCase()+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&t.src!==(n=e[2].deck.toLowerCase()+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_each_block_3$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-e6yb3z"),t.src!==(n=e[36]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&t.src!==(n=e[36]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_20$1(e){let t,n,r,i=e[2].area.slice(e[2].area.length-1)+"";return{c(){t=text("("),n=text(i),r=text(")")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p(e,t){4&t[0]&&i!==(i=e[2].area.slice(e[2].area.length-1)+"")&&set_data(n,i)},d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_if_block_19$1(e){let t;return{c(){t=text(e[6])},m(e,n){insert(e,t,n)},p(e,n){64&n[0]&&set_data(t,e[6])},d(e){e&&detach(t)}}}function create_if_block_18$1(e){let t,n,r;return{c(){t=element("div"),n=element("div"),r=text(e[9]),attr(n,"class","svelte-e6yb3z"),attr(t,"class","cardscore svelte-e6yb3z")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){512&t[0]&&set_data(r,e[9])},d(e){e&&detach(t)}}}function create_if_block_12$1(e){let t;function n(e,t){return e[3]?create_if_block_13$1:e[4]?create_if_block_14$1:void 0}let r=n(e),i=r&&r(e);return{c(){i&&i.c(),t=empty()},m(e,n){i&&i.m(e,n),insert(e,t,n)},p(e,a){r===(r=n(e))&&i?i.p(e,a):(i&&i.d(1),i=r&&r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i&&i.d(e),e&&detach(t)}}}function create_if_block_14$1(e){let t;function n(e,t){return"Number"==e[2].scoretype?create_if_block_15$1:"Conditional"==e[2].scoretype?create_if_block_16$1:"Multiplier"==e[2].scoretype?create_if_block_17$1:void 0}let r=n(e),i=r&&r(e);return{c(){i&&i.c(),t=empty()},m(e,n){i&&i.m(e,n),insert(e,t,n)},p(e,a){r===(r=n(e))&&i?i.p(e,a):(i&&i.d(1),i=r&&r(e),i&&(i.c(),i.m(t.parentNode,t)))},d(e){i&&i.d(e),e&&detach(t)}}}function create_if_block_13$1(e){let t,n,r,i=(e[5].length>0&&"number"!=typeof e[2].score?scoreCard(e[2],e[5]):e[2].score)+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-e6yb3z"),attr(t,"class","cardscore svelte-e6yb3z")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){36&t[0]&&i!==(i=(e[5].length>0&&"number"!=typeof e[2].score?scoreCard(e[2],e[5]):e[2].score)+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_if_block_17$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-e6yb3z"),t.src!==(n="star.png")&&attr(t,"src","star.png")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_16$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-e6yb3z"),t.src!==(n="question.png")&&attr(t,"src","question.png")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_15$1(e){let t,n,r,i=e[2].value+"";return{c(){t=element("div"),n=element("div"),r=text(i),attr(n,"class","svelte-e6yb3z"),attr(t,"class","cardscore svelte-e6yb3z")},m(e,i){insert(e,t,i),append(t,n),append(n,r)},p(e,t){4&t[0]&&i!==(i=e[2].value+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_if_block$1(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k=e[2].name+"",w=e[2].box.map(e[23]).join(" & ")+"",T=e[2].deck+"",S="Multiplier"==e[2].scoretype&&e[2].score>0&&e[2].contributingCards&&e[2].contributingCards.length>0&&e[5].length>0&&e[2].contributingCards.some(e[17]),C=e[2].area!=e[2].deck&&create_if_block_11$1(e),I=e[2].suits.length>0&&create_if_block_9$1(e),N=e[2].icons.length>0&&create_if_block_7$1(e),E=e[2].minplayers>2&&create_if_block_6$1(e),P=""!=e[2].scoretype&&create_if_block_5$1(e),$=e[3]&&create_if_block_4$1(e),R=S&&create_if_block_2$1(e),O=e[2].contributedTo&&e[2].contributedTo.length>0&&e[5].length>0&&create_if_block_1$1(e);return{c(){t=element("div"),n=element("div"),r=text(k),i=space(),a=element("div"),o=text(w),s=text(", "),c=text(T),l=text(" deck, "),C&&C.c(),u=space(),I&&I.c(),d=space(),N&&N.c(),p=space(),E&&E.c(),h=space(),P&&P.c(),f=space(),$&&$.c(),m=space(),R&&R.c(),g=space(),O&&O.c(),y=space(),b=element("button"),b.textContent="Close",attr(n,"class","modal_header svelte-e6yb3z"),attr(a,"class","modal_text svelte-e6yb3z"),attr(b,"class","close svelte-e6yb3z"),attr(t,"class",v=null_to_empty("modal "+(e[2].suits.length>0?e[2].suits[0]:"")+(e[12].some(e[27])?" "+e[12].find(e[28]).name+"_hs":""))+" svelte-e6yb3z")},m(v,k){insert(v,t,k),append(t,n),append(n,r),append(t,i),append(t,a),append(a,o),append(a,s),append(a,c),append(a,l),C&&C.m(a,null),append(t,u),I&&I.m(t,null),append(t,d),N&&N.m(t,null),append(t,p),E&&E.m(t,null),append(t,h),P&&P.m(t,null),append(t,f),$&&$.m(t,null),append(t,m),R&&R.m(t,null),append(t,g),O&&O.m(t,null),append(t,y),append(t,b),A=!0,_||(x=listen(b,"click",e[26]),_=!0)},p(e,n){(!A||4&n[0])&&k!==(k=e[2].name+"")&&set_data(r,k),(!A||4&n[0])&&w!==(w=e[2].box.map(e[23]).join(" & ")+"")&&set_data(o,w),(!A||4&n[0])&&T!==(T=e[2].deck+"")&&set_data(c,T),e[2].area!=e[2].deck?C?C.p(e,n):(C=create_if_block_11$1(e),C.c(),C.m(a,null)):C&&(C.d(1),C=null),e[2].suits.length>0?I?I.p(e,n):(I=create_if_block_9$1(e),I.c(),I.m(t,d)):I&&(I.d(1),I=null),e[2].icons.length>0?N?N.p(e,n):(N=create_if_block_7$1(e),N.c(),N.m(t,p)):N&&(N.d(1),N=null),e[2].minplayers>2?E?E.p(e,n):(E=create_if_block_6$1(e),E.c(),E.m(t,h)):E&&(E.d(1),E=null),""!=e[2].scoretype?P?P.p(e,n):(P=create_if_block_5$1(e),P.c(),P.m(t,f)):P&&(P.d(1),P=null),e[3]?$?$.p(e,n):($=create_if_block_4$1(e),$.c(),$.m(t,m)):$&&($.d(1),$=null),36&n[0]&&(S="Multiplier"==e[2].scoretype&&e[2].score>0&&e[2].contributingCards&&e[2].contributingCards.length>0&&e[5].length>0&&e[2].contributingCards.some(e[17])),S?R?(R.p(e,n),36&n[0]&&transition_in(R,1)):(R=create_if_block_2$1(e),R.c(),transition_in(R,1),R.m(t,g)):R&&(group_outros(),transition_out(R,1,1,(()=>{R=null})),check_outros()),e[2].contributedTo&&e[2].contributedTo.length>0&&e[5].length>0?O?(O.p(e,n),36&n[0]&&transition_in(O,1)):(O=create_if_block_1$1(e),O.c(),transition_in(O,1),O.m(t,y)):O&&(group_outros(),transition_out(O,1,1,(()=>{O=null})),check_outros()),(!A||4100&n[0]&&v!==(v=null_to_empty("modal "+(e[2].suits.length>0?e[2].suits[0]:"")+(e[12].some(e[27])?" "+e[12].find(e[28]).name+"_hs":""))+" svelte-e6yb3z"))&&attr(t,"class",v)},i(e){A||(transition_in(R),transition_in(O),A=!0)},o(e){transition_out(R),transition_out(O),A=!1},d(e){e&&detach(t),C&&C.d(),I&&I.d(),N&&N.d(),E&&E.d(),P&&P.d(),$&&$.d(),R&&R.d(),O&&O.d(),_=!1,x()}}}function create_if_block_11$1(e){let t,n,r=e[2].area+"";return{c(){t=text(r),n=text(" area")},m(e,r){insert(e,t,r),insert(e,n,r)},p(e,n){4&n[0]&&r!==(r=e[2].area+"")&&set_data(t,r)},d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_9$1(e){let t,n,r,i=e[2].suits.length>1&&create_if_block_10$1(),a=e[2].suits,o=[];for(let t=0;t<a.length;t+=1)o[t]=create_each_block_2$1(get_each_context_2$1(e,a,t));return{c(){t=element("div"),n=text("Suit"),i&&i.c(),r=text(": ");for(let e=0;e<o.length;e+=1)o[e].c();attr(t,"class","modal_text svelte-e6yb3z")},m(e,a){insert(e,t,a),append(t,n),i&&i.m(t,null),append(t,r);for(let e=0;e<o.length;e+=1)o[e].m(t,null)},p(e,n){if(e[2].suits.length>1?i||(i=create_if_block_10$1(),i.c(),i.m(t,r)):i&&(i.d(1),i=null),4&n[0]){let r;for(a=e[2].suits,r=0;r<a.length;r+=1){const i=get_each_context_2$1(e,a,r);o[r]?o[r].p(i,n):(o[r]=create_each_block_2$1(i),o[r].c(),o[r].m(t,null))}for(;r<o.length;r+=1)o[r].d(1);o.length=a.length}},d(e){e&&detach(t),i&&i.d(),destroy_each(o,e)}}}function create_if_block_10$1(e){let t;return{c(){t=text("s")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_each_block_2$1(e){let t,n;return{c(){t=element("img"),attr(t,"class","card_img svelte-e6yb3z"),t.src!==(n=e[36]+".png")&&attr(t,"src",n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&t.src!==(n=e[36]+".png")&&attr(t,"src",n)},d(e){e&&detach(t)}}}function create_if_block_7$1(e){let t,n,r,i,a=e[2].icons.join(", ")+"",o=e[2].icons.length>1&&create_if_block_8$1();return{c(){t=element("div"),n=text("Icon"),o&&o.c(),r=text(": "),i=text(a),attr(t,"class","modal_text svelte-e6yb3z")},m(e,a){insert(e,t,a),append(t,n),o&&o.m(t,null),append(t,r),append(t,i)},p(e,n){e[2].icons.length>1?o||(o=create_if_block_8$1(),o.c(),o.m(t,r)):o&&(o.d(1),o=null),4&n[0]&&a!==(a=e[2].icons.join(", ")+"")&&set_data(i,a)},d(e){e&&detach(t),o&&o.d()}}}function create_if_block_8$1(e){let t;return{c(){t=text("s")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_if_block_6$1(e){let t,n,r,i=e[2].minplayers+"";return{c(){t=element("div"),n=text("Minimum player count: "),r=text(i),attr(t,"class","modal_text svelte-e6yb3z")},m(e,i){insert(e,t,i),append(t,n),append(t,r)},p(e,t){4&t[0]&&i!==(i=e[2].minplayers+"")&&set_data(r,i)},d(e){e&&detach(t)}}}function create_if_block_5$1(e){let t,n,r,i;return{c(){t=element("div"),n=element("img"),i=text(" card"),attr(n,"class","card_img svelte-e6yb3z"),n.src!==(r=e[13][e[2].scoretype]+".png")&&attr(n,"src",r),attr(t,"class","modal_text svelte-e6yb3z")},m(e,r){insert(e,t,r),append(t,n),append(t,i)},p(e,t){4&t[0]&&n.src!==(r=e[13][e[2].scoretype]+".png")&&attr(n,"src",r)},d(e){e&&detach(t)}}}function create_if_block_4$1(e){let t,n,r,i,a,o=(e[5].length>0&&"number"!=typeof e[2].score?scoreCard(e[2],e[5]):e[2].score)+"";return{c(){t=element("div"),n=text("Score: "),r=element("div"),i=element("div"),a=text(o),attr(i,"class","svelte-e6yb3z"),attr(r,"class","cardscore svelte-e6yb3z"),attr(t,"class","modal_text svelte-e6yb3z")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(r,i),append(i,a)},p(e,t){36&t[0]&&o!==(o=(e[5].length>0&&"number"!=typeof e[2].score?scoreCard(e[2],e[5]):e[2].score)+"")&&set_data(a,o)},d(e){e&&detach(t)}}}function create_if_block_2$1(e){let t,n,r,i,a=e[2].contributingCards,o=[];for(let t=0;t<a.length;t+=1)o[t]=create_each_block_1$1(get_each_context_1$1(e,a,t));const s=e=>transition_out(o[e],1,1,(()=>{o[e]=null}));return{c(){t=element("div"),t.textContent="Points contributed to this card:",n=space(),r=element("div");for(let e=0;e<o.length;e+=1)o[e].c();attr(t,"class","modal_text svelte-e6yb3z"),attr(r,"class","cards_list svelte-e6yb3z")},m(e,a){insert(e,t,a),insert(e,n,a),insert(e,r,a);for(let e=0;e<o.length;e+=1)o[e].m(r,null);i=!0},p(e,t){if(36&t[0]){let n;for(a=e[2].contributingCards,n=0;n<a.length;n+=1){const i=get_each_context_1$1(e,a,n);o[n]?(o[n].p(i,t),transition_in(o[n],1)):(o[n]=create_each_block_1$1(i),o[n].c(),transition_in(o[n],1),o[n].m(r,null))}for(group_outros(),n=a.length;n<o.length;n+=1)s(n);check_outros()}},i(e){if(!i){for(let e=0;e<a.length;e+=1)transition_in(o[e]);i=!0}}
319,o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)transition_out(o[e]);i=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_each(o,e)}}}function create_if_block_3$1(e){let t,n;function r(...t){return e[24](e[31],...t)}return t=new Card({props:{clickable:!0,players:e[5],c:e[5].flatMap(func_7).find(r),fakeScore:Math.round(10*e[31].pts)/10}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(n,i){e=n;const a={};32&i[0]&&(a.players=e[5]),36&i[0]&&(a.c=e[5].flatMap(func_7).find(r)),4&i[0]&&(a.fakeScore=Math.round(10*e[31].pts)/10),t.$set(a)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_each_block_1$1(e){let t,n,r=e[5].flatMap(func_1).find(i)&&e[31].pts>0;function i(...t){return e[18](e[31],...t)}let a=r&&create_if_block_3$1(e);return{c(){a&&a.c(),t=empty()},m(e,r){a&&a.m(e,r),insert(e,t,r),n=!0},p(n,o){e=n,36&o[0]&&(r=e[5].flatMap(func_1).find(i)&&e[31].pts>0),r?a?(a.p(e,o),36&o[0]&&transition_in(a,1)):(a=create_if_block_3$1(e),a.c(),transition_in(a,1),a.m(t.parentNode,t)):a&&(group_outros(),transition_out(a,1,1,(()=>{a=null})),check_outros())},i(e){n||(transition_in(a),n=!0)},o(e){transition_out(a),n=!1},d(e){a&&a.d(e),e&&detach(t)}}}function create_if_block_1$1(e){let t,n,r,i,a=e[2].contributedTo,o=[];for(let t=0;t<a.length;t+=1)o[t]=create_each_block$1(get_each_context$1(e,a,t));const s=e=>transition_out(o[e],1,1,(()=>{o[e]=null}));return{c(){t=element("div"),t.textContent="Points this card contributed to others:",n=space(),r=element("div");for(let e=0;e<o.length;e+=1)o[e].c();attr(t,"class","modal_text svelte-e6yb3z"),attr(r,"class","cards_list svelte-e6yb3z")},m(e,a){insert(e,t,a),insert(e,n,a),insert(e,r,a);for(let e=0;e<o.length;e+=1)o[e].m(r,null);i=!0},p(e,t){if(36&t[0]){let n;for(a=e[2].contributedTo,n=0;n<a.length;n+=1){const i=get_each_context$1(e,a,n);o[n]?(o[n].p(i,t),transition_in(o[n],1)):(o[n]=create_each_block$1(i),o[n].c(),transition_in(o[n],1),o[n].m(r,null))}for(group_outros(),n=a.length;n<o.length;n+=1)s(n);check_outros()}},i(e){if(!i){for(let e=0;e<a.length;e+=1)transition_in(o[e]);i=!0}},o(e){o=o.filter(Boolean);for(let e=0;e<o.length;e+=1)transition_out(o[e]);i=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_each(o,e)}}}function create_each_block$1(e){let t,n;function r(...t){return e[25](e[31],...t)}return t=new Card({props:{clickable:!0,players:e[5],c:e[5].flatMap(func_9).find(r),fakeScore:Math.round(10*e[31].pts)/10}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(n,i){e=n;const a={};32&i[0]&&(a.players=e[5]),36&i[0]&&(a.c=e[5].flatMap(func_9).find(r)),4&i[0]&&(a.fakeScore=Math.round(10*e[31].pts)/10),t.$set(a)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_fragment$1(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y=e[12].some(e[19]),b=e[2].name+"",v=e[2].area.startsWith("Power"),A=y&&create_if_block_21$1(e),_=e[2].suits,x=[];for(let t=0;t<_.length;t+=1)x[t]=create_each_block_3$1(get_each_context_3$1(e,_,t));let k=v&&create_if_block_20$1(e),w=e[6]&&create_if_block_19$1(e),T=e[9]&&create_if_block_18$1(e),S=e[2].scoretype&&create_if_block_12$1(e),C=e[0]&&create_if_block$1(e);return{c(){t=element("button"),A&&A.c(),n=space();for(let e=0;e<x.length;e+=1)x[e].c();r=space(),i=text(b),a=space(),k&&k.c(),o=space(),w&&w.c(),s=space(),T&&T.c(),c=space(),S&&S.c(),p=space(),C&&C.c(),h=empty(),attr(t,"title",l=e[2].scoreWorking?e[2].scoreWorking:""),attr(t,"class",u=null_to_empty("card "+e[2].suits[0]+(e[10]?" selected":"")+(e[11]?" fade":""))+" svelte-e6yb3z"),attr(t,"style",d="--text-size: "+e[7]+"vmin;")},m(l,u){insert(l,t,u),A&&A.m(t,null),append(t,n);for(let e=0;e<x.length;e+=1)x[e].m(t,null);append(t,r),append(t,i),append(t,a),k&&k.m(t,null),append(t,o),w&&w.m(t,null),append(t,s),T&&T.m(t,null),append(t,c),S&&S.m(t,null),insert(l,p,u),C&&C.m(l,u),insert(l,h,u),f=!0,m||(g=listen(t,"click",e[22]),m=!0)},p(e,a){if(4100&a[0]&&(y=e[12].some(e[19])),y?A?A.p(e,a):(A=create_if_block_21$1(e),A.c(),A.m(t,n)):A&&(A.d(1),A=null),4&a[0]){let n;for(_=e[2].suits,n=0;n<_.length;n+=1){const i=get_each_context_3$1(e,_,n);x[n]?x[n].p(i,a):(x[n]=create_each_block_3$1(i),x[n].c(),x[n].m(t,r))}for(;n<x.length;n+=1)x[n].d(1);x.length=_.length}(!f||4&a[0])&&b!==(b=e[2].name+"")&&set_data(i,b),4&a[0]&&(v=e[2].area.startsWith("Power")),v?k?k.p(e,a):(k=create_if_block_20$1(e),k.c(),k.m(t,o)):k&&(k.d(1),k=null),e[6]?w?w.p(e,a):(w=create_if_block_19$1(e),w.c(),w.m(t,s)):w&&(w.d(1),w=null),e[9]?T?T.p(e,a):(T=create_if_block_18$1(e),T.c(),T.m(t,c)):T&&(T.d(1),T=null),e[2].scoretype?S?S.p(e,a):(S=create_if_block_12$1(e),S.c(),S.m(t,null)):S&&(S.d(1),S=null),(!f||4&a[0]&&l!==(l=e[2].scoreWorking?e[2].scoreWorking:""))&&attr(t,"title",l),(!f||3076&a[0]&&u!==(u=null_to_empty("card "+e[2].suits[0]+(e[10]?" selected":"")+(e[11]?" fade":""))+" svelte-e6yb3z"))&&attr(t,"class",u),(!f||128&a[0]&&d!==(d="--text-size: "+e[7]+"vmin;"))&&attr(t,"style",d),e[0]?C?(C.p(e,a),1&a[0]&&transition_in(C,1)):(C=create_if_block$1(e),C.c(),transition_in(C,1),C.m(h.parentNode,h)):C&&(group_outros(),transition_out(C,1,1,(()=>{C=null})),check_outros())},i(e){f||(transition_in(C),f=!0)},o(e){transition_out(C),f=!1},d(e){e&&detach(t),A&&A.d(),destroy_each(x,e),k&&k.d(),w&&w.d(),T&&T.d(),S&&S.d(),e&&detach(p),C&&C.d(e),e&&detach(h),m=!1,g()}}}function pickTextColorBasedOnBgColorAdvanced$1(e,t,n){var r="#"===e.charAt(0)?e.substring(1,7):e,i=[parseInt(r.substring(0,2),16)/255,parseInt(r.substring(2,4),16)/255,parseInt(r.substring(4,6),16)/255].map((e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*i[0]+.7152*i[1]+.0722*i[2]>.179?n:t}function initialCap(e){return e[0].toUpperCase()+e.slice(1)}const func_1=e=>e.cards,func_7=e=>e.cards,func_9=e=>e.cards;
319function instance$1(e,t,n){let{c:r={id:-1,box:[],name:"No card",deck:"",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0}}=t,{showScore:i=!1}=t,{blankScore:a=!1}=t,{selectionDefault:o=!1}=t,{players:s=[]}=t,{message:c=null}=t,{textSize:l=3}=t,{clickable:u=!1}=t,{details:d=!1}=t,{fakeScore:p=!1}=t,{selected:h=!1}=t,{selectable:f=!1}=t,{fade:m=!1}=t,{civs:g=[{name:"Arthurians",style:"color: rgb(135, 196, 66);"},{name:"Atlanteans",style:"color: rgb(76, 200, 242);"},{name:"Carthaginians",style:"color: rgb(23, 103, 170);"},{name:"Celts",style:"color: rgb(10, 107, 63);"},{name:"Cultists",style:""},{name:"Egyptians",style:"color: rgb(244, 237, 55);"},{name:"Greeks",style:"color: rgb(255, 255, 255);"},{name:"Macedonians",style:"color: rgb(84, 51, 141);"},{name:"Martians",style:""},{name:"Mauryans",style:"color: rgb(151, 98, 52);"},{name:"Minoans",style:"color: rgb(0, 0, 0); text-shadow: 0 0 3px white, 0 0 3px white, 0 0 3px white, 0 0 3px white;",hsStyle:"background-color: rgb(0,0,0)"},{name:"Olmecs",style:"color: rgb(130, 134, 134);"},{name:"Persians",style:"color: rgb(157, 90, 159);"},{name:"Qin",style:"color: rgb(243, 131, 171);"},{name:"Romans",style:"color: rgb(236, 31, 38);"},{name:"Scythians",style:"color: rgb(172, 181, 110);"},{name:"Vikings",style:"color: rgb(248, 159, 35);"},{name:"Utopians",style:"color: rgb(15, 184, 174);"}]}=t;function y(){console.log(r),n(0,d=!0)}function b(e){console.log("card",e),n(1,f=o&&f==e?o:e)}!function(){for(let e of g){let t=document.createElement("div");t.style="background-"+e.style;let n=`#${t.style.backgroundColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/).slice(1).map((e=>parseInt(e,10).toString(16).padStart(2,"0"))).join("")}`;e.contrastText=pickTextColorBasedOnBgColorAdvanced$1(n,"#FFFFFF","#000000"),e.justColor=n}}();return e.$$set=e=>{"c"in e&&n(2,r=e.c),"showScore"in e&&n(3,i=e.showScore),"blankScore"in e&&n(4,a=e.blankScore),"selectionDefault"in e&&n(16,o=e.selectionDefault),"players"in e&&n(5,s=e.players),"message"in e&&n(6,c=e.message),"textSize"in e&&n(7,l=e.textSize),"clickable"in e&&n(8,u=e.clickable),"details"in e&&n(0,d=e.details),"fakeScore"in e&&n(9,p=e.fakeScore),"selected"in e&&n(10,h=e.selected),"selectable"in e&&n(1,f=e.selectable),"fade"in e&&n(11,m=e.fade),"civs"in e&&n(12,g=e.civs)},[d,f,r,i,a,s,c,l,u,p,h,m,g,{Multiplier:"star",Conditional:"question",Number:"number"},y,b,o,e=>s.flatMap((e=>e.cards)).find((t=>t.id==e.cardID)),(e,t)=>t.id==e.cardID,e=>e.name==r.deck,e=>e.civ.name==r.deck,e=>e.civ.name==r.deck,e=>{u&&y(),f&&b(r)},e=>initialCap(e),(e,t)=>t.id==e.cardID,(e,t)=>t.id==e.cardID,e=>{n(0,d=!1)},e=>e.name==r.deck,e=>e.name==r.deck]}class Card extends SvelteComponent{constructor(e){super(),init(this,e,instance$1,create_fragment$1,safe_not_equal,{c:2,showScore:3,blankScore:4,selectionDefault:16,players:5,message:6,textSize:7,clickable:8,details:0,fakeScore:9,selected:10,selectable:1,fade:11,civs:12},[-1,-1])}}let promos=[{id:"9FAM1",box:["classics","legends","merchants"],deck:"Fame",area:"Fame",suits:["fame","reg"],icons:["pinned","sack","grain","water","hunt"],name:"Bountiful",promo:!0,text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4},{id:"9UNC1",box:["classics","legends","merchants"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Heir Presumptive",text:"",promo:!0,count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1},{id:"9ABU1",box:["classics","legends","merchants"],deck:"Starter",area:"Starter",suits:[],icons:[],name:"Abundance",text:"",promo:!0,count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:""}],origCards=!1;function updatePromos(e,t,n){if(!origCards){origCards=[];for(let t of e)origCards.push(t)}if(e=e.filter((e=>!e.promo)),t)for(let t of promos)if("Abundance"==t.name)for(let r of n){if(e.filter((e=>e.deck==r.name)).some((e=>"Prosperity"==e.name))){let n=Object.assign({},t);n.deck=r.name,e=[...e,n]}}else e=[...e,t];return e}let cards=[{id:0,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:1,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:2,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:3,box:["classics"],deck:"Persians",area:"PowerA",suits:[],icons:[],name:"Persians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1/3})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1/3})}},{id:4,box:["classics"],deck:"Persians",area:"PowerB",suits:[],icons:[],name:"Persians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:5,box:["classics"],deck:"Persians",area:"Accession",suits:[],icons:["pinned","city"],name:"City of Persepolis",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:6,box:["classics"],deck:"Persians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Bactria",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:7,box:["classics"],deck:"Persians",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Zagros",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:8,box:["classics"],deck:"Persians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:9,box:["classics"],deck:"Persians",area:"Starter",suits:["trib"],icons:["barbarian"],name:"Lydians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:10,box:["classics"],deck:"Persians",area:"Nation",suits:["trib"],icons:["barbarian"],name:"Median Empire",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:11,box:["classics"],deck:"Persians",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Arachosia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:12,box:["classics"],deck:"Persians",area:"Nation",suits:["reg"],icons:["pinned","grain","grain"],name:"Nisaean Plain",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:13,box:["classics"],deck:"Persians",area:"Development",suits:["trib"],icons:["empire"],name:"Babylonians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:14,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","pinned"],name:"Windmills",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:15,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Satrap",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:16,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Development",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:17,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","attack"],name:"Persian Gold",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:18,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire","attack"],name:"Battering Ram",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:19,box:["classics"],deck:"Persians",area:"Development",suits:[],icons:["empire"],name:"Darius I",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:20,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Shaduf",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+2*t.icons.filter((e=>"water"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=2*t.icons.filter((e=>"water"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:21,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Boats",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+t.icons.filter((e=>"water"==e||"grain"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.icons.filter((e=>"grain"==e||"water"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:22,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Diplomacy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:23,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Gambling",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:24,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian"],name:"Oracle",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>e.suits.includes("fame"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("fame")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:25,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned","city"],name:"City",text:"",count:3,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:26,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:[],name:"Leadership",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:27,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian","pinned"],name:"Town",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?2:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:28,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Mysticism",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:29,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","barbarian"],name:"Shrine",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:30,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["mask"],name:"Jade Mask",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?1:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:31,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Port",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:32,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Agriculture",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+2*t.icons.filter((e=>"grain"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=2*t.icons.filter((e=>"grain"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:33,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:[],name:"Elders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:34,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["scroll"],name:"Lost Scroll",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?1:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:35,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Ambassador",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:36,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["barbarian"],name:"Rituals & Ceremonies",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:37,box:["classics"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Standing Army",text:"",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:38,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Triumphant",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:11,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),11)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:39,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:["pinned"],name:"Awe-inspiring",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),7)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:40,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Great",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?6:2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:41,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:["attack"],name:"Notorious",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!0,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;let n=e.filter((e=>e!=t));if(t.bot)return 5;let r=Math.floor(n.reduce(((e,t)=>e+t.cards.filter((e=>e.suits.includes("unrest"))).length),0));return r>10&&(r=10),r},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;let n=e.filter((e=>e!=t));if(!n.cards)return;if(t.bot)return;let r=n.cards.reduce(((e,t)=>("Unrest"==t.name&&e.push({card:t,pts:1}),e)),[]);this.contributingCards=r.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of r)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:42,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Glorious",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:6,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),6)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:43,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Praiseworthy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?7:3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:44,box:["classics"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Marvellous",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:9,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),9)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:45,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Steppe",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:46,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","barbarian"],name:"Sacred Pass",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:47,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Hills",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:48,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","water"],name:"Oasis",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:49,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Forest",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:50,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Woodland",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:51,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned"],name:"Mountain",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:52,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","water"],name:"River",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:53,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Cape",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:54,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Floodplain",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:55,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Coast",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:56,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned"],name:"Jungle",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:57,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned"],name:"Wilderness",text:"",count:1,minplayers:3,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:58,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Moneylenders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/10);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:59,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Urban Development",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+2*t.icons.filter((e=>"city"==e||"metropolis"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=2*t.icons.filter((e=>"city"==e||"metropolis"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:60,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Education",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:61,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Corruption",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:62,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Pharmacy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:63,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Cataphract",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:64,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Exports",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length/10);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:65,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire"],name:"Mercenaries",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/4);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:66,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Coinage",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:67,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Onager",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:68,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Temple",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(proAll(t)/5);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:69,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned","metropolis"],name:"Metropolis",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:1},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:70,box:["classics"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Wonder",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:71,box:["classics","legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","attack"],name:"Drama & Poetry",text:"",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:72,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Egyptians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:73,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Hittites",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:74,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Assyrians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:75,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Armenians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:76,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Qin",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.icons.includes("pinned")&&"play"==e.location&&!e.suits.includes("reg"))).length/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.icons.includes("pinned")&&"play"==e.location&&!e.suits.includes("reg")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1/3})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1/3})}},{id:77,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Sumerians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:78,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Ionians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:79,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Aksumites",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:80,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["barbarian"],name:"Minoans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(proAll(t)/4);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:81,box:["classics"],deck:"Carthaginians",area:"PowerA",suits:[],icons:[],name:"Carthaginians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/6);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:82,box:["classics"],deck:"Carthaginians",area:"PowerB",suits:[],icons:[],name:"Carthaginians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:83,box:["classics"],deck:"Carthaginians",area:"Accession",suits:[],icons:["pinned","city"],name:"City of Carthage",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:84,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire","attack"],name:"Monopoly",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/5);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:85,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire"],name:"Hegemony",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:86,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire","attack"],name:"Elephants",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:87,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire"],name:"Hannibal",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:88,box:["classics"],deck:"Carthaginians",area:"Development",suits:[],icons:["empire","pinned"],name:"Trading Ships",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:90,box:["classics"],deck:"Carthaginians",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Iberia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:92,box:["classics"],deck:"Carthaginians",area:"Nation",suits:["trib"],icons:[],name:"Berbers",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:93,box:["classics"],deck:"Carthaginians",area:"Nation",suits:[],icons:["pinned"],name:"Caravans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:94,box:["classics"],deck:"Carthaginians",area:"Starter",suits:["reg"],icons:["pinned","sack","sack","water"],name:"Balearic Islands",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:95,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:96,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:97,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Dido, Queen of Carthage",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:98,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:99,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Carthaginian Traders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:100,box:["classics"],deck:"Carthaginians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:101,box:["classics"],deck:"Carthaginians",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Mauretania",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:102,box:["classics"],deck:"Celts",area:"PowerA",suits:[],icons:[],name:"Celts",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("unciv"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("unciv")));this.contributingCards=n.map((e=>
319({cardName:e.name,ND:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:103,box:["classics"],deck:"Celts",area:"PowerB",suits:[],icons:[],name:"Celts",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>e.suits.includes("unciv"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("unciv")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:104,box:["classics"],deck:"Celts",area:"Accession",suits:[],icons:[],name:"Celtic Gold",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:105,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Chainmail",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:106,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","attack"],name:"Celtic Innovation",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:107,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Chariots",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:108,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire","pinned"],name:"Ogham Script",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:109,box:["classics"],deck:"Celts",area:"Development",suits:[],icons:["empire"],name:"Vercingetorix",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("unciv"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("unciv")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:110,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Armorica",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:111,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","grain"],name:"Hibernia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:112,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Britannia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:114,box:["classics"],deck:"Celts",area:"Nation",suits:["reg"],icons:["pinned","water"],name:"Belgica",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:115,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:116,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Boudicca",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:117,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Cattle Raid",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:118,box:["classics"],deck:"Celts",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Celtica",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:119,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["pinned"],name:"Cauldron of Ceridwen",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:120,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:121,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:122,box:["classics"],deck:"Celts",area:"Starter",suits:[],icons:[],name:"Druids",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:123,box:["classics"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Marsh",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:125,box:["classics"],deck:"Greeks",area:"PowerA",suits:[],icons:[],name:"Greeks",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length/7);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:126,box:["classics"],deck:"Greeks",area:"PowerB",suits:[],icons:[],name:"Greeks",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:127,box:["classics"],deck:"Greeks",area:"Accession",suits:[],icons:[],name:"Olympic Games",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:128,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire"],name:"Greek Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:129,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire"],name:"Pericles",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:130,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned","city"],name:"City of Corinth",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:131,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Science",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:132,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","attack"],name:"Greek Innovation",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:133,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Direct Democracy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:134,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire"],name:"Philosophy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length/5);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:135,box:["classics"],deck:"Greeks",area:"Development",suits:[],icons:["empire","pinned"],name:"Lighthouse",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:136,box:["classics"],deck:"Greeks",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Plains of Thessaly",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:137,box:["classics"],deck:"Greeks",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Athens",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:138,box:["classics"],deck:"Greeks",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Forest of Pholoe",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:139,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["attack"],name:"Greek Mercenaries",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:140,box:["classics"],deck:"Greeks",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Peleponnese",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getC
319ontributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:141,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:142,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["pinned","barbarian","city"],name:"City of Sparta",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:143,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:144,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Settlers",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:145,box:["classics"],deck:"Greeks",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:146,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Code of Laws",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:147,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Water Mill",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+t.icons.filter((e=>"water"==e||"grain"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.icons.filter((e=>"water"==e||"grain"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:148,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Qanat",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+2*t.icons.filter((e=>"water"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=2*t.icons.filter((e=>"water"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:149,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Domestication",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+2*t.icons.filter((e=>"grain"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=2*t.icons.filter((e=>"grain"==e)).length;return n>0&&e.push({card:t,pts:n}),e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:150,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["attack"],name:"Espionage",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:151,box:["classics","legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["attack"],name:"Invasion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:152,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned","barbarian"],name:"Monument",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:153,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Religion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:154,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Art",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:155,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned"],name:"Road Building",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:156,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv","civ"],icons:["pinned","city"],name:"City",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:157,box:["legends"],deck:"Commons",area:"Uncivilised",suits:["unciv"],icons:["pinned"],name:"Mining",text:"",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:158,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","barbarian"],name:"Fortunate Isle",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:159,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain","water"],name:"Island",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:160,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack"],name:"Lowlands",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:161,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack"],name:"Mountainâ",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:162,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned"],name:"Fortified Region",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:163,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack"],name:"Highlands",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:164,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","grain"],name:"Plain",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:165,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Grassland",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:166,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water","water"],name:"Lakes",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:167,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain","water"],name:"Archipelago",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:168,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","sack","water"],name:"Peninsula",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:169,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","grain"],name:"Rainforest",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:170,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:["pinned","sack","water"],name:"Moor",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:171,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Civil Service",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:172,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Astronomy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:173,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Amphitheatre",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(proAll(t)/5);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:174,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Olmecs",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:175,box:["classics"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Mauryans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"history"==e.location)).length/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"history"==e.location));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:.5})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:.5})}},{id:176,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Cartography",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:177,box:["legends"],deck:"Commons",area:"Civilised",suits:["civ"],icons:["empire","pinned"],name:"Masonry",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.reduce(((e,t)=>e+("play"==t.location?2*t.icons.filter((e=>"city"==e||"metropolis"==e)).length:0)),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location)).reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:178,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Persians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:179,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["empire","attack"],name:"Vikings",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("unciv"))).length/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("unciv")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:.5})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:.5})}},{id:180,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],name:"Carthaginians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/10);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:181,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Macedonians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0)/4);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/4}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:182,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["pinned"],name:"Scythians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:183,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],name:"Celts",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:184,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["empire","pinned","metropolis"],name:"Greeks",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Extra-State"!=e.area&&"State"!=e.area)).length/10);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:185,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Phoenicians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:186,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["barbarian"],name:"Etruscans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:187,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:["attack"],name:"Xiongnu",text:"",count:1,minplayers:4,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("fame"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("fame")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:188,box:["legends"],deck:"Commons",area:"Tributary",suits:["trib"],icons:[],name:"Romans",text:"",count:1,minplayers:3,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:189,box:["legends"],deck:"Commons",area:"Regions",suits:["reg"],icons:[],name:"Sacred Grove",text:"",count:1,minplayers:3,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!0,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;let n=e.filter((e=>e!=t));if(t.bot)return 5;let r=Math.floor(2*n.filter((e=>proAll(e)<proAll(t))).length);return r>10&&(r=10),r},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:190,box:["classics"],deck:"Macedonians",area:"PowerA",suits:[],icons:[],name:"Macedonians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0)/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/2}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:191,box:["classics"],deck:"Macedonians",area:"PowerB",suits:[],icons:[],name:"Macedonians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:192,box:["classics"],deck:"Macedonians",area:"Accession",suits:[],icons:[],name:"Alexander",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:193,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Alexander the Great",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:194,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned"],name:"Mosaics",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:195,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned"],name:"Companion Cavalry",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:196,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Development",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:197,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned","metropolis"],name:"Alexandria in Egypt",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:198,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire"],name:"Parmenion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:199,box:["classics"],deck:"Macedonians",area:"Development",suits:[],icons:["empire","pinned","city"],name:"Alexandria in Ariana",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0)/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/2}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:200,box:["classics"],deck:"Macedonians",area:"Nation",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:201,box:["classics"],deck:"Macedonians",area:"Nation",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:202,box:["classics"],deck:"Macedonians",area:"Nation",suits:["trib"],icons:["attack"],name:"Uxians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:203,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["pinned"],name:"Phalanx",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:204,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned","grain"],name:"Pelagonia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:205,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned","grain","water"],name:"Haliacmon Valley",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:206,box:["classics"],deck:"Macedonians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Orestis",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:207,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:208,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:209,box:["classics"],deck:"Macedonians",area:"Starter",suits:[],icons:["barbarian"],name:"Philip II",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:210,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Acclaimed",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"Multiplier"==e.scoretype)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"Multiplier"==e.scoretype));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:211,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Proud",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"garrison"==this.location||"mana"==this.location?12:"history"==this.location?8:3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:212,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Independent",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:213,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Magnificent",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:5,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),5)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:214,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Eminent",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:8,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),8)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:215,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Imperial",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?8:2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:216,box:["legends"],deck:"Fame",area:"Fame",suits:["fame"],icons:[],name:"Outstanding",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),7)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:217,box:["classics"],deck:"Romans",area:"PowerA",suits:[],icons:[],name:"Romans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/4*1);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:218,box:["classics"],deck:"Romans",area:"PowerB",suits:[],icons:[],name:"Romans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:219,box:["classics"],deck:"Romans",area:"Accession",suits:[],icons:["empire"],name:"Julius Caesar",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:220,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","attack"],name:"Roman Invasion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:221,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","pinned"],name:"Legions",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:222,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","attack"],name:"Military Engineering",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:223,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire"],name:"The Senate",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:224,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire","pinned","metropolis"],name:"Rome, the Eternal City",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:225,box:["classics"],deck:"Romans",area:"Development",suits:[],icons:["empire"],name:"Emperor Trajan",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:226,box:["classics"],deck:"Romans",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Raetia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:227,box:["classics"],deck:"Romans",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Gallia Aquitania",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:229,box:["classics"],deck:"Romans",area:"Nation",suits:[],icons:["pinned"],name:"Bread and Circuses",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:230,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Roman Expansion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:231,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:232,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Triumvirate",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:233,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:234,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:235,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:236,box:["classics"],deck:"Romans",area:"Starter",suits:[],icons:["pinned","city"],name:"City of Rome",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:237,box:["classics"],deck:"Romans",area:"Starter",suits:["reg"],icons:["pinned","sack"],name:"Dalmatia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:238,box:["classics"],deck:"Scythians",area:"PowerA",suits:[],icons:[],name:"Scythians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/6);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:239,box:["classics"],deck:"Scythians",area:"PowerB",suits:[],icons:[],name:"Scythians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/3+t.cards.filter((e=>e.suits.includes("reg"))).length/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/3}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:240,box:["classics"],deck:"Scythians",area:"Accession",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:241,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:[],name:"Jewellery",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:7,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),7)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:242,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:["empire"],name:"Ateas",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:243,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:["empire","pinned","city"],name:"City of Gelonus",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:244,box:["classics"],deck:"Scythians",area:"Development",suits:[],icons:["empire","pinned"],name:"Kurgans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:245,box:["classics"],deck:"Scythians",area:"Nation",suits:[],icons:["barbarian","attack"],name:"Raiders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:246,box:["classics"],deck:"Scythians",area:"Nation",suits:[],icons:["pinned"],name:"Tamga",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0)/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/2}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:247,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack","water"],name:"Tarim Basin",text:"",cou
319nt:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:248,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Caucasia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:249,box:["classics"],deck:"Scythians",area:"Nation",suits:["reg"],icons:["pinned","sack","grain"],name:"Pontic Steppe",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:250,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:[],name:"Nomads",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:251,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:252,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["pinned","barbarian"],name:"Tents",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:253,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["pinned"],name:"Mounted Archers",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:254,box:["classics"],deck:"Scythians",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:255,box:["classics"],deck:"Scythians",area:"Starter",suits:["reg"],icons:["pinned","barbarian"],name:"Carpathian Mountains",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:256,box:["classics"],deck:"Scythians",area:"Starter",suits:["reg"],icons:["pinned","barbarian"],name:"Tian Shan",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:257,box:["classics"],deck:"Vikings",area:"PowerA",suits:[],icons:[],name:"Vikings",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"Multiplier"==e.scoretype)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"Multiplier"==e.scoretype));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:258,box:["classics"],deck:"Vikings",area:"PowerB",suits:[],icons:[],name:"Vikings",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>"Multiplier"==e.scoretype)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"Multiplier"==e.scoretype));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:259,box:["classics"],deck:"Vikings",area:"Accession",suits:[],icons:["barbarian"],name:"Harald Hardrada",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>"Multiplier"==e.scoretype)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"Multiplier"==e.scoretype));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:260,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian"],name:"Føroyar",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:261,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Sagas",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(t.cards.filter((e=>"garrison"==e.location&&e.garrisoning==this)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"garrison"==e.location&&e.garrisoning==this));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:262,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["barbarian","attack"],name:"Go A'Viking",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:263,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian","city"],name:"City of Dubh Linn",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(resAll(t)/8);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:264,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Skis",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:265,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Longships",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:266,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["pinned","barbarian"],name:"Combs",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/3);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:267,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian","sack","water","grain"],name:"Vinland",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"play"==this.location?6:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:268,box:["classics"],deck:"Vikings",area:"Nation",suits:[],icons:["barbarian"],name:"Rollo the Walker",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:269,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian"],name:"Graenland",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:270,box:["classics"],deck:"Vikings",area:"Nation",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Iceland",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:271,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Gothja",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:272,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Jomsviking",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:273,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Althing",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:274,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:275,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:276,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:["barbarian"],name:"Erik the Red",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:277,box:["classics"],deck:"Vikings",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Scandinavia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:278,box:["classics"],deck:"Vikings",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:279,box:["legends"],deck:"Arthurians",area:"PowerA",suits:[],icons:[],name:"Arthurians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:280,box:["legends"],deck:"Arthurians",area:"PowerB",suits:[],icons:[],name:"Arthurians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:6,hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),6)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:281,box:["classics","legends"],deck:"Commons",area:"Unrest",suits:["unrest"],icons:[],name:"Unrest",text:"",count:100,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:-2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),-2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:282,box:["legends"],deck:"Arthurians",area:"Extra-Court",suits:[],icons:[],name:"King Arthur'
319s Court",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:283,box:["legends"],deck:"Arthurians",area:"Accession",suits:[],icons:["pinned"],name:"Gwaith Camlan",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:284,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["empire"],name:"Taliesin the Bard",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:285,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:[],name:"Excalibur",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:286,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:[],name:"Graal",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:8,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),8)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:287,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["knight"],name:"Lawnslot y Llyn (Sir Lancelot)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:288,box:["legends"],deck:"Arthurians",area:"Development",suits:[],icons:["pinned"],name:"Twrch Trwyth",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:-4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),-4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:289,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Camelot",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:290,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["knight"],name:"Bedwyr (Sir Bedevire)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:291,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Britannia Flavia",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:292,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned","water"],name:"Viviane of the Lake",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:293,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["knight"],name:"Gwalchmei (Sir Gawain)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:294,box:["legends"],deck:"Arthurians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Ynys Afallach (Avalon)",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:295,box:["legends"],deck:"Arthurians",area:"Nation",suits:[],icons:["attack"],name:"Lady Bertilak",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?2:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:296,box:["legends"],deck:"Arthurians",area:"Starter",suits:["reg"],icons:["pinned"],name:"Britannia Secunda",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:297,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Myrddin Wyllt (Merlin)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:298,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Peredur (Sir Percival)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:299,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],name:"Cafall",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:300,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],name:"Guennuvar",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:301,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"King Arthur",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:302,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["attack"],name:"Morigena",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?2:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:303,box:["legends"],deck:"Arthurians",area:"Starter",suits:["reg"],icons:["pinned","grain"],name:"Britannia Prima",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:304,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:["knight"],name:"Cai (Sir Kay)",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:305,box:["legends"],deck:"Arthurians",area:"Starter",suits:[],icons:[],name:"Uthyr Pendragon",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:306,box:["legends"],deck:"Atlanteans",area:"PowerA",suits:[],icons:[],name:"Atlanteans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0)/2);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n/2}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:307,box:["legends"],deck:"Atlanteans",area:"PowerB",suits:[],icons:[],name:"Atlanteans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:308,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Development",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:309,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Kleito",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:310,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","pinned"],name:"Vast Wealth",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>
319e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:311,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","pinned"],name:"Palace of Poseidon",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:5,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),5)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:312,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","pinned"],name:"Moats and Walls",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:313,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire","attack"],name:"Spread of Atlantis",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:314,box:["legends"],deck:"Atlanteans",area:"Development",suits:["reg"],icons:["empire","pinned","grain","sack"],name:"Themiscyra",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:315,box:["legends"],deck:"Atlanteans",area:"Development",suits:["reg"],icons:["empire","pinned"],name:"Mountain of Atlantis",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:316,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Advanced Culture",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:317,box:["legends"],deck:"Atlanteans",area:"Development",suits:[],icons:["empire"],name:"Myths and Legends",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:318,box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["empire"],name:"Flood",text:"",count:3,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:319,box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["empire"],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:320,box:["legends"],deck:"Atlanteans",area:"Starter",suits:[],icons:["empire","attack"],name:"Atlantean Fleet",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:321,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned"],name:"Thule",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:322,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned","sack"],name:"Hesperides",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:323,box:["legends"],deck:"Atlanteans",area:"Starter",suits:["reg"],icons:["empire","pinned","sack","sack"],name:"Elysian Fields",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:324,box:["legends"],deck:"Egyptians",area:"PowerA",suits:[],icons:[],name:"Egyptians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:325,box:["legends"],deck:"Egyptians",area:"PowerB",suits:[],icons:[],name:"Egyptians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(3*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:3})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:3})}},{id:326,box:["legends"],deck:"Egyptians",area:"Accession",suits:[],icons:[],name:"Unification",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:327,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire"],name:"Development",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:328,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire"],name:"Ramesses II",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:329,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","attack"],name:"Egyptian Expansion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:330,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Pyramids",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:331,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","attack"],name:"Egyptian Legacy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:332,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Obelisk",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:333,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Embalming",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:334,box:["legends"],deck:"Egyptians",area:"Development",suits:[],icons:["empire","pinned"],name:"Medicine",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:4,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),4)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:335,box:["legends"],deck:"Egyptians",area:"Nation",suits:["trib"],icons:["barbarian"],name:"Kushites",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:336,box:["legends"],deck:"Egyptians",area:"Nation",suits:["reg"],icons:["pinned"],name:"Red Land",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:337,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["barbarian","attack"],name:"Egyptian Incursion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:338,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["pinned"],name:"Egyptian Hieroglyphics",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:339,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:340,box:["legends"],deck:"Egyptians",area:"Starter",suits:["reg"],icons:["pinned","sack","water","grain"],name:"Nile Valley",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:341,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:342,box:["legends"],deck:"Egyptians",area:"Starter",suits:["reg"],icons:["pinned","water"],name:"Lower Nile",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:343,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Flood of the Nile",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:344,box:["legends"],deck:"Egyptians",area:"Starter",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:345,box:["legends"],deck:"Mauryans",area:"PowerA",suits:[],icons:[],name:"Mauryans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+("play"==t.location?t.suits.filter((e=>"reg"==e)).length:0)),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location)).reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:1*e.pts})}},{id:346,box:["legends"],deck:"Mauryans",area:"PowerB",suits:[],icons:[],name:"Mauryans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>"history"==e.location)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"history"==e.location));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:347,box:["legends"],deck:"Mauryans",area:"Accession",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:348,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire"],name:"Ashoka",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:1,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),1)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:349,box:["legends"],deck:"Mauryans",area:"Development",suits:["reg","reg"],icons:["empire","pinned"],name:"Grand Trunk Road",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:350,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Punch-marked Coins",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:351,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Edicts of Ashoka",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:352,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Mathematics",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:353,box:["legends"],deck:"Mauryans",area:"Development",suits:[],icons:["empire","pinned"],name:"Buddhism",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"history"==e.location)).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"history"==e.location));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:354,box:["legends"],deck:"Mauryans",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Gandhara",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:355,box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["barbarian","attack"],name:"Indian Elephants",text:"",count:2,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:356,box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["pinned"],name:"Arthashastra",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:357,box:["legends"],deck:"Mauryans",area:"Nation",suits:["trib"],icons:[],name:"Nanda Dynasty",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:358,box:["legends"],deck:"Mauryans",area:"Nation",suits:[],icons:["pinned","city"],name:"City of Pataliputra",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:359,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:360,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:["barbarian"],name:"Chandragupta",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:361,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:["barbarian"],name:"Chanakya",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:362,box:["legends"],deck:"Mauryans",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:363,box:["legends"],deck:"Mauryans",area:"Starter",suits:["reg"],icons:["pinned","sack","grain","water"],name:"Indus Valley",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:364,box:["legends"],deck:"Mauryans",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Magadha",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:365,box:["legends"],deck:"Minoans",area:"PowerA",suits:[],icons:[],name:"Minoans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:366,box:["legends"],deck:"Minoans",area:"PowerB",suits:[],icons:[],name:"Minoans",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*proAll(t));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:367,box:["legends"],deck:"Minoans",area:"Accession",suits:[],icons:[],name:"King Minos",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:368,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire"],name:"Minoan Traders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:369,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Drainage System",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:370,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Architecture",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:371,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Frescos",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:372,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","pinned"],name:"Labyrinth",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:373,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:["empire","attack"],name:"Minoan Expansion",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:374,box:["legends"],deck:"Minoans",area:"Development",suits:[],icons:[],name:"Seal Stones",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*proAll(t));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:375,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:376,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:["pinned"],name:"Writing Systems",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:377,box:["legends"],deck:"Minoans",area:"Nation",suits:[],icons:["pinned","metropolis"],name:"Knossos",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:378,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:379,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["barbarian"],name:"Conquer",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:380,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:["pinned","barbarian"],name:"Pottery",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:381,box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],icons:["pinned","barbarian","sack"],name:"Thera",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:382,box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],icons:["pinned","sack","water","grain"],name:"Crete",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:383,box:["legends"],deck:"Minoans",area:"Starter",suits:["reg"],ico
319ns:["pinned","sack"],name:"Cyprus",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:384,box:["legends"],deck:"Minoans",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:385,box:["legends"],deck:"Olmecs",area:"PowerA",suits:[],icons:[],name:"Olmecs",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:386,box:["legends"],deck:"Olmecs",area:"PowerB",suits:[],icons:[],name:"Olmecs",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:387,box:["legends"],deck:"Olmecs",area:"Accession",suits:[],icons:["pinned","metropolis"],name:"San Lorenzo Tenochtitlán",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:388,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Step Pyramids",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:389,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire"],name:"Ritual Sacrifice",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:390,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","attack"],name:"Olmec Traders",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:391,box:["legends"],deck:"Olmecs",area:"Development",suits:["reg"],icons:["empire","pinned","sack","grain"],name:"Tres Zapotes",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:392,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Stone Heads",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:393,box:["legends"],deck:"Olmecs",area:"Development",suits:[],icons:["empire","pinned"],name:"Drainage System",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:3,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),3)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:394,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:[],name:"Cacao",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:395,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:["pinned"],name:"Olmec Hieroglyphics",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:396,box:["legends"],deck:"Olmecs",area:"Nation",suits:[],icons:["pinned"],name:"Calendar",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:398,box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["pinned"],name:"Loadstone Compass",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:399,box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["pinned"],name:"Ball Games",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:400,box:["legends"],deck:"Olmecs",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Laguna de los Cerros",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:401,box:["legends"],deck:"Olmecs",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"La Venta",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:402,box:["legends"],deck:"Olmecs",area:"Starter",suits:[],icons:["mask"],name:"Stone Mask",text:"",count:8,minplayers:2,garrisoning:!1,extra:{3:0,4:0}
319,contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?1:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:403,box:["legends"],deck:"Qin",area:"PowerA",suits:[],icons:[],name:"Qin",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:404,box:["legends"],deck:"Qin",area:"PowerB",suits:[],icons:[],name:"Qin",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.icons.includes("pinned")&&!e.suits.includes("reg")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:405,box:["legends"],deck:"Qin",area:"Accession",suits:[],icons:["empire","pinned"],name:"Long Walls I",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:406,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Metallurgy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:407,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:[],name:"Terracotta Warriors",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"garrison"==this.location||"mana"==this.location?7:"history"==this.location?3:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:408,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Mathematics",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Number",value:2,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),2)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:409,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls II",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:410,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls III",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:411,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire","pinned"],name:"Long Walls IV",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>"play"==e.location&&e.name.startsWith("Long Walls")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:412,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire"],name:"Emperor Qin Shi Huang",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:413,box:["legends"],deck:"Qin",area:"Development",suits:[],icons:["empire"],name:"King Wu of Qin",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?2:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:414,box:["legends"],deck:"Qin",area:"Nation",suits:[],icons:["pinned"],name:"Writing Systems",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:415,box:["legends"],deck:"Qin",area:"Nation",suits:[],icons:[],name:"Glory",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:416,box:["legends"],deck:"Qin",area:"Nation",suits:["reg"],icons:["pinned","sack"],name:"Eastern Zhou",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:417,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Mandate of Heaven",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"play"!=this.location?-2:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:418,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Confucianism",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:419,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["pinned"],name:"Legalism",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:420,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:[],name:"Prosperity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:421,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["attack"],name:"School of Diplomacy",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:422,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["barbarian"],name:"Advance",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:423,box:["legends"],deck:"Qin",area:"Starter",suits:[],icons:["barbarian"],name:"Duke Zhuang of Qin",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:424,box:["legends"],deck:"Qin",area:"Starter",suits:["reg"],icons:["pinned","sack","water"],name:"Western Zhou",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:425,box:["legends"],deck:"Utopians",area:"PowerA",suits:[],icons:[],name:"Utopians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/4*1);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:426,box:["legends"],deck:"Utopians",area:"PowerB",suits:[],icons:[],name:"Utopians",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",hidden:!0,score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(popAll(t)/3*1);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:427,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Visions of Shangri-La",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:427.5,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Path to Shangri-La",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:428,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Gates of Shangri-La",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:428.5,box:["legends"],deck:"Utopians",area:"Extra-Journey",suits:[],icons:[],name:"Shangri-La",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:429,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Daoc
319hang",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("trib"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("trib")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:430,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["scroll"],name:"Sacred Scroll",text:"",count:5,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Conditional",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t?0:(e.filter((e=>e!=t)),t.bot||"history"==this.location?1:0)},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:431,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Tree of Knowledge",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("civ"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("civ")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:432,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Monastery",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(e[0].exile/4*1);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null!=t)return e.filter((e=>e!=t)),[]}},{id:433,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Portals",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.reduce(((e,t)=>e+t.suits.filter((e=>"reg"==e)).length),0));return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.reduce(((e,t)=>{let n=t.suits.filter((e=>"reg"==e)).length;return n>0?[...e,{card:t,pts:1*n}]:e}),[]);this.contributingCards=n.map((e=>({cardName:e.card.name,cardID:e.card.id,pts:e.pts})));for(let e of n)e.card.contributedTo.push({cardName:this.name,cardID:this.id,pts:e.pts})}},{id:434,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Lost Tomes",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(2*t.cards.filter((e=>e.suits.includes("fame"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("fame")));this.contributingCards=n.map((e=>({cardName:e.name,cardID:e.id,pts:2})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:2})}},{id:435,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:[],name:"Charity",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:436,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:[],name:"Meditation",text:"",count:1,minplayers:2,garrisoning:!1,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));return null==t||e.filter((e=>e!=t)),0},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));null!=t&&e.filter((e=>e!=t))}},{id:437,box:["legends"],deck:"Utopians",area:"Starter",suits:[],icons:["pinned"],name:"Mountain Retreat",text:"",count:1,minplayers:2,garrisoning:!0,extra:{3:0,4:0},contributedTo:[],needsThem:!1,scoretype:"Multiplier",score:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return 0;if(e.filter((e=>e!=t)),t.bot)return 5;let n=Math.floor(1*t.cards.filter((e=>e.suits.includes("unciv"))).length);return n>10&&(n=10),n},getContributors:function(e){let t=e.find((e=>e.cards.some((e=>e==this))));if(null==t)return;if(e.filter((e=>e!=t)),t.bot)return;let n=t.cards.filter((e=>e.suits.includes("unciv")));this.contributingCards=n.map((e=>
319({cardName:e.name,cardID:e.id,pts:1})));for(let e of n)e.contributedTo.push({cardName:this.name,cardID:this.id,pts:1})}},{id:-1,box:[],name:"No card",deck:"",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,extra:{3:0,4:0},hidden:!0,score:function(e){return 0},getContributors:function(e){}},{id:"KoKA",side:"A",box:["classics","legends","merchants"],name:"King of Kings (side A)",deck:"King of Kings",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,text:"When you would gain this card, instead resolve it. Then flip this card. THIS TRIGGERS GAME END. If Barbarian, gain 6 Progress. If Empire, gain 3 Progress and develop for free.",extra:{3:0,4:0},hidden:!0,score:function(e){return 0},getContributors:function(e){}},{id:"KoKB",side:"B",box:["classics","legends","merchants"],name:"King of Kings (side B)",deck:"King of Kings",area:"",suits:[],icons:[],scoretype:"",count:1,minplayers:2,text:"When you would gain this card, instead resolve it. Then flip this card. Multiple players can resolve this card. If Barbarian, gain 4 Progress. If Empire, develop for free.",extra:{3:0,4:0},hidden:!0,score:function(e){return 0},getContributors:function(e){}}];function ownKeys$1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys$1(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys$1(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var commonjsGlobal$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e){var t={exports:{}};return e(t,t.exports),t.exports}var check=function(e){return e&&e.Math==Math&&e},global$1=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal$1&&commonjsGlobal$1)||function(){return this}()||Function("return this")(),isPure=!1,setGlobal=function(e,t){try{Object.defineProperty(global$1,e,{value:t,configurable:!0,writable:!0})}catch(n){global$1[e]=t}return t},SHARED="__core-js_shared__",store$1=global$1[SHARED]||setGlobal(SHARED,{}),sharedStore=store$1,shared=createCommonjsModule((function(e){(e.exports=function(e,t){return sharedStore[e]||(sharedStore[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.16.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),requireObjectCoercible=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},toObject=function(e){return Object(requireObjectCoercible(e))},hasOwnProperty={}.hasOwnProperty,has$1=Object.hasOwn||function(e,t){return hasOwnProperty.call(toObject(e),t)},id$1=0,postfix=Math.random(),uid=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++id$1+postfix).toString(36)},aFunction$1=function(e){return"function"==typeof e?e:void 0},getBuiltIn=function(e,t){return arguments.length<2?aFunction$1(global$1[e]):global$1[e]&&global$1[e][t]},engineUserAgent=getBuiltIn("navigator","userAgent")||"",process$3=global$1.process,Deno=global$1.Deno,versions=process$3&&process$3.ver
319sions||Deno&&Deno.version,v8=versions&&versions.v8,match,version;v8?(match=v8.split("."),version=match[0]<4?1:match[0]+match[1]):engineUserAgent&&(match=engineUserAgent.match(/Edge\/(\d+)/),(!match||match[1]>=74)&&(match=engineUserAgent.match(/Chrome\/(\d+)/),match&&(version=match[1])));var engineV8Version=version&&+version,fails=function(e){try{return!!e()}catch(e){return!0}},nativeSymbol=!!Object.getOwnPropertySymbols&&!fails((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&engineV8Version&&engineV8Version<41})),useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,WellKnownSymbolsStore=shared("wks"),Symbol$1=global$1.Symbol,createWellKnownSymbol=useSymbolAsUid?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid,wellKnownSymbol=function(e){return has$1(WellKnownSymbolsStore,e)&&(nativeSymbol||"string"==typeof WellKnownSymbolsStore[e])||(nativeSymbol&&has$1(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},TO_STRING_TAG$4=wellKnownSymbol("toStringTag"),test$1={};test$1[TO_STRING_TAG$4]="z";var toStringTagSupport="[object z]"===String(test$1),descriptors=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},document$3=global$1.document,EXISTS=isObject(document$3)&&isObject(document$3.createElement),documentCreateElement=function(e){return EXISTS?document$3.createElement(e):{}},ie8DomDefine=!descriptors&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(e){if(!isObject(e))throw TypeError(String(e)+" is not an object");return e},isSymbol=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn("Symbol");return"function"==typeof t&&Object(e)instanceof t},ordinaryToPrimitive=function(e,t){var n,r;if("string"===t&&"function"==typeof(n=e.toString)&&!isObject(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!isObject(r=n.call(e)))return r;if("string"!==t&&"function"==typeof(n=e.toString)&&!isObject(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},TO_PRIMITIVE=wellKnownSymbol("toPrimitive"),toPrimitive=function(e,t){if(!isObject(e)||isSymbol(e))return e;var n,r=e[TO_PRIMITIVE];if(void 0!==r){if(void 0===t&&(t="default"),n=r.call(e,t),!isObject(n)||isSymbol(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===t&&(t="number"),ordinaryToPrimitive(e,t)},toPropertyKey=function(e){var t=toPrimitive(e,"string");return isSymbol(t)?t:String(t)},$defineProperty=Object.defineProperty,f$5=descriptors?$defineProperty:function(e,t,n){if(anObject(e),t=toPropertyKey(t),anObject(n),ie8DomDefine)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e},objectDefineProperty={f:f$5},createPropertyDescriptor=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},createNonEnumerableProperty=descriptors?function(e,t,n){return objectDefineProperty.f(e,t,createPropertyDescriptor(1,n))}:function(e,t,n){return e[t]=n,e},functionToString=Function.toString;"function"!=typeof sharedStore.inspectSource&&(sharedStore.inspectSource=function(e){return functionToString.call(e)});var inspectSource=sharedStore.inspectSource,WeakMap$1=global$1.WeakMap,nativeWeakMap="function"==typeof WeakMap$1&&/native code/.test(inspectSource(WeakMap$1)),keys$2=shared("keys"),sharedKey=function(e){return keys$2[e]||(keys$2[e]=uid(e))},hiddenKeys$1={},OBJECT_ALREADY_INITIALIZED="Object already initialized",WeakMap$2=global$1.WeakMap,set$2,get$1,has,enforce=function(e){return has(e)?get$1(e):set$2(e,{})},getterFor=function(e){return function(t){var n;if(!isObject(t)||(n=get$1(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(nativeWeakMap||sharedStore.state){var store=sharedStore.state||(sharedStore.state=new WeakMap$2),wmget=store.get,wmhas=store.has,wmset=store.set;set$2=function(e,t){if(wmhas.call(store,e))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset.call(store,e,t),t},get$1=function(e){return wmget.call(store,e)||{}},has=function(e){return wmhas.call(store,e)}}else{var STATE=sharedKey("state");hiddenKeys$1[STATE]=!0,set$2=function(e,t){if(has$1(e,STATE))throw new TypeError(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty(e,STATE,t),t},get$1=function(e){return has$1(e,STATE)?e[STATE]:{}},has=function(e){return has$1(e,STATE)}}var internalState={set:set$2,get:get$1,has:has,enforce:enforce,getterFor:getterFor},redefine=createCommonjsModule((function(e){var t=internalState.get,n=internalState.enforce,r=String(String).split("String");
vendor: 10,123 bytes, line 319
319(e.exports=function(e,t,i,a){var o,s=!!a&&!!a.unsafe,c=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||has$1(i,"name")||createNonEnumerableProperty(i,"name",t),(o=n(i)).source||(o.source=r.join("string"==typeof t?t:""))),e!==global$1?(s?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=i:createNonEnumerableProperty(e,t,i)):c?e[t]=i:setGlobal(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||inspectSource(this)}))})),toString$1={}.toString,classofRaw=function(e){return toString$1.call(e).slice(8,-1)},TO_STRING_TAG$3=wellKnownSymbol("toStringTag"),CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof=toStringTagSupport?classofRaw:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=tryGet(t=Object(e),TO_STRING_TAG$3))?n:CORRECT_ARGUMENTS?classofRaw(t):"Object"==(r=classofRaw(t))&&"function"==typeof t.callee?"Arguments":r},objectToString=toStringTagSupport?{}.toString:function(){return"[object "+classof(this)+"]"};toStringTagSupport||redefine(Object.prototype,"toString",objectToString,{unsafe:!0});var $propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$4=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$4&&!$propertyIsEnumerable.call({1:2},1),f$4=NASHORN_BUG?function(e){var t=getOwnPropertyDescriptor$4(this,e);return!!t&&t.enumerable}:$propertyIsEnumerable,objectPropertyIsEnumerable={f:f$4},split="".split,indexedObject=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==classofRaw(e)?split.call(e,""):Object(e)}:Object,toIndexedObject=function(e){return indexedObject(requireObjectCoercible(e))},$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,f$3=descriptors?$getOwnPropertyDescriptor:function(e,t){if(e=toIndexedObject(e),t=toPropertyKey(t),ie8DomDefine)try{return $getOwnPropertyDescriptor(e,t)}catch(e){}if(has$1(e,t))return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(e,t),e[t])},objectGetOwnPropertyDescriptor={f:f$3},ceil=Math.ceil,floor$7=Math.floor,toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor$7:ceil)(e)},min$6=Math.min,toLength=function(e){return e>0?min$6(toInteger(e),9007199254740991):0},max$2=Math.max,min$5=Math.min,toAbsoluteIndex=function(e,t){var n=toInteger(e);return n<0?max$2(n+t,0):min$5(n,t)},createMethod$5=function(e){return function(t,n,r){var i,a=toIndexedObject(t),o=toLength(a.length),s=toAbsoluteIndex(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},arrayIncludes={includes:createMethod$5(!0),indexOf:createMethod$5(!1)},indexOf=arrayIncludes.indexOf,objectKeysInternal=function(e,t){var n,r=toIndexedObject(e),i=0,a=[];for(n in r)!has$1(hiddenKeys$1,n)&&has$1(r,n)&&a.push(n);for(;t.length>i;)has$1(r,n=t[i++])&&(~indexOf(a,n)||a.push(n));return a},enumBugKeys=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hiddenKeys=enumBugKeys.concat("length","prototype"),f$2=Object.getOwnPropertyNames||function(e){return objectKeysInternal(e,hiddenKeys)},objectGetOwnPropertyNames={f:f$2},f$1=Object.getOwnPropertySymbols,objectGetOwnPropertySymbols={f:f$1},ownKeys=getBuiltIn("Reflect","ownKeys")||function(e){var t=objectGetOwnPropertyNames.f(anObject(e)),n=objectGetOwnPropertySymbols.f;return n?t.concat(n(e)):t},copyConstructorProperties=function(e,t){for(var n=ownKeys(t),r=objectDefineProperty.f,i=objectGetOwnPropertyDescriptor.f,a=0;a<n.length;a++){var o=n[a];has$1(e,o)||r(e,o,i(t,o))}},replacement=/#|\.prototype\./,isForced=function(e,t){var n=data[normalize(e)];return n==POLYFILL||n!=NATIVE&&("function"==typeof t?fails(t):!!t)},normalize=isForced.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced.data={},NATIVE=isForced.NATIVE="N",POLYFILL=isForced.POLYFILL="P",isForced_1=isForced,getOwnPropertyDescriptor$3=objectGetOwnPropertyDescriptor.f,_export=function(e,t){var n,r,i,a,o,s=e.target,c=e.global,l=e.stat;if(n=c?global$1:l?global$1[s]||setGlobal(s,{}):(global$1[s]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(o=getOwnPropertyDescriptor$3(n,r))&&o.value:n[r],!isForced_1(c?r:s+(l?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;copyConstructorProperties(a,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty(a,"sham",!0),redefine(n,r,a,e)}},nativePromiseConstructor=global$1.Promise,redefineAll=function(e,t,n){for(var r in t)redefine(e,r,t[r],n);return e},aPossiblePrototype=function(e){if(!isObject(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return anObject(n),aPossiblePrototype(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),defineProperty$5=objectDefineProperty.f,TO_STRING_TAG$2=wellKnownSymbol("toStringTag"),setToStringTag=function(e,t,n){e&&!has$1(e=n?e:e.prototype,TO_STRING_TAG$2)&&defineProperty$5(e,TO_STRING_TAG$2,{configurable:!0,value:t})},SPECIES$6=wellKnownSymbol("species"),setSpecies=function(e){var t=getBuiltIn(e),n=objectDefineProperty.f;descriptors&&t&&!t[SPECIES$6]&&n(t,SPECIES$6,{configurable:!0,get:function(){return this}})},aFunction=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},anInstance=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},iterators={},ITERATOR$8=wellKnownSymbol("iterator"),ArrayPrototype$1=Array.prototype,isArrayIteratorMethod=function(e){return void 0!==e&&(iterators.Array===e||ArrayPrototype$1[ITERATOR$8]===e)},functionBindContext=function(e,t,n){if(aFunction(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},ITERATOR$7=wellKnownSymbol("iterator"),getIteratorMethod=function(e){if(null!=e)return e[ITERATOR$7]||e["@@iterator"]||iterators[classof(e)]},iteratorClose=function(e){var t=e.return;if(void 0!==t)return anObject(t.call(e)).value},Result=function(e,t){this.stopped=e,this.result=t},iterate=function(e,t,n){var r,i,a,o,s,c,l,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),f=functionBindContext(t,u,1+d+h),m=function(e){return r&&iteratorClose(r),new Result(!0,e)},g=function(e){return d?(anObject(e),h?f(e[0],e[1],m):f(e[0],e[1])):h?f(e,m):f(e)};if(p)r=e;else{if("function"!=typeof(i=getIteratorMethod(e)))throw TypeError("Target is not iterable");if(isArrayIteratorMethod(i)){for(a=0,o=toLength(e.length);o>a;a++)if((s=g(e[a]))&&s instanceof Result)return s;return new Result(!1)}r=i.call(e)}for(c=r.next;!(l=c.call(r)).done;){try{s=g(l.value)}catch(e){throw iteratorClose(r),e}if("object"==typeof s&&s&&s instanceof Result)return s}return new Result(!1)},ITERATOR$6=wellKnownSymbol("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR$6]=function(){return this},Array.from(iteratorWithReturn,(function(){throw 2}))}catch(e){}var checkCorrectnessOfIteration=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var r={};r[ITERATOR$6]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},SPECIES$5=wellKnownSymbol("species"),speciesConstructor=function(e,t){var n,r=anObject(e).constructor;return void 0===r||null==(n=anObject(r)[SPECIES$5])?t:aFunction(n)},html=getBuiltIn("document","documentElement"),engineIsIos=/(?:iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent),engineIsNode="process"==classofRaw(global$1.process),set$1=global$1.setImmediate,clear=global$1.clearImmediate,process$2=global$1.process,MessageChannel$1=global$1.MessageChannel,Dispatch=global$1.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",location$1,defer,channel,port;try{location$1=global$1.location}catch(e){}var run=function(e){if(queue.hasOwnProperty(e)){var t=queue[e];delete queue[e],t()}},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$1.postMessage(String(e),location$1.protocol+"//"+location$1.host)};set$1&&clear||(set$1=function(e){for(var t=[],n=arguments.length,r=1;n>r;)t.push(arguments[r++]);return queue[++counter]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},defer(counter),counter},clear=function(e){delete queue[e]},engineIsNode?defer=function(e){process$2.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel$1&&!engineIsIos?(channel=new MessageChannel$1,port=channel.port2,channel.port1.onmessage=listener,defer=functionBindContext(port.postMessage,port,1)):global$1.addEventListener&&"function"==typeof postMessage&&!global$1.importScripts&&location$1&&"file:"!==location$1.protocol&&!fails(post)?(defer=post,global$1.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in documentCreateElement("script")?function(e){html.appendChild(documentCreateElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)});var task$1={set:set$1,clear:clear},engineIsIosPebble=/iphone|ipod|ipad/i.test(engineUserAgent)&&void 0!==global$1.Pebble,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(engineUserAgent),getOwnPropertyDescriptor$2=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,MutationObserver=global$1.MutationObserver||global$1.WebKitMutationObserver,document$2=global$1.document,process$1=global$1.process,Promise$1=global$1.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor$2(global$1,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,flush,head,last,
319notify$1,toggle,node,promise,then;queueMicrotask||(flush=function(){var e,t;for(engineIsNode&&(e=process$1.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},engineIsIos||engineIsNode||engineIsWebosWebkit||!MutationObserver||!document$2?!engineIsIosPebble&&Promise$1&&Promise$1.resolve?(promise=Promise$1.resolve(void 0),promise.constructor=Promise$1,then=promise.then,notify$1=function(){then.call(promise,flush)}):notify$1=engineIsNode?function(){process$1.nextTick(flush)}:function(){macrotask.call(global$1,flush)}:(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),notify$1=function(){node.data=toggle=!toggle}));var microtask=queueMicrotask||function(e){var t={fn:e,next:void 0};last&&(last.next=t),head||(head=t,notify$1()),last=t},PromiseCapability=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=aFunction(t),this.reject=aFunction(n)},f=function(e){return new PromiseCapability(e)},newPromiseCapability$1={f:f},promiseResolve=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;var n=newPromiseCapability$1.f(e);return(0,n.resolve)(t),n.promise},hostReportErrors=function(e,t){var n=global$1.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))},perform=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},engineIsBrowser="object"==typeof window,task=task$1.set,SPECIES$4=wellKnownSymbol("species"),PROMISE="Promise",getInternalState$4=internalState.get,setInternalState$5=internalState.set,getInternalPromiseState=internalState.getterFor(PROMISE),NativePromisePrototype=nativePromiseConstructor&&nativePromiseConstructor.prototype,PromiseConstructor=nativePromiseConstructor,PromiseConstructorPrototype=NativePromisePrototype,TypeError$1=global$1.TypeError,document$1=global$1.document,process$4=global$1.process,newPromiseCapability=newPromiseCapability$1.f,newGenericPromiseCapability=newPromiseCapability,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),NATIVE_REJECTION_EVENT="function"==typeof PromiseRejectionEvent,UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,SUBCLASSING=!1,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,FORCED$6=isForced_1(PROMISE,(function(){var e=inspectSource(PromiseConstructor),t=e!==String(PromiseConstructor);if(!t&&66===engineV8Version)return!0;if(engineV8Version>=51&&/native code/.test(e))return!1;var n=new PromiseConstructor((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(n.constructor={})[SPECIES$4]=r,!(SUBCLASSING=n.then((function(){}))instanceof r)||!t&&engineIsBrowser&&!NATIVE_REJECTION_EVENT})),INCORRECT_ITERATION=FORCED$6||!checkCorrectnessOfIteration((function(e){PromiseConstructor.all(e).catch((function(){}))})),isThenable=function(e){var t;return!(!isObject(e)||"function"!=typeof(t=e.then))&&t},notify=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;microtask((function(){for(var r=e.value,i=e.state==FULFILLED,a=0;n.length>a;){var o,s,c,l=n[a++],u=i?l.ok:l.fail,d=l.resolve,p=l.reject,h=l.domain;try{u?(i||(e.rejection===UNHANDLED&&onHandleUnhandled(e),e.rejection=HANDLED),!0===u?o=r:(h&&h.enter(),o=u(r),h&&(h.exit(),c=!0)),o===l.promise?p(TypeError$1("Promise-chain cycle")):(s=isThenable(o))?s.call(o,d,p):d(o)):p(r)}catch(e){h&&!c&&h.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&onUnhandled(e)}))}},dispatchEvent=function(e,t,n){var r,i;DISPATCH_EVENT?((r=document$1.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),global$1.dispatchEvent(r)):r={promise:t,reason:n},!NATIVE_REJECTION_EVENT&&(i=global$1["on"+e])?i(r):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(e){task.call(global$1,(function(){var t,n=e.facade,r=e.value;if(isUnhandled(e)&&(t=perform((function(){engineIsNode?process$4.emit("unhandledRejection",r,n):dispatchEvent(UNHANDLED_REJECTION,n,r)})),e.rejection=engineIsNode||isUnhandled(e)?UNHANDLED:HANDLED,t.error))throw t.value}))},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(e){task.call(global$1,(function(){var t=e.facade;engineIsNode?process$4.emit("rejectionHandled",t):dispatchEvent(REJECTION_HANDLED,t,e.value)}))},bind=function(e,t,n){return function(r){e(t,r,n)}},internalReject=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw TypeError$1("Promise can't be resolved
319itself");var r=isThenable(t);r?microtask((function(){var n={done:!1};try{r.call(t,bind(internalResolve,n,e),bind(internalReject,n,e))}catch(t){internalReject(n,t,e)}})):(e.value=t,e.state=FULFILLED,notify(e,!1))}catch(t){internalReject({done:!1},t,e)}}};if(FORCED$6&&(PromiseConstructor=function(e){anInstance(this,PromiseConstructor,PROMISE),aFunction(e),Internal.call(this);var t=getInternalState$4(this);try{e(bind(internalResolve,t),bind(internalReject,t))}catch(e){internalReject(t,e)}},PromiseConstructorPrototype=PromiseConstructor.prototype,Internal=function(e){setInternalState$5(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:PENDING,value:void 0})},Internal.prototype=redefineAll(PromiseConstructorPrototype,{then:function(e,t){var n=getInternalPromiseState(this),r=newPromiseCapability(speciesConstructor(this,PromiseConstructor));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=engineIsNode?process$4.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=PENDING&¬ify(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalState$4(e);this.promise=e,this.resolve=bind(internalResolve,t),this.reject=bind(internalReject,t)},newPromiseCapability$1.f=newPromiseCapability=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},"function"==typeof nativePromiseConstructor&&NativePromisePrototype!==Object.prototype)){nativeThen=NativePromisePrototype.then,SUBCLASSING||(redefine(NativePromisePrototype,"then",(function(e,t){var n=this;return new PromiseConstructor((function(e,t){nativeThen.call(n,e,t)})).then(e,t)}),{unsafe:!0}),redefine(NativePromisePrototype,"catch",PromiseConstructorPrototype.catch,{unsafe:!0}));try{delete NativePromisePrototype.constructor}catch(e){}objectSetPrototypeOf&&objectSetPrototypeOf(NativePromisePrototype,PromiseConstructorPrototype)}_export({global:!0,wrap:!0,forced:FORCED$6},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE),PromiseWrapper=getBuiltIn(PROMISE),_export({target:PROMISE,stat:!0,forced:FORCED$6},{reject:function(e){var t=newPromiseCapability(this);return t.reject.call(void 0,e),t.promise}}),_export({target:PROMISE,stat:!0,forced:FORCED$6},{resolve:function(e){return promiseResolve(this,e)}}),_export({target:PROMISE,stat:!0,forced:INCORRECT_ITERATION},{all:function(e){var t=this,n=newPromiseCapability(t),r=n.resolve,i=n.reject,a=perform((function(){var n=aFunction(t.resolve),a=[],o=0,s=1;iterate(e,(function(e){var c=o++,l=!1;a.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,a[c]=e,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise},race:function(e){var t=this,n=newPromiseCapability(t),r=n.reject,i=perform((function(){var i=aFunction(t.resolve);iterate(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var inheritIfRequired=function(e,t,n){var r,i;return objectSetPrototypeOf&&"function"==typeof(r=t.constructor)&&r!==n&&isObject(i=r.prototype)&&i!==n.prototype&&objectSetPrototypeOf(e,i),e},objectKeys=Object.keys||function(e){return objectKeysInternal(e,enumBugKeys)},objectDefineProperties=descriptors?Object.defineProperties:function(e,t){anObject(e);for(var n,r=objectKeys(t),i=r.length,a=0;i>a;)objectDefineProperty.f(e,n=r[a++],t[n]);return e},GT=">",LT="<",PROTOTYPE$1="prototype",SCRIPT="script",IE_PROTO$1=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e,t=documentCreateElement("iframe"),n="java"+SCRIPT+":";if(t.style)return t.style.display="none",html.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F},activeXDocument,NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject=document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame()||NullProtoObjectViaActiveX(activeXDocument);for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE$1][enumBugKeys[e]];return NullProtoObject()};hiddenKeys$1[IE_PROTO$1]=!0;var objectCreate=Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE$1]=anObject(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE$1]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:objectDefineProperties(n,t)},toString=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a string");return String(e)}
319,whitespaces="\t\n\v\f\r  áââââââ
ââââââ¯âã\u2028\u2029\ufeff",whitespace="["+whitespaces+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod$4=function(e){return function(t){var n=toString(requireObjectCoercible(t));return 1&e&&(n=n.replace(ltrim,"")),2&e&&(n=n.replace(rtrim,"")),n}},stringTrim={start:createMethod$4(1),end:createMethod$4(2),trim:createMethod$4(3)},getOwnPropertyNames$1=objectGetOwnPropertyNames.f,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,defineProperty$4=objectDefineProperty.f,trim=stringTrim.trim,NUMBER="Number",NativeNumber=global$1[NUMBER],NumberPrototype=NativeNumber.prototype,BROKEN_CLASSOF=classofRaw(objectCreate(NumberPrototype))==NUMBER,toNumber=function(e){if(isSymbol(e))throw TypeError("Cannot convert a Symbol value to a number");var t,n,r,i,a,o,s,c,l=toPrimitive(e,"number");if("string"==typeof l&&l.length>2)if(43===(t=(l=trim(l)).charCodeAt(0))||45===t){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+l}for(o=(a=l.slice(2)).length,s=0;s<o;s++)if((c=a.charCodeAt(s))<48||c>i)return NaN;return parseInt(a,r)}return+l};if(isForced_1(NUMBER,!NativeNumber(" 0o1")||!NativeNumber("0b1")||NativeNumber("+0x1"))){for(var NumberWrapper=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof NumberWrapper&&(BROKEN_CLASSOF?fails((function(){NumberPrototype.valueOf.call(n)})):classofRaw(n)!=NUMBER)?inheritIfRequired(new NativeNumber(toNumber(t)),n,NumberWrapper):toNumber(t)},keys$1=descriptors?getOwnPropertyNames$1(NativeNumber):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),j$1=0,key$1;keys$1.length>j$1;j$1++)has$1(NativeNumber,key$1=keys$1[j$1])&&!has$1(NumberWrapper,key$1)&&defineProperty$4(NumberWrapper,key$1,getOwnPropertyDescriptor$1(NativeNumber,key$1));NumberWrapper.prototype=NumberPrototype,NumberPrototype.constructor=NumberWrapper,redefine(global$1,NUMBER,NumberWrapper)}var defineProperty$3=objectDefineProperty.f,FunctionPrototype=Function.prototype,FunctionPrototypeToString=FunctionPrototype.toString,nameRE=/^\s*function ([^ (]*)/,NAME$1="name";descriptors&&!(NAME$1 in FunctionPrototype)&&defineProperty$3(FunctionPrototype,NAME$1,{configurable:!0,get:function(){try{return FunctionPrototypeToString.call(this).match(nameRE)[1]}catch(e){return""}}}),_export({global:!0},{globalThis:global$1});var $assign=Object.assign,defineProperty$2=Object.defineProperty,objectAssign=!$assign||fails((function(){if(descriptors&&1!==$assign({b:1},$assign(defineProperty$2({},"a",{enumerable:!0,get:function(){defineProperty$2(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[n]||"abcdefghijklmnopqrst"!=objectKeys($assign({},t)).join("")}))?function(e,t){for(var n=toObject(e),r=arguments.length,i=1,a=objectGetOwnPropertySymbols.f,o=objectPropertyIsEnumerable.f;r>i;)for(var s,c=indexedObject(arguments[i++]),l=a?objectKeys(c).concat(a(c)):objectKeys(c),u=l.length,d=0;u>d;)s=l[d++],descriptors&&!o.call(c,s)||(n[s]=c[s]);return n}:$assign;_export({target:"Object",stat:!0,forced:Object.assign!==objectAssign},{assign:objectAssign});var path=global$1;path.Object.assign;var regexpFlags=function(){var e=anObject(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},RE=function(e,t){return RegExp(e,t)},UNSUPPORTED_Y$2=fails((function(){var e=RE("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET=fails((function(){var e=RE("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),regexpStickyHelpers={UNSUPPORTED_Y:UNSUPPORTED_Y$2,BROKEN_CARET:BROKEN_CARET},regexpUnsupportedDotAll=fails((function(){var e=RegExp(".","string".charAt(0));return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),regexpUnsupportedNcg=fails((function(){var e=RegExp("(?<a>b)","string".charAt(5));return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),getInternalState$3=internalState.get,nativeExec=RegExp.prototype.exec,nativeReplace=shared("native-string-replace",String.prototype.replace),patchedExec=nativeExec,UPDATES_LAST_INDEX_WRONG=(re1=/a/,re2=/b*/g,nativeExec.call(re1,"a"),nativeExec.call(re2,"a"),0!==re1.lastIndex||0!==re2.lastIndex),re1,re2,UNSUPPORTED_Y$1=regexpStickyHelpers.UNSUPPORTED_Y||regexpStickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||regexpUnsupportedDotAll||regexpUnsupportedNcg;PATCH&&(patchedExec=function(e){var t,n,r,i,a,o,s,c=this,l=getInternalState$3(c),u=toString(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=patchedExec.call(d,u),c.lastIndex=d.lastIndex,t;var p=l.groups,h=UNSUPPORTED_Y$1&&c.sticky,f=regexpFlags.call(c),m=c.source,g=0,y=u;if(h&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),y=u.slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==u.charAt(c.lastIndex-1))&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",f)),NPCG_INCLUDED&&(n=new RegExp("^"+m+"$(?!\\s)",f)),UPDATES_LAST_INDEX_WRONG&&(r=c.lastIndex),i=nativeExec.call(h?n:c,y),h?i?(i.input=i.input.slice(g),i[0]=i[0].slice(g),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(c.lastIndex=c.global?i.index+i[0].length:r),NPCG_INCLUDED&&i&&i.length>1&&nativeReplace.call(i[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=objectCreate(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var regexpExec=patchedExec;_export({target:"RegExp",proto:!0,forced:/./.exec!==regexpExec},{exec:regexpExec});var SPECIES$3=wellKnownSymbol("species"),RegExpPrototype$1=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(e,t,n,r){var i=wellKnownSymbol(e),a=!fails((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!fails((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={}
319,n.constructor[SPECIES$3]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t}));if(!a||!o||n){var s=/./[i],c=t(i,""[e],(function(e,t,n,r,i){var o=t.exec;return o===regexpExec||o===RegExpPrototype$1.exec?a&&!i?{done:!0,value:s.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}));redefine(String.prototype,e,c[0]),redefine(RegExpPrototype$1,i,c[1])}r&&createNonEnumerableProperty(RegExpPrototype$1[i],"sham",!0)},MATCH$1=wellKnownSymbol("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classofRaw(e))},createMethod$3=function(e){return function(t,n){var r,i,a=toString(requireObjectCoercible(t)),o=toInteger(n),s=a.length;return o<0||o>=s?e?"":void 0:(r=a.charCodeAt(o))<55296||r>56319||o+1===s||(i=a.charCodeAt(o+1))<56320||i>57343?e?a.charAt(o):r:e?a.slice(o,o+2):i-56320+(r-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$3(!1),charAt:createMethod$3(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex=function(e,t,n){return t+(n?charAt$1(e,t).length:1)},regexpExecAbstract=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==classofRaw(e))throw TypeError("RegExp#exec called on incompatible receiver");return regexpExec.call(e,t)},UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,arrayPush=[].push,min$4=Math.min,MAX_UINT32=4294967295,SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));fixRegexpWellKnownSymbolLogic("split",(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=toString(requireObjectCoercible(this)),i=void 0===n?MAX_UINT32:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!isRegexp(e))return t.call(r,e,i);for(var a,o,s,c=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,d=new RegExp(e.source,l+"g");(a=regexpExec.call(d,r))&&!((o=d.lastIndex)>u&&(c.push(r.slice(u,a.index)),a.length>1&&a.index<r.length&&arrayPush.apply(c,a.slice(1)),s=a[0].length,u=o,c.length>=i));)d.lastIndex===a.index&&d.lastIndex++;return u===r.length?!s&&d.test("")||c.push(""):c.push(r.slice(u)),c.length>i?c.slice(0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=requireObjectCoercible(this),a=null==t?void 0:t[e];return void 0!==a?a.call(t,i,n):r.call(toString(i),t,n)},function(e,i){var a=anObject(this),o=toString(e),s=n(r,a,o,i,r!==t);if(s.done)return s.value;var c=speciesConstructor(a,RegExp),l=a.unicode,u=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),d=new c(UNSUPPORTED_Y?"^(?:"+a.source+")":a,u),p=void 0===i?MAX_UINT32:i>>>0;if(0===p)return[];if(0===o.length)return null===regexpExecAbstract(d,o)?[o]:[];for(var h=0,f=0,m=[];f<o.length;){d.lastIndex=UNSUPPORTED_Y?0:f;var g,y=regexpExecAbstract(d,UNSUPPORTED_Y?o.slice(f):o);if(null===y||(g=min$4(toLength(d.lastIndex+(UNSUPPORTED_Y?f:0)),o.length))===h)f=advanceStringIndex(o,f,l);else{if(m.push(o.slice(h,f)),m.length===p)return m;for(var b=1;b<=y.length-1;b++)if(m.push(y[b]),m.length===p)return m;f=h=g}}return m.push(o.slice(h)),m}]}),!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y),fixRegexpWellKnownSymbolLogic("match",(function(e,t,n){return[function(t){var n=requireObjectCoercible(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](toString(n))},function(e){var r=anObject(this),i=toString(e),a=n(t,r,i);if(a.done)return a.value;if(!r.global)return regexpExecAbstract(r,i);var o=r.unicode;r.lastIndex=0;for(var s,c=[],l=0;null!==(s=regexpExecAbstract(r,i));){var u=toString(s[0]);c[l]=u,""===u&&(r.lastIndex=advanceStringIndex(i,toLength(r.lastIndex),o)),l++}return 0===l?null:c}]}));var UNSCOPABLES=wellKnownSymbol("unscopables"),ArrayPrototype=Array.prototype;null==ArrayPrototype[UNSCOPABLES]&&objectDefineProperty.f(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:objectCreate(null)});var addToUnscopables=function(e){ArrayPrototype[UNSCOPABLES][e]=!0},correctPrototypeGetter=!fails((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),IE_PROTO=sharedKey("IE_PROTO"),ObjectPrototype$2=Object.prototype,objectGetPrototypeOf=correctPrototypeGetter?Object.getPrototypeOf:function(e){return e=toObject(e),has$1(e,IE_PROTO)?e[IE_PROTO]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectPrototype$2:null},ITERATOR$5=wellKnownSymbol("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,returnThis$2=function(){return this},IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;[].keys&&(arrayIterator=[].keys(),"next"in arrayIterator?(PrototypeOfArrayIteratorPrototype=objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator)),PrototypeOfArrayIteratorPrototype!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype)):BUGGY_SAFARI_ITERATORS$1=!0);var NEW_ITERATOR_PROTOTYPE=null==IteratorPrototype$2||fails((function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e}));NEW_ITERATOR_PROTOTYPE&&(IteratorPrototype$2={}),has$1(IteratorPrototype$2,ITERATOR$5)||createNonEnumerableProperty(IteratorPrototype$2,ITERATOR$5,returnThis$2);var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1},IteratorPrototype$1=iteratorsCore.IteratorPrototype,returnThis$1=function(){return this},createIteratorConstructor=function(e,t,n){var r=t+" Iterator";return e.prototype=objectCreate(IteratorPrototype$1,{next:createPropertyDescriptor(1,n)}),setToStringTag(e,r,!1),iterators[r]=returnThis$1,e},IteratorPrototype=iteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=iteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol("iterator"),KEYS="keys",VALUES="values",ENTRIES="entr
319ies",returnThis=function(){return this},defineIterator=function(e,t,n,r,i,a,o){createIteratorConstructor(n,t,r);var s,c,l,u=function(e){if(e===i&&m)return m;if(!BUGGY_SAFARI_ITERATORS&&e in h)return h[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",p=!1,h=e.prototype,f=h[ITERATOR$4]||h["@@iterator"]||i&&h[i],m=!BUGGY_SAFARI_ITERATORS&&f||u(i),g="Array"==t&&h.entries||f;if(g&&(s=objectGetPrototypeOf(g.call(new e)),IteratorPrototype!==Object.prototype&&s.next&&(objectGetPrototypeOf(s)!==IteratorPrototype&&(objectSetPrototypeOf?objectSetPrototypeOf(s,IteratorPrototype):"function"!=typeof s[ITERATOR$4]&&createNonEnumerableProperty(s,ITERATOR$4,returnThis)),setToStringTag(s,d,!0))),i==VALUES&&f&&f.name!==VALUES&&(p=!0,m=function(){return f.call(this)}),h[ITERATOR$4]!==m&&createNonEnumerableProperty(h,ITERATOR$4,m),iterators[t]=m,i)if(c={values:u(VALUES),keys:a?m:u(KEYS),entries:u(ENTRIES)},o)for(l in c)(BUGGY_SAFARI_ITERATORS||p||!(l in h))&&redefine(h,l,c[l]);else _export({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},c);return c},ARRAY_ITERATOR="Array Iterator",setInternalState$4=internalState.set,getInternalState$2=internalState.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",(function(e,t){setInternalState$4(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})}),(function(){var e=getInternalState$2(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");iterators.Arguments=iterators.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var arrayBufferNative="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,defineProperty$1=objectDefineProperty.f,Int8Array$3=global$1.Int8Array,Int8ArrayPrototype=Int8Array$3&&Int8Array$3.prototype,Uint8ClampedArray=global$1.Uint8ClampedArray,Uint8ClampedArrayPrototype=Uint8ClampedArray&&Uint8ClampedArray.prototype,TypedArray=Int8Array$3&&objectGetPrototypeOf(Int8Array$3),TypedArrayPrototype=Int8ArrayPrototype&&objectGetPrototypeOf(Int8ArrayPrototype),ObjectPrototype$1=Object.prototype,isPrototypeOf=ObjectPrototype$1.isPrototypeOf,TO_STRING_TAG$1=wellKnownSymbol("toStringTag"),TYPED_ARRAY_TAG=uid("TYPED_ARRAY_TAG"),TYPED_ARRAY_CONSTRUCTOR$1=uid("TYPED_ARRAY_CONSTRUCTOR"),NATIVE_ARRAY_BUFFER_VIEWS$1=arrayBufferNative&&!!objectSetPrototypeOf&&"Opera"!==classof(global$1.opera),TYPED_ARRAY_TAG_REQIRED=!1,NAME,Constructor,Prototype,TypedArrayConstructorsList={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BigIntArrayConstructorsList={BigInt64Array:8,BigUint64Array:8},isView=function(e){if(!isObject(e))return!1;var t=classof(e);return"DataView"===t||has$1(TypedArrayConstructorsList,t)||has$1(BigIntArrayConstructorsList,t)},isTypedArray=function(e){if(!isObject(e))return!1;var t=classof(e);return has$1(TypedArrayConstructorsList,t)||has$1(BigIntArrayConstructorsList,t)},aTypedArray$m=function(e){if(isTypedArray(e))return e;throw TypeError("Target is not a typed array")},aTypedArrayConstructor$2=function(e){if(objectSetPrototypeOf&&!isPrototypeOf.call(TypedArray,e))throw TypeError("Target is not a typed array constructor");return e},exportTypedArrayMethod$n=function(e,t,n){if(descriptors){if(n)for(var r in TypedArrayConstructorsList){var i=global$1[r];if(i&&has$1(i.prototype,e))try{delete i.prototype[e]}catch(e){}}TypedArrayPrototype[e]&&!n||redefine(TypedArrayPrototype,e,n?t:NATIVE_ARRAY_BUFFER_VIEWS$1&&Int8ArrayPrototype[e]||t)}},exportTypedArrayStaticMethod=function(e,t,n){var r,i;if(descriptors){if(objectSetPrototypeOf){if(n)for(r in TypedArrayConstructorsList)if((i=global$1[r])&&has$1(i,e))try{delete i[e]}catch(e){}if(TypedArray[e]&&!n)return;try{return redefine(TypedArray,e,n?t:NATIVE_ARRAY_BUFFER_VIEWS$1&&TypedArray[e]||t)}catch(e){}}for(r in TypedArrayConstructorsList)!(i=global$1[r])||i[e]&&!n||redefine(i,e,t)}};for(NAME in TypedArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype?createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor):NATIVE_ARRAY_BUFFER_VIEWS$1=!1;for(NAME in BigIntArrayConstructorsList)Constructor=global$1[NAME],Prototype=Constructor&&Constructor.prototype,Prototype&&createNonEnumerableProperty(Prototype,TYPED_ARRAY_CONSTRUCTOR$1,Constructor);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||"function"!=typeof TypedArray||TypedArray===Function.prototype)&&(TypedArray=function(){throw TypeError("Incorrect invocation")},NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME],TypedArray);if((!NATIVE_ARRAY_BUFFER_VIEWS$1||!TypedArrayPrototype||TypedArrayPrototype===ObjectPrototype$1)&&(TypedArrayPrototype=TypedArray.prototype,NATIVE_ARRAY_BUFFER_VIEWS$1))for(NAME in TypedArrayConstructorsList)global$1[NAME]&&objectSetPrototypeOf(global$1[NAME].prototype,TypedArrayPrototype);if(NATIVE_ARRAY_BUFFER_VIEWS$1&&objectGetPrototypeOf(Uint8ClampedArrayPrototype)!==TypedArrayPrototype&&objectSetPrototypeOf(Uint8ClampedArrayPrototype,TypedArrayPrototype),descriptors&&!has$1(TypedArrayPrototype,TO_STRING_TAG$1))for(NAME in TYPED_ARRAY_TAG_REQIRED=!0,defineProperty$1(TypedArrayPrototype,TO_STRING_TAG$1,{get:function(){return isObject(this)?this[TYPED_ARRAY_TAG]:void 0}}),TypedArrayConstructorsList)global$1[NAME]&&createNonEnumerableProperty(global$1[NAME],TYPED_ARRAY_TAG,NAME);var arrayBufferViewCore={NATIVE_ARRAY_BUFFER_VIEWS:NATIVE_ARRAY_BUFFER_VIEWS$1,TYPED_ARRAY_CONSTRUCTOR:TYPED_ARRAY_CONSTRUCTOR$1,TYPED_ARRAY_TAG:TYPED_ARRAY_TAG_REQIRED&&TYPED_ARRAY_TAG,aTypedArray:aTypedArray$m,aTypedArrayConstructor:aTypedArrayConstructor$2,exp
vendor: 10,377 bytes, line 319
319ortTypedArrayMethod:exportTypedArrayMethod$n,exportTypedArrayStaticMethod:exportTypedArrayStaticMethod,isView:isView,isTypedArray:isTypedArray,TypedArray:TypedArray,TypedArrayPrototype:TypedArrayPrototype},NATIVE_ARRAY_BUFFER_VIEWS=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,ArrayBuffer$1=global$1.ArrayBuffer,Int8Array$2=global$1.Int8Array,typedArrayConstructorsRequireWrappers=!NATIVE_ARRAY_BUFFER_VIEWS||!fails((function(){Int8Array$2(1)}))||!fails((function(){new Int8Array$2(-1)}))||!checkCorrectnessOfIteration((function(e){new Int8Array$2,new Int8Array$2(null),new Int8Array$2(1.5),new Int8Array$2(e)}),!0)||fails((function(){return 1!==new Int8Array$2(new ArrayBuffer$1(2),1,void 0).length})),toIndex=function(e){if(void 0===e)return 0;var t=toInteger(e),n=toLength(t);if(t!==n)throw RangeError("Wrong length or index");return n},abs=Math.abs,pow$1=Math.pow,floor$6=Math.floor,log=Math.log,LN2=Math.LN2,pack=function(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,c=(1<<s)-1,l=c>>1,u=23===t?pow$1(2,-24)-pow$1(2,-77):0,d=e<0||0===e&&1/e<0?1:0,p=0;for((e=abs(e))!=e||e===1/0?(i=e!=e?1:0,r=c):(r=floor$6(log(e)/LN2),e*(a=pow$1(2,-r))<1&&(r--,a*=2),(e+=r+l>=1?u/a:u*pow$1(2,1-l))*a>=2&&(r++,a/=2),r+l>=c?(i=0,r=c):r+l>=1?(i=(e*a-1)*pow$1(2,t),r+=l):(i=e*pow$1(2,l-1)*pow$1(2,t),r=0));t>=8;o[p++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[p++]=255&r,r/=256,s-=8);return o[--p]|=128*d,o},unpack=function(e,t){var n,r=e.length,i=8*r-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=r-1,l=e[c--],u=127&l;for(l>>=7;s>0;u=256*u+e[c],c--,s-=8);for(n=u&(1<<-s)-1,u>>=-s,s+=t;s>0;n=256*n+e[c],c--,s-=8);if(0===u)u=1-o;else{if(u===a)return n?NaN:l?-1/0:1/0;n+=pow$1(2,t),u-=o}return(l?-1:1)*n*pow$1(2,u-t)},ieee754={pack:pack,unpack:unpack},arrayFill=function(e){for(var t=toObject(this),n=toLength(t.length),r=arguments.length,i=toAbsoluteIndex(r>1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,o=void 0===a?n:toAbsoluteIndex(a,n);o>i;)t[i++]=e;return t},getOwnPropertyNames=objectGetOwnPropertyNames.f,defineProperty=objectDefineProperty.f,getInternalState$1=internalState.get,setInternalState$3=internalState.set,ARRAY_BUFFER="ArrayBuffer",DATA_VIEW="DataView",PROTOTYPE="prototype",WRONG_LENGTH="Wrong length",WRONG_INDEX="Wrong index",NativeArrayBuffer=global$1[ARRAY_BUFFER],$ArrayBuffer=NativeArrayBuffer,$DataView=global$1[DATA_VIEW],$DataViewPrototype=$DataView&&$DataView[PROTOTYPE],ObjectPrototype=Object.prototype,RangeError$1=global$1.RangeError,packIEEE754=ieee754.pack,unpackIEEE754=ieee754.unpack,packInt8=function(e){return[255&e]},packInt16=function(e){return[255&e,e>>8&255]},packInt32=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},unpackInt32=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},packFloat32=function(e){return packIEEE754(e,23,4)},packFloat64=function(e){return packIEEE754(e,52,8)},addGetter=function(e,t){defineProperty(e[PROTOTYPE],t,{get:function(){return getInternalState$1(this)[t]}})},get=function(e,t,n,r){var i=toIndex(n),a=getInternalState$1(e);if(i+t>a.byteLength)throw RangeError$1(WRONG_INDEX);var o=getInternalState$1(a.buffer).bytes,s=i+a.byteOffset,c=o.slice(s,s+t);return r?c:c.reverse()},set=function(e,t,n,r,i,a){var o=toIndex(n),s=getInternalState$1(e);if(o+t>s.byteLength)throw RangeError$1(WRONG_INDEX);for(var c=getInternalState$1(s.buffer).bytes,l=o+s.byteOffset,u=r(+i),d=0;d<t;d++)c[l+d]=u[a?d:t-d-1]};if(arrayBufferNative){if(!fails((function(){NativeArrayBuffer(1)}))||!fails((function(){new NativeArrayBuffer(-1)}))||fails((function(){return new NativeArrayBuffer,new NativeArrayBuffer(1.5),new NativeArrayBuffer(NaN),NativeArrayBuffer.name!=ARRAY_BUFFER}))){$ArrayBuffer=function(e){return anInstance(this,$ArrayBuffer),new NativeArrayBuffer(toIndex(e))};for(var ArrayBufferPrototype=$ArrayBuffer[PROTOTYPE]=NativeArrayBuffer[PROTOTYPE],keys=getOwnPropertyNames(NativeArrayBuffer),j$2=0,key;keys.length>j$2;)(key=keys[j$2++])in $ArrayBuffer||createNonEnumerableProperty($ArrayBuffer,key,NativeArrayBuffer[key]);ArrayBufferPrototype.constructor=$ArrayBuffer}objectSetPrototypeOf&&objectGetPrototypeOf($DataViewPrototype)!==ObjectPrototype&&objectSetPrototypeOf($DataViewPrototype,ObjectPrototype);var testView=new $DataView(new $ArrayBuffer(2)),$setInt8=$DataViewPrototype.setInt8;testView.setInt8(0,2147483648),testView.setInt8(1,2147483649),!testView.getInt8(0)&&testView.getInt8(1)||redefineAll($DataViewPrototype,{setInt8:function(e,t){$setInt8.call(this,e,t<<24>>24)},setUint8:function(e,t){$setInt8.call(this,e,t<<24>>24)}},{unsafe:!0})}else $ArrayBuffer=function(e){anInstance(this,$ArrayBuffer,ARRAY_BUFFER);var t=toIndex(e);setInternalState$3(this,{bytes:arrayFill.call(new Array(t),0),byteLength:t}),descriptors||(this.byteLength=t)},$DataView=function(e,t,n){anInstance(this,$DataView,DATA_VIEW),anInstance(e,$ArrayBuffer,DATA_VIEW);var r=getInternalState$1(e).byteLength,i=toInteger(t);if(i<0||i>r)throw RangeError$1("Wrong offset");if(i+(n=void 0===n?r-i:toLength(n))>r)throw RangeError$1(WRONG_LENGTH);setInternalState$3(this,{buffer:e,byteLength:n,byteOffset:i}),descriptors||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},descriptors&&(addGetter($ArrayBuffer,"byteLength"),addGetter($DataView,"buffer"),addGetter($DataView,"byteLength"),addGetter($DataView,"byteOffset")),redefineAll($DataView[PROTOTYPE],{getInt8:function(e){return get(this,1,e)[0]<<24>>24},getUint8:function(e){return get(this,1,e)[0]},getInt16:function(e){var t=get(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=get(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return unpackInt32(get(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return unpackIEEE754(get(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return unpackIEEE754(get(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){set(this,1,e,packInt8,t)},setUint8:function(e,t){set(this,1,e,packInt8,t)},setInt16:function(e,t){set(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){set(this,2,e,packInt16,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){set(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){set(this,4,e,packInt32,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){set(this,4,e,packFloat32,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){set(this,8,e,packFloat64,t,arguments.length>2?arguments[2]:void 0)}});setToStringTag($ArrayBuffer,ARRAY_BUFFER),setToStringTag($DataView,DATA_VIEW);var arrayBuffer={ArrayBuffer:$ArrayBuffer,DataView:$DataView},floor$5=Math.floor,isInteger=function(e){return!isObject(e)&&isFinite(e)&&floor$5(e)===e},toPositiveInteger=function(e){var t=toInteger(e);if(t<0)throw RangeError("The argument can't be less than 0");return t},toOffset=function(e,t){var n=toPositiveInteger(e);if(n%t)throw RangeError("Wrong offset");return n},aTypedArrayConstructor$1=arrayBufferViewCore.aTypedArrayConstructor,typedArrayFrom=function(e){var t,n,r,i,a,o,s=toObject(e),c=arguments.length,l=c>1?arguments[1]:void 0,u=void 0!==l,d=getIteratorMethod(s);if(null!=d&&!isArrayIteratorMethod(d))for(o=(a=d.call(s)).next,s=[];!(i=o.call(a)).done;)s.push(i.value);for(u&&c>2&&(l=functionBindContext(l,arguments[2],2)),n=toLength(s.length),r=new(aTypedArrayConstructor$1(this))(n),t=0;n>t;t++)r[t]=u?l(s[t],t):s[t];return r},isArray=Array.isArray||function(e){return"Array"==classofRaw(e)},SPECIES$2=wellKnownSymbol("species"),arraySpeciesConstructor=function(e){var t;return isArray(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!isArray(t.prototype)?isObject(t)&&null===(t=t[SPECIES$2])&&(t=void 0):t=void 0),void 0===t?Array:t},arraySpeciesCreate=function(e,t){return new(arraySpeciesConstructor(e))(0===t?0:t)},push=[].push,createMethod$2=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,l,u,d){for(var p,h,f=toObject(c),m=indexedObject(f),g=functionBindContext(l,u,3),y=toLength(m.length),b=0,v=d||arraySpeciesCreate,A=t?v(c,y):n||o?v(c,0):void 0;y>b;b++)if((s||b in m)&&(h=g(p=m[b],b,f),e))if(t)A[b]=h;else if(h)switch(e){case 3:return!0;case 5:return p;case 6:return b;case 2:push.call(A,p)}else switch(e){case 4:return!1;case 7:push.call(A,p)}return a?-1:r||i?i:A}},arrayIteration={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterReject:createMethod$2(7)},typedArrayConstructor=createCommonjsModule((function(e){var t=objectGetOwnPropertyNames.f,n=arrayIteration.forEach,r=internalState.get,i=internalState.set,a=objectDefineProperty.f,o=objectGetOwnPropertyDescriptor.f,s=Math.round,c=global$1.RangeError,l=arrayBuffer.ArrayBuffer,u=arrayBuffer.DataView,d=arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS,p=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,h=arrayBufferViewCore.TYPED_ARRAY_TAG,f=arrayBufferViewCore.TypedArray,m=arrayBufferViewCore.TypedArrayPrototype,g=arrayBufferViewCore.aTypedArrayConstructor,y=arrayBufferViewCore.isTypedArray,b=function(e,t){for(var n=0,r=t.length,i=new(g(e))(r);r>n;)i[n]=t[n++];return i},v=function(e,t){a(e,t,{get:function(){return r(this)[t]}})},A=function(e){var t;return e instanceof l||"ArrayBuffer"==(t=classof(e))||"SharedArrayBuffer"==t},_=function(e,t){return y(e)&&!isSymbol(t)&&t in e&&isInteger(+t)&&t>=0},x=function(e,t){return t=toPropertyKey(t),_(e,t)?createPropertyDescriptor(2,e[t]):o(e,t)},k=function(e,t,n){return t=toPropertyKey(t),!(_(e,t)&&isObject(n)&&has$1(n,"value"))||has$1(n,"get")||has$1(n,"set")||n.configurable||has$1(n,"writable")&&!n.writable||has$1(n,"enumerable")&&!n.enumerable?a(e,t,n):(e[t]=n.value,e)};descriptors?(d||(objectGetOwnPropertyDescriptor.f=x,objectDefineProperty.f=k,v(m,"buffer"),v(m,"byteOffset"),v(m,"byteLength"),v(m,"length")),_export({target:"Object",stat:!0,forced:!d},{getOwnPropertyDescriptor:x,defineProperty:k}),e.exports=function(e,o,g){var v=e.match(/\d+$/)[0]/8,_=e+(g?"Clamped":"")+"Array",x="get"+e,k="set"+e,w=global$1[_],T=w,S=T&&T.prototype,C={},I=function(e,t){a(e,t,{get:function(){return function(e,t){var n=r(e);return n.view[x](t*v+n.byteOffset,!0)}(this,t)}
319,set:function(e){return function(e,t,n){var i=r(e);g&&(n=(n=s(n))<0?0:n>255?255:255&n),i.view[k](t*v+i.byteOffset,n,!0)}(this,t,e)},enumerable:!0})};d?typedArrayConstructorsRequireWrappers&&(T=o((function(e,t,n,r){return anInstance(e,T,_),inheritIfRequired(isObject(t)?A(t)?void 0!==r?new w(t,toOffset(n,v),r):void 0!==n?new w(t,toOffset(n,v)):new w(t):y(t)?b(T,t):typedArrayFrom.call(T,t):new w(toIndex(t)),e,T)})),objectSetPrototypeOf&&objectSetPrototypeOf(T,f),n(t(w),(function(e){e in T||createNonEnumerableProperty(T,e,w[e])})),T.prototype=S):(T=o((function(e,t,n,r){anInstance(e,T,_);var a,o,s,d=0,p=0;if(isObject(t)){if(!A(t))return y(t)?b(T,t):typedArrayFrom.call(T,t);a=t,p=toOffset(n,v);var h=t.byteLength;if(void 0===r){if(h%v)throw c("Wrong length");if((o=h-p)<0)throw c("Wrong length")}else if((o=toLength(r)*v)+p>h)throw c("Wrong length");s=o/v}else s=toIndex(t),a=new l(o=s*v);for(i(e,{buffer:a,byteOffset:p,byteLength:o,length:s,view:new u(a)});d<s;)I(e,d++)})),objectSetPrototypeOf&&objectSetPrototypeOf(T,f),S=T.prototype=objectCreate(m)),S.constructor!==T&&createNonEnumerableProperty(S,"constructor",T),createNonEnumerableProperty(S,p,T),h&&createNonEnumerableProperty(S,h,_),C[_]=T,_export({global:!0,forced:T!=w,sham:!d},C),"BYTES_PER_ELEMENT"in T||createNonEnumerableProperty(T,"BYTES_PER_ELEMENT",v),"BYTES_PER_ELEMENT"in S||createNonEnumerableProperty(S,"BYTES_PER_ELEMENT",v),setSpecies(_)}):e.exports=function(){}}));typedArrayConstructor("Uint8",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var min$3=Math.min,arrayCopyWithin=[].copyWithin||function(e,t){var n=toObject(this),r=toLength(n.length),i=toAbsoluteIndex(e,r),a=toAbsoluteIndex(t,r),o=arguments.length>2?arguments[2]:void 0,s=min$3((void 0===o?r:toAbsoluteIndex(o,r))-a,r-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in n?n[i]=n[a]:delete n[i],i+=c,a+=c;return n},aTypedArray$l=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$m=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$m("copyWithin",(function(e,t){return arrayCopyWithin.call(aTypedArray$l(this),e,t,arguments.length>2?arguments[2]:void 0)}));var $every=arrayIteration.every,aTypedArray$k=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$l=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$l("every",(function(e){return $every(aTypedArray$k(this),e,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$j=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$k=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$k("fill",(function(e){return arrayFill.apply(aTypedArray$j(this),arguments)}));var arrayFromConstructorAndList=function(e,t){for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},TYPED_ARRAY_CONSTRUCTOR=arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR,aTypedArrayConstructor=arrayBufferViewCore.aTypedArrayConstructor,typedArraySpeciesConstructor=function(e){return aTypedArrayConstructor(speciesConstructor(e,e[TYPED_ARRAY_CONSTRUCTOR]))},typedArrayFromSpeciesAndList=function(e,t){return arrayFromConstructorAndList(typedArraySpeciesConstructor(e),t)},$filter$1=arrayIteration.filter,aTypedArray$i=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$j=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$j("filter",(function(e){var t=$filter$1(aTypedArray$i(this),e,arguments.length>1?arguments[1]:void 0);return typedArrayFromSpeciesAndList(this,t)}));var $find=arrayIteration.find,aTypedArray$h=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$i=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$i("find",(function(e){return $find(aTypedArray$h(this),e,arguments.length>1?arguments[1]:void 0)}));var $findIndex=arrayIteration.findIndex,aTypedArray$g=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$h=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$h("findIndex",(function(e){return $findIndex(aTypedArray$g(this),e,arguments.length>1?arguments[1]:void 0)}));var $forEach$1=arrayIteration.forEach,aTypedArray$f=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$g=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$g("forEach",(function(e){$forEach$1(aTypedArray$f(this),e,arguments.length>1?arguments[1]:void 0)}));var $includes=arrayIncludes.includes,aTypedArray$e=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$f=
319arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$f("includes",(function(e){return $includes(aTypedArray$e(this),e,arguments.length>1?arguments[1]:void 0)}));var $indexOf=arrayIncludes.indexOf,aTypedArray$d=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$e=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$e("indexOf",(function(e){return $indexOf(aTypedArray$d(this),e,arguments.length>1?arguments[1]:void 0)}));var ITERATOR$3=wellKnownSymbol("iterator"),Uint8Array$2=global$1.Uint8Array,arrayValues=es_array_iterator.values,arrayKeys=es_array_iterator.keys,arrayEntries=es_array_iterator.entries,aTypedArray$c=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$d=arrayBufferViewCore.exportTypedArrayMethod,nativeTypedArrayIterator=Uint8Array$2&&Uint8Array$2.prototype[ITERATOR$3],CORRECT_ITER_NAME=!!nativeTypedArrayIterator&&("values"==nativeTypedArrayIterator.name||null==nativeTypedArrayIterator.name),typedArrayValues=function(){return arrayValues.call(aTypedArray$c(this))};exportTypedArrayMethod$d("entries",(function(){return arrayEntries.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("keys",(function(){return arrayKeys.call(aTypedArray$c(this))})),exportTypedArrayMethod$d("values",typedArrayValues,!CORRECT_ITER_NAME),exportTypedArrayMethod$d(ITERATOR$3,typedArrayValues,!CORRECT_ITER_NAME);var aTypedArray$b=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$c=arrayBufferViewCore.exportTypedArrayMethod,$join=[].join;exportTypedArrayMethod$c("join",(function(e){return $join.apply(aTypedArray$b(this),arguments)}));var arrayMethodIsStrict=function(e,t){var n=[][e];return!!n&&fails((function(){n.call(null,t||function(){throw 1},1)}))},min$2=Math.min,$lastIndexOf=[].lastIndexOf,NEGATIVE_ZERO=!!$lastIndexOf&&1/[1].lastIndexOf(1,-0)<0,STRICT_METHOD$2=arrayMethodIsStrict("lastIndexOf"),FORCED$5=NEGATIVE_ZERO||!STRICT_METHOD$2,arrayLastIndexOf=FORCED$5?function(e){if(NEGATIVE_ZERO)return $lastIndexOf.apply(this,arguments)||0;var t=toIndexedObject(this),n=toLength(t.length),r=n-1;for(arguments.length>1&&(r=min$2(r,toInteger(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:$lastIndexOf,aTypedArray$a=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$b=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$b("lastIndexOf",(function(e){return arrayLastIndexOf.apply(aTypedArray$a(this),arguments)}));var $map=arrayIteration.map,aTypedArray$9=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$a=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$a("map",(function(e){return $map(aTypedArray$9(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(typedArraySpeciesConstructor(e))(t)}))}));var createMethod$1=function(e){return function(t,n,r,i){aFunction(n);var a=toObject(t),o=indexedObject(a),s=toLength(a.length),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw TypeError("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$reduce=arrayReduce.left,aTypedArray$8=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$9=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$9("reduce",(function(e){return $reduce(aTypedArray$8(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var $reduceRight=arrayReduce.right,aTypedArray$7=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$8=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$8("reduceRight",(function(e){return $reduceRight(aTypedArray$7(this),e,arguments.length,arguments.length>1?arguments[1]:void 0)}));var aTypedArray$6=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$7=arrayBufferViewCore.exportTypedArrayMethod,floor$4=Math.floor;exportTypedArrayMethod$7("reverse",(function(){for(var e,t=aTypedArray$6(this).length,n=floor$4(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}));var aTypedArray$5=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$6=arrayBufferViewCore.exportTypedArrayMethod,FORCED$4=fails((function(){new Int8Array(1).set({})}));exportTypedArrayMethod$6("set",(function(e){aTypedArray$5(this);var t=toOffset(arguments.length>
3191?arguments[1]:void 0,1),n=this.length,r=toObject(e),i=toLength(r.length),a=0;if(i+t>n)throw RangeError("Wrong length");for(;a<i;)this[t+a]=r[a++]}),FORCED$4);var aTypedArray$4=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$5=arrayBufferViewCore.exportTypedArrayMethod,$slice$1=[].slice,FORCED$3=fails((function(){new Int8Array(1).slice()}));exportTypedArrayMethod$5("slice",(function(e,t){for(var n=$slice$1.call(aTypedArray$4(this),e,t),r=typedArraySpeciesConstructor(this),i=0,a=n.length,o=new r(a);a>i;)o[i]=n[i++];return o}),FORCED$3);var $some=arrayIteration.some,aTypedArray$3=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$4=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$4("some",(function(e){return $some(aTypedArray$3(this),e,arguments.length>1?arguments[1]:void 0)}));var floor$3=Math.floor,mergeSort=function(e,t){var n=e.length,r=floor$3(n/2);return n<8?insertionSort(e,t):merge(mergeSort(e.slice(0,r),t),mergeSort(e.slice(r),t),t)},insertionSort=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},merge=function(e,t,n){for(var r=e.length,i=t.length,a=0,o=0,s=[];a<r||o<i;)a<r&&o<i?s.push(n(e[a],t[o])<=0?e[a++]:t[o++]):s.push(a<r?e[a++]:t[o++]);return s},arraySort=mergeSort,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],engineIsIeOrEdge=/MSIE|Trident/.test(engineUserAgent),webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],aTypedArray$2=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$3=arrayBufferViewCore.exportTypedArrayMethod,Uint16Array$1=global$1.Uint16Array,nativeSort$1=Uint16Array$1&&Uint16Array$1.prototype.sort,ACCEPT_INCORRECT_ARGUMENTS=!!nativeSort$1&&!fails((function(){var e=new Uint16Array$1(2);e.sort(null),e.sort({})})),STABLE_SORT$1=!!nativeSort$1&&!fails((function(){if(engineV8Version)return engineV8Version<74;if(engineFfVersion)return engineFfVersion<67;if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<602;var e,t,n=new Uint16Array$1(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(n.sort((function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0})),getSortCompare$1=function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}};exportTypedArrayMethod$3("sort",(function(e){if(void 0!==e&&aFunction(e),STABLE_SORT$1)return nativeSort$1.call(this,e);aTypedArray$2(this);var t,n=toLength(this.length),r=Array(n);for(t=0;t<n;t++)r[t]=this[t];for(r=arraySort(this,getSortCompare$1(e)),t=0;t<n;t++)this[t]=r[t];return this}),!STABLE_SORT$1||ACCEPT_INCORRECT_ARGUMENTS);var aTypedArray$1=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$2=arrayBufferViewCore.exportTypedArrayMethod;exportTypedArrayMethod$2("subarray",(function(e,t){var n=aTypedArray$1(this),r=n.length,i=toAbsoluteIndex(e,r);return new(typedArraySpeciesConstructor(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,toLength((void 0===t?r:toAb
319soluteIndex(t,r))-i))}));var Int8Array$1=global$1.Int8Array,aTypedArray=arrayBufferViewCore.aTypedArray,exportTypedArrayMethod$1=arrayBufferViewCore.exportTypedArrayMethod,$toLocaleString=[].toLocaleString,$slice=[].slice,TO_LOCALE_STRING_BUG=!!Int8Array$1&&fails((function(){$toLocaleString.call(new Int8Array$1(1))})),FORCED$2=fails((function(){return[1,2].toLocaleString()!=new Int8Array$1([1,2]).toLocaleString()}))||!fails((function(){Int8Array$1.prototype.toLocaleString.call([1,2])}));exportTypedArrayMethod$1("toLocaleString",(function(){return $toLocaleString.apply(TO_LOCALE_STRING_BUG?$slice.call(aTypedArray(this)):aTypedArray(this),arguments)}),FORCED$2);var exportTypedArrayMethod=arrayBufferViewCore.exportTypedArrayMethod,Uint8Array$1=global$1.Uint8Array,Uint8ArrayPrototype=Uint8Array$1&&Uint8Array$1.prototype||{},arrayToString=[].toString,arrayJoin=[].join;fails((function(){arrayToString.call({})}))&&(arrayToString=function(){return arrayJoin.call(this)});var IS_NOT_ARRAY_METHOD=Uint8ArrayPrototype.toString!=arrayToString;exportTypedArrayMethod("toString",arrayToString,IS_NOT_ARRAY_METHOD);var createProperty=function(e,t,n){var r=toPropertyKey(t);r in e?objectDefineProperty.f(e,r,createPropertyDescriptor(0,n)):e[r]=n},SPECIES$1=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(e){return engineV8Version>=51||!fails((function(){var t=[];return(t.constructor={})[SPECIES$1]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},HAS_SPECIES_SUPPORT$1=arrayMethodHasSpeciesSupport("slice"),SPECIES=wellKnownSymbol("species"),nativeSlice=[].slice,max$1=Math.max;_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT$1},{slice:function(e,t){var n,r,i,a=toIndexedObject(this),o=toLength(a.length),s=toAbsoluteIndex(e,o),c=toAbsoluteIndex(void 0===t?o:t,o);if(isArray(a)&&("function"!=typeof(n=a.constructor)||n!==Array&&!isArray(n.prototype)?isObject(n)&&null===(n=n[SPECIES])&&(n=void 0):n=void 0,n===Array||void 0===n))return nativeSlice.call(a,s,c);for(r=new(void 0===n?Array:n)(max$1(c-s,0)),i=0;s<c;s++,i++)s in a&&createProperty(r,i,a[s]);return r.length=i,r}}),typedArrayConstructor("Uint32",(function(e){return function(t,n,r){return e(this,t,n,r)}})),typedArrayConstructor("Uint16",(function(e){return function(t,n,r){return e(this,t,n,r)}}));var $filter=arrayIteration.filter,HAS_SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("filter");_export({target:"Array",proto:!0,forced:!HAS_SPECIES_SUPPORT},{filter:function(e){return $filter(this,e,arguments.length>1?arguments[1]:void 0)}});var TO_STRING="toString",RegExpPrototype=RegExp.prototype,nativeToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails((function(){return"/a/b"!=nativeToString.call({source:"a",flags:"b"})})),INCORRECT_NAME=nativeToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&redefine(RegExp.prototype,TO_STRING,(function(){var e=anObject(this),t=toString(e.source),n=e.flags;return"/"+t+"/"+toString(void 0===n&&e instanceof RegExp&&!("flags"in RegExpPrototype)?regexpFlags.call(e):n)}),{unsafe:!0});var test=[],nativeSort=test.sort,FAILS_ON_UNDEFINED=fails((function(){test.sort(void 0)})),FAILS_ON_NULL=fails((function(){test.sort(null)})),STRICT_METHOD$1=arrayMethodIsStrict("sort"),STABLE_SORT=!fails((function(){if(engineV8Version)return engineV8Version<70;if(!(engineFfVersion&&engineFfVersion>3)){if(engineIsIeOrEdge)return!0;if(engineWebkitVersion)return engineWebkitVersion<603;var e,t,n,r,i="";for(e=65;e<76;
319e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)test.push({k:t+r,v:n})}for(test.sort((function(e,t){return t.v-e.v})),r=0;r<test.length;r++)t=test[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}})),FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:toString(t)>toString(n)?1:-1}};_export({target:"Array",proto:!0,forced:FORCED$1},{sort:function(e){void 0!==e&&aFunction(e);var t=toObject(this);if(STABLE_SORT)return void 0===e?nativeSort.call(t):nativeSort.call(t,e);var n,r,i=[],a=toLength(t.length);for(r=0;r<a;r++)r in t&&i.push(t[r]);for(n=(i=arraySort(i,getSortCompare(e))).length,r=0;r<n;)t[r]=i[r++];for(;r<a;)delete t[r++];return t}});var UZIP_1=createCommonjsModule((function(e){var t,n,r={};e.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,a=0,o={},s=new Uint8Array(e),c=s.length-4;101010256!=i(s,c);)c--;a=c,a+=4;var l=n(s,a+=4);n(s,a+=2);var u=i(s,a+=2),d=i(s,a+=4);a+=4,a=d;for(var p=0;p<l;p++){i(s,a),a+=4,a+=4,a+=4,i(s,a+=4),u=i(s,a+=4);var h=i(s,a+=4),f=n(s,a+=4),m=n(s,a+2),g=n(s,a+4);a+=6;var y=i(s,a+=8);a+=4,a+=f+m+g,r._readLocal(s,y,o,u,h,t)}return o},r._readLocal=function(e,t,n,i,a,o){var s=r.bin.readUshort,c=r.bin.readUint;c(e,t),s(e,t+=4),s(e,t+=2);var l=s(e,t+=2);c(e,t+=2),c(e,t+=4),t+=4;var u=s(e,t+=8),d=s(e,t+=2);t+=2;var p=r.bin.readUTF8(e,t,u);if(t+=u,t+=d,o)n[p]={size:a,csize:i};else{var h=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(h.buffer.slice(t,t+i));else{if(8!=l)throw"unknown compression method: "+l;var f=new Uint8Array(a);r.inflateRaw(h,f),n[p]=f}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){null==t&&(t={level:6});var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var a=r.adler(e,0,e.length);return i[n+0]=a>>>24&255,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=a>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){null==t&&(t=!1);var n=0,i=r.bin.writeUint,a=r.bin.writeUshort,o={};for(var s in e){var c=!r._noNeed(s)&&!t,l=e[s],u=r.crc.crc(l,0,l.length);o[s]={cpr:c,usize:l.length,crc:u,file:c?r.deflateRaw(l):l}}for(var s in o)n+=o[s].file.length+30+46+2*r.bin.sizeUTF8(s);n+=22;var d=new Uint8Array(n),p=0,h=[];for(var s in o){var f=o[s];h.push(p),p=r._writeHeader(d,p,s,f,0)}var m=0,g=p;for(var s in o)f=o[s],h.push(p),p=r._writeHeader(d,p,s,f,1,h[m++]);var y=p-g;return i(d,p,101010256),p+=4,a(d,p+=4,m),a(d,p+=2,m),i(d,p+=2,y),i(d,p+=4,g),p+=4,p+=2,d.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},r._writeHeader=function(e,t,n,i,a,o){var s=r.bin.writeUint,c=r.bin.writeUshort,l=i.file;return s(e,t,0==a?67324752:33639248),t+=4,1==a&&(t+=2),c(e,t,20),c(e,t+=2,0),c(e,t+=2,i.cpr?8:0),s(e,t+=2,0),s(e,t+=4,i.crc),s(e,t+=4,l.length),s(e,t+=4,i.usize),c(e,t+=4,r.bin.sizeUTF8(n)),c(e,t+=2,0),t+=2,1==a&&(t+=2,t+=2,s(e,t+=6,o),t+=4),t+=r.bin.writeUTF8(e,t,n),0==a&&(e.set(l,t),t+=l.length),t},r.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,i){for(var a=0;a<i;a++)e=r.crc.table[255&(e^t[n+a])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,n){for(var r=1,i=0,a=t,o=t+n;a<o;){for(var s=Math.min(a+5552,o);a<s;)i+=r+=e[a++];r%=65521,i%=65521}return i<<16|r},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var r="",i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var i,a="",o=0;o<n;o++)a+="%"+r.bin.pad(e[t+o].toString(16));try{i=decodeURIComponent(a)}catch(i){return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,n){for(var r=n.length,i=0,a=0;a<r;a++){var o=n.charCodeAt(a);if(0==(4294967168&o))e[t+i]=o,i++;else if(0==(4294965248&o))e[t+i]=192|o>>6,e[t+i+1]=128|o>>0&63,i+=2;else if(0==(4294901760&o))e[t+i]=224|o>>12,e[t+i+1]=128|o>>6&63,e[t+i+2]=128|o>>0&63,i+=3;else{if(0!=(4292870144&o))throw"e";e[t+i]=240|o>>18,e[t+i+1]=128|o>>12&63,e[t+i+2]=128|o>>6&63,e[t+i+3]=128|o>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var t=e.length,n=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(0==(4294967168&i))n++;else if(0==(4294965248&i))n+=2;else if(0==(4294901760&i))n+=3;else{if(0!=(4292870144&i))throw"e";n+=4}}return n}},r.F={},r.F.deflateRaw=function(e,t,n,i){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=r.F.U,s=r.F._goodIndex;r.F._hash;var c=r.F._putsE,l=0,u=n<<3,d=0,p=e.length;if(0==i){for(;l<p;)c(t,u,l+(w=Math.min(65535,p-l))==p?1:0),u=r.F._copyExact(e,l,w,t,u+8),l+=w;return u>>>3}var h=o.lits,f=o.strt,m=o.prev,g=0,y=0,b=0,v=0,A=0,_=0;for(p>2&&(f[_=r.F._hash(e,0)]=0),l=0;l<p;l++){if(A=_,l+1<p-2){_=r.F._hash(e,l+1);var x=l+1&32767;m[x]=f[_],f[_]=x}if(d<=l){(g>14e3||y>26697)&&p-l>100&&(d<l&&(h[g]=l-d,g+=2,d=l),u=r.F._writeBlock(l==p-1||d==p?1:0,h,g,v,e,b,l-b,t,u),g=y=v=0,b=l);var k=0;l<p-2&&(k=r.F._bestMatch(e,l,m,A,Math.min(a[2],p-l),a[3]));var w=k>>>16,T=65535&k;if(0!=k){T=65535&k;var S=s(w=k>>>16,o.of0);o.lhst[257+S]++;var C=s(T,o.df0);o.dhst[C]++,v+=o.exb[S]+o.dxb[C],h[g]=w<<23|l-d,h[g+1]=T<<16|S<<8|C,g+=2,d=l+w}else o.lhst[e[l]]++;y++}}for(b==l&&0!=e.length||(d<l&&(h[g]=l-d,g+=2,d=l),u=r.F._writeBlock(1,h,g,v,e,b,l-b,t,u),g=0,y=0,g=y=v=0,b=l);0!=(7&u);)u++;return u>>>3},r.F._bestMatch=function(e,t,n,i,a,o){var s=32767&t,c=n[s],l=s-c+32768&32767;if(c==s||i!=r.F._hash(e,t-l))return 0;for(var u=0,d=0,p=Math.min(32767,t);l<=p&&0!=--o&&c!=s;){if(0==u||e[t+u]==e[t+u-l]){var h=r.F._howLong(e,t,l);if(h>u){if(d=l,(u=h)>=a)break;l+2<h&&(h=l+2);for(var f=0,m=0;m<h-2;m++){var g=t-l+m+32768&32767,y=g-n[g]+32768&32767;y>f&&(f=y,c=g)}}}l+=(s=c)-(c=n[s])+32768&32767}return u<<16|d}
vendor: 8,768 bytes, line 319
319,r.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var r=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-r},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,a,o,s,c,l){var u,d,p,h,f,m,g,y,b,v=r.F.U,A=r.F._putsF,_=r.F._putsE;v.lhst[256]++,d=(u=r.F.getTrees())[0],p=u[1],h=u[2],f=u[3],m=u[4],g=u[5],y=u[6],b=u[7];var x=32+(0==(l+3&7)?0:8-(l+3&7))+(s<<3),k=i+r.F.contSize(v.fltree,v.lhst)+r.F.contSize(v.fdtree,v.dhst),w=i+r.F.contSize(v.ltree,v.lhst)+r.F.contSize(v.dtree,v.dhst);w+=14+3*g+r.F.contSize(v.itree,v.ihst)+(2*v.ihst[16]+3*v.ihst[17]+7*v.ihst[18]);for(var T=0;T<286;T++)v.lhst[T]=0;for(T=0;T<30;T++)v.dhst[T]=0;for(T=0;T<19;T++)v.ihst[T]=0;var S=x<k&&x<w?0:k<w?1:2;if(A(c,l,e),A(c,l+1,S),l+=3,0==S){for(;0!=(7&l);)l++;l=r.F._copyExact(a,o,s,c,l)}else{var C,I;if(1==S&&(C=v.fltree,I=v.fdtree),2==S){r.F.makeCodes(v.ltree,d),r.F.revCodes(v.ltree,d),r.F.makeCodes(v.dtree,p),r.F.revCodes(v.dtree,p),r.F.makeCodes(v.itree,h),r.F.revCodes(v.itree,h),C=v.ltree,I=v.dtree,_(c,l,f-257),_(c,l+=5,m-1),_(c,l+=5,g-4),l+=4;for(var N=0;N<g;N++)_(c,l+3*N,v.itree[1+(v.ordr[N]<<1)]);l+=3*g,l=r.F._codeTiny(y,v.itree,c,l),l=r.F._codeTiny(b,v.itree,c,l)}for(var E=o,P=0;P<n;P+=2){for(var $=t[P],R=$>>>23,O=E+(8388607&$);E<O;)l=r.F._writeLit(a[E++],C,c,l);if(0!=R){var M=t[P+1],D=M>>16,L=M>>8&255,U=255&M;_(c,l=r.F._writeLit(257+L,C,c,l),R-v.of0[L]),l+=v.exb[L],A(c,l=r.F._writeLit(U,I,c,l),D-v.df0[U]),l+=v.dxb[U],E+=R}}l=r.F._writeLit(256,C,c,l)}return l},r.F._copyExact=function(e,t,n,r,i){var a=i>>>3;return r[a]=n,r[a+1]=n>>>8,r[a+2]=255-r[a],r[a+3]=255-r[a+1],a+=4,r.set(new Uint8Array(e.buffer,t,n),a),i+(n+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],a=r.F._lenCodes(e.ltree,i),o=[],s=r.F._lenCodes(e.dtree,o),c=0;c<i.length;c+=2)e.ihst[i[c]]++;for(c=0;c<o.length;c+=2)e.ihst[o[c]]++;for(var l=r.F._hufTree(e.ihst,e.itree,7),u=19;u>4&&0==e.itree[1+(e.ordr[u-1]<<1)];)u--;return[t,n,l,a,s,u,i,o]},r.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},r.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},r.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},r.F._codeTiny=function(e,t,n,i){for(var a=0;a<e.length;a+=2){var o=e[a],s=e[a+1];i=r.F._writeLit(o,t,n,i);var c=16==o?2:17==o?3:7;o>15&&(r.F._putsE(n,i,s,c),i+=c)}return i},r.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var r=0;r<n;r+=2){var i=e[r+1],a=r+3<n?e[r+3]:-1,o=r+5<n?e[r+5]:-1,s=0==r?-1:e[r-1];if(0==i&&a==i&&o==i){for(var c=r+5;c+2<n&&e[c+2]==i;)c+=2;(l=Math.min(c+1-r>>>1,138))<11?t.push(17,l-3):t.push(18,l-11),r+=2*l-2}else if(i==s&&a==i&&o==i){for(c=r+5;c+2<n&&e[c+2]==i;)c+=2;var l=Math.min(c+1-r>>>1,6);t.push(16,l-3),r+=2*l-2}else t.push(i,0)}return n>>>1},r.F._hufTree=function(e,t,n){var i=[],a=e.length,o=t.length,s=0;for(s=0;s<o;s+=2)t[s]=0,t[s+1]=0;for(s=0;s<a;s++)0!=e[s]&&i.push({lit:s,f:e[s]});var c=i.length,l=i.slice(0);if(0==c)return 0;if(1==c){var u=i[0].lit;return l=0==u?1:0,t[1+(u<<1)]=1,t[1+(l<<1)]=1,1}i.sort((function(e,t){return e.f-t.f}));var d=i[0],p=i[1],h=0,f=1,m=2;for(i[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};f!=c-1;)d=h!=f&&(m==c||i[h].f<i[m].f)?i[h++]:i[m++],p=h!=f&&(m==c||i[h].f<i[m].f)?i[h++]:i[m++],i[f++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=r.F.setDepth(i[f-1],0);for(g>n&&(r.F.restrictDepth(l,n,g),g=n),s=0;s<c;s++)t[1+(l[s].lit<<1)]=l[s].d;return g},r.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,n){var r=0,i=1<<n-t,a=0;for(e.sort((function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d})),r=0;r<e.length&&e[r].d>t;r++){var o=e[r].d;e[r].d=t,a+=i-(1<<n-o)}for(a>>>=n-t;a>0;)(o=e[r].d)<t?(e[r].d++,a-=1<<t-o-1):r++;for(;r>=0;r--)e[r].d==t&&a<0&&(e[r].d--,a++);0!=a&&console.log("debt left")},r.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var i=r.F,a=i._bitsF,o=i._bitsE,s=i._decodeTiny,c=i.makeCodes,l=i.codes2map,u=i._get17,d=i.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var h,f,m=0,g=0,y=0,b=0,v=0,A=0,_=0,x=0,k=0;0==m;)if(m=a(e,k,1),g=a(e,k+1,2),k+=3,0!=g){if(p&&(t=r.F._check(t,x+(1<<17))),1==g&&(h=d.flmap,f=d.fdmap,A=511,_=31),2==g){y=o(e,k,5)+257,b=o(e,k+5,5)+1,v=o(e,k+10,4)+4,k+=14;for(var w=0;w<38;w+=2)d.itree[w]=0,d.itree[w+1]=0;var T=1;for(w=0;w<v;w++){var S=o(e,k+3*w,3);d.itree[1+(d.ordr[w]<<1)]=S,S>T&&(T=S)}k+=3*v,c(d.itree,T),l(d.itree,T,d.imap),h=d.lmap,f=d.dmap,k=s(d.imap,(1<<T)-1,y+b,e,k,d.ttree);var C=i._copyOut(d.ttree,0,y,d.ltree);A=(1<<C)-1;var I=i._copyOut(d.ttree,y,b,d.dtree);_=(1<<I)-1,c(d.ltree,C),l(d.ltree,C,h),c(d.dtree,I),l(d.dtree,I,f)}for(;;){var N=h[u(e,k)&A];k+=15&N;var E=N>>>4;if(E>>>8==0)t[x++]=E;else{if(256==E)break;var P=x+E-254;if(E>264){var $=d.ldef[E-257];P=x+($>>>3)+o(e,k,7&$),k+=7&$}var R=f[u(e,k)&_];k+=15&R;var O=R>>>4,M=d.ddef[O],D=(M>>>4)+a(e,k,15&M);for(k+=15&M,p&&(t=r.F._check(t,x+(1<<17)));x<P;)t[x]=t[x++-D],t[x]=t[x++-D],t[x]=t[x++-D],t[x]=t[x++-D];x=P}}}else{0!=(7&k)&&(k+=8-(7&k));var L=4+(k>>>3),U=e[L-4]|e[L-3]<<8;p&&(t=r.F._check(t,x+U)),t.set(new n(e.buffer,e.byteOffset+L,U),x),k=L+U<<3,x+=U}return t.length==x?t:t.slice(0,x)},r.F._check=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(Math.max(n<<1,t));return r.set(e,0),r},r.F._decodeTiny=function(e,t,n,i,a,o){for(var s=r.F._bitsE,c=r.F._get17,l=0;l<n;){var u=e[c(i,a)&t];a+=15&u;var d=u>>>4;if(d<=15)o[l]=d,l++;else{var p=0,h=0;16==d?(h=3+s(i,a,2),a+=2,p=o[l-1]):17==d?(h=3+s(i,a,3),a+=3):18==d&&(h=11+s(i,a,7),a+=7);for(var f=l+h;l<f;)o[l]=p,l++}}return a},r.F._copyOut=function(e,t,n,r){for(var i=0,a=0,o=r.length>>>1;a<n;){var s=e[a+t];r[a<<1]=0,r[1+(a<<1)]=s,s>i&&(i=s),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},r.F.makeCodes=function(e,t){for(var n,i,a,o,s=r.F.U,c=e.length,l=s.bl_count,u=0;u<=t;u++)l[u]=0;for(u=1;u<c;u+=2)l[e[u]]++;var d=s.next_code;for(n=0,l[0]=0,i=1;i<=t;i++)n=n+l[i-1]<<1,d[i]=n;for(a=0;a<c;a+=2)0!=(o=e[a+1])&&(e[a]=d[o],d[o]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,a=r.F.U.rev15,o=0;o<i;o+=2)if(0!=e[o+1])for(var s=o>>1,c=e[o+1],l=s<<4|c,u=t-c,d=e[o]<<u,p=d+(1<<u);d!=p;)n[a[d]>>>15-t]=l,d++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,a=0;a<e.length;a+=2){var o=e[a]<<t-e[a+1];e[a]=n[o]>>>i}},r.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},r.F._putsF=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},r.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},r.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()})),UZIP=Object.freeze(Object.assign(Object.create(null),UZIP_1,{default:UZIP_1})),UPNG={},N$2,W$2,H$2;
319UPNG.toRGBA8=function(e){var t=e.width,n=e.height;if(null==e.tabs.acTL)return[UPNG.toRGBA8.decodeImage(e.data,t,n,e).buffer];var r=[];null==e.frames[0].data&&(e.frames[0].data=e.data);for(var i=t*n*4,a=new Uint8Array(i),o=new Uint8Array(i),s=new Uint8Array(i),c=0;c<e.frames.length;c++){var l=e.frames[c],u=l.rect.x,d=l.rect.y,p=l.rect.width,h=l.rect.height,f=UPNG.toRGBA8.decodeImage(l.data,p,h,e);if(0!=c)for(var m=0;m<i;m++)s[m]=a[m];if(0==l.blend?UPNG._copyTile(f,p,h,a,t,n,u,d,0):1==l.blend&&UPNG._copyTile(f,p,h,a,t,n,u,d,1),r.push(a.buffer.slice(0)),0==l.dispose);else if(1==l.dispose)UPNG._copyTile(o,p,h,a,t,n,u,d,0);else if(2==l.dispose)for(m=0;m<i;m++)a[m]=s[m]}return r},UPNG.toRGBA8.decodeImage=function(e,t,n,r){var i=t*n,a=UPNG.decode._getBPP(r),o=Math.ceil(t*a/8),s=new Uint8Array(4*i),c=new Uint32Array(s.buffer),l=r.ctype,u=r.depth,d=UPNG._bin.readUshort;if(6==l){var p=i<<2;if(8==u)for(var h=0;h<p;h+=4)s[h]=e[h],s[h+1]=e[h+1],s[h+2]=e[h+2],s[h+3]=e[h+3];if(16==u)for(h=0;h<p;h++)s[h]=e[h<<1]}else if(2==l){var f=r.tabs.tRNS;if(null==f){if(8==u)for(h=0;h<i;h++){var m=3*h;c[h]=255<<24|e[m+2]<<16|e[m+1]<<8|e[m]}if(16==u)for(h=0;h<i;h++)m=6*h,c[h]=255<<24|e[m+4]<<16|e[m+2]<<8|e[m]}else{var g=f[0],y=f[1],b=f[2];if(8==u)for(h=0;h<i;h++){var v=h<<2;m=3*h,c[h]=255<<24|e[m+2]<<16|e[m+1]<<8|e[m],e[m]==g&&e[m+1]==y&&e[m+2]==b&&(s[v+3]=0)}if(16==u)for(h=0;h<i;h++)v=h<<2,m=6*h,c[h]=255<<24|e[m+4]<<16|e[m+2]<<8|e[m],d(e,m)==g&&d(e,m+2)==y&&d(e,m+4)==b&&(s[v+3]=0)}}else if(3==l){var A=r.tabs.PLTE,_=r.tabs.tRNS,x=_?_.length:0;if(1==u)for(var k=0;k<n;k++){var w=k*o,T=k*t;for(h=0;h<t;h++){v=T+h<<2;var S=3*(C=e[w+(h>>3)]>>7-((7&h)<<0)&1);s[v]=A[S],s[v+1]=A[S+1],s[v+2]=A[S+2],s[v+3]=C<x?_[C]:255}}if(2==u)for(k=0;k<n;k++)for(w=k*o,T=k*t,h=0;h<t;h++)v=T+h<<2,S=3*(C=e[w+(h>>2)]>>6-((3&h)<<1)&3),s[v]=A[S],s[v+1]=A[S+1],s[v+2]=A[S+2],s[v+3]=C<x?_[C]:255;if(4==u)for(k=0;k<n;k++)for(w=k*o,T=k*t,h=0;h<t;h++)v=T+h<<2,S=3*(C=e[w+(h>>1)]>>4-((1&h)<<2)&15),s[v]=A[S],s[v+1]=A[S+1],s[v+2]=A[S+2],s[v+3]=C<x?_[C]:255;if(8==u)for(h=0;h<i;h++){var C;v=h<<2,S=3*(C=e[h]),s[v]=A[S],s[v+1]=A[S+1],s[v+2]=A[S+2],s[v+3]=C<x?_[C]:255}}else if(4==l){if(8==u)for(h=0;h<i;h++){v=h<<2;var I=e[N=h<<1];s[v]=I,s[v+1]=I,s[v+2]=I,s[v+3]=e[N+1]}if(16==u)for(h=0;h<i;h++){var N;v=h<<2,I=e[N=h<<2],s[v]=I,s[v+1]=I,s[v+2]=I,s[v+3]=e[N+2]}}else if(0==l)for(g=r.tabs.tRNS?r.tabs.tRNS:-1,k=0;k<n;k++){var E=k*o,P=k*t;if(1==u)for(var $=0;$<t;$++){var R=(I=255*(e[E+($>>>3)]>>>7-(7&$)&1))==255*g?0:255;c[P+$]=R<<24|I<<16|I<<8|I}else if(2==u)for($=0;$<t;$++)R=(I=85*(e[E+($>>>2)]>>>6-((3&$)<<1)&3))==85*g?0:255,c[P+$]=R<<24|I<<16|I<<8|I;else if(4==u)for($=0;$<t;$++)R=(I=17*(e[E+($>>>1)]>>>4-((1&$)<<2)&15))==17*g?0:255,c[P+$]=R<<24|I<<16|I<<8|I;else if(8==u)for($=0;$<t;$++)R=(I=e[E+$])==g?0:255,c[P+$]=R<<24|I<<16|I<<8|I;else if(16==u)for($=0;$<t;$++)I=e[E+($<<1)],R=d(e,E+($<<h))==g?0:255,c[P+$]=R<<24|I<<16|I<<8|I}return s},UPNG.decode=function(e){for(var t,n=new Uint8Array(e),r=8,i=UPNG._bin,a=i.readUshort,o=i.readUint,s={tabs:{},frames:[]},c=new Uint8Array(n.length),l=0,u=0,d=[137,80,78,71,13,10,26,10],p=0;p<8;p++)if(n[p]!=d[p])throw"The input is not a PNG file!";for(;r<n.length;){var h=i.readUint(n,r);r+=4;var f=i.readASCII(n,r,4);if(r+=4,"IHDR"==f)UPNG.decode._IHDR(n,r,s);else if("CgBI"==f)s.tabs[f]=n.slice(r,r+4);else if("IDAT"==f){for(p=0;p<h;p++)c[l+p]=n[r+p];l+=h}else if("acTL"==f)s.tabs[f]={num_frames:o(n,r),num_plays:o(n,r+4)},t=new Uint8Array(n.length);else if("fcTL"==f){var m;0!=u&&((m=s.frames[s.frames.length-1]).data=UPNG.decode._decompress(s,t.slice(0,u),m.rect.width,m.rect.height),u=0);var g={x:o(n,r+12),y:o(n,r+16),width:o(n,r+4),height:o(n,r+8)},y=a(n,r+22);y=a(n,r+20)/(0==y?100:y);var b={rect:g,delay:Math.round(1e3*y),dispose:n[r+24],blend:n[r+25]};s.frames.push(b)}else if("fdAT"==f){for(p=0;p<h-4;p++)t[u+p]=n[r+p+4];u+=h-4}else if("pHYs"==f)s.tabs[f]=[i.readUint(n,r),i.readUint(n,r+4),n[r+8]];else if("cHRM"==f)for(s.tabs[f]=[],p=0;p<8;p++)s.tabs[f].push(i.readUint(n,r+4*p));else if("tEXt"==f||"zTXt"==f){null==s.tabs[f]&&(s.tabs[f]={});var v=i.nextZero(n,r),A=i.readASCII(n,r,v-r),_=r+h-v-1;if("tEXt"==f)w=i.readASCII(n,v+1,_);else{var x=UPNG.decode._inflate(n.slice(v+2,v+2+_));w=i.readUTF8(x,0,x.length)}s.tabs[f][A]=w}else if("iTXt"==f){null==s.tabs[f]&&(s.tabs[f]={}),v=0;var k=r;v=i.nextZero(n,k),A=i.readASCII(n,k,v-k);var w,T=n[k=v+1];n[k+1],k+=2,v=i.nextZero(n,k),i.readASCII(n,k,v-k),k=v+1,v=i.nextZero(n,k),i.readUTF8(n,k,v-k),_=h-((k=v+1)-r),0==T?w=i.readUTF8(n,k,_):(x=UPNG.decode._inflate(n.slice(k,k+_)),w=i.readUTF8(x,0,x.length)),s.tabs[f][A]=w}else if("PLTE"==f)s.tabs[f]=i.readBytes(n,r,h);else if("hIST"==f){var S=s.tabs.PLTE.length/3;for(s.tabs[f]=[],p=0;p<S;p++)s.tabs[f].push(a(n,r+2*p))}else if("tRNS"==f)3==s.ctype?s.tabs[f]=i.readBytes(n,r,h):0==s.ctype?s.tabs[f]=a(n,r):2==s.ctype&&(s.tabs[f]=[a(n,r),a(n,r+2),a(n,r+4)]);else if("gAMA"==f)s.tabs[f]=i.readUint(n,r)/1e5;else if("sRGB"==f)s.tabs[f]=n[r];else if("bKGD"==f)0==s.ctype||4==s.ctype?s.tabs[f]=[a(n,r)]:2==s.ctype||6==s.ctype?s.tabs[f]=[a(n,r),a(n,r+2),a(n,r+4)]:3==s.ctype&&(s.tabs[f]=n[r]);else if("IEND"==f)break;r+=h,i.readUint(n,r),r+=4}return 0!=u&&((m=s.frames[s.frames.length-1]).data=UPNG.decode._decompress(s,t.slice(0,u),m.rect.width,m.rect.height),u=0),s.data=UPNG.decode._decompress(s,c,s.width,s.height),delete s.compress,delete s.interlace,delete s.filter,s},UPNG.decode._decompress=function(e,t,n,r){var i=UPNG.decode._getBPP(e),a=Math.ceil(n*i/8),o=new Uint8Array((a+1+e.interlace)*r);
vendor: 14,172 bytes, line 319
319return t=e.tabs.CgBI?UPNG.inflateRaw(t,o):UPNG.decode._inflate(t,o),0==e.interlace?t=UPNG.decode._filterZero(t,e,0,n,r):1==e.interlace&&(t=UPNG.decode._readInterlace(t,e)),t},UPNG.decode._inflate=function(e,t){return UPNG.inflateRaw(new Uint8Array(e.buffer,2,e.length-6),t)},UPNG.inflateRaw=(H$2={},H$2.H={},H$2.H.N=function(e,t){var n,r,i=Uint8Array,a=0,o=0,s=0,c=0,l=0,u=0,d=0,p=0,h=0;if(3==e[0]&&0==e[1])return t||new i(0);var f=H$2.H,m=f.b,g=f.e,y=f.R,b=f.n,v=f.A,A=f.Z,_=f.m,x=null==t;for(x&&(t=new i(e.length>>>2<<5));0==a;)if(a=m(e,h,1),o=m(e,h+1,2),h+=3,0!=o){if(x&&(t=H$2.H.W(t,p+(1<<17))),1==o&&(n=_.J,r=_.h,u=511,d=31),2==o){s=g(e,h,5)+257,c=g(e,h+5,5)+1,l=g(e,h+10,4)+4,h+=14;for(var k=1,w=0;w<38;w+=2)_.Q[w]=0,_.Q[w+1]=0;for(w=0;w<l;w++){var T=g(e,h+3*w,3);_.Q[1+(_.X[w]<<1)]=T,T>k&&(k=T)}h+=3*l,b(_.Q,k),v(_.Q,k,_.u),n=_.w,r=_.d,h=y(_.u,(1<<k)-1,s+c,e,h,_.v);var S=f.V(_.v,0,s,_.C);u=(1<<S)-1;var C=f.V(_.v,s,c,_.D);d=(1<<C)-1,b(_.C,S),v(_.C,S,n),b(_.D,C),v(_.D,C,r)}for(;;){var I=n[A(e,h)&u];h+=15&I;var N=I>>>4;if(N>>>8==0)t[p++]=N;else{if(256==N)break;var E=p+N-254;if(N>264){var P=_.q[N-257];E=p+(P>>>3)+g(e,h,7&P),h+=7&P}var $=r[A(e,h)&d];h+=15&$;var R=$>>>4,O=_.c[R],M=(O>>>4)+m(e,h,15&O);for(h+=15&O;p<E;)t[p]=t[p++-M],t[p]=t[p++-M],t[p]=t[p++-M],t[p]=t[p++-M];p=E}}}else{0!=(7&h)&&(h+=8-(7&h));var D=4+(h>>>3),L=e[D-4]|e[D-3]<<8;x&&(t=H$2.H.W(t,p+L)),t.set(new i(e.buffer,e.byteOffset+D,L),p),h=D+L<<3,p+=L}return t.length==p?t:t.slice(0,p)},H$2.H.W=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(n<<1);return r.set(e,0),r},H$2.H.R=function(e,t,n,r,i,a){for(var o=H$2.H.e,s=H$2.H.Z,c=0;c<n;){var l=e[s(r,i)&t];i+=15&l;var u=l>>>4;if(u<=15)a[c]=u,c++;else{var d=0,p=0;16==u?(p=3+o(r,i,2),i+=2,d=a[c-1]):17==u?(p=3+o(r,i,3),i+=3):18==u&&(p=11+o(r,i,7),i+=7);for(var h=c+p;c<h;)a[c]=d,c++}}return i},H$2.H.V=function(e,t,n,r){for(var i=0,a=0,o=r.length>>>1;a<n;){var s=e[a+t];r[a<<1]=0,r[1+(a<<1)]=s,s>i&&(i=s),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},H$2.H.n=function(e,t){for(var n,r,i,a,o=H$2.H.m,s=e.length,c=o.j,l=0;l<=t;l++)c[l]=0;for(l=1;l<s;l+=2)c[e[l]]++;var u=o.K;for(n=0,c[0]=0,r=1;r<=t;r++)n=n+c[r-1]<<1,u[r]=n;for(i=0;i<s;i+=2)0!=(a=e[i+1])&&(e[i]=u[a],u[a]++)},H$2.H.A=function(e,t,n){for(var r=e.length,i=H$2.H.m.r,a=0;a<r;a+=2)if(0!=e[a+1])for(var o=a>>1,s=e[a+1],c=o<<4|s,l=t-s,u=e[a]<<l,d=u+(1<<l);u!=d;)n[i[u]>>>15-t]=c,u++},H$2.H.l=function(e,t){for(var n=H$2.H.m.r,r=15-t,i=0;i<e.length;i+=2){var a=e[i]<<t-e[i+1];e[i]=n[a]>>>r}},H$2.H.M=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},H$2.H.I=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},H$2.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},H$2.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},H$2.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},H$2.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},H$2.H.m=(N$2=Uint16Array,W$2=Uint32Array,{K:new N$2(16),j:new N$2(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N$2(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W$2(32),J:new N$2(512),_:[],h:new N$2(32),$:[],w:new N$2(32768),C:[],v:[],d:new N$2(32768),D:[],u:new N$2(512),Q:[],r:new N$2(32768),s:new W$2(286),Y:new W$2(30),a:new W$2(19),t:new W$2(15e3),k:new N$2(65536),g:new N$2(32768)}),function(){for(var e=H$2.H.m,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.r[t]=(n>>>16|n<<16)>>>17}function r(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.q[t]=e.S[t]<<3|e.T[t],e.c[t]=e.p[t]<<4|e.z[t];r(e._,144,8),r(e._,112,9),r(e._,24,7),r(e._,8,8),H$2.H.n(e._,9),H$2.H.A(e._,9,e.J),H$2.H.l(e._,9),r(e.$,32,5),H$2.H.n(e.$,5),H$2.H.A(e.$,5,e.h),H$2.H.l(e.$,5),r(e.Q,19,0),r(e.C,286,0),r(e.D,30,0),r(e.v,320,0)}(),H$2.H.N),UPNG.decode._readInterlace=function(e,t){for(var n=t.width,r=t.height,i=UPNG.decode._getBPP(t),a=i>>3,o=Math.ceil(n*i/8),s=new Uint8Array(r*o),c=0,l=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],h=0;h<7;){for(var f=d[h],m=p[h],g=0,y=0,b=l[h];b<r;)b+=f,y++;for(var v=u[h];v<n;)v+=m,g++;var A=Math.ceil(g*i/8);UPNG.decode._filterZero(e,t,c,g,y);for(var _=0,x=l[h];x<r;){for(var k=u[h],w=c+_*A<<3;k<n;){var T;if(1==i&&(T=(T=e[w>>3])>>7-(7&w)&1,s[x*o+(k>>3)]|=T<<7-((7&k)<<0)),2==i&&(T=(T=e[w>>3])>>6-(7&w)&3,s[x*o+(k>>2)]|=T<<6-((3&k)<<1)),4==i&&(T=(T=e[w>>3])>>4-(7&w)&15,s[x*o+(k>>1)]|=T<<4-((1&k)<<2)),i>=8)for(var S=x*o+k*a,C=0;C<a;C++)s[S+C]=e[(w>>3)+C];w+=i,k+=m}_++,x+=f}g*y!=0&&(c+=y*(1+A)),h+=1}return s},UPNG.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},UPNG.decode._filterZero=function(e,t,n,r,i){var a=UPNG.decode._getBPP(t),o=Math.ceil(r*a/8),s=UPNG.decode._paeth;a=Math.ceil(a/8);var c=0,l=1,u=e[n],d=0;if(u>1&&(e[n]=[0,0,1][u-2]),3==u)for(d=a;d<o;d++)e[d+1]=e[d+1]+(e[d+1-a]>>>1)&255;for(var p=0;p<i;p++)if(d=0,0==(u=e[(l=(c=n+p*o)+p+1)-1]))for(;d<o;d++)e[c+d]=e[l+d];else if(1==u){for(;d<a;d++)e[c+d]=e[l+d];for(;d<o;d++)e[c+d]=e[l+d]+e[c+d-a]}else if(2==u)for(;d<o;d++)e[c+d]=e[l+d]+e[c+d-o];else if(3==u){for(;d<a;d++)e[c+d]=e[l+d]+(e[c+d-o]>>>1);for(;d<o;d++)e[c+d]=e[l+d]+(e[c+d-o]+e[c+d-a]>>>1)}else{for(;d<a;d++)e[c+d]=e[l+d]+s(0,e[c+d-o],0);for(;d<o;d++)e[c+d]=e[l+d]+s(e[c+d-a],e[c+d-o],e[c+d-a-o])}return e},UPNG.decode._paeth=function(e,t,n){var r=e+t-n,i=r-e,a=r-t,o=r-n;return i*i<=a*a&&i*i<=o*o?e:a*a<=o*o?t:n},UPNG.decode._IHDR=function(e,t,n){var r=UPNG._bin;n.width=r.readUint(e,t),t+=4,n.height=r.readUint(e,t),t+=4,n.depth=e[t],t++,n.ctype=e[t],t++,n.compress=e[t],t++,n.filter=e[t],t++,n.interlace=e[t],t++},UPNG._bin={nextZero:function(e,t){for(;0!=e[t];)t++;return t},readUshort:function(e,t){return e[t]<<8|e[t+1]},writeUshort:function(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII:function(e,t,n){for(var r="",i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},readBytes:function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e[t+i]);return r},pad:function(e){return e.length<2?"0".concat(e):e},readUTF8:function(e,t,n){for(var r,i="",a=0;a<n;a++)i+="%".concat(UPNG._bin.pad(e[t+a].toString(16)));try{r=decodeURIComponent(i)}catch(r){return UPNG._bin.readASCII(e,t,n)}return r}},UPNG._copyTile=function(e,t,n,r,i,a,o,s,c){for(var l=Math.min(t,i),u=Math.min(n,a),d=0,p=0,h=0;h<u;h++)for(var f=0;f<l;f++)if(o>=0&&s>=0?(d=h*t+f<<2,p=(s+h)*i+o+f<<2):(d=(-s+h)*t-o+f<<2,p=h*i+f<<2),0==c)r[p]=e[d],r[p+1]=e[d+1],r[p+2]=e[d+2],r[p+3]=e[d+3];else if(1==c){var m=e[d+3]*(1/255),g=e[d]*m,y=e[d+1]*m,b=e[d+2]*m,v=r[p+3]*(1/255),A=r[p]*v,_=r[p+1]*v,x=r[p+2]*v,k=1-m,w=m+v*k,T=0==w?0:1/w;r[p+3]=255*w,r[p+0]=(g+A*k)*T,r[p+1]=(y+_*k)*T,r[p+2]=(b+x*k)*T}else if(2==c)m=e[d+3],g=e[d],y=e[d+1],b=e[d+2],v=r[p+3],A=r[p],_=r[p+1],x=r[p+2],m==v&&g==A&&y==_&&b==x?(r[p]=0,r[p+1]=0,r[p+2]=0,r[p+3]=0):(r[p]=g,r[p+1]=y,r[p+2]=b,r[p+3]=m);else if(3==c){if(m=e[d+3],g=e[d],y=e[d+1],b=e[d+2],v=r[p+3],A=r[p],_=r[p+1],x=r[p+2],m==v&&g==A&&y==_&&b==x)continue;if(m<220&&v>20)return!1}return!0},UPNG.encode=function(e,t,n,r,i,a,o){null==r&&(r=0),null==o&&(o=!1);var s=UPNG.encode.compress(e,t,n,r,[!1,!1,!1,0,o]);return UPNG.encode.compressPNG(s,-1),UPNG.encode._main(s,t,n,i,a)},UPNG.encodeLL=function(e,t,n,r,i,a,o,s){for(var c={ctype:0+(1==r?0:2)+(0==i?0:4),depth:a,frames:[]},l=(r+i)*a,u=l*t,d=0;d<e.length;d++)c.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[d]),blend:0,dispose:1,bpp:Math.ceil(l/8),bpl:Math.ceil(u/8)});return UPNG.encode.compressPNG(c,0,!0),UPNG.encode._main(c,t,n,o,s)},UPNG.encode._main=function(e,t,n,r,i){null==i&&(i={});var a=UPNG.crc.crc,o=UPNG._bin.writeUint,s=UPNG._bin.writeUshort,c=UPNG._bin.writeASCII,l=8,u=e.frames.length>1,d=!1,p=33+(u?20:0);if(null!=i.sRGB&&(p+=13),null!=i.pHYs&&(p+=21),3==e.ctype){for(var h=e.plte.length,f=0;f<h;f++)e.plte[f]>>>24!=255&&(d=!0);p+=8+3*h+4+(d?8+1*h+4:0)}for(var m=0;m<e.frames.length;m++)u&&(p+=38),p+=(w=e.frames[m]).cimg.length+12,0!=m&&(p+=4);p+=12;var g=new Uint8Array(p),y=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)g[f]=y[f];if(o(g,l,13),c(g,l+=4,"IHDR"),o(g,l+=4,t),o(g,l+=4,n),g[l+=4]=e.depth,g[++l]=e.ctype,g[++l]=0,g[++l]=0,g[++l]=0,o(g,++l,a(g,l-17,17)),l+=4,null!=i.sRGB&&(o(g,l,1),c(g,l+=4,"sRGB"),g[l+=4]=i.sRGB,o(g,++l,a(g,l-5,5)),l+=4),null!=i.pHYs&&(o(g,l,9),c(g,l+=4,"pHYs"),o(g,l+=4,i.pHYs[0]),o(g,l+=4,i.pHYs[1]),g[l+=4]=i.pHYs[2],o(g,++l,a(g,l-13,13)),l+=4),u&&(o(g,l,8),c(g,l+=4,"acTL"),o(g,l+=4,e.frames.length),o(g,l+=4,null!=i.loop?i.loop:0),o(g,l+=4,a(g,l-12,12)),l+=4),3==e.ctype){for(o(g,l,3*(h=e.plte.length)),c(g,l+=4,"PLTE"),l+=4,f=0;f<h;f++){var b=3*f,v=e.plte[f],A=255&v,_=v>>>8&255,x=v>>>16&255;g[l+b+0]=A,g[l+b+1]=_,g[l+b+2]=x}if(o(g,l+=3*h,a(g,l-3*h-4,3*h+4)),l+=4,d){for(o(g,l,h),c(g,l+=4,"tRNS"),l+=4,f=0;f<h;f++)g[l+f]=e.plte[f]>>>24&255;o(g,l+=h,a(g,l-h-4,h+4)),l+=4}}var k=0;for(m=0;m<e.frames.length;m++){var w=e.frames[m];u&&(o(g,l,26),c(g,l+=4,"fcTL"),o(g,l+=4,k++),o(g,l+=4,w.rect.width),o(g,l+=4,w.rect.height),o(g,l+=4,w.rect.x),o(g,l+=4,w.rect.y),s(g,l+=4,r[m]),s(g,l+=2,1e3),g[l+=2]=w.dispose,g[++l]=w.blend,o(g,++l,a(g,l-30,30)),l+=4);var T=w.cimg;o(g,l,(h=T.length)+(0==m?0:4));var S=l+=4;c(g,l,0==m?"IDAT":"fdAT"),l+=4,0!=m&&(o(g,l,k++),l+=4),g.set(T,l),o(g,l+=h,a(g,S,l-S)),l+=4}return o(g,l,0),c(g,l+=4,"IEND"),o(g,l+=4,a(g,l-4,4)),l+=4,g.buffer},UPNG.encode.compressPNG=function(e,t,n){for(var r=0;r<e.frames.length;r++){var i=e.frames[r];i.rect.width;var a=i.rect.height,o=new Uint8Array(a*i.bpl+a);i.cimg=UPNG.encode._filterZero(i.img,a,i.bpp,i.bpl,o,t,n)}},UPNG.encode.compress=function(e,t,n,r,i){for(var a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=6,d=8,p=255,h=0;h<e.length;h++)for(var f=new Uint8Array(e[h]),m=f.length,g=0;g<m;g+=4)p&=f[g+3];var y=255!=p,b=UPNG.encode.framize(e,t,n,a,o,s),v={},A=[],_=[];if(0!=r){var x=[];for(g=0;g<b.length;g++)x.push(b[g].img.buffer);var k=UPNG.encode.concatRGBA(x),w=UPNG.quantize(k,r),T=0,S=new Uint8Array(w.abuf);for(g=0;g<b.length;g++){var C=(q=b[g].img).length;for(_.push(new Uint8Array(w.inds.buffer,T>>2,C>>2)),h=0;h<C;h+=4)q[h]=S[T+h],q[h+1]=S[T+h+1],q[h+2]=S[T+h+2],q[h+3]=S[T+h+3];T+=C}for(g=0;g<w.plte.length;g++)A.push(w.plte[g].est.rgba)}else for(h=0;h<b.length;h++){var I=b[h],N=new Uint32Array(I.img.buffer),E=I.rect.width,P=(m=N.length,new Uint8Array(m));for(_.push(P),g=0;g<m;g++){var $=N[g];if(0!=g&&$==N[g-1])P[g]=P[g-1];else if(g>E&&$==N[g-E])P[g]=P[g-E];else{var R=v[$];if(null==R&&(v[$]=R=A.length,A.push($),A.length>=300))break;P[g]=R}}}var O=A.length;for(O<=256&&0==l&&(d=O<=2?1:O<=4?2:O<=16?4:8,d=Math.max(d,c)),h=0;h<b.length;h++){(I=b[h]).rect.x,I.rect.y,E=I.rect.width;var M=I.rect.height,D=I.img;new Uint32Array(D.buffer);var L=4*E,U=4;if(O<=256&&0==l){L=Math.ceil(d*E/8);for(var B=new Uint8Array(L*M),G=_[h],j=0;j<M;j++){g=j*L;var V=j*E;if(8==d)for(var F=0;F<E;F++)B[g+F]=G[V+F];else if(4==d)for(F=0;F<E;F++)B[g+(F>>1)]|=G[V+F]<<4-4*(1&F);else if(2==d)for(F=0;F<E;F++)B[g+(F>>2)]|=G[V+F]<<6-2*(3&F);else if(1==d)for(F=0;F<E;F++)B[g+(F>>3)]|=G[V+F]<<7-1*(7&F)}D=B,u=3,U=1}else if(0==y&&1==b.length){B=new Uint8Array(E*M*3);var z=E*M;for(g=0;g<z;g++){var q,W=4*g;B[q=3*g]=D[W],B[q+1]=D[W+1],B[q+2]=D[W+2]}D=B,u=2,U=3,L=3*E}I.img=D,I.bpl=L,I.bpp=U}return{ctype:u,depth:d,plte:A,frames:b}},UPNG.encode.framize=function(e,t,n,r,i,a){for(var o=[],s=0;s<e.length;s++){var c,l=new Uint8Array(e[s]),u=new Uint32Array(l.buffer),d=0,p=0,h=t,f=n,m=r?1:0;if(0!=s){for(var g=a||r||1==s||0!=o[s-2].dispose?1:2,y=0,b=1e9,v=0;v<g;v++){for(var A=new Uint8Array(e[s-1-v]),_=new Uint32Array(e[s-1-v]),x=t,k=n,w=-1,T=-1,S=0;S<n;S++)for(var C=0;C<t;C++)u[O=S*t+C]!=_[O]&&(C<x&&(x=C),C>w&&(w=C),S<k&&(k=S),S>T&&(T=S));-1==w&&(x=k=w=T=0),i&&(1==(1&x)&&x--,1==(1&k)&&k--);var I=(w-x+1)*(T-k+1);I<b&&(b=I,y=v,d=x,p=k,h=w-x+1,f=T-k+1)}A=new Uint8Array(e[s-1-y]),1==y&&(o[s-1].dispose=2),c=new Uint8Array(h*f*4),UPNG._copyTile(A,t,n,c,h,f,-d,-p,0),1==(m=UPNG._copyTile(l,t,n,c,h,f,-d,-p,3)?1:0)?UPNG.encode._prepareDiff(l,t,n,c,{x:d,y:p,width:h,height:f}):UPNG._copyTile(l,t,n,c,h,f,-d,-p,0)}else c=l.slice(0);o.push({rect:{x:d,y:p,width:h,height:f},img:c,blend:m,dispose:0})}if(r)for(s=0;s<o.length;s++)if(1!=(M=o[s]).blend){var N=M.rect,E=o[s-1].rect,P=Math.min(N.x,E.x),$=Math.min(N.y,E.y),R={x:P,y:$,width:Math.max(N.x+N.width,E.x+E.width)-P,height:Math.max(N.y+N.height,E.y+E.height)-$};o[s-1].dispose=1,s-1!=0&&UPNG.encode._updateFrame(e,t,n,o,s-1,R,i),UPNG.encode._updateFrame(e,t,n,o,s,R,i)}if(1!=e.length)for(var O=0;O<o.length;O++){var M;(M=o[O]).rect.width,M.rect.height}return o},UPNG.encode._updateFrame=function(e,t,n,r,i,a,o){for(var s=Uint8Array,c=Uint32Array,l=new s(e[i-1]),u=new c(e[i-1]),d=i+1<e.length?new s(e[i+1]):null,p=new s(e[i]),h=new c(p.buffer),f=t,m=n,g=-1,y=-1,b=0;b<a.height;b++)for(var v=0;v<a.width;v++){var A=a.x+v,_=a.y+b,x=_*t+A,k=h[x];0==k||0==r[i-1].dispose&&u[x]==k&&(null==d||0!=d[4*x+3])||(A<f&&(f=A),A>g&&(g=A),_<m&&(m=_),_>y&&(y=_))}-1==g&&(f=m=g=y=0),o&&(1==(1&f)&&f--,1==(1&m)&&m--),a={x:f,y:m,width:g-f+1,height:y-m+1};var w=r[i];w.rect=a,w.blend=1,w.img=new Uint8Array(a.width*a.height*4),0==r[i-1].dispose?(UPNG._copyTile(l,t,n,w.img,a.width,a.height,-a.x,-a.y,0),UPNG.encode._prepareDiff(p,t,n,w.img,a)):UPNG._copyTile(p,t,n,w.img,a.width,a.height,-a.x,-a.y,0)},UPNG.encode._prepareDiff=function(e,t,n,r,i){UPNG._copyTile(e,t,n,r,i.width,i.height,-i.x,-i.y,2)},UPNG.encode._filterZero=function(e,t,n,r,i,a,o){var s,c=[],l=[0,1,2,3,4];-1!=a?l=[a]:(t*r>5e5||1==n)&&(l=[0]),o&&(s={level:0});for(var u,d=UZIP,p=0;p<l.length;p++){for(var h=0;h<t;
319h++)UPNG.encode._filterLine(i,e,h,r,n,l[p]);c.push(d.deflate(i,s))}var f=1e9;for(p=0;p<c.length;p++)c[p].length<f&&(u=p,f=c[p].length);return c[u]},UPNG.encode._filterLine=function(e,t,n,r,i,a){var o=n*r,s=o+n,c=UPNG.decode._paeth;if(e[s]=a,s++,0==a)if(r<500)for(var l=0;l<r;l++)e[s+l]=t[o+l];else e.set(new Uint8Array(t.buffer,o,r),s);else if(1==a){for(l=0;l<i;l++)e[s+l]=t[o+l];for(l=i;l<r;l++)e[s+l]=t[o+l]-t[o+l-i]+256&255}else if(0==n){for(l=0;l<i;l++)e[s+l]=t[o+l];if(2==a)for(l=i;l<r;l++)e[s+l]=t[o+l];if(3==a)for(l=i;l<r;l++)e[s+l]=t[o+l]-(t[o+l-i]>>1)+256&255;if(4==a)for(l=i;l<r;l++)e[s+l]=t[o+l]-c(t[o+l-i],0,0)+256&255}else{if(2==a)for(l=0;l<r;l++)e[s+l]=t[o+l]+256-t[o+l-r]&255;if(3==a){for(l=0;l<i;l++)e[s+l]=t[o+l]+256-(t[o+l-r]>>1)&255;for(l=i;l<r;l++)e[s+l]=t[o+l]+256-(t[o+l-r]+t[o+l-i]>>1)&255}if(4==a){for(l=0;l<i;l++)e[s+l]=t[o+l]+256-c(0,t[o+l-r],0)&255;for(l=i;l<r;l++)e[s+l]=t[o+l]+256-c(t[o+l-i],t[o+l-r],t[o+l-i-r])&255}}},UPNG.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,r){for(var i=0;i<r;i++)e=UPNG.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UPNG.crc.update(4294967295,e,t,n)}},UPNG.quantize=function(e,t){var n,r=new Uint8Array(e),i=r.slice(0),a=new Uint32Array(i.buffer),o=UPNG.quantize.getKDtree(i,t),s=o[0],c=o[1],l=UPNG.quantize.planeDst,u=r,d=a,p=u.length,h=new Uint8Array(r.length>>2);if(r.length<2e7)for(var f=0;f<p;f+=4){var m=u[f]*(1/255),g=u[f+1]*(1/255),y=u[f+2]*(1/255),b=u[f+3]*(1/255);n=UPNG.quantize.getNearest(s,m,g,y,b),h[f>>2]=n.ind,d[f>>2]=n.est.rgba}else for(f=0;f<p;f+=4){for(m=u[f]*(1/255),g=u[f+1]*(1/255),y=u[f+2]*(1/255),b=u[f+3]*(1/255),n=s;n.left;)n=l(n.est,m,g,y,b)<=0?n.left:n.right;h[f>>2]=n.ind,d[f>>2]=n.est.rgba}return{abuf:i.buffer,inds:h,plte:c}},UPNG.quantize.getKDtree=function(e,t,n){null==n&&(n=1e-4);var r=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=UPNG.quantize.stats(e,i.i0,i.i1),i.est=UPNG.quantize.estats(i.bst);for(var a=[i];a.length<t;){for(var o=0,s=0,c=0;c<a.length;c++)a[c].est.L>o&&(o=a[c].est.L,s=c);if(o<n)break;var l=a[s],u=UPNG.quantize.splitPixels(e,r,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=u||l.i1<=u)l.est.L=0;else{var d={i0:l.i0,i1:u,bst:null,est:null,tdst:0,left:null,right:null};d.bst=UPNG.quantize.stats(e,d.i0,d.i1),d.est=UPNG.quantize.estats(d.bst);var p={i0:u,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};for(p.bst={R:[],m:[],N:l.bst.N-d.bst.N},c=0;c<16;c++)p.bst.R[c]=l.bst.R[c]-d.bst.R[c];for(c=0;c<4;c++)p.bst.m[c]=l.bst.m[c]-d.bst.m[c];p.est=UPNG.quantize.estats(p.bst),l.left=d,l.right=p,a[s]=d,a.push(p)}}for(a.sort((function(e,t){return t.bst.N-e.bst.N})),c=0;c<a.length;c++)a[c].ind=c;return[i,a]},UPNG.quantize.getNearest=function(e,t,n,r,i){if(null==e.left)return e.tdst=UPNG.quantize.dist(e.est.q,t,n,r,i),e;var a=UPNG.quantize.planeDst(e.est,t,n,r,i),o=e.left,s=e.right;a>0&&(o=e.right,s=e.left);var c=UPNG.quantize.getNearest(o,t,n,r,i);if(c.tdst<=a*a)return c;var l=UPNG.quantize.getNearest(s,t,n,r,i);return l.tdst<c.tdst?l:c},UPNG.quantize.planeDst=function(e,t,n,r,i){var a=e.e;return a[0]*t+a[1]*n+a[2]*r+a[3]*i-e.eMq},UPNG.quantize.dist=function(e,t,n,r,i){var a=t-e[0],o=n-e[1],s=r-e[2],c=i-e[3];return a*a+o*o+s*s+c*c},UPNG.quantize.splitPixels=function(e,t,n,r,i,a){var o=UPNG.quantize.vecDot;for(r-=4;n<r;){for(;o(e,n,i)<=a;)n+=4;for(;o(e,r,i)>a;)r-=4;if(n>=r)break;var s=t[n>>2];t[n>>2]=t[r>>2],t[r>>2]=s,n+=4,r-=4}for(;o(e,n,i)>a;)n-=4;return n+4},UPNG.quantize.vecDot=function(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]},UPNG.quantize.stats=function(e,t,n){for(var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],a=n-t>>2,o=t;o<n;o+=4){var s=e[o]*(1/255),c=e[o+1]*(1/255),l=e[o+2]*(1/255),u=e[o+3]*(1/255);i[0]+=s,i[1]+=c,i[2]+=l,i[3]+=u,r[0]+=s*s,r[1]+=s*c,r[2]+=s*l,r[3]+=s*u,r[5]+=c*c,r[6]+=c*l,r[7]+=c*u,r[10]+=l*l,r[11]+=l*u,r[15]+=u*u}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:a}},UPNG.quantize.estats=function(e){var t=e.R,n=e.m,r=e.N,i=n[0],a=n[1],o=n[2],s=n[3],c=0==r?0:1/r,l=[t[0]-i*i*c,t[1]-i*a*c,t[2]-i*o*c,t[3]-i*s*c,t[4]-a*i*c,t[5]-a*a*c,t[6]-a*o*c,t[7]-a*s*c,t[8]-o*i*c,t[9]-o*a*c,t[10]-o*o*c,t[11]-o*s*c,t[12]-s*i*c,t[13]-s*a*c,t[14]-s*o*c,t[15]-s*s*c],u=l,d=UPNG.M4,p=[Math.random(),Math.random(),Math.random(),Math.random()],h=0,f=0;if(0!=r)for(var m=0;m<16&&(p=d.multVec(u,p),f=Math.sqrt(d.dot(p,p)),p=d.sml(1/f,p),!(0!=m&&Math.abs(f-h)<1e-9));m++)h=f;var g=[i*c,a*c,o*c,s*c];return{Cov:l,q:g,e:p,L:h,eMq255:d.dot(d.sml(255,g),p),eMq:d.dot(p,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0])<<0)>>>0}},UPNG.M4={multVec:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]]},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},sml:function(e,t){return[e*t[0],e*t[1],e*t[2],e*t[3]]}},UPNG.encode.concatRGBA=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].byteLength;
319var r=new Uint8Array(t),i=0;for(n=0;n<e.length;n++){for(var a=new Uint8Array(e[n]),o=a.length,s=0;s<o;s+=4){var c=a[s],l=a[s+1],u=a[s+2],d=a[s+3];0==d&&(c=l=u=0),r[i+s]=c,r[i+s+1]=l,r[i+s+2]=u,r[i+s+3]=d}i+=o}return r.buffer};var MaxCanvasSize={chrome:16384,firefox:22528,safari:16384,"internet explorer":8192,etc:8192},isBrowser="undefined"!=typeof window,moduleMapper=isBrowser&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=isBrowser&&(moduleMapper&&moduleMapper.getOriginalSymbol(window,"File")||void 0!==window.File&&File),CustomFileReader=isBrowser&&(moduleMapper&&moduleMapper.getOriginalSymbol(window,"FileReader")||void 0!==window.FileReader&&FileReader);function getFilefromDataUrl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return new Promise((function(r){for(var i=e.split(","),a=i[0].match(/:(.*?);/)[1],o=globalThis.atob(i[1]),s=o.length,c=new Uint8Array(s);s--;)c[s]=o.charCodeAt(s);var l=new Blob([c],{type:a});l.name=t,l.lastModified=n,r(l)}))}function getDataUrlFromFile(e){return new Promise((function(t,n){var r=new CustomFileReader;r.onload=function(){return t(r.result)},r.onerror=function(e){return n(e)},r.readAsDataURL(e)}))}function loadImage(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=function(e){return n(e)},r.src=e}))}function getBrowserName(){var e="etc";return-1===navigator.userAgent.indexOf("Chrome")&&-1===navigator.userAgent.indexOf("Chromium")||(e="chrome"),-1!==navigator.userAgent.indexOf("Safari")?e="safari":-1!==navigator.userAgent.indexOf("Firefox")?e="firefox":-1===navigator.userAgent.indexOf("MSIE")&&1!=!!document.documentMode||(e="internet explorer"),e}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){for(var n=getBrowserName(),r=MaxCanvasSize[n],i=e,a=t,o=i*a,s=i>a?a/i:i/a;o>r*r;){var c=(r+i)/2,l=(r+a)/2;c<l?(a=l,i=l*s):(a=c*s,i=c),o=i*a}return{width:i,height:a}}function getNewCanvasAndCtx(e,t){var n,r;try{if(null===(r=(n=new OffscreenCanvas(e,t)).getContext("2d")))throw new Error("getContext of OffscreenCanvas returns null")}catch(e){r=(n=document.createElement("canvas")).getContext("2d")}return n.width=e,n.height=t,[n,r]}function drawImageInCanvas(e){var t=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),n=_slicedToArray(getNewCanvasAndCtx(t.width,t.height),2),r=n[0];return n[1].drawImage(e,0,0,r.width,r.height),r}function drawFileInCanvas(e){return new Promise((function(t,n){var r,i,a=function(){try{return i=drawImageInCanvas(r),t([r,i])}catch(e){return n(e)}},o=function(t){try{return getDataUrlFromFile(e).then((function(e){try{return loadImage(e).then((function(e){try{return r=e,a()}catch(e){return n(e)}}),n)}catch(e){return n(e)}}),n)}catch(e){return n(e)}};try{return createImageBitmap(e).then((function(e){try{return r=e,a()}catch(e){return o()}}),o)}catch(e){o()}}))}function canvasToFile(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return new Promise((function(a,o){var s,c,l;if("image/png"===t)return c=e.getContext("2d").getImageData(0,0,e.width,e.height).data,l=UPNG.encode([c],e.width,e.height,256*i),(s=new Blob([l],{type:t})).name=n,s.lastModified=r,d.call(this);{return"function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?e.convertToBlob({type:t,quality:i}).then(function(e){try{return(s=e).name=n,s.lastModified=r,u.call(this)}catch(e){return o(e)}}.bind(this),o):getFilefromDataUrl(e.toDataURL(t,i),n,r).then(function(e){try{return s=e,u.call(this)}catch(e){return o(e)}}.bind(this),o);function u(){return d.call(this)}}function d(){return a(s)}}))}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise((function(e,t){var n,r,i,a;return void 0!==isAutoOrientationInBrowser.result?e(isAutoOrientationInBrowser.result):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(o){try{return drawFileInCanvas(n=o).then((function(o){try{return canvasToFile(r=o[1],n.type,n.name,n.lastModified).then((function(n){try{return i=n,cleanupCanvasMemory(r),drawFileInCanvas(i).then((function(n){try{return a=n[0],isAutoOrientationInBrowser.result=1===a.width&&2===a.height,e
319(isAutoOrientationInBrowser.result)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}))}function getExifOrientation(e){return new Promise((function(t,n){var r=new CustomFileReader;r.onload=function(e){var n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);for(var r=n.byteLength,i=2;i<r;){if(n.getUint16(i+2,!1)<=8)return t(-1);var a=n.getUint16(i,!1);if(i+=2,65505==a){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);var o=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,o);var s=n.getUint16(i,o);i+=2;for(var c=0;c<s;c++)if(274==n.getUint16(i+12*c,o))return t(n.getUint16(i+12*c+8,o))}else{if(65280!=(65280&a))break;i+=n.getUint16(i,!1)}}return t(-1)},r.onerror=function(e){return n(e)},r.readAsArrayBuffer(e)}))}function handleMaxWidthOrHeight(e,t){var n,r=e.width,i=e.height,a=t.maxWidthOrHeight,o=e;if(isFinite(a)&&(r>a||i>a)){var s=_slicedToArray(getNewCanvasAndCtx(r,i),2);o=s[0],n=s[1],r>i?(o.width=a,o.height=i/r*a):(o.width=r/i*a,o.height=a),n.drawImage(e,0,0,o.width,o.height),cleanupCanvasMemory(e)}return o}function followExifOrientation(e,t){var n=e.width,r=e.height,i=_slicedToArray(getNewCanvasAndCtx(n,r),2),a=i[0],o=i[1];switch(t>4&&t<9?(a.width=r,a.height=n):(a.width=n,a.height=r),t){case 2:o.transform(-1,0,0,1,n,0);break;case 3:o.transform(-1,0,0,-1,n,r);break;case 4:o.transform(1,0,0,-1,0,r);break;case 5:o.transform(0,1,1,0,0,0);break;case 6:o.transform(0,1,-1,0,r,0);break;case 7:o.transform(0,-1,-1,0,r,n);break;case 8:o.transform(0,-1,1,0,0,n)}return o.drawImage(e,0,0,n,r),cleanupCanvasMemory(e),a}function compress(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise((function(r,i){var a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x;function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;a+=e,t.onProgress(Math.min(a,100))}function w(e){a=Math.min(Math.max(e,a),100),t.onProgress(a)}return a=n,o=t.maxIteration||10,s=1024*t.maxSizeMB*1024,k(),drawFileInCanvas(e).then(function(n){try{var a=_slicedToArray(n,2);return c=a[1],k(),l=handleMaxWidthOrHeight(c,t),k(),new Promise((function(n,r){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,a.call(this)}catch(e){return r(e)}}.bind(this),r);function a(){return n(i)}return a.call(this)})).then(function(n){try{return u=n,k(),isAutoOrientationInBrowser().then(function(n){try{return d=n?l:followExifOrientation(l,u),k(),p=t.initialQuality||1,h=t.fileType||e.type,canvasToFile(d,h,e.name,e.lastModified,p).then(function(t){try{{if(f=t,k(),m=f.size>s,g=f.size>e.size,!m&&!g)return w(100),r(f);var n;function a(){if(o--&&(v>s||v>y)){var t,n,r=_slicedToArray(getNewCanvasAndCtx(t=m?.95*x.width:x.width,n=m?.95*x.height:x.height),2);return _=r[0],r[1].drawImage(x,0,0,t,n),p*=.95,canvasToFile(_,h,e.name,e.lastModified,p).then((function(e){try{return A=e,cleanupCanvasMemory(x),x=_,v=A.size,w(Math.min(99,Math.floor((b-v)/(b-s)*100))),a}catch(e){return i(e)}}),i)}return[1]}return y=e.size,b=f.size,v=b,x=d,(n=function(e){for(;e;){if(e.then)return void e.then(n,i);try{if(e.pop){if(e.length)return e.pop()?u.call(this):e;e=a}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(a);function u(){return cleanupCanvasMemory(x),cleanupCanvasMemory(_),cleanupCanvasMemory(l),cleanupCanvasMemory(d),cleanupCanvasMemory(c),w(100),r(A)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}var charAt=stringMultibyte.charAt,STRING_ITERATOR="String Iterator",setInternalState$2=internalState.set,getInternalState=internalState.getterFor(STRING_ITERATOR);defineIterator(String,"String",(function(e){setInternalState$2(this,{type:STRING_ITERATOR,string:toString(e),index:0})}),(function(){var e,t=getInternalState(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=charAt(n,r),t.index+=e.length,{value:e,done:!1})}));var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ITERATOR$2=wellKnownSymbol("iterator"),TO_STRING_TAG=wellKnownSymbol("toStringTag"),ArrayValues=es_array_iterator.values;for(var COLLECTION_NAME$1 in domIterables){var Collection$1=global$1[COLLECTION_NAME$1],CollectionPrototype$1=Collection$1&&Collection$1.prototype;if(CollectionPrototype$1){if(CollectionPrototype$1[ITERATOR$2]!==ArrayValues)try{createNonEnumerableProperty(CollectionPrototype$1,ITERATOR$2,ArrayValues)}catch(e){CollectionPrototype$1[ITERATOR$2]=ArrayValues}if(CollectionPrototype$1[TO_STRING_TAG]||createNonEnumerableProperty(CollectionPrototype$1,TO_STRING_TAG,COLLECTION_NAME$1),domIterables[COLLECTION_NAME$1])for(var METHOD_NAME in es_array_iterator)if(CollectionPrototype$1[METHOD_NAME]!==e
319s_array_iterator[METHOD_NAME])try{createNonEnumerableProperty(CollectionPrototype$1,METHOD_NAME,es_array_iterator[METHOD_NAME])}catch(e){CollectionPrototype$1[METHOD_NAME]=es_array_iterator[METHOD_NAME]}}}var ITERATOR$1=wellKnownSymbol("iterator"),nativeUrl=!fails((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),isPure&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[ITERATOR$1]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://ÑеÑÑ").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),callWithSafeIterationClosing=function(e,t,n,r){try{return r?t(anObject(n)[0],n[1]):t(n)}catch(t){throw iteratorClose(e),t}},arrayFrom=function(e){var t,n,r,i,a,o,s=toObject(e),c="function"==typeof this?this:Array,l=arguments.length,u=l>1?arguments[1]:void 0,d=void 0!==u,p=getIteratorMethod(s),h=0;if(d&&(u=functionBindContext(u,l>2?arguments[2]:void 0,2)),null==p||c==Array&&isArrayIteratorMethod(p))for(n=new c(t=toLength(s.length));t>h;h++)o=d?u(s[h],h):s[h],createProperty(n,h,o);else for(a=(i=p.call(s)).next,n=new c;!(r=a.call(i)).done;h++)o=d?callWithSafeIterationClosing(i,u,[r.value,h],!0):r.value,createProperty(n,h,o);return n.length=h,n},maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexNonASCII=/[^\0-\u007E]/,regexSeparators=/[.\u3002\uFF0E\uFF61]/g,OVERFLOW_ERROR="Overflow: input needs wider integers to process",baseMinusTMin=base-tMin,floor$2=Math.floor,stringFromCharCode=String.fromCharCode,ucs2decode=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t},digitToBasic=function(e){return e+22+75*(e<26)},adapt=function(e,t,n){var r=0;for(e=n?floor$2(e/damp):e>>1,e+=floor$2(e/t);e>baseMinusTMin*tMax>>1;r+=base)e=floor$2(e/baseMinusTMin);return floor$2(r+(baseMinusTMin+1)*e/(e+skew))},encode=function(e){var t,n,r=[],i=(e=ucs2decode(e)).length,a=initialN,o=0,s=initialBias;for(t=0;t<e.length;t++)(n=e[t])<128&&r.push(stringFromCharCode(n));var c=r.length,l=c;for(c&&r.push(delimiter);l<i;){var u=maxInt;for(t=0;t<e.length;t++)(n=e[t])>=a&&n<u&&(u=n);var d=l+1;if(u-a>floor$2((maxInt-o)/d))throw RangeError(OVERFLOW_ERROR);for(o+=(u-a)*d,a=u,t=0;t<e.length;t++){if((n=e[t])<a&&++o>maxInt)throw RangeError(OVERFLOW_ERROR);if(n==a){for(var p=o,h=base;;h+=base){var f=h<=s?tMin:h>=s+tMax?tMax:h-s;if(p<f)break;var m=p-f,g=base-f;r.push(stringFromCharCode(digitToBasic(f+m%g))),p=floor$2(m/g)}r.push(stringFromCharCode(digitToBasic(p))),s=adapt(o,d,l==c),o=0,++l}}++o,++a}return r.join("")},stringPunycodeToAscii=function(e){var t,n,r=[],i=e.toLowerCase().replace(regexSeparators,".").split(".");for(t=0;t<i.length;t++)n=i[t],r.push(regexNonASCII.test(n)?"xn--"+encode(n):n);return r.join(".")},getIterator=function(e){var t=getIteratorMethod(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return anObject(t.call(e))},nativeFetch=getBuiltIn("fetch"),NativeRequest=getBuiltIn("Request"),RequestPrototype=NativeRequest&&NativeRequest.prototype,Headers$1=getBuiltIn("Headers"),ITERATOR=wellKnownSymbol("iterator"),URL_SEARCH_PARAMS="URLSearchParams",URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+"Iterator",setInternalState$1=internalState.set,getInternalParamsState=internalState.getterFor(URL_SEARCH_PARAMS),getInternalIteratorState=internalState.getterFor(URL_SEARCH_PARAMS_ITERATOR),plus=/\+/g,sequences=Array(4),percentSequence=function(e){return sequences[e-1]||(sequences[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},percentDecode=function(e){try{return decodeURIComponent(e)}catch(t){return e}},deserialize=function(e){var t=e.replace(plus," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(percentSequence(n--),percentDecode);return t}}
vendor: 4,991 bytes, line 319
319,find=/[!'()~]|%20/g,replace$1={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},replacer=function(e){return replace$1[e]},serialize=function(e){return encodeURIComponent(e).replace(find,replacer)},parseSearchParams=function(e,t){if(t)for(var n,r,i=t.split("&"),a=0;a<i.length;)(n=i[a++]).length&&(r=n.split("="),e.push({key:deserialize(r.shift()),value:deserialize(r.join("="))}))},updateSearchParams=function(e){this.entries.length=0,parseSearchParams(this.entries,e)},validateArgumentsLength=function(e,t){if(e<t)throw TypeError("Not enough arguments")},URLSearchParamsIterator=createIteratorConstructor((function(e,t){setInternalState$1(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(e).entries),kind:t})}),"Iterator",(function(){var e=getInternalIteratorState(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),URLSearchParamsConstructor=function(){anInstance(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var e,t,n,r,i,a,o,s,c,l=arguments.length>0?arguments[0]:void 0,u=this,d=[];if(setInternalState$1(u,{type:URL_SEARCH_PARAMS,entries:d,updateURL:function(){},updateSearchParams:updateSearchParams}),void 0!==l)if(isObject(l))if("function"==typeof(e=getIteratorMethod(l)))for(n=(t=e.call(l)).next;!(r=n.call(t)).done;){if((o=(a=(i=getIterator(anObject(r.value))).next).call(i)).done||(s=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");d.push({key:toString(o.value),value:toString(s.value)})}else for(c in l)has$1(l,c)&&d.push({key:c,value:toString(l[c])});else parseSearchParams(d,"string"==typeof l?"?"===l.charAt(0)?l.slice(1):l:toString(l))},URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;if(redefineAll(URLSearchParamsPrototype,{append:function(e,t){validateArgumentsLength(arguments.length,2);var n=getInternalParamsState(this);n.entries.push({key:toString(e),value:toString(t)}),n.updateURL()},delete:function(e){validateArgumentsLength(arguments.length,1);for(var t=getInternalParamsState(this),n=t.entries,r=toString(e),i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){validateArgumentsLength(arguments.length,1);for(var t=getInternalParamsState(this).entries,n=toString(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){validateArgumentsLength(arguments.length,1);for(var t=getInternalParamsState(this).entries,n=toString(e),r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){validateArgumentsLength(arguments.length,1);for(var t=getInternalParamsState(this).entries,n=toString(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){validateArgumentsLength(arguments.length,1);for(var n,r=getInternalParamsState(this),i=r.entries,a=!1,o=toString(e),s=toString(t),c=0;c<i.length;c++)(n=i[c]).key===o&&(a?i.splice(c--,1):(a=!0,n.value=s));a||i.push({key:o,value:s}),r.updateURL()},sort:function(){var e,t,n,r=getInternalParamsState(this),i=r.entries,a=i.slice();for(i.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=getInternalParamsState(this).entries,r=functionBindContext(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new URLSearchParamsIterator(this,"keys")},values:function(){return new URLSearchParamsIterator(this,"values")},entries:function(){return new URLSearchParamsIterator(this,"entries")}},{enumerable:!0}),redefine(URLSearchParamsPrototype,ITERATOR,URLSearchParamsPrototype.entries),redefine(URLSearchParamsPrototype,"toString",(function(){for(var e,t=getInternalParamsState(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(serialize(e.key)+"="+serialize(e.value));return n.join("&")}),{enumerable:!0}),setToStringTag(URLSearchParamsConstructor,URL_SEARCH_PARAMS),_export({global:!0,forced:!nativeUrl},{URLSearchParams:URLSearchParamsConstructor}),!nativeUrl&&"function"==typeof Headers$1){var wrapRequestOptions=function(e){if(isObject(e)){var t,n=e.body;if(classof(n)===URL_SEARCH_PARAMS)return(t=e.headers?new Headers$1(e.headers):new Headers$1).has("content-type")||t.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),objectCreate(e,{body:createPropertyDescriptor(0,String(n)),headers:createPropertyDescriptor(0,t)})}return e};if("function"==typeof nativeFetch&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return nativeFetch(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})}}),"function"==typeof NativeRequest){var RequestConstructor=function(e){return anInstance(this,RequestConstructor,"Request"),new NativeRequest(e,arguments.length>1?wrapRequestOptions(arguments[1]):{})};RequestPrototype.constructor=RequestConstructor,RequestConstructor.prototype=RequestPrototype,_export({global:!0,forced:!0},{Request:RequestConstructor})}}
vendor: 12,767 bytes, line 319
319var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState},codeAt=stringMultibyte.codeAt,NativeURL=global$1.URL,URLSearchParams$1=web_urlSearchParams.URLSearchParams,getInternalSearchParamsState=web_urlSearchParams.getState,setInternalState=internalState.set,getInternalURLState=internalState.getterFor("URL"),floor$1=Math.floor,pow=Math.pow,INVALID_AUTHORITY="Invalid authority",INVALID_SCHEME="Invalid scheme",INVALID_HOST="Invalid host",INVALID_PORT="Invalid port",ALPHA=/[A-Za-z]/,ALPHANUMERIC=/[\d+-.A-Za-z]/,DIGIT=/\d/,HEX_START=/^0x/i,OCT=/^[0-7]+$/,DEC=/^\d+$/,HEX=/^[\dA-Fa-f]+$/,FORBIDDEN_HOST_CODE_POINT=/[\0\t\n\r #%/:<>?@[\\\]^|]/,FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\0\t\n\r #/:<>?@[\\\]^|]/,LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,TAB_AND_NEW_LINE=/[\t\n\r]/g,EOF,parseHost=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return INVALID_HOST;if(!(n=parseIPv6(t.slice(1,-1))))return INVALID_HOST;e.host=n}else if(isSpecial(e)){if(t=stringPunycodeToAscii(t),FORBIDDEN_HOST_CODE_POINT.test(t))return INVALID_HOST;if(null===(n=parseIPv4(t)))return INVALID_HOST;e.host=n}else{if(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(t))return INVALID_HOST;for(n="",r=arrayFrom(t),i=0;i<r.length;i++)n+=percentEncode(r[i],C0ControlPercentEncodeSet);e.host=n}},parseIPv4=function(e){var t,n,r,i,a,o,s,c=e.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=c[r]))return e;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=HEX_START.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)o=0;else{if(!(10==a?DEC:8==a?OCT:HEX).test(i))return e;o=parseInt(i,a)}n.push(o)}for(r=0;r<t;r++)if(o=n[r],r==t-1){if(o>=pow(256,5-t))return null}else if(o>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*pow(256,3-r);return s},parseIPv6=function(e){var t,n,r,i,a,o,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,p=function(){return e.charAt(d)};if(":"==p()){if(":"!=e.charAt(1))return;d+=2,u=++l}for(;p();){if(8==l)return;if(":"!=p()){for(t=n=0;n<4&&HEX.test(p());)t=16*t+parseInt(p(),16),d++,n++;if("."==p()){if(0==n)return;if(d-=n,l>6)return;for(r=0;p();){if(i=null,r>0){if(!("."==p()&&r<4))return;d++}if(!DIGIT.test(p()))return;for(;DIGIT.test(p());){if(a=parseInt(p(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;d++}c[l]=256*c[l]+i,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;c[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(o=l-u,l=7;0!=l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!=l)return;return c},findLongestZeroSequence=function(e){for(var t=null,n=1,r=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(t=r,n=i),t},serializeHost=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=floor$1(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=findLongestZeroSequence(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},C0ControlPercentEncodeSet={},fragmentPercentEncodeSet=objectAssign({},C0ControlPercentEncodeSet,{" ":1,'"':1,"<":1,">":1,"`":1}),pathPercentEncodeSet=objectAssign({},fragmentPercentEncodeSet,{"#":1,"?":1,"{":1,"}":1}),userinfoPercentEncodeSet=objectAssign({},pathPercentEncodeSet,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),percentEncode=function(e,t){var n=codeAt(e,0);return n>32&&n<127&&!has$1(t,e)?e:encodeURIComponent(e)},specialSchemes={ftp:21,file:null,http:80,https:443,ws:80,wss:443},isSpecial=function(e){return has$1(specialSchemes,e.scheme)},includesCredentials=function(e){return""!=e.username||""!=e.password},cannotHaveUsernamePasswordPort=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},isWindowsDriveLetter=function(e,t){var n;return 2==e.length&&ALPHA.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},startsWithWindowsDriveLetter=function(e){var t;return e.length>1&&isWindowsDriveLetter(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},shortenURLsPath=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&isWindowsDriveLetter(t[0],!0)||t.pop()},isSingleDot=function(e){return"."===e||"%2e"===e.toLowerCase()},isDoubleDot=function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e},SCHEME_START={},SCHEME={},NO_SCHEME={},SPECIAL_RELATIVE_OR_AUTHORITY={},PATH_OR_AUTHORITY={},RELATIVE={},RELATIVE_SLASH={},SPECIAL_AUTHORITY_SLASHES={},SPECIAL_AUTHORITY_IGNORE_SLASHES={},AUTHORITY={},HOST={},HOSTNAME={},PORT={},FILE={},FILE_SLASH={},FILE_HOST={},PATH_START={},PATH={},CANNOT_BE_A_BASE_URL_PATH={},QUERY={},FRAGMENT={},parseURL=function(e,t,n,r){var i,a,o,s,c=n||SCHEME_START,l=0,u="",d=!1,p=!1,h=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE,"")),t=t.replace(TAB_AND_NEW_LINE,""),i=arrayFrom(t);l<=i.length;){switch(a=i[l],c){case SCHEME_START:if(!a||!ALPHA.test(a)){if(n)return INVALID_SCHEME;c=NO_SCHEME;continue}u+=a.toLowerCase(),c=SCHEME;break;case SCHEME:if(a&&(ALPHANUMERIC.test(a)||"+"==a||"-"==a||"."==a))u+=a.toLowerCase();else{if(":"!=a){if(n)return INVALID_SCHEME;u="",c=NO_SCHEME,l=0;continue}if(n&&(isSpecial(e)!=has$1(specialSchemes,u)||"file"==u&&(includesCredentials(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=u,n)return void(isSpecial(e)&&specialSchemes[e.scheme]==e.port&&(e.port=null));u="","file"==e.scheme?c=FILE:isSpecial(e)&&r&&r.scheme==e.scheme?c=SPECIAL_RELATIVE_OR_AUTHORITY:isSpecial(e)?c=SPECIAL_AUTHORITY_SLASHES:"/"==i[l+1]?(c=PATH_OR_AUTHORITY,l++):(e.cannotBeABaseURL=!0,e.path.push(""),c=CANNOT_BE_A_BASE_URL_PATH)}break;case NO_SCHEME:if(!r||r.cannotBeABaseURL&&"#"!=a)return INVALID_SCHEME;if(r.cannotBeABaseURL&&"#"==a){e.scheme=r.scheme,e.path=r.path.slice(),e.query=r.query,e.fragment="",e.cannotBeABaseURL=!0,c=FRAGMENT;break}c="file"==r.scheme?FILE:RELATIVE;continue;case SPECIAL_RELATIVE_OR_AUTHORITY:if("/"!=a||"/"!=i[l+1]){c=RELATIVE;continue}c=SPECIAL_AUTHORITY_IGNORE_SLASHES,l++;break;case PATH_OR_AUTHORITY:if("/"==a){c=AUTHORITY;break}c=PATH;continue;case RELATIVE:if(e.scheme=r.scheme,a==EOF)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query;else if("/"==a||"\\"==a&&isSpecial(e))c=RELATIVE_SLASH;else if("?"==a)e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query="",c=QUERY;else{if("#"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.path.pop(),c=PATH;continue}e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=FRAGMENT}break;case RELATIVE_SLASH:if(!isSpecial(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=r.username,e.password=r.password,e.host=r.host,e.port=r.port,c=PATH;continue}c=AUTHORITY}else c=SPECIAL_AUTHORITY_IGNORE_SLASHES;break;case SPECIAL_AUTHORITY_SLASHES:if(c=SPECIAL_AUTHORITY_IGNORE_SLASHES,"/"!=a||"/"!=u.charAt(l+1))continue;l++;break;case SPECIAL_AUTHORITY_IGNORE_SLASHES:if("/"!=a&&"\\"!=a){c=AUTHORITY;continue}break;case AUTHORITY:if("@"==a){d&&(u="%40"+u),d=!0,o=arrayFrom(u);for(var f=0;f<o.length;f++){var m=o[f];if(":"!=m||h){var g=percentEncode(m,userinfoPercentEncodeSet);h?e.password+=g:e.username+=g}else h=!0}u=""}else if(a==EOF||"/"==a||"?"==a||"#"==a||"\\"==a&&isSpecial(e)){if(d&&""==u)return INVALID_AUTHORITY;l-=arrayFrom(u).length+1,u="",c=HOST}else u+=a;break;case HOST:case HOSTNAME:if(n&&"file"==e.scheme){c=FILE_HOST;continue}if(":"!=a||p){if(a==EOF||"/"==a||"?"==a||"#"==a||"\\"==a&&isSpecial(e)){if(isSpecial(e)&&""==u)return INVALID_HOST;if(n&&""==u&&(includesCredentials(e)||null!==e.port))return;if(s=parseHost(e,u))return s;if(u="",c=PATH_START,n)return;continue}"["==a?p=!0:"]"==a&&(p=!1),u+=a}else{if(""==u)return INVALID_HOST;if(s=parseHost(e,u))return s;if(u="",c=PORT,n==HOSTNAME)return}break;case PORT:if(!DIGIT.test(a)){if(a==EOF||"/"==a||"?"==a||"#"==a||"\\"==a&&isSpecial(e)||n){if(""!=u){var y=parseInt(u,10);if(y>65535)return INVALID_PORT;e.port=isSpecial(e)&&y===specialSchemes[e.scheme]?null:y,u=""}if(n)return;c=PATH_START;continue}return INVALID_PORT}u+=a;break;case FILE:if(e.scheme="file","/"==a||"\\"==a)c=FILE_SLASH;else{if(!r||"file"!=r.scheme){c=PATH;continue}if(a==EOF)e.host=r.host,e.path=r.path.slice(),e.query=r.query;else if("?"==a)e.host=r.host,e.path=r.path.slice(),e.query="",c=QUERY;else{if("#"!=a){startsWithWindowsDriveLetter(i.slice(l).join(""))||(e.host=r.host,e.path=r.path.slice(),shortenURLsPath(e)),c=PATH;continue}e.host=r.host,e.path=r.path.slice(),e.query=r.query,e.fragment="",c=FRAGMENT}}break;case FILE_SLASH:if("/"==a||"\\"==a){c=FILE_HOST;break}r&&"file"==r.scheme&&!startsWithWindowsDriveLetter(i.slice(l).join(""))&&(isWindowsDriveLetter(r.path[0],!0)?e.path.push(r.path[0]):e.host=r.host),c=PATH;continue;case FILE_HOST:if(a==EOF||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&isWindowsDriveLetter(u))c=PATH;else if(""==u){if(e.host="",n)return;c=PATH_START}else{if(s=parseHost(e,u))return s;if("localhost"==e.host&&(e.host=""),n)return;u="",c=PATH_START}continue}u+=a;break;case PATH_START:if(isSpecial(e)){if(c=PATH,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=EOF&&(c=PATH,"/"!=a))continue}else e.fragment="",c=FRAGMENT;else e.query="",c=QUERY;break;case PATH:if(a==EOF||"/"==a||"\\"==a&&isSpecial(e)||!n&&("?"==a||"#"==a)){if(isDoubleDot(u)?(shortenURLsPath(e),"/"==a||"\\"==a&&isSpecial(e)||e.path.push("")):isSingleDot(u)?"/"==a||"\\"==a&&isSpecial(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&isWindowsDriveLetter(u)&&(e.host&&(e.host=""),u=u.charAt(0)+":"),e.path.push(u)),u="","file"==e.scheme&&(a==EOF||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",c=QUERY):"#"==a&&(e.fragment="",c=FRAGMENT)}else u+=percentEncode(a,pathPercentEncodeSet);break;case CANNOT_BE_A_BASE_URL_PATH:"?"==a?(e.query="",c=QUERY):"#"==a?(e.fragment="",c=FRAGMENT):a!=EOF&&(e.path[0]+=percentEncode(a,C0ControlPercentEncodeSet));break;case QUERY:n||"#"!=a?a!=EOF&&("'"==a&&isSpecial(e)?e.query+="%27":e.query+="#"==a?"%23":percentEncode(a,C0ControlPercentEncodeSet)):(e.fragment="",c=FRAGMENT);break;case FRAGMENT:a!=EOF&&(e.fragment+=percentEncode(a,fragmentPercentEncodeSet))}l++}},URLConstructor=function(e){var t,n,r=anInstance(this,URLConstructor,"URL"),i=arguments.length>1?arguments[1]:void 0,a=toString(e),o=setInternalState(r,{type:"URL"});if(void 0!==i)if(i instanceof URLConstructor)t=getInternalURLState(i);else if(n=parseURL(t={},toString(i)))throw TypeError(n);if(n=parseURL(o,a,null,t))throw TypeError(n);var s=o.searchParams=new URLSearchParams$1,c=getInternalSearchParamsState(s);c.updateSearchParams(o.query),c.updateURL=function(){o.query=String(s)||null},descriptors||(r.href=serializeURL.call(r),r.origin=getOrigin.call(r),r.protocol=getProtocol.call(r),r.username=getUsername.call(r),r.password=getPassword.call(r),r.host=getHost.call(r),r.hostname=getHostname.call(r),r.port=getPort.call(r),r.pathname=getPathname.call(r),r.search=getSearch.call(r),r.searchParams=getSearchParams.call(r),r.hash=getHash.call(r))},URLPrototype=URLConstructor.prototype,serializeURL=function(){var e=getInternalURLState(this),t=e.scheme,n=e.username,r=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,l=t+":";return null!==i?(l+="//",includesCredentials(e)&&(l+=n+(r?":"+r:"")+"@"),l+=serializeHost(i),null!==a&&(l+=":"+a)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?o[0]:o.length?"/"+o.join("/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},getOrigin=function(){var e=getInternalURLState(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URLConstructor(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&isSpecial(e)?t+"://"+serializeHost(e.host)+(null!==n?":"+n:""):"null"},getProtocol=function(){return getInternalURLState(this).scheme+":"},getUsername=function(){return getInternalURLState(this).username},getPassword=function(){return getInternalURLState(this).password},getHost=function(){var e=getInternalURLState(this),t=e.host,n=e.port;return null===t?"":null===n?serializeHost(t):serializeHost(t)+":"+n},getHostname=function(){var e=getInternalURLState(this).host;return null===e?"":serializeHost(e)},getPort=function(){var e=getInternalURLState(this).port;return null===e?"":String(e)},getPathname=function(){var e=getInternalURLState(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},getSearch=function(){var e=getInternalURLState(this).query;return e?"?"+e:""}
319,getSearchParams=function(){return getInternalURLState(this).searchParams},getHash=function(){var e=getInternalURLState(this).fragment;return e?"#"+e:""},accessorDescriptor=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(descriptors&&objectDefineProperties(URLPrototype,{href:accessorDescriptor(serializeURL,(function(e){var t=getInternalURLState(this),n=toString(e),r=parseURL(t,n);if(r)throw TypeError(r);getInternalSearchParamsState(t.searchParams).updateSearchParams(t.query)})),origin:accessorDescriptor(getOrigin),protocol:accessorDescriptor(getProtocol,(function(e){var t=getInternalURLState(this);parseURL(t,toString(e)+":",SCHEME_START)})),username:accessorDescriptor(getUsername,(function(e){var t=getInternalURLState(this),n=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=percentEncode(n[r],userinfoPercentEncodeSet)}})),password:accessorDescriptor(getPassword,(function(e){var t=getInternalURLState(this),n=arrayFrom(toString(e));if(!cannotHaveUsernamePasswordPort(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=percentEncode(n[r],userinfoPercentEncodeSet)}})),host:accessorDescriptor(getHost,(function(e){var t=getInternalURLState(this);t.cannotBeABaseURL||parseURL(t,toString(e),HOST)})),hostname:accessorDescriptor(getHostname,(function(e){var t=getInternalURLState(this);t.cannotBeABaseURL||parseURL(t,toString(e),HOSTNAME)})),port:accessorDescriptor(getPort,(function(e){var t=getInternalURLState(this);cannotHaveUsernamePasswordPort(t)||(""==(e=toString(e))?t.port=null:parseURL(t,e,PORT))})),pathname:accessorDescriptor(getPathname,(function(e){var t=getInternalURLState(this);t.cannotBeABaseURL||(t.path=[],parseURL(t,toString(e),PATH_START))})),search:accessorDescriptor(getSearch,(function(e){var t=getInternalURLState(this);""==(e=toString(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",parseURL(t,e,QUERY)),getInternalSearchParamsState(t.searchParams).updateSearchParams(t.query)})),searchParams:accessorDescriptor(getSearchParams),hash:accessorDescriptor(getHash,(function(e){var t=getInternalURLState(this);""!=(e=toString(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",parseURL(t,e,FRAGMENT)):t.fragment=null}))}),redefine(URLPrototype,"toJSON",(function(){return serializeURL.call(this)}),{enumerable:!0}),redefine(URLPrototype,"toString",(function(){return serializeURL.call(this)}),{enumerable:!0}),NativeURL){var nativeCreateObjectURL=NativeURL.createObjectURL,nativeRevokeObjectURL=NativeURL.revokeObjectURL;nativeCreateObjectURL&&redefine(URLConstructor,"createObjectURL",(function(e){return nativeCreateObjectURL.apply(NativeURL,arguments)})),nativeRevokeObjectURL&&redefine(URLConstructor,"revokeObjectURL",(function(e){return nativeRevokeObjectURL.apply(NativeURL,arguments)}))}setToStringTag(URLConstructor,"URL"),_export({global:!0,forced:!nativeUrl,sham:!descriptors},{URL:URLConstructor});var $forEach=arrayIteration.forEach,STRICT_METHOD=arrayMethodIsStrict("forEach"),arrayForEach=STRICT_METHOD?[].forEach:function(e){return $forEach(this,e,arguments.length>1?arguments[1]:void 0)};for(var COLLECTION_NAME in domIterables){var Collection=global$1[COLLECTION_NAME],CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype&&CollectionPrototype.forEach!==arrayForEach)try{createNonEnumerableProperty(CollectionPrototype,"forEach",arrayForEach)}catch(e){CollectionPrototype.forEach=arrayForEach}}var propertyIsEnumerable=objectPropertyIsEnumerable.f,createMethod=function(e){return function(t){for(var n,r=toIndexedObject(t),i=objectKeys(r),a=i.length,o=0,s=[];a>o;)n=i[o++],descriptors&&!propertyIsEnumerable.call(r,n)||s.push(e?[n,r[n]]:r[n]);return s}},objectToArray={entries:createMethod(!0),values:createMethod(!1)},$entries=objectToArray.entries;_export({target:"Object",stat:!0},{entries:function(e){return $entries(e)}});var notARegexp=function(e){if(isRegexp(e))throw TypeError("The method doesn't accept regular expressions");return e},MATCH=wellKnownSymbol("match"),correctIsRegexpLogic=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[MATCH]=!1,"/./"[e](t)}catch(e){}}return!1},getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,$startsWith="".startsWith,min$1=Math.min,CORRECT_IS_REGEXP_LOGIC=correctIsRegexpLogic("startsWith"),MDN_POLYFILL_BUG=!(CORRECT_IS_REGEXP_LOGIC||(
319descriptor=getOwnPropertyDescriptor(String.prototype,"startsWith"),!descriptor||descriptor.writable)),descriptor;_export({target:"String",proto:!0,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function(e){var t=toString(requireObjectCoercible(this));notARegexp(e);var n=toLength(min$1(arguments.length>1?arguments[1]:void 0,t.length)),r=toString(e);return $startsWith?$startsWith.call(t,r,n):t.slice(n,n+r.length)===r}});var floor=Math.floor,replace="".replace,SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,c=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==i&&(i=toObject(i),c=SUBSTITUTION_SYMBOLS),replace.call(a,c,(function(a,c){var l;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":l=i[c.slice(1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var d=floor(u/10);return 0===d?a:d<=s?void 0===r[d-1]?c.charAt(1):r[d-1]+c.charAt(1):a}l=r[u-1]}return void 0===l?"":l}))},REPLACE=wellKnownSymbol("replace"),max=Math.max,min=Math.min,maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}));fixRegexpWellKnownSymbolLogic("replace",(function(e,t,n){var r=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,n){var r=requireObjectCoercible(this),i=null==e?void 0:e[REPLACE];return void 0!==i?i.call(e,r,n):t.call(toString(r),e,n)},function(e,i){var a=anObject(this),o=toString(e);if("string"==typeof i&&-1===i.indexOf(r)&&-1===i.indexOf("$<")){var s=n(t,a,o,i);if(s.done)return s.value}var c="function"==typeof i;c||(i=toString(i));var l=a.global;if(l){var u=a.unicode;a.lastIndex=0}for(var d=[];;){var p=regexpExecAbstract(a,o);if(null===p)break;if(d.push(p),!l)break;""===toString(p[0])&&(a.lastIndex=advanceStringIndex(o,toLength(a.lastIndex),u))}for(var h="",f=0,m=0;m<d.length;m++){p=d[m];for(var g=toString(p[0]),y=max(min(toInteger(p.index),o.length),0),b=[],v=1;v<p.length;v++)b.push(maybeToString(p[v]));var A=p.groups;if(c){var _=[g].concat(b,y,o);void 0!==A&&_.push(A);var x=toString(i.apply(void 0,_))}else x=getSubstitution(g,o,y,b,A,i);y>=f&&(h+=o.slice(f,y)+x,f=y+g.length)}return h+o.slice(f)}]}),!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);var IS_CONCAT_SPREADABLE=wellKnownSymbol("isConcatSpreadable"),MAX_SAFE_INTEGER=9007199254740991,MAXIMUM_ALLOWED_INDEX_EXCEEDED="Maximum allowed index exceeded",IS_CONCAT_SPREADABLE_SUPPORT=engineV8Version>=51||!fails((function(){var e=[];return e[IS_CONCAT_SPREADABLE]=!1,e.concat()[0]!==e})),SPECIES_SUPPORT=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(e){if(!isObject(e))return!1;var t=e[IS_CONCAT_SPREADABLE];return void 0!==t?!!t:isArray(e)},FORCED=!IS_CONCAT_SPREADABLE_SUPPORT||!SPECIES_SUPPORT;_export({target:"Array",proto:!0,forced:FORCED},{concat:function(e){var t,n,r,i,a,o=toObject(this),s=arraySpeciesCreate(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(isConcatSpreadable(a=-1===t?o:arguments[t])){if(c+(i=toLength(a.length))>MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);for(n=0;n<i;n++,c++)n in a&&createProperty(s,c,a[n])}else{if(c>=MAX_SAFE_INTEGER)throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);createProperty(s,c++,a)}return s.length=c,s}});var cnt=0,imageCompressionLibUrl,worker;function createWorker(e){return"function"==typeof e&&(e="(".concat(e,")()")),new Worker(URL.createObjectURL(new Blob([e])))}function createSourceObject(e){return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}function stringify(e){return JSON.stringify(e,(function(e,t){return"function"==typeof t?"BIC_FN:::(function () { return ".concat(t.toString()," })()"):t}))}function parse(o){if("string"==typeof o)return o;var result={};
319return Object.entries(o).forEach((function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];if("string"==typeof value&&value.startsWith("BIC_FN:::"))try{result[key]=eval(value.replace(/^BIC_FN:::/,""))}catch(e){throw e}else result[key]=parse(value)})),result}function generateLib(){return createSourceObject("\n // reconstruct library\n function imageCompression (){return (".concat(imageCompression,").apply(null, arguments)}\n\n imageCompression.getDataUrlFromFile = ").concat(imageCompression.getDataUrlFromFile,"\n imageCompression.getFilefromDataUrl = ").concat(imageCompression.getFilefromDataUrl,"\n imageCompression.loadImage = ").concat(imageCompression.loadImage,"\n imageCompression.drawImageInCanvas = ").concat(imageCompression.drawImageInCanvas,"\n imageCompression.drawFileInCanvas = ").concat(imageCompression.drawFileInCanvas,"\n imageCompression.canvasToFile = ").concat(imageCompression.canvasToFile,"\n imageCompression.getExifOrientation = ").concat(imageCompression.getExifOrientation,"\n imageCompression.handleMaxWidthOrHeight = ").concat(imageCompression.handleMaxWidthOrHeight,"\n imageCompression.followExifOrientation = ").concat(imageCompression.followExifOrientation,"\n imageCompression.cleanupCanvasMemory = ").concat(imageCompression.cleanupCanvasMemory,"\n imageCompression.isAutoOrientationInBrowser = ").concat(imageCompression.isAutoOrientationInBrowser,"\n imageCompression.approximateBelowMaximumCanvasSizeOfBrowser = ").concat(imageCompression.approximateBelowMaximumCanvasSizeOfBrowser,"\n imageCompression.getBrowserName = ").concat(imageCompression.getBrowserName,"\n\n // functions / objects\n getDataUrlFromFile = imageCompression.getDataUrlFromFile\n getFilefromDataUrl = imageCompression.getFilefromDataUrl\n loadImage = imageCompression.loadImage\n drawImageInCanvas = imageCompression.drawImageInCanvas\n drawFileInCanvas = imageCompression.drawFileInCanvas\n canvasToFile = imageCompression.canvasToFile\n getExifOrientation = imageCompression.getExifOrientation\n handleMaxWidthOrHeight = imageCompression.handleMaxWidthOrHeight\n followExifOrientation = imageCompression.followExifOrientation\n cleanupCanvasMemory = imageCompression.cleanupCanvasMemory\n isAutoOrientationInBrowser = imageCompression.isAutoOrientationInBrowser\n approximateBelowMaximumCanvasSizeOfBrowser = imageCompression.approximateBelowMaximumCanvasSizeOfBrowser\n getBrowserName = imageCompression.getBrowserName\n \n getNewCanvasAndCtx = ").concat(getNewCanvasAndCtx,"\n CustomFileReader = FileReader\n CustomFile = File\n MaxCanvasSize = ").concat(JSON.stringify(MaxCanvasSize),"\n function compress (){return (").concat(compress,").apply(null, arguments)}\n\n // core-js\n function _slicedToArray(arr, n) { return arr }\n function _typeof(a) { return typeof a }\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n \n Object.assign(target, source)\n }\n \n return target;\n }\n\n // Libraries\n const parse = ").concat(parse,"\n const UPNG = {}\n UPNG.toRGBA8 = ").concat(UPNG.toRGBA8,"\n UPNG.toRGBA8.decodeImage = ").concat(UPNG.toRGBA8.decodeImage,"\n UPNG.decode = ").concat(UPNG.decode,"\n UPNG.decode._decompress = ").concat(UPNG.decode._decompress,"\n UPNG.decode._inflate = ").concat(UPNG.decode._inflate,"\n UPNG.decode._readInterlace = ").concat(UPNG.decode._readInterlace,"\n UPNG.decode._getBPP = ").concat(UPNG.decode._getBPP," \n UPNG.decode._filterZero = ").concat(UPNG.decode._filterZero,"\n UPNG.decode._paeth = ").concat(UPNG.decode._paeth,"\n UPNG.decode._IHDR = ").concat(UPNG.decode._IHDR,"\n UPNG._bin = parse(").concat(stringify(UPNG._bin),")\n UPNG._copyTile = ").concat(UPNG._copyTile,"\n UPNG.encode = ").concat(UPNG.encode,"\n UPNG.encodeLL = ").concat(UPNG.encodeLL," \n UPNG.encode._main = ").concat(UPNG.encode._main,"\n UPNG.encode.compressPNG = ").concat(UPNG.encode.compressPNG," \n UPNG.encode.compress = ").concat(UPNG.encode.compress,"\n UPNG.encode.framize = ").concat(UPNG.encode.framize," \n UPNG.encode._updateFrame = ").concat(UPNG.encode._updateFrame," \n UPNG.encode._prepareDiff = ").concat(UPNG.encode._prepareDiff," \n UPNG.encode._filterZero = ").concat(UPNG.encode._filterZero," \n UPNG.encode._filterLine = ").concat(UPNG.encode._filterLine,"\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,"\n UPNG.crc = parse(").concat(stringify(UPNG.crc),")\n UPNG.crc.table = ( function() {\
319n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n UPNG.quantize = ").concat(UPNG.quantize," \n UPNG.quantize.getKDtree = ").concat(UPNG.quantize.getKDtree," \n UPNG.quantize.getNearest = ").concat(UPNG.quantize.getNearest," \n UPNG.quantize.planeDst = ").concat(UPNG.quantize.planeDst," \n UPNG.quantize.dist = ").concat(UPNG.quantize.dist," \n UPNG.quantize.splitPixels = ").concat(UPNG.quantize.splitPixels," \n UPNG.quantize.vecDot = ").concat(UPNG.quantize.vecDot," \n UPNG.quantize.stats = ").concat(UPNG.quantize.stats," \n UPNG.quantize.estats = ").concat(UPNG.quantize.estats,"\n UPNG.M4 = parse(").concat(stringify(UPNG.M4),")\n UPNG.encode.concatRGBA = ").concat(UPNG.encode.concatRGBA,'\n UPNG.inflateRaw=function(){\n var H={};H.H={};H.H.N=function(N,W){var R=Uint8Array,i=0,m=0,J=0,h=0,Q=0,X=0,u=0,w=0,d=0,v,C;\n if(N[0]==3&&N[1]==0)return W?W:new R(0);var V=H.H,n=V.b,A=V.e,l=V.R,M=V.n,I=V.A,e=V.Z,b=V.m,Z=W==null;\n if(Z)W=new R(N.length>>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7);\n var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3;\n w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257;\n h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0;\n c<Q;c++){var K=A(N,d+c*3,3);b.Q[(b.X[c]<<1)+1]=K;if(K>j)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d;\n d=l(b.u,(1<<j)-1,J+h,N,d,b.v);var r=V.V(b.v,0,J,b.C);X=(1<<r)-1;var S=V.V(b.v,J,h,b.D);u=(1<<S)-1;M(b.C,r);\n I(b.C,r,v);M(b.D,S);I(b.D,S,C)}while(!0){var T=v[e(N,d)&X];d+=T&15;var p=T>>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254;\n if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15);\n d+=Y&15;while(w<z){W[w]=W[w++-a];W[w]=W[w++-a];W[w]=W[w++-a];W[w]=W[w++-a]}w=z}}}return W.length==w?W:W.slice(0,w)};\n H.H.W=function(N,W){var R=N.length;if(W<=R)return N;var V=new Uint8Array(R<<1);V.set(N,0);return V};\n H.H.R=function(N,W,R,V,n,A){var l=H.H.e,M=H.H.Z,I=0;while(I<R){var e=N[M(V,n)&W];n+=e&15;var b=e>>>4;\n if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3);\n n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I<J){A[I]=Z;I++}}}return n};H.H.V=function(N,W,R,V){var n=0,A=0,l=V.length>>>1;\n while(A<R){var M=N[A+W];V[A<<1]=0;V[(A<<1)+1]=M;if(M>n)n=M;A++}while(A<l){V[A<<1]=0;V[(A<<1)+1]=0;A++}return n};\n H.H.n=function(N,W){var R=H.H.m,V=N.length,n,A,l,M,I,e=R.j;for(var M=0;M<=W;M++)e[M]=0;for(M=1;M<V;M+=2)e[N[M]]++;\n var b=R.K;n=0;e[0]=0;for(A=1;A<=W;A++){n=n+e[A-1]<<1;b[A]=n}for(l=0;l<V;l+=2){I=N[l+1];if(I!=0){N[l]=b[I];\n b[I]++}}};H.H.A=function(N,W,R){var V=N.length,n=H.H.m,A=n.r;for(var l=0;l<V;l+=2)if(N[l+1]!=0){var M=l>>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<<b,m=Z+(1<<b);\n while(Z!=m){var J=A[Z]>>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n<N.length;\n n+=2){var A=N[n]<<W-N[n+1];N[n]=R[A]>>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8};\n H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<<R)-1};\n H.H.b=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<<R)-1};H.H.Z=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)};\n H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array;\n return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}();\n (function(){var N=H.H.m,W=1<<15;for(var R=0;R<W;R++){var V=R;V=(V&2863311530)>>>1|(V&1431655765)<<1;\n V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8;\n N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R];\n N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9);\n H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0);\n n(N.D,30,0);n(N.v,320,0)}());return H.H.N}
319()\n \n const UZIP = {}\n UZIP["parse"] = ').concat(UZIP_1.parse,"\n UZIP._readLocal = ").concat(UZIP_1._readLocal,"\n UZIP.inflateRaw = ").concat(UZIP_1.inflateRaw,"\n UZIP.inflate = ").concat(UZIP_1.inflate,"\n UZIP.deflate = ").concat(UZIP_1.deflate,"\n UZIP.deflateRaw = ").concat(UZIP_1.deflateRaw,"\n UZIP.encode = ").concat(UZIP_1.encode,"\n UZIP._noNeed = ").concat(UZIP_1._noNeed,"\n UZIP._writeHeader = ").concat(UZIP_1._writeHeader,"\n UZIP.crc = parse(").concat(stringify(UZIP_1.crc),")\n UZIP.crc.table = ( function() {\n var tab = new Uint32Array(256);\n for (var n=0; n<256; n++) {\n var c = n;\n for (var k=0; k<8; k++) {\n if (c & 1) c = 0xedb88320 ^ (c >>> 1);\n else c = c >>> 1;\n }\n tab[n] = c; }\n return tab; })()\n \n UZIP.adler = ").concat(UZIP_1.adler,"\n UZIP.bin = parse(").concat(stringify(UZIP_1.bin),")\n UZIP.F = {}\n UZIP.F.deflateRaw = ").concat(UZIP_1.F.deflateRaw,"\n UZIP.F._bestMatch = ").concat(UZIP_1.F._bestMatch,"\n UZIP.F._howLong = ").concat(UZIP_1.F._howLong,"\n UZIP.F._hash = ").concat(UZIP_1.F._hash,"\n UZIP.saved = ").concat(UZIP_1.saved,"\n UZIP.F._writeBlock = ").concat(UZIP_1.F._writeBlock,"\n UZIP.F._copyExact = ").concat(UZIP_1.F._copyExact,"\n UZIP.F.getTrees = ").concat(UZIP_1.F.getTrees,"\n UZIP.F.getSecond = ").concat(UZIP_1.F.getSecond,"\n UZIP.F.nonZero = ").concat(UZIP_1.F.nonZero,"\n UZIP.F.contSize = ").concat(UZIP_1.F.contSize,"\n UZIP.F._codeTiny = ").concat(UZIP_1.F._codeTiny," \n UZIP.F._lenCodes = ").concat(UZIP_1.F._lenCodes," \n UZIP.F._hufTree = ").concat(UZIP_1.F._hufTree," \n UZIP.F.setDepth = ").concat(UZIP_1.F.setDepth," \n UZIP.F.restrictDepth = ").concat(UZIP_1.F.restrictDepth,"\n UZIP.F._goodIndex = ").concat(UZIP_1.F._goodIndex," \n UZIP.F._writeLit = ").concat(UZIP_1.F._writeLit," \n UZIP.F.inflate = ").concat(UZIP_1.F.inflate," \n UZIP.F._check = ").concat(UZIP_1.F._check," \n UZIP.F._decodeTiny = ").concat(UZIP_1.F._decodeTiny," \n UZIP.F._copyOut = ").concat(UZIP_1.F._copyOut," \n UZIP.F.makeCodes = ").concat(UZIP_1.F.makeCodes," \n UZIP.F.codes2map = ").concat(UZIP_1.F.codes2map," \n UZIP.F.revCodes = ").concat(UZIP_1.F.revCodes," \n\n // used only in deflate\n UZIP.F._putsE = ").concat(UZIP_1.F._putsE,"\n UZIP.F._putsF = ").concat(UZIP_1.F._putsF,"\n \n UZIP.F._bitsE = ").concat(UZIP_1.F._bitsE,"\n UZIP.F._bitsF = ").concat(UZIP_1.F._bitsF,"\n\n UZIP.F._get17 = ").concat(UZIP_1.F._get17,"\n UZIP.F._get25 = ").concat(UZIP_1.F._get25,"\n UZIP.F.U = function(){\n var u16=Uint16Array, u32=Uint32Array;\n return {\n next_code : new u16(16),\n bl_count : new u16(16),\n ordr : [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ],\n of0 : [3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],\n exb : [0,0,0,0,0,0,0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],\n ldef : new u16(32),\n df0 : [1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577, 65535, 65535],\n dxb : [0,0,0,0,1,1,2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],\n ddef : new u32(32),\n flmap: new u16( 512), fltree: [],\n fdmap: new u16( 32), fdtree: [],\n lmap : new u16(32768), ltree : [], ttree:[],\n dmap : new u16(32768), dtree : [],\n imap : new u16( 512), itree : [],\n //rev9 : new u16( 512)\n rev15: new u16(1<<15),\n lhst : new u32(286), dhst : new u32( 30), ihst : new u32(19),\n lits : new u32(15000),\n strt : new u16(1<<16),\n prev : new u16(1<<15)\n };\n } ();\n\n (function(){\n var U = UZIP.F.U;\n var len = 1<<15;\n for(var i=0; i<len; i++) {\n var x = i;\n x = (((x & 0xaaaaaaaa) >>> 1) | ((x & 0x55555555) << 1));\n x = (((x & 0xcccccccc) >>> 2) | ((x & 0x33333333) << 2));\n x = (((x & 0xf0f0f0f0) >>> 4) | ((x & 0x0f0f0f0f) << 4));\n x = (((x & 0xff00ff00) >>> 8) | ((x & 0x00ff00ff) << 8));\n U.rev15[i] = (((x >>> 16) | (x << 16)))>>>17;\n }\n \n function pushV(tgt, n, sv) { while(n--!=0) tgt.push(0,sv); }\n \n for(var i=0; i<32; i++) { U.ldef[i]=(U.of0[i]<<3)|U.exb[i]; U.ddef[i]=(U.df0[i]<<4)|U.dxb[i]; }\n \n pushV(U.fltree, 144, 8); pushV(U.fltree, 255-143, 9); pushV(U.fltree, 279-255, 7); pushV(U.fltree,287-279,8);\n /*\n var i = 0;\n for(; i<=143; i++) U.fltree.push(0,8);\n for(; i<=255; i++) U.fltree.push(0,9);\n for(; i<=279; i++) U.fltree.push(0,7);\n for(; i<=287; i++) U.fltree.push(0,8);\n */\n UZIP.F.makeCodes(U.fltree, 9);\n UZIP.F.codes2map(U.fltree, 9, U.flmap);\n UZIP.F.revCodes (U.fltree, 9)\n \n pushV(U.fdtree,32,5);\n //for(i=0;i<32; i++) U.fdtree.push(0,5);\n UZIP.F.makeCodes(U.fdtree, 5);\n UZIP.F.codes2map(U.fdtree, 5, U.fdmap);\n UZIP.F.revCodes (U.fdtree, 5)\n \n pushV(U.itree,19,0); pushV(U.ltree,286,0); pushV(U.dtree,30,0); pushV(U.ttree,320,0);\n /*\n for(var i=0; i< 19; i++) U.itree.push(0,0);\n for(var i=0; i<286; i++) U.ltree.push(0,0);\n for(var i=0; i< 30; i++) U.dtree.push(0,0);\n for(var i=0; i<320; i++) U.ttree.push(0,0);\n */\n })()\n "))}function generateWorkerScript(){return createWorker("\n let scriptImported = false\n self.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id }
319)\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n })\n ")}function compressOnWebWorker(e,t){return new Promise((function(n,r){return new Promise((function(i,a){var o=cnt++;return imageCompressionLibUrl||(imageCompressionLibUrl=generateLib()),worker||(worker=generateWorkerScript()),worker.addEventListener("message",(function e(i){if(i.data.id===o){if(void 0!==i.data.progress)return void t.onProgress(i.data.progress);worker.removeEventListener("message",e),i.data.error&&r(new Error(i.data.error)),n(i.data.file)}})),worker.addEventListener("error",r),worker.postMessage({file:e,id:o,imageCompressionLibUrl:imageCompressionLibUrl,options:_objectSpread2(_objectSpread2({},t),{},{onProgress:void 0})}),i()}))}))}function imageCompression(e,t){return new Promise((function(n,r){var i,a,o,s,c,l;if(i=_objectSpread2({},t),o=0,s=i.onProgress,i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,c="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=function(e){o=e,"function"==typeof s&&s(o)},!(e instanceof Blob||e instanceof CustomFile))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return r(new Error("The file given is not an image"));if(l="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||l)return compress(e,i).then(function(e){try{return a=e,p.call(this)}catch(e){return r(e)}}.bind(this),r);var u=function(){try{return p.call(this)}catch(e){return r(e)}}.bind(this),d=function(t){try{return compress(e,i).then((function(e){try{return a=e,u()}catch(e){return r(e)}}),r)}catch(e){return r(e)}};try{return compressOnWebWorker(e,i).then((function(e){try{return a=e,u()}catch(e){return d()}}),d)}catch(e){d()}function p(){try{a.name=e.name,a.lastModified=e.lastModified}catch(e){}return n(a)}}))}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.getBrowserName=getBrowserName,imageCompression.version="1.0.15";const FuzzySet=function(e,t,n,r){var i={};e=e||[],i.gramSizeLower=n||2,i.gramSizeUpper=r||3,i.useLevenshtein="boolean"!=typeof t||t,i.exactSet={},i.matchDict={},i.items={};var a=function(e,t){if(null===e&&null===t)throw"Trying to compare two null values";if(null===e||null===t)return 0;var n=function(e,t){for(var n,r,i=[],a=0;a<=t.length;a++)for(var o=0;o<=e.length;o++)r=a&&o?e.charAt(o-1)===t.charAt(a-1)?n:Math.min(i[o],i[o-1],n)+1:a+o,n=i[o],i[o]=r;return i.pop()}(e=String(e),t=String(t));return e.length>t.length?1-n/e.length:1-n/t.length},o=/[^a-zA-Z0-9\u00C0-\u00FF, ]+/g,s=function(e,t){for(var n={},r=function(e,t){t=t||2;var n="-"+e.toLowerCase().replace(o,"")+"-",r=t-n.length,i=[];if(r>0)for(var a=0;a<r;++a)n+="-";for(a=0;a<n.length-t+1;++a)i.push(n.slice(a,a+t));return i}(e,t=t||2),i=0;i<r.length;++i)r[i]in n?n[r[i]]+=1:n[r[i]]=1;return n};i.get=function(e,t,n){void 0===n&&(n=.33);var r=this._get(e,n);return r||void 0===t?r:t},i._get=function(e,t){for(var n=[],r=this.gramSizeUpper;r>=this.gramSizeLower;--r)if((n=this.__get(e,r,t))&&n.length>0)return n;return null},i.__get=function(e,t,n){var r,i,o,c,l=this._normalizeStr(e),u={},d=s(l,t),p=this.items[t],h=0;for(r in d)if(i=d[r],h+=Math.pow(i,2),r in this.matchDict)for(_=0;_<this.matchDict[r].length;
319++_)o=this.matchDict[r][_][0],c=this.matchDict[r][_][1],o in u?u[o]+=i*c:u[o]=i*c;if(function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(u))return null;var f,m=Math.sqrt(h),g=[];for(var y in u)f=u[y],g.push([f/(m*p[y][0]),p[y][1]]);var b=function(e,t){return e[0]<t[0]?1:e[0]>t[0]?-1:0};if(g.sort(b),this.useLevenshtein){for(var v=[],A=Math.min(50,g.length),_=0;_<A;++_)v.push([a(g[_][1],l),g[_][1]]);(g=v).sort(b)}return v=[],g.forEach(function(e){e[0]>=n&&v.push([e[0],this.exactSet[e[1]]])}.bind(this)),v},i.add=function(e){if(this._normalizeStr(e)in this.exactSet)return!1;for(var t=this.gramSizeLower;t<this.gramSizeUpper+1;++t)this._add(e,t)},i._add=function(e,t){var n=this._normalizeStr(e),r=this.items[t]||[],i=r.length;r.push(0);var a,o,c=s(n,t),l=0;for(a in c)o=c[a],l+=Math.pow(o,2),a in this.matchDict?this.matchDict[a].push([i,o]):this.matchDict[a]=[[i,o]];var u=Math.sqrt(l);r[i]=[u,n],this.items[t]=r,this.exactSet[n]=e},i._normalizeStr=function(e){if("[object String]"!==Object.prototype.toString.call(e))throw"Must use a string as argument to FuzzySet functions";return e.toLowerCase()},i.length=function(){var e,t=0;for(e in this.exactSet)this.exactSet.hasOwnProperty(e)&&(t+=1);return t},i.isEmpty=function(){for(var e in this.exactSet)if(this.exactSet.hasOwnProperty(e))return!1;return!0},i.values=function(){var e,t=[];for(e in this.exactSet)this.exactSet.hasOwnProperty(e)&&t.push(this.exactSet[e]);return t};for(var c=i.gramSizeLower;c<i.gramSizeUpper+1;++c)i.items[c]=[];for(c=0;c<e.length;++c)i.add(e[c]);return i}; 320/*! ***************************************************************************** 321 Copyright (c) Microsoft Corporation. 322 323 Permission to use, copy, modify, and/or distribute this software for any 324 purpose with or without fee is hereby granted. 325 326 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 327 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 328 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 329 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 330 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 331 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 332 PERFORMANCE OF THIS SOFTWARE. 333 ***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function __values(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},k$1,goog=goog||{},l=commonjsGlobal||self;function aa$1(){}function ba$1(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function p(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function da$1(e){return Object.prototype.hasOwnProperty.call(e,ea$1)&&e[ea$1]||(e[ea$1]=++fa$1)}var ea$1="closure_uid_"+(1e9*Math.random()>>>0),fa$1=0;function ha$1(e,t,n){return e.call.apply(e.bind,arguments)}function ia(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}
333function q$1(e,t,n){return(q$1=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha$1:ia).apply(null,arguments)}function ja$1(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function t(e,t){function n(){}n.prototype=t.prototype,e.Z=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Vb=function(e,n,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return t.prototype[n].apply(e,i)}}function v(){this.s=this.s,this.o=this.o}var ka$1=0,la$1={};v.prototype.s=!1,v.prototype.na=function(){if(!this.s&&(this.s=!0,this.M(),0!=ka$1)){var e=da$1(this);delete la$1[e]}},v.prototype.M=function(){if(this.o)for(;this.o.length;)this.o.shift()()};var ma$1=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},na$1=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"==typeof e?e.split(""):e,a=0;a<r;a++)a in i&&t.call(n,i[a],a,e)};function oa$1(e){e:{for(var t=pa$1,n=e.length,r="string"==typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"==typeof e?e.charAt(t):e[t]}function qa$1(e){return Array.prototype.concat.apply([],arguments)}function ra$1(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}function sa$1(e){return/^[\s\xa0]*$/.test(e)}var ta$1=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},x$1;function w(e,t){return-1!=e.indexOf(t)}function ua$1(e,t){return e<t?-1:e>t?1:0}e:{var va$1=l.navigator;if(va$1){var wa$1=va$1.userAgent;if(wa$1){x$1=wa$1;break e}}x$1=""}function xa$1(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function ya$1(e){var t={};for(var n in e)t[n]=e[n];return t}var za$1="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Aa$1(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<za$1.length;a++)n=za$1[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function Ca$1(e){return Ca$1[" "](e),e}function Fa$1(e){var t=Ga$1;return Object.prototype.hasOwnProperty.call(t,9)?t[9]:t[9]=e(9)}Ca$1[" "]=aa$1;var Ha$1=w(x$1,"Opera"),y=w(x$1,"Trident")||w(x$1,"MSIE"),Ia$1=w(x$1,"Edge"),Ja$1=Ia$1||y,Ka$1=w(x$1,"Gecko")&&!(w(x$1.toLowerCase(),"webkit")&&!w(x$1,"Edge"))&&!(w(x$1,"Trident")||w(x$1,"MSIE"))&&!w(x$1,"Edge"),La$1=w(x$1.toLowerCase(),"webkit")&&!w(x$1,"Edge"),Na$1,a;function Ma$1(){var e=l.document;return e?e.documentMode:void 0}e:{var Oa$1="",Pa$1=(a=x$1,Ka$1?/rv:([^\);]+)(\)|;)/.exec(a):Ia$1?/Edge\/([\d\.]+)/.exec(a):y?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):La$1?/WebKit\/(\S+)/.exec(a):Ha$1?/(?:Version)[ \/]?(\S+)/.exec(a):void 0);if(Pa$1&&(Oa$1=Pa$1?Pa$1[1]:""),y){var Qa$1=Ma$1();if(null!=Qa$1&&Qa$1>parseFloat(Oa$1)){Na$1=String(Qa$1);break e}}Na$1=Oa$1}var Ga$1={},Sa$1;function Ra$1(){return Fa$1((function(){for(var e=0,t=ta$1(String(Na$1)).split("."),n=ta$1("9").split("."),r=Math.max(t.length,n.length),i=0;0==e&&i<r;i++){var a=t[i]||"",o=n[i]||"";do{if(a=/(\d*)(\D*)(.*)/.exec(a)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==a[0].length&&0==o[0].length)break;e=ua$1(0==a[1].length?0:parseInt(a[1],10),0==o[1].length?0:parseInt(o[1],10))||ua$1(0==a[2].length,0==o[2].length)||ua$1(a[2],o[2]),a=a[3],o=o[3]}while(0==e)}return 0<=e}))}if(l.document&&y){var Ta$1=Ma$1();Sa$1=Ta$1||(parseInt(Na$1,10)||void 0)}else Sa$1=void 0;var Ua$1=Sa$1,Va$1=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{l.addEventListener("test",aa$1,t),l.removeEventListener("test",aa$1,t)}catch(e){}return e}();function z$1(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}function A$1(e,t){if(z$1.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(Ka$1){e:{try{Ca$1(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}
vendor: 1,647 bytes, line 333
333else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:Wa$1[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&A$1.Z.h.call(this)}}z$1.prototype.h=function(){this.defaultPrevented=!0},t(A$1,z$1);var Wa$1={2:"touch",3:"pen",4:"mouse"};A$1.prototype.h=function(){A$1.Z.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var B$1="closure_listenable_"+(1e6*Math.random()|0),Xa$1=0;function Ya$1(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.ia=i,this.key=++Xa$1,this.ca=this.fa=!1}function Za$1(e){e.ca=!0,e.listener=null,e.proxy=null,e.src=null,e.ia=null}function $a$1(e){this.src=e,this.g={},this.h=0}function bb(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],a=ma$1(i,t);(r=0<=a)&&Array.prototype.splice.call(i,a,1),r&&(Za$1(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ab(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.ca&&a.listener==t&&a.capture==!!n&&a.ia==r)return i}return-1}$a$1.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.g[a])||(e=this.g[a]=[],this.h++);
333var o=ab(e,t,r,i);return-1<o?(t=e[o],n||(t.fa=!1)):((t=new Ya$1(t,this.src,a,!!r,i)).fa=n,e.push(t)),t};var cb="closure_lm_"+(1e6*Math.random()|0),db={};function fb(e,t,n,r,i){if(r&&r.once)return gb(e,t,n,r,i);if(Array.isArray(t)){for(var a=0;a<t.length;a++)fb(e,t[a],n,r,i);return null}return n=hb(n),e&&e[B$1]?e.N(t,n,p(r)?!!r.capture:!!r,i):ib(e,t,n,!1,r,i)}function ib(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=p(i)?!!i.capture:!!i,s=jb(e);if(s||(e[cb]=s=new $a$1(e)),(n=s.add(t,n,r,o,a)).proxy)return n;if(r=kb(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Va$1||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(lb(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}return n}function kb(){var e=mb;return function t(n){return e.call(t.src,t.listener,n)}}function gb(e,t,n,r,i){if(Array.isArray(t)){for(var a=0;a<t.length;a++)gb(e,t[a],n,r,i);return null}return n=hb(n),e&&e[B$1]?e.O(t,n,p(r)?!!r.capture:!!r,i):ib(e,t,n,!0,r,i)}function nb(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)nb(e,t[a],n,r,i);else r=p(r)?!!r.capture:!!r,n=hb(n),e&&e[B$1]?(e=e.i,(t=String(t).toString())in e.g&&(-1<(n=ab(a=e.g[t],n,r,i))&&(Za$1(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.g[t],e.h--)))):e&&(e=jb(e))&&(t=e.g[t.toString()],e=-1,t&&(e=ab(t,n,r,i)),(n=-1<e?t[e]:null)&&ob(n))}function ob(e){if("number"!=typeof e&&e&&!e.ca){var t=e.src;if(t&&t[B$1])bb(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(lb(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=jb(t))?(bb(n,e),0==n.h&&(n.src=null,t[cb]=null)):Za$1(e)}}}function lb(e){return e in db?db[e]:db[e]="on"+e}function mb(e,t){if(e.ca)e=!0;else{t=new A$1(t,this);var n=e.listener,r=e.ia||e.src;e.fa&&ob(e),e=n.call(r,t)}return e}function jb(e){return(e=e[cb])instanceof $a$1?e:null}var pb="__closure_events_fn_"+(1e9*Math.random()>>>0);function hb(e){return"function"==typeof e?e:(e[pb]||(e[pb]=function(t){return e.handleEvent(t)}),e[pb])}function C$1(){v.call(this),this.i=new $a$1(this),this.P=this,this.I=null}function D$1(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,"string"==typeof t)t=new z$1(t,e);else if(t instanceof z$1)t.target=t.target||e;else{var i=t;Aa$1(t=new z$1(r,e),i)}if(i=!0,n)for(var a=n.length-1;0<=a;a--){var o=t.g=n[a];i=qb(o,r,!0,t)&&i}if(i=qb(o=t.g=e,r,!0,t)&&i,i=qb(o,r,!1,t)&&i,n)for(a=0;a<n.length;a++)i=qb(o=t.g=n[a],r,!1,t)&&i}function qb(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.ca&&o.capture==n){var s=o.listener,c=o.ia||o.src;o.fa&&bb(e.i,o),i=!1!==s.call(c,r)&&i}}return i&&!r.defaultPrevented}t(C$1,v),C$1.prototype[B$1]=!0,C$1.prototype.removeEventListener=function(e,t,n,r){nb(this,e,t,n,r)},C$1.prototype.M=function(){if(C$1.Z.M.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Za$1(n[r]);delete t.g[e],t.h--}}this.I=null},C$1.prototype.N=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},C$1.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var rb=l.JSON.stringify;function sb(){var e=tb,t=null;return e.g&&(t=e.g,e.g=e.g.next,e.g||(e.h=null),t.next=null),t}var ub=function(){function e(){this.h=this.g=null}return e.prototype.add=function(e,t){var n=vb.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n},e}(),vb=new(function(){function e(e,t){this.i=e,this.j=t,this.h=0,this.g=null}return e.prototype.get=function(){var e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e},e}())((function(){return new wb}),(function(e){return e.reset()})),wb=function(){function e(){this.next=this.g=this.h=null}return e.prototype.set=function(e,t){this.h=e,this.g=t,this.next=null},e.prototype.reset=function(){this.next=this.g=this.h=null},e}(),Ab;function yb(e){l.setTimeout((function(){throw e}),0)}function zb(e,t){Ab||Bb(),Cb||(Ab(),Cb=!0),tb.add(e,t)}function Bb(){var e=l.Promise.resolve(void 0);Ab=function(){e.then(Db)}}var Cb=!1,tb=new ub;function Db(){for(var e;e=sb();){try{e.h.call(e.g)}catch(e){yb(e)}var t=vb;t.j(e),100>t.h&&(t.h++,e.next=t.g,t.g=e)}Cb=!1}function Eb(e,t){C$1.call(this),this.h=e||1,this.g=t||l,this.j=q$1(this.kb,this),this.l=Date.now()}function Fb(e){e.da=!1,e.S&&(e.g.clearTimeout(e.S),e.S=null)}function Gb(e,t,n){if("function"==typeof e)n&&(e=q$1(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=q$1(e.handleEvent,e)}return 2147483647<Number(t)?-1:l.setTimeout(e,t||0)}function Hb(e){e.g=Gb((function(){e.g=null,e.i&&(e.i=!1,Hb(e))}),e.j);var t=e.h;e.h=null,e.m.apply(null,t)}t(Eb,C$1),k$1=Eb.prototype,k$1.da=!1,k$1.S=null,k$1.kb=function(){if(this.da){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.S=this.g.setTimeout(this.j,this.h-e):(this.S&&(this.g.clearTimeout(this.S),this.S=null),D$1(this,"tick"),this.da&&(Fb(this),this.start()))}},k$1.start=function(){this.da=!0,this.S||(this.S=this.g.setTimeout(this.j,this.h),this.l=Date.now())},k$1.M=function(){Eb.Z.M.call(this),Fb(this),delete this.g};var Ib=function(e){function t(t,n){var r=e.call(this)||this;return r.m=t,r.j=n,r.h=null,r.i=!1,r.g=null,r}return __extends(t,e),t.prototype.l=function(e){this.h=arguments,this.g?this.i=!0:Hb(this)},t.prototype.M=function(){e.prototype.M.call(this),this.g&&(l.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)},t}(v);function E(e){v.call(this),this.h=e,this.g={}}t(E,v);var Jb=[];function Kb(e,t,n,r){Array.isArray(n)||(n&&(Jb[0]=n.toString()),n=Jb);for(var i=0;i<n.length;i++){var a=fb(t,n[i],r||e.handleEvent,!1,e.h||e);if(!a)break;e.g[a.key]=a}}
vendor: 14,157 bytes, line 333
333function Lb(e){xa$1(e.g,(function(e,t){this.g.hasOwnProperty(t)&&ob(e)}),e),e.g={}}function Mb(){this.g=!0}function Nb(e,t,n,r,i,a){e.info((function(){if(e.g)if(a)for(var o="",s=a.split("&"),c=0;c<s.length;c++){var l=s[c].split("=");if(1<l.length){var u=l[0];l=l[1];var d=u.split("_");o=2<=d.length&&"type"==d[1]?o+(u+"=")+l+"&":o+(u+"=redacted&")}}else o=null;else o=a;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o}))}function Ob(e,t,n,r,i,a,o){e.info((function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+a+" "+o}))}function F$1(e,t,n,r){e.info((function(){return"XMLHTTP TEXT ("+t+"): "+Pb(e,n)+(r?" "+r:"")}))}function Qb(e,t){e.info((function(){return"TIMEOUT: "+t}))}function Pb(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n)for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var a=i[0];if("noop"!=a&&"stop"!=a&&"close"!=a)for(var o=1;o<i.length;o++)i[o]=""}}}return rb(n)}catch(e){return t}}E.prototype.M=function(){E.Z.M.call(this),Lb(this)},E.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},Mb.prototype.Aa=function(){this.g=!1},Mb.prototype.info=function(){};var H$1={},Rb=null;function Sb(){return Rb=Rb||new C$1}function Tb(e){z$1.call(this,H$1.Ma,e)}function I(e){var t=Sb();D$1(t,new Tb(t,e))}function Ub(e,t){z$1.call(this,H$1.STAT_EVENT,e),this.stat=t}function J$1(e){var t=Sb();D$1(t,new Ub(t,e))}function Vb(e,t){z$1.call(this,H$1.Na,e),this.size=t}function K$1(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return l.setTimeout((function(){e()}),t)}H$1.Ma="serverreachability",t(Tb,z$1),H$1.STAT_EVENT="statevent",t(Ub,z$1),H$1.Na="timingevent",t(Vb,z$1);var Wb={NO_ERROR:0,lb:1,yb:2,xb:3,sb:4,wb:5,zb:6,Ja:7,TIMEOUT:8,Cb:9},Xb={qb:"complete",Mb:"success",Ka:"error",Ja:"abort",Eb:"ready",Fb:"readystatechange",TIMEOUT:"timeout",Ab:"incrementaldata",Db:"progress",tb:"downloadprogress",Ub:"uploadprogress"};function Yb(){}function Zb(e){return e.h||(e.h=e.i())}function $b(){}Yb.prototype.h=null;var L$1={OPEN:"a",pb:"b",Ka:"c",Bb:"d"},cc$1;function ac$1(){z$1.call(this,"d")}function bc$1(){z$1.call(this,"c")}function dc$1(){}function M$1(e,t,n,r){this.l=e,this.j=t,this.m=n,this.X=r||1,this.V=new E(this),this.P=ec$1,e=Ja$1?125:void 0,this.W=new Eb(e),this.H=null,this.i=!1,this.s=this.A=this.v=this.K=this.F=this.Y=this.B=null,this.D=[],this.g=null,this.C=0,this.o=this.u=null,this.N=-1,this.I=!1,this.O=0,this.L=null,this.aa=this.J=this.$=this.U=!1,this.h=new fc$1}function fc$1(){this.i=null,this.g="",this.h=!1}t(ac$1,z$1),t(bc$1,z$1),t(dc$1,Yb),dc$1.prototype.g=function(){return new XMLHttpRequest},dc$1.prototype.i=function(){return{}},cc$1=new dc$1;var ec$1=45e3,gc$1={},hc$1={};function ic$1(e,t,n){e.K=1,e.v=jc(N$1(t)),e.s=n,e.U=!0,kc$1(e,null)}function kc$1(e,t){e.F=Date.now(),lc$1(e),e.A=N$1(e.v);var n=e.A,r=e.X;Array.isArray(r)||(r=[String(r)]),mc$1(n.h,"t",r),e.C=0,n=e.l.H,e.h=new fc$1,e.g=nc$1(e.l,n?t:null,!e.s),0<e.O&&(e.L=new Ib(q$1(e.Ia,e,e.g),e.O)),Kb(e.V,e.g,"readystatechange",e.gb),t=e.H?ya$1(e.H):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ea(e.A,e.u,e.s,t)):(e.u="GET",e.g.ea(e.A,e.u,null,t)),I(1),Nb(e.j,e.u,e.A,e.m,e.X,e.s)}function qc$1(e){return!!e.g&&("GET"==e.u&&2!=e.K&&e.l.Ba)}function tc$1(e,t,n){for(var r,i=!0;!e.I&&e.C<n.length;){if((r=vc$1(e,n))==hc$1){4==t&&(e.o=4,J$1(14),i=!1),F$1(e.j,e.m,null,"[Incomplete Response]");break}if(r==gc$1){e.o=4,J$1(15),F$1(e.j,e.m,n,"[Invalid Chunk]"),i=!1;break}F$1(e.j,e.m,r,null),sc$1(e,r)}qc$1(e)&&r!=hc$1&&r!=gc$1&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,J$1(16),i=!1),e.i=e.i&&i,i?0<n.length&&!e.aa&&(e.aa=!0,(t=e.l).g==e&&t.$&&!t.L&&(t.h.info("Great, no buffering proxy detected. Bytes received: "+n.length),wc$1(t),t.L=!0,J$1(11))):(F$1(e.j,e.m,n,"[Invalid Chunked Response]"),P$2(e),rc$1(e))}function vc$1(e,t){var n=e.C,r=t.indexOf("\n",n);return-1==r?hc$1:(n=Number(t.substring(n,r)),isNaN(n)?gc$1:(r+=1)+n>t.length?hc$1:(t=t.substr(r,n),e.C=r+n,t))}function lc$1(e){e.Y=Date.now()+e.P,xc$1(e,e.P)}function xc$1(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=K$1(q$1(e.eb,e),t)}function pc$1(e){e.B&&(l.clearTimeout(e.B),e.B=null)}function rc$1(e){0==e.l.G||e.I||uc$1(e.l,e)}function P$2(e){pc$1(e);var t=e.L;t&&"function"==typeof t.na&&t.na(),e.L=null,Fb(e.W),Lb(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function sc$1(e,t){try{var n=e.l;if(0!=n.G&&(n.g==e||yc$1(n.i,e)))if(n.I=e.N,!e.J&&yc$1(n.i,e)&&3==n.G){try{var r=n.Ca.g.parse(t)}catch(a){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(!(n.g.F+3e3<e.F))break e;zc(n),Ac$1(n)}Bc$1(n),J$1(18)}}else n.ta=i[1],0<n.ta-n.U&&37500>i[2]&&n.N&&0==n.A&&!n.v&&(n.v=K$1(q$1(n.ab,n),6e3));if(1>=Cc$1(n.i)&&n.ka){try{n.ka()}catch(a){}n.ka=void 0}}else Q$1(n,11)}else if((e.J||n.g==e)&&zc(n),!sa$1(t))for(i=n.Ca.g.parse(t),t=0;t<i.length;t++){var a=i[t];if(n.U=a[0],a=a[1],2==n.G)if("c"==a[0]){n.J=a[1],n.la=a[2];var o=a[3];null!=o&&(n.ma=o,n.h.info("VER="+n.ma));var s=a[4];null!=s&&(n.za=s,n.h.info("SVER="+n.za));var c=a[5];null!=c&&"number"==typeof c&&0<c&&(r=1.5*c,n.K=r,n.h.info("backChannelRequestTimeoutMs_="+r)),r=n;var l=e.g;if(l){var u=l.g?l.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(u){var d=r.i;!d.g&&(w(u,"spdy")||w(u,"quic")||w(u,"h2"))&&(d.j=d.l,d.g=new Set,d.h&&(Dc$1(d,d.h),d.h=null))}if(r.D){var p=l.g?l.g.getResponseHeader("X-HTTP-Session-Id"):null;p&&(r.sa=p,R$1(r.F,r.D,p))}}n.G=3,n.j&&n.j.xa(),n.$&&(n.O=Date.now()-e.F,n.h.info("Handshake RTT: "+n.O+"ms"));var h=e;if((r=n).oa=Ec$1(r,r.H?r.la:null,r.W),h.J){Fc$1(r.i,h);var f=h,m=r.K;m&&f.setTimeout(m),f.B&&(pc$1(f),lc$1(f)),r.g=h}else Gc(r);0<n.l.length&&Hc(n)}else"stop"!=a[0]&&"close"!=a[0]||Q$1(n,7);else 3==n.G&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?Q$1(n,7):Ic$1(n):"noop"!=a[0]&&n.j&&n.j.wa(a),n.A=0)}I(4)}catch(a){}}function Jc(e){if(e.R&&"function"==typeof e.R)return e.R();if("string"==typeof e)return e.split("");if(ba$1(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function Kc(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(ba$1(e)||"string"==typeof e)na$1(e,t,void 0);else{if(e.T&&"function"==typeof e.T)var n=e.T();else if(e.R&&"function"==typeof e.R)n=void 0;else if(ba$1(e)||"string"==typeof e){n=[];for(var r=e.length,i=0;i<r;i++)n.push(i)}else for(i in n=[],r=0,e)n[r++]=i;i=(r=Jc(e)).length;for(var a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}}function S$1(e,t){this.h={},this.g=[],this.i=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof S$1)for(n=e.T(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Lc$1(e){if(e.i!=e.g.length){for(var t=0,n=0;t<e.g.length;){var r=e.g[t];T(e.h,r)&&(e.g[n++]=r),t++}e.g.length=n}if(e.i!=e.g.length){var i={};for(n=t=0;t<e.g.length;)T(i,r=e.g[t])||(e.g[n++]=r,i[r]=1),t++;e.g.length=n}}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}k$1=M$1.prototype,k$1.setTimeout=function(e){this.P=e},k$1.gb=function(e){e=e.target;var t=this.L;t&&3==O$1(e)?t.l():this.Ia(e)},k$1.Ia=function(e){try{if(e==this.g)e:{var t=O$1(this.g),n=this.g.Da(),r=this.g.ba();if(!(3>t)&&(3!=t||Ja$1||this.g&&(this.h.h||this.g.ga()||oc$1(this.g)))){this.I||4!=t||7==n||I(8==n||0>=r?3:2),pc$1(this);var i=this.g.ba();this.N=i;t:if(qc$1(this)){var a=oc$1(this.g);e="";var o=a.length,s=4==O$1(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){P$2(this),rc$1(this);var c="";break t}this.h.i=new l.TextDecoder}for(n=0;n<o;n++)this.h.h=!0,e+=this.h.i.decode(a[n],{stream:s&&n==o-1});a.splice(0,o),this.h.g+=e,this.C=0,c=this.h.g}else c=this.g.ga();if(this.i=200==i,Ob(this.j,this.u,this.A,this.m,this.X,t,i),this.i){if(this.$&&!this.J){t:{if(this.g){var u,d=this.g;if((u=d.g?d.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!sa$1(u)){var p=u;break t}}p=null}if(!(i=p)){this.i=!1,this.o=3,J$1(12),P$2(this),rc$1(this);break e}F$1(this.j,this.m,i,"Initial handshake response via X-HTTP-Initial-Response"),this.J=!0,sc$1(this,i)}this.U?(tc$1(this,t,c),Ja$1&&this.i&&3==t&&(Kb(this.V,this.W,"tick",this.fb),this.W.start())):(F$1(this.j,this.m,c,null),sc$1(this,c)),4==t&&P$2(this),this.i&&!this.I&&(4==t?uc$1(this.l,this):(this.i=!1,lc$1(this)))}else 400==i&&0<c.indexOf("Unknown SID")?(this.o=3,J$1(12)):(this.o=0,J$1(13)),P$2(this),rc$1(this)}}}catch(t){}},k$1.fb=function(){if(this.g){var e=O$1(this.g),t=this.g.ga();this.C<t.length&&(pc$1(this),tc$1(this,e,t),this.i&&4!=e&&lc$1(this))}},k$1.cancel=function(){this.I=!0,P$2(this)},k$1.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(Qb(this.j,this.A),2!=this.K&&(I(3),J$1(17)),P$2(this),this.o=2,rc$1(this)):xc$1(this,this.Y-e)},k$1=S$1.prototype,k$1.R=function(){Lc$1(this);for(var e=[],t=0;t<this.g.length;t++)e.push(this.h[this.g[t]]);return e},k$1.T=function(){return Lc$1(this),this.g.concat()},k$1.get=function(e,t){return T(this.h,e)?this.h[e]:t},k$1.set=function(e,t){T(this.h,e)||(this.i++,this.g.push(e)),this.h[e]=t},k$1.forEach=function(e,t){for(var n=this.T(),r=0;r<n.length;r++){var i=n[r],a=this.get(i);e.call(t,a,i,this)}};var Mc$1=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Nc$1(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}function U$1(e,t){if(this.i=this.s=this.j="",this.m=null,this.o=this.l="",this.g=!1,e instanceof U$1){this.g=void 0!==t?t:e.g,Oc$1(this,e.j),this.s=e.s,Pc$1(this,e.i),Qc(this,e.m),this.l=e.l,t=e.h;var n=new Rc$1;n.i=t.i,t.g&&(n.g=new S$1(t.g),n.h=t.h),Sc$1(this,n),this.o=e.o}else e&&(n=String(e).match(Mc$1))?(this.g=!!t,Oc$1(this,n[1]||"",!0),this.s=Tc$1(n[2]||""),Pc$1(this,n[3]||"",!0),Qc(this,n[4]),this.l=Tc$1(n[5]||"",!0),Sc$1(this,n[6]||"",!0),this.o=Tc$1(n[7]||"")):(this.g=!!t,this.h=new Rc$1(null,this.g))}function N$1(e){return new U$1(e)}function Oc$1(e,t,n){e.j=n?Tc$1(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function Pc$1(e,t,n){e.i=n?Tc$1(t,!0):t}function Qc(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function Sc$1(e,t,n){t instanceof Rc$1?(e.h=t,Zc(e.h,e.g)):(n||(t=Uc$1(t,$c)),e.h=new Rc$1(t,e.g))}function R$1(e,t,n){e.h.set(t,n)}function jc(e){return R$1(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function ad(e){return e instanceof U$1?N$1(e):new U$1(e,void 0)}function bd(e,t,n,r){var i=new U$1(null,void 0);return e&&Oc$1(i,e),t&&Pc$1(i,t),n&&Qc(i,n),r&&(i.l=r),i}function Tc$1(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Uc$1(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,cd),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function cd(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}U$1.prototype.toString=function(){var e=[],t=this.j;t&&e.push(Uc$1(t,Vc$1,!0),":");var n=this.i;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(Uc$1(t,Vc$1,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.i&&"/"!=n.charAt(0)&&e.push("/"),e.push(Uc$1(n,"/"==n.charAt(0)?Wc:Xc,!0))),(n=this.h.toString())&&e.push("?",n),(n=this.o)&&e.push("#",Uc$1(n,Yc)),e.join("")};var Vc$1=/[#\/\?@]/g,Xc=/[#\?:]/g,Wc=/[#\?]/g,$c=/[#\?@]/g,Yc=/#/g;function Rc$1(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function V$1(e){e.g||(e.g=new S$1,e.h=0,e.i&&Nc$1(e.i,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function dd(e,t){V$1(e),t=W$1(e,t),T(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,T((e=e.g).h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&Lc$1(e)))}function ed(e,t){return V$1(e),t=W$1(e,t),T(e.g.h,t)}function mc$1(e,t,n){dd(e,t),0<n.length&&(e.i=null,e.g.set(W$1(e,t),ra$1(n)),e.h+=n.length)}function W$1(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}function Zc(e,t){t&&!e.j&&(V$1(e),e.i=null,e.g.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(dd(this,t),mc$1(this,n,e))}),e)),e.j=t}k$1=Rc$1.prototype,k$1.add=function(e,t){V$1(this),this.i=null,e=W$1(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},k$1.forEach=function(e,t){V$1(this),this.g.forEach((function(n,r){na$1(n,(function(n){e.call(t,n,r,this)}),this)}),this)},k$1.T=function(){V$1(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},k$1.R=function(e){V$1(this);var t=[];if("string"==typeof e)ed(this,e)&&(t=qa$1(t,this.g.get(W$1(this,e))));else{e=this.g.R();for(var n=0;n<e.length;n++)t=qa$1(t,e[n])}return t},k$1.set=function(e,t){return V$1(this),this.i=null,ed(this,e=W$1(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},k$1.get=function(e,t){return e&&0<(e=this.R(e)).length?String(e[0]):t},k$1.toString=function(){if(this.i)return this.i;if(!this.g)return"";for(var e=[],t=this.g.T(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.R(r);for(var a=0;a<r.length;a++){var o=i;""!==r[a]&&(o+="="+encodeURIComponent(String(r[a]))),e.push(o)}}return this.i=e.join("&")};var fd=function(e,t){this.h=e,this.g=t};function gd(e){this.l=e||hd,l.PerformanceNavigationTiming?e=0<(e=l.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):e=!!(l.g&&l.g.Ea&&l.g.Ea()&&l.g.Ea().Zb),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var hd=10;function id(e){return!!e.h||!!e.g&&e.g.size>=e.j}function Cc$1(e){return e.h?1:e.g?e.g.size:0}function yc$1(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function Dc$1(e,t){e.g?e.g.add(t):e.h=t}function Fc$1(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}
333function jd(e){var t,n;if(null!=e.h)return e.i.concat(e.h.D);if(null!=e.g&&0!==e.g.size){var r=e.i;try{for(var i=__values(e.g.values()),a=i.next();!a.done;a=i.next()){var o=a.value;r=r.concat(o.D)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return ra$1(e.i)}function kd(){}function ld(){this.g=new kd}function md(e,t,n){var r=n||"";try{Kc(e,(function(e,n){var i=e;p(e)&&(i=rb(e)),t.push(r+n+"="+encodeURIComponent(i))}))}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}function nd(e,t){var n=new Mb;if(l.Image){var r=new Image;r.onload=ja$1(od,n,r,"TestLoadImage: loaded",!0,t),r.onerror=ja$1(od,n,r,"TestLoadImage: error",!1,t),r.onabort=ja$1(od,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=ja$1(od,n,r,"TestLoadImage: timeout",!1,t),l.setTimeout((function(){r.ontimeout&&r.ontimeout()}),1e4),r.src=e}else t(!1)}function od(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}function pd(e){this.l=e.$b||null,this.j=e.ib||!1}function qd(e,t){C$1.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=rd,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}gd.prototype.cancel=function(){var e,t;if(this.i=jd(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){try{for(var n=__values(this.g.values()),r=n.next();!r.done;r=n.next()){r.value.cancel()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.g.clear()}},kd.prototype.stringify=function(e){return l.JSON.stringify(e,void 0)},kd.prototype.parse=function(e){return l.JSON.parse(e,void 0)},t(pd,Yb),pd.prototype.g=function(){return new qd(this.l,this.j)},pd.prototype.i=function(e){return function(){return e}}({}),t(qd,C$1);var rd=0;function ud(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}function td(e){e.readyState=4,e.l=null,e.j=null,e.A=null,sd(e)}function sd(e){e.onreadystatechange&&e.onreadystatechange.call(e)}k$1=qd.prototype,k$1.open=function(e,t){if(this.readyState!=rd)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,sd(this)},k$1.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||l).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))},k$1.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,td(this)),this.readyState=rd},k$1.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,sd(this)),this.g&&(this.readyState=3,sd(this),this.g)))if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(void 0!==l.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;ud(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))},k$1.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?td(this):sd(this),3==this.readyState&&ud(this)}},k$1.Ua=function(e){this.g&&(this.response=this.responseText=e,td(this))}
vendor: 4,471 bytes, line 333
333,k$1.Ta=function(e){this.g&&(this.response=e,td(this))},k$1.ha=function(){this.g&&td(this)},k$1.setRequestHeader=function(e,t){this.v.append(e,t)},k$1.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},k$1.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(qd.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var vd=l.JSON.parse;function X$1(e){C$1.call(this),this.headers=new S$1,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=wd,this.K=this.L=!1}t(X$1,C$1);var wd="",xd=/^https?$/i,yd=["POST","PUT"];function Bd(e){return y&&Ra$1()&&"number"==typeof e.timeout&&void 0!==e.ontimeout}function pa$1(e){return"content-type"==e.toLowerCase()}function zd(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,Cd(e),Dd(e)}function Cd(e){e.D||(e.D=!0,D$1(e,"complete"),D$1(e,"error"))}function Ed(e){if(e.h&&void 0!==goog&&(!e.C[1]||4!=O$1(e)||2!=e.ba()))if(e.v&&4==O$1(e))Gb(e.Fa,0,e);else if(D$1(e,"readystatechange"),4==O$1(e)){e.h=!1;try{var t,n=e.ba();e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var a=String(e.H).match(Mc$1)[1]||null;if(!a&&l.self&&l.self.location){var o=l.self.location.protocol;a=o.substr(0,o.length-1)}i=!xd.test(a?a.toLowerCase():"")}t=i}if(t)D$1(e,"complete"),D$1(e,"success");else{e.m=6;try{var s=2<O$1(e)?e.g.statusText:""}catch(e){s=""}e.j=s+" ["+e.ba()+"]",Cd(e)}}finally{Dd(e)}}}function Dd(e,t){if(e.g){Ad(e);var n=e.g,r=e.C[0]?aa$1:null;e.g=null,e.C=null,t||D$1(e,"ready");try{n.onreadystatechange=r}catch(e){}}}function Ad(e){e.g&&e.K&&(e.g.ontimeout=null),e.A&&(l.clearTimeout(e.A),e.A=null)}function O$1(e){return e.g?e.g.readyState:0}function oc$1(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.J){case wd:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function Fd(e){var t="";return xa$1(e,(function(e,n){t+=n,t+=":",t+=e,t+="\r\n"})),t}function Gd(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=Fd(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):R$1(e,t,n))}function Hd(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function Id(e){this.za=0,this.l=[],this.h=new Mb,this.la=this.oa=this.F=this.W=this.g=this.sa=this.D=this.aa=this.o=this.P=this.s=null,this.Za=this.V=0,this.Xa=Hd("failFast",!1,e),this.N=this.v=this.u=this.m=this.j=null,this.X=!0,this.I=this.ta=this.U=-1,this.Y=this.A=this.C=0,this.Pa=Hd("baseRetryDelayMs",5e3,e),this.$a=Hd("retryDelaySeedMs",1e4,e),this.Ya=Hd("forwardChannelMaxRetries",2,e),this.ra=Hd("forwardChannelRequestTimeoutMs",2e4,e),this.qa=e&&e.xmlHttpFactory||void 0,this.Ba=e&&e.Yb||!1,this.K=void 0,this.H=e&&e.supportsCrossDomainXhr||!1,this.J="",this.i=new gd(e&&e.concurrentRequestLimit),this.Ca=new ld,this.ja=e&&e.fastHandshake||!1,this.Ra=e&&e.Wb||!1,e&&e.Aa&&this.h.Aa(),e&&e.forceLongPolling&&(this.X=!1),this.$=!this.ja&&this.X&&e&&e.detectBufferingProxy||!1,this.ka=void 0,this.O=0,this.L=!1,this.B=null,this.Wa=!e||!1!==e.Xb}function Ic$1(e){if(Jd(e),3==e.G){var t=e.V++,n=N$1(e.F);R$1(n,"SID",e.J),R$1(n,"RID",t),R$1(n,"TYPE","terminate"),Kd(e,n),(t=new M$1(e,e.h,t,void 0)).K=2,t.v=jc(N$1(n)),n=!1,l.navigator&&l.navigator.sendBeacon&&(n=l.navigator.sendBeacon(t.v.toString(),"")),!n&&l.Image&&((new Image).src=t.v,n=!0),n||(t.g=nc$1(t.l,null),t.g.ea(t.v)),t.F=Date.now(),lc$1(t)}Ld(e)}function Ac$1(e){e.g&&(wc$1(e),e.g.cancel(),e.g=null)}function Jd(e){Ac$1(e),e.u&&(l.clearTimeout(e.u),e.u=null),zc(e),e.i.cancel(),e.m&&("number"==typeof e.m&&l.clearTimeout(e.m),e.m=null)}function Md(e,t){e.l.push(new fd(e.Za++,t)),3==e.G&&Hc(e)}function Hc(e){id(e.i)||e.m||(e.m=!0,zb(e.Ha,e),e.C=0)}function Nd(e,t){return!(Cc$1(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.l=t.D.concat(e.l),!0):!(1==e.G||2==e.G||e.C>=(e.Xa?0:e.Ya))&&(e.m=K$1(q$1(e.Ha,e,t),Od(e,e.C)),e.C++,!0))}function Qd(e,t){var n;n=t?t.m:e.V++;var r=N$1(e.F);R$1(r,"SID",e.J),R$1(r,"RID",n),R$1(r,"AID",e.U),Kd(e,r),e.o&&e.s&&Gd(r,e.o,e.s),n=new M$1(e,e.h,n,e.C+1),null===e.o&&(n.H=e.s),t&&(e.l=t.D.concat(e.l)),t=Pd(e,n,1e3),n.setTimeout(
333Math.round(.5*e.ra)+Math.round(.5*e.ra*Math.random())),Dc$1(e.i,n),ic$1(n,r,t)}function Kd(e,t){e.j&&Kc({},(function(e,n){R$1(t,n,e)}))}function Pd(e,t,n){n=Math.min(e.l.length,n);var r=e.j?q$1(e.j.Oa,e.j,e):null;e:for(var i=e.l,a=-1;;){var o=["count="+n];-1==a?0<n?(a=i[0].h,o.push("ofs="+a)):a=0:o.push("ofs="+a);for(var s=!0,c=0;c<n;c++){var l=i[c].h,u=i[c].g;if(0>(l-=a))a=Math.max(0,i[c].h-100),s=!1;else try{md(u,o,"req"+l+"_")}catch(e){r&&r(u)}}if(s){r=o.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function Gc(e){e.g||e.u||(e.Y=1,zb(e.Ga,e),e.A=0)}function Bc$1(e){return!(e.g||e.u||3<=e.A)&&(e.Y++,e.u=K$1(q$1(e.Ga,e),Od(e,e.A)),e.A++,!0)}function wc$1(e){null!=e.B&&(l.clearTimeout(e.B),e.B=null)}function Rd(e){e.g=new M$1(e,e.h,"rpc",e.Y),null===e.o&&(e.g.H=e.s),e.g.O=0;var t=N$1(e.oa);R$1(t,"RID","rpc"),R$1(t,"SID",e.J),R$1(t,"CI",e.N?"0":"1"),R$1(t,"AID",e.U),Kd(e,t),R$1(t,"TYPE","xmlhttp"),e.o&&e.s&&Gd(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=jc(N$1(t)),n.s=null,n.U=!0,kc$1(n,e)}function zc(e){null!=e.v&&(l.clearTimeout(e.v),e.v=null)}function uc$1(e,t){var n=null;if(e.g==t){zc(e),wc$1(e),e.g=null;var r=2}else{if(!yc$1(e.i,t))return;n=t.D,Fc$1(e.i,t),r=1}if(e.I=t.N,0!=e.G)if(t.i)if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;D$1(r=Sb(),new Vb(r,n,t,i)),Hc(e)}else Gc(e);else if(3==(i=t.o)||0==i&&0<e.I||!(1==r&&Nd(e,t)||2==r&&Bc$1(e)))switch(n&&0<n.length&&(t=e.i,t.i=t.i.concat(n)),i){case 1:Q$1(e,5);break;case 4:Q$1(e,10);break;case 3:Q$1(e,6);break;default:Q$1(e,2)}}function Od(e,t){var n=e.Pa+Math.floor(Math.random()*e.$a);return e.j||(n*=2),n*t}function Q$1(e,t){if(e.h.info("Error code "+t),2==t){var n=null;e.j&&(n=null);var r=q$1(e.jb,e);n||(n=new U$1("//www.google.com/images/cleardot.gif"),l.location&&"http"==l.location.protocol||Oc$1(n,"https"),jc(n)),nd(n.toString(),r)}else J$1(2);e.G=0,e.j&&e.j.va(t),Ld(e),Jd(e)}function Ld(e){e.G=0,e.I=-1,e.j&&(0==jd(e.i).length&&0==e.l.length||(e.i.i.length=0,ra$1(e.l),e.l.length=0),e.j.ua())}function Ec$1(e,t,n){var r=ad(n);if(""!=r.i)t&&Pc$1(r,t+"."+r.i),Qc(r,r.m);else{var i=l.location;r=bd(i.protocol,t?t+"."+i.hostname:i.hostname,+i.port,n)}return e.aa&&xa$1(e.aa,(function(e,t){R$1(r,t,e)})),t=e.D,n=e.sa,t&&n&&R$1(r,t,n),R$1(r,"VER",e.ma),Kd(e,r),r}function nc$1(e,t,n){if(t&&!e.H)throw Error("Can't create secondary domain capable XhrIo object.");return(t=n&&e.Ba&&!e.qa?new X$1(new pd({ib:!0})):new X$1(e.qa)).L=e.H,t}function Sd(){}function Td(){if(y&&!(10<=Number(Ua$1)))throw Error("Environmental error: no available transport.")}function Y$1(e,t){C$1.call(this),this.g=new Id(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.ya&&(e?e["X-WebChannel-Client-Profile"]=t.ya:e={"X-WebChannel-Client-Profile":t.ya}),this.g.P=e,(e=t&&t.httpHeadersOverwriteParam)&&!sa$1(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!sa$1(t)&&(this.g.D=t,null!==(e=this.h)&&t in e&&(t in(e=this.h)&&delete e[t])),this.j=new Z$1(this)}function Ud(e){ac$1.call(this);var t=e.__sm__;if(t){e:{for(var n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function Vd(){bc$1.call(this),this.status=1}function Z$1(e){this.g=e}k$1=X$1.prototype,k$1.ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():cc$1.g(),this.C=this.u?Zb(this.u):Zb(cc$1),this.g.onreadystatechange=q$1(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(e){return void zd(this,e)}e=n||"";var i=new S$1(this.headers);r&&Kc(r,(function(e,t){i.set(t,e)})),r=oa$1(i.T()),n=l.FormData&&e instanceof l.FormData,!(0<=ma$1(yd,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;
333charset=utf-8"),i.forEach((function(e,t){this.g.setRequestHeader(t,e)}),this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{Ad(this),0<this.B&&((this.K=Bd(this.g))?(this.g.timeout=this.B,this.g.ontimeout=q$1(this.pa,this)):this.A=Gb(this.pa,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(e){zd(this,e)}},k$1.pa=function(){void 0!==goog&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,D$1(this,"timeout"),this.abort(8))},k$1.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,D$1(this,"complete"),D$1(this,"abort"),Dd(this))},k$1.M=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),Dd(this,!0)),X$1.Z.M.call(this)},k$1.Fa=function(){this.s||(this.F||this.v||this.l?Ed(this):this.cb())},k$1.cb=function(){Ed(this)},k$1.ba=function(){try{return 2<O$1(this)?this.g.status:-1}catch(e){return-1}},k$1.ga=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},k$1.Qa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),vd(t)}},k$1.Da=function(){return this.m},k$1.La=function(){return"string"==typeof this.j?this.j:String(this.j)},k$1=Id.prototype,k$1.ma=8,k$1.G=1,k$1.hb=function(e){try{this.h.info("Origin Trials invoked: "+e)}catch(e){}},k$1.Ha=function(e){if(this.m)if(this.m=null,1==this.G){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new M$1(this,this.h,e,void 0),n=this.s;if(this.P&&(n?Aa$1(n=ya$1(n),this.P):n=this.P),null===this.o&&(t.H=n),this.ja)e:{for(var r=0,i=0;i<this.l.length;i++){var a=this.l[i];if(void 0===(a="__data__"in a.g&&"string"==typeof(a=a.g.__data__)?a.length:void 0))break;if(4096<(r+=a)){r=i;break e}if(4096===r||i===this.l.length-1){r=i+1;break e}}r=1e3}else r=1e3;r=Pd(this,t,r),R$1(i=N$1(this.F),"RID",e),R$1(i,"CVER",22),this.D&&R$1(i,"X-HTTP-Session-Id",this.D),Kd(this,i),this.o&&n&&Gd(i,this.o,n),Dc$1(this.i,t),this.Ra&&R$1(i,"TYPE","init"),this.ja?(R$1(i,"$req",r),R$1(i,"SID","null"),t.$=!0,ic$1(t,i,null)):ic$1(t,i,r),this.G=2}}else 3==this.G&&(e?Qd(this,e):0==this.l.length||id(this.i)||Qd(this))},k$1.Ga=function(){if(this.u=null,Rd(this),this.$&&!(this.L||null==this.g||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=K$1(q$1(this.bb,this),e)}},k$1.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,J$1(10),Ac$1(this),Rd(this))},k$1.ab=function(){null!=this.v&&(this.v=null,Ac$1(this),Bc$1(this),J$1(19))},k$1.jb=function(e){e?(this.h.info("Successfully pinged google.com"),J$1(2)):(this.h.info("Failed to ping google.com"),J$1(1))},k$1=Sd.prototype,k$1.xa=function(){},k$1.wa=function(){},k$1.va=function(){},k$1.ua=function(){},k$1.Oa=function(){},Td.prototype.g=function(e,t){return new Y$1(e,t)},t(Y$1,C$1),Y$1.prototype.m=function(){this.g.j=this.j,this.A&&(this.g.H=!0);var e=this.g,t=this.l,n=this.h||void 0;e.Wa&&(e.h.info("Origin Trials enabled."),zb(q$1(e.hb,e,t))),J$1(0),e.W=t,e.aa=n||{},e.N=e.X,e.F=Ec$1(e,null,e.W),Hc(e)},Y$1.prototype.close=function(){Ic$1(this.g)},Y$1.prototype.u=function(e){if("string"==typeof e){var t={};t.__data__=e,Md(this.g,t)}else this.v?((t={}).__data__=rb(e),Md(this.g,t)):Md(this.g,e)},Y$1.prototype.M=function(){this.g.j=null,delete this.j,Ic$1(this.g),delete this.g,Y$1.Z.M.call(this)},t(Ud,ac$1),t(Vd,bc$1),t(Z$1,Sd),Z$1.prototype.xa=function(){D$1(this.g,"a")},Z$1.prototype.wa=function(e){D$1(this.g,new Ud(e))},Z$1.prototype.va=function(e){D$1(this.g,new Vd(e))},Z$1.prototype.ua=function(){D$1(this.g,"b")},Td.prototype.createWebChannel=Td.prototype.g,Y$1.prototype.send=Y$1.prototype.u,Y$1.prototype.open=Y$1.prototype.m,Y$1.prototype.close=Y$1.prototype.close,Wb.NO_ERROR=0,Wb.TIMEOUT=8,Wb.HTTP_ERROR=6,Xb.COMPLETE="complete",$b.EventType=L$1,L$1.OPEN="a",L$1.CLOSE="b",L$1.ERROR="c",L$1.MESSAGE="d",C$1.prototype.listen=C$1.prototype.N,X$1.prototype.listenOnce=X$1.prototype.O,X$1.prototype.getLastError=X$1.prototype.La,X$1.prototype.getLastErrorCode=X$1.prototype.Da,X$1.prototype.getStatus=X$1.prototype.ba,X$1.prototype.getResponseJson=X$1.prototype.Qa,X$1.prototype.getResponseText=X$1.prototype.ga,X$1.prototype.send=X$1.prototype.ea;var createWebChannelTransport=function(){return new Td},getStatEventTarget=function(){return Sb()},ErrorCode=Wb,EventType=Xb,Event=H$1,Stat={rb:0,ub:1,vb:2,Ob:3,Tb:4,Qb:5,Rb:6,Pb:7,Nb:8,Sb:9,PROXY:10,NOPROXY:11,Lb:12,Hb:13,Ib:14,Gb:15,Jb:16,Kb:17,nb:18,mb:19,ob:20},FetchXmlHttpFactory=pd,WebChannel=$b,XhrIo=X$1,_=function(){function e(e,t){var n=this;this.previousValue=e,t&&(t.sequenceNumberHandler=function(e){return n.t(e)},this.i=function(e){return t.writeSequenceNumber(e)})}return e.prototype.t=function(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue},e.prototype.next=function(){var e=++this.previousValue;return this.i&&this.i(e),e},e}();_.o=-1; 334/** 335 * @license 336 * Copyright 2017 Google LLC 337 * 338 * Licensed under the Apache License, Version 2.0 (the "License");
339 * you may not use this file except in compliance with the License. 340 * You may obtain a copy of the License at 341 * 342 * http://www.apache.org/licenses/LICENSE-2.0 343 * 344 * Unless required by applicable law or agreed to in writing, software 345 * distributed under the License is distributed on an "AS IS" BASIS, 346 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 347 * See the License for the specific language governing permissions and 348 * limitations under the License. 349 */ 350var S={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},N=function(e){function t(t,n){var r=this;return(r=e.call(this,n)||this).code=t,r.message=n,r.name="FirebaseError",r.toString=function(){return r.name+": [code="+r.code+"]: "+r.message},r}return __extends$1(t,e),t}(Error),D=new Logger("@firebase/firestore");function A(){return D.logLevel}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(D.logLevel<=LogLevel.DEBUG){var r=t.map(R);D.debug.apply(D,__spreadArray(["Firestore (8.7.0): "+e],r))}}function C(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(D.logLevel<=LogLevel.ERROR){var r=t.map(R);D.error.apply(D,__spreadArray(["Firestore (8.7.0): "+e],r))}}function x(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(D.logLevel<=LogLevel.WARN){var r=t.map(R);D.warn.apply(D,__spreadArray(["Firestore (8.7.0): "+e],r))}}function R(e){if("string"==typeof e)return e;try{return t=e,JSON.stringify(t)}catch(t){return e}var t} 351/** 352 * @license 353 * Copyright 2017 Google LLC 354 * 355 * Licensed under the Apache License, Version 2.0 (the "License"); 356 * you may not use this file except in compliance with the License. 357 * You may obtain a copy of the License at 358 * 359 * http://www.apache.org/licenses/LICENSE-2.0 360 * 361 * Unless required by applicable law or agreed to in writing, software 362 * distributed under the License is distributed on an "AS IS" BASIS, 363 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 364 * See the License for the specific language governing permissions and 365 * limitations under the License. 366 */function L(e){void 0===e&&(e="Unexpected state");var t="FIRESTORE (8.7.0) INTERNAL ASSERTION FAILED: "+e;throw C(t),new Error(t)}function O(e,t){e||L()}function P$1(e,t){return e} 367/** 368 * @license 369 * Copyright 2020 Google LLC 370 * 371 * Licensed under the Apache License, Version 2.0 (the "License"); 372 * you may not use this file except in compliance with the License. 373 * You may obtain a copy of the License at 374 * 375 * http://www.apache.org/licenses/LICENSE-2.0 376 * 377 * Unless required by applicable law or agreed to in writing, software 378 * distributed under the License is distributed on an "AS IS" BASIS, 379 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 380 * See the License for the specific language governing permissions and 381 * limitations under the License. 382 */function F(e){var t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(e);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(var r=0;r<e;r++)n[r]=Math.floor(256*Math.random());return n} 383/** 384 * @license 385 * Copyright 2017 Google LLC 386 * 387 * Licensed under the Apache License, Version 2.0 (the "License"); 388 * you may not use this file except in compliance with the License. 389 * You may obtain a copy of the License at 390 * 391 * http://www.apache.org/licenses/LICENSE-2.0 392 * 393 * Unless required by applicable law or agreed to in writing, software 394 * distributed under the License is distributed on an "AS IS" BASIS, 395 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 396 * See the License for the specific language governing permissions and 397 * limitations under the License. 398 */var M=function(){function e(){}return e.u=function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";n.length<20;)for(var r=F(40),i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length));return n},e}();function V(e,t){return e<t?-1:e>t?1:0}function q(e,t,n){return e.length===t.length&&e.every((function(e,r){return n(e,t[r])}))}function U(e){return e+"\0"} 399/** 400 * @license 401 * Copyright 2017 Google LLC 402 * 403 * Licensed under the Apache License, Version 2.0 (the "License");
404 * you may not use this file except in compliance with the License. 405 * You may obtain a copy of the License at 406 * 407 * http://www.apache.org/licenses/LICENSE-2.0 408 * 409 * Unless required by applicable law or agreed to in writing, software 410 * distributed under the License is distributed on an "AS IS" BASIS, 411 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 412 * See the License for the specific language governing permissions and 413 * limitations under the License. 414 */var B=function(){function e(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new N(S.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new N(S.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800)throw new N(S.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new N(S.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(e){return this.seconds===e.seconds?V(this.nanoseconds,e.nanoseconds):V(this.seconds,e.seconds)},e.prototype.isEqual=function(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},e}(),j=function(){function e(e){this.timestamp=e}return e.fromTimestamp=function(t){return new e(t)},e.min=function(){return new e(new B(0,0))},e.prototype.compareTo=function(e){return this.timestamp._compareTo(e.timestamp)},e.prototype.isEqual=function(e){return this.timestamp.isEqual(e.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e}(); 415/** 416 * @license 417 * Copyright 2017 Google LLC 418 * 419 * Licensed under the Apache License, Version 2.0 (the "License"); 420 * you may not use this file except in compliance with the License. 421 * You may obtain a copy of the License at 422 * 423 * http://www.apache.org/licenses/LICENSE-2.0 424 * 425 * Unless required by applicable law or agreed to in writing, software 426 * distributed under the License is distributed on an "AS IS" BASIS, 427 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 428 * See the License for the specific language governing permissions and 429 * limitations under the License. 430 */ 431/** 432 * @license 433 * Copyright 2017 Google LLC 434 * 435 * Licensed under the Apache License, Version 2.0 (the "License"); 436 * you may not use this file except in compliance with the License. 437 * You may obtain a copy of the License at 438 * 439 * http://www.apache.org/licenses/LICENSE-2.0 440 * 441 * Unless required by applicable law or agreed to in writing, software 442 * distributed under the License is distributed on an "AS IS" BASIS, 443 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 444 * See the License for the specific language governing permissions and 445 * limitations under the License. 446 */function K(e){var t=0;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Q(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function G(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0} 447/** 448 * @license 449 * Copyright 2017 Google LLC 450 * 451 * Licensed under the Apache License, Version 2.0 (the "License");
452 * you may not use this file except in compliance with the License. 453 * You may obtain a copy of the License at 454 * 455 * http://www.apache.org/licenses/LICENSE-2.0 456 * 457 * Unless required by applicable law or agreed to in writing, software 458 * distributed under the License is distributed on an "AS IS" BASIS, 459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 460 * See the License for the specific language governing permissions and 461 * limitations under the License. 462 */var z=function(){function e(e,t,n){void 0===t?t=0:t>e.length&&L(),void 0===n?n=e.length-t:n>e.length-t&&L(),this.segments=e,this.offset=t,this.len=n}return Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return 0===e.comparator(this,t)},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach((function(e){n.push(e)})):n.push(t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)},e.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return this.segments[this.offset]},e.prototype.lastSegment=function(){return this.get(this.length-1)},e.prototype.get=function(e){return this.segments[this.offset+e]},e.prototype.isEmpty=function(){return 0===this.length},e.prototype.isPrefixOf=function(e){if(e.length<this.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.isImmediateParentOf=function(e){if(this.length+1!==e.length)return!1;for(var t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0},e.prototype.forEach=function(e){for(var t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])},e.prototype.toArray=function(){return this.segments.slice(this.offset,this.limit())},e.comparator=function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){var i=e.get(r),a=t.get(r);if(i<a)return-1;if(i>a)return 1}return e.length<t.length?-1:e.length>t.length?1:0},e}(),W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=[],i=0,a=e;i<a.length;i++){var o=a[i];if(o.indexOf("//")>=0)throw new N(S.INVALID_ARGUMENT,"Invalid segment ("+o+"). Paths must not contain // in them.");r.push.apply(r,o.split("/").filter((function(e){return e.length>0})))}return new t(r)},t.emptyPath=function(){return new t([])},t}(z),H=/^[_a-zA-Z][_a-zA-Z0-9]*$/,Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype.construct=function(e,n,r){return new t(e,n,r)},t.isValidIdentifier=function(e){return H.test(e)},t.prototype.canonicalString=function(){return this.toArray().map((function(e){return e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(e)||(e="`"+e+"`"),e})).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return 1===this.length&&"__name__"===this.get(0)},t.keyField=function(){return new t(["__name__"])},t.fromServerFormat=function(e){for(var n=[],r="",i=0,a=function(){if(0===r.length)throw new N(S.INVALID_ARGUMENT,"Invalid field path ("+e+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");n.push(r),r=""},o=!1;i<e.length;){var s=e[i];if("\\"===s){if(i+1===e.length)throw new N(S.INVALID_ARGUMENT,"Path has trailing escape character: "+e);var c=e[i+1];if("\\"!==c&&"."!==c&&"`"!==c)throw new N(S.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=c,i+=2}else"`"===s?(o=!o,i++):"."!==s||o?(r+=s,i++):(a(),i++)}if(a(),o)throw new N(S.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new t(n)},t.emptyPath=function(){return new t([])},t}(z),$=function(){function e(e){this.fields=e,e.sort(Y.comparator)}return e.prototype.covers=function(e){for(var t=0,n=this.fields;t<n.length;t++)if(n[t].isPrefixOf(e))return!0;return!1},e.prototype.isEqual=function(e){return q(this.fields,e.fields,(function(e,t){return e.isEqual(t)}))},e}(),X=function(){function e(e){this.binaryString=e}return e.fromBase64String=function(t){return new e(atob(t))},e.fromUint8Array=function(t){return new e(function(e){for(var t="",n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(t))},e.prototype.toBase64=function(){return e=this.binaryString,btoa(e);var e},e.prototype.toUint8Array=function(){return function(e){for(var t=new Uint8Array(e.length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)},e.prototype.approximateByteSize=function(){return 2*this.binaryString.length},e.prototype.compareTo=function(e){return V(this.binaryString,e.binaryString)},e.prototype.isEqual=function(e){return this.binaryString===e.binaryString},e}();X.EMPTY_BYTE_STRING=new X("");var J=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Z(e){if(O(!!e),"string"==typeof e){var t=0,n=J.exec(e);if(O(!!n),n[1]){var r=n[1];r=(r+"000000000").substr(0,9),t=Number(r)}var i=new Date(e);return{seconds:Math.floor(i.getTime()/1e3),nanos:t}}return{seconds:tt(e.seconds),nanos:tt(e.nanos)}}function tt(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function et(e){return"string"==typeof e?X.fromBase64String(e):X.fromUint8Array(e)} 463/** 464 * @license 465 * Copyright 2020 Google LLC 466 * 467 * Licensed under the Apache License, Version 2.0 (the "License");
468 * you may not use this file except in compliance with the License. 469 * You may obtain a copy of the License at 470 * 471 * http://www.apache.org/licenses/LICENSE-2.0 472 * 473 * Unless required by applicable law or agreed to in writing, software 474 * distributed under the License is distributed on an "AS IS" BASIS, 475 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 476 * See the License for the specific language governing permissions and 477 * limitations under the License. 478 */function nt(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function rt(e){var t=e.mapValue.fields.__previous_value__;return nt(t)?rt(t):t}function it(e){var t=Z(e.mapValue.fields.__local_write_time__.timestampValue);return new B(t.seconds,t.nanos)} 479/** 480 * @license 481 * Copyright 2017 Google LLC 482 * 483 * Licensed under the Apache License, Version 2.0 (the "License"); 484 * you may not use this file except in compliance with the License. 485 * You may obtain a copy of the License at 486 * 487 * http://www.apache.org/licenses/LICENSE-2.0 488 * 489 * Unless required by applicable law or agreed to in writing, software 490 * distributed under the License is distributed on an "AS IS" BASIS, 491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 492 * See the License for the specific language governing permissions and 493 * limitations under the License. 494 */function ot(e){return null==e}function st(e){return 0===e&&1/e==-1/0}function ut(e){return"number"==typeof e&&Number.isInteger(e)&&!st(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER} 495/** 496 * @license 497 * Copyright 2017 Google LLC 498 * 499 * Licensed under the Apache License, Version 2.0 (the "License"); 500 * you may not use this file except in compliance with the License. 501 * You may obtain a copy of the License at 502 * 503 * http://www.apache.org/licenses/LICENSE-2.0 504 * 505 * Unless required by applicable law or agreed to in writing, software 506 * distributed under the License is distributed on an "AS IS" BASIS, 507 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 508 * See the License for the specific language governing permissions and 509 * limitations under the License. 510 */var at=function(){function e(e){this.path=e}return e.fromPath=function(t){return new e(W.fromString(t))},e.fromName=function(t){return new e(W.fromString(t).popFirst(5))},e.prototype.hasCollectionId=function(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e},e.prototype.isEqual=function(e){return null!==e&&0===W.comparator(this.path,e.path)},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(e,t){return W.comparator(e.path,t.path)},e.isDocumentKey=function(e){return e.length%2==0},e.fromSegments=function(t){return new e(new W(t.slice()))},e}(); 511/** 512 * @license 513 * Copyright 2020 Google LLC 514 * 515 * Licensed under the Apache License, Version 2.0 (the "License"); 516 * you may not use this file except in compliance with the License. 517 * You may obtain a copy of the License at 518 * 519 * http://www.apache.org/licenses/LICENSE-2.0 520 * 521 * Unless required by applicable law or agreed to in writing, software 522 * distributed under the License is distributed on an "AS IS" BASIS, 523 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 524 * See the License for the specific language governing permissions and 525 * limitations under the License. 526 */function ct(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?nt(e)?4:10:L()}function ht(e,t){var n=ct(e);if(n!==ct(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return it(e).isEqual(it(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;var n=Z(e.timestampValue),r=Z(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(e,t){return et(e.bytesValue).isEqual(et(t.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(e,t){return tt(e.geoPointValue.latitude)===tt(t.geoPointValue.latitude)&&tt(e.geoPointValue.longitude)===tt(t.geoPointValue.longitude)}(e,t);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return tt(e.integerValue)===tt(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){var n=tt(e.doubleValue),r=tt(t.doubleValue);return n===r?st(n)===st(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return q(e.arrayValue.values||[],t.arrayValue.values||[],ht);case 10:return function(e,t){var n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(K(n)!==K(r))return!1;for(var i in n)if(n.hasOwnProperty(i)&&(void 0===r[i]||!ht(n[i],r[i])))return!1;return!0}(e,t);default:return L()}}function ft(e,t){return void 0!==(e.values||[]).find((function(e){return ht(e,t)}))}function lt(e,t){var n=ct(e),r=ct(t);if(n!==r)return V(n,r);switch(n){case 0:return 0;case 1:return V(e.booleanValue,t.booleanValue);case 2:return function(e,t){var n=tt(e.integerValue||e.doubleValue),r=tt(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return dt(e.timestampValue,t.timestampValue);case 4:return dt(it(e),it(t));case 5:return V(e.stringValue,t.stringValue);case 6:return function(e,t){var n=et(e),r=et(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0;i<n.length&&i<r.length;i++){var a=V(n[i],r[i]);if(0!==a)return a}return V(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){var n=V(tt(e.latitude),tt(t.latitude));return 0!==n?n:V(tt(e.longitude),tt(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){for(var n=e.values||[],r=t.values||[],i=0;i<n.length&&i<r.length;++i){var a=lt(n[i],r[i]);if(a)return a}return V(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){var n=e.fields||{},r=Object.keys(n),i=t.fields||{},a=Object.keys(i);r.sort(),a.sort();for(var o=0;o<r.length&&o<a.length;++o){var s=V(r[o],a[o]);if(0!==s)return s;var c=lt(n[r[o]],i[a[o]]);if(0!==c)return c}return V(r.length,a.length)}(e.mapValue,t.mapValue);default:throw L()}}function dt(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return V(e,t);var n=Z(e),r=Z(t),i=V(n.seconds,r.seconds);return 0!==i?i:V(n.nanos,r.nanos)}function pt(e){return yt(e)}function yt(e){return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){var t=Z(e);return"time("+t.seconds+","+t.nanos+")"}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?et(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,at.fromName(n).toString()):"geoPointValue"in e?"geo("+(t=e.geoPointValue).latitude+","+t.longitude+")":"arrayValue"in e?function(e){for(var t="[",n=!0,r=0,i=e.values||[];r<i.length;r++)n?n=!1:t+=",",t+=yt(i[r]);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){for(var t="{",n=!0,r=0,i=Object.keys(e.fields||{}).sort();r<i.length;r++){var a=i[r];n?n=!1:t+=",",t+=a+":"+yt(e.fields[a])}return t+"}"}(e.mapValue):L();var t,n}function vt(e,t){return{referenceValue:"projects/"+e.projectId+"/databases/"+e.database+"/documents/"+t.path.canonicalString()}}function mt(e){return!!e&&"integerValue"in e}function gt(e){return!!e&&"arrayValue"in e}function wt(e){return!!e&&"nullValue"in e}function bt(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function It(e){return!!e&&"mapValue"in e}function Et(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue)return{timestampValue:Object.assign({},Z(e.timestampValue))};if(e.mapValue){var t={mapValue:{fields:{}}};return Q(e.mapValue.fields,(function(e,n){return t.mapValue.fields[e]=Et(n)})),t}if(e.arrayValue){for(var n={arrayValue:{values:[]}},r=0;r<(e.arrayValue.values||[]).length;++r)n.arrayValue.values[r]=Et(e.arrayValue.values[r]);return n}return Object.assign({},e)} 527/** 528 * @license 529 * Copyright 2017 Google LLC 530 * 531 * Licensed under the Apache License, Version 2.0 (the "License");
532 * you may not use this file except in compliance with the License. 533 * You may obtain a copy of the License at 534 * 535 * http://www.apache.org/licenses/LICENSE-2.0 536 * 537 * Unless required by applicable law or agreed to in writing, software 538 * distributed under the License is distributed on an "AS IS" BASIS, 539 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 540 * See the License for the specific language governing permissions and 541 * limitations under the License. 542 */var Tt=function(){function e(e){this.value=e}return e.empty=function(){return new e({mapValue:{}})},e.prototype.field=function(e){if(e.isEmpty())return this.value;for(var t=this.value,n=0;n<e.length-1;++n)if(!It(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null},e.prototype.set=function(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Et(t)},e.prototype.setAll=function(e){var t=this,n=Y.emptyPath(),r={},i=[];e.forEach((function(e,a){if(!n.isImmediateParentOf(a)){var o=t.getFieldsMap(n);t.applyChanges(o,r,i),r={},i=[],n=a.popLast()}e?r[a.lastSegment()]=Et(e):i.push(a.lastSegment())}));var a=this.getFieldsMap(n);this.applyChanges(a,r,i)},e.prototype.delete=function(e){var t=this.field(e.popLast());It(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]},e.prototype.isEqual=function(e){return ht(this.value,e.value)},e.prototype.getFieldsMap=function(e){var t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(var n=0;n<e.length;++n){var r=t.mapValue.fields[e.get(n)];It(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields},e.prototype.applyChanges=function(e,t,n){Q(t,(function(t,n){return e[t]=n}));for(var r=0,i=n;r<i.length;r++){var a=i[r];delete e[a]}},e.prototype.clone=function(){return new e(Et(this.value))},e}();function _t(e){var t=[];return Q(e.fields,(function(e,n){var r=new Y([e]);if(It(n)){var i=_t(n.mapValue).fields;if(0===i.length)t.push(r);else for(var a=0,o=i;a<o.length;a++){var s=o[a];t.push(r.child(s))}}else t.push(r)})),new $(t) 543/** 544 * @license 545 * Copyright 2017 Google LLC 546 * 547 * Licensed under the Apache License, Version 2.0 (the "License"); 548 * you may not use this file except in compliance with the License. 549 * You may obtain a copy of the License at 550 * 551 * http://www.apache.org/licenses/LICENSE-2.0 552 * 553 * Unless required by applicable law or agreed to in writing, software 554 * distributed under the License is distributed on an "AS IS" BASIS, 555 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 556 * See the License for the specific language governing permissions and 557 * limitations under the License. 558 */}var St=function(){function e(e,t,n,r,i){this.key=e,this.documentType=t,this.version=n,this.data=r,this.documentState=i}return e.newInvalidDocument=function(t){return new e(t,0,j.min(),Tt.empty(),0)},e.newFoundDocument=function(t,n,r){return new e(t,1,n,r,0)},e.newNoDocument=function(t,n){return new e(t,2,n,Tt.empty(),0)},e.newUnknownDocument=function(t,n){return new e(t,3,n,Tt.empty(),2)},e.prototype.convertToFoundDocument=function(e,t){return this.version=e,this.documentType=1,this.data=t,this.documentState=0,this},e.prototype.convertToNoDocument=function(e){return this.version=e,this.documentType=2,this.data=Tt.empty(),this.documentState=0,this},e.prototype.convertToUnknownDocument=function(e){return this.version=e,this.documentType=3,this.data=Tt.empty(),this.documentState=2,this},e.prototype.setHasCommittedMutations=function(){return this.documentState=2,this},e.prototype.setHasLocalMutations=function(){return this.documentState=1,this},Object.defineProperty(e.prototype,"hasLocalMutations",{get:function(){return 1===this.documentState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasCommittedMutations",{get:function(){return 2===this.documentState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return this.hasLocalMutations||this.hasCommittedMutations}
558,enumerable:!1,configurable:!0}),e.prototype.isValidDocument=function(){return 0!==this.documentType},e.prototype.isFoundDocument=function(){return 1===this.documentType},e.prototype.isNoDocument=function(){return 2===this.documentType},e.prototype.isUnknownDocument=function(){return 3===this.documentType},e.prototype.isEqual=function(t){return t instanceof e&&this.key.isEqual(t.key)&&this.version.isEqual(t.version)&&this.documentType===t.documentType&&this.documentState===t.documentState&&this.data.isEqual(t.data)},e.prototype.clone=function(){return new e(this.key,this.documentType,this.version,this.data.clone(),this.documentState)},e.prototype.toString=function(){return"Document("+this.key+", "+this.version+", "+JSON.stringify(this.data.value)+", {documentType: "+this.documentType+"}), {documentState: "+this.documentState+"})"},e}(),Nt=function(e,t,n,r,i,a,o){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===a&&(a=null),void 0===o&&(o=null),this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=a,this.endAt=o,this.h=null}; 559/** 560 * @license 561 * Copyright 2019 Google LLC 562 * 563 * Licensed under the Apache License, Version 2.0 (the "License"); 564 * you may not use this file except in compliance with the License. 565 * You may obtain a copy of the License at 566 * 567 * http://www.apache.org/licenses/LICENSE-2.0 568 * 569 * Unless required by applicable law or agreed to in writing, software 570 * distributed under the License is distributed on an "AS IS" BASIS, 571 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 572 * See the License for the specific language governing permissions and 573 * limitations under the License. 574 */function Dt(e,t,n,r,i,a,o){return void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===a&&(a=null),void 0===o&&(o=null),new Nt(e,t,n,r,i,a,o)}function At(e){var t=P$1(e);if(null===t.h){var n=t.path.canonicalString();null!==t.collectionGroup&&(n+="|cg:"+t.collectionGroup),n+="|f:",n+=t.filters.map((function(e){return function(e){return e.field.canonicalString()+e.op.toString()+pt(e.value)}(e)})).join(","),n+="|ob:",n+=t.orderBy.map((function(e){return function(e){return e.field.canonicalString()+e.dir}(e)})).join(","),ot(t.limit)||(n+="|l:",n+=t.limit),t.startAt&&(n+="|lb:",n+=Bt(t.startAt)),t.endAt&&(n+="|ub:",n+=Bt(t.endAt)),t.h=n}return t.h}function kt(e,t){if(e.limit!==t.limit)return!1;if(e.orderBy.length!==t.orderBy.length)return!1;for(var n=0;n<e.orderBy.length;n++)if(!Kt(e.orderBy[n],t.orderBy[n]))return!1;if(e.filters.length!==t.filters.length)return!1;for(var r=0;r<e.filters.length;r++)if(i=e.filters[r],a=t.filters[r],i.op!==a.op||!i.field.isEqual(a.field)||!ht(i.value,a.value))return!1;var i,a;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!Gt(e.startAt,t.startAt)&&Gt(e.endAt,t.endAt)}function Ct(e){return at.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}var xt=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).field=t,i.op=n,i.value=r,i}return __extends$1(t,e),t.create=function(e,n,r){return e.isKeyField()?"in"===n||"not-in"===n?this.l(e,n,r):new Rt(e,n,r):"array-contains"===n?new Ft(e,r):"in"===n?new Mt(e,r):"not-in"===n?new Vt(e,r):"array-contains-any"===n?new qt(e,r):new t(e,n,r)},t.l=function(e,t,n){return"in"===t?new Lt(e,n):new Ot(e,n)},t.prototype.matches=function(e){var t=e.data.field(this.field);return"!="===this.op?null!==t&&this.m(lt(t,this.value)):null!==t&&ct(this.value)===ct(t)&&this.m(lt(t,this.value))},t.prototype.m=function(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return L()}},t.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},t}((function(){})),Rt=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n,r)||this).key=at.fromName(r.referenceValue),i}return __extends$1(t,e),t.prototype.matches=function(e){var t=at.comparator(e.key,this.key);return this.m(t)}
574,t}(xt),Lt=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"in",n)||this).keys=Pt("in",n),r}return __extends$1(t,e),t.prototype.matches=function(e){return this.keys.some((function(t){return t.isEqual(e.key)}))},t}(xt),Ot=function(e){function t(t,n){var r=this;return(r=e.call(this,t,"not-in",n)||this).keys=Pt("not-in",n),r}return __extends$1(t,e),t.prototype.matches=function(e){return!this.keys.some((function(t){return t.isEqual(e.key)}))},t}(xt);function Pt(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map((function(e){return at.fromName(e.referenceValue)}))}var Ft=function(e){function t(t,n){return e.call(this,t,"array-contains",n)||this}return __extends$1(t,e),t.prototype.matches=function(e){var t=e.data.field(this.field);return gt(t)&&ft(t.arrayValue,this.value)},t}(xt),Mt=function(e){function t(t,n){return e.call(this,t,"in",n)||this}return __extends$1(t,e),t.prototype.matches=function(e){var t=e.data.field(this.field);return null!==t&&ft(this.value.arrayValue,t)},t}(xt),Vt=function(e){function t(t,n){return e.call(this,t,"not-in",n)||this}return __extends$1(t,e),t.prototype.matches=function(e){if(ft(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var t=e.data.field(this.field);return null!==t&&!ft(this.value.arrayValue,t)},t}(xt),qt=function(e){function t(t,n){return e.call(this,t,"array-contains-any",n)||this}return __extends$1(t,e),t.prototype.matches=function(e){var t=this,n=e.data.field(this.field);return!(!gt(n)||!n.arrayValue.values)&&n.arrayValue.values.some((function(e){return ft(t.value.arrayValue,e)}))},t}(xt),Ut=function(e,t){this.position=e,this.before=t};function Bt(e){return(e.before?"b":"a")+":"+e.position.map((function(e){return pt(e)})).join(",")}var jt=function(e,t){void 0===t&&(t="asc"),this.field=e,this.dir=t};function Kt(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function Qt(e,t,n){for(var r=0,i=0;i<e.position.length;i++){var a=t[i],o=e.position[i];if(r=a.field.isKeyField()?at.comparator(at.fromName(o.referenceValue),n.key):lt(o,n.data.field(a.field)),"desc"===a.dir&&(r*=-1),0!==r)break}return e.before?r<=0:r<0}function Gt(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.before!==t.before||e.position.length!==t.position.length)return!1;for(var n=0;n<e.position.length;n++)if(!ht(e.position[n],t.position[n]))return!1;return!0} 575/** 576 * @license 577 * Copyright 2017 Google LLC 578 * 579 * Licensed under the Apache License, Version 2.0 (the "License"); 580 * you may not use this file except in compliance with the License. 581 * You may obtain a copy of the License at 582 * 583 * http://www.apache.org/licenses/LICENSE-2.0 584 * 585 * Unless required by applicable law or agreed to in writing, software 586 * distributed under the License is distributed on an "AS IS" BASIS, 587 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 588 * See the License for the specific language governing permissions and 589 * limitations under the License. 590 */var zt=function(e,t,n,r,i,a,o,s){void 0===t&&(t=null),void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i=null),void 0===a&&(a="F"),void 0===o&&(o=null),void 0===s&&(s=null),this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=a,this.startAt=o,this.endAt=s,this.p=null,this.T=null,this.startAt,this.endAt};function Wt(e,t,n,r,i,a,o,s){return new zt(e,t,n,r,i,a,o,s)}function Ht(e){return new zt(e)}function Yt(e){return!ot(e.limit)&&"F"===e.limitType}function $t(e){return!ot(e.limit)&&"L"===e.limitType}function Xt(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function Jt(e){for(var t=0,n=e.filters;t<n.length;t++){var r=n[t];if(r.g())return r.field}return null}function Zt(e){return null!==e.collectionGroup}function te(e){var t=P$1(e);if(null===t.p){t.p=[];var n=Jt(t),r=Xt(t);if(null!==n&&null===r)n.isKeyField()||t.p.push(new jt(n)),t.p.push(new jt(Y.keyField(),"asc"));else{for(var i=!1,a=0,o=t.explicitOrderBy;a<o.length;a++){var s=o[a];t.p.push(s),s.field.isKeyField()&&(i=!0)}if(!i){var c=t.explicitOrderBy.length>0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.p.push(new jt(Y.keyField(),c))}}}return t.p}function ee(e){var t=P$1(e);if(!t.T)if("F"===t.limitType)t.T=Dt(t.path,t.collectionGroup,te(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=te(t);r<i.length;r++){var a=i[r],o="desc"===a.dir?"asc":"desc";n.push(new jt(a.field,o))}var s=t.endAt?new Ut(t.endAt.position,!t.endAt.before):null,c=t.startAt?new Ut(t.startAt.position,!t.startAt.before):null;t.T=Dt(t.path,t.collectionGroup,n,t.filters,t.limit,s,c)}return t.T}function ne(e,t,n){return new zt(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function re(e,t){return kt(ee(e),ee(t))&&e.limitType===t.limitType}function ie(e){return At(ee(e))+"|lt:"+e.limitType}function oe(e){return"Query(target="+function(e){var t=e.path.canonicalString();return null!==e.collectionGroup&&(t+=" collectionGroup="+e.collectionGroup),e.filters.length>0&&(t+=", filters: ["+e.filters.map((function(e){return(t=e).field.canonicalString()+" "+t.op+" "+pt(t.value);var t})).join(", ")+"]"),ot(e.limit)||(t+=", limit: "+e.limit),e.orderBy.length>0&&(t+=", orderBy: ["+e.orderBy.map((function(e){return function(e){return e.field.canonicalString()+" ("+e.dir+")"}(e)})).join(", ")+"]"),e.startAt&&(t+=", startAt: "+Bt(e.startAt)),e.endAt&&(t+=", endAt: "+Bt(e.endAt)),"Target("+t+")"}(ee(e))+"; limitType="+e.limitType+")"}function se(e,t){return t.isFoundDocument()&&function(e,t){var n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):at.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(var n=0,r=e.explicitOrderBy;n<r.length;n++){var i=r[n];if(!i.field.isKeyField()&&null===t.data.field(i.field))return!1}return!0}(e,t)&&function(e,t){for(var n=0,r=e.filters;n<r.length;n++)if(!r[n].matches(t))return!1;return!0}(e,t)&&function(e,t){return!(e.startAt&&!Qt(e.startAt,te(e),t)||e.endAt&&Qt(e.endAt,te(e),t))}(e,t)}function ue(e){return function(t,n){for(var r=!1,i=0,a=te(e);i<a.length;i++){var o=a[i],s=ae(o,t,n);if(0!==s)return s;r=r||o.field.isKeyField()}return 0}}function ae(e,t,n){var r=e.field.isKeyField()?at.comparator(t.key,n.key):function(e,t,n){var r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?lt(r,i):L()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return-1*r;default:return L()}} 591/** 592 * @license 593 * Copyright 2020 Google LLC 594 * 595 * Licensed under the Apache License, Version 2.0 (the "License");
596 * you may not use this file except in compliance with the License. 597 * You may obtain a copy of the License at 598 * 599 * http://www.apache.org/licenses/LICENSE-2.0 600 * 601 * Unless required by applicable law or agreed to in writing, software 602 * distributed under the License is distributed on an "AS IS" BASIS, 603 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 604 * See the License for the specific language governing permissions and 605 * limitations under the License. 606 */function ce(e,t){if(e.I){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:st(t)?"-0":t}}function he(e){return{integerValue:""+e}}function fe(e,t){return ut(t)?he(t):ce(e,t)} 607/** 608 * @license 609 * Copyright 2018 Google LLC 610 * 611 * Licensed under the Apache License, Version 2.0 (the "License"); 612 * you may not use this file except in compliance with the License. 613 * You may obtain a copy of the License at 614 * 615 * http://www.apache.org/licenses/LICENSE-2.0 616 * 617 * Unless required by applicable law or agreed to in writing, software 618 * distributed under the License is distributed on an "AS IS" BASIS, 619 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 620 * See the License for the specific language governing permissions and 621 * limitations under the License. 622 */var le=function(){this._=void 0};function de(e,t,n){return e instanceof ve?function(e,t){var n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&(n.fields.__previous_value__=t),{mapValue:n}}(n,t):e instanceof me?ge(e,t):e instanceof we?be(e,t):function(e,t){var n=ye(e,t),r=Ee(n)+Ee(e.A);return mt(n)&&mt(e.A)?he(r):ce(e.R,r)}(e,t)}function pe(e,t,n){return e instanceof me?ge(e,t):e instanceof we?be(e,t):n}function ye(e,t){return e instanceof Ie?mt(n=t)||function(e){return!!e&&"doubleValue"in e}(n)?t:{integerValue:0}:null;var n}var ve=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t}(le),me=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return __extends$1(t,e),t}(le);function ge(e,t){for(var n=Te(t),r=function(e){n.some((function(t){return ht(t,e)}))||n.push(e)},i=0,a=e.elements;i<a.length;i++)r(a[i]);return{arrayValue:{values:n}}}var we=function(e){function t(t){var n=this;return(n=e.call(this)||this).elements=t,n}return __extends$1(t,e),t}(le);function be(e,t){for(var n=Te(t),r=function(e){n=n.filter((function(t){return!ht(t,e)}))},i=0,a=e.elements;i<a.length;i++)r(a[i]);return{arrayValue:{values:n}}}var Ie=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).R=t,r.A=n,r}return __extends$1(t,e),t}(le);function Ee(e){return tt(e.integerValue||e.doubleValue)}function Te(e){return gt(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]} 623/** 624 * @license 625 * Copyright 2017 Google LLC 626 * 627 * Licensed under the Apache License, Version 2.0 (the "License"); 628 * you may not use this file except in compliance with the License. 629 * You may obtain a copy of the License at 630 * 631 * http://www.apache.org/licenses/LICENSE-2.0 632 * 633 * Unless required by applicable law or agreed to in writing, software 634 * distributed under the License is distributed on an "AS IS" BASIS, 635 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 636 * See the License for the specific language governing permissions and 637 * limitations under the License. 638 */var _e=function(e,t){this.field=e,this.transform=t},Se=function(e,t){this.version=e,this.transformResults=t},Ne=function(){function e(e,t){this.updateTime=e,this.exists=t}return e.none=function(){return new e},e.exists=function(t){return new e(void 0,t)},e.updateTime=function(t){return new e(t)},Object.defineProperty(e.prototype,"isNone",{get:function(){return void 0===this.updateTime&&void 0===this.exists}
638,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)},e}();function De(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}var Ae=function(){};function ke(e,t,n){e instanceof Oe?function(e,t,n){var r=e.value.clone(),i=Me(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(e,t,n):e instanceof Pe?function(e,t,n){if(De(e.precondition,t)){var r=Me(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(Fe(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}else t.convertToUnknownDocument(n.version)}(e,t,n):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,t,n)}function Ce(e,t,n){e instanceof Oe?function(e,t,n){if(De(e.precondition,t)){var r=e.value.clone(),i=Ve(e.fieldTransforms,n,t);r.setAll(i),t.convertToFoundDocument(Le(t),r).setHasLocalMutations()}}(e,t,n):e instanceof Pe?function(e,t,n){if(De(e.precondition,t)){var r=Ve(e.fieldTransforms,n,t),i=t.data;i.setAll(Fe(e)),i.setAll(r),t.convertToFoundDocument(Le(t),i).setHasLocalMutations()}}(e,t,n):function(e,t){De(e.precondition,t)&&t.convertToNoDocument(j.min())}(e,t)}function xe(e,t){for(var n=null,r=0,i=e.fieldTransforms;r<i.length;r++){var a=i[r],o=t.data.field(a.field),s=ye(a.transform,o||null);null!=s&&(null==n&&(n=Tt.empty()),n.set(a.field,s))}return n||null}function Re(e,t){return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&!!function(e,t){return void 0===e&&void 0===t||!(!e||!t)&&q(e,t,(function(e,t){return function(e,t){return e.field.isEqual(t.field)&&function(e,t){return e instanceof me&&t instanceof me||e instanceof we&&t instanceof we?q(e.elements,t.elements,ht):e instanceof Ie&&t instanceof Ie?ht(e.A,t.A):e instanceof ve&&t instanceof ve}(e.transform,t.transform)}(e,t)}))}(e.fieldTransforms,t.fieldTransforms)&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}function Le(e){return e.isFoundDocument()?e.version:j.min()}var Oe=function(e){function t(t,n,r,i){void 0===i&&(i=[]);var a=this;return(a=e.call(this)||this).key=t,a.value=n,a.precondition=r,a.fieldTransforms=i,a.type=0,a}return __extends$1(t,e),t}(Ae),Pe=function(e){function t(t,n,r,i,a){void 0===a&&(a=[]);var o=this;return(o=e.call(this)||this).key=t,o.data=n,o.fieldMask=r,o.precondition=i,o.fieldTransforms=a,o.type=1,o}return __extends$1(t,e),t}(Ae);function Fe(e){var t=new Map;return e.fieldMask.fields.forEach((function(n){if(!n.isEmpty()){var r=e.data.field(n);t.set(n,r)}})),t}function Me(e,t,n){var r=new Map;O(e.length===n.length);for(var i=0;i<n.length;i++){var a=e[i],o=a.transform,s=t.data.field(a.field);r.set(a.field,pe(o,s,n[i]))}return r}function Ve(e,t,n){for(var r=new Map,i=0,a=e;i<a.length;i++){var o=a[i],s=o.transform,c=n.data.field(o.field);r.set(o.field,de(s,c,t))}return r}var qe,Ue,Be=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.precondition=n,r.type=2,r.fieldTransforms=[],r}return __extends$1(t,e),t}(Ae),je=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).key=t,r.precondition=n,r.type=3,r.fieldTransforms=[],r}return __extends$1(t,e),t}(Ae),Ke=function(e){this.count=e};function Qe(e){switch(e){case S.OK:return L();case S.CANCELLED:case S.UNKNOWN:case S.DEADLINE_EXCEEDED:case S.RESOURCE_EXHAUSTED:case S.INTERNAL:case S.UNAVAILABLE:case S.UNAUTHENTICATED:return!1;case S.INVALID_ARGUMENT:case S.NOT_FOUND:case S.ALREADY_EXISTS:case S.PERMISSION_DENIED:case S.FAILED_PRECONDITION:case S.ABORTED:case S.OUT_OF_RANGE:case S.UNIMPLEMENTED:case S.DATA_LOSS:return!0;default:return L()}}function Ge(e){if(void 0===e)return C("GRPC error has no .code"),S.UNKNOWN;switch(e){case qe.OK:return S.OK;case qe.CANCELLED:return S.CANCELLED;case qe.UNKNOWN:return S.UNKNOWN;case qe.DEADLINE_EXCEEDED:return S.DEADLINE_EXCEEDED;case qe.RESOURCE_EXHAUSTED:return S.RESOURCE_EXHAUSTED;case qe.INTERNAL:return S.INTERNAL;case qe.UNAVAILABLE:return S.UNAVAILABLE;case qe.UNAUTHENTICATED:return S.UNAUTHENTICATED;case qe.INVALID_ARGUMENT:return S.INVALID_ARGUMENT;case qe.NOT_FOUND:return S.NOT_FOUND;case qe.ALREADY_EXISTS:return S.ALREADY_EXISTS;case qe.PERMISSION_DENIED:return S.PERMISSION_DENIED;case qe.FAILED_PRECONDITION:return S.FAILED_PRECONDITION;case qe.ABORTED:return S.ABORTED;case qe.OUT_OF_RANGE:return S.OUT_OF_RANGE;
638case qe.UNIMPLEMENTED:return S.UNIMPLEMENTED;case qe.DATA_LOSS:return S.DATA_LOSS;default:return L()}}(Ue=qe||(qe={}))[Ue.OK=0]="OK",Ue[Ue.CANCELLED=1]="CANCELLED",Ue[Ue.UNKNOWN=2]="UNKNOWN",Ue[Ue.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",Ue[Ue.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",Ue[Ue.NOT_FOUND=5]="NOT_FOUND",Ue[Ue.ALREADY_EXISTS=6]="ALREADY_EXISTS",Ue[Ue.PERMISSION_DENIED=7]="PERMISSION_DENIED",Ue[Ue.UNAUTHENTICATED=16]="UNAUTHENTICATED",Ue[Ue.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",Ue[Ue.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",Ue[Ue.ABORTED=10]="ABORTED",Ue[Ue.OUT_OF_RANGE=11]="OUT_OF_RANGE",Ue[Ue.UNIMPLEMENTED=12]="UNIMPLEMENTED",Ue[Ue.INTERNAL=13]="INTERNAL",Ue[Ue.UNAVAILABLE=14]="UNAVAILABLE",Ue[Ue.DATA_LOSS=15]="DATA_LOSS"; 639/** 640 * @license 641 * Copyright 2017 Google LLC 642 * 643 * Licensed under the Apache License, Version 2.0 (the "License"); 644 * you may not use this file except in compliance with the License. 645 * You may obtain a copy of the License at 646 * 647 * http://www.apache.org/licenses/LICENSE-2.0 648 * 649 * Unless required by applicable law or agreed to in writing, software 650 * distributed under the License is distributed on an "AS IS" BASIS, 651 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 652 * See the License for the specific language governing permissions and 653 * limitations under the License. 654 */ 655var ze=function(){function e(e,t){this.comparator=e,this.root=t||He.EMPTY}return e.prototype.insert=function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,He.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,He.BLACK,null,null))},e.prototype.get=function(e){for(var t=this.root;!t.isEmpty();){var n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null},e.prototype.indexOf=function(e){for(var t=0,n=this.root;!n.isEmpty();){var r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(e){return this.root.inorderTraversal(e)},e.prototype.forEach=function(e){this.inorderTraversal((function(t,n){return e(t,n),!1}))},e.prototype.toString=function(){var e=[];return this.inorderTraversal((function(t,n){return e.push(t+":"+n),!1})),"{"+e.join(", ")+"}"},e.prototype.reverseTraversal=function(e){return this.root.reverseTraversal(e)},e.prototype.getIterator=function(){return new We(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(e){return new We(this.root,e,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new We(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(e){return new We(this.root,e,this.comparator,!0)},e}(),We=function(){function e(e,t,n,r){this.isReverse=r,this.nodeStack=[];for(var i=1;!e.isEmpty();)if(i=t?n(e.key,t):1,r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}return e.prototype.getNext=function(){var e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t},e.prototype.hasNext=function(){return this.nodeStack.length>0},e.prototype.peek=function(){if(0===this.nodeStack.length)return null;var e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}},e}(),He=function(){function e(t,n,r,i,a){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:e.EMPTY,this.right=null!=a?a:e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,a){return new e(null!=t?t:this.key,null!=n?n:this.value,
655null!=r?r:this.color,null!=i?i:this.left,null!=a?a:this.right)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),0===n(t,i.key)){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e},e.prototype.moveRedLeft=function(){var e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e},e.prototype.moveRedRight=function(){var e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.checkMaxDepth=function(){var e=this.check();return Math.pow(2,e)<=this.size+1},e.prototype.check=function(){if(this.isRed()&&this.left.isRed())throw L();if(this.right.isRed())throw L();var e=this.left.check();if(e!==this.right.check())throw L();return e+(this.isRed()?0:1)},e}();He.EMPTY=null,He.RED=!0,He.BLACK=!1,He.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw L()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw L()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw L()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw L()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw L()},enumerable:!1,configurable:!0}),e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new He(e,t)},e.prototype.remove=function(e,t){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}()); 656/** 657 * @license 658 * Copyright 2017 Google LLC 659 * 660 * Licensed under the Apache License, Version 2.0 (the "License"); 661 * you may not use this file except in compliance with the License. 662 * You may obtain a copy of the License at 663 * 664 * http://www.apache.org/licenses/LICENSE-2.0 665 * 666 * Unless required by applicable law or agreed to in writing, softw
666are 667 * distributed under the License is distributed on an "AS IS" BASIS, 668 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 669 * See the License for the specific language governing permissions and 670 * limitations under the License. 671 */ 672var Ye=function(){function e(e){this.comparator=e,this.data=new ze(this.comparator)}return e.prototype.has=function(e){return null!==this.data.get(e)},e.prototype.first=function(){return this.data.minKey()},e.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(e){return this.data.indexOf(e)},e.prototype.forEach=function(e){this.data.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.forEachInRange=function(e,t){for(var n=this.data.getIteratorFrom(e[0]);n.hasNext();){var r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}},e.prototype.forEachWhile=function(e,t){var n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return},e.prototype.firstAfterOrEqual=function(e){var t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null},e.prototype.getIterator=function(){return new $e(this.data.getIterator())},e.prototype.getIteratorFrom=function(e){return new $e(this.data.getIteratorFrom(e))},e.prototype.add=function(e){return this.copy(this.data.remove(e).insert(e,!0))},e.prototype.delete=function(e){return this.has(e)?this.copy(this.data.remove(e)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(e){var t=this;return t.size<e.size&&(t=e,e=this),e.forEach((function(e){t=t.add(e)})),t},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.data.getIterator(),r=t.data.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(0!==this.comparator(i,a))return!1}return!0},e.prototype.toArray=function(){var e=[];return this.forEach((function(t){e.push(t)})),e},e.prototype.toString=function(){var e=[];return this.forEach((function(t){return e.push(t)})),"SortedSet("+e.toString()+")"},e.prototype.copy=function(t){var n=new e(this.comparator);return n.data=t,n},e}(),$e=function(){function e(e){this.iter=e}return e.prototype.getNext=function(){return this.iter.getNext().key},e.prototype.hasNext=function(){return this.iter.hasNext()},e}(),Xe=new ze(at.comparator);function Je(){return Xe}var Ze=new ze(at.comparator);function tn(){return Ze}var en=new ze(at.comparator);function nn(){return en}var rn=new Ye(at.comparator);function on(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=rn,r=0,i=e;r<i.length;r++){var a=i[r];n=n.add(a)}return n}var sn=new Ye(V);function un(){return sn} 673/** 674 * @license 675 * Copyright 2017 Google LLC 676 * 677 * Licensed under the Apache License, Version 2.0 (the "License"); 678 * you may not use this file except in compliance with the License. 679 * You may obtain a copy of the License at 680 * 681 * http://www.apache.org/licenses/LICENSE-2.0 682 * 683 * Unless required by applicable law or agreed to in writing, software 684 * distributed under the License is distributed on an "AS IS" BASIS, 685 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 686 * See the License for the specific language governing permissions and 687 * limitations under the License. 688 */var an=function(){function e(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}return e.createSynthesizedRemoteEventForCurrentChange=function(t,n){var r=new Map;return r.set(t,cn.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(j.min(),r,un(),Je(),on())},e}(),cn=function(){function e(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}return e.createSynthesizedTargetChangeForCurrentChange=function(t,n){return new e(X.EMPTY_BYTE_STRING,n,on(),on(),on())},e}(),hn=function(e,t,n,r){this.v=e,this.removedTargetIds=t,this.key=n,this.P=r},fn=function(e,t){this.targetId=e,this.V=t},ln=function(e,t,n,r){void 0===n&&(n=X.EMPTY_BYTE_STRING),void 0===r&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r},dn=function(){function e(){this.S=0,this.D=vn(),this.C=X.EMPTY_BYTE_STRING,this.N=!1,this.F=!0}return Object.defineProperty(e.prototype,"current",{get:function(){return this.N}
688,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this.C},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"k",{get:function(){return 0!==this.S},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"$",{get:function(){return this.F},enumerable:!1,configurable:!0}),e.prototype.O=function(e){e.approximateByteSize()>0&&(this.F=!0,this.C=e)},e.prototype.M=function(){var e=on(),t=on(),n=on();return this.D.forEach((function(r,i){switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:L()}})),new cn(this.C,this.N,e,t,n)},e.prototype.L=function(){this.F=!1,this.D=vn()},e.prototype.B=function(e,t){this.F=!0,this.D=this.D.insert(e,t)},e.prototype.q=function(e){this.F=!0,this.D=this.D.remove(e)},e.prototype.U=function(){this.S+=1},e.prototype.K=function(){this.S-=1},e.prototype.j=function(){this.F=!0,this.N=!0},e}(),pn=function(){function e(e){this.W=e,this.G=new Map,this.H=Je(),this.J=yn(),this.Y=new Ye(V)}return e.prototype.X=function(e){for(var t=0,n=e.v;t<n.length;t++){var r=n[t];e.P&&e.P.isFoundDocument()?this.Z(r,e.P):this.tt(r,e.key,e.P)}for(var i=0,a=e.removedTargetIds;i<a.length;i++)r=a[i],this.tt(r,e.key,e.P)},e.prototype.et=function(e){var t=this;this.forEachTarget(e,(function(n){var r=t.nt(n);switch(e.state){case 0:t.st(n)&&r.O(e.resumeToken);break;case 1:r.K(),r.k||r.L(),r.O(e.resumeToken);break;case 2:r.K(),r.k||t.removeTarget(n);break;case 3:t.st(n)&&(r.j(),r.O(e.resumeToken));break;case 4:t.st(n)&&(t.it(n),r.O(e.resumeToken));break;default:L()}}))},e.prototype.forEachTarget=function(e,t){var n=this;e.targetIds.length>0?e.targetIds.forEach(t):this.G.forEach((function(e,r){n.st(r)&&t(r)}))},e.prototype.rt=function(e){var t=e.targetId,n=e.V.count,r=this.ot(t);if(r){var i=r.target;if(Ct(i))if(0===n){var a=new at(i.path);this.tt(t,a,St.newNoDocument(a,j.min()))}else O(1===n);else this.ct(t)!==n&&(this.it(t),this.Y=this.Y.add(t))}},e.prototype.ut=function(e){var t=this,n=new Map;this.G.forEach((function(r,i){var a=t.ot(i);if(a){if(r.current&&Ct(a.target)){var o=new at(a.target.path);null!==t.H.get(o)||t.at(i,o)||t.tt(i,o,St.newNoDocument(o,e))}r.$&&(n.set(i,r.M()),r.L())}}));var r=on();this.J.forEach((function(e,n){var i=!0;n.forEachWhile((function(e){var n=t.ot(e);return!n||2===n.purpose||(i=!1,!1)})),i&&(r=r.add(e))}));var i=new an(e,n,this.Y,this.H,r);return this.H=Je(),this.J=yn(),this.Y=new Ye(V),i},e.prototype.Z=function(e,t){if(this.st(e)){var n=this.at(e,t.key)?2:0;this.nt(e).B(t.key,n),this.H=this.H.insert(t.key,t),this.J=this.J.insert(t.key,this.ht(t.key).add(e))}},e.prototype.tt=function(e,t,n){if(this.st(e)){var r=this.nt(e);this.at(e,t)?r.B(t,1):r.q(t),this.J=this.J.insert(t,this.ht(t).delete(e)),n&&(this.H=this.H.insert(t,n))}},e.prototype.removeTarget=function(e){this.G.delete(e)},e.prototype.ct=function(e){var t=this.nt(e).M();return this.W.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size},e.prototype.U=function(e){this.nt(e).U()},e.prototype.nt=function(e){var t=this.G.get(e);return t||(t=new dn,this.G.set(e,t)),t},e.prototype.ht=function(e){var t=this.J.get(e);return t||(t=new Ye(V),this.J=this.J.insert(e,t)),t},e.prototype.st=function(e){var t=null!==this.ot(e);return t||k("WatchChangeAggregator","Detected inactive target",e),t},e.prototype.ot=function(e){var t=this.G.get(e);return t&&t.k?null:this.W.lt(e)},e.prototype.it=function(e){var t=this;this.G.set(e,new dn),this.W.getRemoteKeysForTarget(e).forEach((function(n){t.tt(e,n,null)}))},e.prototype.at=function(e,t){return this.W.getRemoteKeysForTarget(e).has(t)},e}();function yn(){return new ze(at.comparator)}function vn(){return new ze(at.comparator)} 689/** 690 * @license 691 * Copyright 2017 Google LLC 692 * 693 * Licensed under the Apache License, Version 2.0 (the "License"); 694 * you may not use this file except in compliance with the License. 695 * You may obtain a copy of the License at 696 * 697 * http://www.apache.org/licenses/LICENSE-2.0 698 * 699 * Unless required by applicable law or agreed to in writing, softw
699are 700 * distributed under the License is distributed on an "AS IS" BASIS, 701 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 702 * See the License for the specific language governing permissions and 703 * limitations under the License. 704 */var mn={asc:"ASCENDING",desc:"DESCENDING"},gn={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},wn=function(e,t){this.databaseId=e,this.I=t};function bn(e,t){return e.I?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function In(e,t){return e.I?t.toBase64():t.toUint8Array()}function En(e,t){return bn(e,t.toTimestamp())}function Tn(e){return O(!!e),j.fromTimestamp(function(e){var t=Z(e);return new B(t.seconds,t.nanos)}(e))}function _n(e,t){return function(e){return new W(["projects",e.projectId,"databases",e.database])}(e).child("documents").child(t).canonicalString()}function Sn(e){var t=W.fromString(e);return O(Yn(t)),t}function Nn(e,t){return _n(e.databaseId,t.path)}function Dn(e,t){var n=Sn(t);if(n.get(1)!==e.databaseId.projectId)throw new N(S.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new N(S.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new at(xn(n))}function An(e,t){return _n(e.databaseId,t)}function kn(e){var t=Sn(e);return 4===t.length?W.emptyPath():xn(t)}function Cn(e){return new W(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function xn(e){return O(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function Rn(e,t,n){return{name:Nn(e,t),fields:n.value.mapValue.fields}}function Ln(e,t,n){var r=Dn(e,t.name),i=Tn(t.updateTime),a=new Tt({mapValue:{fields:t.fields}}),o=St.newFoundDocument(r,i,a);return n&&o.setHasCommittedMutations(),n?o.setHasCommittedMutations():o}function On(e,t){var n;if(t instanceof Oe)n={update:Rn(e,t.key,t.value)};else if(t instanceof Be)n={delete:Nn(e,t.key)};else if(t instanceof Pe)n={update:Rn(e,t.key,t.data),updateMask:Hn(t.fieldMask)};else{if(!(t instanceof je))return L();n={verify:Nn(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map((function(e){return function(e,t){var n=t.transform;if(n instanceof ve)return{fieldPath:t.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(n instanceof me)return{fieldPath:t.field.canonicalString(),appendMissingElements:{values:n.elements}};if(n instanceof we)return{fieldPath:t.field.canonicalString(),removeAllFromArray:{values:n.elements}};if(n instanceof Ie)return{fieldPath:t.field.canonicalString(),increment:n.A};throw L()}(0,e)}))),t.precondition.isNone||(n.currentDocument=function(e,t){return void 0!==t.updateTime?{updateTime:En(e,t.updateTime)}:void 0!==t.exists?{exists:t.exists}:L()}(e,t.precondition)),n}function Pn(e,t){var n=t.currentDocument?function(e){return void 0!==e.updateTime?Ne.updateTime(Tn(e.updateTime)):void 0!==e.exists?Ne.exists(e.exists):Ne.none()}(t.currentDocument):Ne.none(),r=t.updateTransforms?t.updateTransforms.map((function(t){return function(e,t){var n=null;if("setToServerValue"in t)O("REQUEST_TIME"===t.setToServerValue),n=new ve;else if("appendMissingElements"in t){var r=t.appendMissingElements.values||[];n=new me(r)}else if("removeAllFromArray"in t){var i=t.removeAllFromArray.values||[];n=new we(i)}else"increment"in t?n=new Ie(e,t.increment):L();var a=Y.fromServerFormat(t.fieldPath);return new _e(a,n)}(e,t)})):[];if(t.update){t.update.name;var i=Dn(e,t.update.name),a=new Tt({mapValue:{fields:t.update.fields}});if(t.updateMask){var o=function(e){var t=e.fieldPaths||[];return new $(t.map((function(e){return Y.fromServerFormat(e)})))}(t.updateMask);return new Pe(i,a,o,n,r)}return new Oe(i,a,n,r)}if(t.delete){var s=Dn(e,t.delete);return new Be(s,n)}if(t.verify){var c=Dn(e,t.verify);return new je(c,n)}return L()}function Fn(e,t){return{documents:[An(e,t.path)]}}function Mn(e,t){var n={structuredQuery:{}},r=t.path;null!==t.collectionGroup?(n.parent=An(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=An(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(e){if(0!==e.length){var t=e.map((function(e){return function(e){if("=="===e.op){if(bt(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NAN"}};if(wt(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(bt(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NOT_NA
704N"}};if(wt(e.value))return{unaryFilter:{field:Qn(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:Qn(e.field),op:Kn(e.op),value:e.value}}}(e)}));return 1===t.length?t[0]:{compositeFilter:{op:"AND",filters:t}}}}(t.filters);i&&(n.structuredQuery.where=i);var a=function(e){if(0!==e.length)return e.map((function(e){return function(e){return{field:Qn(e.field),direction:jn(e.dir)}}(e)}))}(t.orderBy);a&&(n.structuredQuery.orderBy=a);var o=function(e,t){return e.I||ot(t)?t:{value:t}}(e,t.limit);return null!==o&&(n.structuredQuery.limit=o),t.startAt&&(n.structuredQuery.startAt=Un(t.startAt)),t.endAt&&(n.structuredQuery.endAt=Un(t.endAt)),n}function Vn(e){var t=kn(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){O(1===r);var a=n.from[0];a.allDescendants?i=a.collectionId:t=t.child(a.collectionId)}var o=[];n.where&&(o=qn(n.where));var s=[];n.orderBy&&(s=n.orderBy.map((function(e){return function(e){return new jt(Gn(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))}(e)})));var c=null;n.limit&&(c=function(e){var t;return ot(t="object"==typeof e?e.value:e)?null:t}(n.limit));var l=null;n.startAt&&(l=Bn(n.startAt));var u=null;return n.endAt&&(u=Bn(n.endAt)),Wt(t,i,s,o,c,"F",l,u)}function qn(e){return e?void 0!==e.unaryFilter?[Wn(e)]:void 0!==e.fieldFilter?[zn(e)]:void 0!==e.compositeFilter?e.compositeFilter.filters.map((function(e){return qn(e)})).reduce((function(e,t){return e.concat(t)})):L():[]}function Un(e){return{before:e.before,values:e.position}}function Bn(e){var t=!!e.before,n=e.values||[];return new Ut(n,t)}function jn(e){return mn[e]}function Kn(e){return gn[e]}function Qn(e){return{fieldPath:e.canonicalString()}}function Gn(e){return Y.fromServerFormat(e.fieldPath)}function zn(e){return xt.create(Gn(e.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return L()}}(e.fieldFilter.op),e.fieldFilter.value)}function Wn(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Gn(e.unaryFilter.field);return xt.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Gn(e.unaryFilter.field);return xt.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Gn(e.unaryFilter.field);return xt.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Gn(e.unaryFilter.field);return xt.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return L()}}function Hn(e){var t=[];return e.fields.forEach((function(e){return t.push(e.canonicalString())})),{fieldPaths:t}}function Yn(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)} 705/** 706 * @license 707 * Copyright 2017 Google LLC 708 * 709 * Licensed under the Apache License, Version 2.0 (the "License"); 710 * you may not use this file except in compliance with the License. 711 * You may obtain a copy of the License at 712 * 713 * http://www.apache.org/licenses/LICENSE-2.0 714 * 715 * Unless required by applicable law or agreed to in writing, software 716 * distributed under the License is distributed on an "AS IS" BASIS, 717 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 718 * See the License for the specific language governing permissions and 719 * limitations under the License. 720 */function $n(e){for(var t="",n=0;n<e.length;n++)t.length>0&&(t=Jn(t)),t=Xn(e.get(n),t);return Jn(t)}function Xn(e,t){for(var n=t,r=e.length,i=0;i<r;i++){var a=e.charAt(i);switch(a){case"\0":n+="��";break;case"�":n+="��";break;default:n+=a}}return n}function Jn(e){return e+"��"}function Zn(e){var t=e.length;if(O(t>=2),2===t)return O("�"===e.charAt(0)&&"�"===e.charAt(1)),W.emptyPath();for(var n=t-2,r=[],i="",a=0;a<t;){var o=e.indexOf("�",a);switch((o<0||o>n)&&L(),e.charAt(o+1)){case"�":var s=e.substring(a,o),c=void 0;0===i.length?c=s:(c=i+=s,i=""),r.push(c);break;case"�":i+=e.substring(a,o),i+="\0";break;case"�":i+=e.substring(a,o+1);break;default:L()}a=o+2}return new W(r)} 721/** 722 * @license 723 * Copyright 2017 Google LLC 724 * 725 * Licensed under the Apache License, Version 2.0 (the "License");
726 * you may not use this file except in compliance with the License. 727 * You may obtain a copy of the License at 728 * 729 * http://www.apache.org/licenses/LICENSE-2.0 730 * 731 * Unless required by applicable law or agreed to in writing, software 732 * distributed under the License is distributed on an "AS IS" BASIS, 733 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 734 * See the License for the specific language governing permissions and 735 * limitations under the License. 736 */var tr=function(e,t){this.seconds=e,this.nanoseconds=t},er=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};er.store="owner",er.key="owner";var nr=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};nr.store="mutationQueues",nr.keyPath="userId";var rr=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};rr.store="mutations",rr.keyPath="batchId",rr.userMutationsIndex="userMutationsIndex",rr.userMutationsKeyPath=["userId","batchId"];var ir=function(){function e(){}return e.prefixForUser=function(e){return[e]},e.prefixForPath=function(e,t){return[e,$n(t)]},e.key=function(e,t,n){return[e,$n(t),n]},e}();ir.store="documentMutations",ir.PLACEHOLDER=new ir;var or=function(e,t){this.path=e,this.readTime=t},sr=function(e,t){this.path=e,this.version=t},ur=function(e,t,n,r,i,a){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=a};ur.store="remoteDocuments",ur.readTimeIndex="readTimeIndex",ur.readTimeIndexPath="readTime",ur.collectionReadTimeIndex="collectionReadTimeIndex",ur.collectionReadTimeIndexPath=["parentPath","readTime"];var ar=function(e){this.byteSize=e};ar.store="remoteDocumentGlobal",ar.key="remoteDocumentGlobalKey";var cr=function(e,t,n,r,i,a,o){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=a,this.query=o};cr.store="targets",cr.keyPath="targetId",cr.queryTargetsIndexName="queryTargetsIndex",cr.queryTargetsKeyPath=["canonicalId","targetId"];var hr=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};hr.store="targetDocuments",hr.keyPath=["targetId","path"],hr.documentTargetsIndex="documentTargetsIndex",hr.documentTargetsKeyPath=["path","targetId"];var fr=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};fr.key="targetGlobalKey",fr.store="targetGlobal";var lr=function(e,t){this.collectionId=e,this.parent=t};lr.store="collectionParents",lr.keyPath=["collectionId","parent"];var dr=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};dr.store="clientMetadata",dr.keyPath="clientId";var pr=function(e,t,n){this.bundleId=e,this.createTime=t,this.version=n};pr.store="bundles",pr.keyPath="bundleId";var yr=function(e,t,n){this.name=e,this.readTime=t,this.bundledQuery=n};yr.store="namedQueries",yr.keyPath="name";var vr=__spreadArray(__spreadArray([],__spreadArray(__spreadArray([],__spreadArray(__spreadArray([],__spreadArray(__spreadArray([],[nr.store,rr.store,ir.store,ur.store,cr.store,er.store,fr.store,hr.store]),[dr.store])),[ar.store])),[lr.store])),[pr.store,yr.store]),mr="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",gr=function(){function e(){this.onCommittedListeners=[]}return e.prototype.addOnCommittedListener=function(e){this.onCommittedListeners.push(e)},e.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEach((function(e){return e()}))},e}(),wr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},br=function(){function e(e){var t=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e((function(e){t.isDone=!0,t.result=e,t.nextCallback&&t.nextCallback(e)}),(function(e){t.isDone=!0,t.error=e,t.catchCallback&&t.catchCallback(e)}))}return e.prototype.catch=function(e){return this.next(void 0,e)},e.prototype.next=function(t,n){var r=this;return this.callbackAttached&&L(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e((function(e,i){r.nextCallback=function(n){r.wrapSuccess(t,n).next(e,i)},r.catchCallback=function(t){r.wrapFailure(n,t).next(e,i)}}))},e.prototype.toPromise=function(){var e=this;return new Promise((function(t,n){e.next(t,n)}))},e.prototype.wrapUserFunction=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(t){return e.reject(t)}},e.prototype.wrapSuccess=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.resolve(n)},e.prototype.wrapFailure=function(t,n){return t?this.wrapUserFunction((function(){return t(n)})):e.reject(n)},e.resolve=function(t){return new e((function(e,n){e(t)}))}
736,e.reject=function(t){return new e((function(e,n){n(t)}))},e.waitFor=function(t){return new e((function(e,n){var r=0,i=0,a=!1;t.forEach((function(t){++r,t.next((function(){++i,a&&i===r&&e()}),(function(e){return n(e)}))})),a=!0,i===r&&e()}))},e.or=function(t){for(var n=e.resolve(!1),r=function(t){n=n.next((function(n){return n?e.resolve(n):t()}))},i=0,a=t;i<a.length;i++)r(a[i]);return n},e.forEach=function(e,t){var n=this,r=[];return e.forEach((function(e,i){r.push(t.call(n,e,i))})),this.waitFor(r)},e}(),Ir=function(){function e(e,t){var n=this;this.action=e,this.transaction=t,this.aborted=!1,this.ft=new wr,this.transaction.oncomplete=function(){n.ft.resolve()},this.transaction.onabort=function(){t.error?n.ft.reject(new _r(e,t.error)):n.ft.resolve()},this.transaction.onerror=function(t){var r=kr(t.target.error);n.ft.reject(new _r(e,r))}}return e.open=function(t,n,r,i){try{return new e(n,t.transaction(i,r))}catch(t){throw new _r(n,t)}},Object.defineProperty(e.prototype,"dt",{get:function(){return this.ft.promise},enumerable:!1,configurable:!0}),e.prototype.abort=function(e){e&&this.ft.reject(e),this.aborted||(k("SimpleDb","Aborting transaction:",e?e.message:"Client-initiated abort"),this.aborted=!0,this.transaction.abort())},e.prototype.store=function(e){var t=this.transaction.objectStore(e);return new Nr(t)},e}(),Er=function(){function e(t,n,r){this.name=t,this.version=n,this.wt=r,12.2===e._t(getUA())&&C("Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.")}return e.delete=function(e){return k("SimpleDb","Removing database:",e),Dr(window.indexedDB.deleteDatabase(e)).toPromise()},e.yt=function(){if("undefined"==typeof indexedDB)return!1;if(e.gt())return!0;var t=getUA(),n=e._t(t),r=0<n&&n<10,i=e.Et(t),a=0<i&&i<4.5;return!(t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||a)},e.gt=function(){var e;return"undefined"!=typeof process&&"YES"===(null===(e=process.env)||void 0===e?void 0:e.Tt)},e.It=function(e,t){return e.store(t)},e._t=function(e){var t=e.match(/i(?:phone|pad|pod) os ([\d_]+)/i),n=t?t[1].split("_").slice(0,2).join("."):"-1";return Number(n)},e.Et=function(e){var t=e.match(/Android ([\d.]+)/i),n=t?t[1].split(".").slice(0,2).join("."):"-1";return Number(n)},e.prototype.At=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n=this;return __generator(this,(function(r){switch(r.label){case 0:return this.db?[3,2]:(k("SimpleDb","Opening database:",this.name),t=this,[4,new Promise((function(t,r){var i=indexedDB.open(n.name,n.version);i.onsuccess=function(e){var n=e.target.result;t(n)},i.onblocked=function(){r(new _r(e,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},i.onerror=function(t){var n=t.target.error;"VersionError"===n.name?r(new N(S.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):r(new _r(e,n))},i.onupgradeneeded=function(e){k("SimpleDb",'Database "'+n.name+'" requires upgrade from version:',e.oldVersion);var t=e.target.result;n.wt.Rt(t,i.transaction,e.oldVersion,n.version).next((function(){k("SimpleDb","Database upgrade to version "+n.version+" complete")}))}}))]);case 1:t.db=r.sent(),r.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(e){return n.bt(e)}),this.db)]}}))}))},e.prototype.vt=function(e){this.bt=e,this.db&&(this.db.onversionchange=function(t){return e(t)})},e.prototype.runTransaction=function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var i,a,o,s,c;return __generator(this,(function(l){switch(l.label){case 0:i="readonly"===t,a=0,o=function(){var t,o,c,l,u;return __generator(this,(function(d){switch(d.label){case 0:++a,d.label=1;case 1:return d.trys.push([1,4,,5]),[4,s.At(e)];case 2:return s.db=d.sent(),t=Ir.open(s.db,e,i?"readonly":"readwrite",n),o=r(t).catch((function(e){return t.abort(e),br.reject(e)})).toPromise(),c={},o.catch((function(){})),[4,t.dt];case 3:return[2,(c.value=(d.sent(),o),c)];case 4:return l=d.sent(),u="FirebaseError"!==l.name&&a<3,k("SimpleDb","Transaction failed with error:",l.message,"Retrying:",u),s.close(),u?[3,5]:[2,{value:Promise.reject(l)}];case 5:return[2]}}
736))},s=this,l.label=1;case 1:return[5,o()];case 2:if("object"==typeof(c=l.sent()))return[2,c.value];l.label=3;case 3:return[3,1];case 4:return[2]}}))}))},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),Tr=function(){function e(e){this.Pt=e,this.Vt=!1,this.St=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(e){this.Pt=e},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.Vt=!0},e.prototype.Ct=function(e){this.St=e},e.prototype.delete=function(){return Dr(this.Pt.delete())},e}(),_r=function(e){function t(t,n){var r=this;return(r=e.call(this,S.UNAVAILABLE,"IndexedDB transaction '"+t+"' failed: "+n)||this).name="IndexedDbTransactionError",r}return __extends$1(t,e),t}(N);function Sr(e){return"IndexedDbTransactionError"===e.name}var Nr=function(){function e(e){this.store=e}return e.prototype.put=function(e,t){var n;return void 0!==t?(k("SimpleDb","PUT",this.store.name,e,t),n=this.store.put(t,e)):(k("SimpleDb","PUT",this.store.name,"<auto-key>",e),n=this.store.put(e)),Dr(n)},e.prototype.add=function(e){return k("SimpleDb","ADD",this.store.name,e,e),Dr(this.store.add(e))},e.prototype.get=function(e){var t=this;return Dr(this.store.get(e)).next((function(n){return void 0===n&&(n=null),k("SimpleDb","GET",t.store.name,e,n),n}))},e.prototype.delete=function(e){return k("SimpleDb","DELETE",this.store.name,e),Dr(this.store.delete(e))},e.prototype.count=function(){return k("SimpleDb","COUNT",this.store.name),Dr(this.store.count())},e.prototype.Nt=function(e,t){var n=this.cursor(this.options(e,t)),r=[];return this.xt(n,(function(e,t){r.push(t)})).next((function(){return r}))},e.prototype.Ft=function(e,t){k("SimpleDb","DELETE ALL",this.store.name);var n=this.options(e,t);n.kt=!1;var r=this.cursor(n);return this.xt(r,(function(e,t,n){return n.delete()}))},e.prototype.$t=function(e,t){var n;t?n=e:(n={},t=e);var r=this.cursor(n);return this.xt(r,t)},e.prototype.Ot=function(e){var t=this.cursor({});return new br((function(n,r){t.onerror=function(e){var t=kr(e.target.error);r(t)},t.onsuccess=function(t){var r=t.target.result;r?e(r.primaryKey,r.value).next((function(e){e?r.continue():n()})):n()}}))},e.prototype.xt=function(e,t){var n=[];return new br((function(r,i){e.onerror=function(e){i(e.target.error)},e.onsuccess=function(e){var i=e.target.result;if(i){var a=new Tr(i),o=t(i.primaryKey,i.value,a);if(o instanceof br){var s=o.catch((function(e){return a.done(),br.reject(e)}));n.push(s)}a.isDone?r():null===a.Dt?i.continue():i.continue(a.Dt)}else r()}})).next((function(){return br.waitFor(n)}))},e.prototype.options=function(e,t){var n;return void 0!==e&&("string"==typeof e?n=e:t=e),{index:n,range:t}},e.prototype.cursor=function(e){var t="next";if(e.reverse&&(t="prev"),e.index){var n=this.store.index(e.index);return e.kt?n.openKeyCursor(e.range,t):n.openCursor(e.range,t)}return this.store.openCursor(e.range,t)},e}();function Dr(e){return new br((function(t,n){e.onsuccess=function(e){var n=e.target.result;t(n)},e.onerror=function(e){var t=kr(e.target.error);n(t)}}))}var Ar=!1;function kr(e){var t=Er._t(getUA());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new N("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return Ar||(Ar=!0,setTimeout((function(){throw r}),0)),r}}return e} 737/** 738 * @license 739 * Copyright 2020 Google LLC 740 * 741 * Licensed under the Apache License, Version 2.0 (the "License"); 742 * you may not use this file except in compliance with the License. 743 * You may obtain a copy of the License at 744 * 745 * http://www.apache.org/licenses/LICENSE-2.0 746 * 747 * Unless required by applicable law or agreed to in writing, softw
747are 748 * distributed under the License is distributed on an "AS IS" BASIS, 749 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 750 * See the License for the specific language governing permissions and 751 * limitations under the License. 752 */var Cr=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Mt=t,r.currentSequenceNumber=n,r}return __extends$1(t,e),t}(gr);function xr(e,t){var n=P$1(e);return Er.It(n.Mt,t)} 753/** 754 * @license 755 * Copyright 2017 Google LLC 756 * 757 * Licensed under the Apache License, Version 2.0 (the "License"); 758 * you may not use this file except in compliance with the License. 759 * You may obtain a copy of the License at 760 * 761 * http://www.apache.org/licenses/LICENSE-2.0 762 * 763 * Unless required by applicable law or agreed to in writing, software 764 * distributed under the License is distributed on an "AS IS" BASIS, 765 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 766 * See the License for the specific language governing permissions and 767 * limitations under the License. 768 */var Rr=function(){function e(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}return e.prototype.applyToRemoteDocument=function(e,t){for(var n=t.mutationResults,r=0;r<this.mutations.length;r++){var i=this.mutations[r];i.key.isEqual(e.key)&&ke(i,e,n[r])}},e.prototype.applyToLocalView=function(e){for(var t=0,n=this.baseMutations;t<n.length;t++)(a=n[t]).key.isEqual(e.key)&&Ce(a,e,this.localWriteTime);for(var r=0,i=this.mutations;r<i.length;r++){var a;(a=i[r]).key.isEqual(e.key)&&Ce(a,e,this.localWriteTime)}},e.prototype.applyToLocalDocumentSet=function(e){var t=this;this.mutations.forEach((function(n){var r=e.get(n.key),i=r;t.applyToLocalView(i),r.isValidDocument()||i.convertToNoDocument(j.min())}))},e.prototype.keys=function(){return this.mutations.reduce((function(e,t){return e.add(t.key)}),on())},e.prototype.isEqual=function(e){return this.batchId===e.batchId&&q(this.mutations,e.mutations,(function(e,t){return Re(e,t)}))&&q(this.baseMutations,e.baseMutations,(function(e,t){return Re(e,t)}))},e}(),Lr=function(){function e(e,t,n,r){this.batch=e,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}return e.from=function(t,n,r){O(t.mutations.length===r.length);for(var i=nn(),a=t.mutations,o=0;o<a.length;o++)i=i.insert(a[o].key,r[o].version);return new e(t,n,r,i)},e}(),Or=function(){function e(e,t,n,r,i,a,o){void 0===i&&(i=j.min()),void 0===a&&(a=j.min()),void 0===o&&(o=X.EMPTY_BYTE_STRING),this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=a,this.resumeToken=o}return e.prototype.withSequenceNumber=function(t){return new e(this.target,this.targetId,this.purpose,t,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken)},e.prototype.withResumeToken=function(t,n){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,t)},e.prototype.withLastLimboFreeSnapshotVersion=function(t){return new e(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,t,this.resumeToken)},e}(),Pr=function(e){this.Lt=e};function Fr(e,t){if(t.document)return Ln(e.Lt,t.document,!!t.hasCommittedMutations);if(t.noDocument){var n=at.fromSegments(t.noDocument.path),r=Br(t.noDocument.readTime),i=St.newNoDocument(n,r);return t.hasCommittedMutations?i.setHasCommittedMutations():i}if(t.unknownDocument){var a=at.fromSegments(t.unknownDocument.path);return r=Br(t.unknownDocument.version),St.newUnknownDocument(a,r)}return L()}function Mr(e,t,n){var r=Vr(n),i=t.key.path.popLast().toArray();if(t.isFoundDocument()){var a=function(e,t){return{name:Nn(e,t.key),fields:t.data.value.mapValue.fields,updateTime:bn(e,t.version.toTimestamp())}}(e.Lt,t),o=t.hasCommittedMutations;return new ur(null,null,a,o,r,i)}if(t.isNoDocument()){var s=t.key.path.toArray(),c=Ur(t.version);return o=t.hasCommittedMutations,new ur(null,new or(s,c),null,o,r,i)}if(t.isUnknownDocument()){var l=t.key.path.toArray(),u=Ur(t.version);
768return new ur(new sr(l,u),null,null,!0,r,i)}return L()}function Vr(e){var t=e.toTimestamp();return[t.seconds,t.nanoseconds]}function qr(e){var t=new B(e[0],e[1]);return j.fromTimestamp(t)}function Ur(e){var t=e.toTimestamp();return new tr(t.seconds,t.nanoseconds)}function Br(e){var t=new B(e.seconds,e.nanoseconds);return j.fromTimestamp(t)}function jr(e,t){for(var n=(t.baseMutations||[]).map((function(t){return Pn(e.Lt,t)})),r=0;r<t.mutations.length-1;++r){var i=t.mutations[r];if(r+1<t.mutations.length&&void 0!==t.mutations[r+1].transform){var a=t.mutations[r+1];i.updateTransforms=a.transform.fieldTransforms,t.mutations.splice(r+1,1),++r}}var o=t.mutations.map((function(t){return Pn(e.Lt,t)})),s=B.fromMillis(t.localWriteTimeMs);return new Rr(t.batchId,s,n,o)}function Kr(e){var t,n,r=Br(e.readTime),i=void 0!==e.lastLimboFreeSnapshotVersion?Br(e.lastLimboFreeSnapshotVersion):j.min();return void 0!==e.query.documents?(O(1===(n=e.query).documents.length),t=ee(Ht(kn(n.documents[0])))):t=function(e){return ee(Vn(e))}(e.query),new Or(t,e.targetId,0,e.lastListenSequenceNumber,r,i,X.fromBase64String(e.resumeToken))}function Qr(e,t){var n,r=Ur(t.snapshotVersion),i=Ur(t.lastLimboFreeSnapshotVersion);n=Ct(t.target)?Fn(e.Lt,t.target):Mn(e.Lt,t.target);var a=t.resumeToken.toBase64();return new cr(t.targetId,At(t.target),r,a,t.sequenceNumber,i,n)}function Gr(e){var t=Vn({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?ne(t,t.limit,"L"):t} 769/** 770 * @license 771 * Copyright 2020 Google LLC 772 * 773 * Licensed under the Apache License, Version 2.0 (the "License"); 774 * you may not use this file except in compliance with the License. 775 * You may obtain a copy of the License at 776 * 777 * http://www.apache.org/licenses/LICENSE-2.0 778 * 779 * Unless required by applicable law or agreed to in writing, software 780 * distributed under the License is distributed on an "AS IS" BASIS, 781 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 782 * See the License for the specific language governing permissions and 783 * limitations under the License. 784 */var zr=function(){function e(){}return e.prototype.getBundleMetadata=function(e,t){return Wr(e).get(t).next((function(e){if(e)return{id:(t=e).bundleId,createTime:Br(t.createTime),version:t.version};var t}))},e.prototype.saveBundleMetadata=function(e,t){return Wr(e).put({bundleId:(n=t).id,createTime:Ur(Tn(n.createTime)),version:n.version});var n},e.prototype.getNamedQuery=function(e,t){return Hr(e).get(t).next((function(e){if(e)return{name:(t=e).name,query:Gr(t.bundledQuery),readTime:Br(t.readTime)};var t}))},e.prototype.saveNamedQuery=function(e,t){return Hr(e).put(function(e){return{name:e.name,readTime:Ur(Tn(e.readTime)),bundledQuery:e.bundledQuery}}(t))},e}();function Wr(e){return xr(e,pr.store)}function Hr(e){return xr(e,yr.store)} 785/** 786 * @license 787 * Copyright 2019 Google LLC 788 * 789 * Licensed under the Apache License, Version 2.0 (the "License"); 790 * you may not use this file except in compliance with the License. 791 * You may obtain a copy of the License at 792 * 793 * http://www.apache.org/licenses/LICENSE-2.0 794 * 795 * Unless required by applicable law or agreed to in writing, software 796 * distributed under the License is distributed on an "AS IS" BASIS, 797 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 798 * See the License for the specific language governing permissions and 799 * limitations under the License. 800 */var Yr=function(){function e(){this.Bt=new $r}return e.prototype.addToCollectionParentIndex=function(e,t){return this.Bt.add(t),br.resolve()},e.prototype.getCollectionParents=function(e,t){return br.resolve(this.Bt.getEntries(t))},e}(),$r=function(){function e(){this.index={}}return e.prototype.add=function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new Ye(W.comparator),i=!r.has(n);return this.index[t]=r.add(n),i},e.prototype.has=function(e){var t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)},e.prototype.getEntries=function(e){return(this.index[e]||new Ye(W.comparator)).toArray()},e}(),Xr=function(){function e(){this.qt=new $r}return e.prototype.addToCollectionParentIndex=function(e,t){var n=this;if(!this.qt.has(t)){var r=t.lastSegment(),i=t.popLast();e.addOnCommittedListener((function(){n.qt.add(t)}));var a={collectionId:r,parent:$n(i)};return Jr(e).put(a)}return br.resolve()},e.prototype.getCollectionParents=function(e,t){var n=[],r=IDBKeyRange.bound([t,""],[U(t),""],!1,!0);return Jr(e).Nt(r).next((function(e){for(var r=0,i=e;r<i.length;r++){var a=i[r];if(a.collectionId!==t)break;n.push(Zn(a.parent))}return n}))},e}();function Jr(e){return xr(e,lr.store)} 801/** 802 * @license 803 * Copyright 2018 Google LLC 804 * 805 * Licensed under the Apache License, Version 2.0 (the "License");
806 * you may not use this file except in compliance with the License. 807 * You may obtain a copy of the License at 808 * 809 * http://www.apache.org/licenses/LICENSE-2.0 810 * 811 * Unless required by applicable law or agreed to in writing, software 812 * distributed under the License is distributed on an "AS IS" BASIS, 813 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 814 * See the License for the specific language governing permissions and 815 * limitations under the License. 816 */var Zr={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},ti=function(){function e(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}return e.withCacheSize=function(t){return new e(t,e.DEFAULT_COLLECTION_PERCENTILE,e.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)},e}(); 817/** 818 * @license 819 * Copyright 2020 Google LLC 820 * 821 * Licensed under the Apache License, Version 2.0 (the "License"); 822 * you may not use this file except in compliance with the License. 823 * You may obtain a copy of the License at 824 * 825 * http://www.apache.org/licenses/LICENSE-2.0 826 * 827 * Unless required by applicable law or agreed to in writing, software 828 * distributed under the License is distributed on an "AS IS" BASIS, 829 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 830 * See the License for the specific language governing permissions and 831 * limitations under the License. 832 */function ei(e,t,n){var r=e.store(rr.store),i=e.store(ir.store),a=[],o=IDBKeyRange.only(n.batchId),s=0,c=r.$t({range:o},(function(e,t,n){return s++,n.delete()}));a.push(c.next((function(){O(1===s)})));for(var l=[],u=0,d=n.mutations;u<d.length;u++){var p=d[u],h=ir.key(t,p.key.path,n.batchId);a.push(i.delete(h)),l.push(p.key)}return br.waitFor(a).next((function(){return l}))}function ni(e){if(!e)return 0;var t;if(e.document)t=e.document;else if(e.unknownDocument)t=e.unknownDocument;else{if(!e.noDocument)throw L();t=e.noDocument}return JSON.stringify(t).length} 833/** 834 * @license 835 * Copyright 2017 Google LLC 836 * 837 * Licensed under the Apache License, Version 2.0 (the "License"); 838 * you may not use this file except in compliance with the License. 839 * You may obtain a copy of the License at 840 * 841 * http://www.apache.org/licenses/LICENSE-2.0 842 * 843 * Unless required by applicable law or agreed to in writing, software 844 * distributed under the License is distributed on an "AS IS" BASIS, 845 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 846 * See the License for the specific language governing permissions and 847 * limitations under the License. 848 */ti.DEFAULT_COLLECTION_PERCENTILE=10,ti.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ti.DEFAULT=new ti(41943040,ti.DEFAULT_COLLECTION_PERCENTILE,ti.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ti.DISABLED=new ti(-1,0,0);var ri=function(){function e(e,t,n,r){this.userId=e,this.R=t,this.Ut=n,this.referenceDelegate=r,this.Kt={}}return e.Qt=function(t,n,r,i){return O(""!==t.uid),new e(t.isAuthenticated()?t.uid:"",n,r,i)},e.prototype.checkEmpty=function(e){var t=!0,n=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return oi(e).$t({index:rr.userMutationsIndex,range:n},(function(e,n,r){t=!1,r.done()})).next((function(){return t}))},e.prototype.addMutationBatch=function(e,t,n,r){var i=this,a=si(e),o=oi(e);return o.add({}).next((function(s){O("number"==typeof s);for(var c=new Rr(s,t,n,r),l=function(e,t,n){var r=n.baseMutations.map((function(t){return On(e.Lt,t)})),i=n.mutations.map((function(t){return On(e.Lt,t)}));return new rr(t,n.batchId,n.localWriteTime.toMillis(),r,i)}(i.R,i.userId,c),u=[],d=new Ye((function(e,t){return V(e.canonicalString(),t.canonicalString())})),p=0,h=r;p<h.length;p++){var f=h[p],m=ir.key(i.userId,f.key.path,s);d=d.add(f.key.path.popLast()),u.push(o.put(l)),u.push(a.put(m,ir.PLACEHOLDER))}return d.forEach((function(t){u.push(i.Ut.addToCollectionParentIndex(e,t))})),e.addOnCommittedListener((function(){i.Kt[s]=c.keys()})),br.waitFor(u).next((function(){return c}))}))},e.prototype.lookupMutationBatch=function(e,t){var n=this;return oi(e).get(t).next((function(e){return e?(O(e.userId===n.userId),jr(n.R,e)):null}))},e.prototype.jt=function(e,t){var n=this;return this.Kt[t]?br.resolve(this.Kt[t]):this.lookupMutationBatch(e,t).next((function(e){if(e){var r=e.keys();return n.Kt[t]=r,r}return null}))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=this,r=t+1,i=IDBKeyRange.lowerBound([this.userId,r]),a=null;return oi(e).$t({index:rr.userMutationsIndex,range:i},(function(e,t,i){t.userId===n.userId&&(O(t.batchId>=r),a=jr(n.R,t)),i.done()})).next((function(){return a}))},e.prototype.getHighestUnacknowledgedBatchId=function(e){var t=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),n=-1;return oi(e).$t({index:rr.userMutationsIndex,range:t,reverse:!0},(function(e,t,r){n=t.batchId,r.done()})).next((function(){return n}))},e.prototype.getAllMutationBatches=function(e){var t=this,n=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return oi(e).Nt(rr.userMutationsIndex,n).next((function(e){return e.map((function(e){return jr(t.R,e)}))}))},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=ir.prefixForPath(this.userId,t.path),i=IDBKeyRange.lowerBound(r),a=[];return si(e).$t({range:i},(function(r,i,o){var s=r[0],c=r[1],l=r[2],u=Zn(c);if(s===n.userId&&t.path.isEqual(u))return oi(e).get(l).next((function(e){if(!e)throw L();O(e.userId===n.userId),a.push(jr(n.R,e))}));o.done()})).next((function(){return a}))},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Ye(V),i=[];return t.forEach((function(t){var a=ir.prefixForPath(n.userId,t.path),o=I
848DBKeyRange.lowerBound(a),s=si(e).$t({range:o},(function(e,i,a){var o=e[0],s=e[1],c=e[2],l=Zn(s);o===n.userId&&t.path.isEqual(l)?r=r.add(c):a.done()}));i.push(s)})),br.waitFor(i).next((function(){return n.Wt(e,r)}))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=this,r=t.path,i=r.length+1,a=ir.prefixForPath(this.userId,r),o=IDBKeyRange.lowerBound(a),s=new Ye(V);return si(e).$t({range:o},(function(e,t,a){var o=e[0],c=e[1],l=e[2],u=Zn(c);o===n.userId&&r.isPrefixOf(u)?u.length===i&&(s=s.add(l)):a.done()})).next((function(){return n.Wt(e,s)}))},e.prototype.Wt=function(e,t){var n=this,r=[],i=[];return t.forEach((function(t){i.push(oi(e).get(t).next((function(e){if(null===e)throw L();O(e.userId===n.userId),r.push(jr(n.R,e))})))})),br.waitFor(i).next((function(){return r}))},e.prototype.removeMutationBatch=function(e,t){var n=this;return ei(e.Mt,this.userId,t).next((function(r){return e.addOnCommittedListener((function(){n.Gt(t.batchId)})),br.forEach(r,(function(t){return n.referenceDelegate.markPotentiallyOrphaned(e,t)}))}))},e.prototype.Gt=function(e){delete this.Kt[e]},e.prototype.performConsistencyCheck=function(e){var t=this;return this.checkEmpty(e).next((function(n){if(!n)return br.resolve();
848var r=IDBKeyRange.lowerBound(ir.prefixForUser(t.userId)),i=[];return si(e).$t({range:r},(function(e,n,r){if(e[0]===t.userId){var a=Zn(e[1]);i.push(a)}else r.done()})).next((function(){O(0===i.length)}))}))},e.prototype.containsKey=function(e,t){return ii(e,this.userId,t)},e.prototype.zt=function(e){var t=this;return ui(e).get(this.userId).next((function(e){return e||new nr(t.userId,-1,"")}))},e}();function ii(e,t,n){var r=ir.prefixForPath(t,n.path),i=r[1],a=IDBKeyRange.lowerBound(r),o=!1;return si(e).$t({range:a,kt:!0},(function(e,n,r){var a=e[0],s=e[1];e[2],a===t&&s===i&&(o=!0),r.done()})).next((function(){return o}))}function oi(e){return xr(e,rr.store)}function si(e){return xr(e,ir.store)}function ui(e){return xr(e,nr.store)} 849/** 850 * @license 851 * Copyright 2017 Google LLC 852 * 853 * Licensed under the Apache License, Version 2.0 (the "License"); 854 * you may not use this file except in compliance with the License. 855 * You may obtain a copy of the License at 856 * 857 * http://www.apache.org/licenses/LICENSE-2.0 858 * 859 * Unless required by applicable law or agreed to in writing, software 860 * distributed under the License is distributed on an "AS IS" BASIS, 861 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 862 * See the License for the specific language governing permissions and 863 * limitations under the License. 864 */var ai=function(){function e(e){this.Ht=e}return e.prototype.next=function(){return this.Ht+=2,this.Ht},e.Jt=function(){return new e(0)},e.Yt=function(){return new e(-1)},e}(),ci=function(){function e(e,t){this.referenceDelegate=e,this.R=t}return e.prototype.allocateTargetId=function(e){var t=this;return this.Xt(e).next((function(n){var r=new ai(n.highestTargetId);return n.highestTargetId=r.next(),t.Zt(e,n).next((function(){return n.highestTargetId}))}))},e.prototype.getLastRemoteSnapshotVersion=function(e){return this.Xt(e).next((function(e){return j.fromTimestamp(new B(e.lastRemoteSnapshotVersion.seconds,e.lastRemoteSnapshotVersion.nanoseconds))}))},e.prototype.getHighestSequenceNumber=function(e){return this.Xt(e).next((function(e){return e.highestListenSequenceNumber}))},e.prototype.setTargetsMetadata=function(e,t,n){var r=this;return this.Xt(e).next((function(i){return i.highestListenSequenceNumber=t,n&&(i.lastRemoteSnapshotVersion=n.toTimestamp()),t>i.highestListenSequenceNumber&&(i.highestListenSequenceNumber=t),r.Zt(e,i)}))},e.prototype.addTargetData=function(e,t){var n=this;return this.te(e,t).next((function(){return n.Xt(e).next((function(r){return r.targetCount+=1,n.ee(t,r),n.Zt(e,r)}))}))},e.prototype.updateTargetData=function(e,t){return this.te(e,t)},e.prototype.removeTargetData=function(e,t){var n=this;return this.removeMatchingKeysForTargetId(e,t.targetId).next((function(){return hi(e).delete(t.targetId)})).next((function(){return n.Xt(e)})).next((function(t){return O(t.targetCount>0),t.targetCount-=1,n.Zt(e,t)}))},e.prototype.removeTargets=function(e,t,n){var r=this,i=0,a=[];return hi(e).$t((function(o,s){var c=Kr(s);c.sequenceNumber<=t&&null===n.get(c.targetId)&&(i++,a.push(r.removeTargetData(e,c)))})).next((function(){return br.waitFor(a)})).next((function(){return i}))},e.prototype.forEachTarget=function(e,t){return hi(e).$t((function(e,n){var r=Kr(n);t(r)}))},e.prototype.Xt=function(e){return fi(e).get(fr.key).next((function(e){return O(null!==e),e}))},e.prototype.Zt=function(e,t){return fi(e).put(fr.key,t)},e.prototype.te=function(e,t){return hi(e).put(Qr(this.R,t))},e.prototype.ee=function(e,t){var n=!1;return e.targetId>t.highestTargetId&&(t.highestTargetId=e.targetId,n=!0),e.sequenceNumber>t.highestListenSequenceNumber&&(t.highestListenSequenceNumber=e.sequenceNumber,n=!0),n},e.prototype.getTargetCount=function(e){return this.Xt(e).next((function(e){return e.targetCount}))},e.prototype.getTargetData=function(e,t){var n=At(t),r=IDBKeyRange.bound([n,Number.NEGATIVE_INFINITY],[n,Number.POSITIVE_INFINITY]),i=null;return hi(e).$t({range:r,index:cr.queryTargetsIndexName},(function(e,n,r){var a=Kr(n);kt(t,a.target)&&(i=a,r.done())})).next((function(){return i}))},e.prototype.addMatchingKeys=function(e,t,n){var r=this,i=[],a=li(e);return t.forEach((function(t){var o=$n(t.path);i.push(a.put(new hr(n,o))),i.push(r.referenceDelegate.addReference(e,n,t))})),br.waitFor(i)},e.prototype.removeMatchingKeys=function(e,t,n){var r=this,i=li(e);return br.forEach(t,(function(t){var a=$n(t.path);return br.waitFor([i.delete([n,a]),r.referenceDelegate.removeReference(e,n,t)])}))},e.prototype.removeMatchingKeysForTargetId=function(e,t){var n=li(e),r=IDBKeyRange.bound([t],[t+1],!1,!0);return n.delete(r)},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=IDBKeyRange.bound([t],[t+1],!1,!0),r=li(e),i=on();return r.$t({range:n,kt:!0},(function(e,t,n){var r=Zn(e[1]),a=new at(r);i=i.add(a)})).next((function(){return i}))},e.prototype.containsKey=function(e,t){var n=$n(t.path),r=IDBKeyRange.bound([n],[U(n)],!1,!0),i=0;return li(e).$t({index:hr.documentTargetsIndex,kt:!0,range:r},(function(e,t,n){var r=e[0];e[1],0!==r&&(i++,n.done())})).next((function(){return i>0}))},e.prototype.lt=function(e,t){return hi(e).get(t).next((function(e){return e?Kr(e):null}))},e}(); 865/** 866 * @license 867 * Copyright 2017 Google LLC 868 * 869 * Licensed under the Apache License, Version 2.0 (the "License");
870 * you may not use this file except in compliance with the License. 871 * You may obtain a copy of the License at 872 * 873 * http://www.apache.org/licenses/LICENSE-2.0 874 * 875 * Unless required by applicable law or agreed to in writing, software 876 * distributed under the License is distributed on an "AS IS" BASIS, 877 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 878 * See the License for the specific language governing permissions and 879 * limitations under the License. 880 */function hi(e){return xr(e,cr.store)}function fi(e){return xr(e,fr.store)}function li(e){return xr(e,hr.store)} 881/** 882 * @license 883 * Copyright 2017 Google LLC 884 * 885 * Licensed under the Apache License, Version 2.0 (the "License"); 886 * you may not use this file except in compliance with the License. 887 * You may obtain a copy of the License at 888 * 889 * http://www.apache.org/licenses/LICENSE-2.0 890 * 891 * Unless required by applicable law or agreed to in writing, software 892 * distributed under the License is distributed on an "AS IS" BASIS, 893 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 894 * See the License for the specific language governing permissions and 895 * limitations under the License. 896 */function di(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(e.code!==S.FAILED_PRECONDITION||e.message!==mr)throw e;return k("LocalStore","Unexpectedly lost primary lease"),[2]}))}))} 897/** 898 * @license 899 * Copyright 2020 Google LLC 900 * 901 * Licensed under the Apache License, Version 2.0 (the "License"); 902 * you may not use this file except in compliance with the License. 903 * You may obtain a copy of the License at 904 * 905 * http://www.apache.org/licenses/LICENSE-2.0 906 * 907 * Unless required by applicable law or agreed to in writing, software 908 * distributed under the License is distributed on an "AS IS" BASIS, 909 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 910 * See the License for the specific language governing permissions and 911 * limitations under the License. 912 */function pi(e,t){var n=e[0],r=e[1],i=t[0],a=t[1],o=V(n,i);return 0===o?V(r,a):o}var yi=function(){function e(e){this.ne=e,this.buffer=new Ye(pi),this.se=0}return e.prototype.ie=function(){return++this.se},e.prototype.re=function(e){var t=[e,this.ie()];if(this.buffer.size<this.ne)this.buffer=this.buffer.add(t);else{var n=this.buffer.last();pi(t,n)<0&&(this.buffer=this.buffer.delete(n).add(t))}},Object.defineProperty(e.prototype,"maxValue",{get:function(){return this.buffer.last()[0]},enumerable:!1,configurable:!0}),e}(),vi=function(){function e(e,t){this.garbageCollector=e,this.asyncQueue=t,this.oe=!1,this.ce=null}return e.prototype.start=function(e){-1!==this.garbageCollector.params.cacheSizeCollectionThreshold&&this.ue(e)},e.prototype.stop=function(){this.ce&&(this.ce.cancel(),this.ce=null)},Object.defineProperty(e.prototype,"started",{get:function(){return null!==this.ce},enumerable:!1,configurable:!0}),e.prototype.ue=function(e){var t=this,n=this.oe?3e5:6e4;k("LruGarbageCollector","Garbage collection scheduled in "+n+"ms"),this.ce=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",n,(function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:this.ce=null,this.oe=!0,n.label=1;case 1:return n.trys.push([1,3,,7]),[4,e.collectGarbage(this.garbageCollector)];case 2:return n.sent(),[3,7];case 3:return Sr(t=n.sent())?(k("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",t),[3,6]):[3,4];case 4:return[4,di(t)];case 5:n.sent(),n.label=6;case 6:return[3,7];case 7:return[4,this.ue(e)];case 8:return n.sent(),[2]}}))}))}))},e}(),mi=function(){function e(e,t){this.ae=e,this.params=t}return e.prototype.calculateTargetCount=function(e,t){return this.ae.he(e).next((function(e){return Math.floor(t/100*e)}))},e.prototype.nthSequenceNumber=function(e,t){var n=this;if(0===t)return br.resolve(_.o);var r=new yi(t);return this.ae.forEachTarget(e,(function(e){return r.re(e.sequenceNumber)})).next((function(){return n.ae.le(e,(function(e){return r.re(e)}))})).next((function(){return r.maxValue}))},e.prototype.removeTargets=function(e,t,n){return this.ae.removeTargets(e,t,n)},e.prototype.removeOrphanedDocuments=function(e,t){return this.ae.removeOrphanedDocuments(e,t)},e.prototype.collect=function(e,t){var n=this;return-1===this.params.cacheSizeCollectionThreshold?(k("LruGarbageCollector","Garbage collection skipped; disabled"),br.resolve(Zr)):this.getCacheSize(e).next((function(r){return r<n.params.cacheSizeCollectionThreshold?(k("LruGarbageCollector","Garbage collection skipped; Cache size "+r+" is lower than threshold "+n.params.cacheSizeCollectionThreshold),Zr):n.fe(e,t)}))},e.prototype.getCacheSize=function(e){return this.ae.getCacheSize(e)},e.prototype.fe=function(e,t){var n,r,i,a,o,s,c,l=this,u=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next((function(t){return t>l.params.maximumSequenceNumbersToCollect?(k("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+l.params.maximumSequenceNumbersToCollect+" from "+t),r=l.params.maximumSequenceNumbersToCollect):r=t,a=Date.now(),l.nthSequenceNumber(e,r)})).next((function(r){return n=r,o=Date.now(),l.removeTargets(e,n,t)})).next((function(t){return i=t,s=Date.now(),l.removeOrphanedDocuments(e,n)})).next((function(e){return c=Date.now(),A()<=LogLevel.DEBUG&&k("LruGarbageCollector","LRU Garbage Collection\n\tCounted targets in "+(a-u)+"ms\n\tDetermined least recently used "+r+" in "+(o-a)+"ms\n\tRemoved "+i+" targets in "+(s-o)+"ms\n\tRemoved "+e+" documents in "+(c-s)+"ms\nTotal Duration: "+(c-u)+"ms"),br.resolve({didRun:!0,sequenceNumbersCollected:r,targetsRemoved:i,documentsRemoved:e})}))},e}(),gi=function(){function e(e,t){this.db=e,this.garbageCollector=function(e,t){return new mi(e,t)}(this,t)}return e.prototype.he=function(e){var t=this.de(e);return this.db.getTargetCache().getTargetCount(e).next((function(e){return t.next((function(t){return e+t}))}))},e.prototype.de=function(e){var t=0;return this.le(e,(function(e){t++})).next((function(){return t}))},e.prototype.forEachTarget=function(e,t){return this.db.getTargetCache().forEac
912hTarget(e,t)},e.prototype.le=function(e,t){return this.we(e,(function(e,n){return t(n)}))},e.prototype.addReference=function(e,t,n){return wi(e,n)},e.prototype.removeReference=function(e,t,n){return wi(e,n)},e.prototype.removeTargets=function(e,t,n){return this.db.getTargetCache().removeTargets(e,t,n)},e.prototype.markPotentiallyOrphaned=function(e,t){return wi(e,t)},e.prototype._e=function(e,t){return function(e,t){var n=!1;return ui(e).Ot((function(r){return ii(e,r,t).next((function(e){return e&&(n=!0),br.resolve(!e)}))})).next((function(){return n}))}(e,t)},e.prototype.removeOrphanedDocuments=function(e,t){var n=this,r=this.db.getRemoteDocumentCache().newChangeBuffer(),i=[],a=0;return this.we(e,(function(o,s){if(s<=t){var c=n._e(e,o).next((function(t){if(!t)return a++,r.getEntry(e,o).next((function(){return r.removeEntry(o),li(e).delete([0,$n(o.path)])}))}));i.push(c)}})).next((function(){return br.waitFor(i)})).next((function(){return r.apply(e)})).next((function(){return a}))},e.prototype.removeTarget=function(e,t){var n=t.withSequenceNumber(e.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(e,n)},e.prototype.updateLimboDocument=function(e,t){return wi(e,t)},e.prototype.we=function(e,t){var n,r=li(e),i=_.o;return r.$t({index:hr.documentTargetsIndex},(function(e,r){var a=e[0];e[1];var o=r.path,s=r.sequenceNumber;0===a?(i!==_.o&&t(new at(Zn(n)),i),i=s,n=o):i=_.o})).next((function(){i!==_.o&&t(new at(Zn(n)),i)}))},e.prototype.getCacheSize=function(e){return this.db.getRemoteDocumentCache().getSize(e)},e}();function wi(e,t){return li(e).put(function(e,t){return new hr(0,$n(e.path),t)}(t,e.currentSequenceNumber))} 913/** 914 * @license 915 * Copyright 2017 Google LLC 916 * 917 * Licensed under the Apache License, Version 2.0 (the "License"); 918 * you may not use this file except in compliance with the License. 919 * You may obtain a copy of the License at 920 * 921 * http://www.apache.org/licenses/LICENSE-2.0 922 * 923 * Unless required by applicable law or agreed to in writing, software 924 * distributed under the License is distributed on an "AS IS" BASIS, 925 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 926 * See the License for the specific language governing permissions and 927 * limitations under the License. 928 */var bi=function(){function e(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={}}return e.prototype.get=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n)for(var r=0,i=n;r<i.length;r++){var a=i[r],o=a[0],s=a[1];if(this.equalsFn(o,e))return s}},e.prototype.has=function(e){return void 0!==this.get(e)},e.prototype.set=function(e,t){var n=this.mapKeyFn(e),r=this.inner[n];if(void 0!==r){for(var i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return void(r[i]=[e,t]);r.push([e,t])}else this.inner[n]=[[e,t]]},e.prototype.delete=function(e){var t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(var r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),!0;return!1},e.prototype.forEach=function(e){Q(this.inner,(function(t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r],o=a[0],s=a[1];e(o,s)}}))},e.prototype.isEmpty=function(){return G(this.inner)},e}(),Ii=function(){function e(){this.changes=new bi((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),this.changesApplied=!1}return e.prototype.getReadTime=function(e){var t=this.changes.get(e);return t?t.readTime:j.min()},e.prototype.addEntry=function(e,t){this.assertNotApplied(),this.changes.set(e.key,{document:e,readTime:t})},e.prototype.removeEntry=function(e,t){void 0===t&&(t=null),this.assertNotApplied(),this.changes.set(e,{document:St.newInvalidDocument(e),readTime:t})},e.prototype.getEntry=function(e,t){this.assertNotApplied();var n=this.changes.get(t);return void 0!==n?br.resolve(n.document):this.getFromCache(e,t)},e.prototype.getEntries=function(e,t){return this.getAllFromCache(e,t)},e.prototype.apply=function(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)},e.prototype.assertNotApplied=function(){},e}(),Ei=function(){function e(e,t){this.R=e,this.Ut=t}return e.prototype.addEntry=function(e,t,n){return Si(e).put(Ni(t),n)},e.prototype.removeEntry=function(e,t){var n=Si(e),r=Ni(t);return n.delete(r)},e.prototype.updateMetadata=function(e,t){var n=this;return this.getMetadata(e).next((function(r){return r.byteSize+=t,n.me(e,r)}))},e.prototype.getEntry=function(e,t){var n=this;return Si(e).get(Ni(t)).next((function(e){return n.ye(t,e)}))},e.prototype.ge=function(e,t){var n=this;return Si(e).get(Ni(t)).next((function(e){return{document:n.ye(t,e),size:ni(e)}}))},e.prototype.getEntries=function(e,t){var n=this,r=Je();return this.pe(e,t,(function(e,t){var i=n.ye(e,t);r=r.insert(e,i)})).next((function(){return r}))},e.prototype.Ee=function(e,t){var n=this,r=Je(),i=new ze(at.comparator);return this.pe(e,t,(function(e,t){var a=n.ye(e,t);r=r.insert(e,a),i=i.insert(e,ni(t))})).next((function(){return{documents:r,Te:i}}
928))},e.prototype.pe=function(e,t,n){if(t.isEmpty())return br.resolve();var r=IDBKeyRange.bound(t.first().path.toArray(),t.last().path.toArray()),i=t.getIterator(),a=i.getNext();return Si(e).$t({range:r},(function(e,t,r){for(var o=at.fromSegments(e);a&&at.comparator(a,o)<0;)n(a,null),a=i.getNext();a&&a.isEqual(o)&&(n(a,t),a=i.hasNext()?i.getNext():null),a?r.Ct(a.path.toArray()):r.done()})).next((function(){for(;a;)n(a,null),a=i.hasNext()?i.getNext():null}))},e.prototype.getDocumentsMatchingQuery=function(e,t,n){var r=this,i=Je(),a=t.path.length+1,o={};if(n.isEqual(j.min())){var s=t.path.toArray();o.range=IDBKeyRange.lowerBound(s)}else{var c=t.path.toArray(),l=Vr(n);o.range=IDBKeyRange.lowerBound([c,l],!0),o.index=ur.collectionReadTimeIndex}return Si(e).$t(o,(function(e,n,o){if(e.length===a){var s=Fr(r.R,n);t.path.isPrefixOf(s.key.path)?se(t,s)&&(i=i.insert(s.key,s)):o.done()}})).next((function(){return i}))},e.prototype.newChangeBuffer=function(e){return new Ti(this,!!e&&e.trackRemovals)},e.prototype.getSize=function(e){return this.getMetadata(e).next((function(e){return e.byteSize}))},e.prototype.getMetadata=function(e){return _i(e).get(ar.key).next((function(e){return O(!!e),e}))},e.prototype.me=function(e,t){return _i(e).put(ar.key,t)},e.prototype.ye=function(e,t){if(t){var n=Fr(this.R,t);if(!n.isNoDocument()||!n.version.isEqual(j.min()))return n}return St.newInvalidDocument(e)},e}(),Ti=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Ie=t,r.trackRemovals=n,r.Ae=new bi((function(e){return e.toString()}),(function(e,t){return e.isEqual(t)})),r}return __extends$1(t,e),t.prototype.applyChanges=function(e){var t=this,n=[],r=0,i=new Ye((function(e,t){return V(e.canonicalString(),t.canonicalString())}));
928return this.changes.forEach((function(a,o){var s=t.Ae.get(a);if(o.document.isValidDocument()){var c=Mr(t.Ie.R,o.document,t.getReadTime(a));i=i.add(a.path.popLast());var l=ni(c);r+=l-s,n.push(t.Ie.addEntry(e,a,c))}else if(r-=s,t.trackRemovals){var u=Mr(t.Ie.R,St.newNoDocument(a,j.min()),t.getReadTime(a));n.push(t.Ie.addEntry(e,a,u))}else n.push(t.Ie.removeEntry(e,a))})),i.forEach((function(r){n.push(t.Ie.Ut.addToCollectionParentIndex(e,r))})),n.push(this.Ie.updateMetadata(e,r)),br.waitFor(n)},t.prototype.getFromCache=function(e,t){var n=this;return this.Ie.ge(e,t).next((function(e){return n.Ae.set(t,e.size),e.document}))},t.prototype.getAllFromCache=function(e,t){var n=this;return this.Ie.Ee(e,t).next((function(e){var t=e.documents;return e.Te.forEach((function(e,t){n.Ae.set(e,t)})),t}))},t}(Ii); 929/** 930 * @license 931 * Copyright 2017 Google LLC 932 * 933 * Licensed under the Apache License, Version 2.0 (the "License"); 934 * you may not use this file except in compliance with the License. 935 * You may obtain a copy of the License at 936 * 937 * http://www.apache.org/licenses/LICENSE-2.0 938 * 939 * Unless required by applicable law or agreed to in writing, software 940 * distributed under the License is distributed on an "AS IS" BASIS, 941 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 942 * See the License for the specific language governing permissions and 943 * limitations under the License. 944 */function _i(e){return xr(e,ar.store)}function Si(e){return xr(e,ur.store)}function Ni(e){return e.path.toArray()} 945/** 946 * @license 947 * Copyright 2020 Google LLC 948 * 949 * Licensed under the Apache License, Version 2.0 (the "License"); 950 * you may not use this file except in compliance with the License. 951 * You may obtain a copy of the License at 952 * 953 * http://www.apache.org/licenses/LICENSE-2.0 954 * 955 * Unless required by applicable law or agreed to in writing, software 956 * distributed under the License is distributed on an "AS IS" BASIS, 957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 958 * See the License for the specific language governing permissions and 959 * limitations under the License. 960 */var Di=function(){function e(e){this.R=e}return e.prototype.Rt=function(e,t,n,r){var i=this;O(n<r&&n>=0&&r<=11);var a=new Ir("createOrUpgrade",t);n<1&&r>=1&&(function(e){e.createObjectStore(er.store)}(e),function(e){e.createObjectStore(nr.store,{keyPath:nr.keyPath}),e.createObjectStore(rr.store,{keyPath:rr.keyPath,autoIncrement:!0}).createIndex(rr.userMutationsIndex,rr.userMutationsKeyPath,{unique:!0}),e.createObjectStore(ir.store)}(e),Ai(e),function(e){e.createObjectStore(ur.store)}(e));var o=br.resolve();return n<3&&r>=3&&(0!==n&&(function(e){e.deleteObjectStore(hr.store),e.deleteObjectStore(cr.store),e.deleteObjectStore(fr.store)}(e),Ai(e)),o=o.next((function(){return function(e){var t=e.store(fr.store),n=new fr(0,0,j.min().toTimestamp(),0);return t.put(fr.key,n)}(a)}))),n<4&&r>=4&&(0!==n&&(o=o.next((function(){return function(e,t){return t.store(rr.store).Nt().next((function(n){e.deleteObjectStore(rr.store),e.createObjectStore(rr.store,{keyPath:rr.keyPath,autoIncrement:!0}).createIndex(rr.userMutationsIndex,rr.userMutationsKeyPath,{unique:!0});var r=t.store(rr.store),i=n.map((function(e){return r.put(e)}));return br.waitFor(i)}))}(e,a)}))),o=o.next((function(){!function(e){e.createObjectStore(dr.store,{keyPath:dr.keyPath})}(e)}))),n<5&&r>=5&&(o=o.next((function(){return i.Re(a)}))),n<6&&r>=6&&(o=o.next((function(){return function(e){e.createObjectStore(ar.store)}(e),i.be(a)}))),n<7&&r>=7&&(o=o.next((function(){return i.ve(a)}))),n<8&&r>=8&&(o=o.next((function(){return i.Pe(e,a)}))),n<9&&r>=9&&(o=o.next((function(){!function(e){e.objectStoreNames.contains("remoteDocumentChanges")&&e.deleteObjectStore("remoteDocumentChanges")}(e),function(e){var t=e.objectStore(ur.store);t.createIndex(ur.readTimeIndex,ur.readTimeIndexPath,{unique:!1}),t.createIndex(ur.collectionReadTimeIndex,ur.collectionReadTimeIndexPath,{unique:!1})}(t)}))),n<10&&r>=10&&(o=o.next((function(){return i.Ve(a)}))),n<11&&r>=11&&(o=o.next((function(){!function(e){e.createObjectStore(pr.store,{keyPath:pr.keyPath})}(e),function(e){e.createObjectStore(yr.store,{keyPath:yr.keyPath})}(e)}))),o},e.prototype.be=function(e){var t=0;return e.store(ur.store).$t((function(e,n){t+=ni(n)})).next((function(){var n=new ar(t);return e.store(ar.store).put(ar.key,n)}))},e.prototype.Re=function(e){var t=this,n=e.store(nr.store),r=e.store(rr.store);return n.Nt().next((function(n){return br.forEach(n,(function(n){var i=IDBKeyRange.bound([n.userId,-1],[n.userId,n.lastAcknowledgedBatchId]);
960return r.Nt(rr.userMutationsIndex,i).next((function(r){return br.forEach(r,(function(r){O(r.userId===n.userId);var i=jr(t.R,r);return ei(e,n.userId,i).next((function(){}))}))}))}))}))},e.prototype.ve=function(e){var t=e.store(hr.store),n=e.store(ur.store);return e.store(fr.store).get(fr.key).next((function(e){var r=[];return n.$t((function(n,i){var a=new W(n),o=function(e){return[0,$n(e)]}(a);r.push(t.get(o).next((function(n){return n?br.resolve():function(n){return t.put(new hr(0,$n(n),e.highestListenSequenceNumber))}(a)})))})).next((function(){return br.waitFor(r)}))}))},e.prototype.Pe=function(e,t){e.createObjectStore(lr.store,{keyPath:lr.keyPath});var n=t.store(lr.store),r=new $r,i=function(e){if(r.add(e)){var t=e.lastSegment(),i=e.popLast();return n.put({collectionId:t,parent:$n(i)})}};return t.store(ur.store).$t({kt:!0},(function(e,t){var n=new W(e);return i(n.popLast())})).next((function(){return t.store(ir.store).$t({kt:!0},(function(e,t){e[0];var n=e[1];e[2];var r=Zn(n);return i(r.popLast())}))}))},e.prototype.Ve=function(e){var t=this,n=e.store(cr.store);return n.$t((function(e,r){var i=Kr(r),a=Qr(t.R,i);return n.put(a)}))},e}();function Ai(e){e.createObjectStore(hr.store,{keyPath:hr.keyPath}).createIndex(hr.documentTargetsIndex,hr.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(cr.store,{keyPath:cr.keyPath}).createIndex(cr.queryTargetsIndexName,cr.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(fr.store)}var ki="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",Ci=function(){function e(t,n,r,i,a,o,s,c,l,u){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Se=a,this.window=o,this.document=s,this.De=l,this.Ce=u,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.Fe=null,this.inForeground=!1,this.ke=null,this.$e=null,this.Oe=Number.NEGATIVE_INFINITY,this.Me=function(e){return Promise.resolve()},!e.yt())throw new N(S.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new gi(this,i),this.Le=n+"main",this.R=new Pr(c),this.Be=new Er(this.Le,11,new Di(this.R)),this.qe=new ci(this.referenceDelegate,this.R),this.Ut=new Xr,this.Ue=function(e,t){return new Ei(e,t)}(this.R,this.Ut),this.Ke=new zr,this.window&&this.window.localStorage?this.Qe=this.window.localStorage:(this.Qe=null,!1===u&&C("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.prototype.start=function(){var e=this;return this.je().then((function(){if(!e.isPrimary&&!e.allowTabSynchronization)throw new N(S.FAILED_PRECONDITION,ki);return e.We(),e.Ge(),e.ze(),e.runTransaction("getHighestListenSequenceNumber","readonly",(function(t){return e.qe.getHighestSequenceNumber(t)}))})).then((function(t){e.Ne=new _(t,e.De)})).then((function(){e.xe=!0})).catch((function(t){return e.Be&&e.Be.close(),Promise.reject(t)}))},e.prototype.He=function(e){var t=this;return this.Me=function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){return this.started?[2,e(n)]:[2]}))}))},e(this.isPrimary)},e.prototype.setDatabaseDeletedListener=function(e){var t=this;this.Be.vt((function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return null===n.newVersion?[4,e()]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}
960))}))}))},e.prototype.setNetworkEnabled=function(e){var t=this;this.networkEnabled!==e&&(this.networkEnabled=e,this.Se.enqueueAndForget((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this.started?[4,this.je()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})))},e.prototype.je=function(){var e=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",(function(t){return Ri(t).put(new dr(e.clientId,Date.now(),e.networkEnabled,e.inForeground)).next((function(){if(e.isPrimary)return e.Je(t).next((function(t){t||(e.isPrimary=!1,e.Se.enqueueRetryable((function(){return e.Me(!1)})))}))})).next((function(){return e.Ye(t)})).next((function(n){return e.isPrimary&&!n?e.Xe(t).next((function(){return!1})):!!n&&e.Ze(t).next((function(){return!0}))}))})).catch((function(t){if(Sr(t))return k("IndexedDbPersistence","Failed to extend owner lease: ",t),e.isPrimary;if(!e.allowTabSynchronization)throw t;return k("IndexedDbPersistence","Releasing owner lease after error during lease refresh",t),!1})).then((function(t){e.isPrimary!==t&&e.Se.enqueueRetryable((function(){return e.Me(t)})),e.isPrimary=t}))},e.prototype.Je=function(e){var t=this;return xi(e).get(er.key).next((function(e){return br.resolve(t.tn(e))}))},e.prototype.en=function(e){return Ri(e).delete(this.clientId)},e.prototype.nn=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i=this;return __generator(this,(function(a){switch(a.label){case 0:return!this.isPrimary||this.sn(this.Oe,18e5)?[3,2]:(this.Oe=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",(function(e){var t=xr(e,dr.store);return t.Nt().next((function(e){var n=i.rn(e,18e5),r=e.filter((function(e){return-1===n.indexOf(e)}));return br.forEach(r,(function(e){return t.delete(e.clientId)})).next((function(){return r}))}))})).catch((function(){return[]}))]);case 1:if(e=a.sent(),this.Qe)for(t=0,n=e;t<n.length;t++)r=n[t],this.Qe.removeItem(this.on(r.clientId));a.label=2;case 2:return[2]}}
960))}))},e.prototype.ze=function(){var e=this;this.$e=this.Se.enqueueAfterDelay("client_metadata_refresh",4e3,(function(){return e.je().then((function(){return e.nn()})).then((function(){return e.ze()}))}))},e.prototype.tn=function(e){return!!e&&e.ownerId===this.clientId},e.prototype.Ye=function(e){var t=this;return this.Ce?br.resolve(!0):xi(e).get(er.key).next((function(n){if(null!==n&&t.sn(n.leaseTimestampMs,5e3)&&!t.cn(n.ownerId)){if(t.tn(n)&&t.networkEnabled)return!0;if(!t.tn(n)){if(!n.allowTabSynchronization)throw new N(S.FAILED_PRECONDITION,ki);return!1}}return!(!t.networkEnabled||!t.inForeground)||Ri(e).Nt().next((function(e){return void 0===t.rn(e,5e3).find((function(e){if(t.clientId!==e.clientId){var n=!t.networkEnabled&&e.networkEnabled,r=!t.inForeground&&e.inForeground,i=t.networkEnabled===e.networkEnabled;if(n||r&&i)return!0}return!1}))}))})).next((function(e){return t.isPrimary!==e&&k("IndexedDbPersistence","Client "+(e?"is":"is not")+" eligible for a primary lease."),e}))},e.prototype.shutdown=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){switch(t.label){case 0:return this.xe=!1,this.un(),this.$e&&(this.$e.cancel(),this.$e=null),this.an(),this.hn(),[4,this.Be.runTransaction("shutdown","readwrite",[er.store,dr.store],(function(t){var n=new Cr(t,_.o);return e.Xe(n).next((function(){return e.en(n)}))}))];case 1:return t.sent(),this.Be.close(),this.ln(),[2]}}))}))},e.prototype.rn=function(e,t){var n=this;return e.filter((function(e){return n.sn(e.updateTimeMs,t)&&!n.cn(e.clientId)}))},e.prototype.fn=function(){var e=this;return this.runTransaction("getActiveClients","readonly",(function(t){return Ri(t).Nt().next((function(t){return e.rn(t,18e5).map((function(e){return e.clientId}))}))}))},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.getMutationQueue=function(e){return ri.Qt(e,this.R,this.Ut,this.referenceDelegate)},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getBundleCache=function(){return this.Ke},e.prototype.runTransaction=function(e,t,n){var r=this;k("IndexedDbPersistence","Starting transaction:",e);var i,a="readonly"===t?"readonly":"readwrite";return this.Be.runTransaction(e,a,vr,(function(a){return i=new Cr(a,r.Ne?r.Ne.next():_.o),"readwrite-primary"===t?r.Je(i).next((function(e){return!!e||r.Ye(i)})).next((function(t){if(!t)throw C("Failed to obtain primary lease for action '"+e+"'."),r.isPrimary=!1,r.Se.enqueueRetryable((function(){return r.Me(!1)})),new N(S.FAILED_PRECONDITION,mr);return n(i)})).next((function(e){return r.Ze(i).next((function(){return e}))})):r.dn(i).next((function(){return n(i)}))})).then((function(e){return i.raiseOnCommittedEvent(),e}))},e.prototype.dn=function(e){var t=this;return xi(e).get(er.key).next((function(e){if(null!==e&&t.sn(e.leaseTimestampMs,5e3)&&!t.cn(e.ownerId)&&!t.tn(e)&&!(t.Ce||t.allowTabSynchronization&&e.allowTabSynchronization))throw new N(S.FAILED_PRECONDITION,ki)}))},e.prototype.Ze=function(e){var t=new er(this.clientId,this.allowTabSynchronization,Date.now());return xi(e).put(er.key,t)},e.yt=function(){return Er.yt()},e.prototype.Xe=function(e){var t=this,n=xi(e);return n.get(er.key).next((function(e){return t.tn(e)?(k("IndexedDbPersistence","Releasing primary lease."),n.delete(er.key)):br.resolve()}))},e.prototype.sn=function(e,t){var n=Date.now();return!(e<n-t||e>n&&(C("Detected an update time that is in the future: "+e+" > "+n),1))},e.prototype.We=function(){var e=this;null!==this.document&&"function"==typeof this.document.addEventListener&&(this.ke=function(){e.Se.enqueueAndForget((function(){return e.inForeground="visible"===e.document.visibilityState,e.je()}))},this.document.addEventListener("visibilitychange",this.ke),this.inForeground="visible"===this.document.visibilityState)},e.prototype.an=function(){this.ke&&(this.document.removeEventListener("visibilitychange",this.ke),this.ke=null)},e.prototype.Ge=function(){var e,t=this;"function"==typeof(null===(e=this.window)||void 0===e?void 0:e.addEventListener)&&(this.Fe=function(){t.un(),t.Se.enqueueAndForget((function(){return t.shutdown()}))},this.window.addEventListener("pagehide",this.Fe))},e.prototype.hn=function(){this.Fe&&(this.window.removeEventListener("pagehide",this.Fe),this.Fe=null)},e.prototype.cn=function(e){var t;try{var n=null!==(null===(t=this.Qe)||void 0===t?void 0:t.getItem(this.on(e)));return k("IndexedDbPersistence","Client '"+e+"' "+(n?"is":"is not")+" zombied in LocalStorage"),n}catch(e){return C("IndexedDbPersistence","Failed to get zombied client id.",e),!1}},e.prototype.un=function(){if(this.Qe)try{this.Qe.setItem(this.on(this.clientId),String(Date.now()))}catch(e){C("Failed to set zombie client id.",e)}},e.prototype.ln=function(){if(this.Qe)try{this.Qe.removeItem(this.on(this.clientId))}catch(e){}},e.prototype.on=function(e){return"firestore_zombie_"+this.persistenceKey+"_"+e},e}();function xi(e){return xr(e,er.store)}function Ri(e){return xr(e,dr.store)}function Li(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/" 961/** 962 * @license 963 * Copyright 2020 Google LLC 964 * 965 * Licensed under the Apache License, Version 2.0 (the "License");
966 * you may not use this file except in compliance with the License. 967 * You may obtain a copy of the License at 968 * 969 * http://www.apache.org/licenses/LICENSE-2.0 970 * 971 * Unless required by applicable law or agreed to in writing, software 972 * distributed under the License is distributed on an "AS IS" BASIS, 973 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 974 * See the License for the specific language governing permissions and 975 * limitations under the License. 976 */}var Pi=function(){function e(e,t,n){this.Ue=e,this._n=t,this.Ut=n}return e.prototype.mn=function(e,t){var n=this;return this._n.getAllMutationBatchesAffectingDocumentKey(e,t).next((function(r){return n.yn(e,t,r)}))},e.prototype.yn=function(e,t,n){return this.Ue.getEntry(e,t).next((function(e){for(var t=0,r=n;t<r.length;t++)r[t].applyToLocalView(e);return e}))},e.prototype.gn=function(e,t){e.forEach((function(e,n){for(var r=0,i=t;r<i.length;r++)i[r].applyToLocalView(n)}))},e.prototype.pn=function(e,t){var n=this;return this.Ue.getEntries(e,t).next((function(t){return n.En(e,t).next((function(){return t}))}))},e.prototype.En=function(e,t){var n=this;return this._n.getAllMutationBatchesAffectingDocumentKeys(e,t).next((function(e){return n.gn(t,e)}))},e.prototype.getDocumentsMatchingQuery=function(e,t,n){return function(e){return at.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}(t)?this.Tn(e,t.path):Zt(t)?this.In(e,t,n):this.An(e,t,n)},e.prototype.Tn=function(e,t){return this.mn(e,new at(t)).next((function(e){var t=tn();return e.isFoundDocument()&&(t=t.insert(e.key,e)),t}))},e.prototype.In=function(e,t,n){var r=this,i=t.collectionGroup,a=tn();return this.Ut.getCollectionParents(e,i).next((function(o){return br.forEach(o,(function(o){var s=function(e,t){return new zt(t,null,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(t,o.child(i));return r.An(e,s,n).next((function(e){e.forEach((function(e,t){a=a.insert(e,t)}))}))})).next((function(){return a}))}))},e.prototype.An=function(e,t,n){var r,i,a=this;return this.Ue.getDocumentsMatchingQuery(e,t,n).next((function(n){return r=n,a._n.getAllMutationBatchesAffectingQuery(e,t)})).next((function(t){return i=t,a.Rn(e,i,r).next((function(e){r=e;for(var t=0,n=i;t<n.length;t++)for(var a=n[t],o=0,s=a.mutations;o<s.length;o++){var c=s[o],l=c.key,u=r.get(l);null==u&&(u=St.newInvalidDocument(l),r=r.insert(l,u)),Ce(c,u,a.localWriteTime),u.isFoundDocument()||(r=r.remove(l))}}))})).next((function(){return r.forEach((function(e,n){se(t,n)||(r=r.remove(e))})),r}))},e.prototype.Rn=function(e,t,n){for(var r=on(),i=0,a=t;i<a.length;i++)for(var o=0,s=a[i].mutations;o<s.length;o++){var c=s[o];c instanceof Pe&&null===n.get(c.key)&&(r=r.add(c.key))}var l=n;return this.Ue.getEntries(e,r).next((function(e){return e.forEach((function(e,t){t.isFoundDocument()&&(l=l.insert(e,t))})),l}))},e}(),Fi=function(){function e(e,t,n,r){this.targetId=e,this.fromCache=t,this.bn=n,this.vn=r}return e.Pn=function(t,n){for(var r=on(),i=on(),a=0,o=n.docChanges;a<o.length;a++){var s=o[a];switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}}return new e(t,n.fromCache,r,i)},e}(),Mi=function(){function e(){}return e.prototype.Vn=function(e){this.Sn=e},e.prototype.getDocumentsMatchingQuery=function(e,t,n,r){var i=this;return function(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}(t)||n.isEqual(j.min())?this.Dn(e,t):this.Sn.pn(e,r).next((function(a){var o=i.Cn(t,a);return(Yt(t)||$t(t))&&i.Nn(t.limitType,o,r,n)?i.Dn(e,t):(A()<=LogLevel.DEBUG&&k("QueryEngine","Re-using previous result from %s to execute query: %s",n.toString(),oe(t)),i.Sn.getDocumentsMatchingQuery(e,t,n).next((function(e){return o.forEach((function(t){e=e.insert(t.key,t)})),e})))}))},e.prototype.Cn=function(e,t){var n=new Ye(ue(e));return t.forEach((function(t,r){se(e,r)&&(n=n.add(r))})),n},e.prototype.Nn=function(e,t,n,r){if(n.size!==t.size)return!0;var i="F"===e?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)},e.prototype.Dn=function(e,t){return A()<=LogLevel.DEBUG&&k("QueryEngine","Using full collection scan to execute query:",oe(t)),this.Sn.getDocumentsMatchingQuery(e,t,j.min())},e}(),Vi=function(){function e(e,t,n,r){this.persistence=e,this.xn=t,this.R=r,this.Fn=new ze(V),this.kn=new bi((function(e){return At(e)}),kt),this.$n=j.min(),this._n=e.getMutationQueue(n),this.On=e.getRemoteDocumentCache(),this.qe=e.getTargetCache(),this.Mn=new Pi(this.On,this._n,this.persistence.getIndexManager()),this.Ke=e.getBundleCache(),this.xn.Vn(this.Mn)}return e.prototype.collectGarbage=function(e){var t=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",(function(n){return e.collect(n,t.Fn)}))},e}(); 977/** 978 * @license 979 * Copyright 2017 Google LLC 980 * 981 * Licensed under the Apache License, Version 2.0 (the "License");
982 * you may not use this file except in compliance with the License. 983 * You may obtain a copy of the License at 984 * 985 * http://www.apache.org/licenses/LICENSE-2.0 986 * 987 * Unless required by applicable law or agreed to in writing, software 988 * distributed under the License is distributed on an "AS IS" BASIS, 989 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 990 * See the License for the specific language governing permissions and 991 * limitations under the License. 992 */function qi(e,t,n,r){return new Vi(e,t,n,r)}function Ui(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a;return __generator(this,(function(o){switch(o.label){case 0:return n=P$1(e),r=n._n,i=n.Mn,[4,n.persistence.runTransaction("Handle user change","readonly",(function(e){var a;return n._n.getAllMutationBatches(e).next((function(o){return a=o,r=n.persistence.getMutationQueue(t),i=new Pi(n.On,r,n.persistence.getIndexManager()),r.getAllMutationBatches(e)})).next((function(t){for(var n=[],r=[],o=on(),s=0,c=a;s<c.length;s++){var l=c[s];n.push(l.batchId);for(var u=0,d=l.mutations;u<d.length;u++){var p=d[u];o=o.add(p.key)}}for(var h=0,f=t;h<f.length;h++){var m=f[h];r.push(m.batchId);for(var g=0,y=m.mutations;g<y.length;g++){var b=y[g];o=o.add(b.key)}}return i.pn(e,o).next((function(e){return{Ln:e,removedBatchIds:n,addedBatchIds:r}}))}))}))];case 1:return a=o.sent(),[2,(n._n=r,n.Mn=i,n.xn.Vn(n.Mn),a)]}}))}))}function Bi(e,t){var n=P$1(e);return n.persistence.runTransaction("Acknowledge batch","readwrite-primary",(function(e){var r=t.batch.keys(),i=n.On.newChangeBuffer({trackRemovals:!0});return function(e,t,n,r){var i=n.batch,a=i.keys(),o=br.resolve();return a.forEach((function(e){o=o.next((function(){return r.getEntry(t,e)})).next((function(t){var a=n.docVersions.get(e);O(null!==a),t.version.compareTo(a)<0&&(i.applyToRemoteDocument(t,n),t.isValidDocument()&&r.addEntry(t,n.commitVersion))}))})),o.next((function(){return e._n.removeMutationBatch(t,i)}))}(n,e,t,i).next((function(){return i.apply(e)})).next((function(){return n._n.performConsistencyCheck(e)})).next((function(){return n.Mn.pn(e,r)}))}))}function ji(e){var t=P$1(e);return t.persistence.runTransaction("Get last remote snapshot version","readonly",(function(e){return t.qe.getLastRemoteSnapshotVersion(e)}))}function Ki(e,t){var n=P$1(e),r=t.snapshotVersion,i=n.Fn;return n.persistence.runTransaction("Apply remote event","readwrite-primary",(function(e){var a=n.On.newChangeBuffer({trackRemovals:!0});i=n.Fn;var o=[];
992t.targetChanges.forEach((function(t,a){var s=i.get(a);if(s){o.push(n.qe.removeMatchingKeys(e,t.removedDocuments,a).next((function(){return n.qe.addMatchingKeys(e,t.addedDocuments,a)})));var c=t.resumeToken;if(c.approximateByteSize()>0){var l=s.withResumeToken(c,r).withSequenceNumber(e.currentSequenceNumber);i=i.insert(a,l),function(e,t,n){return O(t.resumeToken.approximateByteSize()>0),0===e.resumeToken.approximateByteSize()||t.snapshotVersion.toMicroseconds()-e.snapshotVersion.toMicroseconds()>=3e8||n.addedDocuments.size+n.modifiedDocuments.size+n.removedDocuments.size>0}(s,l,t)&&o.push(n.qe.updateTargetData(e,l))}}}));var s=Je();if(t.documentUpdates.forEach((function(r,i){t.resolvedLimboDocuments.has(r)&&o.push(n.persistence.referenceDelegate.updateLimboDocument(e,r))})),o.push(Qi(e,a,t.documentUpdates,r,void 0).next((function(e){s=e}))),!r.isEqual(j.min())){var c=n.qe.getLastRemoteSnapshotVersion(e).next((function(t){return n.qe.setTargetsMetadata(e,e.currentSequenceNumber,r)}));o.push(c)}return br.waitFor(o).next((function(){return a.apply(e)})).next((function(){return n.Mn.En(e,s)})).next((function(){return s}))})).then((function(e){return n.Fn=i,e}))}function Qi(e,t,n,r,i){var a=on();return n.forEach((function(e){return a=a.add(e)})),t.getEntries(e,a).next((function(e){var a=Je();return n.forEach((function(n,o){var s=e.get(n),c=(null==i?void 0:i.get(n))||r;o.isNoDocument()&&o.version.isEqual(j.min())?(t.removeEntry(n,c),a=a.insert(n,o)):!s.isValidDocument()||o.version.compareTo(s.version)>0||0===o.version.compareTo(s.version)&&s.hasPendingWrites?(t.addEntry(o,c),a=a.insert(n,o)):k("LocalStore","Ignoring outdated watch update for ",n,". Current version:",s.version," Watch version:",o.version)})),a}))}function Gi(e,t){var n=P$1(e);return n.persistence.runTransaction("Get next mutation batch","readonly",(function(e){return void 0===t&&(t=-1),n._n.getNextMutationBatchAfterBatchId(e,t)}))}function zi(e,t){var n=P$1(e);return n.persistence.runTransaction("Allocate target","readwrite",(function(e){var r;return n.qe.getTargetData(e,t).next((function(i){return i?(r=i,br.resolve(r)):n.qe.allocateTargetId(e).next((function(i){return r=new Or(t,i,0,e.currentSequenceNumber),n.qe.addTargetData(e,r).next((function(){return r}))}))}))})).then((function(e){var r=n.Fn.get(e.targetId);return(null===r||e.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(n.Fn=n.Fn.insert(e.targetId,e),n.kn.set(t,e.targetId)),e}))}function Wi(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o;return __generator(this,(function(s){switch(s.label){case 0:r=P$1(e),i=r.Fn.get(t),a=n?"readwrite":"readwrite-primary",s.label=1;case 1:return s.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",a,(function(e){return r.persistence.referenceDelegate.removeTarget(e,i)}))];case 2:s.sent(),s.label=3;case 3:return[3,5];case 4:if(!Sr(o=s.sent()))throw o;return k("LocalStore","Failed to update sequence numbers for target "+t+": "+o),[3,5];case 5:return r.Fn=r.Fn.remove(t),r.kn.delete(i.target),[2]}}))}))}function Hi(e,t,n){var r=P$1(e),i=j.min(),a=on();return r.persistence.runTransaction("Execute query","readonly",(function(e){return function(e,t,n){var r=P$1(e),i=r.kn.get(n);return void 0!==i?br.resolve(r.Fn.get(i)):r.qe.getTargetData(t,n)}(r,e,ee(t)).next((function(t){if(t)return i=t.lastLimboFreeSnapshotVersion,r.qe.getMatchingKeysForTargetId(e,t.targetId).next((function(e){a=e}))})).next((function(){return r.xn.getDocumentsMatchingQuery(e,t,n?i:j.min(),n?a:on())})).next((function(e){return{documents:e,Bn:a}}))}))}function Yi(e,t){var n=P$1(e),r=P$1(n.qe),i=n.Fn.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",(function(e){return r.lt(e,t).next((function(e){return e?e.target:null}))}))}function $i(e){var t=P$1(e);return t.persistence.runTransaction("Get new document changes","readonly",(function(e){return function(e,t,n){var r=P$1(e),i=Je(),a=Vr(n),o=Si(t),s=IDBKeyRange.lowerBound(a,!0);return o.$t({index:ur.readTimeIndex,range:s},(function(e,t){var n=Fr(r.R,t);i=i.insert(n.key,n),a=t.readTime})).next((function(){return{wn:i,readTime:qr(a)}}))}(t.On,e,t.$n)})).then((function(e){var n=e.wn,r=e.readTime;return t.$n=r,n}
992))}function Xi(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){return[2,(t=P$1(e)).persistence.runTransaction("Synchronize last document change read time","readonly",(function(e){return function(e){var t=Si(e),n=j.min();return t.$t({index:ur.readTimeIndex,reverse:!0},(function(e,t,r){t.readTime&&(n=qr(t.readTime)),r.done()})).next((function(){return n}))}(e)})).then((function(e){t.$n=e}))]}))}))} 993/** 994 * @license 995 * Copyright 2020 Google LLC 996 * 997 * Licensed under the Apache License, Version 2.0 (the "License"); 998 * you may not use this file except in compliance with the License. 999 * You may obtain a copy of the License at 1000 * 1001 * http://www.apache.org/licenses/LICENSE-2.0 1002 * 1003 * Unless required by applicable law or agreed to in writing, software 1004 * distributed under the License is distributed on an "AS IS" BASIS, 1005 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1006 * See the License for the specific language governing permissions and 1007 * limitations under the License. 1008 */var to=function(){function e(e){this.R=e,this.Qn=new Map,this.jn=new Map}return e.prototype.getBundleMetadata=function(e,t){return br.resolve(this.Qn.get(t))},e.prototype.saveBundleMetadata=function(e,t){var n;return this.Qn.set(t.id,{id:(n=t).id,version:n.version,createTime:Tn(n.createTime)}),br.resolve()},e.prototype.getNamedQuery=function(e,t){return br.resolve(this.jn.get(t))},e.prototype.saveNamedQuery=function(e,t){return this.jn.set(t.name,function(e){return{name:e.name,query:Gr(e.bundledQuery),readTime:Tn(e.readTime)}}(t)),br.resolve()},e}(),eo=function(){function e(){this.Wn=new Ye(no.Gn),this.zn=new Ye(no.Hn)}return e.prototype.isEmpty=function(){return this.Wn.isEmpty()},e.prototype.addReference=function(e,t){var n=new no(e,t);this.Wn=this.Wn.add(n),this.zn=this.zn.add(n)},e.prototype.Jn=function(e,t){var n=this;e.forEach((function(e){return n.addReference(e,t)}))},e.prototype.removeReference=function(e,t){this.Yn(new no(e,t))},e.prototype.Xn=function(e,t){var n=this;e.forEach((function(e){return n.removeReference(e,t)}))},e.prototype.Zn=function(e){var t=this,n=new at(new W([])),r=new no(n,e),i=new no(n,e+1),a=[];return this.zn.forEachInRange([r,i],(function(e){t.Yn(e),a.push(e.key)})),a},e.prototype.ts=function(){var e=this;this.Wn.forEach((function(t){return e.Yn(t)}))},e.prototype.Yn=function(e){this.Wn=this.Wn.delete(e),this.zn=this.zn.delete(e)},e.prototype.es=function(e){var t=new at(new W([])),n=new no(t,e),r=new no(t,e+1),i=on();return this.zn.forEachInRange([n,r],(function(e){i=i.add(e.key)})),i},e.prototype.containsKey=function(e){var t=new no(e,0),n=this.Wn.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)},e}(),no=function(){function e(e,t){this.key=e,this.ns=t}return e.Gn=function(e,t){return at.comparator(e.key,t.key)||V(e.ns,t.ns)},e.Hn=function(e,t){return V(e.ns,t.ns)||at.comparator(e.key,t.key)},e}(),ro=function(){function e(e,t){this.Ut=e,this.referenceDelegate=t,this._n=[],this.ss=1,this.rs=new Ye(no.Gn)}return e.prototype.checkEmpty=function(e){return br.resolve(0===this._n.length)},e.prototype.addMutationBatch=function(e,t,n,r){var i=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];var a=new Rr(i,t,n,r);this._n.push(a);for(var o=0,s=r;o<s.length;o++){var c=s[o];this.rs=this.rs.add(new no(c.key,i)),this.Ut.addToCollectionParentIndex(e,c.key.path.popLast())}return br.resolve(a)},e.prototype.lookupMutationBatch=function(e,t){return br.resolve(this.os(t))},e.prototype.getNextMutationBatchAfterBatchId=function(e,t){var n=t+1,r=this.cs(n),i=r<0?0:r;return br.resolve(this._n.length>i?this._n[i]:null)},e.prototype.getHighestUnacknowledgedBatchId=function(){return br.resolve(0===this._n.length?-1:this.ss-1)},e.prototype.getAllMutationBatches=function(e){return br.resolve(this._n.slice())},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(e,t){var n=this,r=new no(t,0),i=new no(t,Number.POSITIVE_INFINITY),a=[];return this.rs.forEachInRange([r,i],(function(e){var t=n.os(e.ns);a.push(t)})),br.resolve(a)},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(e,t){var n=this,r=new Ye(V);return t.forEach((function(e){var t=new no(e,0),i=new no(e,Number.POSITIVE_INFINITY);
1008n.rs.forEachInRange([t,i],(function(e){r=r.add(e.ns)}))})),br.resolve(this.us(r))},e.prototype.getAllMutationBatchesAffectingQuery=function(e,t){var n=t.path,r=n.length+1,i=n;at.isDocumentKey(i)||(i=i.child(""));var a=new no(new at(i),0),o=new Ye(V);return this.rs.forEachWhile((function(e){var t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.ns)),!0)}),a),br.resolve(this.us(o))},e.prototype.us=function(e){var t=this,n=[];return e.forEach((function(e){var r=t.os(e);null!==r&&n.push(r)})),n},e.prototype.removeMutationBatch=function(e,t){var n=this;O(0===this.hs(t.batchId,"removed")),this._n.shift();var r=this.rs;return br.forEach(t.mutations,(function(i){var a=new no(i.key,t.batchId);return r=r.delete(a),n.referenceDelegate.markPotentiallyOrphaned(e,i.key)})).next((function(){n.rs=r}))},e.prototype.Gt=function(e){},e.prototype.containsKey=function(e,t){var n=new no(t,0),r=this.rs.firstAfterOrEqual(n);return br.resolve(t.isEqual(r&&r.key))},e.prototype.performConsistencyCheck=function(e){return this._n.length,br.resolve()},e.prototype.hs=function(e,t){return this.cs(e)},e.prototype.cs=function(e){return 0===this._n.length?0:e-this._n[0].batchId},e.prototype.os=function(e){var t=this.cs(e);return t<0||t>=this._n.length?null:this._n[t]},e}(),io=function(){function e(e,t){this.Ut=e,this.ls=t,this.docs=new ze(at.comparator),this.size=0}return e.prototype.addEntry=function(e,t,n){var r=t.key,i=this.docs.get(r),a=i?i.size:0,o=this.ls(t);return this.docs=this.docs.insert(r,{document:t.clone(),size:o,readTime:n}),this.size+=o-a,this.Ut.addToCollectionParentIndex(e,r.path.popLast())},e.prototype.removeEntry=function(e){var t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)},e.prototype.getEntry=function(e,t){var n=this.docs.get(t);return br.resolve(n?n.document.clone():St.newInvalidDocument(t))},e.prototype.getEntries=function(e,t){var n=this,r=Je();return t.forEach((function(e){var t=n.docs.get(e);r=r.insert(e,t?t.document.clone():St.newInvalidDocument(e))})),br.resolve(r)},e.prototype.getDocumentsMatchingQuery=function(e,t,n){for(var r=Je(),i=new at(t.path.child("")),a=this.docs.getIteratorFrom(i);a.hasNext();){var o=a.getNext(),s=o.key,c=o.value,l=c.document,u=c.readTime;if(!t.path.isPrefixOf(s.path))break;u.compareTo(n)<=0||se(t,l)&&(r=r.insert(l.key,l.clone()))}return br.resolve(r)},e.prototype.fs=function(e,t){return br.forEach(this.docs,(function(e){return t(e)}))},e.prototype.newChangeBuffer=function(e){return new oo(this)},e.prototype.getSize=function(e){return br.resolve(this.size)},e}(),oo=function(e){function t(t){var n=this;return(n=e.call(this)||this).Ie=t,n}return __extends$1(t,e),t.prototype.applyChanges=function(e){var t=this,n=[];
1008return this.changes.forEach((function(r,i){i.document.isValidDocument()?n.push(t.Ie.addEntry(e,i.document,t.getReadTime(r))):t.Ie.removeEntry(r)})),br.waitFor(n)},t.prototype.getFromCache=function(e,t){return this.Ie.getEntry(e,t)},t.prototype.getAllFromCache=function(e,t){return this.Ie.getEntries(e,t)},t}(Ii),so=function(){function e(e){this.persistence=e,this.ds=new bi((function(e){return At(e)}),kt),this.lastRemoteSnapshotVersion=j.min(),this.highestTargetId=0,this.ws=0,this._s=new eo,this.targetCount=0,this.ys=ai.Jt()}return e.prototype.forEachTarget=function(e,t){return this.ds.forEach((function(e,n){return t(n)})),br.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(e){return br.resolve(this.lastRemoteSnapshotVersion)},e.prototype.getHighestSequenceNumber=function(e){return br.resolve(this.ws)},e.prototype.allocateTargetId=function(e){return this.highestTargetId=this.ys.next(),br.resolve(this.highestTargetId)},e.prototype.setTargetsMetadata=function(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.ws&&(this.ws=t),br.resolve()},e.prototype.te=function(e){this.ds.set(e.target,e);var t=e.targetId;t>this.highestTargetId&&(this.ys=new ai(t),this.highestTargetId=t),e.sequenceNumber>this.ws&&(this.ws=e.sequenceNumber)},e.prototype.addTargetData=function(e,t){return this.te(t),this.targetCount+=1,br.resolve()},e.prototype.updateTargetData=function(e,t){return this.te(t),br.resolve()},e.prototype.removeTargetData=function(e,t){return this.ds.delete(t.target),this._s.Zn(t.targetId),this.targetCount-=1,br.resolve()},e.prototype.removeTargets=function(e,t,n){var r=this,i=0,a=[];return this.ds.forEach((function(o,s){s.sequenceNumber<=t&&null===n.get(s.targetId)&&(r.ds.delete(o),a.push(r.removeMatchingKeysForTargetId(e,s.targetId)),i++)})),br.waitFor(a).next((function(){return i}))},e.prototype.getTargetCount=function(e){return br.resolve(this.targetCount)},e.prototype.getTargetData=function(e,t){var n=this.ds.get(t)||null;return br.resolve(n)},e.prototype.addMatchingKeys=function(e,t,n){return this._s.Jn(t,n),br.resolve()},e.prototype.removeMatchingKeys=function(e,t,n){this._s.Xn(t,n);var r=this.persistence.referenceDelegate,i=[];return r&&t.forEach((function(t){i.push(r.markPotentiallyOrphaned(e,t))})),br.waitFor(i)},e.prototype.removeMatchingKeysForTargetId=function(e,t){return this._s.Zn(t),br.resolve()},e.prototype.getMatchingKeysForTargetId=function(e,t){var n=this._s.es(t);return br.resolve(n)},e.prototype.containsKey=function(e,t){return br.resolve(this._s.containsKey(t))},e}(),uo=function(){function e(e,t){var n=this;this.gs={},this.Ne=new _(0),this.xe=!1,this.xe=!0,this.referenceDelegate=e(this),this.qe=new so(this),this.Ut=new Yr,this.Ue=function(e,t){return new io(e,(function(e){return n.referenceDelegate.ps(e)}))}(this.Ut),this.R=new Pr(t),this.Ke=new to(this.R)}return e.prototype.start=function(){return Promise.resolve()},e.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.setDatabaseDeletedListener=function(){},e.prototype.setNetworkEnabled=function(){},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getMutationQueue=function(e){var t=this.gs[e.toKey()];return t||(t=new ro(this.Ut,this.referenceDelegate),this.gs[e.toKey()]=t),t},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getBundleCache=function(){return this.Ke},e.prototype.runTransaction=function(e,t,n){var r=this;k("MemoryPersistence","Starting transaction:",e);var i=new ao(this.Ne.next());return this.referenceDelegate.Es(),n(i).next((function(e){return r.referenceDelegate.Ts(i).next((function(){return e}))})).toPromise().then((function(e){return i.raiseOnCommittedEvent(),e}))},e.prototype.Is=function(e,t){return br.or(Object.values(this.gs).map((function(n){return function(){return n.containsKey(e,t)}})))},e}(),ao=function(e){function t(t){var n=this;return(n=e.call(this)||this).currentSequenceNumber=t,n}return __extends$1(t,e),t}(gr),co=function(){function e(e){this.persistence=e,this.As=new eo,this.Rs=null}return e.bs=function(t){return new e(t)},Object.defineProperty(e.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;throw L()}
1008,enumerable:!1,configurable:!0}),e.prototype.addReference=function(e,t,n){return this.As.addReference(n,t),this.vs.delete(n.toString()),br.resolve()},e.prototype.removeReference=function(e,t,n){return this.As.removeReference(n,t),this.vs.add(n.toString()),br.resolve()},e.prototype.markPotentiallyOrphaned=function(e,t){return this.vs.add(t.toString()),br.resolve()},e.prototype.removeTarget=function(e,t){var n=this;this.As.Zn(t.targetId).forEach((function(e){return n.vs.add(e.toString())}));var r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next((function(e){e.forEach((function(e){return n.vs.add(e.toString())}))})).next((function(){return r.removeTargetData(e,t)}))},e.prototype.Es=function(){this.Rs=new Set},e.prototype.Ts=function(e){var t=this,n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return br.forEach(this.vs,(function(r){var i=at.fromPath(r);return t.Ps(e,i).next((function(e){e||n.removeEntry(i)}))})).next((function(){return t.Rs=null,n.apply(e)}))},e.prototype.updateLimboDocument=function(e,t){var n=this;return this.Ps(e,t).next((function(e){e?n.vs.delete(t.toString()):n.vs.add(t.toString())}))},e.prototype.ps=function(e){return 0},e.prototype.Ps=function(e,t){var n=this;return br.or([function(){return br.resolve(n.As.containsKey(t))},function(){return n.persistence.getTargetCache().containsKey(e,t)},function(){return n.persistence.Is(e,t)}])},e}(),ho=function(){function e(e){this.uid=e}return e.prototype.isAuthenticated=function(){return null!=this.uid},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(e){return e.uid===this.uid},e}(); 1009/** 1010 * @license 1011 * Copyright 2017 Google LLC 1012 * 1013 * Licensed under the Apache License, Version 2.0 (the "License"); 1014 * you may not use this file except in compliance with the License. 1015 * You may obtain a copy of the License at 1016 * 1017 * http://www.apache.org/licenses/LICENSE-2.0 1018 * 1019 * Unless required by applicable law or agreed to in writing, software 1020 * distributed under the License is distributed on an "AS IS" BASIS, 1021 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1022 * See the License for the specific language governing permissions and 1023 * limitations under the License. 1024 */function fo(e,t){return"firestore_clients_"+e+"_"+t}function lo(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.isAuthenticated()&&(r+="_"+t.uid),r}function po(e,t){return"firestore_targets_"+e+"_"+t}ho.UNAUTHENTICATED=new ho(null),ho.GOOGLE_CREDENTIALS=new ho("google-credentials-uid"),ho.FIRST_PARTY=new ho("first-party-uid");var yo=function(){function e(e,t,n,r){this.user=e,this.batchId=t,this.state=n,this.error=r}return e.Vs=function(t,n,r){var i,a=JSON.parse(r),o="object"==typeof a&&-1!==["pending","acknowledged","rejected"].indexOf(a.state)&&(void 0===a.error||"object"==typeof a.error);return o&&a.error&&(o="string"==typeof a.error.message&&"string"==typeof a.error.code)&&(i=new N(a.error.code,a.error.message)),o?new e(t,n,a.state,i):(C("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.Ss=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),vo=function(){function e(e,t,n){this.targetId=e,this.state=t,this.error=n}return e.Vs=function(t,n){var r,i=JSON.parse(n),a="object"==typeof i&&-1!==["not-current","current","rejected"].indexOf(i.state)&&(void 0===i.error||"object"==typeof i.error);return a&&i.error&&(a="string"==typeof i.error.message&&"string"==typeof i.error.code)&&(r=new N(i.error.code,i.error.message)),a?new e(t,i.state,r):(C("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.Ss=function(){var e={state:this.state,updateTimeMs:Date.now()};return this.error&&(e.error={code:this.error.code,message:this.error.message}),JSON.stringify(e)},e}(),mo=function(){function e(e,t){this.clientId=e,this.activeTargetIds=t}return e.Vs=function(t,n){for(var r=JSON.parse(n),i="object"==typeof r&&r.activeTargetIds instanceof Array,a=un(),o=0;i&&o<r.activeTargetIds.length;++o)i=ut(r.activeTargetIds[o]),a=a.add(r.activeTargetIds[o]);
1024return i?new e(t,a):(C("SharedClientState","Failed to parse client data for instance '"+t+"': "+n),null)},e}(),go=function(){function e(e,t){this.clientId=e,this.onlineState=t}return e.Vs=function(t){var n=JSON.parse(t);return"object"==typeof n&&-1!==["Unknown","Online","Offline"].indexOf(n.onlineState)&&"string"==typeof n.clientId?new e(n.clientId,n.onlineState):(C("SharedClientState","Failed to parse online state: "+t),null)},e}(),wo=function(){function e(){this.activeTargetIds=un()}return e.prototype.Ds=function(e){this.activeTargetIds=this.activeTargetIds.add(e)},e.prototype.Cs=function(e){this.activeTargetIds=this.activeTargetIds.delete(e)},e.prototype.Ss=function(){var e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)},e}(),bo=function(){function e(e,t,n,r,i){this.window=e,this.Se=t,this.persistenceKey=n,this.Ns=r,this.syncEngine=null,this.onlineStateHandler=null,this.sequenceNumberHandler=null,this.xs=this.Fs.bind(this),this.ks=new ze(V),this.started=!1,this.$s=[];var a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");this.storage=this.window.localStorage,this.currentUser=i,this.Os=fo(this.persistenceKey,this.Ns),this.Ms=function(e){return"firestore_sequence_number_"+e}(this.persistenceKey),this.ks=this.ks.insert(this.Ns,new wo),this.Ls=new RegExp("^firestore_clients_"+a+"_([^_]*)$"),this.Bs=new RegExp("^firestore_mutations_"+a+"_(\\d+)(?:_(.*))?$"),this.qs=new RegExp("^firestore_targets_"+a+"_(\\d+)$"),this.Us=function(e){return"firestore_online_state_"+e}(this.persistenceKey),this.Ks=function(e){return"firestore_bundle_loaded_"+e}(this.persistenceKey),this.window.addEventListener("storage",this.xs)}return e.yt=function(e){return!(!e||!e.localStorage)},e.prototype.start=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,r,i,a,o,s,c,l,u,d=this;return __generator(this,(function(p){switch(p.label){case 0:return[4,this.syncEngine.fn()];case 1:for(e=p.sent(),t=0,n=e;t<n.length;t++)(r=n[t])!==this.Ns&&(i=this.getItem(fo(this.persistenceKey,r)))&&(a=mo.Vs(r,i))&&(this.ks=this.ks.insert(a.clientId,a));for(this.Qs(),(o=this.storage.getItem(this.Us))&&(s=this.js(o))&&this.Ws(s),c=0,l=this.$s;c<l.length;c++)u=l[c],this.Fs(u);return this.$s=[],this.window.addEventListener("pagehide",(function(){return d.shutdown()})),this.started=!0,[2]}}))}))},e.prototype.writeSequenceNumber=function(e){this.setItem(this.Ms,JSON.stringify(e))},e.prototype.getAllActiveQueryTargets=function(){return this.Gs(this.ks)},e.prototype.isActiveQueryTarget=function(e){var t=!1;return this.ks.forEach((function(n,r){r.activeTargetIds.has(e)&&(t=!0)})),t},e.prototype.addPendingMutation=function(e){this.zs(e,"pending")},e.prototype.updateMutationState=function(e,t,n){this.zs(e,t,n),this.Hs(e)},e.prototype.addLocalQueryTarget=function(e){var t="not-current";if(this.isActiveQueryTarget(e)){var n=this.storage.getItem(po(this.persistenceKey,e));if(n){var r=vo.Vs(e,n);r&&(t=r.state)}}return this.Js.Ds(e),this.Qs(),t},e.prototype.removeLocalQueryTarget=function(e){this.Js.Cs(e),this.Qs()},e.prototype.isLocalQueryTarget=function(e){return this.Js.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){this.removeItem(po(this.persistenceKey,e))},e.prototype.updateQueryState=function(e,t,n){this.Ys(e,t,n)},e.prototype.handleUserChange=function(e,t,n){var r=this;t.forEach((function(e){r.Hs(e)})),this.currentUser=e,n.forEach((function(e){r.addPendingMutation(e)}))},e.prototype.setOnlineState=function(e){this.Xs(e)},e.prototype.notifyBundleLoaded=function(){this.Zs()},e.prototype.shutdown=function(){this.started&&(this.window.removeEventListener("storage",this.xs),this.removeItem(this.Os),this.started=!1)},e.prototype.getItem=function(e){var t=this.storage.getItem(e);return k("SharedClientState","READ",e,t),t},e.prototype.setItem=function(e,t){k("SharedClientState","SET",e,t),this.storage.setItem(e,t)},e.prototype.removeItem=function(e){k("SharedClientState","REMOVE",e),this.storage.removeItem(e)},e.prototype.Fs=function(e){var t=this,n=e;if(n.storageArea===this.storage){if(k("SharedClientState","EVENT",n.key,n.newValue),n.key===this.Os)return void C("Received WebStorage notification for local change. Another client might have garbage-collected our state");this.Se.enqueueRetryable((function(){return __awaiter(t,void 0,void 0,(function(){var e,t,r,i,a,o;return __generator(this,(function(s){if(this.started){if(null!==n.key)if(this.Ls.test(n.key)){if(null==n.newValue)return e=this.ti(n.key),[2,this.ei(e,null)];if(t=this.ni(n.key,n.newValue))return[2,this.ei(t.clientId,t)]}else if(this.Bs.test(n.key)){if(null!==n.newValue&&(r=this.si(n.key,n.newValue)))return[2,this.ii(r)]}else if(this.qs.test(n.key)){if(null!==n.newValue&&(i=this.ri(n.key,n.newValue)))return[2,this.oi(i)]}else if(n.key===this.Us){if(null!==n.newValue&&(a=this.js(n.newValue)))return[2,this.Ws(a)]}else if(n.key===this.Ms)(o=function(e){var t=_.o;if(null!=e)try{var n=JSON.parse(e);O("number"==typeof n),t=n}
1024catch(e){C("SharedClientState","Failed to read sequence number from WebStorage",e)}return t}(n.newValue))!==_.o&&this.sequenceNumberHandler(o);else if(n.key===this.Ks)return[2,this.syncEngine.ci()]}else this.$s.push(n);return[2]}))}))}))}},Object.defineProperty(e.prototype,"Js",{get:function(){return this.ks.get(this.Ns)},enumerable:!1,configurable:!0}),e.prototype.Qs=function(){this.setItem(this.Os,this.Js.Ss())},e.prototype.zs=function(e,t,n){var r=new yo(this.currentUser,e,t,n),i=lo(this.persistenceKey,this.currentUser,e);this.setItem(i,r.Ss())},e.prototype.Hs=function(e){var t=lo(this.persistenceKey,this.currentUser,e);this.removeItem(t)},e.prototype.Xs=function(e){var t={clientId:this.Ns,onlineState:e};this.storage.setItem(this.Us,JSON.stringify(t))},e.prototype.Ys=function(e,t,n){var r=po(this.persistenceKey,e),i=new vo(e,t,n);this.setItem(r,i.Ss())},e.prototype.Zs=function(){this.setItem(this.Ks,"value-not-used")},e.prototype.ti=function(e){var t=this.Ls.exec(e);return t?t[1]:null},e.prototype.ni=function(e,t){var n=this.ti(e);return mo.Vs(n,t)},e.prototype.si=function(e,t){var n=this.Bs.exec(e),r=Number(n[1]),i=void 0!==n[2]?n[2]:null;return yo.Vs(new ho(i),r,t)},e.prototype.ri=function(e,t){var n=this.qs.exec(e),r=Number(n[1]);return vo.Vs(r,t)},e.prototype.js=function(e){return go.Vs(e)},e.prototype.ii=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return e.user.uid===this.currentUser.uid?[2,this.syncEngine.ui(e.batchId,e.state,e.error)]:(k("SharedClientState","Ignoring mutation for non-active user "+e.user.uid),[2])}))}))},e.prototype.oi=function(e){return this.syncEngine.ai(e.targetId,e.state,e.error)},e.prototype.ei=function(e,t){var n=this,r=t?this.ks.insert(e,t):this.ks.remove(e),i=this.Gs(this.ks),a=this.Gs(r),o=[],s=[];return a.forEach((function(e){i.has(e)||o.push(e)})),i.forEach((function(e){a.has(e)||s.push(e)})),this.syncEngine.hi(o,s).then((function(){n.ks=r}))},e.prototype.Ws=function(e){this.ks.get(e.clientId)&&this.onlineStateHandler(e.onlineState)},e.prototype.Gs=function(e){var t=un();return e.forEach((function(e,n){t=t.unionWith(n.activeTargetIds)})),t},e}(),Io=function(){function e(){this.li=new wo,this.fi={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}return e.prototype.addPendingMutation=function(e){},e.prototype.updateMutationState=function(e,t,n){},e.prototype.addLocalQueryTarget=function(e){return this.li.Ds(e),this.fi[e]||"not-current"},e.prototype.updateQueryState=function(e,t,n){this.fi[e]=t},e.prototype.removeLocalQueryTarget=function(e){this.li.Cs(e)},e.prototype.isLocalQueryTarget=function(e){return this.li.activeTargetIds.has(e)},e.prototype.clearQueryState=function(e){delete this.fi[e]},e.prototype.getAllActiveQueryTargets=function(){return this.li.activeTargetIds},e.prototype.isActiveQueryTarget=function(e){return this.li.activeTargetIds.has(e)},e.prototype.start=function(){return this.li=new wo,Promise.resolve()},e.prototype.handleUserChange=function(e,t,n){},e.prototype.setOnlineState=function(e){},e.prototype.shutdown=function(){},e.prototype.writeSequenceNumber=function(e){},e.prototype.notifyBundleLoaded=function(){},e}(),Eo=function(){function e(){}return e.prototype.di=function(e){},e.prototype.shutdown=function(){},e}(),To=function(){function e(){var e=this;this.wi=function(){return e._i()},this.mi=function(){return e.yi()},this.gi=[],this.pi()}return e.prototype.di=function(e){this.gi.push(e)},e.prototype.shutdown=function(){window.removeEventListener("online",this.wi),window.removeEventListener("offline",this.mi)},e.prototype.pi=function(){window.addEventListener("online",this.wi),window.addEventListener("offline",this.mi)},e.prototype._i=function(){k("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(var e=0,t=this.gi;e<t.length;e++)(0,t[e])(0)},e.prototype.yi=function(){k("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(var e=0,t=this.gi;e<t.length;e++)(0,t[e])(1)},e.yt=function(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener},e}(),_o={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery"},So=function(){function e(e){this.Ei=e.Ei,this.Ti=e.Ti}return e.prototype.Ii=function(e){this.Ai=e},e.prototype.Ri=function(e){this.bi=e},e.prototype.onMessage=function(e){this.vi=e},e.prototype.close=function(){this.Ti()},e.prototype.send=function(e){this.Ei(e)},e.prototype.Pi=function(){this.Ai()},e.prototype.Vi=function(e){this.bi(e)},e.prototype.Si=function(e){this.vi(e)},e}(),No=function(e){function t(t){var n=this;return(n=e.call(this,t)||this).forceLongPolling=t.forceLongPolling,n.autoDetectLongPolling=t.autoDetectLongPolling,n.useFetchStreams=t.useFetchStreams,n}return __extends$1(t,e),t.prototype.ki=function(e,t,n,r){return new Promise((function(i,a){var o=new XhrIo;
1024o.listenOnce(EventType.COMPLETE,(function(){try{switch(o.getLastErrorCode()){case ErrorCode.NO_ERROR:var t=o.getResponseJson();k("Connection","XHR received:",JSON.stringify(t)),i(t);break;case ErrorCode.TIMEOUT:k("Connection",'RPC "'+e+'" timed out'),a(new N(S.DEADLINE_EXCEEDED,"Request time out"));break;case ErrorCode.HTTP_ERROR:var n=o.getStatus();if(k("Connection",'RPC "'+e+'" failed with status:',n,"response text:",o.getResponseText()),n>0){var r=o.getResponseJson().error;if(r&&r.status&&r.message){var s=function(e){var t=e.toLowerCase().replace(/_/g,"-");return Object.values(S).indexOf(t)>=0?t:S.UNKNOWN}(r.status);a(new N(s,r.message))}else a(new N(S.UNKNOWN,"Server responded with status "+o.getStatus()))}else a(new N(S.UNAVAILABLE,"Connection failed."));break;default:L()}}finally{k("Connection",'RPC "'+e+'" completed.')}}));var s=JSON.stringify(r);o.send(t,"POST",s,n,15)}))},t.prototype.Oi=function(e,t){var n=[this.Di,"/","google.firestore.v1.Firestore","/",e,"/channel"],r=createWebChannelTransport(),i=getStatEventTarget(),a={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(a.xmlHttpFactory=new FetchXmlHttpFactory({})),this.Fi(a.initMessageHeaders,t),isMobileCordova()||isReactNative()||isElectron()||isIE()||isUWP()||isBrowserExtension()||(a.httpHeadersOverwriteParam="$httpHeaders");var o=n.join("");k("Connection","Creating WebChannel: "+o,a);var s=r.createWebChannel(o,a),c=!1,l=!1,u=new So({Ei:function(e){l?k("Connection","Not sending because WebChannel is closed:",e):(c||(k("Connection","Opening WebChannel transport."),s.open(),c=!0),k("Connection","WebChannel sending:",e),s.send(e))},Ti:function(){return s.close()}}),d=function(e,t,n){e.listen(t,(function(e){try{n(e)}catch(e){setTimeout((function(){throw e}),0)}}))};return d(s,WebChannel.EventType.OPEN,(function(){l||k("Connection","WebChannel transport opened.")})),d(s,WebChannel.EventType.CLOSE,(function(){l||(l=!0,k("Connection","WebChannel transport closed"),u.Vi())})),d(s,WebChannel.EventType.ERROR,(function(e){l||(l=!0,x("Connection","WebChannel transport errored:",e),u.Vi(new N(S.UNAVAILABLE,"The operation could not be completed")))})),d(s,WebChannel.EventType.MESSAGE,(function(e){var t;if(!l){var n=e.data[0];O(!!n);var r=n,i=r.error||(null===(t=r[0])||void 0===t?void 0:t.error);if(i){k("Connection","WebChannel received error:",i);var a=i.status,o=function(e){var t=qe[e];if(void 0!==t)return Ge(t)}(a),c=i.message;void 0===o&&(o=S.INTERNAL,c="Unknown error status: "+a+" with message "+i.message),l=!0,u.Vi(new N(o,c)),s.close()}else k("Connection","WebChannel received:",n),u.Si(n)}})),d(i,Event.STAT_EVENT,(function(e){e.stat===Stat.PROXY?k("Connection","Detected buffering proxy"):e.stat===Stat.NOPROXY&&k("Connection","Detected no buffering proxy")})),setTimeout((function(){u.Pi()}),0),u},t}(function(){function e(e){this.databaseInfo=e,this.databaseId=e.databaseId;var t=e.ssl?"https":"http";this.Di=t+"://"+e.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return e.prototype.Ni=function(e,t,n,r){var i=this.xi(e,t);k("RestConnection","Sending: ",i,n);var a={};return this.Fi(a,r),this.ki(e,i,a,n).then((function(e){return k("RestConnection","Received: ",e),e}),(function(t){throw x("RestConnection",e+" failed with error: ",t,"url: ",i,"request:",n),t}))},e.prototype.$i=function(e,t,n,r){return this.Ni(e,t,n,r)},e.prototype.Fi=function(e,t){if(e["X-Goog-Api-Client"]="gl-js/ fire/8.7.0",e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t)for(var n in t.authHeaders)t.authHeaders.hasOwnProperty(n)&&(e[n]=t.authHeaders[n])},e.prototype.xi=function(e,t){var n=_o[e];return this.Di+"/v1/"+t+":"+n},e}()); 1025/** 1026 * @license 1027 * Copyright 2020 Google LLC 1028 * 1029 * Licensed under the Apache License, Version 2.0 (the "License");
1030 * you may not use this file except in compliance with the License. 1031 * You may obtain a copy of the License at 1032 * 1033 * http://www.apache.org/licenses/LICENSE-2.0 1034 * 1035 * Unless required by applicable law or agreed to in writing, software 1036 * distributed under the License is distributed on an "AS IS" BASIS, 1037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1038 * See the License for the specific language governing permissions and 1039 * limitations under the License. 1040 */ 1041/** 1042 * @license 1043 * Copyright 2020 Google LLC 1044 * 1045 * Licensed under the Apache License, Version 2.0 (the "License"); 1046 * you may not use this file except in compliance with the License. 1047 * You may obtain a copy of the License at 1048 * 1049 * http://www.apache.org/licenses/LICENSE-2.0 1050 * 1051 * Unless required by applicable law or agreed to in writing, software 1052 * distributed under the License is distributed on an "AS IS" BASIS, 1053 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1054 * See the License for the specific language governing permissions and 1055 * limitations under the License. 1056 */function Do(){return"undefined"!=typeof window?window:null}function Ao(){return"undefined"!=typeof document?document:null} 1057/** 1058 * @license 1059 * Copyright 2020 Google LLC 1060 * 1061 * Licensed under the Apache License, Version 2.0 (the "License"); 1062 * you may not use this file except in compliance with the License. 1063 * You may obtain a copy of the License at 1064 * 1065 * http://www.apache.org/licenses/LICENSE-2.0 1066 * 1067 * Unless required by applicable law or agreed to in writing, software 1068 * distributed under the License is distributed on an "AS IS" BASIS, 1069 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1070 * See the License for the specific language governing permissions and 1071 * limitations under the License. 1072 */function ko(e){return new wn(e,!0)}var Co=function(){function e(e,t,n,r,i){void 0===n&&(n=1e3),void 0===r&&(r=1.5),void 0===i&&(i=6e4),this.Se=e,this.timerId=t,this.Mi=n,this.Li=r,this.Bi=i,this.qi=0,this.Ui=null,this.Ki=Date.now(),this.reset()}return e.prototype.reset=function(){this.qi=0},e.prototype.Qi=function(){this.qi=this.Bi},e.prototype.ji=function(e){var t=this;this.cancel();var n=Math.floor(this.qi+this.Wi()),r=Math.max(0,Date.now()-this.Ki),i=Math.max(0,n-r);i>0&&k("ExponentialBackoff","Backing off for "+i+" ms (base delay: "+this.qi+" ms, delay with jitter: "+n+" ms, last attempt: "+r+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,i,(function(){return t.Ki=Date.now(),e()})),this.qi*=this.Li,this.qi<this.Mi&&(this.qi=this.Mi),this.qi>this.Bi&&(this.qi=this.Bi)},e.prototype.Gi=function(){null!==this.Ui&&(this.Ui.skipDelay(),this.Ui=null)},e.prototype.cancel=function(){null!==this.Ui&&(this.Ui.cancel(),this.Ui=null)},e.prototype.Wi=function(){return(Math.random()-.5)*this.qi},e}(),xo=function(){function e(e,t,n,r,i,a){this.Se=e,this.zi=n,this.Hi=r,this.Ji=i,this.listener=a,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new Co(e,t)}return e.prototype.tr=function(){return 1===this.state||2===this.state||4===this.state},e.prototype.er=function(){return 2===this.state},e.prototype.start=function(){3!==this.state?this.auth():this.nr()},e.prototype.stop=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this.tr()?[4,this.close(0)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
1072))}))},e.prototype.sr=function(){this.state=0,this.Zi.reset()},e.prototype.ir=function(){var e=this;this.er()&&null===this.Xi&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,(function(){return e.rr()})))},e.prototype.cr=function(e){this.ur(),this.stream.send(e)},e.prototype.rr=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return this.er()?[2,this.close(0)]:[2]}))}))},e.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=null)},e.prototype.close=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return this.ur(),this.Zi.cancel(),this.Yi++,3!==e?this.Zi.reset():t&&t.code===S.RESOURCE_EXHAUSTED?(C(t.toString()),C("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Qi()):t&&t.code===S.UNAUTHENTICATED&&this.Ji.invalidateToken(),null!==this.stream&&(this.ar(),this.stream.close(),this.stream=null),this.state=e,[4,this.listener.Ri(t)];case 1:return n.sent(),[2]}}))}))},e.prototype.ar=function(){},e.prototype.auth=function(){var e=this;this.state=1;var t=this.hr(this.Yi),n=this.Yi;this.Ji.getToken().then((function(t){e.Yi===n&&e.lr(t)}),(function(n){t((function(){var t=new N(S.UNKNOWN,"Fetching auth token failed: "+n.message);return e.dr(t)}))}))},e.prototype.lr=function(e){var t=this,n=this.hr(this.Yi);this.stream=this.wr(e),this.stream.Ii((function(){n((function(){return t.state=2,t.listener.Ii()}))})),this.stream.Ri((function(e){n((function(){return t.dr(e)}))})),this.stream.onMessage((function(e){n((function(){return t.onMessage(e)}))}))},e.prototype.nr=function(){var e=this;this.state=4,this.Zi.ji((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){return this.state=0,this.start(),[2]}))}))}))},e.prototype.dr=function(e){return k("PersistentStream","close with error: "+e),this.stream=null,this.close(3,e)},e.prototype.hr=function(e){var t=this;return function(n){t.Se.enqueueAndForget((function(){return t.Yi===e?n():(k("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())}))}},e}(),Ro=function(e){function t(t,n,r,i,a){var o=this;return(o=e.call(this,t,"listen_stream_connection_backoff","listen_stream_idle",n,r,a)||this).R=i,o}return __extends$1(t,e),t.prototype.wr=function(e){return this.Hi.Oi("Listen",e)},t.prototype.onMessage=function(e){this.Zi.reset();var t=function(e,t){var n;if("targetChange"in t){t.targetChange;var r=function(e){return"NO_CHANGE"===e?0:"ADD"===e?1:"REMOVE"===e?2:"CURRENT"===e?3:"RESET"===e?4:L()}(t.targetChange.targetChangeType||"NO_CHANGE"),i=t.targetChange.targetIds||[],a=function(e,t){return e.I?(O(void 0===t||"string"==typeof t),X.fromBase64String(t||"")):(O(void 0===t||t instanceof Uint8Array),X.fromUint8Array(t||new Uint8Array))}(e,t.targetChange.resumeToken),o=(s=t.targetChange.cause)&&function(e){var t=void 0===e.code?S.UNKNOWN:Ge(e.code);return new N(t,e.message||"")}(s);n=new ln(r,i,a,o||null)}else if("documentChange"in t){t.documentChange,(r=t.documentChange).document,r.document.name,r.document.updateTime,i=Dn(e,r.document.name),a=Tn(r.document.updateTime);var s=new Tt({mapValue:{fields:r.document.fields}}),c=(o=St.newFoundDocument(i,a,s),r.targetIds||[]),l=r.removedTargetIds||[];n=new hn(c,l,o.key,o)}else if("documentDelete"in t)t.documentDelete,(r=t.documentDelete).document,i=Dn(e,r.document),a=r.readTime?Tn(r.readTime):j.min(),s=St.newNoDocument(i,a),o=r.removedTargetIds||[],n=new hn([],o,s.key,s);else if("documentRemove"in t)t.documentRemove,(r=t.documentRemove).document,i=Dn(e,r.document),a=r.removedTargetIds||[],n=new hn([],a,i,null);else{if(!("filter"in t))return L();t.filter;var u=t.filter;u.targetId,r=u.count||0,i=new Ke(r),a=u.targetId,n=new fn(a,i)}return n}(this.R,e),n=function(e){if(!("targetChange"in e))return j.min();var t=e.targetChange;return t.targetIds&&t.targetIds.length?j.min():t.readTime?Tn(t.readTime):j.min()}(e);return this.listener._r(t,n)},t.prototype.mr=function(e){var t={};t.database=Cn(this.R),t.addTarget=function(e,t){var n,r=t.target;return(n=Ct(r)?{documents:Fn(e,r)}:{query:Mn(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0?n.resumeToken=In(e,t.resumeToken):t.snapshotVersion.compareTo(j.min())>0&&(n.readTime=bn(e,t.snapshotVersion.toTimestamp())),n}(this.R,e);var n=function(e,t){var n=function(e,t){switch(t){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return L()}}(0,t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.R,e);n&&(t.labels=n),this.cr(t)},t.prototype.yr=function(e){var t={};t.database=Cn(this.R),t.removeTarget=e,this.cr(t)},t}(xo),Lo=function(e){function t(t,n,r,i,a){var o=this;return(o=e.call(this,t,"write_stream_connection_backoff","write_stream_idle",n,r,a)||this).R=i,o.gr=!1,o}
1072return __extends$1(t,e),Object.defineProperty(t.prototype,"pr",{get:function(){return this.gr},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},t.prototype.ar=function(){this.gr&&this.Er([])},t.prototype.wr=function(e){return this.Hi.Oi("Write",e)},t.prototype.onMessage=function(e){if(O(!!e.streamToken),this.lastStreamToken=e.streamToken,this.gr){this.Zi.reset();var t=function(e,t){return e&&e.length>0?(O(void 0!==t),e.map((function(e){return function(e,t){var n=e.updateTime?Tn(e.updateTime):Tn(t);return n.isEqual(j.min())&&(n=Tn(t)),new Se(n,e.transformResults||[])}(e,t)}))):[]}(e.writeResults,e.commitTime),n=Tn(e.commitTime);return this.listener.Tr(n,t)}return O(!e.writeResults||0===e.writeResults.length),this.gr=!0,this.listener.Ir()},t.prototype.Ar=function(){var e={};e.database=Cn(this.R),this.cr(e)},t.prototype.Er=function(e){var t=this,n={streamToken:this.lastStreamToken,writes:e.map((function(e){return On(t.R,e)}))};this.cr(n)},t}(xo),Oo=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).credentials=t,i.Hi=n,i.R=r,i.Rr=!1,i}return __extends$1(t,e),t.prototype.br=function(){if(this.Rr)throw new N(S.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.Ni=function(e,t,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.Ni(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===S.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new N(S.UNKNOWN,e.toString())}))},t.prototype.$i=function(e,t,n){var r=this;return this.br(),this.credentials.getToken().then((function(i){return r.Hi.$i(e,t,n,i)})).catch((function(e){throw"FirebaseError"===e.name?(e.code===S.UNAUTHENTICATED&&r.credentials.invalidateToken(),e):new N(S.UNKNOWN,e.toString())}))},t.prototype.terminate=function(){this.Rr=!0},t}((function(){})),Po=function(){function e(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return e.prototype.Sr=function(){var e=this;0===this.vr&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,(function(){return e.Pr=null,e.Cr("Backend didn't respond within 10 seconds."),e.Dr("Offline"),Promise.resolve()})))},e.prototype.Nr=function(e){"Online"===this.state?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.Fr(),this.Cr("Connection failed 1 times. Most recent error: "+e.toString()),this.Dr("Offline")))},e.prototype.set=function(e){this.Fr(),this.vr=0,"Online"===e&&(this.Vr=!1),this.Dr(e)},e.prototype.Dr=function(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))},e.prototype.Cr=function(e){var t="Could not reach Cloud Firestore backend. "+e+"\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.";this.Vr?(C(t),this.Vr=!1):k("OnlineStateTracker",t)},e.prototype.Fr=function(){null!==this.Pr&&(this.Pr.cancel(),this.Pr=null)},e}(),Fo=function(e,t,n,r,i){var a=this;this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.kr=[],this.$r=new Map,this.Or=new Set,this.Mr=[],this.Lr=i,this.Lr.di((function(e){n.enqueueAndForget((function(){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return Go(this)?(k("RemoteStore","Restarting streams for network reachability change."),[4,function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return(t=P$1(e)).Or.add(4),[4,Vo(t)];case 1:return n.sent(),t.Br.set("Unknown"),t.Or.delete(4),[4,Mo(t)];case 2:return n.sent(),[2]}}))}))}(this)]):[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}
1072))}))}))})),this.Br=new Po(n,r)}; 1073/** 1074 * @license 1075 * Copyright 2017 Google LLC 1076 * 1077 * Licensed under the Apache License, Version 2.0 (the "License"); 1078 * you may not use this file except in compliance with the License. 1079 * You may obtain a copy of the License at 1080 * 1081 * http://www.apache.org/licenses/LICENSE-2.0 1082 * 1083 * Unless required by applicable law or agreed to in writing, software 1084 * distributed under the License is distributed on an "AS IS" BASIS, 1085 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1086 * See the License for the specific language governing permissions and 1087 * limitations under the License. 1088 */function Mo(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:if(!Go(e))return[3,4];t=0,n=e.Mr,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!0)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function Vo(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:t=0,n=e.Mr,r.label=1;case 1:return t<n.length?[4,(0,n[t])(!1)]:[3,4];case 2:r.sent(),r.label=3;case 3:return t++,[3,1];case 4:return[2]}}
1088))}))}function qo(e,t){var n=P$1(e);n.$r.has(t.targetId)||(n.$r.set(t.targetId,t),Qo(n)?Ko(n):ss(n).er()&&Bo(n,t))}function Uo(e,t){var n=P$1(e),r=ss(n);n.$r.delete(t),r.er()&&jo(n,t),0===n.$r.size&&(r.er()?r.ir():Go(n)&&n.Br.set("Unknown"))}function Bo(e,t){e.qr.U(t.targetId),ss(e).mr(t)}function jo(e,t){e.qr.U(t),ss(e).yr(t)}function Ko(e){e.qr=new pn({getRemoteKeysForTarget:function(t){return e.remoteSyncer.getRemoteKeysForTarget(t)},lt:function(t){return e.$r.get(t)||null}}),ss(e).start(),e.Br.Sr()}function Qo(e){return Go(e)&&!ss(e).tr()&&e.$r.size>0}function Go(e){return 0===P$1(e).Or.size}function zo(e){e.qr=void 0}function Wo(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return e.$r.forEach((function(t,n){Bo(e,t)})),[2]}))}))}function Ho(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return zo(e),Qo(e)?(e.Br.Nr(t),Ko(e)):e.Br.set("Unknown"),[2]}))}))}function Yo(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a;return __generator(this,(function(o){switch(o.label){case 0:if(e.Br.set("Online"),!(t instanceof ln&&2===t.state&&t.cause))return[3,6];o.label=1;case 1:return o.trys.push([1,3,,5]),[4,function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a;return __generator(this,(function(o){switch(o.label){case 0:n=t.cause,r=0,i=t.targetIds,o.label=1;case 1:return r<i.length?(a=i[r],e.$r.has(a)?[4,e.remoteSyncer.rejectListen(a,n)]:[3,3]):[3,5];case 2:o.sent(),e.$r.delete(a),e.qr.removeTarget(a),o.label=3;case 3:o.label=4;case 4:return r++,[3,1];case 5:return[2]}}
1088))}))}(e,t)];case 2:return o.sent(),[3,5];case 3:return r=o.sent(),k("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),r),[4,$o(e,r)];case 4:return o.sent(),[3,5];case 5:return[3,13];case 6:if(t instanceof hn?e.qr.X(t):t instanceof fn?e.qr.rt(t):e.qr.et(t),n.isEqual(j.min()))return[3,13];o.label=7;case 7:return o.trys.push([7,11,,13]),[4,ji(e.localStore)];case 8:return i=o.sent(),n.compareTo(i)>=0?[4,function(e,t){var n=e.qr.ut(t);return n.targetChanges.forEach((function(n,r){if(n.resumeToken.approximateByteSize()>0){var i=e.$r.get(r);i&&e.$r.set(r,i.withResumeToken(n.resumeToken,t))}})),n.targetMismatches.forEach((function(t){var n=e.$r.get(t);if(n){e.$r.set(t,n.withResumeToken(X.EMPTY_BYTE_STRING,n.snapshotVersion)),jo(e,t);var r=new Or(n.target,t,1,n.sequenceNumber);Bo(e,r)}})),e.remoteSyncer.applyRemoteEvent(n)}(e,n)]:[3,10];case 9:o.sent(),o.label=10;case 10:return[3,13];case 11:return k("RemoteStore","Failed to raise snapshot:",a=o.sent()),[4,$o(e,a)];case 12:return o.sent(),[3,13];case 13:return[2]}}
1088))}))}function $o(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(i){switch(i.label){case 0:if(!Sr(t))throw t;return e.Or.add(1),[4,Vo(e)];case 1:return i.sent(),e.Br.set("Offline"),n||(n=function(){return ji(e.localStore)}),e.asyncQueue.enqueueRetryable((function(){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return k("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return t.sent(),e.Or.delete(1),[4,Mo(e)];case 2:return t.sent(),[2]}}))}))})),[2]}}))}))}function Xo(e,t){return t().catch((function(n){return $o(e,n,t)}))}function Jo(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i,a;return __generator(this,(function(o){switch(o.label){case 0:t=P$1(e),n=us(t),r=t.kr.length>0?t.kr[t.kr.length-1].batchId:-1,o.label=1;case 1:if(!function(e){return Go(e)&&e.kr.length<10}(t))return[3,7];o.label=2;case 2:return o.trys.push([2,4,,6]),[4,Gi(t.localStore,r)];case 3:return null===(i=o.sent())?(0===t.kr.length&&n.ir(),[3,7]):(r=i.batchId,function(e,t){e.kr.push(t);var n=us(e);n.er()&&n.pr&&n.Er(t.mutations)}(t,i),[3,6]);case 4:return a=o.sent(),[4,$o(t,a)];case 5:return o.sent(),[3,6];case 6:return[3,1];case 7:return Zo(t)&&ts(t),[2]}}))}))}function Zo(e){return Go(e)&&!us(e).tr()&&e.kr.length>0}function ts(e){us(e).start()}function es(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return us(e).Ar(),[2]}))}))}function ns(e){return __awaiter(this,void 0,void 0,(function(){var t,n,r,i;return __generator(this,(function(a){for(t=us(e),n=0,r=e.kr;n<r.length;n++)i=r[n],t.Er(i.mutations);return[2]}))}))}function rs(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i;return __generator(this,(function(a){switch(a.label){case 0:return r=e.kr.shift(),i=Lr.from(r,t,n),[4,Xo(e,(function(){return e.remoteSyncer.applySuccessfulWrite(i)}))];case 1:return a.sent(),[4,Jo(e)];case 2:return a.sent(),[2]}}))}))}function is(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return t&&us(e).pr?[4,function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){switch(i.label){case 0:return Qe(r=t.code)&&r!==S.ABORTED?(n=e.kr.shift(),us(e).sr(),[4,Xo(e,(function(){return e.remoteSyncer.rejectFailedWrite(n.batchId,t)}))]):[3,3];case 1:return i.sent(),[4,Jo(e)];case 2:i.sent(),i.label=3;case 3:return[2]}}
1088))}))}(e,t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return Zo(e)&&ts(e),[2]}}))}))}function os(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){switch(r.label){case 0:return n=P$1(e),t?(n.Or.delete(2),[4,Mo(n)]):[3,2];case 1:return r.sent(),[3,5];case 2:return t?[3,4]:(n.Or.add(2),[4,Vo(n)]);case 3:r.sent(),n.Br.set("Unknown"),r.label=4;case 4:r.label=5;case 5:return[2]}}))}))}function ss(e){var t=this;return e.Ur||(e.Ur=function(e,t,n){var r=P$1(e);return r.br(),new Ro(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:Wo.bind(null,e),Ri:Ho.bind(null,e),_r:Yo.bind(null,e)}),e.Mr.push((function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return n?(e.Ur.sr(),Qo(e)?Ko(e):e.Br.set("Unknown"),[3,3]):[3,1];case 1:return[4,e.Ur.stop()];case 2:t.sent(),zo(e),t.label=3;case 3:return[2]}}))}))}))),e.Ur}function us(e){var t=this;return e.Kr||(e.Kr=function(e,t,n){var r=P$1(e);return r.br(),new Lo(t,r.Hi,r.credentials,r.R,n)}(e.datastore,e.asyncQueue,{Ii:es.bind(null,e),Ri:is.bind(null,e),Ir:ns.bind(null,e),Tr:rs.bind(null,e)}),e.Mr.push((function(n){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return n?(e.Kr.sr(),[4,Jo(e)]):[3,2];case 1:return t.sent(),[3,4];case 2:return[4,e.Kr.stop()];case 3:t.sent(),e.kr.length>0&&(k("RemoteStore","Stopping write stream with "+e.kr.length+" pending writes"),e.kr=[]),t.label=4;case 4:return[2]}}
1088))}))}))),e.Kr 1089/** 1090 * @license 1091 * Copyright 2017 Google LLC 1092 * 1093 * Licensed under the Apache License, Version 2.0 (the "License"); 1094 * you may not use this file except in compliance with the License. 1095 * You may obtain a copy of the License at 1096 * 1097 * http://www.apache.org/licenses/LICENSE-2.0 1098 * 1099 * Unless required by applicable law or agreed to in writing, software 1100 * distributed under the License is distributed on an "AS IS" BASIS, 1101 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1102 * See the License for the specific language governing permissions and 1103 * limitations under the License. 1104 */}var as=function(){function e(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new wr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch((function(e){}))}return e.createAndSchedule=function(t,n,r,i,a){var o=new e(t,n,Date.now()+r,i,a);return o.start(r),o},e.prototype.start=function(e){var t=this;this.timerHandle=setTimeout((function(){return t.handleDelayElapsed()}),e)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new N(S.CANCELLED,"Operation cancelled"+(e?": "+e:""))))},e.prototype.handleDelayElapsed=function(){var e=this;this.asyncQueue.enqueueAndForget((function(){return null!==e.timerHandle?(e.clearTimeout(),e.op().then((function(t){return e.deferred.resolve(t)}))):Promise.resolve()}))},e.prototype.clearTimeout=function(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}();function cs(e,t){if(C("AsyncQueue",t+": "+e),Sr(e))return new N(S.UNAVAILABLE,t+": "+e);throw e} 1105/** 1106 * @license 1107 * Copyright 2017 Google LLC 1108 * 1109 * Licensed under the Apache License, Version 2.0 (the "License"); 1110 * you may not use this file except in compliance with the License. 1111 * You may obtain a copy of the License at 1112 * 1113 * http://www.apache.org/licenses/LICENSE-2.0 1114 * 1115 * Unless required by applicable law or agreed to in writing, software 1116 * distributed under the License is distributed on an "AS IS" BASIS, 1117 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1118 * See the License for the specific language governing permissions and 1119 * limitations under the License. 1120 */var hs=function(){function e(e){this.comparator=e?function(t,n){return e(t,n)||at.comparator(t.key,n.key)}:function(e,t){return at.comparator(e.key,t.key)},this.keyedMap=tn(),this.sortedSet=new ze(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(e){return null!=this.keyedMap.get(e)},e.prototype.get=function(e){return this.keyedMap.get(e)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(e){var t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e){this.sortedSet.inorderTraversal((function(t,n){return e(t),!1}))},e.prototype.add=function(e){var t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))},e.prototype.delete=function(e){var t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this},e.prototype.isEqual=function(t){if(!(t instanceof e))return!1;if(this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,a=r.getNext().key;if(!i.isEqual(a))return!1}return!0},e.prototype.toString=function(){var e=[];return this.forEach((function(t){e.push(t.toString())})),0===e.length?"DocumentSet ()":"DocumentSet (\n "+e.join(" \n")+"\n)"},e.prototype.copy=function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r},e}(),fs=function(){function e(){this.Qr=new ze(at.comparator)}return e.prototype.track=function(e){var t=e.doc.key,n=this.Qr.get(t);n?0!==e.type&&3===n.type?this.Qr=this.Qr.insert(t,e):3===e.type&&1!==n.type?this.Qr=this.Qr.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Qr=this.Qr.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Qr=this.Qr.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Qr=this.Qr.remove(t):1===e.type&&2===n.type?this.Qr=this.Qr.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Qr=this.Qr.insert(t,{type:2,doc:e.doc}):L():this.Qr=this.Qr.insert(t,e)},e.prototype.jr=function(){var e=[];return this.Qr.inorderTraversal((function(t,n){e.push(n)})),e},e}(),ls=function(){function e(e,t,n,r,i,a,o,s){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=a,this.syncStateChanged=o,this.excludesMetadataChanges=s}return e.fromInitialDocuments=function(t,n,r,i){var a=[];
1120return n.forEach((function(e){a.push({type:0,doc:e})})),new e(t,n,hs.emptySet(n),a,r,i,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){if(!(this.fromCache===e.fromCache&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&re(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;var t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(t[r].type!==n[r].type||!t[r].doc.isEqual(n[r].doc))return!1;return!0},e}(),ds=function(){this.Wr=void 0,this.listeners=[]},ps=function(){this.queries=new bi((function(e){return ie(e)}),re),this.onlineState="Unknown",this.Gr=new Set}; 1121/** 1122 * @license 1123 * Copyright 2017 Google LLC 1124 * 1125 * Licensed under the Apache License, Version 2.0 (the "License"); 1126 * you may not use this file except in compliance with the License. 1127 * You may obtain a copy of the License at 1128 * 1129 * http://www.apache.org/licenses/LICENSE-2.0 1130 * 1131 * Unless required by applicable law or agreed to in writing, software 1132 * distributed under the License is distributed on an "AS IS" BASIS, 1133 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1134 * See the License for the specific language governing permissions and 1135 * limitations under the License. 1136 */function ys(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s,c;return __generator(this,(function(l){switch(l.label){case 0:if(n=P$1(e),r=t.query,i=!1,(a=n.queries.get(r))||(i=!0,a=new ds),!i)return[3,4];l.label=1;case 1:return l.trys.push([1,3,,4]),o=a,[4,n.onListen(r)];case 2:return o.Wr=l.sent(),[3,4];case 3:return s=l.sent(),c=cs(s,"Initialization of query '"+oe(t.query)+"' failed"),[2,void t.onError(c)];case 4:return n.queries.set(r,a),a.listeners.push(t),t.zr(n.onlineState),a.Wr&&t.Hr(a.Wr)&&ws(n),[2]}}))}))}function vs(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o;return __generator(this,(function(s){return n=P$1(e),r=t.query,i=!1,(a=n.queries.get(r))&&(o=a.listeners.indexOf(t))>=0&&(a.listeners.splice(o,1),i=0===a.listeners.length),i?[2,(n.queries.delete(r),n.onUnlisten(r))]:[2]}))}))}function ms(e,t){for(var n=P$1(e),r=!1,i=0,a=t;i<a.length;i++){var o=a[i],s=o.query,c=n.queries.get(s);if(c){for(var l=0,u=c.listeners;l<u.length;l++)u[l].Hr(o)&&(r=!0);c.Wr=o}}r&&ws(n)}function gs(e,t,n){var r=P$1(e),i=r.queries.get(t);if(i)for(var a=0,o=i.listeners;a<o.length;a++)o[a].onError(n);r.queries.delete(t)}function ws(e){e.Gr.forEach((function(e){e.next()}))}var bs=function(){function e(e,t,n){this.query=e,this.Jr=t,this.Yr=!1,this.Xr=null,this.onlineState="Unknown",this.options=n||{}}return e.prototype.Hr=function(e){if(!this.options.includeMetadataChanges){for(var t=[],n=0,r=e.docChanges;n<r.length;n++){var i=r[n];3!==i.type&&t.push(i)}e=new ls(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0)}var a=!1;return this.Yr?this.Zr(e)&&(this.Jr.next(e),a=!0):this.eo(e,this.onlineState)&&(this.no(e),a=!0),this.Xr=e,a},e.prototype.onError=function(e){this.Jr.error(e)},e.prototype.zr=function(e){this.onlineState=e;var t=!1;return this.Xr&&!this.Yr&&this.eo(this.Xr,e)&&(this.no(this.Xr),t=!0),t},e.prototype.eo=function(e,t){if(!e.fromCache)return!0;var n="Offline"!==t;return!(this.options.so&&n||e.docs.isEmpty()&&"Offline"!==t)},e.prototype.Zr=function(e){if(e.docChanges.length>0)return!0;var t=this.Xr&&this.Xr.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges},e.prototype.no=function(e){e=ls.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache),this.Yr=!0,this.Jr.next(e)},e}(),Ss=function(e){this.key=e},Ns=function(e){this.key=e},Ds=function(){function e(e,t){this.query=e,this.uo=t,this.ao=null,this.current=!1,this.ho=on(),this.mutatedKeys=on(),this.lo=ue(e),this.fo=new hs(this.lo)}return Object.defineProperty(e.prototype,"wo",{get:function(){return this.uo}
1136,enumerable:!1,configurable:!0}),e.prototype._o=function(e,t){var n=this,r=t?t.mo:new fs,i=t?t.fo:this.fo,a=t?t.mutatedKeys:this.mutatedKeys,o=i,s=!1,c=Yt(this.query)&&i.size===this.query.limit?i.last():null,l=$t(this.query)&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((function(e,t){var u=i.get(e),d=se(n.query,t)?t:null,p=!!u&&n.mutatedKeys.has(u.key),h=!!d&&(d.hasLocalMutations||n.mutatedKeys.has(d.key)&&d.hasCommittedMutations),f=!1;u&&d?u.data.isEqual(d.data)?p!==h&&(r.track({type:3,doc:d}),f=!0):n.yo(u,d)||(r.track({type:2,doc:d}),f=!0,(c&&n.lo(d,c)>0||l&&n.lo(d,l)<0)&&(s=!0)):!u&&d?(r.track({type:0,doc:d}),f=!0):u&&!d&&(r.track({type:1,doc:u}),f=!0,(c||l)&&(s=!0)),f&&(d?(o=o.add(d),a=h?a.add(e):a.delete(e)):(o=o.delete(e),a=a.delete(e)))})),Yt(this.query)||$t(this.query))for(;o.size>this.query.limit;){var u=Yt(this.query)?o.last():o.first();o=o.delete(u.key),a=a.delete(u.key),r.track({type:1,doc:u})}return{fo:o,mo:r,Nn:s,mutatedKeys:a}},e.prototype.yo=function(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations},e.prototype.applyChanges=function(e,t,n){var r=this,i=this.fo;this.fo=e.fo,this.mutatedKeys=e.mutatedKeys;var a=e.mo.jr();a.sort((function(e,t){return function(e,t){var n=function(e){switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return L()}};return n(e)-n(t)}(e.type,t.type)||r.lo(e.doc,t.doc)})),this.po(n);var o=t?this.Eo():[],s=0===this.ho.size&&this.current?1:0,c=s!==this.ao;return this.ao=s,0!==a.length||c?{snapshot:new ls(this.query,e.fo,i,a,e.mutatedKeys,0===s,c,!1),To:o}:{To:o}},e.prototype.zr=function(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({fo:this.fo,mo:new fs,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},e.prototype.Io=function(e){return!this.uo.has(e)&&!!this.fo.has(e)&&!this.fo.get(e).hasLocalMutations},e.prototype.po=function(e){var t=this;e&&(e.addedDocuments.forEach((function(e){return t.uo=t.uo.add(e)})),e.modifiedDocuments.forEach((function(e){})),e.removedDocuments.forEach((function(e){return t.uo=t.uo.delete(e)})),this.current=e.current)},e.prototype.Eo=function(){var e=this;if(!this.current)return[];var t=this.ho;this.ho=on(),this.fo.forEach((function(t){e.Io(t.key)&&(e.ho=e.ho.add(t.key))}));var n=[];return t.forEach((function(t){e.ho.has(t)||n.push(new Ns(t))})),this.ho.forEach((function(e){t.has(e)||n.push(new Ss(e))})),n},e.prototype.Ao=function(e){this.uo=e.Bn,this.ho=on();var t=this._o(e.documents);return this.applyChanges(t,!0)},e.prototype.Ro=function(){return ls.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,0===this.ao)},e}(),As=function(e,t,n){this.query=e,this.targetId=t,this.view=n},ks=function(e){this.key=e,this.bo=!1},Cs=function(){function e(e,t,n,r,i,a){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=a,this.vo={},this.Po=new bi((function(e){return ie(e)}),re),this.Vo=new Map,this.So=new Set,this.Do=new ze(at.comparator),this.Co=new Map,this.No=new eo,this.xo={},this.Fo=new Map,this.ko=ai.Yt(),this.onlineState="Unknown",this.$o=void 0}return Object.defineProperty(e.prototype,"isPrimaryClient",{get:function(){return!0===this.$o},enumerable:!1,configurable:!0}),e}(); 1137/** 1138 * @license 1139 * Copyright 2017 Google LLC 1140 * 1141 * Licensed under the Apache License, Version 2.0 (the "License"); 1142 * you may not use this file except in compliance with the License. 1143 * You may obtain a copy of the License at 1144 * 1145 * http://www.apache.org/licenses/LICENSE-2.0 1146 * 1147 * Unless required by applicable law or agreed to in writing, software 1148 * distributed under the License is distributed on an "AS IS" BASIS, 1149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1150 * See the License for the specific language governing permissions and 1151 * limitations under the License. 1152 */function xs(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:return n=su(e),
1152(a=n.Po.get(t))?(r=a.targetId,n.sharedClientState.addLocalQueryTarget(r),i=a.view.Ro(),[3,4]):[3,1];case 1:return[4,zi(n.localStore,ee(t))];case 2:return o=c.sent(),s=n.sharedClientState.addLocalQueryTarget(o.targetId),r=o.targetId,[4,Rs(n,t,r,"current"===s)];case 3:i=c.sent(),n.isPrimaryClient&&qo(n.remoteStore,o),c.label=4;case 4:return[2,i]}}))}))}function Rs(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var i,a,o,s,c,l;return __generator(this,(function(u){switch(u.label){case 0:return e.Oo=function(t,n,r){return function(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var i,a,o;return __generator(this,(function(s){switch(s.label){case 0:return(i=t.view._o(n)).Nn?[4,Hi(e.localStore,t.query,!1).then((function(e){var n=e.documents;return t.view._o(n,i)}))]:[3,2];case 1:i=s.sent(),s.label=2;case 2:return a=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,a),[2,(Gs(e,t.targetId,o.To),o.snapshot)]}}))}))}(e,t,n,r)},[4,Hi(e.localStore,t,!0)];case 1:return i=u.sent(),a=new Ds(t,i.Bn),o=a._o(i.documents),s=cn.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState),c=a.applyChanges(o,e.isPrimaryClient,s),Gs(e,n,c.To),l=new As(t,n,a),[2,(e.Po.set(t,l),e.Vo.has(n)?e.Vo.get(n).push(t):e.Vo.set(n,[t]),c.snapshot)]}}))}))}function Ls(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:return n=P$1(e),r=n.Po.get(t),(i=n.Vo.get(r.targetId)).length>1?[2,(n.Vo.set(r.targetId,i.filter((function(e){return!re(e,t)}))),void n.Po.delete(t))]:n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)?[3,2]:[4,Wi(n.localStore,r.targetId,!1).then((function(){n.sharedClientState.clearQueryState(r.targetId),Uo(n.remoteStore,r.targetId),Ks(n,r.targetId)})).catch(di)]):[3,3];case 1:a.sent(),a.label=2;case 2:return[3,5];case 3:return Ks(n,r.targetId),[4,Wi(n.localStore,r.targetId,!0)];case 4:a.sent(),a.label=5;case 5:return[2]}}
1152))}))}function Os(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o;return __generator(this,(function(s){switch(s.label){case 0:r=uu(e),s.label=1;case 1:return s.trys.push([1,5,,6]),[4,function(e,t){var n,r=P$1(e),i=B.now(),a=t.reduce((function(e,t){return e.add(t.key)}),on());return r.persistence.runTransaction("Locally write mutations","readwrite",(function(e){return r.Mn.pn(e,a).next((function(a){n=a;for(var o=[],s=0,c=t;s<c.length;s++){var l=c[s],u=xe(l,n.get(l.key));null!=u&&o.push(new Pe(l.key,u,_t(u.value.mapValue),Ne.exists(!0)))}return r._n.addMutationBatch(e,i,o,t)}))})).then((function(e){return e.applyToLocalDocumentSet(n),{batchId:e.batchId,changes:n}}))}(r.localStore,t)];case 2:return i=s.sent(),r.sharedClientState.addPendingMutation(i.batchId),function(e,t,n){var r=e.xo[e.currentUser.toKey()];r||(r=new ze(V)),r=r.insert(t,n),e.xo[e.currentUser.toKey()]=r}(r,i.batchId,n),[4,Hs(r,i.changes)];case 3:return s.sent(),[4,Jo(r.remoteStore)];case 4:return s.sent(),[3,6];case 5:return a=s.sent(),o=cs(a,"Failed to persist write"),n.reject(o),[3,6];case 6:return[2]}}
1152))}))}function Ps(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){switch(i.label){case 0:n=P$1(e),i.label=1;case 1:return i.trys.push([1,4,,6]),[4,Ki(n.localStore,t)];case 2:return r=i.sent(),t.targetChanges.forEach((function(e,t){var r=n.Co.get(t);r&&(O(e.addedDocuments.size+e.modifiedDocuments.size+e.removedDocuments.size<=1),e.addedDocuments.size>0?r.bo=!0:e.modifiedDocuments.size>0?O(r.bo):e.removedDocuments.size>0&&(O(r.bo),r.bo=!1))})),[4,Hs(n,r,t)];case 3:return i.sent(),[3,6];case 4:return[4,di(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))}function Fs(e,t,n){var r=P$1(e);if(r.isPrimaryClient&&0===n||!r.isPrimaryClient&&1===n){var i=[];r.Po.forEach((function(e,n){var r=n.view.zr(t);r.snapshot&&i.push(r.snapshot)})),function(e,t){var n=P$1(e);n.onlineState=t;var r=!1;n.queries.forEach((function(e,n){for(var i=0,a=n.listeners;i<a.length;i++)a[i].zr(t)&&(r=!0)})),r&&ws(n)}(r.eventManager,t),i.length&&r.vo._r(i),r.onlineState=t,r.isPrimaryClient&&r.sharedCl
1152ientState.setOnlineState(t)}}function Ms(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o,s,c;return __generator(this,(function(l){switch(l.label){case 0:return(r=P$1(e)).sharedClientState.updateQueryState(t,"rejected",n),i=r.Co.get(t),(a=i&&i.key)?(o=(o=new ze(at.comparator)).insert(a,St.newNoDocument(a,j.min())),s=on().add(a),c=new an(j.min(),new Map,new Ye(V),o,s),[4,Ps(r,c)]):[3,2];case 1:return l.sent(),r.Do=r.Do.remove(a),r.Co.delete(t),Ws(r),[3,4];case 2:return[4,Wi(r.localStore,t,!1).then((function(){return Ks(r,t,n)})).catch(di)];case 3:l.sent(),l.label=4;case 4:return[2]}}))}))}function Vs(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:n=P$1(e),r=t.batch.batchId,a.label=1;case 1:return a.trys.push([1,4,,6]),[4,Bi(n.localStore,t)];case 2:return i=a.sent(),js(n,r,null),Bs(n,r),n.sharedClientState.updateMutationState(r,"acknowledged"),[4,Hs(n,i)];case 3:return a.sent(),[3,6];case 4:return[4,di(a.sent())];case 5:return a.sent(),[3,6];case 6:return[2]}}
1152))}))}function qs(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i;return __generator(this,(function(a){switch(a.label){case 0:r=P$1(e),a.label=1;case 1:return a.trys.push([1,4,,6]),[4,function(e,t){var n=P$1(e);return n.persistence.runTransaction("Reject batch","readwrite-primary",(function(e){var r;return n._n.lookupMutationBatch(e,t).next((function(t){return O(null!==t),r=t.keys(),n._n.removeMutationBatch(e,t)})).next((function(){return n._n.performConsistencyCheck(e)})).next((function(){return n.Mn.pn(e,r)}))}))}(r.localStore,t)];case 2:return i=a.sent(),js(r,t,n),Bs(r,t),r.sharedClientState.updateMutationState(t,"rejected",n),[4,Hs(r,i)];case 3:return a.sent(),[3,6];case 4:return[4,di(a.sent())];case 5:return a.sent(),[3,6];case 6:return[2]}}))}))}function Us(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o;return __generator(this,(function(s){switch(s.label){case 0:Go((n=P$1(e)).remoteStore)||k("SyncEngine","The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled."),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,function(e){var t=P$1(e);return t.persistence.runTransaction("Get highest unacknowledged batch id","readonly",(function(e){return t._n.getHighestUnacknowledgedBatchId(e)}))}(n.localStore)];case 2:return-1===(r=s.sent())?[2,void t.resolve()]:((i=n.Fo.get(r)||[]).push(t),n.Fo.set(r,i),[3,4]);case 3:return a=s.sent(),o=cs(a,"Initialization of waitForPendingWrites() operation failed"),t.reject(o),[3,4];case 4:return[2]}}
1152))}))}function Bs(e,t){(e.Fo.get(t)||[]).forEach((function(e){e.resolve()})),e.Fo.delete(t)}function js(e,t,n){var r=P$1(e),i=r.xo[r.currentUser.toKey()];if(i){var a=i.get(t);a&&(n?a.reject(n):a.resolve(),i=i.remove(t)),r.xo[r.currentUser.toKey()]=i}}function Ks(e,t,n){void 0===n&&(n=null),e.sharedClientState.removeLocalQueryTarget(t);for(var r=0,i=e.Vo.get(t);r<i.length;r++){var a=i[r];e.Po.delete(a),n&&e.vo.Mo(a,n)}e.Vo.delete(t),e.isPrimaryClient&&e.No.Zn(t).forEach((function(t){e.No.containsKey(t)||Qs(e,t)}))}function Qs(e,t){e.So.delete(t.path.canonicalString());var n=e.Do.get(t);null!==n&&(Uo(e.remoteStore,n),e.Do=e.Do.remove(t),e.Co.delete(n),Ws(e))}function Gs(e,t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r];a instanceof Ss?(e.No.addReference(a.key,t),zs(e,a)):a instanceof Ns?(k("SyncEngine","Document no longer in limbo: "+a.key),e.No.removeReference(a.key,t),e.No.containsKey(a.key)||Qs(e,a.key)):L()}}function zs(e,t){var n=t.key,r=n.path.canonicalString();e.Do.get(n)||e.So.has(r)||(k("SyncEngine","New document in limbo: "+n),e.So.add(r),Ws(e))}function Ws(e){for(;e.So.size>0&&e.Do.size<e.maxConcurrentLimboResolutions;){var t=e.So.values().next().value;e.So.delete(t);var n=new at(W.fromString(t)),r=e.ko.next();e.Co.set(r,new ks(n)),e.Do=e.Do.insert(n,r),qo(e.remoteStore,new Or(ee(Ht(n.path)),r,2,_.o))}}function Hs(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o;return __generator(this,(function(s){switch(s.label){case 0:return r=P$1(e),i=[],a=[],o=[],r.Po.isEmpty()?[3,3]:(r.Po.forEach((function(e,s){o.push(r.Oo(s,t,n).then((function(e){if(e){r.isPrimaryClient&&r.sharedCl
1152ientState.updateQueryState(s.targetId,e.fromCache?"not-current":"current"),i.push(e);var t=Fi.Pn(s.targetId,e);a.push(t)}})))})),[4,Promise.all(o)]);case 1:return s.sent(),r.vo._r(i),[4,function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s,c,l,u;return __generator(this,(function(d){switch(d.label){case 0:n=P$1(e),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,n.persistence.runTransaction("notifyLocalViewChanges","readwrite",(function(e){return br.forEach(t,(function(t){return br.forEach(t.bn,(function(r){return n.persistence.referenceDelegate.addReference(e,t.targetId,r)})).next((function(){return br.forEach(t.vn,(function(r){return n.persistence.referenceDelegate.removeReference(e,t.targetId,r)}))}))}))}))];case 2:return d.sent(),[3,4];case 3:if(!Sr(r=d.sent()))throw r;return k("LocalStore","Failed to update sequence numbers: "+r),[3,4];case 4:for(i=0,a=t;i<a.length;i++)o=a[i],s=o.targetId,o.fromCache||(c=n.Fn.get(s),l=c.snapshotVersion,u=c.withLastLimboFreeSnapshotVersion(l),n.Fn=n.Fn.insert(s,u));return[2]}}))}))}(r.localStore,a)];case 2:s.sent(),s.label=3;case 3:return[2]}}
1152))}))}function Ys(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){switch(i.label){case 0:return(n=P$1(e)).currentUser.isEqual(t)?[3,3]:(k("SyncEngine","User change. New user:",t.toKey()),[4,Ui(n.localStore,t)]);case 1:return r=i.sent(),n.currentUser=t,function(e,t){e.Fo.forEach((function(e){e.forEach((function(e){e.reject(new N(S.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))}))})),e.Fo.clear()}(n),n.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),[4,Hs(n,r.Ln)];case 2:i.sent(),i.label=3;case 3:return[2]}}))}))}function $s(e,t){var n=P$1(e),r=n.Co.get(t);if(r&&r.bo)return on().add(r.key);var i=on(),a=n.Vo.get(t);if(!a)return i;for(var o=0,s=a;o<s.length;o++){var c=s[o],l=n.Po.get(c);i=i.unionWith(l.view.wo)}return i}function Xs(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:return[4,Hi((n=P$1(e)).localStore,t.query,!0)];case 1:return r=a.sent(),i=t.view.Ao(r),[2,(n.isPrimaryClient&&Gs(n,t.targetId,i.To),i)]}}))}))}function Js(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){return[2,$i((t=P$1(e)).localStore).then((function(e){return Hs(t,e)}))]}))}))}function Zs(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var i,a;return __generator(this,(function(o){switch(o.label){case 0:return[4,function(e,t){var n=P$1(e),r=P$1(n._n);return n.persistence.runTransaction("Lookup mutation documents","readonly",(function(e){return r.jt(e,t).next((function(t){return t?n.Mn.pn(e,t):br.resolve(null)}))}))}((i=P$1(e)).localStore,t)];case 1:return null===(a=o.sent())?[3,6]:"pending"!==n?[3,3]:[4,Jo(i.remoteStore)];case 2:return o.sent(),[3,4];case 3:"acknowledged"===n||"rejected"===n?(js(i,t,r||null),Bs(i,t),function(e,t){P$1(P$1(e)._n).Gt(t)}(i.localStore,t)):L(),o.label=4;case 4:return[4,Hs(i,a)];case 5:return o.sent(),[3,7];case 6:k("SyncEngine","Cannot apply mutation batch with id: "+t),o.label=7;case 7:return[2]}}
1152))}))}function tu(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s,c,l;return __generator(this,(function(u){switch(u.label){case 0:return su(n=P$1(e)),uu(n),!0!==t||!0===n.$o?[3,3]:(r=n.sharedClientState.getAllActiveQueryTargets(),[4,eu(n,r.toArray())]);case 1:return i=u.sent(),n.$o=!0,[4,os(n.remoteStore,!0)];case 2:for(u.sent(),a=0,o=i;a<o.length;a++)s=o[a],qo(n.remoteStore,s);return[3,7];case 3:return!1!==t||!1===n.$o?[3,7]:(c=[],l=Promise.resolve(),n.Vo.forEach((function(e,t){n.sharedClientState.isLocalQueryTarget(t)?c.push(t):l=l.then((function(){return Ks(n,t),Wi(n.localStore,t,!0)})),Uo(n.remoteStore,t)})),[4,l]);case 4:return u.sent(),[4,eu(n,c)];case 5:return u.sent(),function(e){var t=P$1(e);t.Co.forEach((function(e,n){Uo(t.remoteStore,n)})),t.No.ts(),t.Co=new Map,t.Do=new ze(at.comparator)}(n),n.$o=!1,[4,os(n.remoteStore,!1)];case 6:u.sent(),u.label=7;case 7:return[2]}}))}))}function eu(e,t,n){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s,c,l,u,d,p,h,f,m;return __generator(this,(function(g){switch(g.label){case 0:n=P$1(e),r=[],i=[],a=0,o=t,g.label=1;case 1:return a<o.length?(s=o[a],c=void 0,(l=n.Vo.get(s))&&0!==l.length?[4,zi(n.localStore,ee(l[0]))]:[3,7]):[3,13];case 2:c=g.sent(),u=0,d=l,g.label=3;case 3:return u<d.length?(p=d[u],h=n.Po.get(p),[4,Xs(n,h)]):[3,6];case 4:(f=g.sent()).snapshot&&i.push(f.snapshot),g.label=5;case 5:return u++,[3,3];case 6:return[3,11];case 7:return[4,Yi(n.localStore,s)];case 8:return m=g.sent(),[4,zi(n.localStore,m)];case 9:return c=g.sent(),[4,Rs(n,nu(m),s,!1)];case 10:g.sent(),g.label=11;case 11:r.push(c),g.label=12;case 12:return a++,[3,1];case 13:return[2,(n.vo._r(i),r)]}}))}))}function nu(e){return Wt(e.path,e.collectionGroup,e.orderBy,e.filters,e.limit,"F",e.startAt,e.endAt)}function ru(e){var t=P$1(e);return P$1(P$1(t.localStore).persistence).fn()}function iu(e,t,n,r){return __awaiter(this,void 0,void 0,(function(){var i,a,o;return __generator(this,(function(s){switch(s.label){case 0:return(i=P$1(e)).$o?(k("SyncEngine","Ignoring unexpected query state notification."),[3,8]):[3,1];case 1:if(!i.Vo.has(t))return[3,8];switch(n){case"current":case"not-current":return[3,2];case"rejected":return[3,5]}return[3,7];case 2:return[4,$i(i.localStore)];case 3:return a=s.sent(),o=an.createSynthesizedRemoteEventForCurrentChange(t,"current"===n),[4,Hs(i,a,o)];case 4:return s.sent(),[3,8];case 5:return[4,Wi(i.localStore,t,!0)];case 6:return s.sent(),Ks(i,t,r),[3,8];case 7:L(),s.label=8;case 8:return[2]}}
1152))}))}function ou(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o,s,c,l,u,d,p;return __generator(this,(function(h){switch(h.label){case 0:if(!(r=su(e)).$o)return[3,10];i=0,a=t,h.label=1;case 1:return i<a.length?(o=a[i],r.Vo.has(o)?(k("SyncEngine","Adding an already active target "+o),[3,5]):[4,Yi(r.localStore,o)]):[3,6];case 2:return s=h.sent(),[4,zi(r.localStore,s)];case 3:return c=h.sent(),[4,Rs(r,nu(s),c.targetId,!1)];case 4:h.sent(),qo(r.remoteStore,c),h.label=5;case 5:return i++,[3,1];case 6:l=function(e){return __generator(this,(function(t){switch(t.label){case 0:return r.Vo.has(e)?[4,Wi(r.localStore,e,!1).then((function(){Uo(r.remoteStore,e),Ks(r,e)})).catch(di)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))},u=0,d=n,h.label=7;case 7:return u<d.length?(p=d[u],[5,l(p)]):[3,10];case 8:h.sent(),h.label=9;case 9:return u++,[3,7];case 10:return[2]}}))}))}function su(e){var t=P$1(e);return t.remoteStore.remoteSyncer.applyRemoteEvent=Ps.bind(null,t),t.remoteStore.remoteSyncer.getRemoteKeysForTarget=$s.bind(null,t),t.remoteStore.remoteSyncer.rejectListen=Ms.bind(null,t),t.vo._r=ms.bind(null,t.eventManager),t.vo.Mo=gs.bind(null,t.eventManager),t}function uu(e){var t=P$1(e);return t.remoteStore.remoteSyncer.applySuccessfulWrite=Vs.bind(null,t),t.remoteStore.remoteSyncer.rejectFailedWrite=qs.bind(null,t),t}var cu=function(){function e(){this.synchronizeTabs=!1}return e.prototype.initialize=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return this.R=ko(e.databaseInfo.databaseId),this.sharedClientState=this.Bo(e),this.persistence=this.qo(e),[4,this.persistence.start()];case 1:return t.sent(),this.gcScheduler=this.Uo(e),this.localStore=this.Ko(e),[2]}}))}))},e.prototype.Uo=function(e){return null},e.prototype.Ko=function(e){return qi(this.persistence,new Mi,e.initialUser,this.R)},e.prototype.qo=function(e){return new uo(co.bs,this.R)},e.prototype.Bo=function(e){return new Io},e.prototype.terminate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return this.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return e.sent(),[4,this.persistence.shutdown()];case 2:return e.sent(),[2]}}))}))},e}(),hu=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).Qo=t,i.cacheSizeBytes=n,i.forceOwnership=r,i.synchronizeTabs=!1,i}return __extends$1(t,e),t.prototype.initialize=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return[4,e.prototype.initialize.call(this,t)];case 1:return n.sent(),[4,Xi(this.localStore)];case 2:return n.sent(),[4,this.Qo.initialize(this,t)];case 3:return n.sent(),[4,uu(this.Qo.syncEngine)];case 4:return n.sent(),[4,Jo(this.Qo.remoteStore)];case 5:return n.sent(),[2]}}))}))},t.prototype.Ko=function(e){return qi(this.persistence,new Mi,e.initialUser,this.R)},t.prototype.Uo=function(e){var t=this.persistence.referenceDelegate.garbageCollector;return new vi(t,e.asyncQueue)},t.prototype.qo=function(e){var t=Li(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey),n=void 0!==this.cacheSizeBytes?ti.withCacheSize(this.cacheSizeBytes):ti.DEFAULT;return new Ci(this.synchronizeTabs,t,e.clientId,n,e.asyncQueue,Do(),Ao(),this.R,this.sharedClientState,!!this.forceOwnership)},t.prototype.Bo=function(e){return new Io},t}(cu),fu=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n,!1)||this).Qo=t,r.cacheSizeBytes=n,r.synchronizeTabs=!0,r}return __extends$1(t,e),t.prototype.initialize=function(t){return __awaiter(this,void 0,void 0,(function(){var n,r=this;return __generator(this,(function(i){switch(i.label){case 0:return[4,e.prototype.initialize.call(this,t)];case 1:return i.sent(),n=this.Qo.syncEngine,this.sharedClientState instanceof bo?(this.sharedClientState.syncEngine={ui:Zs.bind(null,n),ai:iu.bind(null,n),hi:ou.bind(null,n),fn:ru.bind(null,n),ci:Js.bind(null,n)},[4,this.sharedClientState.start()]):[3,3];case 2:i.sent(),i.label=3;case 3:return[4,this.persistence.He((function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,tu(this.Qo.syncEngine,e)];case 1:return t.sent(),this.gcScheduler&&(e&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):e||this.gcScheduler.stop()),[2]}}))}))}))];case 4:return i.sent(),[2]}}))}))},t.prototype.Bo=function(e){var t=Do();
1152if(!bo.yt(t))throw new N(S.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var n=Li(e.databaseInfo.databaseId,e.databaseInfo.persistenceKey);return new bo(t,e.asyncQueue,n,e.clientId,e.initialUser)},t}(hu),lu=function(){function e(){}return e.prototype.initialize=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(r){switch(r.label){case 0:return this.localStore?[3,2]:(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(e){return Fs(n.syncEngine,e,1)},this.remoteStore.remoteSyncer.handleCredentialChange=Ys.bind(null,this.syncEngine),[4,os(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},e.prototype.createEventManager=function(e){return new ps},e.prototype.createDatastore=function(e){var t,n=ko(e.databaseInfo.databaseId),r=(t=e.databaseInfo,new No(t));return function(e,t,n){return new Oo(e,t,n)}(e.credentials,r,n)},e.prototype.createRemoteStore=function(e){var t,n,r,i,a,o=this;return t=this.localStore,n=this.datastore,r=e.asyncQueue,i=function(e){return Fs(o.syncEngine,e,0)},a=To.yt()?new To:new Eo,new Fo(t,n,r,i,a)},e.prototype.createSyncEngine=function(e,t){return function(e,t,n,r,i,a,o){var s=new Cs(e,t,n,r,i,a);return o&&(s.$o=!0),s}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)},e.prototype.terminate=function(){return function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=P$1(e),k("RemoteStore","RemoteStore shutting down."),t.Or.add(5),[4,Vo(t)];case 1:return n.sent(),t.Lr.shutdown(),t.Br.set("Unknown"),[2]}}))}))}(this.remoteStore)},e}(),pu=function(){function e(e){this.observer=e,this.muted=!1}return e.prototype.next=function(e){this.observer.next&&this.jo(this.observer.next,e)},e.prototype.error=function(e){this.observer.error?this.jo(this.observer.error,e):console.error("Uncaught Error in snapshot listener:",e)},e.prototype.Wo=function(){this.muted=!0},e.prototype.jo=function(e,t){var n=this;this.muted||setTimeout((function(){n.muted||e(t)}),0)},e}(),vu=function(){function e(e){this.datastore=e,this.readVersions=new Map,this.mutations=[],this.committed=!1,this.lastWriteError=null,this.writtenDocs=new Set}return e.prototype.lookup=function(e){return __awaiter(this,void 0,void 0,(function(){var t,n=this;return __generator(this,(function(r){switch(r.label){case 0:if(this.ensureCommitNotCalled(),this.mutations.length>0)throw new N(S.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:return n=P$1(e),r=Cn(n.R)+"/documents",i={documents:t.map((function(e){return Nn(n.R,e)}))},[4,n.$i("BatchGetDocuments",r,i)];case 1:return a=c.sent(),o=new Map,a.forEach((function(e){var t=function(e,t){return"found"in t?function(e,t){O(!!t.found),t.found.name,t.found.updateTime;var n=Dn(e,t.found.name),r=Tn(t.found.updateTime),i=new Tt({mapValue:{fields:t.found.fields}});return St.newFoundDocument(n,r,i)}(e,t):"missing"in t?function(e,t){O(!!t.missing),O(!!t.readTime);var n=Dn(e,t.missing),r=Tn(t.readTime);return St.newNoDocument(n,r)}(e,t):L()}(n.R,e);o.set(t.key.toString(),t)})),s=[],[2,(t.forEach((function(e){var t=o.get(e.toString());O(!!t),s.push(t)})),s)]}}))}))}(this.datastore,e)];case 1:return[2,((t=r.sent()).forEach((function(e){return n.recordVersion(e)})),t)]}}))}))},e.prototype.set=function(e,t){this.write(t.toMutation(e,this.precondition(e))),this.writtenDocs.add(e.toString())},e.prototype.update=function(e,t){try{this.write(t.toMutation(e,this.preconditionForUpdate(e)))}catch(e){this.lastWriteError=e}this.writtenDocs.add(e.toString())}
1152,e.prototype.delete=function(e){this.write(new Be(e,this.precondition(e))),this.writtenDocs.add(e.toString())},e.prototype.commit=function(){return __awaiter(this,void 0,void 0,(function(){var e,t=this;return __generator(this,(function(n){switch(n.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return e=this.readVersions,this.mutations.forEach((function(t){e.delete(t.key.toString())})),e.forEach((function(e,n){var r=at.fromPath(n);t.mutations.push(new je(r,t.precondition(r)))})),[4,function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i;return __generator(this,(function(a){switch(a.label){case 0:return n=P$1(e),r=Cn(n.R)+"/documents",i={writes:t.map((function(e){return On(n.R,e)}))},[4,n.Ni("Commit",r,i)];case 1:return a.sent(),[2]}}))}))}(this.datastore,this.mutations)];case 1:return n.sent(),this.committed=!0,[2]}}))}))},e.prototype.recordVersion=function(e){var t;if(e.isFoundDocument())t=e.version;else{if(!e.isNoDocument())throw L();t=j.min()}var n=this.readVersions.get(e.key.toString());if(n){if(!t.isEqual(n))throw new N(S.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(e.key.toString(),t)},e.prototype.precondition=function(e){var t=this.readVersions.get(e.toString());return!this.writtenDocs.has(e.toString())&&t?Ne.updateTime(t):Ne.none()},e.prototype.preconditionForUpdate=function(e){var t=this.readVersions.get(e.toString());if(!this.writtenDocs.has(e.toString())&&t){if(t.isEqual(j.min()))throw new N(S.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return Ne.updateTime(t)}return Ne.exists(!0)},e.prototype.write=function(e){this.ensureCommitNotCalled(),this.mutations.push(e)},e.prototype.ensureCommitNotCalled=function(){},e}(),mu=function(){function e(e,t,n,r){this.asyncQueue=e,this.datastore=t,this.updateFunction=n,this.deferred=r,this.ec=5,this.Zi=new Co(this.asyncQueue,"transaction_retry")}return e.prototype.run=function(){this.ec-=1,this.nc()},e.prototype.nc=function(){var e=this;this.Zi.ji((function(){return __awaiter(e,void 0,void 0,(function(){var e,t,n=this;return __generator(this,(function(r){return e=new vu(this.datastore),(t=this.sc(e))&&t.then((function(t){n.asyncQueue.enqueueAndForget((function(){return e.commit().then((function(){n.deferred.resolve(t)})).catch((function(e){n.ic(e)}))}))})).catch((function(e){n.ic(e)})),[2]}))}))}))},e.prototype.sc=function(e){try{var t=this.updateFunction(e);return!ot(t)&&t.catch&&t.then?t:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(e){return this.deferred.reject(e),null}},e.prototype.ic=function(e){var t=this;this.ec>0&&this.rc(e)?(this.ec-=1,this.asyncQueue.enqueueAndForget((function(){return t.nc(),Promise.resolve()}))):this.deferred.reject(e)},e.prototype.rc=function(e){if("FirebaseError"===e.name){var t=e.code;return"aborted"===t||"failed-precondition"===t||!Qe(t)}return!1},e}(),gu=function(){function e(e,t,n){var r=this;this.credentials=e,this.asyncQueue=t,this.databaseInfo=n,this.user=ho.UNAUTHENTICATED,this.clientId=M.u(),this.credentialListener=function(){return Promise.resolve()},this.credentials.setChangeListener(t,(function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return k("FirestoreClient","Received user=",e.uid),[4,this.credentialListener(e)];case 1:return t.sent(),this.user=e,[2]}}))}))}))}return e.prototype.getConfiguration=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}]}))}))},e.prototype.setCredentialChangeListener=function(e){this.credentialListener=e},e.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new N(S.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.terminate=function(){var e=this;this.asyncQueue.enterRestrictedMode();var t=new wr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted((function(){return __awaiter(e,void 0,void 0,(function(){var e,n;return __generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,5,,6]),this.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:r.sent(),r.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:r.sent(),r.label=4;case 4:return this.credentials.removeChangeListener(),t.resolve(),[3,6];case 5:return e=r.sent(),n=cs(e,"Failed to shutdown persistence"),t.reject(n),[3,6];case 6:return[2]}}
1152))}))})),t.promise},e}(); 1153/** 1154 * @license 1155 * Copyright 2020 Google LLC 1156 * 1157 * Licensed under the Apache License, Version 2.0 (the "License"); 1158 * you may not use this file except in compliance with the License. 1159 * You may obtain a copy of the License at 1160 * 1161 * http://www.apache.org/licenses/LICENSE-2.0 1162 * 1163 * Unless required by applicable law or agreed to in writing, software 1164 * distributed under the License is distributed on an "AS IS" BASIS, 1165 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1166 * See the License for the specific language governing permissions and 1167 * limitations under the License. 1168 */ 1169/** 1170 * @license 1171 * Copyright 2017 Google LLC 1172 * 1173 * Licensed under the Apache License, Version 2.0 (the "License"); 1174 * you may not use this file except in compliance with the License. 1175 * You may obtain a copy of the License at 1176 * 1177 * http://www.apache.org/licenses/LICENSE-2.0 1178 * 1179 * Unless required by applicable law or agreed to in writing, software 1180 * distributed under the License is distributed on an "AS IS" BASIS, 1181 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1182 * See the License for the specific language governing permissions and 1183 * limitations under the License. 1184 */ 1185/** 1186 * @license 1187 * Copyright 2020 Google LLC 1188 * 1189 * Licensed under the Apache License, Version 2.0 (the "License"); 1190 * you may not use this file except in compliance with the License. 1191 * You may obtain a copy of the License at 1192 * 1193 * http://www.apache.org/licenses/LICENSE-2.0 1194 * 1195 * Unless required by applicable law or agreed to in writing, software 1196 * distributed under the License is distributed on an "AS IS" BASIS, 1197 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1198 * See the License for the specific language governing permissions and 1199 * limitations under the License. 1200 */ 1201function wu(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r,i=this;return __generator(this,(function(a){switch(a.label){case 0:return e.asyncQueue.verifyOperationInProgress(),k("FirestoreClient","Initializing OfflineComponentProvider"),[4,e.getConfiguration()];case 1:return n=a.sent(),[4,t.initialize(n)];case 2:return a.sent(),r=n.initialUser,e.setCredentialChangeListener((function(e){return __awaiter(i,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:return r.isEqual(e)?[3,2]:[4,Ui(t.localStore,e)];case 1:n.sent(),r=e,n.label=2;case 2:return[2]}}
1201))}))})),t.persistence.setDatabaseDeletedListener((function(){return e.terminate()})),e.offlineComponents=t,[2]}}))}))}function bu(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){switch(i.label){case 0:return e.asyncQueue.verifyOperationInProgress(),[4,Iu(e)];case 1:return n=i.sent(),k("FirestoreClient","Initializing OnlineComponentProvider"),[4,e.getConfiguration()];case 2:return r=i.sent(),[4,t.initialize(n,r)];case 3:return i.sent(),e.setCredentialChangeListener((function(e){return function(e,t){return __awaiter(this,void 0,void 0,(function(){var n,r;return __generator(this,(function(i){switch(i.label){case 0:return(n=P$1(e)).asyncQueue.verifyOperationInProgress(),k("RemoteStore","RemoteStore received new credentials"),r=Go(n),n.Or.add(3),[4,Vo(n)];case 1:return i.sent(),r&&n.Br.set("Unknown"),[4,n.remoteSyncer.handleCredentialChange(t)];case 2:return i.sent(),n.Or.delete(3),[4,Mo(n)];case 3:return i.sent(),[2]}}))}))}(t.remoteStore,e)})),e.onlineComponents=t,[2]}}))}))}function Iu(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.offlineComponents?[3,2]:(k("FirestoreClient","Using default OfflineComponentProvider"),[4,wu(e,new cu)]);case 1:t.sent(),t.label=2;case 2:return[2,e.offlineComponents]}}))}))}function Eu(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.onlineComponents?[3,2]:(k("FirestoreClient","Using default OnlineComponentProvider"),[4,bu(e,new lu)]);case 1:t.sent(),t.label=2;case 2:return[2,e.onlineComponents]}}))}))}function Tu(e){return Iu(e).then((function(e){return e.persistence}))}function _u(e){return Iu(e).then((function(e){return e.localStore}))}function Su(e){return Eu(e).then((function(e){return e.remoteStore}))}function Nu(e){return Eu(e).then((function(e){return e.syncEngine}))}function Du(e){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,Eu(e)];case 1:return t=r.sent(),[2,((n=t.eventManager).onListen=xs.bind(null,t.syncEngine),n.onUnlisten=Ls.bind(null,t.syncEngine),n)]}}))}))}function Au(e,t,n){var r=this;void 0===n&&(n={});var i=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:return r=function(e,t,n,r,i){var a=new pu({next:function(a){t.enqueueAndForget((function(){return vs(e,o)}));var s=a.docs.has(n);!s&&a.fromCache?i.reject(new N(S.UNAVAILABLE,"Failed to get document because the client is offline.")):s&&a.fromCache&&r&&"server"===r.source?i.reject(new N(S.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(a)},error:function(e){return i.reject(e)}}),o=new bs(Ht(n.path),a,{includeMetadataChanges:!0,so:!0});return ys(e,o)},[4,Du(e)];case 1:return[2,r.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}}))}))})),i.promise}function ku(e,t,n){var r=this;void 0===n&&(n={});var i=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:return r=function(e,t,n,r,i){var a=new pu({next:function(n){t.enqueueAndForget((function(){return vs(e,o)})),n.fromCache&&"server"===r.source?i.reject(new N(S.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:function(e){return i.reject(e)}}),o=new bs(n,a,{includeMetadataChanges:!0,so:!0});return ys(e,o)},[4,Du(e)];case 1:return[2,r.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}}))}))})),i.promise}var Cu=function(e,t,n,r,i,a,o,s){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=a,this.autoDetectLongPolling=o,this.useFetchStreams=s},xu=function(){function e(e,t){this.projectId=e,this.database=t||"(default)"}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return"(default)"===this.database}
1201,enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e}(),Ru=new Map,Lu=function(e,t){this.user=t,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+e},Ou=function(){function e(){this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(e,t){this.changeListener=t,e.enqueueRetryable((function(){return t(ho.UNAUTHENTICATED)}))},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),Pu=function(){function e(e){this.token=e,this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(this.token)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(e,t){var n=this;this.changeListener=t,e.enqueueRetryable((function(){return t(n.token.user)}))},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),Fu=function(){function e(e){var t=this;this.currentUser=ho.UNAUTHENTICATED,this.oc=new wr,this.cc=0,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=function(){t.cc++,t.currentUser=t.ac(),t.oc.resolve(),t.changeListener&&t.asyncQueue.enqueueRetryable((function(){return t.changeListener(t.currentUser)}))};var n=function(e){k("FirebaseCredentialsProvider","Auth detected"),t.auth=e,t.auth.addAuthTokenListener(t.uc)};e.onInit((function(e){return n(e)})),setTimeout((function(){if(!t.auth){var r=e.getImmediate({optional:!0});r?n(r):(k("FirebaseCredentialsProvider","Auth not yet detected"),t.oc.resolve())}}),0)}return e.prototype.getToken=function(){var e=this,t=this.cc,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then((function(n){return e.cc!==t?(k("FirebaseCredentialsProvider","getToken aborted due to token change."),e.getToken()):n?(O("string"==typeof n.accessToken),new Lu(n.accessToken,e.currentUser)):null})):Promise.resolve(null)},e.prototype.invalidateToken=function(){this.forceRefresh=!0},e.prototype.setChangeListener=function(e,t){var n=this;this.asyncQueue=e,this.asyncQueue.enqueueRetryable((function(){return __awaiter(n,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.oc.promise];case 1:return e.sent(),[4,t(this.currentUser)];case 2:return e.sent(),this.changeListener=t,[2]}}))}))}))},e.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=function(){return Promise.resolve()}},e.prototype.ac=function(){var e=this.auth&&this.auth.getUid();return O(null===e||"string"==typeof e),new ho(e)},e}(),Mu=function(){function e(e,t,n){this.hc=e,this.lc=t,this.fc=n,this.type="FirstParty",this.user=ho.FIRST_PARTY}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){var e={"X-Goog-AuthUser":this.lc},t=this.hc.auth.getAuthHeaderValueForFirstParty([]);return t&&(e.Authorization=t),this.fc&&(e["X-Goog-Iam-Authorization-Token"]=this.fc),e},enumerable:!1,configurable:!0}),e}(),Vu=function(){function e(e,t,n){this.hc=e,this.lc=t,this.fc=n}return e.prototype.getToken=function(){return Promise.resolve(new Mu(this.hc,this.lc,this.fc))},e.prototype.setChangeListener=function(e,t){e.enqueueRetryable((function(){return t(ho.FIRST_PARTY)}))},e.prototype.removeChangeListener=function(){},e.prototype.invalidateToken=function(){},e}(); 1202/** 1203 * @license 1204 * Copyright 2017 Google LLC 1205 * 1206 * Licensed under the Apache License, Version 2.0 (the "License"); 1207 * you may not use this file except in compliance with the License. 1208 * You may obtain a copy of the License at 1209 * 1210 * http://www.apache.org/licenses/LICENSE-2.0 1211 * 1212 * Unless required by applicable law or agreed to in writing, software 1213 * distributed under the License is distributed on an "AS IS" BASIS, 1214 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1215 * See the License for the specific language governing permissions and 1216 * limitations under the License. 1217 */function qu(e,t,n){if(!n)throw new N(S.INVALID_ARGUMENT,"Function "+e+"() cannot be called with an empty "+t+".")}function Uu(e,t){if(void 0===t)return{merge:!1};if(void 0!==t.mergeFields&&void 0!==t.merge)throw new N(S.INVALID_ARGUMENT,"Invalid options passed to function "+e+'(): You cannot specify both "merge" and "mergeFields".');return t}function Bu(e,t,n,r){if(!0===t&&!0===r)throw new N(S.INVALID_ARGUMENT,e+" and "+n+" cannot be used together.")}function ju(e){if(!at.isDocumentKey(e))throw new N(S.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+e+" has "+e.length+".")}function Ku(e){if(at.isDocumentKey(e))throw new N(S.INVALID_ARGUMENT,"Invalid collection reference. Collection references must have an odd number of segments, but "+e+" has "+e.length+".")}function Qu(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=e.substring(0,20)+"..."),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";var t=function(e){if(e.constructor){var t=/function\s+([^\s(]+)\s*\(/.exec(e.constructor.toString());if(t&&t.length>1)return t[1]}return null}(e);return t?"a custom "+t+" object":"an object"}return"function"==typeof e?"a function":L()}function Gu(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new N(S.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");var n=Qu(e);throw new N(S.INVALID_ARGUMENT,"Expected type '"+t.name+"', but it was: "+n)}return e}function zu(e,t){if(t<=0)throw new N(S.INVALID_ARGUMENT,"Function "+e+"() requires a positive number, but it was: "+t+".")} 1218/** 1219 * @license 1220 * Copyright 2020 Google LLC 1221 * 1222 * Licensed under the Apache License, Version 2.0 (the "License");
1223 * you may not use this file except in compliance with the License. 1224 * You may obtain a copy of the License at 1225 * 1226 * http://www.apache.org/licenses/LICENSE-2.0 1227 * 1228 * Unless required by applicable law or agreed to in writing, software 1229 * distributed under the License is distributed on an "AS IS" BASIS, 1230 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1231 * See the License for the specific language governing permissions and 1232 * limitations under the License. 1233 */var Wu=function(){function e(e){var t;if(void 0===e.host){if(void 0!==e.ssl)throw new N(S.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new N(S.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.useFetchStreams=!!e.useFetchStreams,Bu("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling)}return e.prototype.isEqual=function(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams},e}(),Hu=function(){function e(e,t){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Wu({}),this._settingsFrozen=!1,e instanceof xu?(this._databaseId=e,this._credentials=new Ou):(this._app=e,this._databaseId=function(e){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new N(S.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new xu(e.options.projectId)}(e),this._credentials=new Fu(t))}return Object.defineProperty(e.prototype,"app",{get:function(){if(!this._app)throw new N(S.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_terminated",{get:function(){return void 0!==this._terminateTask},enumerable:!1,configurable:!0}),e.prototype._setSettings=function(e){if(this._settingsFrozen)throw new N(S.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Wu(e),void 0!==e.credentials&&(this._credentials=function(e){if(!e)return new Ou;switch(e.type){case"gapi":var t=e.client;return O(!("object"!=typeof t||null===t||!t.auth||!t.auth.getAuthHeaderValueForFirstParty)),new Vu(t,e.sessionIndex||"0",e.iamToken||null);case"provider":return e.client;default:throw new N(S.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(e.credentials))},e.prototype._getSettings=function(){return this._settings},e.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},e.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},e.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},e.prototype._terminate=function(){return this,(e=Ru.get(this))&&(k("ComponentProvider","Removing Datastore"),Ru.delete(this),e.terminate()),Promise.resolve();var e},e}(),Yu=function(){function e(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}return Object.defineProperty(e.prototype,"_path",{get:function(){return this._key.path}
1233,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Xu(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this._key)},e}(),$u=function(){function e(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}return e.prototype.withConverter=function(t){return new e(this.firestore,t,this._query)},e}(),Xu=function(e){function t(t,n,r){var i=this;return(i=e.call(this,t,n,Ht(r))||this)._path=r,i.type="collection",i}return __extends$1(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._path.popLast();return e.isEmpty()?null:new Yu(this.firestore,null,new at(e))},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(e){return new t(this.firestore,e,this._path)},t}($u); 1234/** 1235 * @license 1236 * Copyright 2020 Google LLC 1237 * 1238 * Licensed under the Apache License, Version 2.0 (the "License"); 1239 * you may not use this file except in compliance with the License. 1240 * You may obtain a copy of the License at 1241 * 1242 * http://www.apache.org/licenses/LICENSE-2.0 1243 * 1244 * Unless required by applicable law or agreed to in writing, software 1245 * distributed under the License is distributed on an "AS IS" BASIS, 1246 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1247 * See the License for the specific language governing permissions and 1248 * limitations under the License. 1249 */function Ju(e,t){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(e=getModularInstance(e),qu("collection","path",t),e instanceof Hu)return Ku(n=W.fromString.apply(W,__spreadArray([t],r))),new Xu(e,null,n);if(!(e instanceof Yu||e instanceof Xu))throw new N(S.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return Ku(n=W.fromString.apply(W,__spreadArray([e.path],r)).child(W.fromString(t))),new Xu(e.firestore,null,n)}function Zu(e,t){for(var n,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(e=getModularInstance(e),1===arguments.length&&(t=M.u()),qu("doc","path",t),e instanceof Hu)return ju(n=W.fromString.apply(W,__spreadArray([t],r))),new Yu(e,null,new at(n));if(!(e instanceof Yu||e instanceof Xu))throw new N(S.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");return ju(n=e._path.child(W.fromString.apply(W,__spreadArray([t],r)))),new Yu(e.firestore,e instanceof Xu?e.converter:null,new at(n))}function ta(e,t){return e=getModularInstance(e),t=getModularInstance(t),(e instanceof Yu||e instanceof Xu)&&(t instanceof Yu||t instanceof Xu)&&e.firestore===t.firestore&&e.path===t.path&&e.converter===t.converter}function ea(e,t){return e=getModularInstance(e),t=getModularInstance(t),e instanceof $u&&t instanceof $u&&e.firestore===t.firestore&&re(e._query,t._query)&&e.converter===t.converter 1250/** 1251 * @license 1252 * Copyright 2020 Google LLC 1253 * 1254 * Licensed under the Apache License, Version 2.0 (the "License"); 1255 * you may not use this file except in compliance with the License. 1256 * You may obtain a copy of the License at 1257 * 1258 * http://www.apache.org/licenses/LICENSE-2.0 1259 * 1260 * Unless required by applicable law or agreed to in writing, software 1261 * distributed under the License is distributed on an "AS IS" BASIS, 1262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1263 * See the License for the specific language governing permissions and 1264 * limitations under the License. 1265 */}var na=function(){function e(){var e=this;
1265this.dc=Promise.resolve(),this.wc=[],this._c=!1,this.mc=[],this.yc=null,this.gc=!1,this.Ec=[],this.Zi=new Co(this,"async_queue_retry"),this.Tc=function(){var t=Ao();t&&k("AsyncQueue","Visibility state changed to "+t.visibilityState),e.Zi.Gi()};var t=Ao();t&&"function"==typeof t.addEventListener&&t.addEventListener("visibilitychange",this.Tc)}return Object.defineProperty(e.prototype,"isShuttingDown",{get:function(){return this._c},enumerable:!1,configurable:!0}),e.prototype.enqueueAndForget=function(e){this.enqueue(e)},e.prototype.enqueueAndForgetEvenWhileRestricted=function(e){this.Ic(),this.Ac(e)},e.prototype.enterRestrictedMode=function(){if(!this._c){this._c=!0;var e=Ao();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("visibilitychange",this.Tc)}},e.prototype.enqueue=function(e){return this.Ic(),this._c?new Promise((function(e){})):this.Ac(e)},e.prototype.enqueueRetryable=function(e){var t=this;this.enqueueAndForget((function(){return t.wc.push(e),t.Rc()}))},e.prototype.Rc=function(){return __awaiter(this,void 0,void 0,(function(){var e,t=this;return __generator(this,(function(n){switch(n.label){case 0:if(0===this.wc.length)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.wc[0]()];case 2:return n.sent(),this.wc.shift(),this.Zi.reset(),[3,4];case 3:if(!Sr(e=n.sent()))throw e;return k("AsyncQueue","Operation failed with retryable error: "+e),[3,4];case 4:this.wc.length>0&&this.Zi.ji((function(){return t.Rc()})),n.label=5;case 5:return[2]}}
1265))}))},e.prototype.Ac=function(e){var t=this,n=this.dc.then((function(){return t.gc=!0,e().catch((function(e){throw t.yc=e,t.gc=!1,C("INTERNAL UNHANDLED ERROR: ",function(e){var t=e.message||"";return e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t}(e)),e})).then((function(e){return t.gc=!1,e}))}));return this.dc=n,n},e.prototype.enqueueAfterDelay=function(e,t,n){var r=this;this.Ic(),this.Ec.indexOf(e)>-1&&(t=0);var i=as.createAndSchedule(this,e,t,n,(function(e){return r.bc(e)}));return this.mc.push(i),i},e.prototype.Ic=function(){this.yc&&L()},e.prototype.verifyOperationInProgress=function(){},e.prototype.vc=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,e=this.dc];case 1:t.sent(),t.label=2;case 2:if(e!==this.dc)return[3,0];t.label=3;case 3:return[2]}}))}))},e.prototype.Pc=function(e){for(var t=0,n=this.mc;t<n.length;t++)if(n[t].timerId===e)return!0;return!1},e.prototype.Vc=function(e){var t=this;return this.vc().then((function(){t.mc.sort((function(e,t){return e.targetTimeMs-t.targetTimeMs}));for(var n=0,r=t.mc;n<r.length;n++){var i=r[n];if(i.skipDelay(),"all"!==e&&i.timerId===e)break}return t.vc()}))},e.prototype.Sc=function(e){this.Ec.push(e)},e.prototype.bc=function(e){var t=this.mc.indexOf(e);this.mc.splice(t,1)},e}();function ra(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=e,r=0,i=["next","error","complete"];r<i.length;r++){var a=i[r];if(a in n&&"function"==typeof n[a])return!0}return!1}(e)}var oa=-1,sa=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this).type="firestore",r._queue=new na,r._persistenceKey="name"in t?t.name:"[DEFAULT]",r}return __extends$1(t,e),t.prototype._terminate=function(){return this._firestoreClient||aa(this),this._firestoreClient.terminate()},t}(Hu); 1266/** 1267 * @license 1268 * Copyright 2020 Google LLC 1269 * 1270 * Licensed under the Apache License, Version 2.0 (the "License"); 1271 * you may not use this file except in compliance with the License. 1272 * You may obtain a copy of the License at 1273 * 1274 * http://www.apache.org/licenses/LICENSE-2.0 1275 * 1276 * Unless required by applicable law or agreed to in writing, software 1277 * distributed under the License is distributed on an "AS IS" BASIS, 1278 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1279 * See the License for the specific language governing permissions and 1280 * limitations under the License. 1281 */function ua(e){return e._firestoreClient||aa(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function aa(e){var t,n=e._freezeSettings(),r=function(e,t,n,r){return new Cu(e,t,n,r.host,r.ssl,r.experimentalForceLongPolling,r.experimentalAutoDetectLongPolling,r.useFetchStreams)}(e._databaseId,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,n);e._firestoreClient=new gu(e._credentials,e._queue,r)}function ca(e,t,n){var r=this,i=new wr;return e.asyncQueue.enqueue((function(){return __awaiter(r,void 0,void 0,(function(){var r;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,wu(e,n)];case 1:return a.sent(),[4,bu(e,t)];case 2:return a.sent(),i.resolve(),[3,4];case 3:if(!function(e){return"FirebaseError"===e.name?e.code===S.FAILED_PRECONDITION||e.code===S.UNIMPLEMENTED:!("undefined"!=typeof DOMException&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(r=a.sent()))throw r;return console.warn("Error enabling offline persistence. Falling back to persistence disabled: "+r),i.reject(r),[3,4];case 4:return[2]}}
1281))}))})).then((function(){return i.promise}))}function ha(e){if(e._initialized||e._terminated)throw new N(S.FAILED_PRECONDITION,"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.")} 1282/** 1283 * @license 1284 * Copyright 2020 Google LLC 1285 * 1286 * Licensed under the Apache License, Version 2.0 (the "License"); 1287 * you may not use this file except in compliance with the License. 1288 * You may obtain a copy of the License at 1289 * 1290 * http://www.apache.org/licenses/LICENSE-2.0 1291 * 1292 * Unless required by applicable law or agreed to in writing, software 1293 * distributed under the License is distributed on an "AS IS" BASIS, 1294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1295 * See the License for the specific language governing permissions and 1296 * limitations under the License. 1297 */var fa=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;++n)if(0===e[n].length)throw new N(S.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Y(e)}return e.prototype.isEqual=function(e){return this._internalPath.isEqual(e._internalPath)},e}(),la=function(){function e(e){this._byteString=e}return e.fromBase64String=function(t){try{return new e(X.fromBase64String(t))}catch(t){throw new N(S.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}},e.fromUint8Array=function(t){return new e(X.fromUint8Array(t))},e.prototype.toBase64=function(){return this._byteString.toBase64()},e.prototype.toUint8Array=function(){return this._byteString.toUint8Array()},e.prototype.toString=function(){return"Bytes(base64: "+this.toBase64()+")"},e.prototype.isEqual=function(e){return this._byteString.isEqual(e._byteString)},e}(),da=function(e){this._methodName=e},pa=function(){function e(e,t){if(!isFinite(e)||e<-90||e>90)throw new N(S.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new N(S.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(e){return this._lat===e._lat&&this._long===e._long},e.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},e.prototype._compareTo=function(e){return V(this._lat,e._lat)||V(this._long,e._long)},e}(),ya=/^__.*__$/,va=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutation=function(e,t){return null!==this.fieldMask?new Pe(e,this.data,this.fieldMask,t,this.fieldTransforms):new Oe(e,this.data,t,this.fieldTransforms)},e}(),ma=function(){function e(e,t,n){this.data=e,this.fieldMask=t,this.fieldTransforms=n}return e.prototype.toMutation=function(e,t){return new Pe(e,this.data,this.fieldMask,t,this.fieldTransforms)},e}(); 1298/** 1299 * @license 1300 * Copyright 2020 Google LLC 1301 * 1302 * Licensed under the Apache License, Version 2.0 (the "License"); 1303 * you may not use this file except in compliance with the License. 1304 * You may obtain a copy of the License at 1305 * 1306 * http://www.apache.org/licenses/LICENSE-2.0 1307 * 1308 * Unless required by applicable law or agreed to in writing, software 1309 * distributed under the License is distributed on an "AS IS" BASIS, 1310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1311 * See the License for the specific language governing permissions and 1312 * limitations under the License. 1313 */function ga(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw L()}}var wa=function(){function e(e,t,n,r,i,a){this.settings=e,this.databaseId=t,this.R=n,this.ignoreUndefinedProperties=r,void 0===i&&this.Dc(),this.fieldTransforms=i||[],this.fieldMask=a||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path}
1313,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Cc",{get:function(){return this.settings.Cc},enumerable:!1,configurable:!0}),e.prototype.Nc=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},e.prototype.xc=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Nc({path:n,Fc:!1});return r.kc(e),r},e.prototype.$c=function(e){var t,n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.Nc({path:n,Fc:!1});return r.Dc(),r},e.prototype.Oc=function(e){return this.Nc({path:void 0,Fc:!0})},e.prototype.Mc=function(e){return qa(e,this.settings.methodName,this.settings.Lc||!1,this.path,this.settings.Bc)},e.prototype.contains=function(e){return void 0!==this.fieldMask.find((function(t){return e.isPrefixOf(t)}))||void 0!==this.fieldTransforms.find((function(t){return e.isPrefixOf(t.field)}))},e.prototype.Dc=function(){if(this.path)for(var e=0;e<this.path.length;e++)this.kc(this.path.get(e))},e.prototype.kc=function(e){if(0===e.length)throw this.Mc("Document fields must not be empty");if(ga(this.Cc)&&ya.test(e))throw this.Mc('Document fields cannot begin and end with "__"')},e}(),ba=function(){function e(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.R=n||ko(e)}return e.prototype.qc=function(e,t,n,r){return void 0===r&&(r=!1),new wa({Cc:e,methodName:t,Bc:n,path:Y.emptyPath(),Fc:!1,Lc:r},this.databaseId,this.R,this.ignoreUndefinedProperties)},e}();function Ia(e){var t=e._freezeSettings(),n=ko(e._databaseId);return new ba(e._databaseId,!!t.ignoreUndefinedProperties,n)}function Ea(e,t,n,r,i,a){void 0===a&&(a={});var o=e.qc(a.merge||a.mergeFields?2:0,t,n,i);Pa("Data must be an object, but it was:",o,r);var s,c,l=La(r,o);if(a.merge)s=new $(o.fieldMask),c=o.fieldTransforms;else if(a.mergeFields){for(var u=[],d=0,p=a.mergeFields;d<p.length;d++){var h=Fa(t,p[d],n);if(!o.contains(h))throw new N(S.INVALID_ARGUMENT,"Field '"+h+"' is specified in your field mask but missing from your input data.");Ua(u,h)||u.push(h)}s=new $(u),c=o.fieldTransforms.filter((function(e){return s.covers(e.field)}))}else s=null,c=o.fieldTransforms;return new va(new Tt(l),s,c)}var Ta=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype._toFieldTransform=function(e){if(2!==e.Cc)throw 1===e.Cc?e.Mc(this._methodName+"() can only appear at the top level of your update data"):e.Mc(this._methodName+"() cannot be used with set() unless you pass {merge:true}");return e.fieldMask.push(e.path),null},t.prototype.isEqual=function(e){return e instanceof t},t}(da);function _a(e,t,n){return new wa({Cc:3,Bc:t.settings.Bc,methodName:e._methodName,Fc:n},t.databaseId,t.R,t.ignoreUndefinedProperties)}var Sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype._toFieldTransform=function(e){return new _e(e.path,new ve)},t.prototype.isEqual=function(e){return e instanceof t},t}(da),Na=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Uc=n,r}return __extends$1(t,e),t.prototype._toFieldTransform=function(e){var t=_a(this,e,!0),n=this.Uc.map((function(e){return Ra(e,t)})),r=new me(n);return new _e(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(da),Da=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Uc=n,r}return __extends$1(t,e),t.prototype._toFieldTransform=function(e){var t=_a(this,e,!0),n=this.Uc.map((function(e){return Ra(e,t)})),r=new we(n);return new _e(e.path,r)},t.prototype.isEqual=function(e){return this===e},t}(da),Aa=function(e){function t(t,n){var r=this;return(r=e.call(this,t)||this).Kc=n,r}return __extends$1(t,e),t.prototype._toFieldTransform=function(e){var t=new Ie(e.R,fe(e.R,this.Kc));return new _e(e.path,t)},t.prototype.isEqual=function(e){return this===e},t}(da);function ka(e,t,n,r){var i=e.qc(1,t,n);Pa("Data must be an object, but it was:",i,r);var a=[],o=Tt.empty();Q(r,(function(e,r){var s=Va(t,e,n);r=getModularInstance(r);var c=i.$c(s);if(r instanceof Ta)a.push(s);else{var l=Ra(r,c);null!=l&&(a.push(s),o.set(s,l))}}));var s=new $(a);return new ma(o,s,i.fieldTransforms)}function Ca(e,t,n,r,i,a){var o=e.qc(1,t,n),s=[Fa(t,r,n)],c=[i];if(a.length%2!=0)throw new N(S.INVALID_ARGUMENT,"Function "+t+"() needs to be called with an even number of arguments that alternate between field names and values.");for(var l=0;l<a.length;l+=2)s.push(Fa(t,a[l])),c.push(a[l+1]);for(var u=[],d=Tt.empty(),p=s.length-1;p>=0;--p)if(!Ua(u,s[p])){var h=s[p],f=c[p];f=getModularInstance(f);var m=o.$c(h);if(f instanceof Ta)u.push(h);else{var g=Ra(f,m);null!=g&&(u.push(h),d.set(h,g))}}var y=new $(u);return new ma(d,y,o.fieldTransforms)}function xa(e,t,n,r){return void 0===r&&(r=!1),Ra(n,e.qc(r?4:3,t))}function Ra(e,t){if(Oa(e=getModularInstance(e)))return Pa("Unsupported field value:",t,e),La(e,t);if(e instanceof da)return function(e,t){if(!ga(t.Cc))throw t.Mc(e._methodName+"() can only be used with update(
1313) and set()");if(!t.path)throw t.Mc(e._methodName+"() is not currently supported inside arrays");var n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(e,t),null;if(void 0===e&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Fc&&4!==t.Cc)throw t.Mc("Nested arrays are not supported");return function(e,t){for(var n=[],r=0,i=0,a=e;i<a.length;i++){var o=Ra(a[i],t.Oc(r));null==o&&(o={nullValue:"NULL_VALUE"}),n.push(o),r++}return{arrayValue:{values:n}}}(e,t)}return function(e,t){if(null===(e=getModularInstance(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e)return fe(t.R,e);if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){var n=B.fromDate(e);return{timestampValue:bn(t.R,n)}}if(e instanceof B)return n=new B(e.seconds,1e3*Math.floor(e.nanoseconds/1e3)),{timestampValue:bn(t.R,n)};if(e instanceof pa)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof la)return{bytesValue:In(t.R,e._byteString)};if(e instanceof Yu){n=t.databaseId;var r=e.firestore._databaseId;if(!r.isEqual(n))throw t.Mc("Document reference is for database "+r.projectId+"/"+r.database+" but should be for database "+n.projectId+"/"+n.database);return{referenceValue:_n(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t.Mc("Unsupported field value: "+Qu(e))}(e,t)}function La(e,t){var n={};return G(e)?t.path&&t.path.length>0&&t.fieldMask.push(t.path):Q(e,(function(e,r){var i=Ra(r,t.xc(e));null!=i&&(n[e]=i)})),{mapValue:{fields:n}}}function Oa(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof B||e instanceof pa||e instanceof la||e instanceof Yu||e instanceof da)}function Pa(e,t,n){if(!Oa(n)||!function(e){return"object"==typeof e&&null!==e&&(Object.getPrototypeOf(e)===Object.prototype||null===Object.getPrototypeOf(e))}(n)){var r=Qu(n);throw"an object"===r?t.Mc(e+" a custom object"):t.Mc(e+" "+r)}}function Fa(e,t,n){if((t=getModularInstance(t))instanceof fa)return t._internalPath;if("string"==typeof t)return Va(e,t);throw qa("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}var Ma=new RegExp("[~\\*/\\[\\]]");function Va(e,t,n){if(t.search(Ma)>=0)throw qa("Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'",e,!1,void 0,n);try{return(new(fa.bind.apply(fa,__spreadArray([void 0],t.split(".")))))._internalPath}catch(r){throw qa("Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",e,!1,void 0,n)}}function qa(e,t,n,r,i){var a=r&&!r.isEmpty(),o=void 0!==i,s="Function "+t+"() called with invalid data";n&&(s+=" (via `toFirestore()`)");var c="";return(a||o)&&(c+=" (found",a&&(c+=" in field "+r),o&&(c+=" in document "+i),c+=")"),new N(S.INVALID_ARGUMENT,(s+=". ")+e+c)}function Ua(e,t){return e.some((function(e){return e.isEqual(t)}))} 1314/** 1315 * @license 1316 * Copyright 2020 Google LLC 1317 * 1318 * Licensed under the Apache License, Version 2.0 (the "License"); 1319 * you may not use this file except in compliance with the License. 1320 * You may obtain a copy of the License at 1321 * 1322 * http://www.apache.org/licenses/LICENSE-2.0 1323 * 1324 * Unless required by applicable law or agreed to in writing, software 1325 * distributed under the License is distributed on an "AS IS" BASIS, 1326 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1327 * See the License for the specific language governing permissions and 1328 * limitations under the License. 1329 */var Ba=function(){function e(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}return Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Yu(this._firestore,this._converter,this._key)},enumerable:!1,configurable:!0}),e.prototype.exists=function(){return null!==this._document},e.prototype.data=function(){if(this._document){if(this._converter){var e=new ja(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}},e.prototype.get=function(e){if(this._document){var t=this._document.data.field(Ka("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}},e}(),ja=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype.data=function(){return e.prototype.data.call(this)},t}(Ba);function Ka(e,t){return"string"==typeof t?Va(e,t):t instanceof fa?t._internalPath:t._delegate._internalPath} 1330/** 1331 * @license 1332 * Copyright 2020 Google LLC 1333 * 1334 * Licensed under the Apache License, Version 2.0 (the "License");
1335 * you may not use this file except in compliance with the License. 1336 * You may obtain a copy of the License at 1337 * 1338 * http://www.apache.org/licenses/LICENSE-2.0 1339 * 1340 * Unless required by applicable law or agreed to in writing, software 1341 * distributed under the License is distributed on an "AS IS" BASIS, 1342 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1343 * See the License for the specific language governing permissions and 1344 * limitations under the License. 1345 */var Qa=function(){function e(e,t){this.hasPendingWrites=e,this.fromCache=t}return e.prototype.isEqual=function(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache},e}(),Ga=function(e){function t(t,n,r,i,a,o){var s=this;return(s=e.call(this,t,n,r,i,o)||this)._firestore=t,s._firestoreImpl=t,s.metadata=a,s}return __extends$1(t,e),t.prototype.exists=function(){return e.prototype.exists.call(this)},t.prototype.data=function(e){if(void 0===e&&(e={}),this._document){if(this._converter){var t=new za(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}},t.prototype.get=function(e,t){if(void 0===t&&(t={}),this._document){var n=this._document.data.field(Ka("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}},t}(Ba),za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype.data=function(t){return void 0===t&&(t={}),e.prototype.data.call(this,t)},t}(Ga),Wa=function(){function e(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new Qa(r.hasPendingWrites,r.fromCache),this.query=n}return Object.defineProperty(e.prototype,"docs",{get:function(){var e=[];return this.forEach((function(t){return e.push(t)})),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this._snapshot.docs.forEach((function(r){e.call(t,new za(n._firestore,n._userDataWriter,r.key,r,new Qa(n._snapshot.mutatedKeys.has(r.key),n._snapshot.fromCache),n.query.converter))}))},e.prototype.docChanges=function(e){void 0===e&&(e={});var t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new N(S.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){var n=0;return e._snapshot.docChanges.map((function(t){return{type:"added",doc:new za(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Qa(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),oldIndex:-1,newIndex:n++}}))}var r=e._snapshot.oldDocs;return e._snapshot.docChanges.filter((function(e){return t||3!==e.type})).map((function(t){var n=new za(e._firestore,e._userDataWriter,t.doc.key,t.doc,new Qa(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,a=-1;return 0!==t.type&&(i=r.indexOf(t.doc.key),r=r.delete(t.doc.key)),1!==t.type&&(a=(r=r.add(t.doc)).indexOf(t.doc.key)),{type:Ha(t.type),doc:n,oldIndex:i,newIndex:a}}))}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges},e}();function Ha(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return L()}}function Ya(e,t){return e instanceof Ga&&t instanceof Ga?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(null===e._document?null===t._document:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof Wa&&t instanceof Wa&&e._firestore===t._firestore&&ea(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)} 1346/** 1347 * @license 1348 * Copyright 2020 Google LLC 1349 * 1350 * Licensed under the Apache License, Version 2.0 (the "License");
1351 * you may not use this file except in compliance with the License. 1352 * You may obtain a copy of the License at 1353 * 1354 * http://www.apache.org/licenses/LICENSE-2.0 1355 * 1356 * Unless required by applicable law or agreed to in writing, software 1357 * distributed under the License is distributed on an "AS IS" BASIS, 1358 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1359 * See the License for the specific language governing permissions and 1360 * limitations under the License. 1361 */function $a(e){if($t(e)&&0===e.explicitOrderBy.length)throw new N(S.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Xa=function(){};function Ja(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];e=a._apply(e)}return e}var Za=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).Qc=t,i.jc=n,i.Wc=r,i.type="where",i}return __extends$1(t,e),t.prototype._apply=function(e){var t=Ia(e.firestore),n=function(e,t,n,r,i,a,o){var s;if(i.isKeyField()){if("array-contains"===a||"array-contains-any"===a)throw new N(S.INVALID_ARGUMENT,"Invalid Query. You can't perform '"+a+"' queries on FieldPath.documentId().");if("in"===a||"not-in"===a){sc(o,a);for(var c=[],l=0,u=o;l<u.length;l++){var d=u[l];c.push(oc(r,e,d))}s={arrayValue:{values:c}}}else s=oc(r,e,o)}else"in"!==a&&"not-in"!==a&&"array-contains-any"!==a||sc(o,a),s=xa(n,"where",o,"in"===a||"not-in"===a);var p=xt.create(i,a,s);return function(e,t){if(t.g()){var n=Jt(e);if(null!==n&&!n.isEqual(t.field))throw new N(S.INVALID_ARGUMENT,"Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '"+n.toString()+"' and '"+t.field.toString()+"'");var r=Xt(e);null!==r&&uc(e,t.field,r)}var i=function(e,t){for(var n=0,r=e.filters;n<r.length;n++){var i=r[n];if(t.indexOf(i.op)>=0)return i.op}return null}(e,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(t.op));if(null!==i)throw i===t.op?new N(S.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+t.op.toString()+"' filter."):new N(S.INVALID_ARGUMENT,"Invalid query. You cannot use '"+t.op.toString()+"' filters with '"+i.toString()+"' filters.")}(e,p),p}(e._query,0,t,e.firestore._databaseId,this.Qc,this.jc,this.Wc);return new $u(e.firestore,e.converter,function(e,t){var n=e.filters.concat([t]);return new zt(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}(e._query,n))},t}(Xa),tc=function(e){function t(t,n){var r=this;return(r=e.call(this)||this).Qc=t,r.Gc=n,r.type="orderBy",r}return __extends$1(t,e),t.prototype._apply=function(e){var t=function(e,t,n){if(null!==e.startAt)throw new N(S.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new N(S.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var r=new jt(t,n);return function(e,t){if(null===Xt(e)){var n=Jt(e);null!==n&&uc(e,n,t.field)}}(e,r),r}(e._query,this.Qc,this.Gc);return new $u(e.firestore,e.converter,function(e,t){var n=e.explicitOrderBy.concat([t]);return new zt(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))},t}(Xa),ec=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.zc=n,i.Hc=r,i}return __extends$1(t,e),t.prototype._apply=function(e){return new $u(e.firestore,e.converter,ne(e._query,this.zc,this.Hc))},t}(Xa),nc=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.Jc=n,i.Yc=r,i}return __extends$1(t,e),t.prototype._apply=function(e){var t=ic(e,this.type,this.Jc,this.Yc);return new $u(e.firestore,e.converter,function(e,t){return new zt(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,t,e.endAt)}(e._query,t))},t}(Xa),rc=function(e){function t(t,n,r){var i=this;return(i=e.call(this)||this).type=t,i.Jc=n,i.Yc=r,i}return __extends$1(t,e),t.prototype._apply=function(e){var t=ic(e,this.type,this.Jc,this.Yc);return new $u(e.firestore,e.converter,function(e,t){return new zt(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),e.limit,e.limitType,e.startAt,t)}(e._query,t))},t}(Xa);function ic(e,t,n,r){if(n[0]=getModularInstance(n[0]),n[0]instanceof Ba)return function(e,t,n,r,i){if(!r)throw new N(S.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+n+"().");for(var a=[],o=0,s=te(e);o<s.length;o++){var c=s[o];if(c.field.isKeyField())a.push(vt(t,r.key));else{var l=r.data.field(c.field);if(nt(l))throw new N(S.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+c.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(null===l){var u=c.field.canonicalString();throw new N(S.INVALID_ARGUMENT,"Invalid query. You are trying to start or end a query using a document for which the field '"+u+"' (used as the orderBy) does not exist.")}a.push(l)}}return new Ut(a,i)}(e._query,e.firestore._databaseId,t,n[0]._document,r);var i=Ia(e.firestore);return function(e,t,n,r,i,a){var o=e.explicitOrderBy;if(i.length>o.length)throw new N(S.INVALID_ARGUMENT,"Too many arguments provided to "+r+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var s=[],c=0;c<i.length;c++){var l=i[c];
1361if(o[c].field.isKeyField()){if("string"!=typeof l)throw new N(S.INVALID_ARGUMENT,"Invalid query. Expected a string for document ID in "+r+"(), but got a "+typeof l);if(!Zt(e)&&-1!==l.indexOf("/"))throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying a collection and ordering by FieldPath.documentId(), the value passed to "+r+"() must be a plain document ID, but '"+l+"' contains a slash.");var u=e.path.child(W.fromString(l));if(!at.isDocumentKey(u))throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying a collection group and ordering by FieldPath.documentId(), the value passed to "+r+"() must result in a valid document path, but '"+u+"' is not because it contains an odd number of segments.");var d=new at(u);s.push(vt(t,d))}else{var p=xa(n,r,l);s.push(p)}}return new Ut(s,a)}(e._query,e.firestore._databaseId,i,t,n,r)}function oc(e,t,n){if("string"==typeof(n=getModularInstance(n))){if(""===n)throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid document ID, but it was an empty string.");if(!Zt(t)&&-1!==n.indexOf("/"))throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying a collection by FieldPath.documentId(), you must provide a plain document ID, but '"+n+"' contains a '/' character.");var r=t.path.child(W.fromString(n));if(!at.isDocumentKey(r))throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying a collection group by FieldPath.documentId(), the value provided must result in a valid document path, but '"+r+"' is not because it has an odd number of segments ("+r.length+").");return vt(e,new at(r))}if(n instanceof Yu)return vt(e,n._key);throw new N(S.INVALID_ARGUMENT,"Invalid query. When querying with FieldPath.documentId(), you must provide a valid string or a DocumentReference, but it was: "+Qu(n)+".")}function sc(e,t){if(!Array.isArray(e)||0===e.length)throw new N(S.INVALID_ARGUMENT,"Invalid Query. A non-empty array is required for '"+t.toString()+"' filters.");if(e.length>10)throw new N(S.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.")}function uc(e,t,n){if(!n.isEqual(t))throw new N(S.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")} 1362/** 1363 * @license 1364 * Copyright 2020 Google LLC 1365 * 1366 * Licensed under the Apache License, Version 2.0 (the "License"); 1367 * you may not use this file except in compliance with the License. 1368 * You may obtain a copy of the License at 1369 * 1370 * http://www.apache.org/licenses/LICENSE-2.0 1371 * 1372 * Unless required by applicable law or agreed to in writing, software 1373 * distributed under the License is distributed on an "AS IS" BASIS, 1374 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1375 * See the License for the specific language governing permissions and 1376 * limitations under the License. 1377 */var ac=function(){function e(){}return e.prototype.convertValue=function(e,t){switch(void 0===t&&(t="none"),ct(e)){case 0:return null;case 1:return e.booleanValue;case 2:return tt(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(et(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw L()}},e.prototype.convertObject=function(e,t){var n=this,r={};return Q(e.fields,(function(e,i){r[e]=n.convertValue(i,t)})),r},e.prototype.convertGeoPoint=function(e){return new pa(tt(e.latitude),tt(e.longitude))},e.prototype.convertArray=function(e,t){var n=this;return(e.values||[]).map((function(e){return n.convertValue(e,t)}))},e.prototype.convertServerTimestamp=function(e,t){switch(t){case"previous":var n=rt(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(it(e));default:return null}},e.prototype.convertTimestamp=function(e){var t=Z(e);return new B(t.seconds,t.nanos)},e.prototype.convertDocumentKey=function(e,t){var n=W.fromString(e);O(Yn(n));var r=new xu(n.get(1),n.get(3)),i=new at(n.popFirst(5));return r.isEqual(t)||C("Document "+i+" contains a document reference within a different database ("+r.projectId+"/"+r.database+") which is not supported. It will be treated as a reference in the current database ("+t.projectId+"/"+t.database+") instead."),i},e}(); 1378/** 1379 * @license 1380 * Copyright 2020 Google LLC 1381 * 1382 * Licensed under the Apache License, Version 2.0 (the "License");
1383 * you may not use this file except in compliance with the License. 1384 * You may obtain a copy of the License at 1385 * 1386 * http://www.apache.org/licenses/LICENSE-2.0 1387 * 1388 * Unless required by applicable law or agreed to in writing, software 1389 * distributed under the License is distributed on an "AS IS" BASIS, 1390 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1391 * See the License for the specific language governing permissions and 1392 * limitations under the License. 1393 */function cc(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var hc=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return __extends$1(t,e),t.prototype.convertBytes=function(e){return new la(e)},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Yu(this.firestore,null,t)},t}(ac),fc=function(){function e(e,t){this._firestore=e,this._commitHandler=t,this._mutations=[],this._committed=!1,this._dataReader=Ia(e)}return e.prototype.set=function(e,t,n){this._verifyNotCommitted();var r=lc(e,this._firestore),i=cc(r.converter,t,n),a=Ea(this._dataReader,"WriteBatch.set",r._key,i,null!==r.converter,n);return this._mutations.push(a.toMutation(r._key,Ne.none())),this},e.prototype.update=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];this._verifyNotCommitted();var a,o=lc(e,this._firestore);return a="string"==typeof(t=getModularInstance(t))||t instanceof fa?Ca(this._dataReader,"WriteBatch.update",o._key,t,n,r):ka(this._dataReader,"WriteBatch.update",o._key,t),this._mutations.push(a.toMutation(o._key,Ne.exists(!0))),this},e.prototype.delete=function(e){this._verifyNotCommitted();var t=lc(e,this._firestore);return this._mutations=this._mutations.concat(new Be(t._key,Ne.none())),this},e.prototype.commit=function(){return this._verifyNotCommitted(),this._committed=!0,this._mutations.length>0?this._commitHandler(this._mutations):Promise.resolve()},e.prototype._verifyNotCommitted=function(){if(this._committed)throw new N(S.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}(); 1394/** 1395 * @license 1396 * Copyright 2020 Google LLC 1397 * 1398 * Licensed under the Apache License, Version 2.0 (the "License"); 1399 * you may not use this file except in compliance with the License. 1400 * You may obtain a copy of the License at 1401 * 1402 * http://www.apache.org/licenses/LICENSE-2.0 1403 * 1404 * Unless required by applicable law or agreed to in writing, software 1405 * distributed under the License is distributed on an "AS IS" BASIS, 1406 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1407 * See the License for the specific language governing permissions and 1408 * limitations under the License. 1409 */function lc(e,t){if((e=getModularInstance(e)).firestore!==t)throw new N(S.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e} 1410/** 1411 * @license 1412 * Copyright 2020 Google LLC 1413 * 1414 * Licensed under the Apache License, Version 2.0 (the "License"); 1415 * you may not use this file except in compliance with the License. 1416 * You may obtain a copy of the License at 1417 * 1418 * http://www.apache.org/licenses/LICENSE-2.0 1419 * 1420 * Unless required by applicable law or agreed to in writing, software 1421 * distributed under the License is distributed on an "AS IS" BASIS, 1422 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1423 * See the License for the specific language governing permissions and 1424 * limitations under the License. 1425 */var dc=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return __extends$1(t,e),t.prototype.convertBytes=function(e){return new la(e)},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return new Yu(this.firestore,null,t)},t}(ac);function pc(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];e=Gu(e,Yu);var a=Gu(e.firestore,sa),o=Ia(a);
1425return vc(a,[("string"==typeof(t=getModularInstance(t))||t instanceof fa?Ca(o,"updateDoc",e._key,t,n,r):ka(o,"updateDoc",e._key,t)).toMutation(e._key,Ne.exists(!0))])}function yc(e){for(var t,n,r,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];e=getModularInstance(e);var o={includeMetadataChanges:!1},s=0;"object"!=typeof i[s]||ra(i[s])||(o=i[s],s++);var c,l,u,d={includeMetadataChanges:o.includeMetadataChanges};if(ra(i[s])){var p=i[s];i[s]=null===(t=p.next)||void 0===t?void 0:t.bind(p),i[s+1]=null===(n=p.error)||void 0===n?void 0:n.bind(p),i[s+2]=null===(r=p.complete)||void 0===r?void 0:r.bind(p)}if(e instanceof Yu)l=Gu(e.firestore,sa),u=Ht(e._key.path),c={next:function(t){i[s]&&i[s](mc(l,e,t))},error:i[s+1],complete:i[s+2]};else{var h=Gu(e,$u);l=Gu(h.firestore,sa),u=h._query;var f=new dc(l);c={next:function(e){i[s]&&i[s](new Wa(l,f,h,e))},error:i[s+1],complete:i[s+2]},$a(e._query)}return function(e,t,n,r){var i=this,a=new pu(r),o=new bs(t,a,n);return e.asyncQueue.enqueueAndForget((function(){return __awaiter(i,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=ys,[4,Du(e)];case 1:return[2,t.apply(void 0,[n.sent(),o])]}}))}))})),function(){a.Wo(),e.asyncQueue.enqueueAndForget((function(){return __awaiter(i,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=vs,[4,Du(e)];case 1:return[2,t.apply(void 0,[n.sent(),o])]}}))}))}))}}(ua(l),u,d,c)}function vc(e,t){return function(e,t){var n=this,r=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var n;return __generator(this,(function(i){switch(i.label){case 0:return n=Os,[4,Nu(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(ua(e),t)}function mc(e,t,n){var r=n.docs.get(t._key),i=new dc(e);return new Ga(e,i,t._key,r,new Qa(n.hasPendingWrites,n.fromCache),t.converter)} 1426/** 1427 * @license 1428 * Copyright 2020 Google LLC 1429 * 1430 * Licensed under the Apache License, Version 2.0 (the "License"); 1431 * you may not use this file except in compliance with the License. 1432 * You may obtain a copy of the License at 1433 * 1434 * http://www.apache.org/licenses/LICENSE-2.0 1435 * 1436 * Unless required by applicable law or agreed to in writing, software 1437 * distributed under the License is distributed on an "AS IS" BASIS, 1438 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1439 * See the License for the specific language governing permissions and 1440 * limitations under the License. 1441 */var gc=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this)._firestore=t,r}return __extends$1(t,e),t.prototype.get=function(t){var n=this,r=lc(t,this._firestore),i=new dc(this._firestore);return e.prototype.get.call(this,t).then((function(e){return new Ga(n._firestore,i,r._key,e._document,new Qa(!1,!1),r.converter)}))},t}(function(){function e(e,t){this._firestore=e,this._transaction=t,this._dataReader=Ia(e)}return e.prototype.get=function(e){var t=this,n=lc(e,this._firestore),r=new hc(this._firestore);return this._transaction.lookup([n._key]).then((function(e){if(!e||1!==e.length)return L();var i=e[0];if(i.isFoundDocument())return new Ba(t._firestore,r,i.key,i,n.converter);if(i.isNoDocument())return new Ba(t._firestore,r,n._key,null,n.converter);throw L()}))},e.prototype.set=function(e,t,n){var r=lc(e,this._firestore),i=cc(r.converter,t,n),a=Ea(this._dataReader,"Transaction.set",r._key,i,null!==r.converter,n);return this._transaction.set(r._key,a),this},e.prototype.update=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];var a,o=lc(e,this._firestore);return a="string"==typeof(t=getModularInstance(t))||t instanceof fa?Ca(this._dataReader,"Transaction.update",o._key,t,n,r):ka(this._dataReader,"Transaction.update",o._key,t),this._transaction.update(o._key,a),this},e.prototype.delete=function(e){var t=lc(e,this._firestore);return this._transaction.delete(t._key),this},e}()); 1442/** 1443 * @license 1444 * Copyright 2017 Google LLC 1445 * 1446 * Licensed under the Apache License, Version 2.0 (the "License");
1447 * you may not use this file except in compliance with the License. 1448 * You may obtain a copy of the License at 1449 * 1450 * http://www.apache.org/licenses/LICENSE-2.0 1451 * 1452 * Unless required by applicable law or agreed to in writing, software 1453 * distributed under the License is distributed on an "AS IS" BASIS, 1454 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1455 * See the License for the specific language governing permissions and 1456 * limitations under the License. 1457 */function wc(){if("undefined"==typeof Uint8Array)throw new N(S.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function bc(){if("undefined"==typeof atob)throw new N(S.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var Ic=function(){function e(e){this._delegate=e}return e.fromBase64String=function(t){return bc(),new e(la.fromBase64String(t))},e.fromUint8Array=function(t){return wc(),new e(la.fromUint8Array(t))},e.prototype.toBase64=function(){return bc(),this._delegate.toBase64()},e.prototype.toUint8Array=function(){return wc(),this._delegate.toUint8Array()},e.prototype.isEqual=function(e){return this._delegate.isEqual(e._delegate)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(),Ec=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(e,t){return function(e,t){ha(e=Gu(e,sa));var n=ua(e),r=e._freezeSettings(),i=new lu;return ca(n,i,new hu(i,r.cacheSizeBytes,null==t?void 0:t.forceOwnership))}(e._delegate,{forceOwnership:t})},e.prototype.enableMultiTabIndexedDbPersistence=function(e){return function(e){ha(e=Gu(e,sa));var t=ua(e),n=e._freezeSettings(),r=new lu;return ca(t,r,new fu(r,n.cacheSizeBytes))}(e._delegate)},e.prototype.clearIndexedDbPersistence=function(e){return function(e){var t=this;if(e._initialized&&!e._terminated)throw new N(S.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var n=new wr;return e._queue.enqueueAndForgetEvenWhileRestricted((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return Er.yt()?(t=e+"main",[4,Er.delete(t)]):[2,Promise.resolve()];case 1:return n.sent(),[2]}}))}))}(Li(e._databaseId,e._persistenceKey))];case 1:return r.sent(),n.resolve(),[3,3];case 2:return t=r.sent(),n.reject(t),[3,3];case 3:return[2]}}
1457))}))})),n.promise}(e._delegate)},e}(),Tc=function(){function e(e,t,n){var r=this;this._delegate=t,this.Xc=n,this.INTERNAL={delete:function(){return r.terminate()}},e instanceof xu||(this.Zc=e)}return Object.defineProperty(e.prototype,"_databaseId",{get:function(){return this._delegate._databaseId},enumerable:!1,configurable:!0}),e.prototype.settings=function(e){var t=this._delegate._getSettings();e.merge||t.host===e.host||x("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),e.merge&&delete(e=Object.assign(Object.assign({},t),e)).merge,this._delegate._setSettings(e)},e.prototype.useEmulator=function(e,t,n){void 0===n&&(n={}),function(e,t,n,r){void 0===r&&(r={});var i=(e=Gu(e,Hu))._getSettings();if("firestore.googleapis.com"!==i.host&&i.host!==t&&x("Host has been set in both settings() and useEmulator(), emulator host will be used"),e._setSettings(Object.assign(Object.assign({},i),{host:t+":"+n,ssl:!1})),r.mockUserToken){var a=createMockUserToken(r.mockUserToken),o=r.mockUserToken.sub||r.mockUserToken.user_id;if(!o)throw new N(S.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");e._credentials=new Pu(new Lu(a,new ho(o)))}}(this._delegate,e,t,n)},e.prototype.enableNetwork=function(){return function(e){var t=this;return e.asyncQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,Tu(e)];case 1:return t=r.sent(),[4,Su(e)];case 2:return n=r.sent(),[2,(t.setNetworkEnabled(!0),function(e){var t=P$1(e);return t.Or.delete(0),Mo(t)}(n))]}}))}))}))}(ua(Gu(this._delegate,sa)))},e.prototype.disableNetwork=function(){return function(e){var t=this;return e.asyncQueue.enqueue((function(){return __awaiter(t,void 0,void 0,(function(){var t,n;return __generator(this,(function(r){switch(r.label){case 0:return[4,Tu(e)];case 1:return t=r.sent(),[4,Su(e)];case 2:return n=r.sent(),[2,(t.setNetworkEnabled(!1),function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return(t=P$1(e)).Or.add(0),[4,Vo(t)];case 1:return n.sent(),t.Br.set("Offline"),[2]}}))}))}(n))]}}))}))}))}(ua(Gu(this._delegate,sa)))},e.prototype.enablePersistence=function(e){var t=!1,n=!1;return e&&Bu("synchronizeTabs",t=!!e.synchronizeTabs,"experimentalForceOwningTab",n=!!e.experimentalForceOwningTab),t?this.Xc.enableMultiTabIndexedDbPersistence(this):this.Xc.enableIndexedDbPersistence(this,n)},e.prototype.clearPersistence=function(){return this.Xc.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.Zc&&(this.Zc._removeServiceInstance("firestore"),this.Zc._removeServiceInstance("firestore-exp")),this._delegate._delete()},e.prototype.waitForPendingWrites=function(){return function(e){var t=this,n=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:return t=Us,[4,Nu(e)];case 1:return[2,t.apply(void 0,[r.sent(),n])]}}))}))})),n.promise}(ua(Gu(this._delegate,sa)))},e.prototype.onSnapshotsInSync=function(e){return function(e,t){return function(e,t){var n=this,r=new pu(t);return e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=function(e,t){P$1(e).Gr.add(t),t.next()},[4,Du(e)];case 1:return[2,t.apply(void 0,[n.sent(),r])]}}))}))})),function(){r.Wo(),e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return t=function(e,t){P$1(e).Gr.delete(t)},[4,Du(e)];case 1:return[2,t.apply(void 0,[n.sent(),r])]}}))}))}))}}(ua(e=Gu(e,sa)),ra(t)?t:{next:t})}(this._delegate,e)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.Zc)throw new N(S.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.Zc},enumerable:!1,configurable:!0}),e.prototype.collection=function(e){try{return new Vc(this,Ju(this._delegate,e))}catch(e){throw Cc(e,"collection()","Firestore.collection()")}},e.prototype.doc=function(e){try{return new kc(this,Zu(this._delegate,e))}catch(e){throw Cc(e,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(e){try{return new Pc(this,function(e,t){if(e=Gu(e,Hu),qu("collectionGroup","collection id",t),t.indexOf("/")>=0)throw new N(S.INVALID_ARGUMENT,"Invalid collection ID '"+t+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new $u(e,null,function(e){return new zt(W.emptyPath(),e)}(t))}(this._delegate,e))}catch(e){throw Cc(e,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(e){var t=this;return function(e,t){return function(e,t){var n=this,r=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var n;return __generator(this,(function(i){switch(i.label){case 0:return[4,function(e){return Eu(e).then((function(e){return e.datastore}))}(e)];case 1:return n=i.sent(),new mu(e.asyncQueue,n,t,r).run(),[2]}}))}))})),r.promise}(ua(e),(function(n){return t(new gc(e,n))}))}(this._delegate,(function(n){return e(new Nc(t,n))}
1457))},e.prototype.batch=function(){var e=this;return ua(this._delegate),new Dc(new fc(this._delegate,(function(t){return vc(e._delegate,t)})))},e.prototype.loadBundle=function(e){throw new N(S.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(e){throw new N(S.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(),_c=function(e){function t(t){var n=this;return(n=e.call(this)||this).firestore=t,n}return __extends$1(t,e),t.prototype.convertBytes=function(e){return new Ic(new la(e))},t.prototype.convertReference=function(e){var t=this.convertDocumentKey(e,this.firestore._databaseId);return kc.tu(t,this.firestore,null)},t}(ac);function Sc(e){var t;t=e,D.setLogLevel(t)}var Nc=function(){function e(e,t){this._firestore=e,this._delegate=t,this._userDataWriter=new _c(e)}return e.prototype.get=function(e){var t=this,n=qc(e);return this._delegate.get(n).then((function(e){return new Lc(t._firestore,new Ga(t._firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,n.converter))}))},e.prototype.set=function(e,t,n){var r=qc(e);return n?(Uu("Transaction.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this},e.prototype.update=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];var o=qc(e);return 2===arguments.length?this._delegate.update(o,t):(r=this._delegate).update.apply(r,__spreadArray([o,t,n],i)),this},e.prototype.delete=function(e){var t=qc(e);return this._delegate.delete(t),this},e}(),Dc=function(){function e(e){this._delegate=e}return e.prototype.set=function(e,t,n){var r=qc(e);return n?(Uu("WriteBatch.set",n),this._delegate.set(r,t,n)):this._delegate.set(r,t),this},e.prototype.update=function(e,t,n){for(var r,i=[],a=3;a<arguments.length;a++)i[a-3]=arguments[a];var o=qc(e);return 2===arguments.length?this._delegate.update(o,t):(r=this._delegate).update.apply(r,__spreadArray([o,t,n],i)),this},e.prototype.delete=function(e){var t=qc(e);return this._delegate.delete(t),this},e.prototype.commit=function(){return this._delegate.commit()},e}(),Ac=function(){function e(e,t,n){this._firestore=e,this._userDataWriter=t,this._delegate=n}return e.prototype.fromFirestore=function(e,t){var n=new za(this._firestore._delegate,this._userDataWriter,e._key,e._document,e.metadata,null);return this._delegate.fromFirestore(new Oc(this._firestore,n),null!=t?t:{})},e.prototype.toFirestore=function(e,t){return t?this._delegate.toFirestore(e,t):this._delegate.toFirestore(e)},e.eu=function(t,n){var r=e.nu,i=r.get(t);i||(i=new WeakMap,r.set(t,i));var a=i.get(n);return a||(a=new e(t,new _c(t),n),i.set(n,a)),a},e}();Ac.nu=new WeakMap;var kc=function(){function e(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new _c(e)}return e.su=function(t,n,r){if(t.length%2!=0)throw new N(S.INVALID_ARGUMENT,"Invalid document reference. Document references must have an even number of segments, but "+t.canonicalString()+" has "+t.length);return new e(n,new Yu(n._delegate,r,new at(t)))},e.tu=function(t,n,r){return new e(n,new Yu(n._delegate,r,t))},Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Vc(this.firestore,this._delegate.parent)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),e.prototype.collection=function(e){try{return new Vc(this.firestore,Ju(this._delegate,e))}catch(e){throw Cc(e,"collection()","DocumentReference.collection()")}},e.prototype.isEqual=function(e){return(e=getModularInstance(e))instanceof Yu&&ta(this._delegate,e)},e.prototype.set=function(e,t){t=Uu("DocumentReference.set",t);try{return function(e,t,n){e=Gu(e,Yu);var r=Gu(e.firestore,sa),i=cc(e.converter,t,n);return vc(r,[Ea(Ia(r),"setDoc",e._key,i,null!==e.converter,n).toMutation(e._key,Ne.none())])}(this._delegate,e,t)}catch(e){throw Cc(e,"setDoc()","DocumentReference.set()")}},e.prototype.update=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];try{return 1===arguments.length?pc(this._delegate,e):pc.apply(void 0,__spreadArray([this._delegate,e,t],n))}
1457catch(e){throw Cc(e,"updateDoc()","DocumentReference.update()")}},e.prototype.delete=function(){return vc(Gu((e=this._delegate).firestore,sa),[new Be(e._key,Ne.none())]);var e},e.prototype.onSnapshot=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=xc(t),i=Rc(t,(function(t){return new Lc(e.firestore,new Ga(e.firestore._delegate,e._userDataWriter,t._key,t._document,t.metadata,e._delegate.converter))}));return yc(this._delegate,r,i)},e.prototype.get=function(e){var t=this;return("cache"===(null==e?void 0:e.source)?function(e){e=Gu(e,Yu);var t=Gu(e.firestore,sa),n=ua(t),r=new dc(t);return function(e,t){var n=this,r=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var n;return __generator(this,(function(i){switch(i.label){case 0:return n=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(e,t){var n=P$1(e);return n.persistence.runTransaction("read document","readonly",(function(e){return n.Mn.mn(e,t)}))}(e,t)];case 1:return(i=a.sent()).isFoundDocument()?n.resolve(i):i.isNoDocument()?n.resolve(null):n.reject(new N(S.UNAVAILABLE,"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)")),[3,3];case 2:return r=a.sent(),i=cs(r,"Failed to get document '"+t+" from cache"),n.reject(i),[3,3];case 3:return[2]}}
1457))}))},[4,_u(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(n,e._key).then((function(n){return new Ga(t,r,e._key,n,new Qa(null!==n&&n.hasLocalMutations,!0),e.converter)}))}(this._delegate):"server"===(null==e?void 0:e.source)?function(e){e=Gu(e,Yu);var t=Gu(e.firestore,sa);return Au(ua(t),e._key,{source:"server"}).then((function(n){return mc(t,e,n)}))}(this._delegate):function(e){e=Gu(e,Yu);var t=Gu(e.firestore,sa);return Au(ua(t),e._key).then((function(n){return mc(t,e,n)}))}(this._delegate)).then((function(e){return new Lc(t.firestore,new Ga(t.firestore._delegate,t._userDataWriter,e._key,e._document,e.metadata,t._delegate.converter))}))},e.prototype.withConverter=function(t){return new e(this.firestore,t?this._delegate.withConverter(Ac.eu(this.firestore,t)):this._delegate.withConverter(null))},e}();function Cc(e,t,n){return e.message=e.message.replace(t,n),e}function xc(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("object"==typeof r&&!ra(r))return r}return{}}function Rc(e,t){var n,r,i;return{next:function(e){i.next&&i.next(t(e))},error:null===(n=(i=ra(e[0])?e[0]:ra(e[1])?e[1]:"function"==typeof e[0]?{next:e[0],error:e[1],complete:e[2]}:{next:e[1],error:e[2],complete:e[3]}).error)||void 0===n?void 0:n.bind(i),complete:null===(r=i.complete)||void 0===r?void 0:r.bind(i)}}var Lc=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"ref",{get:function(){return new kc(this._firestore,this._delegate.ref)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"exists",{get:function(){return this._delegate.exists()},enumerable:!1,configurable:!0}),e.prototype.data=function(e){return this._delegate.data(e)},e.prototype.get=function(e,t){return this._delegate.get(e,t)},e.prototype.isEqual=function(e){return Ya(this._delegate,e._delegate)},e}(),Oc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends$1(t,e),t.prototype.data=function(e){return this._delegate.data(e)},t}(Lc),Pc=function(){function e(e,t){this.firestore=e,this._delegate=t,this._userDataWriter=new _c(e)}return e.prototype.where=function(t,n,r){try{return new e(this.firestore,Ja(this._delegate,function(e,t,n){var r=t,i=Ka("where",e);return new Za(i,r,n)}(t,n,r)))}catch(t){throw Cc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.orderBy=function(t,n){try{return new e(this.firestore,Ja(this._delegate,function(e,t){void 0===t&&(t="asc");var n=t,r=Ka("orderBy",e);return new tc(r,n)}(t,n)))}catch(t){throw Cc(t,/(orderBy|where)\(\)/,"Query.$1()")}},e.prototype.limit=function(t){try{return new e(this.firestore,Ja(this._delegate,function(e){return zu("limit",e),new ec("limit",e,"F")}(t)))}catch(t){throw Cc(t,"limit()","Query.limit()")}},e.prototype.limitToLast=function(t){try{return new e(this.firestore,Ja(this._delegate,function(e){return zu("limitToLast",e),new ec("limitToLast",e,"L")}(t)))}catch(t){throw Cc(t,"limitToLast()","Query.limitToLast()")}},e.prototype.startAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Ja(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new nc("startAt",e,!0)}.apply(void 0,t)))}catch(t){throw Cc(t,"startAt()","Query.startAt()")}},e.prototype.startAfter=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Ja(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new nc("startAfter",e,!1)}.apply(void 0,t)))}catch(t){throw Cc(t,"startAfter()","Query.startAfter()")}},e.prototype.endBefore=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Ja(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new rc("endBefore",e,!0)}.apply(void 0,t)))}catch(t){throw Cc(t,"endBefore()","Query.endBefore()")}},e.prototype.endAt=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return new e(this.firestore,Ja(this._delegate,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new rc("endAt",e,!1)}.apply(void 0,t)))}catch(t){throw Cc(t,"endAt()","Query.endAt()")}},e.prototype.isEqual=function(e){return ea(this._delegate,e._delegate)},e.prototype.get=function(e){var t=this;
1457return("cache"===(null==e?void 0:e.source)?function(e){e=Gu(e,$u);var t=Gu(e.firestore,sa),n=ua(t),r=new dc(t);return function(e,t){var n=this,r=new wr;return e.asyncQueue.enqueueAndForget((function(){return __awaiter(n,void 0,void 0,(function(){var n;return __generator(this,(function(i){switch(i.label){case 0:return n=function(e,t,n){return __awaiter(this,void 0,void 0,(function(){var r,i,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),[4,Hi(e,t,!0)];case 1:return s=c.sent(),r=new Ds(t,s.Bn),i=r._o(s.documents),a=r.applyChanges(i,!1),n.resolve(a.snapshot),[3,3];case 2:return o=c.sent(),s=cs(o,"Failed to execute query '"+t+" against cache"),n.reject(s),[3,3];case 3:return[2]}}))}))},[4,_u(e)];case 1:return[2,n.apply(void 0,[i.sent(),t,r])]}}))}))})),r.promise}(n,e._query).then((function(n){return new Wa(t,r,e,n)}))}(this._delegate):"server"===(null==e?void 0:e.source)?function(e){e=Gu(e,$u);var t=Gu(e.firestore,sa),n=ua(t),r=new dc(t);return ku(n,e._query,{source:"server"}).then((function(n){return new Wa(t,r,e,n)}))}(this._delegate):function(e){e=Gu(e,$u);var t=Gu(e.firestore,sa),n=ua(t),r=new dc(t);return $a(e._query),ku(n,e._query).then((function(n){return new Wa(t,r,e,n)}))}(this._delegate)).then((function(e){return new Mc(t.firestore,new Wa(t.firestore._delegate,t._userDataWriter,t._delegate,e._snapshot))}))},e.prototype.onSnapshot=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=xc(t),i=Rc(t,(function(t){return new Mc(e.firestore,new Wa(e.firestore._delegate,e._userDataWriter,e._delegate,t._snapshot))}));return yc(this._delegate,r,i)},e.prototype.withConverter=function(t){return new e(this.firestore,t?this._delegate.withConverter(Ac.eu(this.firestore,t)):this._delegate.withConverter(null))},e}(),Fc=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"type",{get:function(){return this._delegate.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return new Oc(this._firestore,this._delegate.doc)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"oldIndex",{get:function(){return this._delegate.oldIndex},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"newIndex",{get:function(){return this._delegate.newIndex},enumerable:!1,configurable:!0}),e}(),Mc=function(){function e(e,t){this._firestore=e,this._delegate=t}return Object.defineProperty(e.prototype,"query",{get:function(){return new Pc(this._firestore,this._delegate.query)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._delegate.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this._delegate.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docs",{get:function(){var e=this;return this._delegate.docs.map((function(t){return new Oc(e._firestore,t)}))},enumerable:!1,configurable:!0}),e.prototype.docChanges=function(e){var t=this;return this._delegate.docChanges(e).map((function(e){return new Fc(t._firestore,e)}))},e.prototype.forEach=function(e,t){var n=this;this._delegate.forEach((function(r){e.call(t,new Oc(n._firestore,r))}))},e.prototype.isEqual=function(e){return Ya(this._delegate,e._delegate)},e}(),Vc=function(e){function t(t,n){var r=this;return(r=e.call(this,t,n)||this).firestore=t,r._delegate=n,r}return __extends$1(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._delegate.path},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var e=this._delegate.parent;return e?new kc(this.firestore,e):null},enumerable:!1,configurable:!0}),t.prototype.doc=function(e){try{return new kc(this.firestore,void 0===e?Zu(this._delegate):Zu(this._delegate,e))}catch(e){throw Cc(e,"doc()","CollectionReference.doc()")}},t.prototype.add=function(e){var t=this;return function(e,t){var n=Gu(e.firestore,sa),r=Zu(e),i=cc(e.converter,t);
1457return vc(n,[Ea(Ia(e.firestore),"addDoc",r._key,i,null!==e.converter,{}).toMutation(r._key,Ne.exists(!1))]).then((function(){return r}))}(this._delegate,e).then((function(e){return new kc(t.firestore,e)}))},t.prototype.isEqual=function(e){return ta(this._delegate,e._delegate)},t.prototype.withConverter=function(e){return new t(this.firestore,e?this._delegate.withConverter(Ac.eu(this.firestore,e)):this._delegate.withConverter(null))},t}(Pc);function qc(e){return Gu(e,Yu)} 1458/** 1459 * @license 1460 * Copyright 2017 Google LLC 1461 * 1462 * Licensed under the Apache License, Version 2.0 (the "License"); 1463 * you may not use this file except in compliance with the License. 1464 * You may obtain a copy of the License at 1465 * 1466 * http://www.apache.org/licenses/LICENSE-2.0 1467 * 1468 * Unless required by applicable law or agreed to in writing, software 1469 * distributed under the License is distributed on an "AS IS" BASIS, 1470 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1471 * See the License for the specific language governing permissions and 1472 * limitations under the License. 1473 */var Uc=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._delegate=new(fa.bind.apply(fa,__spreadArray([void 0],e)))}return e.documentId=function(){return new e(Y.keyField().canonicalString())},e.prototype.isEqual=function(e){return(e=getModularInstance(e))instanceof fa&&this._delegate._internalPath.isEqual(e._internalPath)},e}(),Bc=function(){function e(e){this._delegate=e}return e.serverTimestamp=function(){var t=new Sa("serverTimestamp");return t._methodName="FieldValue.serverTimestamp",new e(t)},e.delete=function(){var t=new Ta("deleteField");return t._methodName="FieldValue.delete",new e(t)},e.arrayUnion=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Na("arrayUnion",e)}.apply(void 0,t);return r._methodName="FieldValue.arrayUnion",new e(r)},e.arrayRemove=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new Da("arrayRemove",e)}.apply(void 0,t);return r._methodName="FieldValue.arrayRemove",new e(r)},e.increment=function(t){var n=function(e){return new Aa("increment",e)}(t);return n._methodName="FieldValue.increment",new e(n)},e.prototype.isEqual=function(e){return this._delegate.isEqual(e._delegate)},e}(),P={Firestore:Tc,GeoPoint:pa,Timestamp:B,Blob:Ic,Transaction:Nc,WriteBatch:Dc,DocumentReference:kc,DocumentSnapshot:Lc,Query:Pc,QueryDocumentSnapshot:Oc,QuerySnapshot:Mc,CollectionReference:Vc,FieldPath:Uc,FieldValue:Bc,setLogLevel:Sc,CACHE_SIZE_UNLIMITED:oa}; 1474/** 1475 * @license 1476 * Copyright 2017 Google LLC 1477 * 1478 * Licensed under the Apache License, Version 2.0 (the "License"); 1479 * you may not use this file except in compliance with the License. 1480 * You may obtain a copy of the License at 1481 * 1482 * http://www.apache.org/licenses/LICENSE-2.0 1483 * 1484 * Unless required by applicable law or agreed to in writing, software 1485 * distributed under the License is distributed on an "AS IS" BASIS, 1486 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1487 * See the License for the specific language governing permissions and 1488 * limitations under the License. 1489 */ 1490function d(e){!function(e,t){e.INTERNAL.registerComponent(new Component("firestore",(function(e){return function(e,t){return new Tc(e,new sa(e,t),new Ec)}(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"))}),"PUBLIC").setServiceProps(Object.assign({},P)))}(e),e.registerVersion("@firebase/firestore","2.3.8")}d(firebase),function(){var e,t="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)};var n=function(e){e=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,e];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}return globalThis}(this);function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function i(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}!function(e,r){if(r){var i=n;e=e.split(".");for(var a=0;a<e.length-1;a++){var o=e[a];o in i||(i[o]={}),i=i[o]}(r=r(a=i[e=e[e.length-1]]))!=a&&null!=r&&t(i,e,{configurable:!0,writable:!0,value:r})}}("Promise",(function(e){function t(e){this.b=0,this.c=void 0,this.a=[];var t=this.f();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function r(){this.a=null}function a(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;r.prototype.b=function(e){if(null==this.a){this.a=[];var t=this;this.c((function(){t.g()}))}this.a.push(e)};var o=n.setTimeout;r.prototype.c=function(e){o(e,0)},r.prototype.g=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.f(e)}}}this.a=null},r.prototype.f=function(e){this.c((function(){throw e}))},t.prototype.f=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.m),reject:e(this.g)}}
1490,t.prototype.m=function(e){if(e===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.s(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.v(e):this.h(e)}},t.prototype.v=function(e){var t=void 0;try{t=e.then}catch(e){return void this.g(e)}"function"==typeof t?this.u(t,e):this.h(e)},t.prototype.g=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.c=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)s.b(this.a[e]);this.a=null}};var s=new r;return t.prototype.s=function(e){var t=this.f();e.Ra(t.resolve,t.reject)},t.prototype.u=function(e,t){var n=this.f();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.Ra(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.Ra=function(e,t){function n(){switch(r.b){case 1:e(r.c);break;case 2:t(r.c);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?s.b(n):this.a.push(n)},t.resolve=a,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var r=i(e),o=r.next();!o.done;o=r.next())a(o.value).Ra(t,n)}))},t.all=function(e){var n=i(e),r=n.next();return r.done?a([]):new t((function(e,t){function i(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,a(r.value).Ra(i(o.length-1),t),r=n.next()}while(!r.done)}))},t}));var a=a||{},o=this||self,s=/^[\w+/_-]+[=]{0,2}$/,c=null;function l(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&s.test(e)?e:""}function u(){}function d(e){var t=typeof e;return"object"!=t?t:e?Array.isArray(e)?"array":t:"null"}function p(e){var t=d(e);return"array"==t||"object"==t&&"number"==typeof e.length}function h(e){return"function"==d(e)}function f(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var m="closure_uid_"+(1e9*Math.random()>>>0),g=0;function y(e,t,n){return e.call.apply(e.bind,arguments)}function b(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function v(e,t,n){return(v=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?y:b).apply(null,arguments)}function A(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function _(e,t){function n(){}n.prototype=t.prototype,e.bb=t.prototype,e.prototype=new n,e.prototype.constructor=e}function x(e){return e}function k(e,t,n){this.code=S+e,this.message=t||C[e]||"",this.a=n||null}function w(e){var t=e&&e.code;return t?new k(t.substring(S.length),e.message,e.serverResponse):null}_(k,Error),k.prototype.w=function(){var e={code:this.code,message:this.message};return this.a&&(e.serverResponse=this.a),e},k.prototype.toJSON=function(){return this.w()};var T,S="auth/",C={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must al
1490ways have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invali
1490d-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},I={ld:{Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},sd:{Ua:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://securetoken.googleapis.com/v1/token",Xa:"https://identitytoolkit.googleapis.com/v2/",id:"p"},ud:{Ua:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},vd:{Ua:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",$a:"https://test-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function N(e){for(var t in I)if(I[t].id===e)return{firebaseEndpoint:(e=I[t]).Ua,secureTokenEndpoint:e.$a,identityPlatformEndpoint:e.Xa};return null}function E(e){if(!e)return!1;
1490try{return!!e.$goog_Thenable}catch(e){return!1}}function P(e){if(Error.captureStackTrace)Error.captureStackTrace(this,P);else{var t=Error().stack;t&&(this.stack=t)}e&&(this.message=String(e))}function $(e,t){for(var n="",r=(e=e.split("%s")).length-1,i=0;i<r;i++)n+=e[i]+(i<t.length?t[i]:"%s");P.call(this,n+e[r])}function R(e,t){throw new $("Failure"+(e?": "+e:""),Array.prototype.slice.call(arguments,1))}function O(e,t){this.c=e,this.f=t,this.b=0,this.a=null}function M(e,t){e.f(t),100>e.b&&(e.b++,t.next=e.a,e.a=t)}function D(){this.b=this.a=null}T=N("__EID__")?"__EID__":void 0,_(P,Error),P.prototype.name="CustomError",_($,P),$.prototype.name="AssertionError",O.prototype.get=function(){if(0<this.b){this.b--;var e=this.a;this.a=e.next,e.next=null}else e=this.c();return e};var L=new O((function(){return new B}),(function(e){e.reset()}));function U(){var e=gt,t=null;return e.a&&(t=e.a,e.a=e.a.next,e.a||(e.b=null),t.next=null),t}function B(){this.next=this.b=this.a=null}D.prototype.add=function(e,t){var n=L.get();n.set(e,t),this.b?this.b.next=n:this.a=n,this.b=n},B.prototype.set=function(e,t){this.a=e,this.b=t,this.next=null},B.prototype.reset=function(){this.next=this.b=this.a=null};var G=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(var n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return-1},j=Array.prototype.forEach?function(e,t,n){Array.prototype.forEach.call(e,t,n)}:function(e,t,n){for(var r=e.length,i="string"==typeof e?e.split(""):e,a=0;a<r;a++)a in i&&t.call(n,i[a],a,e)};var V=Array.prototype.filter?function(e,t){return Array.prototype.filter.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=[],i=0,a="string"==typeof e?e.split(""):e,o=0;o<n;o++)if(o in a){var s=a[o];t.call(void 0,s,o,e)&&(r[i++]=s)}return r},F=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var n=e.length,r=Array(n),i="string"==typeof e?e.split(""):e,a=0;a<n;a++)a in i&&(r[a]=t.call(void 0,i[a],a,e));return r},z=Array.prototype.some?function(e,t){return Array.prototype.some.call(e,t,void 0)}:function(e,t){for(var n=e.length,r="string"==typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e))return!0;return!1};function q(e,t){return 0<=G(e,t)}function W(e,t){var n;return(n=0<=(t=G(e,t)))&&Array.prototype.splice.call(e,t,1),n}function H(e,t){!function(e,t){for(var n="string"==typeof e?e.split(""):e,r=e.length-1;0<=r;--r)r in n&&t.call(void 0,n[r],r,e)}(e,(function(n,r){t.call(void 0,n,r,e)&&1==Array.prototype.splice.call(e,r,1).length&&0}))}function K(e){return Array.prototype.concat.apply([],arguments)}function Y(e){var t=e.length;if(0<t){for(var n=Array(t),r=0;r<t;r++)n[r]=e[r];return n}return[]}var Q,J=String.prototype.trim?function(e){return e.trim()}:function(e){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(e)[1]},Z=/&/g,X=/</g,ee=/>/g,te=/"/g,ne=/'/g,re=/\x00/g,ie=/[\x00&<>"']/;function ae(e,t){return-1!=e.indexOf(t)}function oe(e,t){return e<t?-1:e>t?1:0}e:{var se=o.navigator;if(se){var ce=se.userAgent;if(ce){Q=ce;break e}}Q=""}function le(e){return ae(Q,e)}function ue(e,t){for(var n in e)t.call(void 0,e[n],n,e)}function de(e){for(var t in e)return!1;return!0}function pe(e){var t,n={};for(t in e)n[t]=e[t];return n}var he="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function fe(e,t){for(var n,r,i=1;i<arguments.length;i++){for(n in r=arguments[i])e[n]=r[n];for(var a=0;a<he.length;a++)n=he[a],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function me(e,t){e:{try{var n=e&&e.ownerDocument,r=n&&(n.defaultView||n.parentWindow);if((r=r||o).Element&&r.Location){var i=r;break e}}catch(e){}i=null}if(i&&void 0!==i[t]&&(!e||!(e instanceof i[t])&&(e instanceof i.Location||e instanceof i.Element))){if(f(e))try{var a=e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e)}catch(e){a="<object could not be stringified>"}else a=void 0===e?"undefined":null===e?"null":typeof e;R("Argument is not a %s (or a non-Element, non-Location mock); got: %s",t,a)}}function ge(e,t){this.a=e===Ae&&t||"",this.b=ve}function ye(e){return e instanceof ge&&e.constructor===ge&&e.b===ve?e.a:(R("expected object of type Const, got '"+e+"'"),"type_error:Const")}ge.prototype.ta=!0,ge.prototype.sa=function(){return this.a},ge.prototype.toString=function(){return"Const{"+this.a+"}"};var be,ve={},Ae={};function _e(){if(void 0===be){var e=null,t=o.trustedTypes;if(t&&t.createPolicy){try{e=t.createPolicy("goog#html",{createHTML:x,createScript:x,createScriptURL:x})}catch(e){o.console&&o.console.error(e.message)}be=e}else be=e}return be}function xe(e,t){this.a=t===Ce?e:""}function ke(e){return e instanceof xe&&e.constructor===xe?e.a:(R("expected object of type TrustedResourceUrl, got '"+e+"' of type "+d(e)),"type_error:TrustedResourceUrl")}function we(e,t){var n=ye(e);if(!Se.test(n))throw Error("Invalid TrustedResourceUrl format: "+n);return function(e){var t=_e();return new xe(e=t?t.createScriptURL(e):e,Ce)}(e=n.replace(Te,(function(e,r){if(!Object.prototype.hasOwnProperty.call(t,r))throw Error('Found marker, "'+r+'", in format str
1490ing, "'+n+'", but no valid label mapping found in args: '+JSON.stringify(t));return(e=t[r])instanceof ge?ye(e):encodeURIComponent(String(e))})))}xe.prototype.ta=!0,xe.prototype.sa=function(){return this.a.toString()},xe.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var Te=/%{(\w+)}/g,Se=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Ce={};function Ie(e,t){this.a=t===Me?e:""}function Ne(e){return e instanceof Ie&&e.constructor===Ie?e.a:(R("expected object of type SafeUrl, got '"+e+"' of type "+d(e)),"type_error:SafeUrl")}Ie.prototype.ta=!0,Ie.prototype.sa=function(){return this.a.toString()},Ie.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Ee=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,Pe=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,$e=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function Re(e){if(e instanceof Ie)return e;if(e="object"==typeof e&&e.ta?e.sa():String(e),$e.test(e))e=new Ie(e,Me);else{var t=(e=(e=String(e)).replace(/(%0A|%0D)/g,"")).match(Pe);e=t&&Ee.test(t[1])?new Ie(e,Me):null}return e}function Oe(e){return e instanceof Ie?e:(e="object"==typeof e&&e.ta?e.sa():String(e),$e.test(e)||(e="about:invalid#zClosurez"),new Ie(e,Me))}var Me={},De=new Ie("about:invalid#zClosurez",Me);function Le(e,t,n){this.a=n===Ue?e:""}Le.prototype.ta=!0,Le.prototype.sa=function(){return this.a.toString()},Le.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var Ue={};function Be(e,t,n,r){return e=e instanceof Ie?e:Oe(e),t=t||o,n=n instanceof ge?ye(n):n||"",t.open(Ne(e),n,r,void 0)}function Ge(e,t){for(var n=e.split("%s"),r="",i=Array.prototype.slice.call(arguments,1);i.length&&1<n.length;)r+=n.shift()+i.shift();return r+n.join("%s")}function je(e){return ie.test(e)&&(-1!=e.indexOf("&")&&(e=e.replace(Z,"&")),-1!=e.indexOf("<")&&(e=e.replace(X,"<")),-1!=e.indexOf(">")&&(e=e.replace(ee,">")),-1!=e.indexOf('"')&&(e=e.replace(te,""")),-1!=e.indexOf("'")&&(e=e.replace(ne,"'")),-1!=e.indexOf("\0")&&(e=e.replace(re,"�"))),e}function Ve(e){return Ve[" "](e),e}Ve[" "]=u;var Fe,ze=le("Opera"),qe=le("Trident")||le("MSIE"),We=le("Edge"),He=We||qe,Ke=le("Gecko")&&!(ae(Q.toLowerCase(),"webkit")&&!le("Edge"))&&!(le("Trident")||le("MSIE"))&&!le("Edge"),Ye=ae(Q.toLowerCase(),"webkit")&&!le("Edge");function Qe(){var e=o.document;return e?e.documentMode:void 0}e:{var Je="",Ze=function(){var e=Q;return Ke?/rv:([^\);]+)(\)|;)/.exec(e):We?/Edge\/([\d\.]+)/.exec(e):qe?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(e):Ye?/WebKit\/(\S+)/.exec(e):ze?/(?:Version)[ \/]?(\S+)/.exec(e):void 0}();if(Ze&&(Je=Ze?Ze[1]:""),qe){var Xe=Qe();if(null!=Xe&&Xe>parseFloat(Je)){Fe=String(Xe);break e}}Fe=Je}var et,tt={};function nt(e){return function(e,t){var n=tt;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:n[e]=t(e)}(e,(function(){for(var t=0,n=J(String(Fe)).split("."),r=J(String(e)).split("."),i=Math.max(n.length,r.length),a=0;0==t&&a<i;a++){var o=n[a]||"",s=r[a]||"";do{if(o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],s=/(\d*)(\D*)(.*)/.exec(s)||["","","",""],0==o[0].length&&0==s[0].length)break;t=oe(0==o[1].length?0:parseInt(o[1],10),0==s[1].length?0:parseInt(s[1],10))||oe(0==o[2].length,0==s[2].length)||oe(o[2],s[2]),o=o[3],s=s[3]}while(0==t)}return 0<=t}))}if(o.document&&qe){var rt=Qe();et=rt||(parseInt(Fe,10)||void 0)}else et=void 0;var it=et;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(e){}var at=!qe||9<=Number(it);function ot(e){var t=document;return"string"==typeof e?t.getElementById(e):e}function st(e,t){ue(t,(function(t,n){t&&"object"==typeof t&&t.ta&&(t=t.sa()),"style"==n?e.style.cssText=t:"class"==n?e.className=t:"for"==n?e.htmlFor=t:ut.hasOwnProperty(n)?e.setAttribute(ut[n],t):0==n.lastIndexOf("aria-",0)||0==n.lastIndexOf("data-",0)?e.setAttribute(n,t):e[n]=t}))}var ct,lt,ut={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",
1490nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function dt(e,t,n){function r(n){n&&t.appendChild("string"==typeof n?e.createTextNode(n):n)}for(var i=2;i<n.length;i++){var a=n[i];if(!p(a)||f(a)&&0<a.nodeType)r(a);else{e:{if(a&&"number"==typeof a.length){if(f(a)){var o="function"==typeof a.item||"string"==typeof a.item;break e}if(h(a)){o="function"==typeof a.item;break e}}o=!1}j(o?Y(a):a,r)}}}function pt(e,t){return t=String(t),"application/xhtml+xml"===e.contentType&&(t=t.toLowerCase()),e.createElement(t)}function ht(e){o.setTimeout((function(){throw e}),0)}function ft(e,t){lt||function(){if(o.Promise&&o.Promise.resolve){var e=o.Promise.resolve(void 0);lt=function(){e.then(yt)}}else lt=function(){var e=yt;!h(o.setImmediate)||o.Window&&o.Window.prototype&&!le("Edge")&&o.Window.prototype.setImmediate==o.setImmediate?(ct||(ct=function(){var e=o.MessageChannel;if(void 0===e&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!le("Presto")&&(e=function(){var e=pt(document,"IFRAME");e.style.display="none",document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.close();var n="callImmediate"+Math.random(),r="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=v((function(e){"*"!=r&&e.origin!=r||e.data!=n||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(n,r)}}}),void 0!==e&&!le("Trident")&&!le("MSIE")){var t=new e,n={},r=n;return t.port1.onmessage=function(){if(void 0!==n.next){var e=(n=n.next).Hb;n.Hb=null,e()}},function(e){r.next={Hb:e},r=r.next,t.port2.postMessage(0)}}return function(e){o.setTimeout(e,0)}}()),ct(e)):o.setImmediate(e)}}(),mt||(lt(),mt=!0),gt.add(e,t)}var mt=!1,gt=new D;function yt(){for(var e;e=U();){try{e.a.call(e.b)}catch(e){ht(e)}M(L,e)}mt=!1}function bt(e,t){if(this.a=vt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,e!=u)try{var n=this;e.call(t,(function(e){$t(n,At,e)}),(function(e){if(!(e instanceof Bt))try{if(e instanceof Error)throw e;throw Error("Promise rejected.")}catch(e){}$t(n,_t,e)}))}catch(e){$t(this,_t,e)}}var vt=0,At=2,_t=3;function xt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}xt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var kt=new O((function(){return new xt}),(function(e){e.reset()}));function wt(e,t,n){var r=kt.get();return r.g=e,r.b=t,r.f=n,r}function Tt(e){if(e instanceof bt)return e;var t=new bt(u);return $t(t,At,e),t}function St(e){return new bt((function(t,n){n(e)}))}function Ct(e,t,n){Rt(e,t,n,null)||ft(A(t,e))}function It(e){return new bt((function(t){var n=e.length,r=[];if(n)for(var i=function(e,i,a){n--,r[e]=i?{Qb:!0,value:a}:{Qb:!1,reason:a},0==n&&t(r)},a=0;a<e.length;a++)Ct(e[a],A(i,a,!0),A(i,a,!1));else t(r)}))}function Nt(e,t){if(e.a==vt)if(e.c){var n=e.c;if(n.b){for(var r=0,i=null,a=null,o=n.b;o&&(o.c||(r++,o.a==e&&(i=o),!(i&&1<r)));o=o.next)i||(a=o);i&&(n.a==vt&&1==r?Nt(n,t):(a?((r=a).next==n.f&&(n.f=r),r.next=r.next.next):Mt(n),Dt(n,i,_t,t)))}e.c=null}else $t(e,_t,t)}function Et(e,t){e.b||e.a!=At&&e.a!=_t||Ot(e),e.f?e.f.next=t:e.b=t,e.f=t}function Pt(e,t,n,r){var i=wt(null,null,null);return i.a=new bt((function(e,a){i.g=t?function(n){try{var i=t.call(r,n);e(i)}catch(e){a(e)}}:e,i.b=n?function(t){try{var i=n.call(r,t);void 0===i&&t instanceof Bt?a(t):e(i)}catch(e){a(e)}}:a})),i.a.c=e,Et(e,i),i.a}function $t(e,t,n){e.a==vt&&(e===n&&(t=_t,n=new TypeError("Promise cannot resolve to itself")),e.a=1,Rt(n,e.$c,e.ad,e)||(e.i=n,e.a=t,e.c=null,Ot(e),t!=_t||n instanceof Bt||function(e,t){e.g=!0,ft((function(){e.g&&Ut.call(null,t)}))}(e,n)))}function Rt(e,t,n,r){if(e instanceof bt)return Et(e,wt(t||u,n||null,r)),!0;if(E(e))return e.then(t,n,r),!0;if(f(e))try{var i=e.then;if(h(i))return function(e,t,n,r,i){function a(e){s||(s=!0,r.call(i,e))}function o(e){s||(s=!0,n.call(i,e))}var s=!1;try{t.call(e,o,a)}catch(e){a(e)}}(e,i,t,n,r),!0}catch(e){return n.call(r,e),!0}return!1}function Ot(e){e.h||(e.h=!0,ft(e.gc,e))}function Mt(e){var t=null;return e.b&&(t=e.b,e.b=t.next,t.next=null),e.b||(e.f=null),t}function Dt(e,t,n,r){if(n==_t&&t.b&&!t.c)for(;e&&e.g;e=e.c)e.g=!1;if(t.a)t.a.c=null,Lt(t,n,r);else try{t.c?t.g.call(t.f):Lt(t,n,r)}catch(e){Ut.call(null,e)}M(kt,t)}function Lt(e,t,n){t==At?e.g.call(e.f,n):e.b&&e.b.call(e.f,n)}bt.prototype.then=function(e,t,n){return Pt(this,h(e)?e:null,h(t)?t:null,n)}
1490,bt.prototype.$goog_Thenable=!0,(e=bt.prototype).oa=function(e,t){return(e=wt(e,e,t)).c=!0,Et(this,e),this},e.o=function(e,t){return Pt(this,null,e,t)},e.cancel=function(e){if(this.a==vt){var t=new Bt(e);ft((function(){Nt(this,t)}),this)}},e.$c=function(e){this.a=vt,$t(this,At,e)},e.ad=function(e){this.a=vt,$t(this,_t,e)},e.gc=function(){for(var e;e=Mt(this);)Dt(this,e,this.a,this.i);this.h=!1};var Ut=ht;function Bt(e){P.call(this,e)}function Gt(){this.ya=this.ya,this.pa=this.pa}_(Bt,P),Bt.prototype.name="cancel";var jt={};function Vt(e){if(!e.ya&&(e.ya=!0,e.Da(),0)){var t=function(e){return Object.prototype.hasOwnProperty.call(e,m)&&e[m]||(e[m]=++g)}(e);delete jt[t]}}Gt.prototype.ya=!1,Gt.prototype.Da=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var Ft=Object.freeze||function(e){return e},zt=!qe||9<=Number(it),qt=qe&&!nt("9"),Wt=function(){if(!o.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{o.addEventListener("test",u,t),o.removeEventListener("test",u,t)}catch(e){}return e}();function Ht(e,t){this.type=e,this.b=this.target=t,this.defaultPrevented=!1}function Kt(e,t){if(Ht.call(this,e?e.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.b=t,t=e.relatedTarget){if(Ke){e:{try{Ve(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:Yt[e.pointerType]||"",this.a=e,e.defaultPrevented&&this.preventDefault()}}Ht.prototype.preventDefault=function(){this.defaultPrevented=!0},_(Kt,Ht);var Yt=Ft({2:"touch",3:"pen",4:"mouse"});Kt.prototype.preventDefault=function(){Kt.bb.preventDefault.call(this);var e=this.a;if(e.preventDefault)e.preventDefault();else if(e.returnValue=!1,qt)try{(e.ctrlKey||112<=e.keyCode&&123>=e.keyCode)&&(e.keyCode=-1)}catch(e){}},Kt.prototype.g=function(){return this.a};var Qt="closure_listenable_"+(1e6*Math.random()|0),Jt=0;function Zt(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.Wa=i,this.key=++Jt,this.wa=this.Qa=!1}function Xt(e){e.wa=!0,e.listener=null,e.proxy=null,e.src=null,e.Wa=null}function en(e){this.src=e,this.a={},this.b=0}function tn(e,t){var n=t.type;n in e.a&&W(e.a[n],t)&&(Xt(t),0==e.a[n].length&&(delete e.a[n],e.b--))}function nn(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i];if(!a.wa&&a.listener==t&&a.capture==!!n&&a.Wa==r)return i}return-1}en.prototype.add=function(e,t,n,r,i){var a=e.toString();(e=this.a[a])||(e=this.a[a]=[],this.b++);var o=nn(e,t,r,i);return-1<o?(t=e[o],n||(t.Qa=!1)):((t=new Zt(t,this.src,a,!!r,i)).Qa=n,e.push(t)),t};var rn="closure_lm_"+(1e6*Math.random()|0),an={};function on(e,t,n,r,i){if(r&&r.once)cn(e,t,n,r,i);else if(Array.isArray(t))for(var a=0;a<t.length;a++)on(e,t[a],n,r,i);else n=yn(n),e&&e[Qt]?vn(e,t,n,f(r)?!!r.capture:!!r,i):sn(e,t,n,!1,r,i)}function sn(e,t,n,r,i,a){if(!t)throw Error("Invalid event type");var o=f(i)?!!i.capture:!!i,s=mn(e);if(s||(e[rn]=s=new en(e)),!(n=s.add(t,n,r,o,a)).proxy)if(r=function(){var e=fn,t=zt?function(n){return e.call(t.src,t.listener,n)}:function(n){if(!(n=e.call(t.src,t.listener,n)))return n};return t}(),n.proxy=r,r.src=e,r.listener=n,e.addEventListener)Wt||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(dn(t.toString()),r);else{if(!e.addListener||!e.removeListener)throw Error("addEventListener and attachEvent are unavailable.");e.addListener(r)}}function cn(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)cn(e,t[a],n,r,i);else n=yn(n),e&&e[Qt]?An(e,t,n,f(r)?!!r.capture:!!r,i):sn(e,t,n,!0,r,i)}function ln(e,t,n,r,i){if(Array.isArray(t))for(var a=0;a<t.length;a++)ln(e,t[a],n,r,i);else r=f(r)?!!r.capture:!!r,n=yn(n),e&&e[Qt]?(e=e.v,(t=String(t).toString())in e.a&&(-1<(n=nn(a=e.a[t],n,r,i))&&(Xt(a[n]),Array.prototype.splice.call(a,n,1),0==a.length&&(delete e.a[t],e.b--)))):e&&(e=mn(e))&&(t=e.a[t.toString()],e=-1,t&&(e=nn(t,n,r,i)),(n=-1<e?t[e]:null)&&un(n))}function un(e){if("number"!=typeof e&&e&&!e.wa){var t=e.src;if(t&&t[Qt])tn(t.v,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(dn(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=mn(t))?(tn(n,e),0==n.b&&(n.src=null,t[rn]=null)):Xt(e)}}}function dn(e){return e in an?an[e]:an[e]="on"+e}function pn(e,t,n,r){var i=!0;if((e=mn(e))&&(t=e.a[t.toString()]))for(t=t.concat(),e=0;e<t.length;e++){var a=t[e];a&&a.capture==n&&!a.wa&&(a=hn(a,r),i=i&&!1!==a)}return i}function hn(e,t){var n=e.listener,r=e.Wa||e.src;return e.Qa&&un(e),n.call(r,t)}function fn(e,t){if(e.wa)return!0;
1490if(!zt){if(!t)e:{t=["window","event"];for(var n=o,r=0;r<t.length;r++)if(null==(n=n[t[r]])){t=null;break e}t=n}if(t=new Kt(r=t,this),n=!0,!(0>r.keyCode||null!=r.returnValue)){e:{var i=!1;if(0==r.keyCode)try{r.keyCode=-1;break e}catch(e){i=!0}(i||null==r.returnValue)&&(r.returnValue=!0)}for(r=[],i=t.b;i;i=i.parentNode)r.push(i);for(e=e.type,i=r.length-1;0<=i;i--){t.b=r[i];var a=pn(r[i],e,!0,t);n=n&&a}for(i=0;i<r.length;i++)t.b=r[i],a=pn(r[i],e,!1,t),n=n&&a}return n}return hn(e,new Kt(t,this))}function mn(e){return(e=e[rn])instanceof en?e:null}var gn="__closure_events_fn_"+(1e9*Math.random()>>>0);function yn(e){return h(e)?e:(e[gn]||(e[gn]=function(t){return e.handleEvent(t)}),e[gn])}function bn(){Gt.call(this),this.v=new en(this),this.bc=this,this.hb=null}function vn(e,t,n,r,i){e.v.add(String(t),n,!1,r,i)}function An(e,t,n,r,i){e.v.add(String(t),n,!0,r,i)}function _n(e,t,n,r){if(!(t=e.v.a[String(t)]))return!0;t=t.concat();for(var i=!0,a=0;a<t.length;++a){var o=t[a];if(o&&!o.wa&&o.capture==n){var s=o.listener,c=o.Wa||o.src;o.Qa&&tn(e.v,o),i=!1!==s.call(c,r)&&i}}return i&&!r.defaultPrevented}function xn(e,t,n){if(h(e))n&&(e=v(e,n));else{if(!e||"function"!=typeof e.handleEvent)throw Error("Invalid listener argument");e=v(e.handleEvent,e)}return 2147483647<Number(t)?-1:o.setTimeout(e,t||0)}function kn(e){var t=null;return new bt((function(n,r){-1==(t=xn((function(){n(void 0)}),e))&&r(Error("Failed to schedule timer."))})).o((function(e){throw o.clearTimeout(t),e}))}function wn(e){if(e.X&&"function"==typeof e.X)return e.X();if("string"==typeof e)return e.split("");if(p(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}function Tn(e){if(e.Y&&"function"==typeof e.Y)return e.Y();if(!e.X||"function"!=typeof e.X){if(p(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(var r in t=[],n=0,e)t[n++]=r;return t}}function Sn(e,t){this.b={},this.a=[],this.c=0;var n=arguments.length;if(1<n){if(n%2)throw Error("Uneven number of arguments");for(var r=0;r<n;r+=2)this.set(arguments[r],arguments[r+1])}else if(e)if(e instanceof Sn)for(n=e.Y(),r=0;r<n.length;r++)this.set(n[r],e.get(n[r]));else for(r in e)this.set(r,e[r])}function Cn(e){if(e.c!=e.a.length){for(var t=0,n=0;t<e.a.length;){var r=e.a[t];In(e.b,r)&&(e.a[n++]=r),t++}e.a.length=n}if(e.c!=e.a.length){var i={};for(n=t=0;t<e.a.length;)In(i,r=e.a[t])||(e.a[n++]=r,i[r]=1),t++;e.a.length=n}}function In(e,t){return Object.prototype.hasOwnProperty.call(e,t)}_(bn,Gt),bn.prototype[Qt]=!0,bn.prototype.addEventListener=function(e,t,n,r){on(this,e,t,n,r)},bn.prototype.removeEventListener=function(e,t,n,r){ln(this,e,t,n,r)},bn.prototype.dispatchEvent=function(e){var t,n=this.hb;if(n)for(t=[];n;n=n.hb)t.push(n);n=this.bc;var r=e.type||e;if("string"==typeof e)e=new Ht(e,n);else if(e instanceof Ht)e.target=e.target||n;else{var i=e;fe(e=new Ht(r,n),i)}if(i=!0,t)for(var a=t.length-1;0<=a;a--){var o=e.b=t[a];i=_n(o,r,!0,e)&&i}if(i=_n(o=e.b=n,r,!0,e)&&i,i=_n(o,r,!1,e)&&i,t)for(a=0;a<t.length;a++)i=_n(o=e.b=t[a],r,!1,e)&&i;return i},bn.prototype.Da=function(){if(bn.bb.Da.call(this),this.v){var e,t=this.v;for(e in t.a){for(var n=t.a[e],r=0;r<n.length;r++)Xt(n[r]);delete t.a[e],t.b--}}this.hb=null},(e=Sn.prototype).X=function(){Cn(this);for(var e=[],t=0;t<this.a.length;t++)e.push(this.b[this.a[t]]);return e},e.Y=function(){return Cn(this),this.a.concat()},e.clear=function(){this.b={},this.c=this.a.length=0},e.get=function(e,t){return In(this.b,e)?this.b[e]:t},e.set=function(e,t){In(this.b,e)||(this.c++,this.a.push(e)),this.b[e]=t},e.forEach=function(e,t){for(var n=this.Y(),r=0;r<n.length;r++){var i=n[r],a=this.get(i);e.call(t,a,i,this)}};var Nn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function En(e,t){var n;this.a=this.l=this.c="",this.g=null,this.h=this.f="",this.i=!1,e instanceof En?(this.i=void 0!==t?t:e.i,Pn(this,e.c),this.l=e.l,this.a=e.a,$n(this,e.g),this.f=e.f,Rn(this,Zn(e.b)),this.h=e.h):e&&(n=String(e).match(Nn))?(this.i=!!t,Pn(this,n[1]||"",!0),this.l=Un(n[2]||""),this.a=Un(n[3]||"",!0),$n(this,n[4]),this.f=Un(n[5]||"",!0),Rn(this,n[6]||"",!0),this.h=Un(n[7]||"")):(this.i=!!t,this.b=new Wn(null,this.i))}function Pn(e,t,n){e.c=n?Un(t,!0):t,e.c&&(e.c=e.c.replace(/:$/,""))}function $n(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.g=t}else e.g=null}function Rn(e,t,n){t instanceof Wn?(e.b=t,function(e,t){t&&!e.f&&(Hn(e),e.c=null,e.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(Yn(this,t),Jn(this,n,e))}),e)),e.f=t}(e.b,e.i)):(n||(t=Bn(t,zn)),e.b=new Wn(t,e.i))}function On(e,t,n){e.b.set(t,n)}function Mn(e,t){return e.b.get(t)}function Dn(e){return e instanceof En?new En(e):new En(e,void 0)}function Ln(e,t,n,r){var i=new En(null,void 0);return e&&Pn(i,e),t&&(i.a=t),n&&$n(i,n),r&&(i.f=r),i}function Un(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Bn(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,Gn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Gn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}En.prototype.toString=function(){var e=[],t=this.c;t&&e.push(Bn(t,jn,!0),":");var n=this.a;return(n||"file"==t)&&(e.push("//"),(t=this.l)&&e.push(Bn(t,jn,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.g)&&e.push(":",String(n))),(n=this.f)&&(this.a&&"/"!=n.charAt(0)&&e.push("/"),e.push(Bn(n,"/"==n.charAt(0)?Fn:Vn,!0))),(n=this.b.toString())&&e.push("?",n),(n=this.h)&&e.push("#",Bn(n,qn)),e.join("")},En.prototype.resolve=function(e){var t=new En(this),n=!!e.c;n?Pn(t,e.c):n=!!e.l,n?t.l=e.l:n=!!e.a,n?t.a=e.a:n=null!=e.g;var r=e.f;if(n)$n(t,e.g);else if(n=!!e.f){if("/"!=r.charAt(0))if(this.a&&!this.f)r="/"+r;else{var i=t.f.lastIndexOf("/");-1!=i&&(r=t.f.substr(0,i+1)+r)}if(".."==(i=r)||"."==i)r="";else if(ae(i,"./")||ae(i,"/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}r=a.join("/")}else r=i}return n?t.f=r:n=""!==e.b.toString(),n?Rn(t,Zn(e.b)):n=!!e.h,n&&(t.h=e.h),t};var jn=/[#\/\?@]/g,Vn=/[#\?:]/g,Fn=/[#\?]/g,zn=/[#\?@]/g,qn=/#/g;function Wn(e,t){this.b=this.a=null,this.c=e||null,this.f=!!t}function Hn(e){e.a||(e.a=new Sn,e.b=0,e.c&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var a=e[n].substring(0,r);i=e[n].substring(r+1)}else a=e[n];t(a,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.c,(function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)})))}function Kn(e){var t=Tn(e);
1490if(void 0===t)throw Error("Keys are undefined");var n=new Wn(null,void 0);e=wn(e);for(var r=0;r<t.length;r++){var i=t[r],a=e[r];Array.isArray(a)?Jn(n,i,a):n.add(i,a)}return n}function Yn(e,t){Hn(e),t=Xn(e,t),In(e.a.b,t)&&(e.c=null,e.b-=e.a.get(t).length,In((e=e.a).b,t)&&(delete e.b[t],e.c--,e.a.length>2*e.c&&Cn(e)))}function Qn(e,t){return Hn(e),t=Xn(e,t),In(e.a.b,t)}function Jn(e,t,n){Yn(e,t),0<n.length&&(e.c=null,e.a.set(Xn(e,t),Y(n)),e.b+=n.length)}function Zn(e){var t=new Wn;return t.c=e.c,e.a&&(t.a=new Sn(e.a),t.b=e.b),t}function Xn(e,t){return t=String(t),e.f&&(t=t.toLowerCase()),t}function er(e){var t=[];return nr(new tr,e,t),t.join("")}function tr(){}function nr(e,t,n){if(null==t)n.push("null");else{if("object"==typeof t){if(Array.isArray(t)){var r=t;t=r.length,n.push("[");for(var i="",a=0;a<t;a++)n.push(i),nr(e,r[a],n),i=",";return void n.push("]")}if(!(t instanceof String||t instanceof Number||t instanceof Boolean)){for(r in n.push("{"),i="",t)Object.prototype.hasOwnProperty.call(t,r)&&("function"!=typeof(a=t[r])&&(n.push(i),ar(r,n),n.push(":"),nr(e,a,n),i=","));return void n.push("}")}t=t.valueOf()}switch(typeof t){case"string":ar(t,n);break;case"number":n.push(isFinite(t)&&!isNaN(t)?String(t):"null");break;case"boolean":n.push(String(t));break;case"function":n.push("null");break;default:throw Error("Unknown type: "+typeof t)}}}(e=Wn.prototype).add=function(e,t){Hn(this),this.c=null,e=Xn(this,e);var n=this.a.get(e);return n||this.a.set(e,n=[]),n.push(t),this.b+=1,this},e.clear=function(){this.a=this.c=null,this.b=0},e.forEach=function(e,t){Hn(this),this.a.forEach((function(n,r){j(n,(function(n){e.call(t,n,r,this)}),this)}),this)},e.Y=function(){Hn(this);for(var e=this.a.X(),t=this.a.Y(),n=[],r=0;r<t.length;r++)for(var i=e[r],a=0;a<i.length;a++)n.push(t[r]);return n},e.X=function(e){Hn(this);var t=[];if("string"==typeof e)Qn(this,e)&&(t=K(t,this.a.get(Xn(this,e))));else{e=this.a.X();for(var n=0;n<e.length;n++)t=K(t,e[n])}return t},e.set=function(e,t){return Hn(this),this.c=null,Qn(this,e=Xn(this,e))&&(this.b-=this.a.get(e).length),this.a.set(e,[t]),this.b+=1,this},e.get=function(e,t){return e&&0<(e=this.X(e)).length?String(e[0]):t},e.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var e=[],t=this.a.Y(),n=0;n<t.length;n++){var r=t[n],i=encodeURIComponent(String(r));r=this.X(r);for(var a=0;a<r.length;a++){var o=i;""!==r[a]&&(o+="="+encodeURIComponent(String(r[a]))),e.push(o)}}return this.c=e.join("&")};var rr={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},ir=/\uffff/.test("ï¿¿")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function ar(e,t){t.push('"',e.replace(ir,(function(e){var t=rr[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),rr[e]=t),t})),'"')}function or(){var e=Sr();return qe&&!!it&&11==it||/Edge\/\d+/.test(e)}function sr(){return o.window&&o.window.location.href||self&&self.location&&self.location.href||""}function cr(e,t){t=t||o.window;var n="about:blank";e&&(n=Ne(Re(e)||De)),t.location.href=n}function lr(e,t){var n,r=[];for(n in e)n in t?typeof e[n]!=typeof t[n]?r.push(n):"object"==typeof e[n]&&null!=e[n]&&null!=t[n]?0<lr(e[n],t[n]).length&&r.push(n):e[n]!==t[n]&&r.push(n):r.push(n);for(n in t)n in e||r.push(n);return r}function ur(e){return!!((e=(e||Sr()).toLowerCase()).match(/android/)||e.match(/webos/)||e.match(/iphone|ipad|ipod/)||e.match(/blackberry/)||e.match(/windows phone/)||e.match(/iemobile/))}function dr(e){e=e||o.window;try{e.close()}catch(e){}}function pr(e,t,n){var r=Math.floor(1e9*Math.random()).toString();t=t||500,n=n||600;var i=(window.screen.availHeight-n)/2,a=(window.screen.availWidth-t)/2;for(o in t={width:t,height:n,top:0<i?i:0,left:0<a?a:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},n=Sr().toLowerCase(),r&&(t.target=r,ae(n,"crios/")&&(t.target="_blank")),kr(Sr())==_r&&(e=e||"http://localhost",t.scrollbars=!0),n=e||"",(e=t)||(e={}),r=window,t=n instanceof Ie?n:Re(void 0!==n.href?n.href:String(n))||De,n=e.target||n.target,i=[],e)switch(o){case"width":case"height":case"top":case"left":i.push(o+"="+e[o]);break;case"target":case"noopener":case"noreferrer":break;default:i.push(o+"="+(e[o]?1:0))}var o=i.join(",");if((le("iPhone")&&!le("iPod")&&!le("iPad")||le("iPad")||le("iPod"))&&r.navigator&&r.navigator.standalone&&n&&"_self"!=n?(me(o=pt(document,"A"),"HTMLAnchorElement"),t=t instanceof Ie?t:Oe(t),o.href=Ne(t),o.setAttribute("target",n),e.noreferrer&&o.setAttribute("rel","noreferrer"),(e=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,r,1),o.dispatchEvent(e),o={}):e.noreferrer?(o=Be("",r,n,o),e=Ne(t),o&&(He&&ae(e,";")&&(e="'"+e.replace(/'/g,"%27")+"'"),o.opener=null,e='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+je(e)+'">',e=new Le(e=(r=_e())?r.createHTML(e):e,null,Ue),r=o.document)&&(r.write(function(e){return e instanceof Le&&e.constructor===Le?e.a:(R("expected object of type SafeHtml, got '"+e+"' of type "+d(e)),"type_error:SafeHtml")}(e)),r.close())):(o=Be(t,r,n,o))&&e.noopener&&(o.opener=null),o)try{o.focus()}catch(e){}return o}var hr=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,fr=/^[^@]+@[^@]+$/;function mr(){var e=null;return new bt((function(t){"complete"==o.document.readyState?t():(e=function(){t()},cn(window,"load",e))})).o((function(t){throw ln(window,"load",e),t}))}function gr(e){return e=e||Sr(),!("file:"!==Pr()&&"ionic:"!==Pr()||!e.toLowerCase().match(/iphone|ipad|ipod|android/))}function yr(){var e=o.window;try{return!(!e||e==e.top)}catch(e){return!1}}function br(){return void 0!==o.WorkerGlobalScope&&"function"==typeof o.importScripts}function vr(){return firebase.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":firebase.INTERNAL.hasOwnProperty("node")?"Node":br()?"Worker":"Browser"}function Ar(){var e=vr();return"ReactNative"===e||"Node"===e}var _r="Firefox",xr="Chrome";function kr(e){var t=e.toLowerCase();return ae(t,"opera/")||ae(t,"opr/")||ae(t,"opios/")?"Opera":ae(t,"iemobile")?"IEMobile":ae(t,"msie")||ae(t,"trident/")?"IE":ae(t,"edge/")?"Edge":ae(t,"firefox/")?_r:ae(t,"silk/")?"Silk":ae(t,"blackberry")?"Blackberry":ae(t,"webos")?"Webos":!ae(t,"safari/")||ae(t,"chrome/")||ae(t,"crios/")||ae(t,"android")?!ae(t,"chrome/")&&!ae(t,"crios/")||ae(t,"edge/")?ae(t,"android")?"Android":(e=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==e.length?e[1]:"Other":xr:"Safari"}var wr={md:"FirebaseCore-web",od:"FirebaseUI-web"};function Tr(e,t){t=t||[];var n,r=[],i={};for(n in wr)i[wr[n]]=!0;for(n=0;n<t.length;n++)void 0!==i[t[n]]&&(delete i[t[n]],r.push(t[n]));return r.sort(),(t=r).length||(t=["FirebaseCore-web"]),"Browser"===(r=vr())?r=kr(i=Sr()):"Worker"===r&&(r=kr(i=Sr())+"-"+r),r+"/JsCore/"+e+"/"+t.join(",")}function Sr(){return o.navigator&&o.navigator.userAgent||""}function Cr(e,t){e=e.split("."),t=t||o;for(var n=0;n<e.length&&"object"==typeof t&&null!=t;n++)t=t[e[n]];return n!=e.length&&(t=void 0),t}function Ir(){try{var e=o.localStorage,t=Dr();if(e)return e.setItem(t,"1"),e.removeItem(t),!or()||!!o.indexedDB}catch(e){return br()&&!!o.indexedDB}return!1}function Nr(){return(Er()||"chrome-extension:"===Pr()||gr())&&!Ar()&&Ir()&&!br()}function Er(){return"http:"===Pr()||"https:"===Pr()}function Pr(){return o.location&&o.location.protocol||null}function $r(e){return!ur(e=e||Sr())&&kr(e)!=_r}function Rr(e){return void 0===e?null:er(e)}function Or(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&null!==e[t]&&void 0!==e[t]&&(n[t]=e[t]);return n}function Mr(e){if(null!==e)return JSON.parse(e)}function Dr(e){return e||Math.floor(1e9*Math.random()).toString()}function Lr(e){return"Safari"!=kr(e=e||Sr())&&!e.toLowerCase().match(/iphone|ipad|ipod/)}function Ur(){var e=o.___jsl;if(e&&e.H)for(var t in e.H)if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=e.H[t].L.concat(),e.CP)for(var n=0;n<e.CP.length;n++)e.CP[n]=null}function Br(e,t){if(e>
1490t)throw Error("Short delay should be less than long delay!");this.a=e,this.c=t,e=Sr(),t=vr(),this.b=ur(e)||"ReactNative"===t}function Gr(){var e=o.document;return!e||void 0===e.visibilityState||"visible"==e.visibilityState}function jr(e){try{var t=new Date(parseInt(e,10));if(!isNaN(t.getTime())&&!/[^0-9]/.test(e))return t.toUTCString()}catch(e){}return null}function Vr(){return!(!Cr("fireauth.oauthhelper",o)&&!Cr("fireauth.iframe",o))}Br.prototype.get=function(){var e=o.navigator;return!e||"boolean"!=typeof e.onLine||!Er()&&"chrome-extension:"!==Pr()&&void 0===e.connection||e.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var Fr,zr={};function qr(e){zr[e]||(zr[e]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(e))}try{var Wr={};Object.defineProperty(Wr,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Wr,"abcd",{configurable:!0,enumerable:!0,value:2}),Fr=2==Wr.abcd}catch(e){Fr=!1}function Hr(e,t,n){Fr?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n}):e[t]=n}function Kr(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&Hr(e,n,t[n])}function Yr(e){var t={};return Kr(t,e),t}function Qr(e){var t=e;if("object"==typeof e&&null!=e)for(var n in t="length"in e?[]:{},e)Hr(t,n,Qr(e[n]));return t}function Jr(e){var t=e&&(e[ni]?"phone":null);if(!(t&&e&&e[ti]))throw new k("internal-error","Internal assert: invalid MultiFactorInfo object");Hr(this,"uid",e[ti]),Hr(this,"displayName",e[Xr]||null);var n=null;e[ei]&&(n=new Date(e[ei]).toUTCString()),Hr(this,"enrollmentTime",n),Hr(this,"factorId",t)}function Zr(e){try{var t=new ri(e)}catch(e){t=null}return t}Jr.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var Xr="displayName",ei="enrolledAt",ti="mfaEnrollmentId",ni="phoneInfo";function ri(e){Jr.call(this,e),Hr(this,"phoneNumber",e[ni])}function ii(e){var t={},n=e[ci],r=e[ui],i=e[di];if(e=Zr(e[li]),!i||i!=oi&&i!=si&&!n||i==si&&!r||i==ai&&!e)throw Error("Invalid checkActionCode response!");i==si?(t[hi]=n||null,t[mi]=n||null,t[pi]=r):(t[hi]=r||null,t[mi]=r||null,t[pi]=n||null),t[fi]=e||null,Hr(this,yi,i),Hr(this,gi,Qr(t))}_(ri,Jr),ri.prototype.w=function(){var e=ri.bb.w.call(this);return e.phoneNumber=this.phoneNumber,e};var ai="REVERT_SECOND_FACTOR_ADDITION",oi="EMAIL_SIGNIN",si="VERIFY_AND_CHANGE_EMAIL",ci="email",li="mfaInfo",ui="newEmail",di="requestType",pi="email",hi="fromEmail",fi="multiFactorInfo",mi="previousEmail",gi="data",yi="operation";function bi(e){var t=Mn(e=Dn(e),vi)||null,n=Mn(e,Ai)||null,r=Mn(e,ki)||null;if(r=r&&Ti[r]||null,!t||!n||!r)throw new k("argument-error",vi+", "+Ai+"and "+ki+" are required in a valid action code URL.");Kr(this,{apiKey:t,operation:r,code:n,continueUrl:Mn(e,_i)||null,languageCode:Mn(e,xi)||null,tenantId:Mn(e,wi)||null})}var vi="apiKey",Ai="oobCode",_i="continueUrl",xi="languageCode",ki="mode",wi="tenantId",Ti={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:ai,signIn:oi,verifyAndChangeEmail:si,verifyEmail:"VERIFY_EMAIL"};function Si(e){try{return new bi(e)}catch(e){return null}}function Ci(e){var t=e[$i];if(void 0===t)throw new k("missing-continue-uri");if("string"!=typeof t||"string"==typeof t&&!t.length)throw new k("invalid-continue-uri");this.h=t,this.b=this.a=null,this.g=!1;var n=e[Ii];if(n&&"object"==typeof n){t=n[Mi];var r=n[Ri];if(n=n[Oi],"string"==typeof t&&t.length){if(this.a=t,void 0!==r&&"boolean"!=typeof r)throw new k("argument-error",Ri+" property must be a boolean when specified.");if(this.g=!!r,void 0!==n&&("string"!=typeof n||"string"==typeof n&&!n.length))throw new k("argument-error",Oi+" property must be a non empty string when specified.");this.b=n||null}else{if(void 0!==t)throw new k("argument-error",Mi+" property must be a non empty string when specified.");if(void 0!==r||void 0!==n)throw new k("missing-android-pkg-name")}}else if(void 0!==n)throw new k("argument-error",Ii+" property must be a non null object when specified.");if(this.f=null,(t=e[Pi])&&"object"==typeof t){if("string"==typeof(t=t[Di])&&t.length)this.f=t;else if(void 0!==t)throw new k("argument-error",Di+" property must be a non empty string when specified.")}else if(void 0!==t)throw new k("argument-error",Pi+" property must be a non null object when specified.");if(void 0!==(t=e[Ei])&&"boolean"!=typeof t)throw new k("argument-error",Ei+" property must be a boolean when specified.");if(this.c=!!t,void 0!==(e=e[Ni])&&("string"!=typeof e||"string"==typeof e&&!e.length))throw new k("argument-error",Ni+" property must be a non empty string when specified.");this.i=e||null}var Ii="android",Ni="dynamicLinkDomain",Ei="handleCodeInApp",Pi="iOS",$i="url",Ri="installApp",Oi="minimumVersion",Mi="packageName",Di="bundleId";function Li(e){var t={};for(var n in t.continueUrl=e.h,t.canHandleCodeInApp=e.c,(t.androidPackageName=e.a)&&(t.androidMinimumVersion=e.b,t.androidInstallApp=e.g),t.iOSBundleId=e.f,t.dynamicLinkDomain=e.i,t)null===t[n]&&delete t[n];return t}var Ui=null;function Bi(e){var t=[];return function(e,t){function n(t){for(;r<e.length;){var n=e.charAt(r++),i=Ui[n];if(null!=i)return i;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n)}return t}!function(){if(!Ui){Ui={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],n=0;5>n;n++)for(var r=e.concat(t[n].split("")),i=0;i<r.length;i++){var a=r[i];void 0===Ui[a]&&(Ui[a]=i)}}}();for(var r=0;;){var i=n(-1),a=n(0),o=n(64),s=n(64);if(64===s&&-1===i)break;t(i<<2|a>>4),64!=o&&(t(a<<4&240|o>>2),64!=s&&t(o<<6&192|s))}}(e,(function(e){t.push(e)})),t}function Gi(e){var t=Vi(e);if(!(t&&t.sub&&t.iss&&t.aud&&t.exp))throw Error("Invalid JWT");this.h=e,this.a=t.exp,this.i=t.sub,e=Date.now()/1e3,this.g=t.iat||(e>this.a?this.a:e),this.b=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.f=t.firebase&&t.firebase.tenant||null,this.c=!!t.is_anonymous||"anonymous"==this.b}function ji(e){try{return new Gi(e)}catch(e){return null}}function Vi(e){if(!e)return null;if(3!=(e=e.split(".")).length)return null;for(var t=(4-(e=e[1]).length%4)%4,n=0;n<t;n++)e+=".";try{var r=Bi(e);for(e=[],n=t=0;t<r.length;){var i=r[t++];if(128>i)e[n++]=String.fromCharCode(i);else if(191<i&&224>i){var a=r[t++];e[n++]=String.fromCharCode((31&i)<<6|63&a)}else if(239<i&&365>i){a=r[t++];var o=r[t++],s=((7&i)<<18|(63&a)<<12|(63&o)<<6|63&r[t++])-65536;e[n++]=String.fromCharCode(55296+(s>>10)),e[n++]=String.fromCharCode(56320+(1023&s))}
1490else a=r[t++],o=r[t++],e[n++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&o)}return JSON.parse(e.join(""))}catch(e){}return null}Gi.prototype.T=function(){return this.f},Gi.prototype.l=function(){return this.c},Gi.prototype.toString=function(){return this.h};var Fi="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),zi=["client_id","response_type","scope","redirect_uri","state"],qi={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:zi},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:zi},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:zi},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:Fi},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function Wi(e){for(var t in qi)if(qi[t].fa==e)return qi[t];return null}function Hi(e){var t={};t["facebook.com"]=Zi,t["google.com"]=ea,t["github.com"]=Xi,t["twitter.com"]=ta;var n=e&&e[Yi];try{if(n)return t[n]?new t[n](e):new Ji(e);if(void 0!==e[Ki])return new Qi(e)}catch(e){}return null}var Ki="idToken",Yi="providerId";function Qi(e){var t=e[Yi];if(!t&&e[Ki]){var n=ji(e[Ki]);n&&n.b&&(t=n.b)}if(!t)throw Error("Invalid additional user info!");"anonymous"!=t&&"custom"!=t||(t=null),n=!1,void 0!==e.isNewUser?n=!!e.isNewUser:"identitytoolkit#SignupNewUserResponse"===e.kind&&(n=!0),Hr(this,"providerId",t),Hr(this,"isNewUser",n)}function Ji(e){Qi.call(this,e),Hr(this,"profile",Qr((e=Mr(e.rawUserInfo||"{}"))||{}))}function Zi(e){if(Ji.call(this,e),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function Xi(e){if(Ji.call(this,e),"github.com"!=this.providerId)throw Error("Invalid provider ID!");Hr(this,"username",this.profile&&this.profile.login||null)}function ea(e){if(Ji.call(this,e),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function ta(e){if(Ji.call(this,e),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");Hr(this,"username",e.screenName||null)}function na(e){var t=Dn(e),n=Mn(t,"link"),r=Mn(Dn(n),"link");return t=Mn(t,"deep_link_id"),Mn(Dn(t),"link")||t||r||n||e}function ra(e,t){if(!e&&!t)throw new k("internal-error","Internal assert: no raw session string available");if(e&&t)throw new k("internal-error","Internal assert: unable to determine the session type");this.a=e||null,this.b=t||null,this.type=this.a?ia:aa}_(Ji,Qi),_(Zi,Ji),_(Xi,Ji),_(ea,Ji),_(ta,Ji);var ia="enroll",aa="signin";function oa(){}function sa(e,t){return e.then((function(e){if(e[Qo]){var n=ji(e[Qo]);if(!n||t!=n.i)throw new k("user-mismatch");return e}throw new k("user-mismatch")})).o((function(e){throw e&&e.code&&e.code==S+"user-not-found"?new k("user-mismatch"):e}))}function ca(e,t){if(!t)throw new k("internal-error","failed to construct a credential");this.a=t,Hr(this,"providerId",e),Hr(this,"signInMethod",e)}function la(e){return{pendingToken:e.a,requestUri:"http://localhost"}}function ua(e){if(e&&e.providerId&&e.signInMethod&&0==e.providerId.indexOf("saml.")&&e.pendingToken)try{return new ca(e.providerId,e.pendingToken)}catch(e){}return null}function da(e,t,n){if(this.a=null,t.idToken||t.accessToken)t.idToken&&Hr(this,"idToken",t.idToken),t.accessToken&&Hr(this,"accessToken",t.accessToken),t.nonce&&!t.pendingToken&&Hr(this,"nonce",t.nonce),t.pendingToken&&(this.a=t.pendingToken);else{if(!t.oauthToken||!t.oauthTokenSecret)throw new k("internal-error","failed to construct a credential");Hr(this,"accessToken",t.oauthToken),Hr(this,"secret",t.oauthTokenSecret)}Hr(this,"providerId",e),Hr(this,"signInMethod",n)}function pa(e){var t={};return e.idToken&&(t.id_token=e.idToken),e.accessToken&&(t.access_token=e.accessToken),e.secret&&(t.oauth_token_secret=e.secret),t.providerId=e.providerId,e.nonce&&!e.a&&(t.nonce=e.nonce),t={postBody:Kn(t).toString(),requestUri:"http://localhost"},e.a&&(delete t.postBody,t.pendingToken=e.a),t}function ha(e){if(e&&e.providerId&&e.signInMethod){var t={idToken:e.oauthIdToken,accessToken:e.oauthTokenSecret?null:e.oauthAccessToken,oauthTokenSecret:e.oauthTokenSecret,oauthToken:e.oauthTokenSecret&&e.oauthAccessToken,nonce:e.nonce,pendingToken:e.pendingToken};try{return new da(e.providerId,t,e.signInMethod)}catch(e){}}return null}function fa(e,t){this.Qc=t||[],Kr(this,{providerId:e,isOAuthProvider:!0}),this.Jb={},this.qb=(Wi(e)||{}).Ja||null,this.pb=null}function ma(e){if("string"!=typeof e||0!=e.indexOf("saml."))throw new k("argument-error",'SAML provider IDs must be prefixed with "saml."');fa.call(this,e,[])}function ga(e){fa.call(this,e,zi),this.a=[]}function ya(){ga.call(this,"facebook.com")}function ba(e){if(!e)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return f(e)&&(t=e.accessToken),(new ya).credential({accessToken:t})}function va(){ga.call(this,"github.com")}function Aa(e){if(!e)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var t=e;return f(e)&&(t=e.accessToken),(new va).credential({accessToken:t})}function _a(){ga.call(this,"google.com"),this.Ca("profile")}function xa(e,t){var n=e;return f(e)&&(n=e.idToken,t=e.accessToken),(new _a).credential({idToken:n,accessToken:t})}function ka(){fa.call(this,"twitter.com",Fi)}function wa(e,t){var n=e;if(f(n)||(n={oauthToken:e,oauthTokenSecret:t}),!n.oauthToken||!n.oauthTokenSecret)throw new k("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new da("twitter.com",n,"twitter.com")}function Ta(e,t,n){this.a=e,this.f=t,Hr(this,"providerId","password"),Hr(this,"signInMethod",n===Ca.EMAIL_LINK_SIGN_IN_METHOD?Ca.EMAIL_LINK_SIGN_IN_METHOD:Ca.EMAIL_PASSWORD_SIGN_IN_METHOD)}function Sa(e){return e&&e.email&&e.password?new Ta(e.email,e.password,e.signInMethod):null}function Ca(){Kr(this,{providerId:"password",isOAuthProvider:!1})}function Ia(e,t){if(!(t=Na(t)))throw new k("argument-error","Invalid email link!");return new Ta(e,t.code,Ca.EMAIL_LINK_SIGN_IN_METHOD)}function Na(e){return(e=Si(e=na(e)))&&e.operation===oi?e:null}function Ea(e){if(!(e.fb&&e.eb||e.La&&e.ea))throw new k("internal-error");this.a=e,Hr(this,"providerId","phone"),this.fa="phone",Hr(this,"signInMethod","phone")}function Pa(e){if(e&&"phone"===e.providerId&&(e.verificationId&&e.verificationCode||e.temporaryProof&&e.phoneNumber)){var t={};return j(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(n){e[n]&&(t[n]=e[n])})),new Ea(t)}return null}function $a(e){return e.a.La&&e.a.ea?{temporaryProof:e.a.La,phoneNumber:e.a.ea}:{sessionInfo:e.a.fb,code:e.a.eb}}function Ra(e){try{this.a=e||firebase.auth()}catch(e){throw new k("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Kr(this,{providerId:"phone",isOAuthProvider:!1})}function Oa(e,t){if(!e)throw new k("missing-verification-id");if(!t)throw new k("missing-verification-code");return new Ea({fb:e,eb:t})}function Ma(e){if(e.temporaryProof&&e.phoneNumber)return new Ea({La:e.temporaryProof,ea:e.phoneNumber});var t=e&&e.providerId;if(!t||"password"===t)return null;var n=e&&e.oauthAccessToken,r=e&&e.oauthTokenSecret,i=e&&e.nonce,a=e&&e.oauthIdToken,o=e&&e.pendingToken;try{switch(t){case"google.com":return xa(a,n);case"facebook.com":return ba(n);case"github.com":return Aa(n);case"twitter.com":return wa(n,r);default:return n||r||a||o?o?0==t.indexOf("saml.")?new ca(t,o):new da(t,{pendingToken:o,idToken:e.oauthIdToken,accessToken:e.oauthAccessToken},t):new ga(t).credential({idToken:a,accessToken:n,rawNonce:i}):null}}catch(e){return null}}function Da(e){if(!e.isOAuthProvider)throw new k("invalid-oauth-provider")}function La(e,t,n,r,i,a,o){if(this.c=e,this.b=t||null,this.g=n||null,this.f=r||null,this.i=a||null,this.h=o||null,this.a=i||null,!this.g&&!this.a)throw new k("invalid-auth-event");
1490if(this.g&&this.a)throw new k("invalid-auth-event");if(this.g&&!this.f)throw new k("invalid-auth-event")}function Ua(e){return(e=e||{}).type?new La(e.type,e.eventId,e.urlResponse,e.sessionId,e.error&&w(e.error),e.postBody,e.tenantId):null}function Ba(){this.b=null,this.a=[]}ra.prototype.Ha=function(){return this.a?Tt(this.a):Tt(this.b)},ra.prototype.w=function(){return this.type==ia?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},oa.prototype.ka=function(){},oa.prototype.b=function(){},oa.prototype.c=function(){},oa.prototype.w=function(){},ca.prototype.ka=function(e){return bs(e,la(this))},ca.prototype.b=function(e,t){var n=la(this);return n.idToken=t,vs(e,n)},ca.prototype.c=function(e,t){return sa(As(e,la(this)),t)},ca.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},da.prototype.ka=function(e){return bs(e,pa(this))},da.prototype.b=function(e,t){var n=pa(this);return n.idToken=t,vs(e,n)},da.prototype.c=function(e,t){return sa(As(e,pa(this)),t)},da.prototype.w=function(){var e={providerId:this.providerId,sign
1490InMethod:this.signInMethod};return this.idToken&&(e.oauthIdToken=this.idToken),this.accessToken&&(e.oauthAccessToken=this.accessToken),this.secret&&(e.oauthTokenSecret=this.secret),this.nonce&&(e.nonce=this.nonce),this.a&&(e.pendingToken=this.a),e},fa.prototype.Ka=function(e){return this.Jb=pe(e),this},_(ma,fa),_(ga,fa),ga.prototype.Ca=function(e){return q(this.a,e)||this.a.push(e),this},ga.prototype.Rb=function(){return Y(this.a)},ga.prototype.credential=function(e,t){var n;if(!(n=f(e)?{idToken:e.idToken||null,accessToken:e.accessToken||null,nonce:e.rawNonce||null}:{idToken:e||null,accessToken:t||null}).idToken&&!n.accessToken)throw new k("argument-error","credential failed: must provide the ID token and/or the access token.");return new da(this.providerId,n,this.providerId)},_(ya,ga),Hr(ya,"PROVIDER_ID","facebook.com"),Hr(ya,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),_(va,ga),Hr(va,"PROVIDER_ID","github.com"),Hr(va,"GITHUB_SIGN_IN_METHOD","github.com"),_(_a,ga),Hr(_a,"PROVIDER_ID","google.com"),Hr(_a,"GOOGLE_SIGN_IN_METHOD","google.com"),_(ka,fa),Hr(ka,"PROVIDER_ID","twitter.com"),Hr(ka,"TWITTER_SIGN_IN_METHOD","twitter.com"),Ta.prototype.ka=function(e){return this.signInMethod==Ca.EMAIL_LINK_SIGN_IN_METHOD?tc(e,Is,{email:this.a,oobCode:this.f}):tc(e,Qs,{email:this.a,password:this.f})},Ta.prototype.b=function(e,t){return this.signInMethod==Ca.EMAIL_LINK_SIGN_IN_METHOD?tc(e,Ns,{idToken:t,email:this.a,oobCode:this.f}):tc(e,Vs,{idToken:t,email:this.a,password:this.f})},Ta.prototype.c=function(e,t){return sa(this.ka(e),t)},Ta.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},Kr(Ca,{PROVIDER_ID:"password"}),Kr(Ca,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Kr(Ca,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Ea.prototype.ka=function(e){return e.gb($a(this))},Ea.prototype.b=function(e,t){var n=$a(this);return n.idToken=t,tc(e,Zs,n)},Ea.prototype.c=function(e,t){var n=$a(this);return n.operation="REAUTH",sa(e=tc(e,Xs,n),t)},Ea.prototype.w=function(){var e={providerId:"phone"};return this.a.fb&&(e.verificationId=this.a.fb),this.a.eb&&(e.verificationCode=this.a.eb),this.a.La&&(e.temporaryProof=this.a.La),this.a.ea&&(e.phoneNumber=this.a.ea),e},Ra.prototype.gb=function(e,t){var n=this.a.a;return Tt(t.verify()).then((function(r){if("string"!=typeof r)throw new k("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(t.type){case"recaptcha":var i=f(e)?e.session:null,a=f(e)?e.phoneNumber:e;return(i&&i.type==ia?i.Ha().then((function(e){return function(e,t){return tc(e,zs,t).then((function(e){return e.phoneSessionInfo.sessionInfo}))}(n,{idToken:e,phoneEnrollmentInfo:{phoneNumber:a,recaptchaToken:r}})})):i&&i.type==aa?i.Ha().then((function(t){return function(e,t){return tc(e,qs,t).then((function(e){return e.phoneResponseInfo.sessionInfo}))}(n,{mfaPendingCredential:t,mfaEnrollmentId:e.multiFactorHint&&e.multiFactorHint.uid||e.multiFactorUid,phoneSignInInfo:{recaptchaToken:r}})})):function(e,t){return tc(e,Gs,t)}(n,{phoneNumber:a,recaptchaToken:r})).then((function(e){return"function"==typeof t.reset&&t.reset(),e}),(function(e){throw"function"==typeof t.reset&&t.reset(),e}));default:throw new k("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},Kr(Ra,{PROVIDER_ID:"phone"}),Kr(Ra,{PHONE_SIGN_IN_METHOD:"phone"}),La.prototype.getUid=function(){var e=[];return e.push(this.c),this.b&&e.push(this.b),this.f&&e.push(this.f),this.h&&e.push(this.h),e.join("-")},La.prototype.T=function(){return this.h},La.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var Ga,ja=null;function Va(e){var t="unauthorized-domain",n=void 0,r=Dn(e);e=r.a,"chrome-extension"==(r=r.c)?n=Ge("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):"http"==r||"https"==r?n=Ge("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",e):t="operation-not-supported-in-this-environment",k.call(this,t,n)}
1490function Fa(e,t,n){k.call(this,e,n),(e=t||{}).Kb&&Hr(this,"email",e.Kb),e.ea&&Hr(this,"phoneNumber",e.ea),e.credential&&Hr(this,"credential",e.credential),e.$b&&Hr(this,"tenantId",e.$b)}function za(e){if(e.code){var t=e.code||"";0==t.indexOf(S)&&(t=t.substring(S.length));var n={credential:Ma(e),$b:e.tenantId};if(e.email)n.Kb=e.email;else if(e.phoneNumber)n.ea=e.phoneNumber;else if(!n.credential)return new k(t,e.message||void 0);return new Fa(t,n,e.message)}return null}function qa(){}function Wa(e){return e.c||(e.c=e.b())}function Ha(){}function Ka(e){if(!e.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var t=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n<t.length;n++){var r=t[n];try{return new ActiveXObject(r),e.f=r}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return e.f}function Ya(){}function Qa(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=v(this.qc,this),this.a.onerror=v(this.Tb,this),this.a.onprogress=v(this.rc,this),this.a.ontimeout=v(this.vc,this)}function Ja(e,t){e.readyState=t,e.onreadystatechange&&e.onreadystatechange()}function Za(e,t,n){this.reset(e,t,n,void 0,void 0)}function Xa(e){this.f=e,this.b=this.c=this.a=null}function eo(e,t){this.name=e,this.value=t}_(Va,k),_(Fa,k),Fa.prototype.w=function(){var e={code:this.code,message:this.message};this.email&&(e.email=this.email),this.phoneNumber&&(e.phoneNumber=this.phoneNumber),this.tenantId&&(e.tenantId=this.tenantId);var t=this.credential&&this.credential.w();return t&&fe(e,t),e},Fa.prototype.toJSON=function(){return this.w()},qa.prototype.c=null,_(Ha,qa),Ha.prototype.a=function(){var e=Ka(this);return e?new ActiveXObject(e):new XMLHttpRequest},Ha.prototype.b=function(){var e={};return Ka(this)&&(e[0]=!0,e[1]=!0),e},Ga=new Ha,_(Ya,qa),Ya.prototype.a=function(){var e=new XMLHttpRequest;if("withCredentials"in e)return e;if("undefined"!=typeof XDomainRequest)return new Qa;throw Error("Unsupported browser")},Ya.prototype.b=function(){return{}},(e=Qa.prototype).open=function(e,t,n){if(null!=n&&!n)throw Error("Only async requests are supported.");this.a.open(e,t)},e.send=function(e){if(e){if("string"!=typeof e)throw Error("Only string data is supported");this.a.send(e)}else this.a.send()},e.abort=function(){this.a.abort()},e.setRequestHeader=function(){},e.getResponseHeader=function(e){return"content-type"==e.toLowerCase()?this.a.contentType:""},e.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,Ja(this,4)},e.Tb=function(){this.status=500,this.response=this.responseText="",Ja(this,4)},e.vc=function(){this.Tb()},e.rc=function(){this.status=200,Ja(this,1)},e.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},Za.prototype.a=null,Za.prototype.reset=function(e,t,n,r,i){delete this.a},eo.prototype.toString=function(){return this.name};var to=new eo("SEVERE",1e3),no=new eo("WARNING",900),ro=new eo("CONFIG",700),io=new eo("FINE",500);function ao(e){return e.c?e.c:e.a?ao(e.a):(R("Root logger has no level set."),null)}Xa.prototype.log=function(e,t,n){if(e.value>=ao(this).value)for(h(t)&&(t=t()),e=new Za(e,String(t),this.f),n&&(e.a=n),n=this;n;)n=n.a};var oo={},so=null;function co(e){var t;if(so||(so=new Xa(""),oo[""]=so,so.c=ro),!(t=oo[e])){t=new Xa(e);var n=e.lastIndexOf("."),r=e.substr(n+1);(n=co(e.substr(0,n))).b||(n.b={}),n.b[r]=t,t.a=n,oo[e]=t}return t}function lo(e,t){e&&e.log(io,t,void 0)}function uo(e){this.f=e}function po(e){bn.call(this),this.u=e,this.h=void 0,this.readyState=ho,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=co("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}_(uo,qa),uo.prototype.a=function(){return new po(this.f)},uo.prototype.b=function(e){return function(){return e}}({}),_(po,bn);var ho=0;function fo(e){e.c.read().then(e.pc.bind(e)).catch(e.Va.bind(e))}function mo(e){e.readyState=4,e.g=null,e.c=null,e.m=null,go(e)}function go(e){e.onreadystatechange&&e.onreadystatechange.call(e)}function yo(e){bn.call(this),this.headers=new Sn,this.D=e||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=bo,this.u=this.S=!1}(e=po.prototype).open=function(e,t){if(this.readyState!=ho)throw this.abort(),Error("Error reopening a connection");this.s=e,this.f=t,this.readyState=1,go(this)},e.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var t={headers:this.l,method:this.s,credentials:this.h,cache:void 0};
1490e&&(t.body=e),this.u.fetch(new Request(this.f,t)).then(this.uc.bind(this),this.Va.bind(this))},e.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,mo(this)),this.readyState=ho},e.uc=function(e){this.a&&(this.g=e,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=e.headers,this.readyState=2,go(this)),this.a&&(this.readyState=3,go(this),this.a&&("arraybuffer"===this.responseType?e.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):void 0!==o.ReadableStream&&"body"in e?(this.response=this.responseText="",this.c=e.body.getReader(),this.m=new TextDecoder,fo(this)):e.text().then(this.tc.bind(this),this.Va.bind(this)))))},e.pc=function(e){if(this.a){var t=this.m.decode(e.value?e.value:new Uint8Array(0),{stream:!e.done});t&&(this.response=this.responseText+=t),e.done?mo(this):go(this),3==this.readyState&&fo(this)}},e.tc=function(e){this.a&&(this.response=this.responseText=e,mo(this))},e.sc=function(e){this.a&&(this.response=e,mo(this))},e.Va=function(e){var t=this.i;t&&t.log(no,"Failed to fetch url "+this.f,e instanceof Error?e:Error(e)),this.a&&mo(this)},e.setRequestHeader=function(e,t){this.l.append(e,t)},e.getResponseHeader=function(e){return this.b?this.b.get(e.toLowerCase())||"":((e=this.i)&&e.log(no,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},e.getAllResponseHeaders=function(){if(!this.b){var e=this.i;return e&&e.log(no,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}e=[];for(var t=this.b.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(po.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(e){this.h=e?"include":"same-origin"}}),_(yo,bn);var bo="";yo.prototype.b=co("goog.net.XhrIo");var vo=/^https?$/i,Ao=["POST","PUT"];function _o(e,t,n,r,i){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.P=n,e.J=!1,e.c=!0,e.a=e.D?e.D.a():Ga.a(),e.C=e.D?Wa(e.D):Wa(Ga),e.a.onreadystatechange=v(e.Wb,e);try{lo(e.b,Eo(e,"Opening Xhr")),e.N=!0,e.a.open(n,String(t),!0),e.N=!1}catch(t){return lo(e.b,Eo(e,"Error opening Xhr: "+t.message)),void ko(e,t)}t=r||"";var a=new Sn(e.headers);i&&function(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(p(e)||"string"==typeof e)j(e,t,void 0);else for(var n=Tn(e),r=wn(e),i=r.length,a=0;a<i;a++)t.call(void 0,r[a],n&&n[a],e)}(i,(function(e,t){a.set(t,e)})),i=function(e){e:{for(var t=xo,n=e.length,r="string"==typeof e?e.split(""):e,i=0;i<n;i++)if(i in r&&t.call(void 0,r[i],i,e)){t=i;break e}t=-1}return 0>t?null:"string"==typeof e?e.charAt(t):e[t]}(a.Y()),r=o.FormData&&t instanceof o.FormData,!q(Ao,n)||i||r||a.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),a.forEach((function(e,t){this.a.setRequestHeader(t,e)}),e),e.m&&(e.a.responseType=e.m),"withCredentials"in e.a&&e.a.withCredentials!==e.S&&(e.a.withCredentials=e.S);try{Co(e),0<e.g&&(e.u=function(e){return qe&&nt(9)&&"number"==typeof e.timeout&&void 0!==e.ontimeout}(e.a),lo(e.b,Eo(e,"Will abort after "+e.g+"ms if incomplete, xhr2 "+e.u)),e.u?(e.a.timeout=e.g,e.a.ontimeout=v(e.Ma,e)):e.s=xn(e.Ma,e.g,e)),lo(e.b,Eo(e,"Sending request")),e.i=!0,e.a.send(t),e.i=!1}catch(t){lo(e.b,Eo(e,"Send error: "+t.message)),ko(e,t)}}function xo(e){return"content-type"==e.toLowerCase()}function ko(e,t){e.c=!1,e.a&&(e.f=!0,e.a.abort(),e.f=!1),e.h=t,wo(e),So(e)}function wo(e){e.J||(e.J=!0,e.dispatchEvent("complete"),e.dispatchEvent("error"))}function To(e){if(e.c&&void 0!==a)if(e.C[1]&&4==Io(e)&&2==No(e))lo(e.b,Eo(e,"Local request error detected and ignored"));else if(e.i&&4==Io(e))xn(e.Wb,0,e);else if(e.dispatchEvent("readystatechange"),4==Io(e)){lo(e.b,Eo(e,"Request complete")),e.c=!1;try{var t,n=No(e);e:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var r
1490=!0;break e;default:r=!1}if(!(t=r)){var i;if(i=0===n){var s=String(e.l).match(Nn)[1]||null;if(!s&&o.self&&o.self.location){var c=o.self.location.protocol;s=c.substr(0,c.length-1)}i=!vo.test(s?s.toLowerCase():"")}t=i}if(t)e.dispatchEvent("complete"),e.dispatchEvent("success");else{try{var l=2<Io(e)?e.a.statusText:""}catch(t){lo(e.b,"Can not get status: "+t.message),l=""}e.h=l+" ["+No(e)+"]",wo(e)}}finally{So(e)}}}function So(e,t){if(e.a){Co(e);var n=e.a,r=e.C[0]?u:null;e.a=null,e.C=null,t||e.dispatchEvent("ready");try{n.onreadystatechange=r}catch(t){(e=e.b)&&e.log(to,"Problem encountered resetting onreadystatechange: "+t.message,void 0)}}}function Co(e){e.a&&e.u&&(e.a.ontimeout=null),e.s&&(o.clearTimeout(e.s),e.s=null)}function Io(e){return e.a?e.a.readyState:0}function No(e){try{return 2<Io(e)?e.a.status:-1}catch(e){return-1}}function Eo(e,t){return t+" ["+e.P+" "+e.l+" "+No(e)+"]"}function Po(e){var t=Vo;this.g=[],this.u=t,this.s=e||null,this.f=this.a=!1,this.c=void 0,this.v=this.C=this.i=!1,this.h=0,this.b=null,this.l=0}function $o(e,t,n){e.a=!0,e.c=n,e.f=!t,Do(e)}function Ro(e){if(e.a){if(!e.v)throw new Lo(e);e.v=!1}}function Oo(e,t,n,r){e.g.push([t,n,r]),e.a&&Do(e)}function Mo(e){return z(e.g,(function(e){return h(e[1])}))}function Do(e){if(e.h&&e.a&&Mo(e)){var t=e.h,n=Go[t];n&&(o.clearTimeout(n.a),delete Go[t]),e.h=0}e.b&&(e.b.l--,delete e.b),t=e.c;for(var r=n=!1;e.g.length&&!e.i;){var i=e.g.shift(),a=i[0],s=i[1];if(i=i[2],a=e.f?s:a)try{var c=a.call(i||e.s,t);void 0!==c&&(e.f=e.f&&(c==t||c instanceof Error),e.c=t=c),(E(t)||"function"==typeof o.Promise&&t instanceof o.Promise)&&(r=!0,e.i=!0)}catch(r){t=r,e.f=!0,Mo(e)||(n=!0)}}e.c=t,r&&(c=v(e.m,e,!0),r=v(e.m,e,!1),t instanceof Po?(Oo(t,c,r),t.C=!0):t.then(c,r)),n&&(t=new Bo(t),Go[t.a]=t,e.h=t.a)}function Lo(){P.call(this)}function Uo(){P.call(this)}function Bo(e){this.a=o.setTimeout(v(this.c,this),0),this.b=e}(e=yo.prototype).Ma=function(){void 0!==a&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",lo(this.b,Eo(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},e.abort=function(){this.a&&this.c&&(lo(this.b,Eo(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),So(this))},e.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),So(this,!0)),yo.bb.Da.call(this)},e.Wb=function(){this.ya||(this.N||this.i||this.f?To(this):this.Jc())},e.Jc=function(){To(this)},e.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case bo:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var e=this.b;return e&&e.log(to,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return lo(this.b,"Can not get response: "+e.message),null}},Po.prototype.cancel=function(e){if(this.a)this.c instanceof Po&&this.c.cancel();else{if(this.b){var t=this.b;delete this.b,e?t.cancel(e):(t.l--,0>=t.l&&t.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(e=new Uo(this),Ro(this),$o(this,!1,e))}},Po.prototype.m=function(e,t){this.i=!1,$o(this,e,t)},Po.prototype.then=function(e,t,n){var r,i,a=new bt((function(e,t){r=e,i=t}));return Oo(this,r,(function(e){e instanceof Uo?a.cancel():i(e)})),a.then(e,t,n)},Po.prototype.$goog_Thenable=!0,_(Lo,P),Lo.prototype.message="Deferred has already fired",Lo.prototype.name="AlreadyCalledError",_(Uo,P),Uo.prototype.message="Deferred was canceled",Uo.prototype.name="CanceledError",Bo.prototype.c=function(){throw delete Go[this.a],this.b};var Go={};function jo(e){var t,n=document,r=ke(e).toString(),i=pt(document,"SCRIPT"),a={Xb:i,Ma:void 0},s=new Po(a);return t=window.setTimeout((function(){Fo(i,!0);var e=new Wo(qo,"Timeout reached for loading script "+r);Ro(s),$o(s,!1,e)}),5e3),a.Ma=t,i.onload=i.onreadystatechange=function(){i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(Fo(i,!1,t),Ro(s),$o(s,!0,null))},i.onerror=function(){Fo(i,!0,t);var e=new Wo(zo,"Error while loading script "+r);Ro(s),$o(s,!1,e)},fe(a={}
1490,{type:"text/javascript",charset:"UTF-8"}),st(i,a),function(e,t){me(e,"HTMLScriptElement"),e.src=ke(t),(t=e.ownerDocument&&e.ownerDocument.defaultView)&&t!=o?t=l(t.document):(null===c&&(c=l(o.document)),t=c),t&&e.setAttribute("nonce",t)}(i,e),function(e){var t;return(t=(e||document).getElementsByTagName("HEAD"))&&0!=t.length?t[0]:e.documentElement}(n).appendChild(i),s}function Vo(){if(this&&this.Xb){var e=this.Xb;e&&"SCRIPT"==e.tagName&&Fo(e,!0,this.Ma)}}function Fo(e,t,n){null!=n&&o.clearTimeout(n),e.onload=u,e.onerror=u,e.onreadystatechange=u,t&&window.setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),0)}var zo=0,qo=1;function Wo(e,t){var n="Jsloader error (code #"+e+")";t&&(n+=": "+t),P.call(this,n),this.code=e}function Ho(e){this.f=e}function Ko(e,t,n){if(this.c=e,e=t||{},this.l=e.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=e.secureTokenTimeout||Jo,this.g=pe(e.secureTokenHeaders||Zo),this.h=e.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=e.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.v=e.firebaseTimeout||Xo,this.a=pe(e.firebaseHeaders||es),n&&(this.a["X-Client-Version"]=n,this.g["X-Client-Version"]=n),n="Node"==vr(),!(n=o.XMLHttpRequest||n&&firebase.INTERNAL.node&&firebase.INTERNAL.node.XMLHttpRequest)&&!br())throw new k("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,br()?this.f=new uo(self):Ar()?this.f=new Ho(n):this.f=new Ya,this.b=null}_(Wo,P),_(Ho,qa),Ho.prototype.a=function(){return new this.f},Ho.prototype.b=function(){return{}};var Yo,Qo="idToken",Jo=new Br(3e4,6e4),Zo={"Content-Type":"application/x-www-form-urlencoded"},Xo=new Br(3e4,6e4),es={"Content-Type":"application/json"};function ts(e,t){t?e.a["X-Firebase-Locale"]=t:delete e.a["X-Firebase-Locale"]}function ns(e,t){t&&(e.l=rs("https://securetoken.googleapis.com/v1/token",t),e.h=rs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",t),e.i=rs("https://identitytoolkit.googleapis.com/v2/",t))}function rs(e,t){return e=Dn(e),t=Dn(t.url),e.f=e.a+e.f,Pn(e,t.c),e.a=t.a,$n(e,t.g),e.toString()}function is(e,t){t?(e.a["X-Client-Version"]=t,e.g["X-Client-Version"]=t):(delete e.a["X-Client-Version"],delete e.g["X-Client-Version"])}function as(e,t,n,r,i,a,s){(function(){var e=Sr();return!((e=kr(e)!=xr?null:(e=e.match(/\sChrome\/(\d+)/i))&&2==e.length?parseInt(e[1],10):null)&&30>e||qe&&it&&!(9<it))})()||br()?e=v(e.u,e):(Yo||(Yo=new bt((function(e,t){!function(e,t){if(((window.gapi||{}).client||{}).request)e();else{o[ss]=function(){((window.gapi||{}).client||{}).request?e():t(Error("CORS_UNSUPPORTED"))},function(e,t){Oo(e,null,t,void 0)}(jo(we(os,{onload:ss})),(function(){t(Error("CORS_UNSUPPORTED"))}))}}(e,t)}))),e=v(e.s,e)),e(t,n,r,i,a,s)}Ko.prototype.T=function(){return this.b},Ko.prototype.u=function(e,t,n,r,i,a){if(br()&&(void 0===o.fetch||void 0===o.Headers||void 0===o.Request))throw new k("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var s=new yo(this.f);if(a){s.g=Math.max(0,a);var c=setTimeout((function(){s.dispatchEvent("timeout")}),a)}vn(s,"complete",(function(){c&&clearTimeout(c);var e=null;try{e=JSON.parse(function(e){try{return e.a?e.a.responseText:""}catch(t){return lo(e.b,"Can not get responseText: "+t.message),""}}(this))||null}catch(t){e=null}t&&t(e)})),An(s,"ready",(function(){c&&clearTimeout(c),Vt(this)})),An(s,"timeout",(function(){c&&clearTimeout(c),Vt(this),t&&t(null)})),_o(s,e,n,r,i)};var os=new ge(Ae,"https://apis.google.com/js/client.js?onload=%{onload}"),ss="__fcb"+Math.floor(1e6*Math.random()).toString();function cs(e,t,n,r,i,a,o){var s=Dn(t+n);On(s,"key",e.c),o&&On(s,"cb",Date.now().toString());var c="GET"==r;if(c)for(var l in i)i.hasOwnProperty(l)&&On(s,l,i[l]);return new bt((function(t,n){as(e,s.toString(),(function(e){e?e.error?n(rc(e,a||{})):t(e):n(new k("network-request-failed"))}),r,c?void 0:er(Or(i)),e.a,e.v.get())}))}function ls(e){if("string"!=typeof(e=e.email)||!fr.test(e))throw new k("invalid-email")}function us(e){"email"in e&&ls(e)}function ds(e){if(!e[Qo]){if(e.mfaPendingCredential)throw new k("multi-factor-auth-required",null,pe(e));throw new k("internal-error")}}function ps(e){if(e.phoneNumber||e.temporaryProof){if(!e.phoneNumber||!e.temporaryProof)throw new k("internal-error")}else{if(!e.sessionInfo)throw new k("missing-verification-id");if(!e.code)throw new k("missing-verification-code")}}Ko.prototype.s=function(e,t,n,r,i){var a=this;Yo.then((function(){window.gapi.client.setApiKey(a.c);var o=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:e,method:n,body:r,headers:i,authType:"none",callback:function(e){window.gapi.auth.setToken(o),t&&t(e)}})})).o((function(e){t&&t({error:{message:e&&e.message||"CORS_UNSUPPORTED"}})}))},Ko.prototype.Ab=function(){return tc(this,Fs,{})},Ko.prototype.Cb=function(e,t){return tc(this,js,{idToken:e,email:t})},Ko.prototype.Db=function(e,t){return tc(this,Vs,{idToken:e,password:t})};var hs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function fs(e){if(!e.phoneVerificationInfo)throw new k("internal-error");
1490if(!e.phoneVerificationInfo.sessionInfo)throw new k("missing-verification-id");if(!e.phoneVerificationInfo.code)throw new k("missing-verification-code")}function ms(e){if(!e.requestUri||!e.sessionId&&!e.postBody&&!e.pendingToken)throw new k("internal-error")}function gs(e,t){return t.oauthIdToken&&t.providerId&&0==t.providerId.indexOf("oidc.")&&!t.pendingToken&&(e.sessionId?t.nonce=e.sessionId:e.postBody&&(Qn(e=new Wn(e.postBody),"nonce")&&(t.nonce=e.get("nonce")))),t}function ys(e){var t=null;if(e.needConfirmation?(e.code="account-exists-with-different-credential",t=za(e)):"FEDERATED_USER_ID_ALREADY_LINKED"==e.errorMessage?(e.code="credential-already-in-use",t=za(e)):"EMAIL_EXISTS"==e.errorMessage?(e.code="email-already-in-use",t=za(e)):e.errorMessage&&(t=nc(e.errorMessage)),t)throw t;ds(e)}function bs(e,t){return t.returnIdpCredential=!0,tc(e,Ws,t)}function vs(e,t){return t.returnIdpCredential=!0,tc(e,Ks,t)}function As(e,t){return t.returnIdpCredential=!0,t.autoCreate=!1,tc(e,Hs,t)}function _s(e){if(!e.oobCode)throw new k("invalid-action-code")}(e=Ko.prototype).Eb=function(e,t){var n={idToken:e},r=[];return ue(hs,(function(e,i){var a=t[i];null===a?r.push(e):i in t&&(n[i]=a)})),r.length&&(n.deleteAttribute=r),tc(this,js,n)},e.wb=function(e,t){return fe(e={requestType:"PASSWORD_RESET",email:e},t),tc(this,Ds,e)},e.xb=function(e,t){return fe(e={requestType:"EMAIL_SIGNIN",email:e},t),tc(this,Rs,e)},e.vb=function(e,t){return fe(e={requestType:"VERIFY_EMAIL",idToken:e},t),tc(this,Os,e)},e.Fb=function(e,t,n){return fe(e={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:e,newEmail:t},n),tc(this,Ms,e)},e.gb=function(e){return tc(this,Js,e)},e.ob=function(e,t){return tc(this,Bs,{oobCode:e,newPassword:t})},e.Sa=function(e){return tc(this,ks,{oobCode:e})},e.kb=function(e){return tc(this,xs,{oobCode:e})};var xs={endpoint:"setAccountInfo",A:_s,Z:"email",B:!0},ks={endpoint:"resetPassword",A:_s,G:function(e){var t=e.requestType;if(!t||!e.email&&"EMAIL_SIGNIN"!=t&&"VERIFY_AND_CHANGE_EMAIL"!=t)throw new k("internal-error")},B:!0},ws={endpoint:"signupNewUser",A:function(e){if(ls(e),!e.password)throw new k("weak-password")},G:ds,V:!0,B:!0},Ts={endpoint:"createAuthUri",B:!0},Ss={endpoint:"deleteAccount",O:["idToken"]},Cs={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(e){if(!Array.isArray(e.deleteProvider))throw new k("internal-error")}},Is={endpoint:"emailLinkSignin",O:["email","oobCode"],A:ls,G:ds,V:!0,B:!0},Ns={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:ls,G:ds,V:!0},Es={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:fs,G:ds,B:!0,Na:!0},Ps={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:fs,G:ds,B:!0,Na:!0},$s={endpoint:"getAccountInfo"},Rs={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(e){if("EMAIL_SIGNIN"!=e.requestType)throw new k("internal-error");ls(e)},Z:"email",B:!0},Os={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(e){if("VERIFY_EMAIL"!=e.requestType)throw new k("internal-error")},Z:"email",B:!0},Ms={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(e){if("VERIFY_AND_CHANGE_EMAIL"!=e.requestType)throw new k("internal-error")},Z:"email",B:!0},Ds={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(e){if("PASSWORD_RESET"!=e.requestType)throw new k("internal-error");ls(e)},Z:"email",B:!0},Ls={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},Us={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(e){if(!e.recaptchaSiteKey)throw new k("internal-error")}},Bs={endpoint:"resetPassword",A:_s,Z:"email",B:!0},Gs={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},js={endpoint:"setAccountInfo",O:["idToken"],A:us,V:!0},Vs={endpoint:"setAccountInfo",O:["idToken"],A:function(e){if(us(e),!e.password)throw new k("weak-password")},G:ds,V:!0},Fs={endpoint:"signupNewUser",G:ds,V:!0,B:!0},zs={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(e){if(!e.phoneEnrollmentInfo)throw new k("internal-error");
1490if(!e.phoneEnrollmentInfo.phoneNumber)throw new k("missing-phone-number");if(!e.phoneEnrollmentInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(e){if(!e.phoneSessionInfo||!e.phoneSessionInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},qs={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(e){if(!e.phoneSignInInfo||!e.phoneSignInInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(e){if(!e.phoneResponseInfo||!e.phoneResponseInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},Ws={endpoint:"verifyAssertion",A:ms,Za:gs,G:ys,V:!0,B:!0},Hs={endpoint:"verifyAssertion",A:ms,Za:gs,G:function(e){if(e.errorMessage&&"USER_NOT_FOUND"==e.errorMessage)throw new k("user-not-found");if(e.errorMessage)throw nc(e.errorMessage);ds(e)},V:!0,B:!0},Ks={endpoint:"verifyAssertion",A:function(e){if(ms(e),!e.idToken)throw new k("internal-error")},Za:gs,G:ys,V:!0},Ys={endpoint:"verifyCustomToken",A:function(e){if(!e.token)throw new k("invalid-custom-token")},G:ds,V:!0,B:!0},Qs={endpoint:"verifyPassword",A:function(e){if(ls(e),!e.password)throw new k("wrong-password")},G:ds,V:!0,B:!0},Js={endpoint:"verifyPhoneNumber",A:ps,G:ds,B:!0},Zs={endpoint:"verifyPhoneNumber",A:function(e){if(!e.idToken)throw new k("internal-error");ps(e)},G:function(e){if(e.temporaryProof)throw e.code="credential-already-in-use",za(e);ds(e)}},Xs={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:ps,G:ds,B:!0},ec={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(e){if(!!e[Qo]^!!e.refreshToken)throw new k("internal-error")},B:!0,Na:!0};function tc(e,t,n){if(!function(e,t){if(!t||!t.length)return!0;if(!e)return!1;for(var n=0;n<t.length;n++){var r=e[t[n]];if(null==r||""===r)return!1}return!0}(n,t.O))return St(new k("internal-error"));var r,i=!!t.Na,a=t.Vb||"POST";return Tt(n).then(t.A).then((function(){return t.V&&(n.returnSecureToken=!0),t.B&&e.b&&void 0===n.tenantId&&(n.tenantId=e.b),cs(e,i?e.i:e.h,t.endpoint,a,n,t.Ib,t.mb||!1)})).then((function(e){return r=e,t.Za?t.Za(n,r):r})).then(t.G).then((function(){if(!t.Z)return r;if(!(t.Z in r))throw new k("internal-error");return r[t.Z]}))}function nc(e){return rc({error:{errors:[{message:e}],code:400,message:e}})}function rc(e,t){var n=(e.error&&e.error.errors&&e.error.errors[0]||{}).reason||"",r={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(n=r[n]?new k(r[n]):null)return n;for(var i in n=e.error&&e.error.message||"",fe(r={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_
1490NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},t||{}),t=(t=n.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<t.length?t[1]:void 0,r)if(0===n.indexOf(i))return new k(r[i],t);return!t&&e&&(t=Rr(e)),new k("internal-error",t)}function ic(e){this.b=e,this.a=null,this.sb=function(e){return(cc||(cc=new bt((function(e,t){function n(){Ur(),Cr("gapi.load")("gapi.iframes",{callback:e,ontimeout:function(){Ur(),t(Error("Network Error"))},timeout:oc.get()})}if(Cr("gapi.iframes.Iframe"))e();else if(Cr("gapi.load"))n();else{var r="__iframefcb"+Math.floor(1e6*Math.random()).toString();o[r]=function(){Cr("gapi.load")?n():t(Error("Network Error"))},Tt(jo(r=we(ac,{onload:r}))).o((function(){t(Error("Network Error"))}))}})).o((function(e){throw cc=null,e})))).then((function(){return new bt((function(t,n){Cr("gapi.iframes.getContext")().open({where:document.body,url:e.b,messageHandlersFilter:Cr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(r){function i(){clearTimeout(a),t()}e.a=r,e.a.restyle({setHideOnLeave:!1});var a=setTimeout((function(){n(Error("Network Error"))}),sc.get());r.ping(i).then(i,(function(){n(Error("Network Error"))}))}))}))}))}(this)}var ac=new ge(Ae,"https://apis.google.com/js/api.js?onload=%{onload}"),oc=new Br(3e4,6e4),sc=new Br(5e3,15e3),cc=null;function lc(e,t,n,r){this.l=e,this.h=t,this.i=n,this.g=r,this.f=null,this.g?e=Ln((e=Dn(this.g.url)).c,e.a,e.g,"/emulator/auth/iframe"):e=Ln("https",this.l,null,"/__/auth/iframe"),this.a=e,On(this.a,"apiKey",this.h),On(this.a,"appName",this.i),this.b=null,this.c=[]}function uc(e,t,n,r,i,a){this.u=e,this.s=t,this.c=n,this.m=r,this.v=a,this.i=this.g=this.l=null,this.a=i,this.h=this.f=null}function dc(e){try{return firebase.app(e).auth().Ga()}catch(e){return[]}}function pc(e,t,n,r,i,a){this.s=e,this.g=t,this.b=n,this.f=a,this.c=r||null,this.i=i||null,this.l=this.u=this.C=null,this.h=[],this.m=this.a=null}function hc(e){var t=sr();return function(e){return tc(e,Ls,{}).then((function(e){return e.authorizedDomains||[]}))}(e).then((function(e){e:{var n=Dn(t),r=n.c;n=n.a;for(var i=0;i<e.length;i++){var a=e[i],o=n,s=r;if(0==a.indexOf("chrome-extension://")?o=Dn(a).a==o&&"chrome-extension"==s:"http"!=s&&"https"!=s?o=!1:hr.test(a)?o=o==a:(a=a.split(".").join("\\."),o=new RegExp("^(.+\\."+a+"|"+a+")$","i").test(o)),o){e=!0;break e}}e=!1}if(!e)throw new Va(sr())}
1490))}function fc(e){return e.m||(e.m=mr().then((function(){if(!e.u){var t=e.c,n=e.i,r=dc(e.b),i=new lc(e.s,e.g,e.b,e.f);i.f=t,i.b=n,i.c=Y(r||[]),e.u=i.toString()}e.v=new ic(e.u),function(e){if(!e.v)throw Error("IfcHandler must be initialized!");!function(e,t){e.sb.then((function(){e.a.register("authEvent",t,Cr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(e.v,(function(t){var n={};if(t&&t.authEvent){var r=!1;for(t=Ua(t.authEvent),n=0;n<e.h.length;n++)r=e.h[n](t)||r;return(n={}).status=r?"ACK":"ERROR",Tt(n)}return n.status="ERROR",Tt(n)}))}(e)}))),e.m}function mc(e){return e.l||(e.C=e.c?Tr(e.c,dc(e.b)):null,e.l=new Ko(e.g,N(e.i),e.C),e.f&&ns(e.l,e.f)),e.l}function gc(e,t,n,r,i,a,o,s,c,l,u,d){return(e=new uc(e,t,n,r,i,d)).l=a,e.g=o,e.i=s,e.b=pe(c||null),e.f=l,e.zb(u).toString()}function yc(e){if(this.a=e||firebase.INTERNAL.reactNative&&firebase.INTERNAL.reactNative.AsyncStorage,!this.a)throw new k("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function bc(e){this.b=e,this.a={},this.f=v(this.c,this)}lc.prototype.toString=function(){return this.f?On(this.a,"v",this.f):Yn(this.a.b,"v"),this.b?On(this.a,"eid",this.b):Yn(this.a.b,"eid"),this.c.length?On(this.a,"fw",this.c.join(",")):Yn(this.a.b,"fw"),this.a.toString()},uc.prototype.zb=function(e){return this.h=e,this},uc.prototype.toString=function(){if(this.v){var e=Dn(this.v.url);e=Ln(e.c,e.a,e.g,"/emulator/auth/handler")}else e=Ln("https",this.u,null,"/__/auth/handler");if(On(e,"apiKey",this.s),On(e,"appName",this.c),On(e,"authType",this.m),this.a.isOAuthProvider){var t=this.a;try{var n=firebase.app(this.c).auth().la()}catch(e){n=null}for(var r in t.pb=n,On(e,"providerId",this.a.providerId),t=Or((n=this.a).Jb))t[r]=t[r].toString();r=n.Qc,t=pe(t);for(var i=0;i<r.length;i++){var a=r[i];a in t&&delete t[a]}n.qb&&n.pb&&!t[n.qb]&&(t[n.qb]=n.pb),de(t)||On(e,"customParameters",Rr(t))}if("function"==typeof this.a.Rb&&((n=this.a.Rb()).length&&On(e,"scopes",n.join(","))),this.l?On(e,"redirectUrl",this.l):Yn(e.b,"redirectUrl"),this.g?On(e,"eventId",this.g):Yn(e.b,"eventId"),this.i?On(e,"v",this.i):Yn(e.b,"v"),this.b)for(var o in this.b)this.b.hasOwnProperty(o)&&!Mn(e,o)&&On(e,o,this.b[o]);return this.h?On(e,"tid",this.h):Yn(e.b,"tid"),this.f?On(e,"eid",this.f):Yn(e.b,"eid"),(o=dc(this.c)).length&&On(e,"fw",o.join(",")),e.toString()},(e=pc.prototype).Pb=function(e,t,n){var r=new k("popup-closed-by-user"),i=new k("web-storage-unsupported"),a=this,o=!1;return this.ma().then((function(){(function(e){var t={type:"webStorageSupport"};return fc(e).then((function(){return function(e,t){return e.sb.then((function(){return new bt((function(n){e.a.send(t.type,t,n,Cr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(e.v,t)})).then((function(e){if(e&&e.length&&void 0!==e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()}))})(a).then((function(n){n||(e&&dr(e),t(i),o=!0)}))})).o((function(){})).then((function(){if(!o)return function(e){return new bt((function(t){return function n(){kn(2e3).then((function(){if(e&&!e.closed)return n();t()}))}()}))}(e)})).then((function(){if(!o)return kn(n).then((function(){t(r)}))}))},e.Yb=function(){var e=Sr();return!$r(e)&&!Lr(e)},e.Ub=function(){return!1},e.Nb=function(e,t,n,r,i,a,o,s){if(!e)return St(new k("popup-blocked"));if(o&&!$r())return this.ma().o((function(t){dr(e),i(t)})),r(),Tt();this.a||(this.a=hc(mc(this)));var c=this;return this.a.then((function(){var t=c.ma().o((function(t){throw dr(e),i(t),t}));return r(),t})).then((function(){(Da(n),o)||cr(gc(c.s,c.g,c.b,t,n,null,a,c.c,void 0,c.i,s,c.f),e)})).o((function(e){throw"auth/network-request-failed"==e.code&&(c.a=null),e}))},e.Ob=function(e,t,n,r){this.a||(this.a=hc(mc(this)));var i=this;return this.a.then((function(){Da(t),cr(gc(i.s,i.g,i.b,e,t,sr(),n,i.c,void 0,i.i,r,i.f))})).o((function(e){throw"auth/network-request-failed"==e.code&&(i.a=null),e}))},e.ma=function(){var e=this;return fc(this).then((function(){return e.v.sb})).o((function(){throw e.a=null,new k("network-request-failed")}))},e.ac=function(){return!0},e.Ea=function(e){this.h.push(e)},e.Ta=function(e){H(this.h,(function(t){return t==e}))},(e=yc.prototype).get=function(e){return Tt(this.a.getItem(e)).then((function(e){return e&&Mr(e)}))},e.set=function(e,t){return Tt(this.a.setItem(e,Rr(t)))},e.U=function(e){return Tt(this.a.removeItem(e))},e.ca=function(){},e.ia=function(){};var vc,Ac=[];function _c(e,t,n){de(e.a)&&e.b.addEventListener("message",e.f),void 0===e.a[t]&&(e.a[t]=[]),e.a[t].push(n)}function xc(e){this.a=e}function kc(e){this.c=e,this.b=!1,this.a=[]}function wc(e,t,n,r){var i,a,o,s,c=n||{},l=null;if(e.b)return St(Error("connection_unavailable"));var u=r?800:50,d="undefined"!=typeof MessageChannel?new MessageChannel:null;return new bt((function(n,r){d?(i=Math.floor(Math.random()*Math.pow(10,20)).toString(),d.port1.start(),o=setTimeout((function(){r(Error("unsupported_event"))}),u),l={messageChannel:d,onMessage:a=function(e){e.data.eventId===i&&("ack"===e.data.status?(clearTimeout(o),s=setTimeout((function(){r(Error("timeout"))}),3e3)):"done"===e.data.status?(clearTimeout(s),void 0!==e.data.response?n(e.data.response):r(Error("unknown_error"))):(clearTimeout(o),clearTimeout(s),r(Error("invalid_response"))))}},e.a.push(l),d.port1.addEventListener("message",a),e.c.postMessage({eventType:t,eventId:i,data:c},[d.port2])):r(Error("connection_unavailable"))})).then((function(t){return Tc(e,l),t})).o((function(t){throw Tc(e,l),t}))}function Tc(e,t){if(t){var n=t.messageChannel,r=t.onMessage;n&&(n.port1.removeEventListener("message",r),n.port1.close()),H(e.a,(function(e){return e==t}))}}function Sc(){if(!Ec())throw new k("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=o.indexedDB,this.type="indexedDB",this.g=this.v=this.f=this.l=null,this.s=!1,this.h=null;var e=this;br()&&self?(this.v=function(){var e=br()?self:null;if(j(Ac,(function(n){n.b==e&&(t=n)})),!t){var t=new bc(e);Ac.push(t)}return t}(),_c(this.v,"keyChanged",(function(t,n){return Mc(e).then((function(t){return 0<t.length&&j(e.a,(function(e){e(t)})),{keyProcessed:q(t,n.key)}}))})),_c(this.v,"ping",(function(){return Tt(["keyChanged"])}))):function(){var e=o.navigator;return e&&e.serviceWorker?Tt().then((function(){return e.serviceWorker.ready})).then((function(e){return e.active||null})).o((function(){return null})):Tt(null)}().then((function(t){(e.h=t)&&(e.g=new kc(new xc(t)),wc(e.g,"ping",null,!0).then((function(t){t[0].fulfilled&&q(t[0].value,"keyChanged")&&(e.s=!0)})).o((function(){})))}))}function Cc(e){return new bt((function(t,n){var r=e.m.open("firebaseLocalStorageDb",1);r.onerror=function(e){try{e.preventDefault()}catch(e){}n(Error(e.target.error))},r.onupgradeneeded=function(e){e=e.target.result;try{e.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(e){n(e)}},r.onsuccess=function(r){(r=r.target.result).objectStoreNames.contains("firebaseLocalStorage")?t(r):function(e){return new bt((function(t,n){var r=e.m.deleteDatabase("firebaseLocalStorageDb");r.onsuccess=function(){t()},r.onerror=function(e){n(Error(e.target.error))}}))}(e).then((function(){return Cc(e)})).then((function(e){t(e)})).o((function(e){n(e)}))}}))}function Ic(e){return e.i||(e.i=Cc(e)),e.i}function Nc(e,t){var n=0;return new bt((function r(i,a){Ic(e).then(t).then(i).o((function(t){if(!(3<++n))return Ic(e).then((function(t){return t.close(),e.
1490i=void 0,r(i,a)})).o((function(e){a(e)}));a(t)}))}))}function Ec(){try{return!!o.indexedDB}catch(e){return!1}}function Pc(e){return e.objectStore("firebaseLocalStorage")}function $c(e,t){return e.transaction(["firebaseLocalStorage"],t?"readwrite":"readonly")}function Rc(e){return new bt((function(t,n){e.onsuccess=function(e){e&&e.target?t(e.target.result):t()},e.onerror=function(e){n(e.target.error)}}))}function Oc(e,t){return e.g&&e.h&&function(){var e=o.navigator;return e&&e.serviceWorker&&e.serviceWorker.controller||null}()===e.h?wc(e.g,"keyChanged",{key:t},e.s).then((function(){})).o((function(){})):Tt()}function Mc(e){return Ic(e).then((function(e){var t=Pc($c(e,!1));return t.getAll?Rc(t.getAll()):new bt((function(e,n){var r=[],i=t.openCursor();i.onsuccess=function(t){(t=t.target.result)?(r.push(t.value),t.continue()):e(r)},i.onerror=function(e){n(e.target.error)}}))})).then((function(t){var n={},r=[];if(0==e.b){for(r=0;r<t.length;r++)n[t[r].fbase_key]=t[r].value;r=lr(e.c,n),e.c=n}return r}))}function Dc(e){e.l&&e.l.cancel("STOP_EVENT"),e.f&&(clearTimeout(e.f),e.f=null)}function Lc(e){var t=this,n=null;this.a=[],this.type="indexedDB",this.c=e,this.b=Tt().then((function(){if(Ec()){var e=Dr(),r="__sak"+e;
1490return vc||(vc=new Sc),(n=vc).set(r,e).then((function(){return n.get(r)})).then((function(t){if(t!==e)throw Error("indexedDB not supported!");return n.U(r)})).then((function(){return n})).o((function(){return t.c}))}return t.c})).then((function(e){return t.type=e.type,e.ca((function(e){j(t.a,(function(t){t(e)}))})),e}))}function Uc(){this.a={},this.type="inMemory"}function Bc(){if(!function(){var e="Node"==vr();if(!(e=Gc()||e&&firebase.INTERNAL.node&&firebase.INTERNAL.node.localStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==vr())throw new k("internal-error","The LocalStorage compatibility library was not found.");throw new k("web-storage-unsupported")}this.a=Gc()||firebase.INTERNAL.node.localStorage,this.type="localStorage"}function Gc(){try{var e=o.localStorage,t=Dr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function jc(){this.type="nullStorage"}function Vc(){if(!function(){var e="Node"==vr();if(!(e=Fc()||e&&firebase.INTERNAL.node&&firebase.INTERNAL.node.sessionStorage))return!1;try{return e.setItem("__sak","1"),e.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==vr())throw new k("internal-error","The SessionStorage compatibility library was not found.");throw new k("web-storage-unsupported")}this.a=Fc()||firebase.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function Fc(){try{var e=o.sessionStorage,t=Dr();return e&&(e.setItem(t,"1"),e.removeItem(t)),e}catch(e){return null}}function zc(){var e={};e.Browser=Hc,e.Node=Kc,e.ReactNative=Yc,e.Worker=Qc,this.a=e[vr()]}bc.prototype.c=function(e){var t=e.data.eventType,n=e.data.eventId,r=this.a[t];if(r&&0<r.length){e.ports[0].postMessage({status:"ack",eventId:n,eventType:t,response:null});var i=[];j(r,(function(t){i.push(Tt().then((function(){return t(e.origin,e.data.data)})))})),It(i).then((function(r){var i=[];j(r,(function(e){i.push({fulfilled:e.Qb,value:e.value,reason:e.reason?e.reason.message:void 0})})),j(i,(function(e){for(var t in e)void 0===e[t]&&delete e[t]})),e.ports[0].postMessage({status:"done",eventId:n,eventType:t,response:i})}))}},xc.prototype.postMessage=function(e,t){this.a.postMessage(e,t)},kc.prototype.close=function(){for(;0<this.a.length;)Tc(this,this.a[0]);this.b=!0},(e=Sc.prototype).set=function(e,t){var n=this,r=!1;return Nc(this,(function(t){return Rc((t=Pc($c(t,!0))).get(e))})).then((function(i){return Nc(n,(function(a){if(a=Pc($c(a,!0)),i)return i.value=t,Rc(a.put(i));n.b++,r=!0;var o={};return o.fbase_key=e,o.value=t,Rc(a.add(o))}))})).then((function(){return n.c[e]=t,Oc(n,e)})).oa((function(){r&&n.b--}))},e.get=function(e){return Nc(this,(function(t){return Rc(Pc($c(t,!1)).get(e))})).then((function(e){return e&&e.value}))},e.U=function(e){var t=this,n=!1;return Nc(this,(function(r){return n=!0,t.b++,Rc(Pc($c(r,!0)).delete(e))})).then((function(){return delete t.c[e],Oc(t,e)})).oa((function(){n&&t.b--}))},e.ca=function(e){0==this.a.length&&function(e){function t(){e.f=setTimeout((function(){e.l=Mc(e).then((function(t){0<t.length&&j(e.a,(function(e){e(t)}))})).then((function(){t()})).o((function(e){"STOP_EVENT"!=e.message&&t()}))}),800)}Dc(e),t()}(this),this.a.push(e)},e.ia=function(e){H(this.a,(function(t){return t==e})),0==this.a.length&&Dc(this)},(e=Lc.prototype).get=function(e){return this.b.then((function(t){return t.get(e)}))},e.set=function(e,t){return this.b.then((function(n){return n.set(e,t)}))},e.U=function(e){return this.b.then((function(t){return t.U(e)}))},e.ca=function(e){this.a.push(e)},e.ia=function(e){H(this.a,(function(t){return t==e}))},(e=Uc.prototype).get=function(e){return Tt(this.a[e])},e.set=function(e,t){return this.a[e]=t,Tt()},e.U=function(e){return delete this.a[e],Tt()},e.ca=function(){},e.ia=function(){},(e=Bc.prototype).get=function(e){var t=this;return Tt().then((function(){return Mr(t.a.getItem(e))}))},e.set=function(e,t){var n=this;return Tt().then((function(){var r=Rr(t);null===r?n.U(e):n.a.setItem(e,r)}))},e.U=function(e){var t=this;return Tt().then((function(){t.a.removeItem(e)}))},e.ca=function(e){o.window&&on(o.window,"storage",e)},e.ia=function(e){o.window&&ln(o.window,"storage",e)},(e=jc.prototype).get=function(){return Tt(null)},e.set=function(){return Tt()},e.U=function(){return Tt()},e.ca=function(){},e.ia=function(){},(e=Vc.prototype).get=function(e){var t=this;return Tt().then((function(){return Mr(t.a.getItem(e))}))},e.set=function(e,t){var n=this;return Tt().then((function(){var r=Rr(t);null===r?n.U(e):n.a.setItem(e,r)}))},e.U=function(e){var t=this;return Tt().then((function(){t.a.removeItem(e)}))},e.ca=function(){},e.ia=function(){};
1490var qc,Wc,Hc={F:Bc,cb:Vc},Kc={F:Bc,cb:Vc},Yc={F:yc,cb:jc},Qc={F:Bc,cb:jc},Jc={rd:"local",NONE:"none",td:"session"};function Zc(){var e=!(Lr(Sr())||!yr()),t=$r(),n=Ir();this.m=e,this.h=t,this.l=n,this.a={},qc||(qc=new zc),e=qc;try{this.g=!or()&&Vr()||!o.indexedDB?new e.a.F:new Lc(br()?new Uc:new e.a.F)}catch(e){this.g=new Uc,this.h=!0}try{this.i=new e.a.cb}catch(e){this.i=new Uc}this.v=new Uc,this.f=v(this.Zb,this),this.b={}}function Xc(){return Wc||(Wc=new Zc),Wc}function el(e,t){switch(t){case"session":return e.i;case"none":return e.v;default:return e.g}}function tl(e,t){return"firebase:"+e.name+(t?":"+t:"")}function nl(e,t,n){return n=tl(t,n),"local"==t.F&&(e.b[n]=null),el(e,t.F).U(n)}function rl(e){e.c&&(clearInterval(e.c),e.c=null)}function il(e){this.a=e,this.b=Xc()}(e=Zc.prototype).get=function(e,t){return el(this,e.F).get(tl(e,t))},e.set=function(e,t,n){var r=tl(e,n),i=this,a=el(this,e.F);return a.set(r,t).then((function(){return a.get(r)})).then((function(t){"local"==e.F&&(i.b[r]=t)}))},e.addListener=function(e,t,n){e=tl(e,t),this.l&&(this.b[e]=o.localStorage.getItem(e)),de(this.a)&&(el(this,"local").ca(this.f),this.h||(or()||!Vr())&&o.indexedDB||!this.l||function(e){rl(e),e.c=setInterval((function(){for(var t in e.a){var n=o.localStorage.getItem(t),r=e.b[t];n!=r&&(e.b[t]=n,n=new Kt({type:"storage",key:t,target:window,oldValue:r,newValue:n,a:!0}),e.Zb(n))}}),1e3)}(this)),this.a[e]||(this.a[e]=[]),this.a[e].push(n)},e.removeListener=function(e,t,n){e=tl(e,t),this.a[e]&&(H(this.a[e],(function(e){return e==n})),0==this.a[e].length&&delete this.a[e]),de(this.a)&&(el(this,"local").ia(this.f),rl(this))},e.Zb=function(e){if(e&&e.g){var t=e.a.key;if(null==t)for(var n in this.a){var r=this.b[n];void 0===r&&(r=null);var i=o.localStorage.getItem(n);i!==r&&(this.b[n]=i,this.nb(n))}else if(0==t.indexOf("firebase:")&&this.a[t]){if(void 0!==e.a.a?el(this,"local").ia(this.f):rl(this),this.m)if(n=o.localStorage.getItem(t),(r=e.a.newValue)!==n)null!==r?o.localStorage.setItem(t,r):o.localStorage.removeItem(t);else if(this.b[t]===r&&void 0===e.a.a)return;var a=this;n=function(){void 0===e.a.a&&a.b[t]===o.localStorage.getItem(t)||(a.b[t]=o.localStorage.getItem(t),a.nb(t))},qe&&it&&10==it&&o.localStorage.getItem(t)!==e.a.newValue&&e.a.newValue!==e.a.oldValue?setTimeout(n,10):n()}}else j(e,v(this.nb,this))},e.nb=function(e){this.a[e]&&j(this.a[e],(function(e){e()}))};var al,ol={name:"authEvent",F:"local"};function sl(){this.a=Xc()}function cl(e,t){this.b=ll,this.f=o.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=e,this.h=t,this.l=o.Int32Array?new Int32Array(64):Array(64),void 0===al&&(al=o.Int32Array?new Int32Array(gl):gl),this.reset()}_(cl,(function(){this.b=-1}));for(var ll=64,ul=ll-1,dl=[],pl=0;pl<ul;pl++)dl[pl]=0;var hl=K(128,dl);function fl(e){for(var t=e.f,n=e.l,r=0,i=0;i<t.length;)n[r++]=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3],i=4*r;for(t=16;64>t;t++){i=0|n[t-15],r=0|n[t-2];var a=(0|n[t-16])+((i>>>7|i<<25)^(i>>>18|i<<14)^i>>>3)|0,o=(0|n[t-7])+((r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10)|0;n[t]=a+o|0}r=0|e.a[0],i=0|e.a[1];
1490var s=0|e.a[2],c=0|e.a[3],l=0|e.a[4],u=0|e.a[5],d=0|e.a[6];for(a=0|e.a[7],t=0;64>t;t++){var p=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;o=(a=a+((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))|0)+((o=(o=l&u^~l&d)+(0|al[t])|0)+(0|n[t])|0)|0,a=d,d=u,u=l,l=c+o|0,c=s,s=i,i=r,r=o+p|0}e.a[0]=e.a[0]+r|0,e.a[1]=e.a[1]+i|0,e.a[2]=e.a[2]+s|0,e.a[3]=e.a[3]+c|0,e.a[4]=e.a[4]+l|0,e.a[5]=e.a[5]+u|0,e.a[6]=e.a[6]+d|0,e.a[7]=e.a[7]+a|0}function ml(e,t,n){void 0===n&&(n=t.length);var r=0,i=e.c;if("string"==typeof t)for(;r<n;)e.f[i++]=t.charCodeAt(r++),i==e.b&&(fl(e),i=0);else{if(!p(t))throw Error("message must be string or array");for(;r<n;){var a=t[r++];if(!("number"==typeof a&&0<=a&&255>=a&&a==(0|a)))throw Error("message must be a byte array");e.f[i++]=a,i==e.b&&(fl(e),i=0)}}e.c=i,e.g+=n}cl.prototype.reset=function(){this.g=this.c=0,this.a=o.Int32Array?new Int32Array(this.h):Y(this.h)};var gl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function yl(){cl.call(this,8,bl)}_(yl,cl);var bl=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function vl(e,t,n,r,i,a){this.v=e,this.i=t,this.l=n,this.m=r||null,this.u=i||null,this.s=a,this.h=t+":"+n,this.C=new sl,this.g=new il(this.h),this.f=null,this.b=[],this.a=this.c=null}function Al(e){return new k("invalid-cordova-configuration",e)}function _l(e){var t=new yl;ml(t,e),e=[];var n=8*t.g;56>t.c?ml(t,hl,56-t.c):ml(t,hl,t.b-(t.c-56));for(var r=63;56<=r;r--)t.f[r]=255&n,n/=256;for(fl(t),r=n=0;r<t.i;r++)for(var i=24;0<=i;i-=8)e[n++]=t.a[r]>>i&255;return function(e){return F(e,(function(e){return 1<(e=e.toString(16)).length?e:"0"+e})).join("")}(e)}function xl(e,t){for(var n=0;n<e.b.length;n++)try{e.b[n](t)}catch(e){}}function kl(e){return e.f||(e.f=e.ma().then((function(){return new bt((function(t){e.Ea((function n(r){return t(r),e.Ta(n),!1})),function(e){function t(t){r=!0,i&&i.cancel(),wl(e).then((function(r){var i=n;if(r&&t&&t.url){var a=null;-1!=(i=na(t.url)).indexOf("/__/auth/callback")&&(a=(a="object"==typeof(a=Mr(Mn(a=Dn(i),"firebaseError")||null))?w(a):null)?new La(r.c,r.b,null,null,a,null,r.T()):new La(r.c,r.b,i,r.f,null,null,r.T())),i=a||n}xl(e,i)}))}var n=new La("unknown",null,null,null,new k("no-auth-event")),r=!1,i=kn(500).then((function(){return wl(e).then((function(){r||xl(e,n)}))})),a=o.handleOpenURL;o.handleOpenURL=function(e){if(0==e.toLowerCase().indexOf(Cr("BuildInfo.packageName",o).toLowerCase()+"://")&&t({url:e}),"function"==typeof a)try{a(e)}catch(e){console.error(e)}},ja||(ja=new Ba),function(e){var t=ja;t.a.push(e),t.b||(t.b=function(e){for(var n=0;n<t.a.length;n++)t.a[n](e)},"function"==typeof(e=Cr("universalLinks.subscribe",o))&&e(null,t.b))}(t)}(e)}))}))),e.f}function wl(e){var t=null;return function(e){return e.b.get(ol,e.a).then((function(e){return Ua(e)}))}(e.g).then((function(n){return t=n,nl((n=e.g).b,ol,n.a)})).then((function(){return t}))}function Tl(e){this.a=e,this.b=Xc()}(e=vl.prototype).ma=function(){return this.Ia?this.Ia:this.Ia=(gr(void 0)?mr().then((function(){return new bt((function(e,t){var n=o.document,r=setTimeout((function(){t(Error("Cordova framework is not ready."))}),1e3);n.addEventListener("deviceready",(function(){clearTimeout(r),e()}),!1)}))})):St(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!=typeof Cr("universalLinks.subscribe",o))throw Al("cordova-universal-links-plugin-fix is not installed");if(void 0===Cr("BuildInfo.packageName",o))throw Al("cordova-plugin-buildinfo is not installed");if("function"!=typeof Cr("cordova.plugins.browsertab.openUrl",o))throw Al("cordova-plugin-browsertab is not installed");if("function"!=typeof Cr("cordova.InAppBrowser.open",o))throw Al("cordova-plugin-inappbrowser is not installed")}),(function(){throw new k("cordova-not-ready")}))},e.Pb=function(e,t){return t(new k("operation-not-supported-in-this-environment")),Tt()},e.Nb=function(){return St(new k("operation-not-supported-in-this-environment"))},e.ac=function(){return!1},e.Yb=function(){return!0},e.Ub=function(){return!0},e.Ob=function(e,t,n,r){if(this.c)return St(new k("redirect-operation-pending"));var i=this,a=o.document,s=null,c=null,l=null,u=null;return this.c=Tt().then((function(){return Da(t),kl(i)})).then((function(){return function(e,t,n,r,i){var a=function(){for(var e=20,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}(),s=new La(t,r,null,a,new k("no-auth-event"),null,i),c=Cr("BuildInfo.packageName",o);if("string"!=typeof c)throw new k("invalid-cordova-configuration");var l=Cr("BuildInfo.displayName",o),u={};if(Sr().toLowerCase().match(/iphone|ipad|ipod/))u.ibi=c;else{if(!Sr().toLowerCase().match(/android/))return St(new k("operation-not-supported-in-this-environment"));u.apn=c}
1490l&&(u.appDisplayName=l),a=_l(a),u.sessionId=a;var d=gc(e.v,e.i,e.l,t,n,null,r,e.m,u,e.u,i,e.s);return e.ma().then((function(){var t=e.h;return e.C.a.set(ol,s.w(),t)})).then((function(){var t=Cr("cordova.plugins.browsertab.isAvailable",o);if("function"!=typeof t)throw new k("invalid-cordova-configuration");var n=null;t((function(t){if(t){if("function"!=typeof(n=Cr("cordova.plugins.browsertab.openUrl",o)))throw new k("invalid-cordova-configuration");n(d)}else{if("function"!=typeof(n=Cr("cordova.InAppBrowser.open",o)))throw new k("invalid-cordova-configuration");t=Sr(),e.a=n(d,t.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||t.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(i,e,t,n,r)})).then((function(){return new bt((function(e,t){c=function(){var t=Cr("cordova.plugins.browsertab.close",o);return e(),"function"==typeof t&&t(),i.a&&"function"==typeof i.a.close&&(i.a.close(),i.a=null),!1},i.Ea(c),l=function(){s||(s=kn(2e3).then((function(){t(new k("redirect-cancelled-by-user"))})))},u=function(){Gr()&&l()},a.addEventListener("resume",l,!1),Sr().toLowerCase().match(/android/)||a.addEventListener("visibilitychange",u,!1)})).o((function(e){return wl(i).then((function(){throw e}))}))})).oa((function(){l&&a.removeEventListener("resume",l,!1),u&&a.removeEventListener("visibilitychange",u,!1),s&&s.cancel(),c&&i.Ta(c),i.c=null}))},e.Ea=function(e){this.b.push(e),kl(this).o((function(t){"auth/invalid-cordova-configuration"===t.code&&(t=new La("unknown",null,null,null,new k("no-auth-event")),e(t))}))},e.Ta=function(e){H(this.b,(function(t){return t==e}))};var Sl={name:"pendingRedirect",F:"session"};function Cl(e){return nl(e.b,Sl,e.a)}function Il(e,t,n,r){this.i={},this.u=0,this.D=e,this.v=t,this.m=n,this.J=r,this.h=[],this.f=!1,this.l=v(this.s,this),this.b=new Fl,this.C=new Kl,this.g=new Tl(jl(this.v,this.m)),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.C,this.c.linkViaPopup=this.C,this.c.reauthViaPopup=this.C,this.a=Nl(this.D,this.v,this.m,T,this.J)}function Nl(e,t,n,r,i){var a=firebase.SDK_VERSION||null;return gr()?new vl(e,t,n,a,r,i):new pc(e,t,n,a,r,i)}function El(e){e.f||(e.f=!0,e.a.Ea(e.l));var t=e.a;return e.a.ma().o((function(n){throw e.a==t&&e.reset(),n}))}function Pl(e){e.a.Yb()&&El(e).o((function(t){var n=new La("unknown",null,null,null,new k("operation-not-supported-in-this-environment"));Ll(t)&&e.s(n)})),e.a.Ub()||zl(e.b)}function $l(e,t){q(e.h,t)||e.h.push(t),e.f||function(e){return e.b.get(Sl,e.a).then((function(e){return"pending"==e}))}(e.g).then((function(t){t?Cl(e.g).then((function(){El(e).o((function(t){var n=new La("unknown",null,null,null,new k("operation-not-supported-in-this-environment"));Ll(t)&&e.s(n)}))})):Pl(e)})).o((function(){Pl(e)}))}function Rl(e,t){H(e.h,(function(e){return e==t}))}Il.prototype.reset=function(){this.f=!1,this.a.Ta(this.l),this.a=Nl(this.D,this.v,this.m,null,this.J),this.i={}},Il.prototype.s=function(e){if(!e)throw new k("invalid-auth-event");if(6e5<=Date.now()-this.u&&(this.i={},this.u=0),e&&e.getUid()&&this.i.hasOwnProperty(e.getUid()))return!1;for(var t=!1,n=0;n<this.h.length;n++){var r=this.h[n];if(r.Gb(e.c,e.b)){(t=this.c[e.c])&&(t.h(e,r),e&&(e.f||e.b)&&(this.i[e.getUid()]=!0,this.u=Date.now())),t=!0;break}}return zl(this.b),t};var Ol=new Br(2e3,1e4),Ml=new Br(3e4,6e4);function Dl(e,t,n,r,i,a,o){return e.a.Nb(t,n,r,(function(){e.f||(e.f=!0,e.a.Ea(e.l))}),(function(){e.reset()}),i,a,o)}function Ll(e){return!(!e||"auth/cordova-not-ready"!=e.code)}function Ul(e,t,n,r,i){var a;return function(e){return e.b.set(Sl,"pending",e.a)}(e.g).then((function(){return e.a.Ob(t,n,r,i).o((function(t){if(Ll(t))throw new k("operation-not-supported-in-this-environment");return a=t,Cl(e.g).then((function(){throw a}))})).then((function(){return e.a.ac()?new bt((function(){})):Cl(e.g).then((function(){return e.ra()})).then((function(){})).o((function(){}))}))}))}function Bl(e,t,n,r,i){return e.a.Pb(r,(function(e){t.na(n,null,e,i)}),Ol.get())}Il.prototype.ra=function(){return this.b.ra()};var Gl={};function jl(e,t,n){return e=e+":"+t,n&&(e=e+":"+n.url),e}function Vl(e,t,n,r){var i=jl(t,n,r);return Gl[i]||(Gl[i]=new Il(e,t,n,r)),Gl[i]}function Fl(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function zl(e){e.g||(e.g=!0,Hl(e,!1,null,null))}function ql(e){e.g&&!e.i&&Hl(e,!1,null,null)}function Wl(e,t){if(e.b=function(){return Tt(t)},e.f.length)for(var n=0;n<e.f.length;n++)e.f[n](t)}function Hl(e,t,n,r){t?r?function(e,t){if(e.b=function(){return St(t)},e.c.length)for(var n=0;n<e.c.length;n++)e.c[n](t)}(e,r):Wl(e,n):Wl(e,{user:null}),e.f=[],e.c=[]}function Kl(){}function Yl(){this.jb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.jb},set:function(e){this.jb=e},enumerable:!1})}function Ql(e,t){this.a=t,Hr(this,"verificationId",e)}function Jl(e,t,n,r){return new Ra(e).gb(t,n).then((function(e){return new Ql(e,r)}))}function Zl(e){var t=Vi(e);if(!(t&&t.exp&&t.auth_time&&t.iat))throw new k("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");Kr(this,{token:e,expirationTime:jr(1e3*t.exp),authTime:jr(1e3*t.auth_time),issuedAtTime:jr(1e3*t.iat),signInProvider:t.firebase&&t.firebase.sign_in_provider?t.firebase.sign_in_provider:null,signInSecondFactor:t.firebase&&t.firebase.sign_in_second_factor?t.firebase.sign_in_second_factor:null,claims:t})}function Xl(e,t,n){var r=t&&t[tu];if(!r)throw new k("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=e,this.f=pe(t),this.g=n,this.c=new ra(null,r),this.b=[];var i=this;j(t[eu]||[],(function(e){(e=Zr(e))&&i.b.push(e)})),Hr(this,"auth",this.a),Hr(this,"session",this.c),Hr(this,"hints",this.b)}Fl.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},Fl.prototype.h=function(e,t){if(e){this.reset(),this.g=!0;var n=e.c,r=e.b,i=e.a&&"auth/web-storage-unsupported"==e.a.code,a=e.a&&"auth/operation-not-supported-in-this-environment"==e.a.code;this.i=!(!i&&!a),"unknown"!=n||i||a?e.a?(Hl(this,!0,null,e.a),Tt()):t.Fa(n,r)?function(e,t,n){n=n.Fa(t.c,t.b);var r=t.g,i=t.f,a=t.i,o=t.T(),s=!!t.c.match(/Redirect$/);n(r,i,o,a).then((function(t){Hl(e,s,t,null)})).o((function(t){Hl(e,s,null,t)}))}(this,e,t):St(new k("invalid-auth-event")):(Hl(this,!1,null,null),Tt())}else St(new k("invalid-auth-event"))},Fl.prototype.ra=function(){var e=this;return new bt((function(t,n){e.b?e.b().then(t,n):(e.f.push(t),e.c.push(n),function(e){var t=new k("timeout");e.a&&e.a.cancel(),e.a=kn(Ml.get()).then((function(){e.b||(e.g=!0,Hl(e,!0,null,t))}))}(e))}))},Kl.prototype.h=function(e,t){if(e){var n=e.c,r=e.b;e.a?(t.na(e.c,null,e.a,e.b),Tt()):t.Fa(n,r)?function(e,t){var n=e.b,r=e.c;t.Fa(r,n)(e.g,e.f,e.T(),e.i).then((function(e){t.na(r,e,null,n)})).o((function(e){t.na(r,null,e,n)}
1490))}(e,t):St(new k("invalid-auth-event"))}else St(new k("invalid-auth-event"))},Ql.prototype.confirm=function(e){return e=Oa(this.verificationId,e),this.a(e)};var eu="mfaInfo",tu="mfaPendingCredential";function nu(e,t,n,r){k.call(this,"multi-factor-auth-required",r,t),this.b=new Xl(e,t,n),Hr(this,"resolver",this.b)}function ru(e,t,n){if(e&&f(e.serverResponse)&&"auth/multi-factor-auth-required"===e.code)try{return new nu(t,e.serverResponse,n,e.message)}catch(e){}return null}function iu(){}function au(e){Hr(this,"factorId",e.fa),this.a=e}function ou(e){if(au.call(this,e),this.a.fa!=Ra.PROVIDER_ID)throw new k("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function su(e,t){for(var n in Ht.call(this,e),t)this[n]=t[n]}function cu(e,t){this.a=e,this.b=[],this.c=v(this.yc,this),on(this.a,"userReloaded",this.c);var n=[];t&&t.multiFactor&&t.multiFactor.enrolledFactors&&j(t.multiFactor.enrolledFactors,(function(e){var t=null,r={};if(e){e.uid&&(r[ti]=e.uid),e.displayName&&(r[Xr]=e.displayName),e.enrollmentTime&&(r[ei]=new Date(e.enrollmentTime).toISOString()),e.phoneNumber&&(r[ni]=e.phoneNumber);try{t=new ri(r)}catch(e){}e=t}else e=null;e&&n.push(e)})),lu(this,n)}function lu(e,t){e.b=t,Hr(e,"enrolledFactors",t)}function uu(e,t,n){if(this.h=e,this.i=t,this.g=n,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function du(e,t){e.stop(),e.b=kn(function(e,t){return t?(e.a=e.c,e.g()):(t=e.a,e.a*=2,e.a>e.f&&(e.a=e.f),t)}(e,t)).then((function(){return function(){var e=o.document,t=null;return Gr()||!e?Tt():new bt((function(n){t=function(){Gr()&&(e.removeEventListener("visibilitychange",t,!1),n())},e.addEventListener("visibilitychange",t,!1)})).o((function(n){throw e.removeEventListener("visibilitychange",t,!1),n}))}()})).then((function(){return e.h()})).then((function(){du(e,!0)})).o((function(t){e.i(t)&&du(e,!1)}))}function pu(e){this.f=e,this.b=this.a=null,this.c=Date.now()}function hu(e,t){void 0===t&&(e.b?t=(t=e.b).a-t.g:t=0),e.c=Date.now()+1e3*t}function fu(e,t){e.b=ji(t[Qo]||""),e.a=t.refreshToken,hu(e,void 0!==(t=t.expiresIn)?Number(t):void 0)}function mu(e,t){return function(e,t){return new bt((function(n,r){"refresh_token"==t.grant_type&&t.refresh_token||"authorization_code"==t.grant_type&&t.code?as(e,e.l+"?key="+encodeURIComponent(e.c),(function(e){e?e.error?r(rc(e)):e.access_token&&e.refresh_token?n(e):r(new k("internal-error")):r(new k("network-request-failed"))}),"POST",Kn(t).toString(),e.g,e.m.get()):r(new k("internal-error"))}))}(e.f,t).then((function(t){return e.b=ji(t.access_token),e.a=t.refresh_token,hu(e,t.expires_in),{accessToken:e.b.toString(),refreshToken:e.a}})).o((function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t}))}function gu(e,t){this.a=e||null,this.b=t||null,Kr(this,{lastSignInTime:jr(t||null),creationTime:jr(e||null)})}function yu(e,t,n,r,i,a){Kr(this,{uid:e,displayName:r||null,photoURL:i||null,email:n||null,phoneNumber:a||null,providerId:t})}function bu(e,t,n){this.N=[],this.l=e.apiKey,this.m=e.appName,this.s=e.authDomain||null;var r=firebase.SDK_VERSION?Tr(firebase.SDK_VERSION):null;this.a=new Ko(this.l,N(T),r),(this.u=e.emulatorConfig||null)&&ns(this.a,this.u),this.h=new pu(this.a),Cu(this,t[Qo]),fu(this.h,t),Hr(this,"refreshToken",this.h.a),Eu(this,n||{}),bn.call(this),this.P=!1,this.s&&Nr()&&(this.b=Vl(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=function(e){return new uu((function(){return e.I(!0)}),(function(e){return!(!e||"auth/network-request-failed"!=e.code)}),(function(){var t=e.h.c-Date.now()-3e5;return 0<t?t:0}))}(this),this.ba=v(this.ib,this);var i=this;this.za=null,this.Pa=function(e){i.xa(e.h)},this.qa=null,this.Ba=function(e){vu(i,e.c)},this.$=null,this.aa=[],this.Oa=function(e){xu(i,e.f)},this.ja=null,this.S=new cu(this,n),Hr(this,"multiFactor",this.S)}function vu(e,t){e.u=t,ns(e.a,t),e.b&&(t=e.b,e.b=Vl(e.s,e.l,e.m,e.u),e.P&&(Rl(t,e),$l(e.b,e)))}function Au(e,t){e.qa&&ln(e.qa,"languageCodeChanged",e.Pa),(e.qa=t)&&on(t,"languageCodeChanged",e.Pa)}function _u(e,t){e.$&&ln(e.$,"emulatorConfigChanged",e.Ba),(e.$=t)&&on(t,"emulatorConfigChanged",e.Ba)}function xu(e,t){e.aa=t,is(e.a,firebase.SDK_VERSION?Tr(firebase.SDK_VERSION,e.aa):null)}function ku(e,t){e.ja&&ln(e.ja,"frameworkChanged",e.Oa),(e.ja=t)&&on(t,"frameworkChanged",e.Oa)}function wu(e){try{return firebase.app(e.m).auth()}catch(t){throw new k("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+e.m+"'!")}}function Tu(e){e.J||e.D.b||(e.D.start(),ln(e,"tokenChanged",e.ba),on(e,"tokenChanged",e.ba))}function Su(e){ln(e,"tokenChanged",e.ba),e.D.stop()}function Cu(e,t){e.Aa=t,Hr(e,"_lat",t)}function Iu(e){for(var t=[],n=0;n<e.W.length;n++)t.push(e.W[n](e));return It(t).then((function(){return e}))}function Nu(e){e.b&&!e.P&&(e.P=!0,$l(e.b,e))}function Eu(e,t){Kr(e,{uid:t.uid,displayName:t.displayName||null,photoURL:t.photoURL||null,email:t.email||null,emailVerified:t.emailVerified||!1,phoneNumber:t.phoneNumber||null,isAnonymous:t.isAnonymous||!1,tenantId:t.tenantId||null,metadata:new gu(t.createdAt,t.lastLoginAt),providerData:[]}),e.a.b=e.tenantId}function Pu(){}function $u(e){return Tt().then((function(){if(e.J)throw new k("app-deleted")}))}function Ru(e){return F(e.providerData,(function(e){return e.providerId}))}function Ou(e,t){t&&(Mu(e,t.providerId),e.providerData.push(t))}function Mu(e,t){H(e.providerData,(function(e){return e.providerId==t}))}function Du(e,t,n){("uid"!=t||n)&&e.hasOwnProperty(t)&&Hr(e,t,n)}function Lu(e,t){e!=t&&(Kr(e,{uid:t.uid,displayName:t.displayName,photoURL:t.photoURL,email:t.email,emailVerified:t.emailVerified,phoneNumber:t.phoneNumber,isAnonymous:t.isAnonymous,tenantId:t.tenantId,providerData:[]}),t.metadata?Hr(e,"metadata",function(e){return new gu(e.a,e.b)}(t.metadata)):Hr(e,"metadata",new gu),j(t.providerData,(function(t){Ou(e,t)})),function(e,t){e.b=t.b,e.a=t.a,e.c=t.c}(e.h,t.h),Hr(e,"refreshToken",e.h.a),lu(e.S,t.S.b))}function Uu(e){return e.I().then((function(t){var n=e.isAnonymous;return function(e,t){return tc(e.a,$s,{idToken:t}).then(v(e.Kc,e))}(e,t).then((function(){return n||Du(e,"isAnonymous",!1),t}))}))}function Bu(e,t){t[Qo]&&e.Aa!=t[Qo]&&(fu(e.h,t),e.dispatchEvent(new su("tokenChanged")),Cu(e,t[Qo]),Du(e,"refreshToken",e.h.a))}function Gu(e,t){return Uu(e).then((function(){if(q(Ru(e),t))return Iu(e).then((function(){throw new k("provider-already-linked")}))}))}function ju(e,t,n){return Yr({user:e,credential:Ma(t),additionalUserInfo:t=Hi(t),operationType:n})}function Vu(e,t){return Bu(e,t),e.reload().then((function(){return e}))}function Fu(e,t,n,r,i){if(!Nr())return St(new k("operation-not-supported-in-this-environment"));if(e.i&&!i)return St(e.i);var a=Wi(n.providerId),o=Dr(e.uid+":::"),s=null;(!$r()||yr())&&e.s&&n.isOAuthProvider&&(s=gc(e.s,e.l,e.m,t,n,null,o,firebase.SDK_VERSION||null,null,null,e.tenantId,e.u));var c=pr(s,a&&a.va,a&&a.ua);return r=r().then((function(){if(qu(e),!i)return e.I().then((function(){}))})).then((function(){return Dl(e.b,c,t,n,o,!!s,e.tenantId)})).then((function(){return new bt((function(n,r){e.na(t,null,new k("cancelled-popup-request"),e.g||null),e.f=n,e.C=r,e.g=o,e.c=Bl(e.b,e,t,c,o)}))})).then((function(e){return c&&dr(c),e?Yr(e):null})).o((function(e){throw c&&dr(c),e})),Wu(e,r,i)}function zu(e,t,n,r,i){if(!Nr())return St(new k("operation-not-supported-in-this-environment"));if(e.i&&!i)return St(e.i);var a=null,o=Dr(e.uid+":::");return r=r().then((function(){if(qu(e),!i)return e.I().then((function(){}))})).then((function(){return e.ga=o,Iu(e)})).then((function(t){return e.ha&&(t=(t=e.ha).b.set(Yu,e.w(),t.a)),t})).then((function(){return Ul(e.b,t,n,o,e.tenantId)})).o((function(t){if(a=t,e.ha)return Qu(e.ha);throw a})).then((function(){if(a)throw a})),Wu(e,r,i)}function qu(e){if(!e.b||!e.P){if(e.b&&!e.P)throw new k("internal-error");throw new k("auth-domain-config-required")}}function Wu(e,t,n){var r=function(e,t,n){return e.i&&!n?(t.cancel(),St(e.i)):t.o((function(t){throw!t||"auth/user-disabled"!=t.code&&"auth/user-token-expired"!=t.code||(e.i||e.dispatchEvent(new su("userInvalidated")),e.i=t),t}))}
1490(e,t,n);return e.N.push(r),r.oa((function(){W(e.N,r)})),r.o((function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=ru(t.w(),wu(e),v(e.jc,e))),n||t}))}function Hu(e){if(!e.apiKey)return null;var t={apiKey:e.apiKey,authDomain:e.authDomain,appName:e.appName,emulatorConfig:e.emulatorConfig},n={};if(!e.stsTokenManager||!e.stsTokenManager.accessToken)return null;n[Qo]=e.stsTokenManager.accessToken,n.refreshToken=e.stsTokenManager.refreshToken||null;var r=e.stsTokenManager.expirationTime;r&&(n.expiresIn=(r-Date.now())/1e3);var i=new bu(t,n,e);return e.providerData&&j(e.providerData,(function(e){e&&Ou(i,Yr(e))})),e.redirectEventId&&(i.ga=e.redirectEventId),i}function Ku(e){this.a=e,this.b=Xc()}Xl.prototype.Rc=function(e){var t=this;return e.tb(this.a.a,this.c).then((function(e){var n=pe(t.f);return delete n[eu],delete n[tu],fe(n,e),t.g(n)}))},_(nu,k),iu.prototype.tb=function(e,t,n){return t.type==ia?function(e,t,n,r){return n.Ha().then((function(n){return n={idToken:n},void 0!==r&&(n.displayName=r),fe(n,{phoneVerificationInfo:$a(e.a)}),tc(t,Es,n)}))}(this,e,t,n):function(e,t,n){return n.Ha().then((function(n){return fe(n={mfaPendingCredential:n},{phoneVerificationInfo:$a(e.a)}),tc(t,Ps,n)}))}(this,e,t)},_(au,iu),_(ou,au),_(su,Ht),(e=cu.prototype).yc=function(e){lu(this,function(e){var t=[];return j(e.mfaInfo||[],(function(e){(e=Zr(e))&&t.push(e)})),t}(e.hd))},e.Sb=function(){return this.a.I().then((function(e){return new ra(e,null)}))},e.fc=function(e,t){var n=this,r=this.a.a;return this.Sb().then((function(n){return e.tb(r,n,t)})).then((function(e){return Bu(n.a,e),n.a.reload()}))},e.bd=function(e){var t=this,n="string"==typeof e?e:e.uid,r=this.a.a;return this.a.I().then((function(e){return tc(r,ec,{idToken:e,mfaEnrollmentId:n})})).then((function(e){var r=V(t.b,(function(e){return e.uid!=n}));return lu(t,r),Bu(t.a,e),t.a.reload().o((function(e){if("auth/user-token-expired"!=e.code)throw e}))}))},e.w=function(){return{multiFactor:{enrolledFactors:F(this.b,(function(e){return e.w()}))}}},uu.prototype.start=function(){this.a=this.c,du(this,!0)},uu.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},pu.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},pu.prototype.getToken=function(e){return e=!!e,this.b&&!this.a?St(new k("user-token-expired")):e||!this.b||Date.now()>this.c-3e4?this.a?mu(this,{grant_type:"refresh_token",refresh_token:this.a}):Tt(null):Tt({accessToken:this.b.toString(),refreshToken:this.a})},gu.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},_(bu,bn),bu.prototype.xa=function(e){this.za=e,ts(this.a,e)},bu.prototype.la=function(){return this.za},bu.prototype.Ga=function(){return Y(this.aa)},bu.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())},Hr(bu.prototype,"providerId","firebase"),(e=bu.prototype).reload=function(){var e=this;return Wu(this,$u(this).then((function(){return Uu(e).then((function(){return Iu(e)})).then(Pu)})))},e.oc=function(e){return this.I(e).then((function(e){return new Zl(e)}))},e.I=function(e){var t=this;return Wu(this,$u(this).then((function(){return t.h.getToken(e)})).then((function(e){if(!e)throw new k("internal-error");return e.accessToken!=t.Aa&&(Cu(t,e.accessToken),t.dispatchEvent(new su("tokenChanged"))),Du(t,"refreshToken",e.refreshToken),e.accessToken})))},e.Kc=function(e){if(!(e=e.users)||!e.length)throw new k("internal-error");Eu(this,{uid:(e=e[0]).localId,displayName:e.displayName,photoURL:e.photoUrl,email:e.email,emailVerified:!!e.emailVerified,phoneNumber:e.phoneNumber,lastLoginAt:e.lastLoginAt,createdAt:e.createdAt,tenantId:e.tenantId});for(var t=function(e){return(e=e.providerUserInfo)&&e.length?F(e,(function(e){return new yu(e.rawId,e.providerId,e.email,e.displayName,e.photoUrl,e.phoneNumber)})):[]}(e),n=0;n<t.length;n++)Ou(this,t[n]);Du(this,"isAnonymous",!(this.email&&e.passwordHash||this.providerData&&this.providerData.length)),this.dispatchEvent(new su("userReloaded",{hd:e}))},e.Lc=function(e){return qr("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.ub(e)},e.ub=function(e){var t=this,n=null;return Wu(this,e.c(this.a,this.uid).then((function(e){return Bu(t,e),n=ju(t,e,"reauthenticate"),t.i=null,t.reload()})).then((function(){return n})),!0)},e.Cc=function(e){return qr("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.rb(e)},e.rb=function(e){var t=this,n=null;return Wu(this,Gu(this,e.providerId).then((function(){return t.I()})).then((function(n){return e.b(t.a,n)})).then((function(e){return n=ju(t,e,"link"),Vu(t,e)})).then((function(){return n})))},e.Dc=function(e,t){var n=this;return Wu(this,Gu(this,"phone").then((function(){return Jl(wu(n),e,t,v(n.rb,n))})))},e.Mc=function(e,t){var n=this;return Wu(this,Tt().then((function(){return Jl(wu(n),e,t,v(n.ub,n))})),!0)},e.Cb=function(e){var t=this;return Wu(this,this.I().then((function(n){return t.a.Cb(n,e)})).then((function(e){return Bu(t,e),t.reload()})))},e.ed=function(e){var t=this;return Wu(this,this.I().then((function(n){return e.b(t.a,n)})).then((function(e){return Bu(t,e),t.reload()})))},e.Db=function(e){var t=this;return Wu(this,this.I().then((function(n){return t.a.Db(n,e)})).then((function(e){return Bu(t,e),t.reload()})))},e.Eb=function(e){if(void 0===e.displayName&&void 0===e.photoURL)return $u(this);var t=this;return Wu(this,this.I().then((function(n){return t.a.Eb(n,{displayName:e.displayName,photoUrl:e.photoURL})}
1490)).then((function(e){return Bu(t,e),Du(t,"displayName",e.displayName||null),Du(t,"photoURL",e.photoUrl||null),j(t.providerData,(function(e){"password"===e.providerId&&(Hr(e,"displayName",t.displayName),Hr(e,"photoURL",t.photoURL))})),Iu(t)})).then(Pu))},e.cd=function(e){var t=this;return Wu(this,Uu(this).then((function(n){return q(Ru(t),e)?function(e,t,n){return tc(e,Cs,{idToken:t,deleteProvider:n})}(t.a,n,[e]).then((function(e){var n={};return j(e.providerUserInfo||[],(function(e){n[e.providerId]=!0})),j(Ru(t),(function(e){n[e]||Mu(t,e)})),n[Ra.PROVIDER_ID]||Hr(t,"phoneNumber",null),Iu(t)})):Iu(t).then((function(){throw new k("no-such-provider")}))})))},e.delete=function(){var e=this;return Wu(this,this.I().then((function(t){return tc(e.a,Ss,{idToken:t})})).then((function(){e.dispatchEvent(new su("userDeleted"))}))).then((function(){for(var t=0;t<e.N.length;t++)e.N[t].cancel("app-deleted");Au(e,null),_u(e,null),ku(e,null),e.N=[],e.J=!0,Su(e),Hr(e,"refreshToken",null),e.b&&Rl(e.b,e)}))},e.Gb=function(e,t){return!!("linkViaPopup"==e&&(this.g||null)==t&&this.f||"reauthViaPopup"==e&&(this.g||null)==t&&this.f||"linkViaRedirect"==e&&(this.ga||null)==t||"reauthViaRedirect"==e&&(this.ga||null)==t)},e.na=function(e,t,n,r){"linkViaPopup"!=e&&"reauthViaPopup"!=e||r!=(this.g||null)||(n&&this.C?this.C(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},e.Fa=function(e,t){return"linkViaPopup"==e&&t==(this.g||null)?v(this.Lb,this):"reauthViaPopup"==e&&t==(this.g||null)?v(this.Mb,this):"linkViaRedirect"==e&&(this.ga||null)==t?v(this.Lb,this):"reauthViaRedirect"==e&&(this.ga||null)==t?v(this.Mb,this):null},e.Ec=function(e){var t=this;return Fu(this,"linkViaPopup",e,(function(){return Gu(t,e.providerId).then((function(){return Iu(t)}))}),!1)},e.Nc=function(e){return Fu(this,"reauthViaPopup",e,(function(){return Tt()}),!0)},e.Fc=function(e){var t=this;return zu(this,"linkViaRedirect",e,(function(){return Gu(t,e.providerId)}),!1)},e.Oc=function(e){return zu(this,"reauthViaRedirect",e,(function(){return Tt()}),!0)},e.Lb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var a=null;return Wu(this,this.I().then((function(n){return vs(i.a,{requestUri:e,postBody:r,sessionId:t,idToken:n})})).then((function(e){return a=ju(i,e,"link"),Vu(i,e)})).then((function(){return a})))},e.Mb=function(e,t,n,r){var i=this;this.c&&(this.c.cancel(),this.c=null);var a=null;return Wu(this,Tt().then((function(){return sa(As(i.a,{requestUri:e,sessionId:t,postBody:r,tenantId:n}),i.uid)})).then((function(e){return a=ju(i,e,"reauthenticate"),Bu(i,e),i.i=null,i.reload()})).then((function(){return a})),!0)},e.vb=function(e){var t=this,n=null;return Wu(this,this.I().then((function(t){return n=t,void 0===e||de(e)?{}:Li(new Ci(e))})).then((function(e){return t.a.vb(n,e)})).then((function(e){if(t.email!=e)return t.reload()})).then((function(){})))},e.Fb=function(e,t){var n=this,r=null;return Wu(this,this.I().then((function(e){return r=e,void 0===t||de(t)?{}:Li(new Ci(t))})).then((function(t){return n.a.Fb(r,e,t)})).then((function(e){if(n.email!=e)return n.reload()})).then((function(){})))},e.jc=function(e){var t=null,n=this;return Wu(this,e=sa(Tt(e),n.uid).then((function(e){return t=ju(n,e,"reauthenticate"),Bu(n,e),n.i=null,n.reload()})).then((function(){return t})),!0)},e.toJSON=function(){return this.w()},e.w=function(){var e={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.h.w(),redirectEventId:this.ga||null};return this.metadata&&fe(e,this.metadata.w()),j(this.providerData,(function(t){e.providerData.push(function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t))})),fe(e,this.S.w()),e};var Yu={name:"redirectUser",F:"session"};function Qu(e){return nl(e.b,Yu,e.a)}function Ju(e){this.a=e,this.b=Xc(),this.c=null,this.f=function(e){var t=ed("local"),n=ed("session"),r=ed("none");return function(e,t,n){var r=tl(t,n),i=el(e,t.F);return e.get(t,n).then((function(a){var s=null;try{s=Mr(o.localStorage.getItem(r))}catch(e){}if(s&&!a)return o.localStorage.removeItem(r),e.set(t,s,n);s&&a&&"localStorage"!=i.type&&o.localStorage.removeItem(r)}))}(e.b,t,e.a).then((function(){return e.b.get(n,e.a)})).then((function(i){return i?n:e.b.get(r,e.a).then((function(n){return n?r:e.b.get(t,e.a).then((function(n){return n?t:e.b.get(Xu,e.a).then((function(e){return e?ed(e):t}))}))}))})).then((function(t){return e.c=t,Zu(e,t.F)})).o((function(){e.c||(e.c=t)}))}(this),this.b.addListener(ed("local"),this.a,v(this.g,this))}function Zu(e,t){var n,r=[];for(n in Jc)Jc[n]!==t&&r.push(nl(e.b,ed(Jc[n]),e.a));return r.push(nl(e.b,Xu,e.a)),function(e){return new bt((function(t,n){var r=e.length,i=[];if(r)for(var a=function(e,n){r--,i[e]=n,0==r&&t(i)},o=function(e){n(e)},s=0;s<e.length;s++)Ct(e[s],A(a,s),o);else t(i)}))}(r)}Ju.prototype.g=function(){var e=this,t=ed("local");id(this,(function(){return Tt().then((function(){return e.c&&"local"!=e.c.F?e.b.get(t,e.a):null})).then((function(n){if(n)return Zu(e,"local").then((function(){e.c=t}))}))}))};var Xu={name:"persistence",F:"session"};function ed(e){return{name:"authUser",F:e}}function td(e,t){return id(e,(function(){return e.b.set(e.c,t.w(),e.a)}))}
1490function nd(e){return id(e,(function(){return nl(e.b,e.c,e.a)}))}function rd(e,t,n){return id(e,(function(){return e.b.get(e.c,e.a).then((function(e){return e&&t&&(e.authDomain=t),e&&n&&(e.emulatorConfig=n),Hu(e||{})}))}))}function id(e,t){return e.f=e.f.then(t,t),e.f}function ad(e){if(this.l=!1,Hr(this,"settings",new Yl),Hr(this,"app",e),!fd(this).options||!fd(this).options.apiKey)throw new k("invalid-api-key");e=firebase.SDK_VERSION?Tr(firebase.SDK_VERSION):null,this.a=new Ko(fd(this).options&&fd(this).options.apiKey,N(T),e),this.P=[],this.s=[],this.N=[],this.Pa=firebase.INTERNAL.createSubscribe(v(this.zc,this)),this.W=void 0,this.ib=firebase.INTERNAL.createSubscribe(v(this.Ac,this)),pd(this,null),this.i=new Ju(fd(this).options.apiKey+":"+fd(this).name),this.D=new Ku(fd(this).options.apiKey+":"+fd(this).name),this.$=bd(this,function(e){var t=fd(e).options.authDomain,n=function(e){var t=function(e,t){return e.b.get(Yu,e.a).then((function(e){return e&&t&&(e.authDomain=t),Hu(e||{})}))}(e.D,fd(e).options.authDomain).then((function(t){return(e.m=t)&&(t.ha=e.D),Qu(e.D)}));return bd(e,t)}(e).then((function(){return rd(e.i,t,e.R)})).then((function(t){return t?(t.ha=e.D,e.m&&(e.m.ga||null)==(t.ga||null)?t:t.reload().then((function(){return td(e.i,t).then((function(){return t}))})).o((function(n){return"auth/network-request-failed"==n.code?t:nd(e.i)}))):null})).then((function(t){pd(e,t||null)}));return bd(e,n)}(this)),this.h=bd(this,function(e){return e.$.then((function(){return ud(e)})).o((function(){})).then((function(){if(!e.l)return e.ja()})).o((function(){})).then((function(){if(!e.l){e.ba=!0;var t=e.i;t.b.addListener(ed("local"),t.a,e.ja)}}))}(this)),this.ba=!1,this.ja=v(this.Zc,this),this.Ba=v(this.da,this),this.qa=v(this.mc,this),this.za=v(this.wc,this),this.Aa=v(this.xc,this),this.b=null,function(e){var t=fd(e).options.authDomain,n=fd(e).options.apiKey;t&&Nr()&&(e.Oa=e.$.then((function(){if(!e.l){if(e.b=Vl(t,n,fd(e).name,e.R),$l(e.b,e),md(e)&&Nu(md(e)),e.m){Nu(e.m);var r=e.m;r.xa(e.la()),Au(r,e),xu(r=e.m,e.J),ku(r,e),vu(r=e.m,e.R),_u(r,e),e.m=null}return e.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=v(this.delete,this),this.INTERNAL.logFramework=v(this.Gc,this),this.u=0,bn.call(this),function(e){Object.defineProperty(e,"lc",{get:function(){return this.la()},set:function(e){this.xa(e)},enumerable:!1}),e.aa=null,Object.defineProperty(e,"ti",{get:function(){return this.T()},set:function(e){this.zb(e)},enumerable:!1}),e.S=null,Object.defineProperty(e,"emulatorConfig",{get:function(){if(this.R){var e=Dn(this.R.url);e=Yr({protocol:e.c,host:e.a,port:e.g,options:Yr({disableWarnings:this.R.ec})})}else e=null;return e},enumerable:!1})}(this),this.J=[],this.R=null}function od(e){Ht.call(this,"languageCodeChanged"),this.h=e}function sd(e){Ht.call(this,"emulatorConfigChanged"),this.c=e}function cd(e){Ht.call(this,"frameworkChanged"),this.f=e}function ld(e){return e.Oa||St(new k("auth-domain-config-required"))}function ud(e){if(!Nr())return St(new k("operation-not-supported-in-this-environment"));var t=ld(e).then((function(){return e.b.ra()})).then((function(e){return e?Yr(e):null}));return bd(e,t)}function dd(e,t){var n={};return n.apiKey=fd(e).options.apiKey,n.authDomain=fd(e).options.authDomain,n.appName=fd(e).name,e.R&&(n.emulatorConfig=e.R),e.$.then((function(){return function(e,t,n,r){var i=new bu(e,t);return n&&(i.ha=n),r&&xu(i,r),i.reload().then((function(){return i}))}(n,t,e.D,e.Ga())})).then((function(t){return md(e)&&t.uid==md(e).uid?(Lu(md(e),t),e.da(t)):(pd(e,t),Nu(t),e.da(t))})).then((function(){yd(e)}))}function pd(e,t){md(e)&&(function(e,t){H(e.W,(function(e){return e==t}))}(md(e),e.Ba),ln(md(e),"tokenChanged",e.qa),ln(md(e),"userDeleted",e.za),ln(md(e),"userInvalidated",e.Aa),Su(md(e))),t&&(t.W.push(e.Ba),on(t,"tokenChanged",e.qa),on(t,"userDeleted",e.za),on(t,"userInvalidated",e.Aa),0<e.u&&Tu(t)),Hr(e,"currentUser",t),t&&(t.xa(e.la()),Au(t,e),xu(t,e.J),ku(t,e),vu(t,e.R),_u(t,e))}function hd(e,t){var n=null,r=null;return bd(e,t.then((function(t){return n=Ma(t),r=Hi(t),dd(e,t)}),(function(t){var n=null;throw t&&"auth/multi-factor-auth-required"===t.code&&(n=ru(t.w(),e,v(e.kc,e))),n||t})).then((function(){return Yr({user:md(e),credential:n,additionalUserInfo:r,operationType:"signIn"})})))}function fd(e){return e.app}function md(e){return e.currentUser}function gd(e){return md(e)&&md(e)._lat||null}function yd(e){if(e.ba){for(var t=0;t<e.s.length;t++)e.s[t]&&e.s[t](gd(e));if(e.W!==e.getUid()&&e.N.length)for(e.W=e.getUid(),t=0;t<e.N.length;t++)e.N[t]&&e.N[t](gd(e))}}function bd(e,t){return e.P.push(t),t.oa((function(){W(e.P,t)})),t}function vd(){}function Ad(){this.a={},this.b=1e12}Ju.prototype.yb=function(e){var t=null,n=this;return function(e){var t=new k("invalid-persistence-type"),n=new k("unsupported-persistence-type");e:{for(r in Jc)if(Jc[r]==e){var r=!0;break e}r=!1}if(!r||"string"!=typeof e)throw t;switch(vr()){case"ReactNative":if("session"===e)throw n;break;case"Node":if("none"!==e)throw n;break;case"Worker":if("session"===e||!Ec()&&"none"!==e)throw n;break;default:if(!Ir()&&"none"!==e)throw n}}
1490(e),id(this,(function(){return e!=n.c.F?n.b.get(n.c,n.a).then((function(r){return t=r,Zu(n,e)})).then((function(){if(n.c=ed(e),t)return n.b.set(n.c,t,n.a)})):Tt()}))},_(ad,bn),_(od,Ht),_(sd,Ht),_(cd,Ht),(e=ad.prototype).yb=function(e){return bd(this,e=this.i.yb(e))},e.xa=function(e){this.aa===e||this.l||(this.aa=e,ts(this.a,this.aa),this.dispatchEvent(new od(this.la())))},e.la=function(){return this.aa},e.fd=function(){var e=o.navigator;this.xa(e&&(e.languages&&e.languages[0]||e.language||e.userLanguage)||null)},e.gd=function(e,t){if(!this.R){if(!/^https?:\/\//.test(e))throw new k("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");(function(e){"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),o.document&&!e&&mr().then((function(){var e=o.document.createElement("div");e.innerText="Running in emulator mode. Do not use with production credentials.",e.style.position="fixed",e.style.width="100%",e.style.backgroundColor="#ffffff",e.style.border=".1em solid #000000",e.style.color="#b50000",e.style.bottom="0px",e.style.left="0px",e.style.margin="0px",e.style.zIndex=1e4,e.style.textAlign="center",e.classList.add("firebase-emulator-warning"),o.document.body.appendChild(e)}))})(t=!!t&&!!t.disableWarnings),this.R={url:e,ec:t},this.settings.jb=!0,ns(this.a,this.R),this.dispatchEvent(new sd(this.R))}},e.Gc=function(e){this.J.push(e),is(this.a,firebase.SDK_VERSION?Tr(firebase.SDK_VERSION,this.J):null),this.dispatchEvent(new cd(this.J))},e.Ga=function(){return Y(this.J)},e.zb=function(e){this.S===e||this.l||(this.S=e,this.a.b=this.S)},e.T=function(){return this.S},e.toJSON=function(){return{apiKey:fd(this).options.apiKey,authDomain:fd(this).options.authDomain,appName:fd(this).name,currentUser:md(this)&&md(this).w()}},e.Gb=function(e,t){switch(e){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==t&&!!this.f;default:return!1}},e.na=function(e,t,n,r){"signInViaPopup"==e&&this.g==r&&(n&&this.C?this.C(n):t&&!n&&this.f&&this.f(t),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},e.Fa=function(e,t){return"signInViaRedirect"==e||"signInViaPopup"==e&&this.g==t&&this.f?v(this.ic,this):null},e.ic=function(e,t,n,r){var i=this,a={requestUri:e,postBody:r,sessionId:t,tenantId:n};return this.c&&(this.c.cancel(),this.c=null),i.$.then((function(){return hd(i,bs(i.a,a))}))},e.Xc=function(e){if(!Nr())return St(new k("operation-not-supported-in-this-environment"));var t=this,n=Wi(e.providerId),r=Dr(),i=null;(!$r()||yr())&&fd(this).options.authDomain&&e.isOAuthProvider&&(i=gc(fd(this).options.authDomain,fd(this).options.apiKey,fd(this).name,"signInViaPopup",e,null,r,firebase.SDK_VERSION||null,null,null,this.T(),this.R));var a=pr(i,n&&n.va,n&&n.ua);return bd(this,n=ld(this).then((function(n){return Dl(n,a,"signInViaPopup",e,r,!!i,t.T())})).then((function(){return new bt((function(e,n){t.na("signInViaPopup",null,new k("cancelled-popup-request"),t.g),t.f=e,t.C=n,t.g=r,t.c=Bl(t.b,t,"signInViaPopup",a,r)}))})).then((function(e){return a&&dr(a),e?Yr(e):null})).o((function(e){throw a&&dr(a),e})))},e.Yc=function(e){if(!Nr())return St(new k("operation-not-supported-in-this-environment"));var t=this;return bd(this,ld(this).then((function(){return function(e){return id(e,(function(){return e.b.set(Xu,e.c.F,e.a)}))}(t.i)})).then((function(){return Ul(t.b,"signInViaRedirect",e,void 0,t.T())})))},e.ra=function(){var e=this;return ud(this).then((function(t){return e.b&&ql(e.b.b),t})).o((function(t){throw e.b&&ql(e.b.b),t}))},e.dd=function(e){if(!e)return St(new k("null-user"));if(this.S!=e.tenantId)return St(new k("tenant-id-mismatch"));var t=this,n={};n.apiKey=fd(this).options.apiKey,n.authDomain=fd(this).options.authDomain,n.appName=fd(this).name;var r=function(e,t,n,r){var i=e.h,a={};return a[Qo]=i.b&&i.b.toString(),a.refreshToken=i.a,t=new bu(t||{apiKey:e.l,authDomain:e.s,appName:e.m},a),n&&(t.ha=n),r&&xu(t,r),Lu(t,e),t}(e,n,t.D,t.Ga());return bd(this,this.h.then((function(){if(fd(t).options.apiKey!=e.l)return r.reload()})).then((function(){return md(t)&&e.uid==md(t).uid?(Lu(md(t),e),t.da(e)):(pd(t,r),Nu(r),t.da(r))})).then((function(){yd(t)})))},e.Bb=function(){var e=this;return bd(this,this.h.then((function(){return e.b&&ql(e.b.b),md(e)?(pd(e,null),nd(e.i).then((function(){yd(e)}))):Tt()})))},e.Zc=function(){var e=this;return rd(this.i,fd(this).options.authDomain).then((function(t){if(!e.l){var n;if(n=md(e)&&t){n=md(e).uid;var r=t.uid;n=null!=n&&""!==n&&null!=r&&""!==r&&n==r}if(n)return Lu(md(e),t),md(e).I();(md(e)||t)&&(pd(e,t),t&&(Nu(t),t.ha=e.D),e.b&&$l(e.b,e),yd(e))}}))},e.da=function(e){return td(this.i,e)},e.mc=function(){yd(this),this.da(md(this))},e.wc=function(){this.Bb()},e.xc=function(){this.Bb()},e.kc=function(e){var t=this;return this.h.then((function(){return hd(t,Tt(e))}))},e.zc=function(e){var t=this;this.addAuthTokenListener((function(){e.next(md(t))}))},e.Ac=function(e){var t=this;!function(e,t){e.N.push(t),bd(e,e.h.then((function(){!e.l&&q(e.N,t)&&e.W!==e.getUid()&&(e.W=e.getUid(),t(gd(e)))})))}(this,(function(){e.next(md(t))}))},e.Ic=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){"function"==typeof e?e(md(r)):"function"==typeof e.next&&e.next(md(r))})),this.Pa(e,t,n)},e.Hc=function(e,t,n){var r=this;return this.ba&&Promise.resolve().then((function(){r.W=r.getUid(),"function"==typeof e?e(md(r)):"function"==typeof e.next&&e.next(md(r))})),this.ib(e,t,n)},e.nc=function(e){var t=this;return bd(this,this.h.then((function(){return md(t)?md(t).I(e).then((function(e){return{accessToken:e}})):null})))},e.Tc=function(e){var t=this;return this.h.then((function(){return hd(t,tc(t.a,Ys,{token:e}))})).then((function(e){var n=e.user;return Du(n,"isAnonymous",!1),t.da(n),e}))},e.Uc=function(e,t){var n=this;return this.h.then((function(){return hd(n,tc(n.a,Qs,{email:e,password:t}))}))},e.dc=function(e,t){var n=this;return this.h.then((function(){return hd(n,tc(n.a,ws,{email:e,password:t}))}))},e.ab=function(e){var t=this;return this.h.then((function(){return hd(t,e.ka(t.a))}))},e.Sc=function(e){return qr("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.ab(e)},e.Ab=function(){var e=this;return this.h.then((function(){var t=md(e);if(t&&t.isAnonymous){var n=Yr({providerId:null,isNewUser:!1});return Yr({user:t,credential:null,additionalUserInfo:n,operationType:"signIn"})}return hd(e,e.a.Ab()).then((function(t){var n=t.user;return Du(n,"isAnonymous",!0),e.da(n),t}))}))},e.getUid=function(){return md(this)&&md(this).uid||null},e.cc=function(e){this.addAuthTokenListener(e),this.u++,0<this.u&&md(this)&&Tu(md(this))},e.Pc=function(e){var t=this;j(this.s,(function(n){n==e&&t.u--})),0>this.u&&(this.u=0),0==this.u&&md(this)&&Su(md(this)),this.removeAuthTokenListener(e)},e.addAuthTokenListener=function(e){var t=this;this.s.push(e),bd(this,this.h.then((function(){t.l||q(t.s,e)&&e(gd(t))})))},e.removeAuthTokenListener=function(e){H(this.s,(function(t){return t==e}))},e.delete=function(){this.l=!0;for(var e=0;e<this.P.length;e++)this.P[e].cancel("app-deleted");return this.P=[],this.i&&(e=this.i).b.removeListener(ed("local"),e.a,this.ja),this.b&&(Rl(this.b,this),ql(this.b.b)),Promise.resolve()},e.hc=function(e){return bd(this,function(e,t){return tc(e,Ts,{identifier:t,continueUri:Er()?sr():"http://localhost"}).then((function(e){return e.signinMethods||[]}))}(this.a,e))},e.Bc=function(e){return!!Na(e)},e.xb=function(e,t){var n=this;return bd(this,Tt().then((function(){var e=new Ci(t);if(!e.c)throw new k("argument-error",Ei+" must be true when sending sign in link to email");return Li(e)})).then((function(t){return n.a.xb(e,t)})).then((function(){})))},e.jd=function(e){return this.Sa(e).then((function(e){return e.data.email}))},e.ob=function(e,t){return bd(this,this.a.ob(e,t).then((function(){})))},e.Sa=function(e){return bd(this,this.a.Sa(e).then((function(e){return new ii(e)})))},e.kb=function(e){return bd(this,this.a.kb(e).then((function(){})))},e.wb=function(e,t){var n=this;return bd(this,Tt().then((function(){return void 0===t||de(t)?{}:Li(new Ci(t))})).then((function(t){return n.a.wb(e,t)})).then((function(){})))},e.Wc=function(e,t){return bd(this,Jl(this,e,t,v(this.ab,this)))},e.Vc=function(e,t){var n=this;return bd(this,Tt().then((function(){var r=t||sr(),i=Ia(e,r);if(!(r=Na(r)))throw new k("argument-error","Invalid email link!");if(r.tenantId!==n.T())throw new k("tenant-id-mismatch");return n.ab(i)})))},vd.prototype.render=function(){},vd.prototype.reset=function(){},vd.prototype.getResponse=function(){},vd.prototype.execute=function(){};var _d=null;function xd(e,t){return(t=kd(t))&&e.a[t]||null}function kd(e){return(e=void 0===e?1e12:e)?e.toString():null}function wd(e,t){this.g=!1,this.c=t,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=ot(e);var n=this;this.i=function(){n.execute()},this.h?this.execute():on(this.f,"click",this.i)}function Td(e){if(e.g)throw Error("reCAPTCHA mock was already deleted!")}function Sd(){}function Cd(){}Ad.prototype.render=function(e,t){return this.a[this.b.toString()]=new wd(e,t),this.b++},Ad.prototype.reset=function(e){var t=xd(this,e);e=kd(e),t&&e&&(t.delete(),delete this.a[e])},Ad.prototype.getResponse=function(e){return(e=xd(this,e))?e.getResponse():null},Ad.prototype.execute=function(e){(e=xd(this,e))&&e.execute()},wd.prototype.getResponse=function(){return Td(this),this.b},wd.prototype.execute=function(){Td(this);var e=this;this.a||(this.a=setTimeout((function(){e.b=function(){for(var e=50,t=[];0<e;)t.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),e--;return t.join("")}();var t=e.c.callback,n=e.c["expired-callback"];if(t)try{t(e.b)}catch(e){}e.a=setTimeout((function(){if(e.a=null,e.b=null,n)try{n()}catch(e){}e.h&&e.execute()}),6e4)}),500))},wd.prototype.delete=function(){Td(this),this.g=!0,clearTimeout(this.a),this.a=null,ln(this.f,"click",this.i)},Hr(Sd,"FACTOR_ID","phone"),Cd.prototype.g=function(){return _d||(_d=new Ad),Tt(_d)},Cd.prototype.c=function(){};var Id=null;function Nd(){this.b=o.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Ed=new ge(Ae,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),Pd=new Br(3e4,6e4);Nd.prototype.g=function(e){var t=this;return new bt((function(n,r){var i=setTimeout((function(){r(new k("network-request-failed"))}),Pd.get());!o.grecaptcha||e!==t.f&&!t.b?(o[t.a]=function(){if(o.grecaptcha){t.f=e;var a=o.grecaptcha.render;o.grecaptcha.render=function(e,n){return e=a(e,n),t.b++,e},clearTimeout(i),n(o.grecaptcha)}else clearTimeout(i),r(new k("internal-error"));delete o[t.a]},Tt(jo(we(Ed,{onload:t.a,hl:e||""}))).o((function(){clearTimeout(i),r(new k("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(i),n(o.grecaptcha))}))},Nd.prototype.c=function(){this.b--};var $d=null;
1490function Rd(e,t,n,r,i,a,s){if(Hr(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=t,this.g=null,s?(Id||(Id=new Cd),s=Id):($d||($d=new Nd),s=$d),this.m=s,this.a=n||{theme:"light",type:"image"},this.h=[],this.a[Dd])throw new k("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[Ld],!o.document)throw new k("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!ot(t)||!this.i&&ot(t).hasChildNodes())throw new k("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Ko(e,a||null,i||null),this.u=r||function(){return null};var c=this;this.l=[];var l=this.a[Od];this.a[Od]=function(e){if(Ud(c,e),"function"==typeof l)l(e);else if("string"==typeof l){var t=Cr(l,o);"function"==typeof t&&t(e)}};var u=this.a[Md];this.a[Md]=function(){if(Ud(c,null),"function"==typeof u)u();else if("string"==typeof u){var e=Cr(u,o);"function"==typeof e&&e()}}}var Od="callback",Md="expired-callback",Dd="sitekey",Ld="size";function Ud(e,t){for(var n=0;n<e.l.length;n++)try{e.l[n](t)}catch(e){}}function Bd(e,t){return e.h.push(t),t.oa((function(){W(e.h,t)})),t}function Gd(e){if(e.J)throw new k("internal-error","RecaptchaVerifier instance has been destroyed.")}function jd(e,t,n){var r=!1;try{this.b=n||firebase.app()}catch(e){throw new k("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new k("invalid-api-key");n=this.b.options.apiKey;var i=this,a=null;try{a=this.b.auth().Ga()}catch(e){}try{r=this.b.auth().settings.appVerificationDisabledForTesting}catch(e){}a=firebase.SDK_VERSION?Tr(firebase.SDK_VERSION,a):null,Rd.call(this,n,e,t,(function(){try{var e=i.b.auth().la()}catch(t){e=null}return e}),a,N(T),r)}function Vd(e,t,n,r){e:{n=Array.prototype.slice.call(n);for(var i=0,a=!1,o=0;o<t.length;o++)if(t[o].optional)a=!0;else{if(a)throw new k("internal-error","Argument validator encountered a required argument after an optional argument.");i++}if(a=t.length,n.length<i||a<n.length)r="Expected "+(i==a?1==i?"1 argument":i+" arguments":i+"-"+a+" arguments")+" but got "+n.length+".";else{for(i=0;i<n.length;i++)if(a=t[i].optional&&void 0===n[i],!t[i].M(n[i])&&!a){if(t=t[i],0>i||i>=Fd.length)throw new k("internal-error","Argument validator received an unsupported number of arguments.");n=Fd[i],r=(r?"":n+" argument ")+(t.name?'"'+t.name+'" ':"")+"must be "+t.K+".";break e}r=null}}if(r)throw new k("argument-error",e+" failed: "+r)}(e=Rd.prototype).Ia=function(){var e=this;return this.f?this.f:this.f=Bd(this,Tt().then((function(){if(Er()&&!br())return mr();throw new k("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return e.m.g(e.u())})).then((function(t){return e.g=t,tc(e.s,Us,{})})).then((function(t){e.a[Dd]=t.recaptchaSiteKey})).o((function(t){throw e.f=null,t})))},e.render=function(){Gd(this);var e=this;return Bd(this,this.Ia().then((function(){if(null===e.c){var t=e.v;if(!e.i){var n=ot(t);t=function(e,t,n){var r=arguments,i=document,a=String(r[0]),o=r[1];if(!at&&o&&(o.name||o.type)){if(a=["<",a],o.name&&a.push(' name="',je(o.name),'"'),o.type){a.push(' type="',je(o.type),'"');var s={};fe(s,o),delete s.type,o=s}a.push(">"),a=a.join("")}return a=pt(i,a),o&&("string"==typeof o?a.className=o:Array.isArray(o)?a.className=o.join(" "):st(a,o)),2<r.length&&dt(i,a,r),a}("DIV"),n.appendChild(t)}e.c=e.g.render(t,e.a)}return e.c})))},e.verify=function(){Gd(this);var e=this;return Bd(this,this.render().then((function(t){return new bt((function(n){var r=e.g.getResponse(t);if(r)n(r);else{var i=function(t){t&&(function(e,t){H(e.l,(function(e){return e==t}))}(e,i),n(t))};e.l.push(i),e.i&&e.g.execute(e.c)}}))})))},e.reset=function(){Gd(this),null!==this.c&&this.g.reset(this.c)},e.clear=function(){Gd(this),this.J=!0,this.m.c();for(var e=0;e<this.h.length;e++)this.h[e].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){e=ot(this.v);for(var t;t=e.firstChild;)e.removeChild(t)}},_(jd,Rd);var Fd="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function zd(e,t){return{name:e||"",K:"a valid string",optional:!!t,M:function(e){return"string"==typeof e}}}function qd(e,t){return{name:e||"",K:"a boolean",optional:!!t,M:function(e){return"boolean"==typeof e}}}function Wd(e,t){return{name:e||"",K:"a valid object",optional:!!t,M:f}}function Hd(e,t){return{name:e||"",K:"a function",optional:!!t,M:function(e){return"function"==typeof e}}}function Kd(e,t){return{name:e||"",K:"null",optional:!!t,M:function(e){return null===e}}}function Yd(e){return{name:e?e+"Credential":"credential",K:e?"a valid "+e+" credential":"a valid credential",optional:!1,M:function(t){if(!t)return!1;var n=!e||t.providerId===e;return!(!t.ka||!n)}}}function Qd(e,t){return f(e)&&"string"==typeof e.type&&e.type===t&&"function"==typeof e.Ha}function Jd(e){return f(e)&&"string"==typeof e.uid}function Zd(e,t,n,r){return{name:n||"",K:e.K+" or "+t.K,optional:!!r,M:function(n){return e.M(n)||t.M(n)}}}function Xd(e,t){for(var n in t){var r=t[n].name;e[r]=np(r,e[n],t[n].j)}}function ep(e,t){for(var n in t){var r=t[n].name;r!==n&&Object.defineProperty(e,r,{get:A((function(e){return this[e]}
1490),n),set:A((function(e,t,n,r){Vd(e,[n],[r],!0),this[t]=r}),r,n,t[n].lb),enumerable:!0})}}function tp(e,t,n,r){e[t]=np(t,n,r)}function np(e,t,n){function r(){var e=Array.prototype.slice.call(arguments);return Vd(a,n,e),t.apply(this,e)}if(!n)return t;var i,a=function(e){return(e=e.split("."))[e.length-1]}(e);for(i in t)r[i]=t[i];for(i in t.prototype)r.prototype[i]=t.prototype[i];return r}Xd(ad.prototype,{kb:{name:"applyActionCode",j:[zd("code")]},Sa:{name:"checkActionCode",j:[zd("code")]},ob:{name:"confirmPasswordReset",j:[zd("code"),zd("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[zd("email"),zd("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[zd("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[zd("emailLink")]},Hc:{name:"onAuthStateChanged",j:[Zd(Wd(),Hd(),"nextOrObserver"),Hd("opt_error",!0),Hd("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[Zd(Wd(),Hd(),"nextOrObserver"),Hd("opt_error",!0),Hd("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[zd("email"),Zd(Wd("opt_actionCodeSettings",!0),Kd(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[zd("email"),Wd("actionCodeSettings")]},yb:{name:"setPersistence",j:[zd("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[Yd()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[Yd()]},Tc:{name:"signInWithCustomToken",j:[zd("token")]},Uc:{name:"signInWithEmailAndPassword",j:[zd("email"),zd("password")]},Vc:{name:"signInWithEmailLink",j:[zd("email"),zd("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[zd("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!=typeof e.type||"function"!=typeof e.verify)}}]},Xc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Yc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},dd:{name:"updateCurrentUser",j:[Zd({name:"user",K:"an instance of Firebase User",optional:!1,M:function(e){return!!(e&&e instanceof bu)}},Kd(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[zd(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[zd("url"),Wd("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[zd("code")]}}),ep(ad.prototype,{lc:{name:"languageCode",lb:Zd(zd(),Kd(),"languageCode")},ti:{name:"tenantId",lb:Zd(zd(),Kd(),"tenantId")}}),ad.Persistence=Jc,ad.Persistence.LOCAL="local",ad.Persistence.SESSION="session",ad.Persistence.NONE="none",Xd(bu.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[qd("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[qd("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[Yd()]},rb:{name:"linkWithCredential",j:[Yd()]},Dc:{name:"linkWithPhoneNumber",j:[zd("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!=typeof e.type||"function"!=typeof e.verify)}}]},Ec:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Fc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[Yd()]},ub:{name:"reauthenticateWithCredential",j:[Yd()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[zd("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!=typeof e.type||"function"!=typeof e.verify)}}]},Nc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(e){return!!(e&&e.providerId&&e.hasOwnProperty&&e.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[Zd(Wd("opt_actionCodeSettings",!0),Kd(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[zd(null,!0)]},cd:{name:"unlink",j:[zd("provider")]},Cb:{name:"updateEmail",j:[zd("email")]},Db:{name:"updatePassword",j:[zd("password")]},ed:{name:"updatePhoneNumber",j:[Yd("phone")]},Eb:{name:"updateProfile",j:[Wd("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[zd("email"),Zd(Wd("opt_actionCodeSettings",!0),Kd(null,!0),"opt_actionCodeSettings",!0)]}}),Xd(Ad.prototype,{execute:{name:"execute"},render:{name:"render"}
1490,reset:{name:"reset"},getResponse:{name:"getResponse"}}),Xd(vd.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),Xd(bt.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),ep(Yl.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:qd("appVerificationDisabledForTesting")}}),Xd(Ql.prototype,{confirm:{name:"confirm",j:[zd("verificationCode")]}}),tp(oa,"fromJSON",(function(e){e="string"==typeof e?JSON.parse(e):e;for(var t,n=[ha,Sa,Pa,ua],r=0;r<n.length;r++)if(t=n[r](e))return t;return null}),[Zd(zd(),Wd(),"json")]),tp(Ca,"credential",(function(e,t){return new Ta(e,t)}),[zd("email"),zd("password")]),Xd(Ta.prototype,{w:{name:"toJSON",j:[zd(null,!0)]}}),Xd(ya.prototype,{Ca:{name:"addScope",j:[zd("scope")]},Ka:{name:"setCustomParameters",j:[Wd("customOAuthParameters")]}}),tp(ya,"credential",ba,[Zd(zd(),Wd(),"token")]),tp(Ca,"credentialWithLink",Ia,[zd("email"),zd("emailLink")]),Xd(va.prototype,{Ca:{name:"addScope",j:[zd("scope")]},Ka:{name:"setCustomParameters",j:[Wd("customOAuthParameters")]}}),tp(va,"credential",Aa,[Zd(zd(),Wd(),"token")]),Xd(_a.prototype,{Ca:{name:"addScope",j:[zd("scope")]},Ka:{name:"setCustomParameters",j:[Wd("customOAuthParameters")]}}),tp(_a,"credential",xa,[Zd(zd(),Zd(Wd(),Kd()),"idToken"),Zd(zd(),Kd(),"accessToken",!0)]),Xd(ka.prototype,{Ka:{name:"setCustomParameters",j:[Wd("customOAuthParameters")]}}),tp(ka,"credential",wa,[Zd(zd(),Wd(),"token"),zd("secret",!0)]),Xd(ga.prototype,{Ca:{name:"addScope",j:[zd("scope")]},credential:{name:"credential",j:[Zd(zd(),Zd(Wd(),Kd()),"optionsOrIdToken"),Zd(zd(),Kd(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[Wd("customOAuthParameters")]}}),Xd(da.prototype,{w:{name:"toJSON",j:[zd(null,!0)]}}),Xd(ca.prototype,{w:{name:"toJSON",j:[zd(null,!0)]}}),tp(Ra,"credential",Oa,[zd("verificationId"),zd("verificationCode")]),Xd(Ra.prototype,{gb:{name:"verifyPhoneNumber",j:[Zd(zd(),{name:"phoneInfoOptions",K:"valid phone info options",optional:!1,M:function(e){return!!e&&(e.session&&e.phoneNumber?Qd(e.session,ia)&&"string"==typeof e.phoneNumber:e.session&&e.multiFactorHint?Qd(e.session,aa)&&Jd(e.multiFactorHint):e.session&&e.multiFactorUid?Qd(e.session,aa)&&"string"==typeof e.multiFactorUid:!!e.phoneNumber&&"string"==typeof e.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(e){return!(!e||"string"!=typeof e.type||"function"!=typeof e.verify)}}]}}),Xd(Ea.prototype,{w:{name:"toJSON",j:[zd(null,!0)]}}),Xd(k.prototype,{toJSON:{name:"toJSON",j:[zd(null,!0)]}}),Xd(Fa.prototype,{toJSON:{name:"toJSON",j:[zd(null,!0)]}}),Xd(Va.prototype,{toJSON:{name:"toJSON",j:[zd(null,!0)]}}),Xd(nu.prototype,{toJSON:{name:"toJSON",j:[zd(null,!0)]}}),Xd(Xl.prototype,{Rc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(e){return!!e&&!!e.tb}}]}}),Xd(cu.prototype,{Sb:{name:"getSession",j:[]},fc:{name:"enroll",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(e){return!!e&&!!e.tb}},zd("displayName",!0)]},bd:{name:"unenroll",j:[Zd({name:"multiFactorInfo",K:"a valid multiFactorInfo",optional:!1,M:Jd},zd(),"multiFactorInfoIdentifier")]}}),Xd(jd.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),tp(bi,"parseLink",Si,[zd("link")]),tp(Sd,"assertion",(function(e){return new ou(e)}),[Yd("phone")]),function(){if(void 0===firebase||!firebase.INTERNAL||!firebase.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var e={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:oi,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:ai,VERIFY_AND_CHANGE_EMAIL:si,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:ad,AuthCredential:oa,Error:k};tp(e,"EmailAuthProvider",Ca,[]),tp(e,"FacebookAuthProvider",ya,[]),tp(e,"GithubAuthProvider",va,[]),tp(e,"GoogleAuthProvider",_a,[]),tp(e,"TwitterAuthProvider",ka,[]),tp(e,"OAuthProvider",ga,[zd("providerId")]),tp(e,"SAMLAuthProvider",ma,[zd("providerId")]),tp(e,"PhoneAuthProvider",Ra,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(e){return!!(e&&e instanceof ad)}}]),tp(e,"RecaptchaVerifier",jd,[Zd(zd(),{name:"",K:"an HTML element",optional:!1,M:function(e){return!!(e&&e instanceof Element)}},"recaptchaContainer"),Wd("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(e){return!!(e&&e instanceof firebase.app.App)}}]),tp(e,"ActionCodeURL",bi,[]),tp(e,"PhoneMultiFactorGenerator",Sd,[]),firebase.INTERNAL.registerComponent({name:"auth",instanceFactory:function(e){return new ad(e=e.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:e,instantiationMode:"LAZY",type:"PUBLIC",onInstanceCreated:function(e){e.getProvider("auth-internal").initialize()}}),firebase.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(e){return{getUid:v((e=e.getProvider("auth").getImmediate()).getUid,e),getToken:v(e.nc,e),addAuthTokenListener:v(e.cc,e),removeAuthTokenListener:v(e.Pc,e)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),firebase.registerVersion("@firebase/auth","0.16.8"),firebase.INTERNAL.extendNamespace({User:bu})}()}.apply("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});const{document:document_1,navigator:navigator_1,window:window_1}=globals;
1490function get_each_context_41(e,t,n){const r=e.slice();return r[348]=t[n],r[427]=t,r[350]=n,r}function get_each_context_35(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_34(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_36(e,t,n){const r=e.slice();return r[348]=t[n],r[350]=n,r}function get_each_context_39(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_40(e,t,n){const r=e.slice();return r[364]=t[n],r}function get_each_context_37(e,t,n){const r=e.slice();return r[418]=t[n],r}function get_each_context_38(e,t,n){const r=e.slice();return r[348]=t[n],r}function get_each_context_30(e,t,n){const r=e.slice();return r[391]=t[n],r}function get_each_context_31(e,t,n){const r=e.slice();return r[391]=t[n],r}function get_each_context_32(e,t,n){const r=e.slice();return r[396]=t[n],r[350]=n,r}function get_each_context_28(e,t,n){const r=e.slice();return r[348]=t[n],r[350]=n,r}function get_each_context_29(e,t,n){const r=e.slice();return r[385]=t[n],r}function get_each_context_33(e,t,n){const r=e.slice();return r[353]=t[n],r[350]=n,r}function get_each_context_27(e,t,n){const r=e.slice();return r[373]=t[n],r[402]=t,r[403]=n,r}function get_each_context_21(e,t,n){const r=e.slice();return r[391]=t[n],r}function get_each_context_22(e,t,n){const r=e.slice();return r[391]=t[n],r}function get_each_context_23(e,t,n){const r=e.slice();return r[396]=t[n],r[350]=n,r}function get_each_context_19(e,t,n){const r=e.slice();return r[348]=t[n],r[350]=n,r}function get_each_context_20(e,t,n){const r=e.slice();return r[385]=t[n],r}function get_each_context_17(e,t,n){const r=e.slice();return r[348]=t[n],r[350]=n,r}function get_each_context_18(e,t,n){const r=e.slice();return r[385]=t[n],r}function get_each_context_16(e,t,n){const r=e.slice();return r[373]=t[n],r[382]=t,r[383]=n,r}function get_each_context_14(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_13(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_15(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_26(e,t,n){const r=e.slice();return r[353]=t[n],r[350]=n,r}function get_each_context_24(e,t,n){const r=e.slice();return r[373]=t[n],r}function get_each_context_25(e,t,n){const r=e.slice();return r[351]=t[n],r[350]=n,r}function get_each_context_11(e,t,n){const r=e.slice();return r[348]=t[n],r[372]=t,r[350]=n,r}function get_each_context_12(e,t,n){const r=e.slice();return r[373]=t[n],r[374]=t,r[375]=n,r}function get_each_context_5(e,t,n){const r=e.slice();return r[351]=t[n],r[350]=n,r}function get_each_context_6(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_8(e,t,n){const r=e.slice();return r[364]=t[n],r}function get_each_context_7(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_9(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_3(e,t,n){const r=e.slice();return r[348]=t[n],r[350]=n,r}function get_each_context_4(e,t,n){const r=e.slice();return r[348]=t[n],r}function get_each_context(e,t,n){const r=e.slice();return r[348]=t[n],r[349]=t,r[350]=n,r}function get_each_context_1(e,t,n){const r=e.slice();return r[351]=t[n],r[350]=n,r}function get_each_context_2(e,t,n){const r=e.slice();return r[353]=t[n],r}function get_each_context_10(e,t,n){const r=e.slice();return r[369]=t[n],r}function get_each_context_43(e,t,n){const r=e.slice();return r[351]=t[n],r[350]=n,r}function get_each_context_42(e,t,n){const r=e.slice();return r[396]=t[n],r[350]=n,r}function create_if_block_132(e){let t,n,r,i,a,o=l$1(e[77](e[0]))+"",s="Scoring"==e[77](e[0]),c=e[0]>1&&e[0]-2<e[1]&&e[2][e[0]-2].bot?" ð¤":"",l=e[0]>1&&e[0]-2<e[1]&&e[2][e[0]-2].bot&&e[2][0].hasOwnProperty("origKey"),u=s&&create_if_block_134(e),d=l&&create_if_block_133(e);return{c(){t=element("h1"),n=text(o),u&&u.c(),r=text(c),i=space(),d&&d.c(),attr(t,"style",a=e[0]>1&&e[0]-2<e[1]?e[2][e[0]-2].civ.style:""),attr(t,"class","svelte-qol35w")},m(e,a){insert(e,t,a),append(t,n),u&&u.m(t,null),append(t,r),append(t,i),d&&d.m(t,null)},p(e,i){1&i[0]&&o!==(o=l$1(e[77](e[0]))+"")&&set_data(n,o),1&i[0]&&(s="Scoring"==e[77](e[0])),s?u?u.p(e,i):(u=create_if_block_134(e),u.c(),u.m(t,r)):u&&(u.d(1),u=null),7&i[0]&&c!==(c=e[0]>1&&e[0]-2<e[1]&&e[2][e[0]-2].bot?" ð¤":"")&&set_data(r,c),7&i[0]&&(l=e[0]>1&&e[0]-2<e[1]&&e[2][e[0]-2].bot&&e[2][0].hasOwnProperty("origKey")),l?d?d.p(e,i):(d=create_if_block_133(e),d.c(),d.m(t,null)):d&&(d.d(1),d=null),7&i[0]&&a!==(a=e[0]>1&&e[0]-2<e[1]?e[2][e[0]-2].civ.style:"")&&attr(t,"style",a)},d(e){e&&detach(t),u&&u.d(),d&&d.d()}}}function create_if_block_131(e){let t;return{c(){t=element("h1"),t.textContent=`${l$1("Collapse!")}`,set_style(t,"color","red"),attr(t,"class","svelte-qol35w")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_129(e){let t,n,r;function i(e,t){return"campaigns"!=e[41]?create_if_block_130:create_else_block_36}let a=i(e),o=a(e);return{c(){t=element("h1"),t.textContent=`${l$1("Saved scores")}`,n=space(),r=element("div"),o.c(),attr(t,"class","svelte-qol35w"),set_style(r,"display","flex"),set_style(r,"justify-content","center"),set_style(r,"align-items","center")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i),o.m(r,null)},p(e,t){a===(a=i(e))&&o?o.p(e,t):(o.d(1),o=a(e),o&&(o.c(),o.m(r,null)))},d(e){e&&detach(t),e&&detach(n),e&&detach(r),o.d()}}}function create_if_block_134(e){let t,n,r=e[2][e[0]-2].name+"";return{c(){t=text(": "),n=text(r)},m(e,r){insert(e,t,r),insert(e,n,r)},p(e,t){5&t[0]&&r!==(r=e[2][e[0]-2].name+"")&&set_data(n,r)},d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_133(e){let t,n,r,i,a,o,s=l$1("Level")+"",c=e[64],l=[];for(let t=0;t<c.length;t+=1)l[t]=create_each_block_43(get_each_context_43(e,c,t));return{c(){t=element("div"),n=text(s),r=text(": \n\t\t\t\t\t"),i=element("select");for(let e=0;e<l.length;e+=1)l[e].c();void 0===e[2][e[0]-2].botLevel&&add_render_callback((()=>e[149].call(i))),set_style(t,"display","flex"),set_style(t,"justify-content","center"),set_style(t,"align-items","center"),set_style(t,"color","white"),set_style(t,"font-weight","normal"),set_style(t,"font-size","2vmin")},m(s,c){insert(s,t,c),append(t,n),append(t,r),append(t,i);for(let e=0;e<l.length;e+=1)l[e].m(i,null);select_option(i,e[2][e[0]-2].botLevel),a||(o=listen(i,"change",e[149]),a=!0)},p(e,t){if(4&t[2]|268435456&t[11]){let n;for(c=e[64],n=0;n<c.length;n+=1){const r=get_each_context_43(e,c,n);l[n]?l[n].p(r,t):(l[n]=create_each_block_43(r),l[n].c(),l[n].m(i,null))}for(;n<l.length;n+=1)l[n].d(1);l.length=c.length}5&t[0]&&select_option(i,e[2][e[0]-2].botLevel)},d(e){e&&detach(t),destroy_each(l,e),a=!1,o()}}}function create_each_block_43(e){let t,n,r=l$1(e[351])+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_36(e){let t;return{c(){t=element("div"),t.textContent=`${l$1("Click on a game to get a breakdown of the score.")}`,attr(t,"class","score_message svelte-qol35w")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_130(e){let t,n,r,i,a,o=e[65],s=[];for(let t=0;t<o.length;t+=1)s[t]=create_each_block_42(get_each_context_42(e,o,t));return{c(){t=element("div"),t.textContent=`${l$1("Click on a player to get a breakdown of their score. Sort by:")}  `,n=space(),r=element("select");for(let e=0;e<s.length;e+=1)s[e].c();attr(t,"class","score_message svelte-qol35w"),set_style(r,"margin","0"),void 0===e[51]&&add_render_callback((()=>e[148].call(r)))},m(o,c){insert(o,t,c),insert(o,n,c),insert(o,r,c);for(let e=0;e<s.length;e+=1)s[e].m(r,null);select_option(r,e[51]),i||(a=listen(r,"change",e[148]),i=!0)},p(e,t){if(8&t[2]|268435456&t[11]){let n;for(o=e[65],n=0;n<o.length;n+=1){const i=get_each_context_42(e,o,n);s[n]?s[n].p(i,t):(s[n]=create_each_block_42(i),s[n].c(),s[n].m(r,null))}for(;n<s.length;n+=1)s[n].d(1);s.length=o.length}1048576&t[1]&&select_option(r,e[51])},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_each(s,e),i=!1,a()}}}function create_each_block_42(e){let t,n,r=l$1(e[396].name)+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_32(e){let t,n,r=e[2],i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block_41(get_each_context_41(e,r,t));return{c(){t=element("div");for(let e=0;e<i.length;e+=1)i[e].c();attr(t,"class",n="box_"+e[1]+" svelte-qol35w")},m(e,n){insert(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null)},p(e,a){if(78&a[0]|5&a[1]|15&a[3]|268435456&a[11]){let n;for(r=e[2],n=0;n<r.length;n+=1){const o=get_each_context_41(e,r,n);i[n]?i[n].p(o,a):(i[n]=create_each_block_41(o),i[n].c(),i[n].m(t,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=r.length}2&a[0]&&n!==(n="box_"+e[1]+" svelte-qol35w")&&attr(t,"class",n)},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(i,e)}}}function create_if_block_115(e){let t,n,r,i;const a=[create_if_block_116,create_else_block_29],o=[];function s(e,t){return"WINNER!"==e[2][0].winner?0:1}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=empty()},m(e,n){o[t].m(e,n),insert(e,r,n),i=!0},p(e,i){let c=t;t=s(e),t===c?o[t].p(e,i):(group_outros(),transition_out(o[c],1,1,(()=>{o[c]=null})),check_outros(),n=o[t],n?n.p(e,i):(n=o[t]=a[t](e),n.c()),transition_in(n,1),n.m(r.parentNode,r))},i(e){i||(transition_in(n),i=!0)},o(e){transition_out(n),i=!1},d(e){o[t].d(e),e&&detach(r)}}}function create_if_block_94(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m;function g(e,t){return"campaigns"!=e[41]?create_if_block_106:create_else_block_24}let y=g(e),b=y(e),v=e[37]&&create_if_block_102(e),A=e[38]&&create_if_block_100(e),_=e[53]&&create_if_block_95(e);return{c(){t=element("div"),b.c(),n=space(),r=element("div"),i=element("div"),i.textContent=`${l$1("Display")}:  `,a=space(),o=element("select"),s=element("option"),s.textContent=`${l$1("Single games only")}`,c=element("option"),c.textContent=`${l$1("Campaigns only")}`,l=element("option"),l.textContent=`${l$1("All games")}`,u=space(),v&&v.c(),d=space(),A&&A.c(),p=space(),_&&_.c(),h=empty(),attr(t,"class","hs_display svelte-qol35w"),attr(i,"class","score_message svelte-qol35w"),s.__value="single",s.value=s.__value,c.__value="campaigns",c.value=c.__value,l.__value="all",l.value=l.__value,set_style(o,"margin","0"),void 0===e[41]&&add_render_callback((()=>e[256].call(o))),set_style(r,"display","flex"),set_style(r,"justify-content","center"),set_style(r,"align-items","center"),set_style(r,"margin-top","1vh")},m(g,y){insert(g,t,y),b.m(t,null),insert(g,n,y),insert(g,r,y),append(r,i),append(r,a),append(r,o),append(o,s),append(o,c),append(o,l),select_option(o,e[41]),insert(g,u,y),v&&v.m(g,y),insert(g,d,y),A&&A.m(g,y),insert(g,p,y),_&&_.m(g,y),insert(g,h,y),f||(m=listen(o,"change",e[256]),f=!0)},p(e,n){y===(y=g(e))&&b?b.p(e,n):(b.d(1),b=y(e),b&&(b.c(),b.m(t,null))),1024&n[1]&&select_option(o,e[41]),e[37]?v?v.p(e,n):(v=create_if_block_102(e),v.c(),v.m(d.parentNode,d)):v&&(v.d(1),v=null),e[38]?A?A.p(e,n):(A=create_if_block_100(e),A.c(),A.m(p.parentNode,p)):A&&(A.d(1),A=null),e[53]?_?_.p(e,n):(_=create_if_block_95(e),_.c(),_.m(h.parentNode,h)):_&&(_.d(1),_=null)},i:noop$1,o:noop$1,d(e){e&&detach(t),b.d(),e&&detach(n),e&&detach(r),e&&detach(u),v&&v.d(e),e&&detach(d),A&&A.d(e),e&&detach(p),_&&_.d(e),e&&detach(h),f=!1,m()}}}function create_if_block_48(e){let t,n,r,i;const a=[create_if_block_49,create_if_block_79,create_else_block_19],o=[];function s(e,t){return e[2][e[0]-2].bot?e[18]?1:2:0}return t=s(e),n=o[t]=a[t](e),{c(){n.c(),r=empty()},m(e,n){o[t].m(e,n),insert(e,r,n),i=!0},p(e,i){let c=t;t=s(e),t===c?o[t].p(e,i):(group_outros(),transition_out(o[c],1,1,(()=>{o[c]=null})),check_outros(),n=o[t],n?n.p(e,i):(n=o[t]=a[t](e),n.c()),transition_in(n,1),n.m(r.parentNode,r))},i(e){i||(transition_in(n),i=!0)},o(e){transition_out(n),i=!1},d(e){o[t].d(e),e&&detach(r)}}}function create_if_block_43(e){let t,n,r=e[2],i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block_11(get_each_context_11(e,r,t));return{c(){t=element("div");for(let e=0;e<i.length;e+=1)i[e].c();attr(t,"class",n="box_"+e[1]+" svelte-qol35w")},m(e,n){insert(e,t,n);for(let e=0;e<i.length;e+=1)i[e].m(t,null)},p(e,a){if(25166406&a[0]|5&a[1]|15&a[3]|64&a[4]){let n;for(r=e[2],n=0;n<r.length;n+=1){const o=get_each_context_11(e,r,n);i[n]?i[n].p(o,a):(i[n]=create_each_block_11(o),i[n].c(),i[n].m(t,null))}for(;n<i.length;n+=1)i[n].d(1);i.length=r.length}2&a[0]&&n!==(n="box_"+e[1]+" svelte-qol35w")&&attr(t,"class",n)},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(i,e)}}}function create_if_block_11(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_=l$1("Game mode")+"",x=!window.matchMedia("(display-mode: standalone)").matches,k=langList,w=[];for(let t=0;t<k.length;t+=1)w[t]=create_each_block_10(get_each_context_10(e,k,t));let T=create_if_block_42(),S="shared"!=e[39]&&create_if_block_41(e);function C(e,t){return"single"==e[39]?create_if_block_24:"shared"==e[39]?create_if_block_29:"campaign"==e[39]?create_if_block_33:void 0}let I=C(e),N=I&&I(e),E="shared"!=e[39]&&create_if_block_17(e),P=e[8]&&create_if_block_14(e),$=x&&create_if_block_12(e);return{c(){t=element("div"),n=element("div"),r=text("Language: \n\t\t\t\t"),i=element("select");for(let e=0;e<w.length;e+=1)w[e].c();a=space(),o=element("div"),s=text(_),c=text(":\n\t\t\t\t"),l=element("select"),u=element("option"),u.textContent=`${l$1("Single game")}`,d=element("option"),d.textContent=`${l$1("Solo campaign")}`,T&&T.c(),p=space(),S&&S.c(),h=space(),N&&N.c(),f=space(),E&&E.c(),m=space(),g=element("div"),P&&P.c(),y=space(),$&&$.c(),void 0===e[50]&&add_render_callback((()=>e[150].call(i))),u.__value="single",u.value=u.__value,d.__value="campaign",d.value=d.__value,void 0===e[39]&&add_render_callback((()=>
1490e[151].call(l))),set_style(t,"height","100%"),set_style(t,"overflow-y","auto")},m(_,x){insert(_,t,x),append(t,n),append(n,r),append(n,i);for(let e=0;e<w.length;e+=1)w[e].m(i,null);select_option(i,e[50]),append(t,a),append(t,o),append(o,s),append(o,c),append(o,l),append(l,u),append(l,d),T&&T.m(l,null),select_option(l,e[39]),append(o,p),S&&S.m(o,null),append(t,h),N&&N.m(t,null),append(t,f),E&&E.m(t,null),append(t,m),append(t,g),P&&P.m(g,null),append(t,y),$&&$.m(t,null),b=!0,v||(A=[listen(i,"change",e[150]),listen(i,"change",e[69]),listen(l,"change",e[151]),listen(l,"change",e[120])],v=!0)},p(e,n){if(0&n){let t;for(k=langList,t=0;t<k.length;t+=1){const r=get_each_context_10(e,k,t);w[t]?w[t].p(r,n):(w[t]=create_each_block_10(r),w[t].c(),w[t].m(i,null))}for(;t<w.length;t+=1)w[t].d(1);w.length=k.length}524288&n[1]&&select_option(i,e[50]),256&n[1]&&select_option(l,e[39]),"shared"!=e[39]?S?(S.p(e,n),256&n[1]&&transition_in(S,1)):(S=create_if_block_41(e),S.c(),transition_in(S,1),S.m(o,null)):S&&(group_outros(),transition_out(S,1,1,(()=>{S=null})),check_outros()),I===(I=C(e))&&N?N.p(e,n):(N&&N.d(1),N=I&&I(e),N&&(N.c(),N.m(t,f))),"shared"!=e[39]?E?(E.p(e,n),256&n[1]&&transition_in(E,1)):(E=create_if_block_17(e),E.c(),transition_in(E,1),E.m(t,m)):E&&(group_outros(),transition_out(E,1,1,(()=>{E=null})),check_outros()),e[8]?P?P.p(e,n):(P=create_if_block_14(e),P.c(),P.m(g,null)):P&&(P.d(1),P=null),x&&$.p(e,n)},i(e){b||(transition_in(S),transition_in(E),b=!0)},o(e){transition_out(S),transition_out(E),b=!1},d(e){e&&detach(t),destroy_each(w,e),T&&T.d(),S&&S.d(),N&&N.d(),E&&E.d(),P&&P.d(),$&&$.d(),v=!1,run_all(A)}}}function create_if_block_123(e){let t,n,r,i,a,o,s,c=e[348].name+"",l=e[348].bot&&create_if_block_128();function u(e,t){return(null==o||78&t[0])&&(o=!((e[6]||e[2].some(e[144]))&&!e[2].filter(e[145]).every(func_6)&&!e[3])),o?create_if_block_124:create_else_block_35}let d=u(e,[-1]),p=d(e);return{c(){t=element("div"),n=element("div"),l&&l.c(),r=text(c),a=space(),p.c(),s=space(),attr(n,"class","playername svelte-qol35w"),attr(n,"style",i=e[348].civ.style+" min-height: 5vw;"),attr(t,"class","player svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),l&&l.m(n,null),append(n,r),append(t,a),p.m(t,null),append(t,s)},p(e,a){e[348].bot?l||(l=create_if_block_128(),l.c(),l.m(n,r)):l&&(l.d(1),l=null),4&a[0]&&c!==(c=e[348].name+"")&&set_data(r,c),4&a[0]&&i!==(i=e[348].civ.style+" min-height: 5vw;")&&attr(n,"style",i),d===(d=u(e,a))&&p?p.p(e,a):(p.d(1),p=d(e),p&&(p.c(),p.m(t,s)))},d(e){e&&detach(t),l&&l.d(),p.d()}}}function create_if_block_128(e){let t;return{c(){t=text("ð¤ ")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_else_block_35(e){let t,n,r,i,a=l$1("Awaiting final scores")+"";return{c(){t=element("div"),n=text(a),r=text("..."),attr(t,"class","playername svelte-qol35w"),attr(t,"style",i=e[348].civ.style+" font-size: 3vw; min-height: 3vw;")},m(e,i){insert(e,t,i),append(t,n),append(t,r)},p(e,n){4&n[0]&&i!==(i=e[348].civ.style+" font-size: 3vw; min-height: 3vw;")&&attr(t,"style",i)},d(e){e&&detach(t)}}}function create_if_block_124(e){let t,n,r,i,a=l$1(e[348].winner)+"";function o(e,t){return e[3]?create_if_block_125:create_else_block_34}let s=o(e),c=s(e);return{c(){c.c(),t=space(),n=element("div"),r=text(a),attr(n,"class","playername svelte-qol35w"),attr(n,"style",i=e[348].civ.style+" font-size: 5vw; min-height: 5vw;")},m(e,i){c.m(e,i),insert(e,t,i),insert(e,n,i),append(n,r)},p(e,l){s===(s=o(e))&&c?c.p(e,l):(c.d(1),c=s(e),c&&(c.c(),c.m(t.parentNode,t))),4&l[0]&&a!==(a=l$1(e[348].winner)+"")&&set_data(r,a),4&l[0]&&i!==(i=e[348].civ.style+" font-size: 5vw; min-height: 5vw;")&&attr(n,"style",i)},d(e){c.d(e),e&&detach(t),e&&detach(n)}}}function create_else_block_34(e){let t,n,r,i=e[348].score+"";return{c(){t=element("div"),n=text(i),attr(t,"class","playername svelte-qol35w"),attr(t,"style",r=e[348].civ.style+" font-size: 5vw; min-height: 5vw;")},m(e,r){insert(e,t,r),append(t,n)},p(e,a){4&a[0]&&i!==(i=e[348].score+"")&&set_data(n,i),4&a[0]&&r!==(r=e[348].civ.style+" font-size: 5vw; min-height: 5vw;")&&attr(t,"style",r)},d(e){e&&detach(t)}}}function create_if_block_125(e){let t,n=!e[2].some(e[146]),r=n&&create_if_block_126(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,i){6&i[0]&&(n=!e[2].some(e[146])),n?r?r.p(e,i):(r=create_if_block_126(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&detach(t)}}}function create_if_block_126(e){let t,n,r,i,a,o,s,c,l,u,d;
1490function p(e,t){return e[31]&&e[31].player==e[350]&&"unrest"==e[31].token?create_if_block_127:create_else_block_33}let h=p(e),f=h(e);function m(...t){return e[267](e[350],...t)}return{c(){t=element("div"),n=element("button"),n.textContent="-",r=space(),i=element("div"),a=element("div"),o=space(),s=element("div"),f.c(),c=space(),l=element("button"),l.textContent="+",attr(n,"class","incdec svelte-qol35w"),attr(a,"class","imagediv svelte-qol35w"),set_style(a,"background-image","url(unrest.png)"),attr(s,"class","tokencount svelte-qol35w"),set_style(s,"font-size","7vmin"),attr(i,"class","token svelte-qol35w"),attr(l,"class","incdec svelte-qol35w"),attr(t,"class","tokenrow svelte-qol35w")},m(p,h){insert(p,t,h),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),f.m(s,null),append(t,c),append(t,l),u||(d=[listen(n,"click",(function(){is_function(e[93](e[350],"unrest",e[348].unrest-1))&&e[93](e[350],"unrest",e[348].unrest-1).apply(this,arguments)})),listen(s,"click",m),listen(l,"click",(function(){is_function(e[93](e[350],"unrest",e[348].unrest+1))&&e[93](e[350],"unrest",e[348].unrest+1).apply(this,arguments)}))],u=!0)},p(t,n){h===(h=p(e=t))&&f?f.p(e,n):(f.d(1),f=h(e),f&&(f.c(),f.m(s,null)))},d(e){e&&detach(t),f.d(),u=!1,run_all(d)}}}function create_else_block_33(e){let t,n=e[348].unrest+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&n!==(n=e[348].unrest+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_127(e){let t,n,r;function i(){e[265].call(t,e[350])}return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(a,o){insert(a,t,o),set_input_value(t,e[2][e[350]].unrest),n||(r=[listen(t,"input",i),listen(t,"blur",e[94]),listen(t,"keyup",e[266]),listen(t,"input",e[95])],n=!0)},p(n,r){e=n,4&r[0]&&t.value!==e[2][e[350]].unrest&&set_input_value(t,e[2][e[350]].unrest)},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_41(e){let t,n=e[1]>e[350]&&create_if_block_123(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,r){e[1]>e[350]?n?n.p(e,r):(n=create_if_block_123(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&detach(t)}}}function create_else_block_29(e){let t,n,r;function i(e,t){return"DRAW"==e[2][0].winner?create_if_block_122:create_else_block_31}let a=i(e),o=a(e);function s(e,t){return(null==n||65536&t[0])&&(n=!(e[91](e[16])+1!=4)),n?create_if_block_120:create_else_block_30}let c=s(e,[-1]),l=c(e);return{c(){o.c(),t=space(),l.c(),r=empty()},m(e,n){o.m(e,n),insert(e,t,n),l.m(e,n),insert(e,r,n)},p(e,n){a===(a=i(e))&&o?o.p(e,n):(o.d(1),o=a(e),o&&(o.c(),o.m(t.parentNode,t))),c===(c=s(e,n))&&l?l.p(e,n):(l.d(1),l=c(e),l&&(l.c(),l.m(r.parentNode,r)))},i:noop$1,o:noop$1,d(e){o.d(e),e&&detach(t),l.d(e),e&&detach(r)}}}function create_if_block_116(e){let t,n,r,i,a,o,s,c,l,u,d,p=l$1("You have successfully defeated the")+"",h=l$1(e[2][1].civ.name)+"";const f=[create_if_block_117,create_else_block_28],m=[];function g(e,t){return 65536&t[0]&&(s=!!(e[89](e[16])+1<5)),s?0:1}return c=g(e,[-1]),l=m[c]=f[c](e),{c(){t=element("div"),n=text(p),r=space(),i=text(h),a=text("!"),o=space(),l.c(),u=empty(),attr(t,"class","hs_text svelte-qol35w"),set_style(t,"color","green")},m(e,s){insert(e,t,s),append(t,n),append(t,r),append(t,i),append(t,a),insert(e,o,s),m[c].m(e,s),insert(e,u,s),d=!0},p(e,t){(!d||4&t[0])&&h!==(h=l$1(e[2][1].civ.name)+"")&&set_data(i,h);let n=c;c=g(e,t),c===n?m[c].p(e,t):(group_outros(),transition_out(m[n],1,1,(()=>{m[n]=null})),check_outros(),l=m[c],l?l.p(e,t):(l=m[c]=f[c](e),l.c()),transition_in(l,1),l.m(u.parentNode,u))},i(e){d||(transition_in(l),d=!0)},o(e){transition_out(l),d=!1},d(e){e&&detach(t),e&&detach(o),m[c].d(e),e&&detach(u)}}}function create_else_block_31(e){let t,n,r=l$1("You were defeated by the $0.",l$1(e[2][1].civ.name))+"";return{c(){t=element("div"),n=text(r),attr(t,"class","hs_text svelte-qol35w"),set_style(t,"color","blue")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){4&t[0]&&r!==(r=l$1("You were defeated by the $0.",l$1(e[2][1].civ.name))+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_if_block_122(e){let t,n,r=l$1("You were unable to defeat the $0.",l$1(e[2][1].civ.name))+"";return{c(){t=element("div"),n=text(r),attr(t,"class","hs_text svelte-qol35w"),set_style(t,"color","blue")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){4&t[0]&&r!==(r=l$1("You were unable to defeat the $0.",l$1(e[2][1].civ.name))+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_else_block_30(e){let t,n,r,i,a,o,s=l$1("You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).",e[91](e[16])+1)+"",c=l$1("Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens.",l$1(e[64][e[2][1].botLevel]))+"",l=5==e[2][1].botLevel&&create_if_block_121();return{c(){t=element("div"),n=text(s),r=space(),l&&l.c(),i=space(),a=element("div"),o=text(c),attr(t,"class","instructions svelte-qol35w"),attr(a,"class","instructions svelte-qol35w")},m(e,s){insert(e,t,s),append(t,n),append(t,r),l&&l.m(t,null),insert(e,i,s),insert(e,a,s),append(a,o)},p(e,r){65536&r[0]&&s!==(s=l$1("You have been defeated $0 time{0,s} so far (of a possible 4 before you lose the campaign).",e[91](e[16])+1)+"")&&set_data(n,s),5==e[2][1].botLevel?l?l.p(e,r):(l=create_if_block_121(),l.c(),l.m(t,null)):l&&(l.d(1),l=null),4&r[0]&&c!==(c=l$1("Your next game will be against a bot of $0 level again, but you will start with double the normal starting resources, population and progress tokens.",l$1(e[64][e[2][1].botLevel]))+"")&&set_data(o,c)},d(e){e&&detach(t),l&&l.d(),e&&detach(i),e&&detach(a)}}}function create_if_block_120(e){let t,n,r=l$1("You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!",e[83](e[16])?l$1("grand"):"")+"";return{c(){t=element("div"),n=text(r),attr(t,"class","hs_text svelte-qol35w"),set_style(t,"color","red")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){65536&t[0]&&r!==(r=l$1("You have been defeated 4 times and end the $0campaign in defeat. Better luck next time!",e[83](e[16])?l$1("grand"):"")+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_if_block_121(e){let t,n=l$1("Since you are playing against the Supreme Ruler, you must now return 1 removed Unrest card to the Commons deck for the rest of the campaign. (This can be from 3+ or 4 player cards removed at setup if available.)")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_28(e){let t,n,r,i=l$1("You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!",e[83](e[16])?l$1("grand"):"")+"";return{c(){t=element("div"),n=text(i),r=text(" }"),attr(t,"class","hs_text svelte-qol35w"),set_style(t,"color","yellow"),set_style(t,"text-align","center")},m(e,i){insert(e,t,i),append(t,n),append(t,r)},p(e,t){65536&t[0]&&i!==(i=l$1("You have successfully defeated 5 different civilisations and completed the $0campaign! Congratulations!",e[83](e[16])?l$1("grand"):"")+"")&&set_data(n,i)},i:noop$1,o:noop$1,d(e){e&&detach(t)}}}function create_if_block_117(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v=l$1("You have won $0 game{0,s} so far.",e[89](e[16]))+"",A=l$1("Please choose")+"";function _(e,t){return 5==e[2][1].botLevel?create_if_block_119:create_else_block_27}let x=_(e),k=x(e);const w=[create_if_block_118,create_else_block_26],T=[];function S(e,t){return e[18]?0:1}return h=S(e),f=T[h]=w[h](e),{c(){t=element("div"),n=text(v),r=space(),k.c(),i=space(),a=text(A),o=text(":"),s=space(),c=element("div"),l=element("select"),u=element("option"),u.textContent=`${l$1("Add one of your Commons cards to your starting deck")}`,d=element("option"),d.textContent=`${l$1("Remove one of your starting cards from the game")}`,p=space(),f.c(),m=empty(),attr(t,"class","instructions svelte-qol35w"),u.__value="cardAdded",u.value=u.__value,d.__value="cardRemoved",d.value=d.__value,set_style(l,"margin","0"),void 0===e[43]&&add_render_callback((()=>e[259].call(l))),attr(c,"class","instructions svelte-qol35w")},m(f,v){insert(f,t,v),append(t,n),append(t,r),k.m(t,null),append(t,i),append(t,a),append(t,o),insert(f,s,v),insert(f,c,v),append(c,l),append(l,u),append(l,d),select_option(l,e[43]),insert(f,p,v),T[h].m(f,v),insert(f,m,v),g=!0,y||(b=listen(l,"change",e[259]),y=!0)},p(e,r){(!g||65536&r[0])&&v!==(v=l$1("You have won $0 game{0,s} so far.",e[89](e[16]))+"")&&set_data(n,v),x===(x=_(e))&&k?k.p(e,r):(k.d(1),k=x(e),k&&(k.c(),k.m(t,i))),4096&r[1]&&select_option(l,e[43]);let a=h;h=S(e),h===a?T[h].p(e,r):(group_outros(),transition_out(T[a],1,1,(()=>{T[a]=null})),check_outros(),f=T[h],f?f.p(e,r):(f=T[h]=w[h](e),f.c()),transition_in(f,1),f.m(m.parentNode,m))},i(e){g||(transition_in(f),g=!0)},o(e){transition_out(f),g=!1},d(e){e&&detach(t),k.d(),e&&detach(s),e&&detach(c),e&&detach(p),T[h].d(e),e&&detach(m),y=!1,b()}}}function create_else_block_27(e){let t,n=l$1("In your next game, the bot will be at $0 level.",e[64][e[2][1].botLevel+1])+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&n!==(n=l$1("In your next game, the bot will be at $0 level.",e[64][e[2][1].botLevel+1])+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_119(e){let t,n=l$1("Since you are playing against the Supreme Ruler, you must now remove 1 Unrest card from the Commons deck for the rest of the campaign.")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_26(e){let t,n,r,i,a,o,s=l$1("Name of card")+"";return{c(){t=element("div"),n=text(s),r=text(": "),i=element("input"),attr(i,"size","20"),attr(t,"class","instructions svelte-qol35w")},m(s,c){insert(s,t,c),append(t,n),append(t,r),append(t,i),set_input_value(i,e[2][0][e[43]]),a||(o=listen(i,"input",e[264]),a=!0)},p(e,t){4&t[0]|4096&t[1]&&i.value!==e[2][0][e[43]]&&set_input_value(i,e[2][0][e[43]])},i:noop$1,o:noop$1,d(e){e&&detach(t),a=!1,o()}}}function create_if_block_118(e){let t,n,r,i;function a(t){e[262](t)}function o(t){e[263](t)}let s={cards:e[21],numPlayers:"2",current:"0",box:e[12],exp:e[11],selectSingle:!0,showFilters:!1,excludePlayerDecks:!1,extraFilter:"cardAdded"==e[43]?e[260]:e[261]};return void 0!==e[2]&&(s.players=e[2]),void 0!==e[2][0][e[43]]&&(s.selectedName=e[2][0][e[43]]),t=new CardSelect({props:s}),binding_callbacks.push((()=>bind$1(t,"players",a))),binding_callbacks.push((()=>
1490bind$1(t,"selectedName",o))),{c(){create_component(t.$$.fragment)},m(e,n){mount_component(t,e,n),i=!0},p(e,i){const a={};2097152&i[0]&&(a.cards=e[21]),4096&i[0]&&(a.box=e[12]),2048&i[0]&&(a.exp=e[11]),65540&i[0]|4096&i[1]&&(a.extraFilter="cardAdded"==e[43]?e[260]:e[261]),!n&&4&i[0]&&(n=!0,a.players=e[2],add_flush_callback((()=>n=!1))),!r&&4&i[0]|4096&i[1]&&(r=!0,a.selectedName=e[2][0][e[43]],add_flush_callback((()=>r=!1))),t.$set(a)},i(e){i||(transition_in(t.$$.fragment,e),i=!0)},o(e){transition_out(t.$$.fragment,e),i=!1},d(e){destroy_component(t,e)}}}function create_else_block_24(e){let t,n=[...e[15]].sort(e[76]),r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_39(get_each_context_39(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(32768&i[0]|2018525188&i[2]|3136&i[3]|268435456&i[11]){let a;for(n=[...e[15]].sort(e[76]),a=0;a<n.length;a+=1){const o=get_each_context_39(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_39(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_if_block_106(e){let t,n=[...filterHS(e[41],e[46])].sort(e[65][e[51]].func),r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_37(get_each_context_37(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(1082368&i[1]|8&i[2]|64&i[3]|268435456&i[11]){let a;for(n=[...filterHS(e[41],e[46])].sort(e[65][e[51]].func),a=0;a<n.length;a+=1){const o=get_each_context_37(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_37(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_if_block_113(e){let t,n,r,i=""!=e[364][0].cardAdded?l$1("Add")+" "+l$1(e[364][0].cardAdded):"Remove "+l$1(e[364][0].cardRemoved),a=5==e[364][1].botLevel&&create_if_block_114();return{c(){t=element("div"),n=text(i),r=space(),a&&a.c(),attr(t,"class","campaign_cell svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),append(t,r),a&&a.m(t,null)},p(e,r){32768&r[0]&&i!==(i=""!=e[364][0].cardAdded?l$1("Add")+" "+l$1(e[364][0].cardAdded):"Remove "+l$1(e[364][0].cardRemoved))&&set_data(n,i),5==e[364][1].botLevel?a?a.p(e,r):(a=create_if_block_114(),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_if_block_114(e){let t,n,r,i=l$1("Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.")+"";return{c(){t=text(". "),r=empty(),n=new HtmlTag(r)},m(e,a){insert(e,t,a),n.m(i,e,a),insert(e,r,a)},p:noop$1,d(e){e&&detach(t),e&&detach(r),e&&n.d()}}}function create_if_block_111(e){let t,n,r,i=l$1("Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>")+"",a=5==e[364][1].botLevel&&create_if_block_112();return{c(){t=element("div"),r=empty(),a&&a.c(),n=new HtmlTag(r),attr(t,"class","campaign_cell svelte-qol35w")},m(e,o){insert(e,t,o),n.m(i,t),append(t,r),a&&a.m(t,null)},p(e,n){5==e[364][1].botLevel?a?a.p(e,n):(a=create_if_block_112(),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_if_block_112(e){let t,n,r,i=l$1("Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.")+"";return{c(){t=text(". "),r=empty(),n=new HtmlTag(r)},m(e,a){insert(e,t,a),n.m(i,e,a),insert(e,r,a)},p:noop$1,d(e){e&&detach(t),e&&detach(r),e&&n.d()}}}function create_each_block_40(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A=l$1(e[364][1].civ.name)+"",_=l$1(e[64][e[364][1].botLevel])+"",x=l$1(possVictory(e[364][0]))+"",k=e[364][0].score+"",w=e[364][1].score+"",T="WINNER!"==e[364][0].winner&&e[103](e[364][0])<5,S="WINNER!"==e[364][1].winner&&e[104](e[364][0])<4,C=T&&create_if_block_113(e),I=S&&create_if_block_111(e);return{c(){t=element("div"),n=element("div"),r=text(A),i=text(" ("),a=text(_),o=text("):"),s=space(),c=element("div"),l=text(x),u=text(" ("),d=text(k),p=text("â"),h=text(w),f=text(")"),m=space(),C&&C.c(),g=space(),I&&I.c(),attr(n,"class","campaign_cell svelte-qol35w"),attr(c,"class","campaign_cell svelte-qol35w"),attr(t,"class","campaign_row svelte-qol35w"),attr(t,"style",y=e[364][1].civ.hsStyle?e[364][1].civ.hsStyle:"background-"+e[364][1].civ.style+" color:"+e[364][1].civ.contrastText)},m(y,A){insert(y,t,A),append(t,n),append(n,r),append(n,i),append(n,a),append(n,o),append(t,
1490s),append(t,c),append(c,l),append(c,u),append(c,d),append(c,p),append(c,h),append(c,f),append(t,m),C&&C.m(t,null),append(t,g),I&&I.m(t,null),b||(v=[listen(n,"click",(function(){is_function(e[99](e[364][1]))&&e[99](e[364][1]).apply(this,arguments)})),listen(c,"click",(function(){is_function(e[99](e[364][0]))&&e[99](e[364][0]).apply(this,arguments)}))],b=!0)},p(n,i){e=n,32768&i[0]&&A!==(A=l$1(e[364][1].civ.name)+"")&&set_data(r,A),32768&i[0]&&_!==(_=l$1(e[64][e[364][1].botLevel])+"")&&set_data(a,_),32768&i[0]&&x!==(x=l$1(possVictory(e[364][0]))+"")&&set_data(l,x),32768&i[0]&&k!==(k=e[364][0].score+"")&&set_data(d,k),32768&i[0]&&w!==(w=e[364][1].score+"")&&set_data(h,w),32768&i[0]&&(T="WINNER!"==e[364][0].winner&&e[103](e[364][0])<5),T?C?C.p(e,i):(C=create_if_block_113(e),C.c(),C.m(t,g)):C&&(C.d(1),C=null),32768&i[0]&&(S="WINNER!"==e[364][1].winner&&e[104](e[364][0])<4),S?I?I.p(e,i):(I=create_if_block_111(e),I.c(),I.m(t,null)):I&&(I.d(1),I=null),32768&i[0]&&y!==(y=e[364][1].civ.hsStyle?e[364][1].civ.hsStyle:"background-"+e[364][1].civ.style+" color:"+e[364][1].civ.contrastText)&&attr(t,"style",y)},d(e){e&&detach(t),C&&C.d(),I&&I.d(),b=!1,run_all(v)}}}function create_else_block_25(e){let t,n,r,i,a,o,s,c,l,u=l$1(e[84](e[353]))+"",d=l$1("ongoing")+"",p=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[353]),e[91](e[353]),e[92](e[353]))+"",h=l$1("Next game at $0 level",l$1(e[64][e[82](e[353])]))+"";return{c(){t=element("div"),n=text(u),r=space(),i=text(d),a=text(": "),o=text(p),s=space(),c=element("div"),l=text(h)},m(e,u){insert(e,t,u),append(t,n),append(t,r),append(t,i),append(t,a),append(t,o),insert(e,s,u),insert(e,c,u),append(c,l)},p(e,t){32768&t[0]&&u!==(u=l$1(e[84](e[353]))+"")&&set_data(n,u),32768&t[0]&&p!==(p=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[353]),e[91](e[353]),e[92](e[353]))+"")&&set_data(o,p),32768&t[0]&&h!==(h=l$1("Next game at $0 level",l$1(e[64][e[82](e[353])]))+"")&&set_data(l,h)},d(e){e&&detach(t),e&&detach(s),e&&detach(c)}}}function create_if_block_110(e){let t,n,r,i,a,o,s,c,l,u,d,p=l$1(e[84](e[353]))+"",h=l$1(`ended in ${e[353].finished}`)+"",f=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[353]),e[91](e[353]),e[92](e[353]))+"",m=l$1("Completed on")+"",g=makeDateString(e[90](e[353])[e[90](e[353]).length-1][0].date)+"";return{c(){t=element("div"),n=text(p),r=space(),i=text(h),a=text(": "),o=text(f),s=space(),c=element("div"),l=text(m),u=space(),d=text(g)},m(e,p){insert(e,t,p),append(t,n),append(t,r),append(t,i),append(t,a),append(t,o),insert(e,s,p),insert(e,c,p),append(c,l),append(c,u),append(c,d)},p(e,t){32768&t[0]&&p!==(p=l$1(e[84](e[353]))+"")&&set_data(n,p),32768&t[0]&&h!==(h=l$1(`ended in ${e[353].finished}`)+"")&&set_data(i,h),32768&t[0]&&f!==(f=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[353]),e[91](e[353]),e[92](e[353]))+"")&&set_data(o,f),32768&t[0]&&g!==(g=makeDateString(e[90](e[353])[e[90](e[353]).length-1][0].date)+"")&&set_data(d,g)},d(e){e&&detach(t),e&&detach(s),e&&detach(c)}}}function create_each_block_39(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g=e[353].name+"",y=l$1("as")+"",b=l$1(e[353].civ.name)+"",v=l$1("$0 game{0,s} played",e[90](e[353]).length)+"",A=e[90](e[353]),_=[];for(let t=0;t<A.length;t+=1)_[t]=create_each_block_40(get_each_context_40(e,A,t));function x(e,t){return e[353].finished?create_if_block_110:create_else_block_25}let k=x(e),w=k(e);return{c(){t=element("div"),n=element("div"),r=text(g),i=space(),a=text(y),o=space(),s=text(b),c=text(": "),l=text(v),d=space();for(let e=0;e<_.length;e+=1)_[e].c();p=space(),h=element("div"),w.c(),m=space(),attr(n,"class","campaign_head svelte-qol35w"),attr(n,"style",u=e[353].civ.hsStyle?e[353].civ.hsStyle:"background-"+e[353].civ.style+" color:"+e[353].civ.contrastText+"; border-bottom: 1vh double "+e[353].civ.contrastText),attr(h,"class","campaign_results svelte-qol35w"),attr(h,"style",f=e[353].civ.hsStyle?e[353].civ.hsStyle:"background-"+e[353].civ.style+" color:"+e[353].civ.contrastText+"; border-top: 1vh double "+e[353].civ.contrastText),attr(t,"class","campaign_display svelte-qol35w")},m(e,u){insert(e,t,u),append(t,n),append(n,r),append(n,i),append(n,a),append(n,o),append(n,s),append(n,c),append(n,l),append(t,d);for(let e=0;e<_.length;e+=1)_[e].m(t,null);append(t,p),append(t,h),w.m(h,null),append(t,m)},p(e,i){if(32768&i[0]&&g!==(g=e[353].name+"")&&set_data(r,g),32768&i[0]&&b!==(b=l$1(e[353].civ.name)+"")&&set_data(s,b),32768&i[0]&&v!==(v=l$1("$0 game{0,s} played",e[90](e[353]).length)+"")&&set_data(l,v),32768&i[0]&&u!==(u=e[353].civ.hsStyle?e[353].civ.hsStyle:"background-"+e[353].civ.style+" color:"+e[353].civ.contrastText+"; border-bottom: 1vh double "+e[353].civ.contrastText)&&attr(n,"style",u),32768&i[0]|268451844&i[2]|3136&i[3]|268435456&i[11]){let n;for(A=e[90](e[353]),n=0;n<A.length;n+=1){const r=get_each_context_40(e,A,n);_[n]?_[n].p(r,i):(_[n]=create_each_block_40(r),_[n].c(),_[n].m(t,p))}for(;n<_.length;n+=1)_[n].d(1);_.length=A.length}k===(k=x(e))&&w?w.p(e,i):(w.d(1),w=k(e),w&&(w.c(),w.m(h,null))),32768&i[0]&&f!==(f=e[353].civ.hsStyle?e[353].civ.hsStyle:"background-"+e[353].civ.style+" color:"+e[353].civ.contrastText+"; border-top: 1vh double "+e[353].civ.contrastText)&&attr(h,"style",f)},d(e){e&&detach(t),destroy_each(_,e),w.d()}}}function create_if_block_109(e){let t;return{c(){t=text("ð¤ ")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_if_block_108(e){let t,n,r,i=(isNaN(e[348].botLevel)?3:e[348].botLevel+1)+"";return{c(){t=text("("),n=text(i),r=text(")")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p(e,t){1082368&t[1]&&i!==(i=(isNaN(e[348].botLevel)?3:e[348].botLevel+1)+"")&&set_data(n,i)},d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_else_block_23(e){let t,n,r=l$1("WINNER!"==e[348].winner?"Win":"DRAW!"==e[348].winner?"Draw":"Loss")+"";return{c(){t=text("ð¥ "),n=text(r)},m(e,r){insert(e,t,r),insert(e,n,r)},p(e,t){1082368&t[1]&&r!==(r=l$1("WINNER!"==e[348].winner?"Win":"DRAW!"==e[348].winner?"Draw":"Loss")+"")&&set_data(n,r)},d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_107(e){let t,n=e[348].score+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){1082368&r[1]&&n!==(n=e[348].score+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_each_block_38(e){let t,n,r,i,a,o,s,c,l,u,d,p=e[348].name+"",h=l$1(e[348].civ.name)+"",f=e[348].bot&&create_if_block_109(),m=e[348].bot&&create_if_block_108(e);
1490function g(e,t){return e[348].collapse?create_else_block_23:create_if_block_107}let y=g(e),b=y(e);return{c(){t=element("div"),n=element("div"),f&&f.c(),r=text(p),m&&m.c(),i=space(),a=element("div"),o=text(h),s=space(),c=element("div"),b.c(),attr(t,"class","hs_text svelte-qol35w"),attr(t,"style",l=e[348].civ.hsStyle?e[348].civ.hsStyle:"background-"+e[348].civ.style+" color:"+e[348].civ.contrastText)},m(l,p){insert(l,t,p),append(t,n),f&&f.m(n,null),append(n,r),m&&m.m(n,null),append(t,i),append(t,a),append(a,o),append(t,s),append(t,c),b.m(c,null),u||(d=listen(t,"click",(function(){is_function(e[99](e[348]))&&e[99](e[348]).apply(this,arguments)})),u=!0)},p(i,a){(e=i)[348].bot?f||(f=create_if_block_109(),f.c(),f.m(n,r)):f&&(f.d(1),f=null),1082368&a[1]&&p!==(p=e[348].name+"")&&set_data(r,p),e[348].bot?m?m.p(e,a):(m=create_if_block_108(e),m.c(),m.m(n,null)):m&&(m.d(1),m=null),1082368&a[1]&&h!==(h=l$1(e[348].civ.name)+"")&&set_data(o,h),y===(y=g(e))&&b?b.p(e,a):(b.d(1),b=y(e),b&&(b.c(),b.m(c,null))),1082368&a[1]&&l!==(l=e[348].civ.hsStyle?e[348].civ.hsStyle:"background-"+e[348].civ.style+" color:"+e[348].civ.contrastText)&&attr(t,"style",l)},d(e){e&&detach(t),f&&f.d(),m&&m.d(),b.d(),u=!1,d()}}}function create_each_block_37(e){let t,n,r,i,a=[...e[418]].sort(func_26),o=[];for(let t=0;t<a.length;t+=1)o[t]=create_each_block_38(get_each_context_38(e,a,t));return{c(){t=element("div");for(let e=0;e<o.length;e+=1)o[e].c();n=space(),attr(t,"class",r=null_to_empty(e[418][0].hasOwnProperty("campaign")?"hs_campaign_row":"hs_row")+" svelte-qol35w"),attr(t,"style",i="grid-template-columns: repeat("+e[418].length+", 1fr);")},m(e,r){insert(e,t,r);for(let e=0;e<o.length;e+=1)o[e].m(t,null);append(t,n)},p(e,s){if(1082368&s[1]|8&s[2]|64&s[3]|268435456&s[11]){let r;for(a=[...e[418]].sort(func_26),r=0;r<a.length;r+=1){const i=get_each_context_38(e,a,r);o[r]?o[r].p(i,s):(o[r]=create_each_block_38(i),o[r].c(),o[r].m(t,n))}for(;r<o.length;r+=1)o[r].d(1);o.length=a.length}1082368&s[1]&&r!==(r=null_to_empty(e[418][0].hasOwnProperty("campaign")?"hs_campaign_row":"hs_row")+" svelte-qol35w")&&attr(t,"class",r),1082368&s[1]&&i!==(i="grid-template-columns: repeat("+e[418].length+", 1fr);")&&attr(t,"style",i)},d(e){e&&detach(t),destroy_each(o,e)}}}function create_if_block_102(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y=e[46].length>0&&create_if_block_104(e),b=e[46].length>0&&create_if_block_103(e);return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Edit scores")}`,r=space(),i=element("div"),a=element("div"),a.textContent=`${l$1("Import from another device")}:`,o=element("button"),o.textContent=`${l$1("Import data from clipboard")}`,s=space(),y&&y.c(),c=space(),l=element("div"),u=text(e[44]),d=space(),p=element("div"),h=element("button"),h.textContent=`${l$1("Close")}`,f=space(),b&&b.c(),attr(n,"class","hs_text svelte-qol35w"),attr(a,"class","copy_text svelte-qol35w"),attr(o,"class","import svelte-qol35w"),attr(i,"class","copy_row svelte-qol35w"),attr(l,"class","copy_row svelte-qol35w"),set_style(l,"font-weight","bold"),set_style(l,"color","blue"),attr(h,"class","prev svelte-qol35w"),set_style(h,"font-size","3vmin"),attr(p,"class","copy_row svelte-qol35w"),attr(t,"class","detail svelte-qol35w"),set_style(t,"background-color","orange"),set_style(t,"color","black")},m(v,A){insert(v,t,A),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(t,s),y&&y.m(t,null),append(t,c),append(t,l),append(l,u),append(t,d),append(t,p),append(p,h),append(p,f),b&&b.m(p,null),m||(g=[listen(o,"click",e[116]),listen(h,"click",e[119])],m=!0)},p(e,n){e[46].length>0?y?y.p(e,n):(y=create_if_block_104(e),y.c(),y.m(t,c)):y&&(y.d(1),y=null),8192&n[1]&&set_data(u,e[44]),e[46].length>0?b?b.p(e,n):(b=create_if_block_103(e),b.c(),b.m(p,null)):b&&(b.d(1),b=null)},d(e){e&&detach(t),y&&y.d(),b&&b.d(),m=!1,run_all(g)}}}function create_if_block_104(e){let t,n,r,i,a,o,s,c=e[63]&&create_if_block_105(e);return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Copy to another device")}:`,r=element("button"),r.textContent=`${l$1("Copy data to clipboard")}`,i=space(),c&&c.c(),a=empty(),attr(n,"class","copy_text svelte-qol35w"),attr(r,"class","export svelte-qol35w"),attr(t,"class","copy_row svelte-qol35w")}
1490,m(l,u){insert(l,t,u),append(t,n),append(t,r),insert(l,i,u),c&&c.m(l,u),insert(l,a,u),o||(s=listen(r,"click",e[114]),o=!0)},p(e,t){e[63]&&c.p(e,t)},d(e){e&&detach(t),e&&detach(i),c&&c.d(e),e&&detach(a),o=!1,s()}}}function create_if_block_105(e){let t,n,r,i,a,o,s,c,l,u,d,p,h=l$1("Include full scores breakdown in CSV?")+"";return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Export a CSV file for analysis")}:`,r=element("button"),r.textContent=`${l$1("Export data in CSV format")}`,i=space(),a=element("div"),o=element("div"),s=element("div"),c=text(h),l=space(),u=element("input"),attr(n,"class","copy_text svelte-qol35w"),attr(r,"class","export svelte-qol35w"),attr(t,"class","copy_row svelte-qol35w"),attr(u,"type","checkbox"),attr(s,"class","copy_text svelte-qol35w"),attr(a,"class","copy_row svelte-qol35w")},m(h,f){insert(h,t,f),append(t,n),append(t,r),insert(h,i,f),insert(h,a,f),append(a,o),append(a,s),append(s,c),append(s,l),append(s,u),u.checked=e[45],d||(p=[listen(r,"click",exportCSV),listen(u,"change",e[257])],d=!0)},p(e,t){16384&t[1]&&(u.checked=e[45])},d(e){e&&detach(t),e&&detach(i),e&&detach(a),d=!1,run_all(p)}}}function create_if_block_103(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Delete all scores")}`,attr(t,"class","reset svelte-qol35w"),set_style(t,"font-size","3vmin")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[115]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_if_block_100(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k,w,T,S,C,I,N,E,P,$,R,O,M,D,L,U,B,G,j,V,F,z,q,W,H,K,Y,Q,J,Z,X,ee,te,ne,re,ie,ae,oe,se,ce,le,ue,de,pe,he,fe,me,ge,ye,be,ve,Ae,_e,xe,ke,we,Te,Se,Ce,Ie=e[42].numGames+"",Ne=e[42].top.score+"",Ee=e[42].top.player+"",Pe=l$1("as")+"",$e=e[42].top.civ.name+"",Re=e[42].bottom.score+"",Oe=e[42].bottom.player+"",Me=l$1("as")+"",De=e[42].bottom.civ.name+"",Le=e[42].players[e[42].currentPlayer].numGames+"",Ue=l$1("won $0, lost $1, drew $2",e[42].players[e[42].currentPlayer].winTally,e[42].players[e[42].currentPlayer].lossTally,e[42].players[e[42].currentPlayer].drawTally)+"",Be=e[42].players[e[42].currentPlayer].avgScore+"",Ge=e[42].players[e[42].currentPlayer].topScore+"",je=l$1("as")+"",Ve=e[42].players[e[42].currentPlayer].topCiv+"",Fe=e[42].players[e[42].currentPlayer].bottomScore+"",ze=l$1("as")+"",qe=e[42].players[e[42].currentPlayer].bottomCiv+"",We=e[42].players,He=[];for(let t=0;t<We.length;t+=1)He[t]=create_each_block_36(get_each_context_36(e,We,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Statistics")}`,r=space(),i=element("div"),a=element("div"),a.textContent=`${l$1("Number of games played:")}`,o=space(),s=element("div"),c=text(Ie),l=space(),u=element("div"),d=element("div"),d.textContent=`${l$1("Best score")}:`,p=space(),h=element("div"),f=text(Ne),m=text(" ("),g=text(Ee),y=space(),b=text(Pe),v=space(),A=text($e),_=text(")"),x=space(),k=element("div"),w=element("div"),w.textContent=`${l$1("Worst score")}:`,T=space(),S=element("div"),C=text(Re),I=text(" ("),N=text(Oe),E=space(),P=text(Me),$=space(),R=text(De),O=text(")"),M=space(),D=element("div"),L=element("div"),L.textContent=`${l$1("Player-specific details:")}`,U=space(),B=element("select");for(let e=0;e<He.length;e+=1)He[e].c();G=space(),j=element("div"),V=element("div"),V.textContent=`${l$1("Number of games played:")}`,F=space(),z=element("div"),q=text(Le),W=text(" ("),H=text(Ue),K=text(")"),Y=space(),Q=element("div"),J=element("div"),J.textContent=`${l$1("Average score")}:`,Z=space(),X=element("div"),ee=text(Be),te=space(),ne=element("div"),re=element("div"),re.textContent=`${l$1("Best score")}
1490:`,ie=space(),ae=element("div"),oe=text(Ge),se=text(" ("),ce=text(je),le=space(),ue=text(Ve),de=text(")"),pe=space(),he=element("div"),fe=element("div"),fe.textContent=`${l$1("Worst score")}:`,me=space(),ge=element("div"),ye=text(Fe),be=text(" ("),ve=text(ze),Ae=space(),_e=text(qe),xe=text(")"),ke=space(),we=element("div"),Te=element("button"),Te.textContent=`${l$1("Close")}`,attr(n,"class","hs_text svelte-qol35w"),attr(a,"class","copy_text svelte-qol35w"),attr(s,"class","copy_text svelte-qol35w"),attr(i,"class","copy_row svelte-qol35w"),attr(d,"class","copy_text svelte-qol35w"),attr(h,"class","copy_text svelte-qol35w"),attr(u,"class","copy_row svelte-qol35w"),attr(w,"class","copy_text svelte-qol35w"),attr(S,"class","copy_text svelte-qol35w"),attr(k,"class","copy_row svelte-qol35w"),attr(L,"class","hs_text svelte-qol35w"),set_style(L,"margin","0"),void 0===e[42].currentPlayer&&add_render_callback((()=>e[258].call(B))),attr(D,"class","copy_row svelte-qol35w"),attr(V,"class","copy_text svelte-qol35w"),attr(z,"class","copy_text svelte-qol35w"),attr(j,"class","copy_row svelte-qol35w"),attr(J,"class","copy_text svelte-qol35w"),attr(X,"class","copy_text svelte-qol35w"),attr(Q,"class","copy_row svelte-qol35w"),attr(re,"class","copy_text svelte-qol35w"),attr(ae,"class","copy_text svelte-qol35w"),attr(ne,"class","copy_row svelte-qol35w"),attr(fe,"class","copy_text svelte-qol35w"),attr(ge,"class","copy_text svelte-qol35w"),attr(he,"class","copy_row svelte-qol35w"),attr(Te,"class","prev svelte-qol35w"),set_style(Te,"font-size","3vmin"),attr(we,"class","copy_row svelte-qol35w"),attr(t,"class","detail svelte-qol35w"),set_style(t,"background-color","green"),set_style(t,"color","black"),set_style(t,"color","white")},m(Ie,Ne){insert(Ie,t,Ne),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),append(s,c),append(t,l),append(t,u),append(u,d),append(u,p),append(u,h),append(h,f),append(h,m),append(h,g),append(h,y),append(h,b),append(h,v),append(h,A),append(h,_),append(t,x),append(t,k),append(k,w),append(k,T),append(k,S),append(S,C),append(S,I),append(S,N),append(S,E),append(S,P),append(S,$),append(S,R),append(S,O),append(t,M),append(t,D),append(D,L),append(D,U),append(D,B);for(let e=0;e<He.length;e+=1)He[e].m(B,null);select_option(B,e[42].currentPlayer),append(t,G),append(t,j),append(j,V),append(j,F),append(j,z),append(z,q),append(z,W),append(z,H),append(z,K),append(t,Y),append(t,Q),append(Q,J),append(Q,Z),append(Q,X),append(X,ee),append(t,te),append(t,ne),append(ne,re),append(ne,ie),append(ne,ae),append(ae,oe),append(ae,se),append(ae,ce),append(ae,le),append(ae,ue),append(ae,de),append(t,pe),append(t,he),append(he,fe),append(he,me),append(he,ge),append(ge,ye),append(ge,be),append(ge,ve),append(ge,Ae),append(ge,_e),append(ge,xe),append(t,ke),append(t,we),append(we,Te),Se||(Ce=[listen(B,"change",e[258]),listen(Te,"click",e[122])],Se=!0)},p(e,t){if(2048&t[1]&&Ie!==(Ie=e[42].numGames+"")&&set_data(c,Ie),2048&t[1]&&Ne!==(Ne=e[42].top.score+"")&&set_data(f,Ne),2048&t[1]&&Ee!==(Ee=e[42].top.player+"")&&set_data(g,Ee),2048&t[1]&&$e!==($e=e[42].top.civ.name+"")&&set_data(A,$e),2048&t[1]&&Re!==(Re=e[42].bottom.score+"")&&set_data(C,Re),2048&t[1]&&Oe
1490!==(Oe=e[42].bottom.player+"")&&set_data(N,Oe),2048&t[1]&&De!==(De=e[42].bottom.civ.name+"")&&set_data(R,De),2048&t[1]){let n;for(We=e[42].players,n=0;n<We.length;n+=1){const r=get_each_context_36(e,We,n);He[n]?He[n].p(r,t):(He[n]=create_each_block_36(r),He[n].c(),He[n].m(B,null))}for(;n<He.length;n+=1)He[n].d(1);He.length=We.length}2048&t[1]&&select_option(B,e[42].currentPlayer),2048&t[1]&&Le!==(Le=e[42].players[e[42].currentPlayer].numGames+"")&&set_data(q,Le),2048&t[1]&&Ue!==(Ue=l$1("won $0, lost $1, drew $2",e[42].players[e[42].currentPlayer].winTally,e[42].players[e[42].currentPlayer].lossTally,e[42].players[e[42].currentPlayer].drawTally)+"")&&set_data(H,Ue),2048&t[1]&&Be!==(Be=e[42].players[e[42].currentPlayer].avgScore+"")&&set_data(ee,Be),2048&t[1]&&Ge!==(Ge=e[42].players[e[42].currentPlayer].topScore+"")&&set_data(oe,Ge),2048&t[1]&&Ve!==(Ve=e[42].players[e[42].currentPlayer].topCiv+"")&&set_data(ue,Ve),2048&t[1]&&Fe!==(Fe=e[42].players[e[42].currentPlayer].bottomScore+"")&&set_data(ye,Fe),2048&t[1]&&qe!==(qe=e[42].players[e[42].currentPlayer].bottomCiv+"")&&set_data(_e,qe)},d(e){e&&detach(t),destroy_each(He,e),Se=!1,run_all(Ce)}}}function create_if_block_101(e){let t;return{c(){t=text("ð¤ ")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_each_block_36(e){let t,n,r=e[348].name+"",i=e[348].bot&&create_if_block_101();return{c(){t=element("option"),i&&i.c(),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),i&&i.m(t,null),append(t,n)},p(e,a){e[348].bot?i||(i=create_if_block_101(),i.c(),i.m(t,n)):i&&(i.d(1),i=null),2048&a[1]&&r!==(r=e[348].name+"")&&set_data(n,r)},d(e){e&&detach(t),i&&i.d()}}}function create_if_block_95(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k,w,T,S,C,I,N,E,P,$,R,O=e[53].name+"",M=l$1("as")+"",D=e[53].civ.name+"",L=l$1("scored")+"",U=e[53].score+"",B=l$1("point{0,s}",e[53].score)+"",G=e[53].hasOwnProperty("campaign"),j=l$1("on")+"",V=makeDateString(e[53].date)+"",F=G&&create_if_block_99(e);function z(e,t){return e[53].bot?create_else_block_22:create_if_block_96}let q=z(e),W=q(e);return{c(){t=element("div"),n=element("div"),r=text(O),i=space(),a=text(M),o=space(),s=text(D),c=space(),l=text(L),u=space(),d=text(U),p=space(),h=text(B),f=space(),F&&F.c(),m=space(),g=element("div"),y=text(j),b=space(),v=text(V),A=text(":"),_=space(),W.c(),x=space(),k=element("div"),w=element("button"),w.textContent=`${l$1("Close")}`,T=space(),S=element("button"),S.textContent=`${l$1("View on stats site")}`,C=space(),I=element("button"),I.textContent=`${l$1("Edit game")}`,N=space(),E=element("button"),E.textContent=`${l$1("Delete game")}`,attr(n,"class","hs_text svelte-qol35w"),attr(g,"class","detail_row svelte-qol35w"),set_style(g,"font-size","2.5vw"),attr(w,"class","close svelte-qol35w"),attr(S,"class","tostats svelte-qol35w"),attr(I,"class","edit svelte-qol35w"),attr(E,"class","delete svelte-qol35w"),set_style(k,"display","flex"),set_style(k,"width","100%"),set_style(k,"justify-content","space-between"),attr(t,"class","detail svelte-qol35w"),attr(t,"style",P=e[53].civ.hsStyle?e[53].civ.hsStyle:"background-"+e[53].civ.style+" color:"+e[53].civ.contrastText)},m(P,O){insert(P,t,O),append(t,n),append(n,r),append(n,i),append(n,a),append(n,o),append(n,s),append(n,c),append(n,l),append(n,u),append(n,d),append(n,p),append(n,h),append(t,f),F&&F.m(t,null),append(t,m),append(t,g),append(g,y),append(g,b),append(g,v),append(g,A),append(t,_),W.m(t,null),append(t,x),append(t,k),append(k,w),append(k,T),append(k,S),append(k,C),append(k,I),append(k,N),append(k,E),$||(R=[listen(w,"click",e[100]),listen(S,"click",e[133]),listen(I,"click",e[135]),listen(E,"click",e[101])],$=!0)},p(e,n){4194304&n[1]&&O!==(O=e[53].name+"")&&set_data(r,O),4194304&n[1]&&D!==(D=e[53].civ.name+"")&&set_data(s,D),4194304&n[1]&&U!==(U=e[53].score+"")&&set_data(d,U),4194304&n[1]&&B!==(B=l$1("point{0,s}",e[53].score)+"")&&set_data(h,B),4194304&n[1]&&(G=e[53].hasOwnProperty("campaign")),G?F?F.p(e,n):(F=create_if_block_99(e),F.c(),F.m(t,m)):F&&(F.d(1),F=null),4194304&n[1]&&V!==(V=makeDateString(e[53].date)+"")&&set_data(v,V),q===(q=z(e))&&W?W.p(e,n):(W.d(1),W=q(e),W&&(W.c(),W.m(t,x))),41943
149004&n[1]&&P!==(P=e[53].civ.hsStyle?e[53].civ.hsStyle:"background-"+e[53].civ.style+" color:"+e[53].civ.contrastText)&&attr(t,"style",P)},d(e){e&&detach(t),F&&F.d(),W.d(),$=!1,run_all(R)}}}function create_if_block_99(e){let t,n,r=e[113](e[53].campaignID)?l$1("Game $0 of $1 in",e[102](e[53]),e[90](e[113](e[53].campaignID)).length)+" "+(e[113](e[53].campaignID).finished?l$1("completed campaign"):l$1("ongoing campaign")):"";return{c(){t=element("div"),n=text(r),attr(t,"class","detail_row svelte-qol35w"),set_style(t,"font-size","2.5vw")},m(e,r){insert(e,t,r),append(t,n)},p(e,t){4194304&t[1]&&r!==(r=e[113](e[53].campaignID)?l$1("Game $0 of $1 in",e[102](e[53]),e[90](e[113](e[53].campaignID)).length)+" "+(e[113](e[53].campaignID).finished?l$1("completed campaign"):l$1("ongoing campaign")):"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_else_block_22(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k,w,T,S,C,I=l$1(e[64][e[53].botLevel])+"",N=l$1("tokens")+"",E=e[106](e[53])+"",P=e[53].pop+"",$=e[53].res+"",R=e[67],O=[];for(let t=0;t<R.length;t+=1)O[t]=create_each_block_35(get_each_context_35(e,R,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Bot level")}:`,r=element("div"),i=text(I),a=space();for(let e=0;e<O.length;e+=1)O[e].c();o=space(),s=element("div"),c=element("div"),l=element("img"),d=text("Â &Â "),p=element("img"),f=text("Â "),m=text(N),g=text(":"),y=element("div"),b=text(E),v=text(" ("),A=text(P),_=element("img"),k=text(", "),w=text($),T=element("img"),C=text(")"),attr(t,"class","detail_row svelte-qol35w"),l.src!==(u="pop.png")&&attr(l,"src","pop.png"),set_style(l,"width","6vmin"),set_style(l,"height","6vmin"),p.src!==(h="res.png")&&attr(p,"src","res.png"),set_style(p,"width","6vmin"),set_style(p,"height","6vmin"),attr(c,"class","detail_img svelte-qol35w"),_.src!==(x="pop.png")&&attr(_,"src","pop.png"),set_style(_,"width","6vmin"),set_style(_,"height","6vmin"),T.src!==(S="res.png")&&attr(T,"src","res.png"),set_style(T,"width","6vmin"),set_style(T,"height","6vmin"),attr(y,"class","detail_img svelte-qol35w"),attr(s,"class","detail_row svelte-qol35w")},m(e,u){insert(e,t,u),append(t,n),append(t,r),append(r,i),insert(e,a,u);for(let t=0;t<O.length;t+=1)O[t].m(e,u);insert(e,o,u),insert(e,s,u),append(s,c),append(c,l),append(c,d),append(c,p),append(c,f),append(c,m),append(c,g),append(s,y),append(y,b),append(y,v),append(y,A),append(y,_),append(y,k),append(y,w),append(y,T),append(y,C)},p(e,t){if(4194304&t[1]&&I!==(I=l$1(e[64][e[53].botLevel])+"")&&set_data(i,I),4194304&t[1]|32&t[2]|4096&t[3]|268435456&t[11]){let n;for(R=e[67],n=0;n<R.length;n+=1){const r=get_each_context_35(e,R,n);O[n]?O[n].p(r,t):(O[n]=create_each_block_35(r),O[n].c(),O[n].m(o.parentNode,o))}for(;n<O.length;n+=1)O[n].d(1);O.length=R.length}4194304&t[1]&&E!==(E=e[106](e[53])+"")&&set_data(b,E),4194304&t[1]&&P!==(P=e[53].pop+"")&&set_data(A,P),4194304&t[1]&&$!==($=e[53].res+"")&&set_data(w,$)},d(e){e&&detach(t),e&&detach(a),destroy_each(O,e),e&&detach(o),e&&detach(s)}}}function create_if_block_96(e){let t,n=e[66],r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_34(get_each_context_34(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(4194304&i[1]|16&i[2]|4096&i[3]|268435456&i[11]){let a;for(n=e[66],a=0;a<n.length;a+=1){const o=get_each_context_34(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_34(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_if_block_98(e){let t,n,r,i,a,o,s,c,l,u=l$1(e[353].label)+"",d=e[105](e[53],e[353])+"";return{c(){t=element("div"),n=element("div"),r=element("img"),a=text("Â "),o=text(u),s=text(":"),c=element("div"),l=text(d),r.src!==(i=e[353].img+".png")&&attr(r,"src",i),set_style(r,"width","6vmin"),set_style(r,"height","6vmin"),attr(n,"class","detail_img svelte-qol35w"),attr(t,"class","detail_row svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),append(n,r),append(n,a),append(n,o),append(n,s),append(t,c),append(c,l)},p(e,t){4194304&t[1]&&d!==(d=e[105](e[53],e[353])+"")&&set_data(l,d)},d(e){e&&detach(t)}}}function create_each_block_35(e){let t,n=("pad"==e[353].type||e[353].scoreVal)&&create_if_block_98(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,t){("pad"==e[353].type||e[353].scoreVal)&&n.p(e,t)},d(e){n&&n.d(e),e&&detach(t)}}}function create_if_block_97(e){let t,n,r,i,a,o,s,c,l,u,d=l$1(e[353].label)+"",p=e[105](e[53],e[353])+"";return{c(){t=element("div"),n=element("div"),r=element("img"),a=text("Â "),o=text(d),s=text(":"),c=element("div"),l=text(p),u=space(),r.src!==(i=e[353].img+".png")&&attr(r,"src",i),set_style(r,"width","6vmin"),set_style(r,"height","6vmin"),attr(n,"class","detail_img svelte-qol35w"),attr(t,"class","detail_row svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),append(n,r),append(n,a),append(n,o),append(n,s),append(t,c),append(c,l),append(c,u)},p(e,t){4194304&t[1]&&p!==(p=e[105](e[53],e[353])+"")&&set_data(l,p)},d(e){e&&detach(t)}}}function create_each_block_34(e){let t,n=("pad"==e[353].type||e[353].scoreVal)&&create_if_block_97(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,t){("pad"==e[353].type||e[353].scoreVal)&&n.p(e,t)},d(e){n&&n.d(e),e&&detach(t)}}}function create_else_block_19(e){let t,n,r,i=e[67],a=[];for(let t=0;t<i.length;t+=1)a[t]=create_each_block_33(get_each_context_33(e,i,t));function o(e,t){return"notes"==e[67][e[52]].type?create_if_block_83:create_else_block_20}let s=o(e),c=s(e);return{c(){t=element("div"),n=element("div");for(let e=0;e<a.length;e+=1)a[e].c();r=space(),c.c(),attr(n,"class","scoretypes svelte-qol35w"),attr(t,"class","box_2 svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n);for(let e=0;e<a.length;e+=1)a[e].m(n,null);append(t,r),c.m(t,null)},p(e,r){if(5&r[0]|2097152&r[1]|131104&r[2]|268435456&r[11]){let t;for(i=e[67],t=0;t<i.length;t+=1){const o=get_each_context_33(e,i,t);a[t]?a[t].p(o,r):(a[t]=create_each_block_33(o),a[t].c(),a[t].m(n,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=i.length}s===(s=o(e))&&c?c.p(e,r):(c.d(1),c=s(e),c&&(c.c(),c.m(t,null)))},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(a,e),c.d()}}}function create_if_block_79(e){let t,n,r,i,a,o,s,c,l,u,d,p,h=l$1("Score all bot cards in a single pile. The bot does not score the power card")+"",f=hasExtrasToScore(e[2][e[0]-2]),m=e[23],g=[];for(let t=0;t<m.length;t+=1)g[t]=create_each_block_27(get_each_context_27(e,m,t));let y=f&&create_if_block_81(e),b=e[8]&&create_if_block_80(e);function v(t){e[245](t)}let A={cards:e[21],numPlayers:e[1],current:e[0]-2,location:"deck",box:e[12],exp:e[11]};return void 0!==e[2]&&(A.players=e[2]),u=new CardSelect({props:A}),binding_callbacks.push((()=>bind$1(u,"players",v))),{c(){t=element("div"),n=element("div"),r=element("div");for(let e=0;e<g.length;e+=1)g[e].c();i=space(),a=element("div"),o=text(h),y&&y.c(),s=text("."),c=space(),b&&b.c(),l=space(),create_component(u.$$.fragment),set_style(r,"display","flex"),set_style(r,"align-items","center"),set_style(r,"justify-content","space-evenly"),attr(a,"class","message svelte-qol35w"),attr(n,"class","cards_entry svelte-qol35w"),attr(t,"class","box_1 svelte-qol35w")},m(e,d){insert(e,t,d),append(t,n),append(n,r);for(let e=0;e<g.length;e+=1)g[e].m(r,null);append(n,i),append(n,a),append(a,o),y&&y.m(a,null),append(a,s),append(n,c),b&&b.m(n,null),append(n,l),mount_component(u,n,null),p=!0},p(e,t){if(8388613&t[0]|5&t[1]|15&t[3]){let n;for(m=e[23],n=0;n<m.length;n+=1){const i=get_each_context_27(e,m,n);g[n]?g[n].p(i,t):(g[n]=create_each_block_27(i),g[n].c(),g[n].m(r,null))}for(;n<g.length;n+=1)g[n].d(1);g.length=m.length}5&t[0]&&(f=hasExtrasToScore(e[2][e[0]-2])),f?y?y.p(e,t):(y=create_if_block_81(e),y.c(),y.m(a,s)):y&&(y.d(1),y=null),e[8]?b?b.p(e,t):(b=create_if_block_80(e),b.c(),b.m(n,l)):b&&(b.d(1),b=null);const i={};2097152&t[0]&&(i.cards=e[21]),2&t[0]&&(i.numPlayers=e[1]),1&t[0]&&(i.current=e[0]-2),4096&t[0]&&(i.box=e[12]),2048&t[0]&&(i.exp=e[11]),!d&&4&t[0]&&(d=!0,i.players=e[2],add_flush_callback((()=>d=!1))),u.$set(i)},i(e){p||(transition_in(u.$$.fragment,e),p=!0)},o(e){transition_out(u.$$.fragment,e),p=!1},d(e){e&&detach(t),destroy_each(g,e),y&&y.d(),b&&b.d(),destroy_component(u)}}}function create_if_block_49(e){let t,n,r,i,a,o;function s(e,t){return e[18]?create_if_block_73:create_else_block_17}let c=s(e),l=c(e);const u=[create_if_block_50,create_if_block_66,create_else_block_14],d=[];function p(e,t){return e[18]?0:"notes"==e[66][e[52]].type?1:2}return i=p(e),a=d[i]=u[i](e),{c(){t=element("div"),n=element("div"),l.c(),r=space(),a.c(),attr(n,"class","scoretypes svelte-qol35w"),attr(t,"class","box_2 svelte-qol35w")},m(e,a){insert(e,t,a),append(t,n),l.m(n,null),append(t,r),d[i].m(t,null),o=!0},p(e,r){c===(c=s(e))&&l?l.p(e,r):(l.d(1),l=c(e),l&&(l.c(),l.m(n,null)));let o=i;i=p(e),i===o?d[i].p(e,r):(group_outros(),transition_out(d[o],1,1,(()=>{d[o]=null})),check_outros(),a=d[i],a?a.p(e,r):(a=d[i]=u[i](e),a.c()),transition_in(a,1),a.m(t,null))},i(e){o||(transition_in(a),o=!0)},o(e){transition_out(a),o=!1},d(e){e&&detach(t),l.d(),d[i].d()}}}function create_if_block_93(e){let t,n,r;return{c(){t=element("img"),r=text("Â "),t.src!==(n=e[353].img+".png")&&attr(t,"src",n),set_style(t,"width","6vmin"),set_style(t,"height","6vmin")},m(e,n){insert(e,t,n),insert(e,r,n)},p:noop$1,d(e){e&&detach(t),e&&detach(r)}}}function create_if_block_92(e){let t,n=e[2][e[0]-2][e[353].key]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]&&n!==(n=e[2][e[0]-2][e[353].key]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_91(e){let t,n=e[2][e[0]-2][e[353].key].reduce(func_24,0)+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]&&n!==(n=e[2][e[0]-2][e[353].key].reduce(func_24,0)+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_each_block_33(e){let t,n,r,i,a,o,s=e[353].hasOwnProperty("img"),c=l$1(e[353].label)+"",l=s&&create_if_block_93(e);let u=function(e,t){return"pad"==e[353].type?create_if_block_91:"incdec"==e[353].type?create_if_block_92:void 0}(e),d=u&&u(e);function p(...t){return e[246](e[350],...t)}return{c(){t=element("div"),l&&l.c(),n=text(c),r=text(":\n\t\t\t\t\t\t\t\t\t"),d&&d.c(),i=space(),attr(t,"class","score svelte-qol35w"),toggle_class(t,"selected",e[52]==e[350])},m(e,s){insert(e,t,s),l&&l.m(t,null),append(t,n),append(t,r),d&&d.m(t,null),append(t,i),a||(o=listen(t,"click",p),a=!0)},p(n,r){e=n,s&&l.p(e,r),d&&d.p(e,r),2097152&r[1]&&toggle_class(t,"selected",e[52]==e[350])},d(e){e&&detach(t),l&&l.d(),d&&d.d(),a=!1,o()}}}function create_else_block_20(e){let t,n,r,i,a,o,s,c,l=l$1(e[67][e[52]].name+" "+e[67][e[52]].label)+"",u=e[67][e[52]].hasOwnProperty("message"),d=u&&create_if_block_90(e);function p(e,t){return"pad"==e[67][e[52]].type?create_if_block_86:"incdec"==e[67][e[52]].type?create_if_block_88:void 0}let h=p(e),f=h&&h(e);return{c(){t=element("div"),n=element("div"),r=text(l),i=text(":"),a=space(),o=element("div"),d&&d.c(),s=space(),f&&f.c(),c=space(),attr(n,"class","scoretitle svelte-qol35w"),attr(o,"class","message svelte-qol35w"),attr(t,"class","score_entry svelte-qol35w")},m(e,l){insert(e,t,l),append(t,n),append(n,r),append(n,i),append(t,a),append(t,o),d&&d.m(o,null),append(t,
1490s),f&&f.m(t,null),append(t,c)},p(e,n){2097152&n[1]&&l!==(l=l$1(e[67][e[52]].name+" "+e[67][e[52]].label)+"")&&set_data(r,l),2097152&n[1]&&(u=e[67][e[52]].hasOwnProperty("message")),u?d?d.p(e,n):(d=create_if_block_90(e),d.c(),d.m(o,null)):d&&(d.d(1),d=null),h===(h=p(e))&&f?f.p(e,n):(f&&f.d(1),f=h&&h(e),f&&(f.c(),f.m(t,c)))},d(e){e&&detach(t),d&&d.d(),f&&f.d()}}}function create_if_block_83(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k=l$1(e[67][e[52]].message)+"",w=l$1("Game end trigger:")+"",T=l$1("by player")+"",S=l$1("Most crucial cards (in player's strategy)")+"",C=e[62],I=[];for(let t=0;t<C.length;t+=1)I[t]=create_each_block_29(get_each_context_29(e,C,t));let N=e[2].filter(e[249]),E=[];for(let t=0;t<N.length;t+=1)E[t]=create_each_block_28(get_each_context_28(e,N,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Notes")}`,r=space(),i=element("div"),a=text(k),o=space(),s=element("textarea"),c=space(),l=text(w),u=space(),d=element("div"),p=element("select");for(let e=0;e<I.length;e+=1)I[e].c();h=space(),f=text(T),m=text(": \n\t\t\t\t\t\t\t"),g=element("select");for(let e=0;e<E.length;e+=1)E[e].c();y=space(),b=text(S),v=text(": "),A=element("input"),attr(n,"class","scoretitle svelte-qol35w"),attr(i,"class","message svelte-qol35w"),set_style(s,"width","90%"),attr(s,"rows","5"),void 0===e[2][0].trigger&&add_render_callback((()=>e[248].call(p))),void 0===e[2][0].triggeringPlayer&&add_render_callback((()=>e[250].call(g))),attr(A,"type","text"),attr(A,"size","20"),attr(t,"class","notes_entry svelte-qol35w")},m(k,w){insert(k,t,w),append(t,n),append(t,r),append(t,i),append(i,a),append(t,o),append(t,s),set_input_value(s,e[2][e[0]-2].general),append(t,c),append(t,l),append(t,u),append(t,d),append(d,p);for(let e=0;e<I.length;e+=1)I[e].m(p,null);select_option(p,e[2][0].trigger),append(d,h),append(d,f),append(d,m),append(d,g);for(let e=0;e<E.length;e+=1)E[e].m(g,null);select_option(g,e[2][0].triggeringPlayer),append(t,y),append(t,b),append(t,v),append(t,A),set_input_value(A,e[2][e[0]-2].notes.bigCards),_||(x=[listen(s,"input",e[247]),listen(p,"change",e[248]),listen(p,"change",e[117]),listen(g,"change",e[250]),listen(A,"input",e[251])],_=!0)},p(e,t){if(2097152&t[1]&&k!==(k=l$1(e[67][e[52]].message)+"")&&set_data(a,k),5&t[0]&&set_input_value(s,e[2][e[0]-2].general),1&t[2]|1073741824&t[3]|268435456&t[11]){let n;for(C=e[62],n=0;n<C.length;n+=1){const r=get_each_context_29(e,C,n);I[n]?I[n].p(r,t):(I[n]=create_each_block_29(r),I[n].c(),I[n].m(p,null))}for(;n<I.length;n+=1)I[n].d(1);I.length=C.length}if(4&t[0]&&select_option(p,e[2][0].trigger),6&t[0]){let n;for(N=e[2].filter(e[249]),n=0;n<N.length;n+=1){const r=get_each_context_28(e,N,n);E[n]?E[n].p(r,t):(E[n]=create_each_block_28(r),E[n].c(),E[n].m(g,null))}for(;n<E.length;n+=1)E[n].d(1);E.length=N.length}4&t[0]&&select_option(g,e[2][0].triggeringPlayer),5&t[0]&&A.value!==e[2][e[0]-2].notes.bigCards&&set_input_value(A,e[2][e[0]-2].notes.bigCards)},d(e){e&&detach(t),destroy_each(I,e),destroy_each(E,e),_=!1,run_all(x)}}}function create_if_block_90(e){let t,n,r,i=(e[67][e[52]].hasOwnProperty("interpolation")?interpolateMessage(e[67][e[52]].message,e[67][e[52]].interpolation(e[2][e[0]-2])):e[67][e[52]].message)+"";return{c(){t=text("("),n=text(i),r=text(")")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p(e,t){5&t[0]|2097152&t[1]&&i!==(i=(e[67][e[52]].hasOwnProperty("interpolation")?interpolateMessage(e[67][e[52]].message,e[67][e[52]].interpolation(e[2][e[0]-2])):e[67][e[52]].message)+"")&&set_data(n,i)},d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_if_block_88(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f;function m(e,t){return e[31]&&e[31].player==e[0]-2&&e[31].token==e[67][e[52]].key?create_if_block_89:create_else_block_21}let g=m(e),y=g(e);return{c(){t=element("div"),n=element("div"),r=element("button"),r.textContent="-",i=space(),a=element("div"),o=element("div"),s=element("img"),l=space(),u=element("div"),y.c(),d=space(),p=element("button"),p.textContent="+",attr(r,"class","incdec svelte-qol35w"),attr(s,"class","tokenimage svelte-qol35w"),s.src!==(c=e[67][e[52]].img+".png")&&attr(s,"src",c),attr(u,"class","tokencount svelte-qol35w"),set_style(u,"font-size","7vmin"),attr(a,"class","token svelte-qol35w"),attr(p,"class","incdec svelte-qol35w"),attr(n,"class","scoretoken svelte-qol35w"),attr(t,"class","incdec svelte-qol35w")},m(c,m){insert(c,t,m),append(t,n),append(n,r),append(n,i),append(n,a),append(a,o),append(o,s),append(a,l),append(a,u),y.m(u,null),append(n,d),append(n,p),h||(f=[listen(r,"click",(function(){is_function(e[93](e[0]-2,e[67][e[52]].key,e[2][e[0]-2][e[67][e[52]].key]-1))&&e[93](e[0]-2,e[67][e[52]].key,e[2][e[0]-2][e[67][e[52]].key]-1).apply(this,arguments)})),listen(u,"click",e[255]),listen(p,"click",(function(){is_function(e[93](e[0]-2,e[67][e[52]].key,e[2][e[0]-2][e[67][e[52]].key]+1))&&e[93](e[0]-2,e[67][e[52]].key,e[2][e[0]-2][e[67][e[52]].key]+1).apply(this,arguments)}))],h=!0)},p(t,n){e=t,2097152&n[1]&&s.src!==(c=e[67][e[52]].img+".png")&&attr(s,"src",c),g===(g=m(e))&&y?y.p(e,n):(y.d(1),y=g(e),y&&(y.c(),y.m(u,null)))},d(e){e&&detach(t),y.d(),h=!1,run_all(f)}}}function create_if_block_86(e){let t,n,r,i,a,o,s,c,l=e[2][e[0]-2][e[67][e[52]].key],u=[];for(let t=0;t<l.length;t+=1)u[t]=create_each_block_32(get_each_context_32(e,l,t));let d=[...Array(e[67][e[52]].max).keys()],p=[];for(let t=0;t<d.length;t+=1)p[t]=create_each_block_31(get_each_context_31(e,d,t));let h=e[66][e[52]].neg&&create_if_block_87(e);return{c(){t=element("div");for(let e=0;e<u.length;e+=1)u[e].c();n=space(),r=element("div");for(let e=0;e<p.length;e+=1)p[e].c();i=space(),h&&h.c(),a=space(),o=element("button"),o.textContent="â«",attr(t,"class","scorelist svelte-qol35w"),attr(o,"class","paditem svelte-qol35w"),set_style(o,"background-color","red"),attr(r,"class","pad svelte-qol35w")},m(l,d){insert(l,t,d);for(let e=0;e<u.length;e+=1)u[e].m(t,null);insert(l,n,d),insert(l,r,d);for(let e=0;e<p.length;e+=1)p[e].m(r,null);append(r,i),h&&h.m(r,null),append(r,a),append(r,o),s||(c=listen(o,"click",(function(){is_function(e[97](e[0]-2,e[67][e[52]],e[2][e[0]-2][e[67][e[52]].key].length-1))&&e[97](e[0]-2,e[67][e[52]],e[2][e[0]-2][e[67][e[52]].key].length-1).apply(this,arguments)})),s=!0)},p(n,o){if(e=n,5&o[0]|2097152&o[1]|32&o[2]|16&o[3]){let n;for(l=e[2][e[0]-2][e[67][e[52]].key],n=0;n<l.length;n+=1){const r=get_each_context_32(e,l,n);u[n]?u[n].p(r,o):(u[n]=create_each_block_32(r),u[n].c(),u[n].m(t,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=l.length}if(1&o[0]|2097152&o[1]|32&o[2]|32&o[3]){let t;for(d=[...Array(e[67][e[52]].max).keys()],t=0;t<d.length;t+=1){const n=get_each_context_31(e,d,t);p[t]?p[t].p(n,o):(p[t]=create_each_block_31(n),p[t].c(),p[t].m(r,i))}for(;t<p.length;t+=1)p[t].d(1);p.length=d.length}e[66][e[52]].neg?h?h.p(e,o):(h=create_if_block_87(e),h.c(),h.m(r,a)):h&&(h.d(1),h=null)},d(e){e&&detach(t),destroy_each(u,e),e&&detach(n),e&&detach(r),destroy_each(p,e),h&&h.d(),s=!1,c()}}}function create_else_block_21(e){let t,n=e[2][e[0]-2][e[67][e[52]].key]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]|2097152&r[1]&&n!==(n=e[2][e[0]-2][e[67][e[52]].key]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_89(e){let t,n,r;return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(i,a){insert(i,t,a),set_input_value(t,e[2][e[0]-2][e[67][e[52]].key]),n||(r=[listen(t,"input",e[253]),listen(t,"blur",e[94]),listen(t,"keyup",e[254]),listen(t,"input",e[95])],n=!0)},p(e,n){5&n[0]|2097152&n[1]|32&n[2]&&t.value!==e[2][e[0]-2][e[67][e[52]].key]&&set_input_value(t,e[2][e[0]-2][e[67][e[52]].key])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_32(e){let t,n,r,i,a,o,s=e[396]+"";function c(...t){return e[252](e[350],...t)}return{c(){t=element("div"),n=text(s),r=space(),attr(t,"class","scoresingle svelte-qol35w"),attr(t,"style",i=e[396]<0?"background-color: orange;":"")},m(e,i){insert(e,t,i),append(t,n),append(t,r),a||(o=listen(t,"click",c),a=!0)},p(r,a){e=r,5&a[0]|2097152&a[1]&&s!==(s=e[396]+"")&&set_data(n,s),5&a[0]|2097152&a[1]&&i!==(i=e[396]<0?"background-color: orange;":"")&&attr(t,"style",i)},d(e){e&&detach(t),a=!1,o()}}}function create_each_block_31(e){let t,n,r,i,a=e[391]+1+"";return{c(){t=element("button"),n=text(a),attr(t,"class","paditem svelte-qol35w")},m(a,o){insert(a,t,o),append(t,n),r||(i=listen(t,"click",(function(){is_function(e[98](e[0]-2,e[67][e[52]],e[391]+1))&&e[98](e[0]-2,e[67][e[52]],e[391]+1).apply(this,arguments)})),r=!0)},p(t,r){e=t,2097152&r[1]&&a!==(a=e[391]+1+"")&&set_data(n,a)},d(e){e&&detach(t),r=!1,i()}}}function create_if_block_87(e){let t,n=e[67][e[52]].neg,r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_30(get_each_context_30(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();
1490t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(1&i[0]|2097152&i[1]|32&i[2]|32&i[3]){let a;for(n=e[67][e[52]].neg,a=0;a<n.length;a+=1){const o=get_each_context_30(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_30(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_each_block_30(e){let t,n,r,i,a=e[391]+"";return{c(){t=element("button"),n=text(a),attr(t,"class","paditem svelte-qol35w"),set_style(t,"background-color","orange")},m(a,o){insert(a,t,o),append(t,n),r||(i=listen(t,"click",(function(){is_function(e[98](e[0]-2,e[67][e[52]],e[391]))&&e[98](e[0]-2,e[67][e[52]],e[391]).apply(this,arguments)})),r=!0)},p(t,r){e=t,2097152&r[1]&&a!==(a=e[391]+"")&&set_data(n,a)},d(e){e&&detach(t),r=!1,i()}}}function create_if_block_84(e){let t,n,r=l$1(e[385].name)+"";return{c(){t=element("option"),n=text(r),t.__value=e[385].name,t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_each_block_29(e){let t,n=!e[385].hasOwnProperty("needsCiv")||e[123](e[385].needsCiv),r=n&&create_if_block_84(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,t){n&&r.p(e,t)},d(e){r&&r.d(e),e&&detach(t)}}}function create_each_block_28(e){let t,n,r=e[348].name+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,t){6&t[0]&&r!==(r=e[348].name+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_else_block_18(e){let t,n=e[2][e[0]-2][e[373]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){8388613&r[0]&&n!==(n=e[2][e[0]-2][e[373]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_82(e){let t,n,r;function i(){e[240].call(t,e[373])}return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(a,o){insert(a,t,o),set_input_value(t,e[2][e[0]-2][e[373]]),n||(r=[listen(t,"input",i),listen(t,"blur",e[94]),listen(t,"keyup",e[241]),listen(t,"input",e[95])],n=!0)},p(n,r){e=n,8388613&r[0]&&t.value!==e[2][e[0]-2][e[373]]&&set_input_value(t,e[2][e[0]-2][e[373]])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_27(e){let t,n,r,i,a,o,s,c,l,u,d,p;function h(e,t){return e[31]&&e[31].player==e[0]-2&&e[31].token==e[373]?create_if_block_82:create_else_block_18}let f=h(e),m=f(e);function g(...t){return e[242](e[373],...t)}return{c(){t=element("div"),n=element("button"),n.textContent="-",r=space(),i=element("div"),a=element("div"),o=space(),s=element("div"),m.c(),c=space(),l=element("button"),l.textContent="+",u=space(),attr(n,"class","incdec svelte-qol35w"),set_style(n,"display","flex"),set_style(n,"align-items","center"),set_style(n,"justify-content","center"),set_style(n,"font-size","7vmin"),set_style(n,"margin-bottom","1vmin"),attr(a,"class","imagediv svelte-qol35w"),set_style(a,"background-image","url("+e[373]+".png)"),attr(s,"class","tokencount svelte-qol35w"),set_style(s,"font-size","7vmin"),attr(i,"class","token svelte-qol35w"),set_style(i,"width","10vmin"),set_style(i,"min-height","10vmin"),attr(l,"class","incdec svelte-qol35w"),set_style(l,"display","flex"),set_style(l,"align-items","center"),set_style(l,"justify-content","center"),set_style(l,"font-size","7vmin"),set_style(l,"margin-bottom","1vmin"),attr(t,"class","tokenrow svelte-qol35w"),set_style(t,"padding","0vmin"),set_style(t,"display","flex")},m(h,f){insert(h,t,f),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),m.m(s,null),append(t,c),append(t,l),append(t,u),d||(p=[listen(n,"click",(function(){is_function(e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]-1))&&e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]-1).apply(this,arguments)})),listen(s,"click",g),listen(l,"click",(function(){is_function(e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]+1))&&e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]+1).apply(this,arguments)}))],d=!0)},p(t,n){e=t,8388608&n[0]&&set_style(a,"background-image","url("+e[373]+".png)"),f===(f=h(e))&&m?m.p(e,n):(m.d(1),m=f(e),m&&(m.c(),m.m(s,null)))},d(e){e&&detach(t),m.d(),d=!1,run_all(p)}}}function create_if_block_81(e){let t,n,r=l$1("but any score from the $0 card{1,s} will be included in the final score",e[2][e[0]-2].extraDeck,e[2][e[0]-2].extras.length)+"";return{c(){t=text(", "),n=text(r)},m(e,r){insert(e,t,r),insert(e,n,r)},p(e,t){5&t[0]&&r!==(r=l$1("but any score from the $0 card{1,s} will be included in the final score",e[2][e[0]-2].extraDeck,e[2][e[0]-2].extras.length)+"")&&set_data(n,r)},d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_80(e){let t,n,r,i,a,o,s,c;return{c(){t=element("label"),n=element("div"),r=text("ð· Â "),i=text(e[34]),a=space(),o=element("input"),set_style(n,"background-color","white"),set_style(n,"color","black"),set_style(n,"font-size","3vmin"),set_style(n,"font-weight","bold"),set_style(n,"cursor","pointer"),set_style(n,"text-align","center"),set_style(n,"margin","0.2vmin"),set_style(n,"padding","0.5vmin"),attr(t,"for","file"),set_style(t,"display","flex"),set_style(t,"align-items","center"),set_style(t,"justify-content","center"),attr(o,"id","file"),attr(o,"type","file"),set_style(o,"display","none"),attr(o,"accept","image/*")},m(l,u){insert(l,t,u),append(t,n),append(n,r),append(n,i),insert(l,a,u),insert(l,o,u),e[243](o),s||(c=listen(o,"change",e[244]),s=!0)},p(e,t){8&t[1]&&set_data(i,e[34])},d(n){n&&detach(t),n&&detach(a),n&&detach(o),e[243](null),s=!1,c()}}}function create_else_block_17(e){let t,n=e[66],r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_26(get_each_context_26(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();
1490t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(5&i[0]|2097152&i[1]|131088&i[2]|268435456&i[11]){let a;for(n=e[66],a=0;a<n.length;a+=1){const o=get_each_context_26(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_26(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_if_block_73(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y=l$1("Power card{0,s}",e[2][e[0]-2].hasOwnProperty("extraDeck")?2:0)+"",b=l$1("side")+"",v=e[2][e[0]-2].power+"",A=e[125](e[2][e[0]-2])+"",_=e[136](e[2][e[0]-2]),x=[];for(let t=0;t<_.length;t+=1)x[t]=create_each_block_25(get_each_context_25(e,_,t));let k=e[23],w=[];for(let t=0;t<k.length;t+=1)w[t]=create_each_block_24(get_each_context_24(e,k,t));return{c(){t=element("div"),n=text(y),r=text(" ("),i=text(b),a=space(),o=text(v),s=text("): "),c=text(A),l=text(" VP"),u=space();for(let e=0;e<x.length;e+=1)x[e].c();d=space(),p=element("div");for(let e=0;e<w.length;e+=1)w[e].c();h=space(),f=element("div"),f.textContent=`${l$1("Notes")}`,attr(t,"class","score svelte-qol35w"),toggle_class(t,"selected","power"==e[36]),attr(p,"class","score svelte-qol35w"),set_style(p,"display","flex"),set_style(p,"justify-content","space-evenly"),toggle_class(p,"selected","tokens"==e[36]),attr(f,"class","score svelte-qol35w"),toggle_class(f,"selected","notes"==e[36])},m(y,b){insert(y,t,b),append(t,n),append(t,r),append(t,i),append(t,a),append(t,o),append(t,s),append(t,c),append(t,l),insert(y,u,b);for(let e=0;e<x.length;e+=1)x[e].m(y,b);insert(y,d,b),insert(y,p,b);for(let e=0;e<w.length;e+=1)w[e].m(p,null);insert(y,h,b),insert(y,f,b),m||(g=[listen(t,"click",e[196]),listen(p,"click",e[204]),listen(f,"click",e[205])],m=!0)},p(e,r){if(5&r[0]&&y!==(y=l$1("Power card{0,s}",e[2][e[0]-2].hasOwnProperty("extraDeck")?2:0)+"")&&set_data(n,y),5&r[0]&&v!==(v=e[2][e[0]-2].power+"")&&set_data(o,v),5&r[0]&&A!==(A=e[125](e[2][e[0]-2])+"")&&set_data(c,A),32&r[1]&&toggle_class(t,"selected","power"==e[36]),8388613&r[0]|32&r[1]|262144&r[2]|16384&r[3]|4096&r[4]|268435456&r[11]){let t;for(_=e[136](e[2][e[0]-2]),t=0;t<_.length;t+=1){const n=get_each_context_25(e,_,t);x[t]?x[t].p(n,r):(x[t]=create_each_block_25(n),x[t].c(),x[t].m(d.parentNode,d))}for(;t<x.length;t+=1)x[t].d(1);x.length=_.length}if(8388613&r[0]){let t;for(k=e[23],t=0;t<k.length;t+=1){const n=get_each_context_24(e,k,t);w[t]?w[t].p(n,r):(w[t]=create_each_block_24(n),w[t].c(),w[t].m(p,null))}for(;t<w.length;t+=1)w[t].d(1);w.length=k.length}32&r[1]&&toggle_class(p,"selected","tokens"==e[36]),32&r[1]&&toggle_class(f,"selected","notes"==e[36])},d(e){e&&detach(t),e&&detach(u),destroy_each(x,e),e&&detach(d),e&&detach(p),destroy_each(w,e),e&&detach(h),e&&detach(f),m=!1,run_all(g)}}}function create_if_block_78(e){let t,n,r;return{c(){t=element("img"),r=text("Â "),t.src!==(n=e[353].img+".png")&&attr(t,"src",n),set_style(t,"width","6vmin"),set_style(t,"height","6vmin")},m(e,n){insert(e,t,n),insert(e,r,n)},p:noop$1,d(e){e&&detach(t),e&&detach(r)}}}function create_if_block_77(e){let t,n=e[2][e[0]-2][e[353].key]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]&&n!==(n=e[2][e[0]-2][e[353].key]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_76(e){let t,n=e[2][e[0]-2][e[353].key].reduce(func_17,0)+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]&&n!==(n=e[2][e[0]-2][e[353].key].reduce(func_17,0)+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_each_block_26(e){let t,n,r,i,a,o,s=e[353].hasOwnProperty("img"),c=l$1(e[353].label)+"",l=s&&create_if_block_78(e);let u=function(e,t){return"pad"==e[353].type?create_if_block_76:"incdec"==e[353].type?create_if_block_77:void 0}(e),d=u&&u(e);function p(...t){return e[206](e[350],...t)}return{c(){t=element("div"),l&&l.c(),n=text(c),r=text(":\n\t\t\t\t\t\t\t\t\t"),d&&d.c(),i=space(),attr(t,"class","score svelte-qol35w"),toggle_class(t,"selected",e[52]==e[350])},m(e,s){insert(e,t,s),l&&l.m(t,null),append(t,n),append(t,r),d&&d.m(t,null),append(t,i),a||(o=listen(t,"click",p),a=!0)},p(n,r){e=n,s&&l.p(e,r),d&&d.p(e,r),2097152&r[1]&&toggle_class(t,"selected",e[52]==e[350])},d(e){e&&detach(t),l&&l.d(),d&&d.d(),a=!1,o()}}}function create_else_block_16(e){let t,n,r,i,a,o,s,c,l,u=e[2][e[0]-2].cards.filter(m).length+"",d=l$1("card{0,s}",e[2][e[0]-2].cards.filter(g).length)+"",p=l$1(e[351].name)+"",h=e[2][e[0]-2].cards.filter(y).reduce(e[202],0)+"",f=l$1("VP")+"";function m(...t){return e[199](e[351],...t)}function g(...t){return e[200](e[351],...t)}function y(...t){return e[201](e[351],...t)}return{c(){t=text(u),n=space(),r=text(d),i=space(),a=text(p),o=space(),s=text(h),c=space(),l=text(f)},m(e,u){insert(e,t,u),insert(e,n,u),insert(e,r,u),insert(e,i,u),insert(e,a,u),insert(e,o,u),insert(e,s,u),insert(e,c,u),insert(e,l,u)},p(n,i){e=n,5&i[0]&&u!==(u=e[2][e[0]-2].cards.filter(m).length+"")&&set_data(t,u),5&i[0]&&d!==(d=l$1("card{0,s}",e[2][e[0]-2].cards.filter(g).length)+"")&&set_data(r,d),5&i[0]&&p!==(p=l$1(e[351].name)+"")&&set_data(a,p),5&i[0]&&h!==(h=e[2][e[0]-2].cards.filter(y).reduce(e[202],0)+"")&&set_data(s,h)},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),e&&detach(a),e&&detach(o),e&&detach(s),e&&detach(c),e&&detach(l)}}}function create_if_block_75(e){let t,n,r,i,a,o=possPlural(e[2][e[0]-2].cards.reduce(e[197],0),"tokens")+"",s=e[2][e[0]-2].cards.reduce(e[198],0)+"",c=l$1("VP")+"";return{c(){t=text(o),n=text(" on cards: "),r=text(s),i=space(),a=text(c)},m(e,o){insert(e,t,o),insert(e,n,o),insert(e,r,o),insert(e,i,o),insert(e,a,o)},p(e,n){8388613&n[0]&&o!==(o=possPlural(e[2][e[0]-2].cards.reduce(e[197],0),"tokens")+"")&&set_data(t,o),5&n[0]&&s!==(s=e[2][e[0]-2].cards.reduce(e[198],0)+"")&&set_data(r,s)},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),e&&detach(a)}}}function create_if_block_74(e){let t,n,r,i,a,o=e[2][0].exile+"",s=l$1("card{0,s}",e[2][0].exile)+"",c=l$1(e[351].name)+"";return{c(){t=text(o),n=space(),r=text(s),i=space(),a=text(c)},m(e,o){insert(e,t,o),insert(e,n,o),insert(e,r,o),insert(e,i,o),insert(e,a,o)},p(e,n){4&n[0]&&o!==(o=e[2][0].exile+"")&&set_data(t,o),4&n[0]&&s!==(s=l$1("card{0,s}",e[2][0].exile)+"")&&set_data(r,s),5&n[0]&&c!==(c=l$1(e[351].name)+"")&&set_data(a,c)},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),e&&detach(a)}}}function create_each_block_25(e){let t,n,r;function i(e,t){return"exile"==e[351].value?create_if_block_74:"tokens"==e[351].value?create_if_block_75:create_else_block_16}let a=i(e),o=a(e);function s(...t){return e[203](e[350],...t)}return{c(){t=element("div"),o.c(),attr(t,"class","score svelte-qol35w"),toggle_class(t,"selected",e[36]==e[350])},m(e,i){insert(e,t,i),o.m(t,null),n||(r=listen(t,"click",s),n=!0)},p(n,r){a===(a=i(e=n))&&o?o.p(e,r):(o.d(1),o=a(e),o&&(o.c(),o.m(t,null))),32&r[1]&&toggle_class(t,"selected",e[36]==e[350])},d(e){e&&detach(t),o.d(),n=!1,r()}}}function create_each_block_24(e){let t,n,r,i,a,o,s=e[2][e[0]-2][e[373]]+"";return{c(){t=element("div"),n=element("div"),r=text(s),i=space(),a=element("img"),set_style(n,"font-size","5vmin"),a.src!==(o=e[373]+".png")&&attr(a,"src",o),set_style(a,"width","5vmin"),set_style(a,"height","5vmin"),set_style(a,"margin-left","1vmin"),set_style(a,"margin-right","1vmin"),set_style(t,"display","flex"),set_style(t,"align-items","center")},m(e,o){insert(e,t,o),append(t,n),append(n,r),append(n,i),append(t,a)},p(e,t){8388613&t[0]&&s!==(s=e[2][e[0]-2][e[373]]+"")&&set_data(r,s),8388608&t[0]&&a.src!==(o=e[373]+".png")&&attr(a,"src",o)},d(e){e&&detach(t)}}}function create_else_block_14(e){let t,n,r,i,a,o,s,c=l$1(e[66][e[52]].name+" "+e[66][e[52]].label)+"",l=e[66][e[52]].hasOwnProperty("message"),u=l&&create_if_block_72(e);function d(e,t){return"pad"==e[66][e[52]].type?create_if_block_68:"incdec"==e[66][e[52]].type?create_if_block_70:void 0}let p=d(e),h=p&&p(e);return{c(){t=element("div"),n=element("div"),r=text(c),i=text(":"),a=space(),o=element("div"),u&&u.c(),s=space(),h&&h.c(),attr(n,"class","scoretitle svelte-qol35w"),attr(o,"class","message svelte-qol35w"),attr(t,"class","score_entry svelte-qol35w")},m(e,c){insert(e,t,c),append(t,n),append(n,r),append(n,i),append(t,a),append(t,o),u&&u.m(o,null),append(t,
1490s),h&&h.m(t,null)},p(e,n){2097152&n[1]&&c!==(c=l$1(e[66][e[52]].name+" "+e[66][e[52]].label)+"")&&set_data(r,c),2097152&n[1]&&(l=e[66][e[52]].hasOwnProperty("message")),l?u?u.p(e,n):(u=create_if_block_72(e),u.c(),u.m(o,null)):u&&(u.d(1),u=null),p===(p=d(e))&&h?h.p(e,n):(h&&h.d(1),h=p&&p(e),h&&(h.c(),h.m(t,null)))},i:noop$1,o:noop$1,d(e){e&&detach(t),u&&u.d(),h&&h.d()}}}function create_if_block_66(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k=l$1(e[66][e[52]].message)+"",w=l$1("Game end trigger:")+"",T=l$1("by player")+"",S=l$1("Most crucial cards (in player's strategy)")+"",C=e[62],I=[];for(let t=0;t<C.length;t+=1)I[t]=create_each_block_20(get_each_context_20(e,C,t));let N=e[2].filter(e[233]),E=[];for(let t=0;t<N.length;t+=1)E[t]=create_each_block_19(get_each_context_19(e,N,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Notes")}`,r=space(),i=element("div"),a=text(k),o=space(),s=element("textarea"),c=space(),l=text(w),u=space(),d=element("div"),p=element("select");for(let e=0;e<I.length;e+=1)I[e].c();h=space(),f=text(T),m=text(": \n\t\t\t\t\t\t\t\t\t"),g=element("select");for(let e=0;e<E.length;e+=1)E[e].c();y=space(),b=text(S),v=text(": "),A=element("input"),attr(n,"class","scoretitle svelte-qol35w"),attr(i,"class","message svelte-qol35w"),set_style(s,"width","90%"),attr(s,"rows","5"),void 0===e[2][0].trigger&&add_render_callback((()=>e[232].call(p))),void 0===e[2][0].triggeringPlayer&&add_render_callback((()=>e[234].call(g))),attr(A,"type","text"),attr(A,"size","20"),attr(t,"class","notes_entry svelte-qol35w")},m(k,w){insert(k,t,w),append(t,n),append(t,r),append(t,i),append(i,a),append(t,o),append(t,s),set_input_value(s,e[2][e[0]-2].general),append(t,c),append(t,l),append(t,u),append(t,d),append(d,p);for(let e=0;e<I.length;e+=1)I[e].m(p,null);select_option(p,e[2][0].trigger),append(d,h),append(d,f),append(d,m),append(d,g);for(let e=0;e<E.length;e+=1)E[e].m(g,null);select_option(g,e[2][0].triggeringPlayer),append(t,y),append(t,b),append(t,v),append(t,A),set_input_value(A,e[2][e[0]-2].notes.bigCards),_||(x=[listen(s,"input",e[231]),listen(p,"change",e[232]),listen(p,"change",e[117]),listen(g,"change",e[234]),listen(A,"input",e[235])],_=!0)},p(e,t){if(2097152&t[1]&&k!==(k=l$1(e[66][e[52]].message)+"")&&set_data(a,k),5&t[0]&&set_input_value(s,e[2][e[0]-2].general),1&t[2]|1073741824&t[3]|268435456&t[11]){let n;for(C=e[62],n=0;n<C.length;n+=1){const r=get_each_context_20(e,C,n);I[n]?I[n].p(r,t):(I[n]=create_each_block_20(r),I[n].c(),I[n].m(p,null))}for(;n<I.length;n+=1)I[n].d(1);I.length=C.length}if(4&t[0]&&select_option(p,e[2][0].trigger),6&t[0]){let n;for(N=e[2].filter(e[233]),n=0;n<N.length;n+=1){const r=get_each_context_19(e,N,n);E[n]?E[n].p(r,t):(E[n]=create_each_block_19(r),E[n].c(),E[n].m(g,null))}for(;n<E.length;n+=1)E[n].d(1);E.length=N.length}4&t[0]&&select_option(g,e[2][0].triggeringPlayer),5&t[0]&&A.value!==e[2][e[0]-2].notes.bigCards&&set_input_value(A,e[2][e[0]-2].notes.bigCards)},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(I,e),destroy_each(E,e),_=!1,run_all(x)}}}function create_if_block_50(e){let t,n,r,i,a;const o=[create_if_block_51,create_if_block_59,create_if_block_61,create_if_block_63,create_else_block_13],s=[];function c(e,t){return"power"==e[36]?0:"tokens"==e[36]?1:"notes"==e[36]?2:(5&t[0]|32&t[1]&&(n=!("exile"!=e[136](e[2][e[0]-2])[e[36]].value)),n?3:4)}return r=c(e,[-1]),i=s[r]=o[r](e),{c(){t=element("div"),i.c(),attr(t,"class","cards_entry svelte-qol35w")},m(e,n){insert(e,t,n),s[r].m(t,null),a=!0},p(e,n){let a=r;r=c(e,n),r===a?s[r].p(e,n):(group_outros(),transition_out(s[a],1,1,(()=>{s[a]=null})),check_outros(),i=s[r],i?i.p(e,n):(i=s[r]=o[r](e),i.c()),transition_in(i,1),i.m(t,null))},i(e){a||(transition_in(i),a=!0)},o(e){transition_out(i),a=!1},d(e){e&&detach(t),s[r].d()}}}function create_if_block_72(e){let t,n,r,i=l$1(e[66][e[52]].hasOwnProperty("interpolation")?interpolateMessage(e[66][e[52]].message,e[66][e[52]].interpolation(e[2][e[0]-2])):e[66][e[52]].message)+"";return{c(){t=text("("),n=text(i),r=text(")")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p(e,t){5&t[0]|2097152&t[1]&&i!==(i=l$1(e[66][e[52]].hasOwnProperty("interpolation")?interpolateMessage(e[66][e[52]].message,e[66][e[52]].interpolation(e[2][e[0]-2])):e[66][e[52]].message)+"")&&set_data(n,i)},d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_if_block_70(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f;
1490function m(e,t){return e[31]&&e[31].player==e[0]-2&&e[31].token==e[66][e[52]].key?create_if_block_71:create_else_block_15}let g=m(e),y=g(e);return{c(){t=element("div"),n=element("div"),r=element("button"),r.textContent="-",i=space(),a=element("div"),o=element("div"),s=element("img"),l=space(),u=element("div"),y.c(),d=space(),p=element("button"),p.textContent="+",attr(r,"class","incdec svelte-qol35w"),attr(s,"class","tokenimage svelte-qol35w"),s.src!==(c=e[66][e[52]].key+".png")&&attr(s,"src",c),attr(u,"class","tokencount svelte-qol35w"),attr(a,"class","token svelte-qol35w"),attr(p,"class","incdec svelte-qol35w"),attr(n,"class","scoretoken svelte-qol35w"),attr(t,"class","incdec svelte-qol35w")},m(c,m){insert(c,t,m),append(t,n),append(n,r),append(n,i),append(n,a),append(a,o),append(o,s),append(a,l),append(a,u),y.m(u,null),append(n,d),append(n,p),h||(f=[listen(r,"click",(function(){is_function(e[93](e[0]-2,e[66][e[52]].key,e[2][e[0]-2][e[66][e[52]].key]-1))&&e[93](e[0]-2,e[66][e[52]].key,e[2][e[0]-2][e[66][e[52]].key]-1).apply(this,arguments)})),listen(u,"click",e[239]),listen(p,"click",(function(){is_function(e[93](e[0]-2,e[66][e[52]].key,e[2][e[0]-2][e[66][e[52]].key]+1))&&e[93](e[0]-2,e[66][e[52]].key,e[2][e[0]-2][e[66][e[52]].key]+1).apply(this,arguments)}))],h=!0)},p(t,n){e=t,2097152&n[1]&&s.src!==(c=e[66][e[52]].key+".png")&&attr(s,"src",c),g===(g=m(e))&&y?y.p(e,n):(y.d(1),y=g(e),y&&(y.c(),y.m(u,null)))},d(e){e&&detach(t),y.d(),h=!1,run_all(f)}}}function create_if_block_68(e){let t,n,r,i,a,o,s,c,l=e[2][e[0]-2][e[66][e[52]].key],u=[];for(let t=0;t<l.length;t+=1)u[t]=create_each_block_23(get_each_context_23(e,l,t));let d=[...Array(e[66][e[52]].max).keys()],p=[];for(let t=0;t<d.length;t+=1)p[t]=create_each_block_22(get_each_context_22(e,d,t));let h=e[66][e[52]].neg&&create_if_block_69(e);return{c(){t=element("div");for(let e=0;e<u.length;e+=1)u[e].c();n=space(),r=element("div");for(let e=0;e<p.length;e+=1)p[e].c();i=space(),h&&h.c(),a=space(),o=element("button"),o.textContent="â«",attr(t,"class","scorelist svelte-qol35w"),attr(o,"class","paditem svelte-qol35w"),set_style(o,"background-color","red"),attr(r,"class","pad svelte-qol35w")},m(l,d){insert(l,t,d);for(let e=0;e<u.length;e+=1)u[e].m(t,null);insert(l,n,d),insert(l,r,d);for(let e=0;e<p.length;e+=1)p[e].m(r,null);append(r,i),h&&h.m(r,null),append(r,a),append(r,o),s||(c=listen(o,"click",(function(){is_function(e[97](e[0]-2,e[66][e[52]],e[2][e[0]-2][e[66][e[52]].key].length-1))&&e[97](e[0]-2,e[66][e[52]],e[2][e[0]-2][e[66][e[52]].key].length-1).apply(this,arguments)})),s=!0)},p(n,o){if(e=n,5&o[0]|2097152&o[1]|16&o[2]|16&o[3]){let n;for(l=e[2][e[0]-2][e[66][e[52]].key],n=0;n<l.length;n+=1){const r=get_each_context_23(e,l,n);u[n]?u[n].p(r,o):(u[n]=create_each_block_23(r),u[n].c(),u[n].m(t,null))}for(;n<u.length;n+=1)u[n].d(1);u.length=l.length}if(1&o[0]|2097152&o[1]|16&o[2]|32&o[3]){let t;for(d=[...Array(e[66][e[52]].max).keys()],t=0;t<d.length;t+=1){const n=get_each_context_22(e,d,t);p[t]?p[t].p(n,o):(p[t]=create_each_block_22(n),p[t].c(),p[t].m(r,i))}for(;t<p.length;t+=1)p[t].d(1);p.length=d.length}e[66][e[52]].neg?h?h.p(e,o):(h=create_if_block_69(e),h.c(),h.m(r,a)):h&&(h.d(1),h=null)},d(e){e&&detach(t),destroy_each(u,e),e&&detach(n),e&&detach(r),destroy_each(p,e),h&&h.d(),s=!1,c()}}}function create_else_block_15(e){let t,n=e[2][e[0]-2][e[66][e[52]].key]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){5&r[0]|2097152&r[1]&&n!==(n=e[2][e[0]-2][e[66][e[52]].key]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_71(e){let t,n,r;return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(i,a){insert(i,t,a),set_input_value(t,e[2][e[0]-2][e[66][e[52]].key]),n||(r=[listen(t,"input",e[237]),listen(t,"blur",e[94]),listen(t,"keyup",e[238]),listen(t,"input",e[95])],n=!0)},p(e,n){5&n[0]|2097152&n[1]|16&n[2]&&t.value!==e[2][e[0]-2][e[66][e[52]].key]&&set_input_value(t,e[2][e[0]-2][e[66][e[52]].key])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_23(e){let t,n,r,i,a,o,s=e[396]+"";function c(...t){return e[236](e[350],...t)}return{c(){t=element("div"),n=text(s),r=space(),attr(t,"class","scoresingle svelte-qol35w"),attr(t,"style",i=e[396]<0?"background-color: orange;":"")},m(e,i){insert(e,t,i),append(t,n),append(t,r),a||(o=listen(t,"click",c),a=!0)},p(r,a){e=r,5&a[0]|2097152&a[1]&&s!==(s=e[396]+"")&&set_data(n,s),5&a[0]|2097152&a[1]&&i!==(i=e[396]<0?"background-color: orange;":"")&&attr(t,"style",i)},d(e){e&&detach(t),a=!1,o()}}}function create_each_block_22(e){let t,n,r,i,a=e[391]+1+"";return{c(){t=element("button"),n=text(a),attr(t,"class","paditem svelte-qol35w")},m(a,o){insert(a,t,o),append(t,n),r||(i=listen(t,"click",(function(){is_function(e[98](e[0]-2,e[66][e[52]],e[391]+1))&&e[98](e[0]-2,e[66][e[52]],e[391]+1).apply(this,arguments)})),r=!0)},p(t,r){e=t,2097152&r[1]&&a!==(a=e[391]+1+"")&&set_data(n,a)},d(e){e&&detach(t),r=!1,i()}}}function create_if_block_69(e){let t,n=e[66][e[52]].neg,r=[];for(let t=0;t<n.length;t+=1)r[t]=create_each_block_21(get_each_context_21(e,n,t));return{c(){for(let e=0;e<r.length;e+=1)r[e].c();
1490t=empty()},m(e,n){for(let t=0;t<r.length;t+=1)r[t].m(e,n);insert(e,t,n)},p(e,i){if(1&i[0]|2097152&i[1]|16&i[2]|32&i[3]){let a;for(n=e[66][e[52]].neg,a=0;a<n.length;a+=1){const o=get_each_context_21(e,n,a);r[a]?r[a].p(o,i):(r[a]=create_each_block_21(o),r[a].c(),r[a].m(t.parentNode,t))}for(;a<r.length;a+=1)r[a].d(1);r.length=n.length}},d(e){destroy_each(r,e),e&&detach(t)}}}function create_each_block_21(e){let t,n,r,i,a=e[391]+"";return{c(){t=element("button"),n=text(a),attr(t,"class","paditem svelte-qol35w"),set_style(t,"background-color","orange")},m(a,o){insert(a,t,o),append(t,n),r||(i=listen(t,"click",(function(){is_function(e[98](e[0]-2,e[66][e[52]],e[391]))&&e[98](e[0]-2,e[66][e[52]],e[391]).apply(this,arguments)})),r=!0)},p(t,r){e=t,2097152&r[1]&&a!==(a=e[391]+"")&&set_data(n,a)},d(e){e&&detach(t),r=!1,i()}}}function create_if_block_67(e){let t,n,r=l$1(e[385].name)+"";return{c(){t=element("option"),n=text(r),t.__value=e[385].name,t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_each_block_20(e){let t,n=!e[385].hasOwnProperty("needsCiv")||e[123](e[385].needsCiv),r=n&&create_if_block_67(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,t){n&&r.p(e,t)},d(e){r&&r.d(e),e&&detach(t)}}}function create_each_block_19(e){let t,n,r=e[348].name+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,t){6&t[0]&&r!==(r=e[348].name+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_else_block_13(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x=l$1("Cards")+"",k=l$1(e[136](e[2][e[0]-2])[e[36]].name)+"",w=e[8]&&"garrison"!=e[136](e[2][e[0]-2])[e[36]].value||e[49];function T(t){e[226](t)}let S={containerStyles:"color: black;",items:e[59],multiple:!0};void 0!==e[13]&&(S.value=e[13]),u=new Select({props:S}),binding_callbacks.push((()=>bind$1(u,"value",T)));let C=w&&create_if_block_65(e);function I(t){e[229](t)}function N(t){e[230](t)}let E={cards:e[21],tokens:!!e[136](e[2][e[0]-2])[e[36]].tokens&&e[23],numPlayers:e[1],current:e[0]-2,location:e[136](e[2][e[0]-2])[e[36]].value,box:e[12],exp:e[11]};return void 0!==e[49]&&(E.garrisoning=e[49]),void 0!==e[2]&&(E.players=e[2]),g=new CardSelect({props:E}),binding_callbacks.push((()=>bind$1(g,"garrisoning",I))),binding_callbacks.push((()=>bind$1(g,"players",N))),{c(){t=element("div"),n=text(x),r=space(),i=text(k),a=space(),o=element("details"),s=element("summary"),s.textContent="Select Commons box(es)",c=space(),l=element("div"),create_component(u.$$.fragment),p=space(),C&&C.c(),h=space(),f=element("input"),m=space(),create_component(g.$$.fragment),attr(t,"class","scoretitle svelte-qol35w"),attr(l,"class","multiselect svelte-qol35w"),set_style(l,"display","flex"),set_style(l,"align-items","center"),set_style(l,"justify-content","center"),set_style(l,"gap","10px"),set_style(o,"text-align","center"),attr(f,"id","file"),attr(f,"type","file"),set_style(f,"display","none"),attr(f,"accept","image/*")},m(d,y){insert(d,t,y),append(t,n),append(t,r),append(t,i),insert(d,a,y),insert(d,o,y),append(o,s),append(o,c),append(o,l),mount_component(u,l,null),insert(d,p,y),C&&C.m(d,y),insert(d,h,y),insert(d,f,y),e[227](f),insert(d,m,y),mount_component(g,d,y),v=!0,A||(_=listen(f,"change",e[228]),A=!0)},p(e,t){(!v||5&t[0]|32&t[1])&&k!==(k=l$1(e[136](e[2][e[0]-2])[e[36]].name)+"")&&set_data(i,k);const n={};!d&&8192&t[0]&&(d=!0,n.value=e[13],add_flush_callback((()=>d=!1))),u.$set(n),261&t[0]|262176&t[1]&&(w=e[8]&&"garrison"!=e[136](e[2][e[0]-2])[e[36]].value||e[49]),w?C?C.p(e,t):(C=create_if_block_65(e),C.c(),C.m(h.parentNode,h)):C&&(C.d(1),C=null);const r={};2097152&t[0]&&(r.cards=e[21]),8388613&t[0]|32&t[1]&&(r.tokens=!!e[136](e[2][e[0]-2])[e[36]].tokens&&e[23]),2&t[0]&&(r.numPlayers=e[1]),1&t[0]&&(r.current=e[0]-2),5&t[0]|32&t[1]&&(r.location=e[136](e[2][e[0]-2])[e[36]].value),4096&t[0]&&(r.box=e[12]),2048&t[0]&&(r.exp=e[11]),!y&&262144&t[1]&&(y=!0,r.garrisoning=e[49],add_flush_callback((()=>y=!1))),!b&&4&t[0]&&(b=!0,r.players=e[2],add_flush_callback((()=>b=!1))),g.$set(r)},i(e){v||(transition_in(u.$$.fragment,e),transition_in(g.$$.fragment,e),v=!0)},o(e){transition_out(u.$$.fragment,e),transition_out(g.$$.fragment,e),v=!1},d(n){n&&detach(t),n&&detach(a),n&&detach(o),destroy_component(u),n&&detach(p),C&&C.d(n),n&&detach(h),n&&detach(f),e[227](null),n&&detach(m),destroy_component(g,n),A=!1,_()}}}function create_if_block_63(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k=e[2][0].exile+"",w=e[8]&&create_if_block_64(e);return{c(){t=element("div"),t.textContent=`${l$1("Cards in exile")}`,n=space(),r=element("div"),w&&w.c(),i=space(),a=element("div"),a.textContent=`${l$1("Enter the number of cards in exile. This is optional unless you are playing a card such as the Utopians' Monastery, which scores based on this number.")}`,o=space(),s=element("div"),c=element("div"),l=element("button"),l.textContent="-1",u=space(),d=element("button"),d.textContent="-10",p=space(),h=element("div"),f=element("div"),m=text(k),g=space(),y=element("div"),b=element("button"),b.textContent="+1",v=space(),A=element("button"),A.textContent="+10",attr(t,"class","scoretitle svelte-qol35w"),attr(a,"class","message svelte-qol35w"),attr(l,"class","incdec svelte-qol35w"),set_style(l,"font-size","5vmin"),attr(d,"class","incdec svelte-qol35w"),set_style(d,"font-size","5vmin"),set_style(c,"display","flex"),set_style(c,"flex-direction","column"),set_style(c,"align-items","center"),attr(f,"class","scoresingle tokencount svelte-qol35w"),set_style(f,"min-width","10vmin"),set_style(f,"padding","2vmin"),attr(h,"class","token svelte-qol35w"),attr(b,"class","incdec svelte-qol35w"),set_style(b,"font-size","5vmin"),attr(A,"class","incdec svelte-qol35w"),set_style(A,"font-size","5vmin"),set_style(y,"display","flex"),set_style(y,"flex-direction","column"),set_style(y,"align-items","center"),attr(s,"class","scoretoken svelte-qol35w"),set_style(s,"justify-content","center"),set_style(r,"height","100%"),set_style(r,"display","flex"),set_style(r,"flex-direction","column"),set_style(r,"justify-content","space-evenly"),set_style(r,"align-items","center")},m(k,T){insert(k,t,T),insert(k,n,T),insert(k,r,T),w&&w.m(r,null),append(r,i),append(r,a),append(r,o),append(r,s),append(s,c),append(c,l),append(c,u),append(c,d),append(s,p),append(s,h),append(h,f),append(f,m),append(s,g),append(s,y),append(y,b),append(y,v),append(y,A),_||(x=[listen(l,"click",(function(){is_function(e[93](0,"exile",e[2][0].exile-1))&&e[93](0,"exile",e[2][0].exile-1).apply(this,arguments)})),listen(d,"click",(function(){is_function(e[93](0,"exile",e[2][0].exile-10))&&e[93](0,"exile",e[2][0].exile-10).apply(this,arguments)})),listen(b,"click",(function(){is_function(e[93](0,"exile",e[2][0].exile+1))&&e[93](0,"exile",e[2][0].exile+1).apply(this,arguments)})),listen(A,"click",(function(){is_function(e[93](0,"exile",e[2][0].exile+10))&&e[93](0,"exile",e[2][0].exile+10).apply(this,arguments)}))],_=!0)},p(t,n){(e=t)[8]?w?w.p(e,n):(w=create_if_block_64(e),w.c(),w.m(r,i)):w&&(w.d(1),w=null),4&n[0]&&k!==(k=e[2][0].exile+"")&&set_data(m,k)},i:noop$1,o:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r),w&&w.d(),_=!1,run_all(x)}}}function create_if_block_61(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x=l$1("Game end trigger:")+"",k=l$1("by player")+"",w=l$1("Most crucial cards (in player's strategy)")+"",T=e[62],S=[];for(let t=0;t<T.length;t+=1)S[t]=create_each_block_18(get_each_context_18(e,T,t));let C=e[2].filter(e[221]),I=[];for(let t=0;t<C.length;t+=1)I[t]=create_each_block_17(get_each_context_17(e,C,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Notes")}`,r=space(),i=element("div"),i.textContent=`${l$1("Add your own notes about strategy here.")}`,a=space(),o=element("textarea"),s=space(),c=text(x),l=space(),u=element("div"),d=element("select");for(let e=0;e<S.length;e+=1)S[e].c();p=space(),h=text(k),f=text(": \n\t\t\t\t\t\t\t\t\t\t"),m=element("select");for(let e=0;e<I.length;e+=1)I[e].c();g=space(),y=text(w),b=text(": "),v=element("input"),attr(n,"class","scoretitle svelte-qol35w"),attr(i,"class","message svelte-qol35w"),set_style(o,"width","90%"),attr(o,"rows","5"),void 0===e[2][0].trigger&&add_render_callback((()=>e[220].call(d))),void 0===e[2][0].triggeringPlayer&&add_render_callback((()=>e[222].call(m))),attr(v,"type","text"),attr(v,"size","20"),attr(t,"class","notes_entry svelte-qol35w")},m(x,k){insert(x,t,k),append(t,n),append(t,r),append(t,i),append(t,a),append(t,o),set_input_value(o,e[2][e[0]-2].general),append(t,
1490s),append(t,c),append(t,l),append(t,u),append(u,d);for(let e=0;e<S.length;e+=1)S[e].m(d,null);select_option(d,e[2][0].trigger),append(u,p),append(u,h),append(u,f),append(u,m);for(let e=0;e<I.length;e+=1)I[e].m(m,null);select_option(m,e[2][0].triggeringPlayer),append(t,g),append(t,y),append(t,b),append(t,v),set_input_value(v,e[2][e[0]-2].notes.bigCards),A||(_=[listen(o,"input",e[219]),listen(d,"change",e[220]),listen(d,"change",e[117]),listen(m,"change",e[222]),listen(v,"input",e[223])],A=!0)},p(e,t){if(5&t[0]&&set_input_value(o,e[2][e[0]-2].general),1&t[2]|1073741824&t[3]|268435456&t[11]){let n;for(T=e[62],n=0;n<T.length;n+=1){const r=get_each_context_18(e,T,n);S[n]?S[n].p(r,t):(S[n]=create_each_block_18(r),S[n].c(),S[n].m(d,null))}for(;n<S.length;n+=1)S[n].d(1);S.length=T.length}if(4&t[0]&&select_option(d,e[2][0].trigger),6&t[0]){let n;for(C=e[2].filter(e[221]),n=0;n<C.length;n+=1){const r=get_each_context_17(e,C,n);I[n]?I[n].p(r,t):(I[n]=create_each_block_17(r),I[n].c(),I[n].m(m,null))}for(;n<I.length;n+=1)I[n].d(1);I.length=C.length}4&t[0]&&select_option(m,e[2][0].triggeringPlayer),5&t[0]&&v.value!==e[2][e[0]-2].notes.bigCards&&set_input_value(v,e[2][e[0]-2].notes.bigCards)},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(S,e),destroy_each(I,e),A=!1,run_all(_)}}}function create_if_block_59(e){let t,n,r,i=e[23],a=[];for(let t=0;t<i.length;t+=1)a[t]=create_each_block_16(get_each_context_16(e,i,t));return{c(){t=element("div"),n=element("div"),n.textContent=`${l$1("Tokens")}`,r=space();for(let e=0;e<a.length;e+=1)a[e].c();attr(n,"class","scoretitle svelte-qol35w"),attr(t,"class","player svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),append(t,r);for(let e=0;e<a.length;e+=1)a[e].m(t,null)},p(e,n){if(8388613&n[0]|5&n[1]|15&n[3]){let r;for(i=e[23],r=0;r<i.length;r+=1){const o=get_each_context_16(e,i,r);a[r]?a[r].p(o,n):(a[r]=create_each_block_16(o),a[r].c(),a[r].m(t,null))}for(;r<a.length;r+=1)a[r].d(1);a.length=i.length}},i:noop$1,o:noop$1,d(e){e&&detach(t),destroy_each(a,e)}}}function create_if_block_51(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k,w=l$1("Power card{0,s}",e[2][e[0]-2].hasOwnProperty("extraDeck"))+"",T=l$1("Select the side of the $0 power card you have been using",l$1(e[2][e[0]-2].civ.name))+"",S=usingTradeRoutes(e[11],e[13]),C=e[2][e[0]-2].hasOwnProperty("extraDeck"),I=S&&create_if_block_58(e),N=C&&create_if_block_52(e);return{c(){t=element("div"),n=text(w),r=space(),i=element("div"),a=element("div"),o=text(T),s=text(":"),c=space(),l=element("div"),u=element("button"),d=text("A"),f=space(),m=element("button"),g=text("B"),v=space(),I&&I.c(),A=space(),N&&N.c(),attr(t,"class","scoretitle svelte-qol35w"),attr(a,"class","message svelte-qol35w"),attr(u,"class",p=null_to_empty("side"+(e[2][e[0]-2].cards[0].area.endsWith("A")?" selected":""))+" svelte-qol35w"),u.disabled=h=e[2][e[0]-2].cards[0].area.endsWith("A"),attr(m,"class",y=null_to_empty("side"+(e[2][e[0]-2].cards[0].area.endsWith("B")?" selected":""))+" svelte-qol35w"),m.disabled=b=e[2][e[0]-2].cards[0].area.endsWith("B"),set_style(i,"height","100%"),set_style(i,"display","flex"),set_style(i,"flex-direction","column"),set_style(i,"justify-content","space-evenly"),set_style(i,"align-items","center")},m(p,h){insert(p,t,h),append(t,n),insert(p,r,h),insert(p,i,h),append(i,a),append(a,o),append(a,s),append(i,c),append(i,l),append(l,u),append(u,d),append(l,f),append(l,m),append(m,g),append(i,v),I&&I.m(i,null),append(i,A),N&&N.m(i,null),_=!0,x||(k=[listen(u,"click",e[207]),listen(m,"click",e[208])],x=!0)},p(e,t){(!_||5&t[0])&&w!==(w=l$1("Power card{0,s}",e[2][e[0]-2].hasOwnProperty("extraDeck"))+"")&&set_data(n,w),(!_||5&t[0])&&T!==(T=l$1("Select the side of the $0 power card you have been using",l$1(e[2][e[0]-2].civ.name))+"")&&set_data(o,T),(!_||5&t[0]&&p!==(p=null_to_empty("side"+(e[2][e[0]-2].cards[0].area.endsWith("A")?" selected":""))+" svelte-qol35w"))&&attr(u,"class",p),(!_||5&t[0]&&h!==(h=e[2][e[0]-2].cards[0].area.endsWith("A")))&&(u.disabled=h),(!_||5&t[0]&&y!==(y=null_to_empty("side"+(e[2][e[0]-2].cards[0].area.endsWith("B")?" selected":""))+" svelte-qol35w"))&&attr(m,"class",y),(!_||5&t[0]&&b!==(b=e[2][e[0]-2].cards[0].area.endsWith("B")))&&(m.disabled=b),10240&t[0]&&(S=usingTradeRoutes(e[11],e[13])),S?I?(I.p(e,t),10240&t[0]&&transition_in(I,1)):(I=create_if_block_58(e),I.c(),transition_in(I,1),I.m(i,A)):I&&(group_outros(),transition_out(I,1,1,(()=>{I=null})),check_outros()),5&t[0]&&(C=e[2][e[0]-2].hasOwnProperty("extraDeck")),C?N?(N.p(e,t),5&t[0]&&transition_in(N,1)):(N=create_if_block_52(e),N.c(),transition_in(N,1),N.m(i,null)):N&&(group_outros(),transition_out(N,1,1,(()=>{N=null})),check_outros())},i(e){_||(transition_in(I),transition_in(N),_=!0)},o(e){transition_out(I),transition_out(N),_=!1},d(e){e&&detach(t),e&&detach(r),e&&detach(i),I&&I.d(),N&&N.d(),x=!1,run_all(k)}}}function create_if_block_65(e){let t,n,r,i;return{c(){t=element("label"),n=element("div"),r=text("ð· Â "),i=text(e[34]),set_style(n,"background-color","white"),set_style(n,"color","black"),set_style(n,"font-size","3vmin"),set_style(n,"font-weight","bold"),set_style(n,"cursor","pointer"),set_style(n,"text-align","center"),set_style(n,"margin","0.2vmin"),set_style(n,"padding","0.5vmin"),attr(t,"for","file"),set_style(t,"display","flex"),set_style(t,"align-items","center"),set_style(t,"justify-content","center")},m(e,a){insert(e,t,a),append(t,n),append(n,r),append(n,i)},p(e,t){8&t[1]&&set_data(i,e[34])},d(e){e&&detach(t)}}}function create_if_block_64(e){let t,n,r,i,a,o,s,c;return{c(){t=element("label"),n=element("div"),r=text("ð· Â "),i=text(e[34]),a=space(),o=element("input"),set_style(n,"background-color","white"),set_style(n,"color","black"),set_style(n,"font-size","3vmin"),set_style(n,"font-weight","bold"),set_style(n,"cursor","pointer"),set_style(n,"text-align","center"),set_style(n,"margin","0.2vmin"),set_style(n,"padding","0.5vmin"),attr(t,"for","file"),set_style(t,"display","flex"),set_style(t,"align-items","center"),set_style(t,"justify-content","center"),attr(o,"id","file"),attr(o,"type","file"),set_style(o,"display","none"),attr(o,"accept","image/*")},m(l,u){insert(l,t,u),append(t,n),append(n,r),append(n,i),insert(l,a,u),insert(l,o,u),e[224](o),s||(c=listen(o,"change",e[225]),s=!0)},p(e,t){8&t[1]&&set_data(i,e[34])},d(n){n&&detach(t),n&&detach(a),n&&detach(o),e[224](null),s=!1,c()}}}function create_if_block_62(e){let t,n,r=l$1(e[385].name)+"";return{c(){t=element("option"),n=text(r),t.__value=e[385].name,t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_each_block_18(e){let t,n=!e[385].hasOwnProperty("needsCiv")||e[123](e[385].needsCiv),r=n&&create_if_block_62(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,t){n&&r.p(e,t)},d(e){r&&r.d(e),e&&detach(t)}}}function create_each_block_17(e){let t,n,r=e[348].name+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,t){6&t[0]&&r!==(r=e[348].name+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_else_block_12(e){let t,n=e[2][e[0]-2][e[373]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){8388613&r[0]&&n!==(n=e[2][e[0]-2][e[373]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_60(e){let t,n,r;function i(){e[216].call(t,e[373])}return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(a,o){insert(a,t,o),set_input_value(t,e[2][e[0]-2][e[373]]),n||(r=[listen(t,"input",i),listen(t,"blur",e[94]),listen(t,"keyup",e[217]),listen(t,"input",e[95])],n=!0)},p(n,r){e=n,8388613&r[0]&&t.value!==e[2][e[0]-2][e[373]]&&set_input_value(t,e[2][e[0]-2][e[373]])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_16(e){let t,n,r,i,a,o,s,c,l,u,d,p;
1490function h(e,t){return e[31]&&e[31].player==e[0]-2&&e[31].token==e[373]?create_if_block_60:create_else_block_12}let f=h(e),m=f(e);function g(...t){return e[218](e[373],...t)}return{c(){t=element("div"),n=element("button"),n.textContent="-",r=space(),i=element("div"),a=element("div"),o=space(),s=element("div"),m.c(),c=space(),l=element("button"),l.textContent="+",u=space(),attr(n,"class","incdec svelte-qol35w"),attr(a,"class","imagediv svelte-qol35w"),set_style(a,"background-image","url("+e[373]+".png)"),attr(s,"class","tokencount svelte-qol35w"),attr(i,"class","token svelte-qol35w"),attr(l,"class","incdec svelte-qol35w"),attr(t,"class","tokenrow svelte-qol35w"),set_style(t,"height","80%")},m(h,f){insert(h,t,f),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),m.m(s,null),append(t,c),append(t,l),append(t,u),d||(p=[listen(n,"click",(function(){is_function(e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]-1))&&e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]-1).apply(this,arguments)})),listen(s,"click",g),listen(l,"click",(function(){is_function(e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]+1))&&e[93](e[0]-2,e[373],e[2][e[0]-2][e[373]]+1).apply(this,arguments)}))],d=!0)},p(t,n){e=t,8388608&n[0]&&set_style(a,"background-image","url("+e[373]+".png)"),f===(f=h(e))&&m?m.p(e,n):(m.d(1),m=f(e),m&&(m.c(),m.m(s,null)))},d(e){e&&detach(t),m.d(),d=!1,run_all(p)}}}function create_if_block_58(e){let t,n,r,i,a,o=l$1("Which side of the Merchant card is active at the end of the game?")+"",s=[...e[21].filter(e[209])].sort(func_19),c=[];for(let t=0;t<s.length;t+=1)c[t]=create_each_block_15(get_each_context_15(e,s,t));const l=e=>transition_out(c[e],1,1,(()=>{c[e]=null}));return{c(){t=element("div"),n=text(o),r=space(),i=element("div");for(let e=0;e<c.length;e+=1)c[e].c();set_style(i,"display","flex"),set_style(i,"flex-direction","row"),set_style(i,"flex-wrap","wrap"),set_style(i,"overflow","auto"),attr(t,"class","message svelte-qol35w")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(t,i);for(let e=0;e<c.length;e+=1)c[e].m(i,null);a=!0},p(e,t){if(2097157&t[0]|8388608&t[1]){let n;for(s=[...e[21].filter(e[209])].sort(func_19),n=0;n<s.length;n+=1){const r=get_each_context_15(e,s,n);c[n]?(c[n].p(r,t),transition_in(c[n],1)):(c[n]=create_each_block_15(r),c[n].c(),transition_in(c[n],1),c[n].m(i,null))}for(group_outros(),n=s.length;n<c.length;n+=1)l(n);check_outros()}},i(e){if(!a){for(let e=0;e<s.length;e+=1)transition_in(c[e]);a=!0}},o(e){c=c.filter(Boolean);for(let e=0;e<c.length;e+=1)transition_out(c[e]);a=!1},d(e){e&&detach(t),destroy_each(c,e)}}}function create_each_block_15(e){let t,n,r;function i(t){e[210](t)}let a={civs:e[54],players:e[2],selected:e[2][e[0]-2].cards[1]&&e[353].name==e[2][e[0]-2].cards[1].name,c:e[353],showScore:e[2][e[0]-2].cards[1]&&e[353].name==e[2][e[0]-2].cards[1].name};return void 0!==e[2][e[0]-2].cards[1]&&(a.selectable=e[2][e[0]-2].cards[1]),t=new Card({props:a}),binding_callbacks.push((()=>bind$1(t,"selectable",i))),{c(){create_component(t.$$.fragment)},m(e,n){mount_component(t,e,n),r=!0},p(e,r){const i={};8388608&r[1]&&(i.civs=e[54]),4&r[0]&&(i.players=e[2]),2097157&r[0]&&(i.selected=e[2][e[0]-2].cards[1]&&e[353].name==e[2][e[0]-2].cards[1].name),2097153&r[0]&&(i.c=e[353]),2097157&r[0]&&(i.showScore=e[2][e[0]-2].cards[1]&&e[353].name==e[2][e[0]-2].cards[1].name),!n&&5&r[0]&&(n=!0,i.selectable=e[2][e[0]-2].cards[1],add_flush_callback((()=>n=!1))),t.$set(i)},i(e){r||(transition_in(t.$$.fragment,e),r=!0)},o(e){transition_out(t.$$.fragment,e),r=!1},d(e){destroy_component(t,e)}}}function create_if_block_52(e){let t,n,r,i,a;const o=[create_if_block_53,create_else_block_11],s=[];function c(e,t){return 5&t[0]&&(n=!!e[2][e[0]-2].hasOwnProperty("extraChoices")),n?0:1}return r=c(e,[-1]),i=s[r]=o[r](e),{c(){t=element("div"),i.c(),attr(t,"class","message svelte-qol35w")},m(e,n){insert(e,t,n),s[r].m(t,null),a=!0},p(e,n){let a=r;r=c(e,n),r===a?s[r].p(e,n):(group_outros(),transition_out(s[a],1,1,(()=>{s[a]=null})),check_outros(),i=s[r],i?i.p(e,n):(i=s[r]=o[r](e),i.c()),transition_in(i,1),i.m(t,null))},i(e){a||(transition_in(i),a=!0)},o(e){transition_out(i),a=!1},d(e){e&&detach(t),s[r].d()}}}function create_else_block_11(e){let t,n,r,i,a,o,s,c=e[2][e[0]-2].civ.name+"",l=checkSingle(e[2][e[0]-2].extras.length,"separate "+e[2][e[0]-2].extraDeck+" cards","a separate "+e[2][e[0]-2].extraDeck+" card")+"",u=hasExtrasToScore(e[2][e[0]-2]),d=u&&create_if_block_57(e);return{c(){t=text("The "),n=text(c),r=text(" also have "),i=text(l),a=text(".\n\t\t\t\t\t\t\t\t\t"),d&&d.c(),o=empty()},m(e,c){insert(e,t,c),insert(e,n,c),insert(e,r,c),insert(e,i,c),insert(e,a,c),d&&d.m(e,c),insert(e,o,c),s=!0},p(e,t){(!s||5&t[0])&&c!==(c=e[2][e[0]-2].civ.name+"")&&set_data(n,c),(!s||5&t[0])&&l!==(l=checkSingle(e[2][e[0]-2].extras.length,"separate "+e[2][e[0]-2].extraDeck+" cards","a separate "+e[2][e[0]-2].extraDeck+" card")+"")&&set_data(i,l),5&t[0]&&(u=hasExtrasToScore(e[2][e[0]-2])),u?d?(d.p(e,t),5&t[0]&&transition_in(d,1)):(d=create_if_block_57(e),d.c(),transition_in(d,1),d.m(o.parentNode,o)):d&&(group_outros(),transition_out(d,1,1,(()=>{d=null})),check_outros())},i(e){s||(transition_in(d),s=!0)},o(e){transition_out(d),s=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),e&&detach(a),d&&d.d(e),e&&detach(o)}}}function create_if_block_53(e){let t,n,r,i,a,o,s,c,l,u,d,p=e[2][e[0]-2].extraDeck+"",h=e[2][e[0]-2].civ.extraCanBeEmpty&&create_if_block_56(e),f=e[2][e[0]-2].extraChoices,m=[];for(let t=0;t<f.length;t+=1)m[t]=create_each_block_13(get_each_context_13(e,f,t));const g=e=>transition_out(m[e],1,1,(()=>{m[e]=null})),y=[create_if_block_54,create_if_block_55],b=[];function v(e,t){return"Cultists"==e[2][e[0]-2].civ.name&&"Ceremony of the Key"==e[2][e[0]-2].extras[0].name?0:(5&t[0]&&(s=!("Utopians"!=e[2][e[0]-2].civ.name||"shangri-la"!=e[2][e[0]-2].extras[0].name.toLowerCase())),s?1:-1)}return~(c=v(e,[-1]))&&(l=b[c]=y[c](e)),{c(){t=text("Which "),n=text(p),r=text(" card is active at the end of the game?\n\t\t\t\t\t\t\t\t\t"),i=element("div"),h&&h.c(),a=space();for(let e=0;e<m.length;e+=1)m[e].c();o=space(),l&&l.c(),u=empty(),set_style(i,"display","flex"),set_style(i,"flex-direction","row"),set_style(i,"flex-wrap","wrap"),set_style(i,"overflow","auto")},m(e,s){insert(e,t,s),insert(e,n,s),insert(e,r,s),insert(e,i,s),h&&h.m(i,null),append(i,a);for(let e=0;e<m.length;e+=1)m[e].m(i,null);insert(e,o,s),~c&&b[c].m(e,s),insert(e,u,s),d=!0},p(e,t){if((!d||5&t[0])&&p!==(p=e[2][e[0]-2].extraDeck+"")&&set_data(n,p),e[2][e[0]-2].civ.extraCanBeEmpty?h?(h.p(e,t),5&t[0]&&transition_in(h,1)):(h=create_if_block_56(e),h.c(),transition_in(h,1),h.m(i,a)):h&&(group_outros(),transition_out(h,1,1,(()=>{h=null})),check_outros()),5&t[0]|8388608&t[1]){let n;for(f=e[2][e[0]-2].extraChoices,n=0;n<f.length;n+=1){const r=get_each_context_13(e,f,n);m[n]?(m[n].p(r,t),transition_in(m[n],1)):(m[n]=create_each_block_13(r),m[n].c(),transition_in(m[n],1),m[n].m(i,null))}for(group_outros(),n=f.length;n<m.length;n+=1)g(n);check_outros()}let r=c;c=v(e,t),c===r?~c&&b[c].p(e,t):(l&&(group_outros(),transition_out(b[r],1,1,(()=>{b[r]=null})),check_outros()),~c?(l=b[c],l?l.p(e,t):(l=b[c]=y[c](e),l.c()),transition_in(l,1),l.m(u.parentNode,u)):l=null)},i(e){if(!d){transition_in(h);for(let e=0;e<f.length;e+=1)transition_in(m[e]);transition_in(l),d=!0}},o(e){transition_out(h),m=m.filter(Boolean);for(let e=0;e<m.length;e+=1)transition_out(m[e]);transition_out(l),d=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),h&&h.d(),destroy_each(m,e),e&&detach(o),~c&&b[c].d(e),e&&detach(u)}}}function create_if_block_57(e){let t,n,r=e[2][e[0]-2].extras,i=[];for(let t=0;t<r.length;t+=1)i[t]=create_each_block_14(get_each_context_14(e,r,t));const a=e=>transition_out(i[e],1,1,(()=>{i[e]=null}));return{c(){t=element("div");for(let e=0;e<i.length;e+=1)i[e].c()},m(e,r){insert(e,t,r);for(let e=0;e<i.length;e+=1)i[e].m(t,null);n=!0},p(e,n){if(5&n[0]|8388608&n[1]){let o;for(r=e[2][e[0]-2].extras,o=0;o<r.length;o+=1){const a=get_each_context_14(e,r,o);i[o]?(i[o].p(a,n),transition_in(i[o],1)):(i[o]=create_each_block_14(a),i[o].c(),transition_in(i[o],1),i[o].m(t,null))}for(group_outros(),o=r.length;o<i.length;o+=1)a(o);check_outros()}},i(e){if(!n){for(let e=0;e<r.length;e+=1)transition_in(i[e]);n=!0}}
1490,o(e){i=i.filter(Boolean);for(let e=0;e<i.length;e+=1)transition_out(i[e]);n=!1},d(e){e&&detach(t),destroy_each(i,e)}}}function create_each_block_14(e){let t,n;return t=new Card({props:{civs:e[54],players:e[2],c:e[353],showScore:""!=e[353].scoreType}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(e,n){const r={};8388608&n[1]&&(r.civs=e[54]),4&n[0]&&(r.players=e[2]),5&n[0]&&(r.c=e[353]),5&n[0]&&(r.showScore=""!=e[353].scoreType),t.$set(r)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block_56(e){let t,n,r;function i(t){e[211](t)}let a={civs:e[54],players:e[2],selected:null==e[2][e[0]-2].extras[0]||"No card"==e[2][e[0]-2].extras[0].name};return void 0!==e[2][e[0]-2].extras[0]&&(a.selectable=e[2][e[0]-2].extras[0]),t=new Card({props:a}),binding_callbacks.push((()=>bind$1(t,"selectable",i))),{c(){create_component(t.$$.fragment)},m(e,n){mount_component(t,e,n),r=!0},p(e,r){const i={};8388608&r[1]&&(i.civs=e[54]),4&r[0]&&(i.players=e[2]),5&r[0]&&(i.selected=null==e[2][e[0]-2].extras[0]||"No card"==e[2][e[0]-2].extras[0].name),!n&&5&r[0]&&(n=!0,i.selectable=e[2][e[0]-2].extras[0],add_flush_callback((()=>n=!1))),t.$set(i)},i(e){r||(transition_in(t.$$.fragment,e),r=!0)},o(e){transition_out(t.$$.fragment,e),r=!1},d(e){destroy_component(t,e)}}}function create_each_block_13(e){let t,n,r;function i(t){e[212](t)}let a={civs:e[54],players:e[2],selected:e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name,c:e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name?e[2][e[0]-2].extras[0]:e[353],showScore:e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name};return void 0!==e[2][e[0]-2].extras[0]&&(a.selectable=e[2][e[0]-2].extras[0]),t=new Card({props:a}),binding_callbacks.push((()=>bind$1(t,"selectable",i))),{c(){create_component(t.$$.fragment)},m(e,n){mount_component(t,e,n),r=!0},p(e,r){const i={};8388608&r[1]&&(i.civs=e[54]),4&r[0]&&(i.players=e[2]),5&r[0]&&(i.selected=e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name),5&r[0]&&(i.c=e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name?e[2][e[0]-2].extras[0]:e[353]),5&r[0]&&(i.showScore=e[2][e[0]-2].extras[0]&&e[353].name==e[2][e[0]-2].extras[0].name),!n&&5&r[0]&&(n=!0,i.selectable=e[2][e[0]-2].extras[0],add_flush_callback((()=>n=!1))),t.$set(i)},i(e){r||(transition_in(t.$$.fragment,e),r=!0)},o(e){transition_out(t.$$.fragment,e),r=!1},d(e){destroy_component(t,e)}}}function create_if_block_55(e){let t,n,r,i,a,o;return{c(){t=text("Where is Shangri-La at the end of the game?\n\t\t\t\t\t\t\t\t\t\t"),n=element("select"),r=element("option"),r.textContent="In play (as journey card)",i=element("option"),i.textContent="In history (completed)",r.__value="play",r.value=r.__value,i.__value="history",i.value=i.__value,void 0===e[2][e[0]-2].extras[0].location&&add_render_callback((()=>e[215].call(n)))},m(s,c){insert(s,t,c),insert(s,n,c),append(n,r),append(n,i),select_option(n,e[2][e[0]-2].extras[0].location),a||(o=listen(n,"change",e[215]),a=!0)},p(e,t){5&t[0]&&select_option(n,e[2][e[0]-2].extras[0].location)},i:noop$1,o:noop$1,d(e){e&&detach(t),e&&detach(n),a=!1,o()}}}function create_if_block_54(e){let t,n,r,i,a,o,s,c;function l(t){e[213](t)}let u={civs:e[54],players:e[2],selected:"Corrupted"==e[2][e[0]-2].summonedState.name,c:e[21].find(func_20)};function d(t){e[214](t)}void 0!==e[2][e[0]-2].summonedState&&(u.selectable=e[2][e[0]-2].summonedState),r=new Card({props:u}),binding_callbacks.push((()=>bind$1(r,"selectable",l)));let p={civs:e[54],players:e[2],selected:"Summoned"==e[2][e[0]-2].summonedState.name,showScore:"Summoned"==e[2][e[0]-2].summonedState.name,c:e[21].find(func_21)};return void 0!==e[2][e[0]-2].summonedState&&(p.selectable=e[2][e[0]-2].summonedState),o=new Card({props:p}),binding_callbacks.push((()=>bind$1(o,"selectable",d))),{c(){t=text("Which side is your State card turned to?\n\t\t\t\t\t\t\t\t\t\t"),n=element("div"),create_component(r.$$.fragment),a=space(),create_component(o.$$.fragment),set_style(n,"display","flex"),set_style(n,"flex-direction","row"),set_style(n,"flex-wrap","wrap"),set_style(n,"overflow","auto")},m(e,i){insert(e,t,i),insert(e,n,i),mount_component(r,n,null),append(n,a),mount_component(o,n,null),c=!0},p(e,t){const n={};8388608&t[1]&&(n.civs=e[54]),4&t[0]&&(n.players=e[2]),5&t[0]&&(n.selected="Corrupted"==e[2][e[0]-2].summonedState.name),2097152&t[0]&&(n.c=e[21].find(func_20)),!i&&5&t[0]&&(i=!0,n.selectable=e[2][e[0]-2].summonedState,add_flush_callback((()=>i=!1))),r.$set(n);const a={};8388608&t[1]&&(a.civs=e[54]),4&t[0]&&(a.players=e[2]),5&t[0]&&(a.selected="Summoned"==e[2][e[0]-2].summonedState.name),5&t[0]&&(a.showScore="Summoned"==e[2][e[0]-2].summonedState.name),2097152&t[0]&&(a.c=e[21].find(func_21)
1490),!s&&5&t[0]&&(s=!0,a.selectable=e[2][e[0]-2].summonedState,add_flush_callback((()=>s=!1))),o.$set(a)},i(e){c||(transition_in(r.$$.fragment,e),transition_in(o.$$.fragment,e),c=!0)},o(e){transition_out(r.$$.fragment,e),transition_out(o.$$.fragment,e),c=!1},d(e){e&&detach(t),e&&detach(n),destroy_component(r),destroy_component(o)}}}function create_if_block_44(e){let t,n,r,i,a,o,s,c,l,u,d,p=e[348].bot&&create_if_block_47();function h(e,t){return e[6]&&(!e[348].playerID||e[348].playerID!=e[9])||!e[6]&&e[348].playerID&&e[348].playerID!=e[9]?create_if_block_46:create_else_block_10}let f=h(e),m=f(e);function g(...t){return e[192](e[350],...t)}let y=e[23],b=[];for(let t=0;t<y.length;t+=1)b[t]=create_each_block_12(get_each_context_12(e,y,t));return{c(){t=element("div"),n=element("div"),p&&p.c(),r=empty(),m.c(),i=space(),a=element("span"),a.textContent="ð",s=space();for(let e=0;e<b.length;e+=1)b[e].c();c=space(),attr(n,"class","playername svelte-qol35w"),attr(n,"style",o=e[348].civ.style+(e[6]&&(!e[348].playerID||e[348].playerID!=e[9])||!e[6]&&e[348].playerID&&e[348].playerID!=e[9]?"opacity: 0.5;":"")),attr(t,"class","player svelte-qol35w"),attr(t,"style",l=e[24][e[350]]?"transform:rotate(180deg);":"")},m(e,o){insert(e,t,o),append(t,n),p&&p.m(n,null),append(n,r),m.m(n,null),append(n,i),append(n,a),append(t,s);for(let e=0;e<b.length;e+=1)b[e].m(t,null);append(t,c),u||(d=listen(a,"click",g),u=!0)},p(a,s){if((e=a)[348].bot?p||(p=create_if_block_47(),p.c(),p.m(n,r)):p&&(p.d(1),p=null),f===(f=h(e))&&m?m.p(e,s):(m.d(1),m=f(e),m&&(m.c(),m.m(n,i))),134218308&s[0]&&o!==(o=e[348].civ.style+(e[6]&&(!e[348].playerID||e[348].playerID!=e[9])||!e[6]&&e[348].playerID&&e[348].playerID!=e[9]?"opacity: 0.5;":""))&&attr(n,"style",o),8389188&s[0]|5&s[1]|15&s[3]){let n;for(y=e[23],n=0;n<y.length;n+=1){const r=get_each_context_12(e,y,n);b[n]?b[n].p(r,s):(b[n]=create_each_block_12(r),b[n].c(),b[n].m(t,c))}for(;n<b.length;n+=1)b[n].d(1);b.length=y.length}16777216&s[0]&&l!==(l=e[24][e[350]]?"transform:rotate(180deg);":"")&&attr(t,"style",l)},d(e){e&&detach(t),p&&p.d(),m.d(),destroy_each(b,e),u=!1,d()}}}function create_if_block_47(e){let t;return{c(){t=text("ð¤ ")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_else_block_10(e){let t,n=e[348].name+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){4&r[0]&&n!==(n=e[348].name+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_46(e){let t,n,r,i,a,o,s=e[348].name+"";function c(...t){return e[191](e[350],...t)}return{c(){t=element("span"),n=text("("),r=text(s),i=text(") ð¯"),set_style(t,"cursor","pointer")},m(e,s){insert(e,t,s),append(t,n),append(t,r),append(t,i),a||(o=listen(t,"click",c),a=!0)},p(t,n){e=t,4&n[0]&&s!==(s=e[348].name+"")&&set_data(r,s)},d(e){e&&detach(t),a=!1,o()}}}function create_else_block_9(e){let t,n=e[348][e[373]]+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p(e,r){8388612&r[0]&&n!==(n=e[348][e[373]]+"")&&set_data(t,n)},d(e){e&&detach(t)}}}function create_if_block_45(e){let t,n,r;function i(){e[193].call(t,e[373],e[372],e[350])}return{c(){t=element("input"),attr(t,"type","text"),attr(t,"pattern","\\d*"),attr(t,"inputmode","numeric"),attr(t,"size","3"),attr(t,"class","tokennum svelte-qol35w"),set_style(t,"font-size","3vmin"),attr(t,"min","0")},m(a,o){insert(a,t,o),set_input_value(t,e[348][e[373]]),n||(r=[listen(t,"input",i),listen(t,"blur",e[94]),listen(t,"keyup",e[194]),listen(t,"input",e[95])],n=!0)},p(n,r){e=n,8388612&r[0]&&t.value!==e[348][e[373]]&&set_input_value(t,e[348][e[373]])},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block_12(e){let t,n,r,i,a,o,s,c,l,u,d,p,h;function f(e,t){return e[31]&&e[31].player==e[350]&&e[31].token==e[373]?create_if_block_45:create_else_block_9}let m=f(e),g=m(e);function y(...t){return e[195](e[350],e[373],...t)}return{c(){t=element("div"),n=element("button"),n.textContent="-",r=space(),i=element("div"),a=element("div"),o=space(),s=element("div"),g.c(),c=space(),l=element("button"),l.textContent="+",u=space(),attr(n,"class","incdec svelte-qol35w"),attr(a,"class","imagediv svelte-qol35w"),set_style(a,"background-image","url("+e[373]+".png)"),attr(s,"class","tokencount svelte-qol35w"),attr(i,"class","token svelte-qol35w"),attr(l,"class","incdec svelte-qol35w"),attr(t,"class","tokenrow svelte-qol35w"),attr(t,"style",d=e[6]&&(!e[348].playerID||e[348].playerID!=e[9])||!e[6]&&e[348].playerID&&e[348].playerID!=e[9]?"opacity: 0.5;":"")},m(d,f){insert(d,t,f),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),g.m(s,null),append(t,c),append(t,l),append(t,u),p||(h=[listen(n,"click",(function(){is_function(e[93](e[350],e[373],e[348][e[373]]-1))&&e[93](e[350],e[373],e[348][e[373]]-1).apply(this,arguments)})),listen(s,"click",y),listen(l,"click",(function(){is_function(e[93](e[350],e[373],e[348][e[373]]+1))&&e[93](e[350],e[373],e[348][e[373]]+1).apply(this,arguments)}))],p=!0)},p(n,r){e=n,8388608&r[0]&&set_style(a,"background-image","url("+e[373]+".png)"),m===(m=f(e))&&g?g.p(e,r):(g.d(1),g=m(e),g&&(g.c(),g.m(s,null))),134218308&r[0]&&d!==(d=e[6]&&(!e[348].playerID||e[348].playerID!=e[9])||!e[6]&&e[348].playerID&&e[348].playerID!=e[9]?"opacity: 0.5;":"")&&attr(t,"style",d)},d(e){e&&detach(t),g.d(),p=!1,run_all(h)}}}function create_each_block_11(e){let t,n=e[1]>e[350]&&create_if_block_44(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,r){e[1]>e[350]?n?n.p(e,r):(n=create_if_block_44(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){n&&n.d(e),e&&detach(t)}}}function create_each_block_10(e){let t,n,r=e[369].name+"";return{c(){t=element("option"),n=text(r),t.__value=e[369].code,t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_42(e){let t;return{c(){t=element("option"),t.textContent=`${l$1("Join game in progress")}`,t.__value="shared",t.value=t.__value},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_41(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b=l$1("Boxes available")+"";function v(t){e[152](t)}let A={containerStyles:"color: black;",items:e[59],multiple:!0,clearable:!1};return void 0!==e[20]&&(A.value=e[20]),i=new Select({props:A}),binding_callbacks.push((()=>bind$1(i,"value",v))),i.$on("input",e[153]),{c(){t=text(b),n=text(":\n\t\t\t\t\t"),r=element("div"),create_component(i.$$.fragment),o=space(),s=element("div"),c=element("input"),l=element("label"),l.textContent="Use updated Classics and Legends cards from Horizons update pack?",u=space(),d=element("div"),p=element("input"),h=space(),f=element("label"),f.textContent="Include 'Imperium Junior' promos?",attr(r,"class","multiselect svelte-qol35w"),attr(c,"id","replace_cards"),attr(c,"type","checkbox"),set_style(c,"margin","0"),attr(l,"for","replace_cards"),set_style(s,"display","flex"),set_style(s,"align-items","center"),set_style(s,"gap","1vmin"),set_style(s,"margin","0.5vmin"),attr(p,"id","include_promos"),attr(p,"type","checkbox"),set_style(p,"margin","0"),attr(f,"for","include_promos"),set_style(d,"display","flex"),set_style(d,"align-items","center"),set_style(d,"gap","1vmin"),set_style(d,"margin","0.5vmin")},m(a,b){insert(a,t,b),insert(a,n,b),insert(a,r,b),mount_component(i,r,null),insert(a,o,b),insert(a,s,b),append(s,c),c.checked=e[5],append(s,l),insert(a,u,b),insert(a,d,b),append(d,p),p.checked=e[4],append(d,h),append(d,f),m=!0,g||(y=[listen(c,"change",e[154]),listen(p,"change",e[155])],g=!0)},p(e,t){const n={};!a&&1048576&t[0]&&(a=!0,n.value=e[20],add_flush_callback((()=>a=!1))),i.$set(n),32&t[0]&&(c.checked=e[5]),16&t[0]&&(p.checked=e[4])},i(e){m||(transition_in(i.$$.fragment,e),m=!0)},o(e){transition_out(i.$$.fragment,e),m=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_component(i),e&&detach(o),e&&detach(s),e&&detach(u),e&&detach(d),g=!1,run_all(y)}}}function create_if_block_33(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A=e[15].length>0&&e[15].filter(func_3).length>0,_=l$1("Enemy civilisation for game $0",e[16]?e[90](e[16]).length+1:1)+"",x=l$1("Difficulty level")+"",k=e[139](e[2][1].botLevel)+"",w=A&&create_if_block_40(e);function T(e,t){return e[16]?create_else_block_8:create_if_block_35}let S=T(e),C=S(e),I=e[47],N=[];for(let t=0;t<I.length;t+=1)N[t]=create_each_block_6(get_each_context_6(e,I,t));let E=e[64],P=[];for(let t=0;t<E.length;t+=1)P[t]=create_each_block_5(get_each_context_5(e,E,t));return{c(){w&&w.c(),t=space(),C.c(),n=space(),r=element("div"),i=text(_),a=text(":\n\t\t\t\t\t"),o=element("select");for(let e=0;e<N.length;e+=1)N[e].c();s=space(),c=element("button"),c.textContent=`${l$1("Random")}`,l=space(),u=element("button"),u.textContent=`${l$1("Surprise me!")}`,d=space(),p=text(x),h=text(": "),f=element("select");for(let e=0;e<P.length;e+=1)P[e].c();m=space(),g=element("div"),y=text(k),void 0===e[2][1].civ&&add_render_callback((()=>e[175].call(o))),attr(c,"class","random svelte-qol35w"),attr(u,"class","surprise svelte-qol35w"),void 0===e[2][1].botLevel&&add_render_callback((()=>e[178].call(f))),attr(g,"class","bot_info svelte-qol35w")},m(A,_){w&&w.m(A,_),insert(A,t,_),C.m(A,_),insert(A,n,_),insert(A,r,_),append(r,i),append(r,a),append(r,o);for(let e=0;e<N.length;e+=1)N[e].m(o,null);select_option(o,e[2][1].civ),append(r,s),append(r,c),append(r,l),append(r,u),append(r,d),append(r,p),append(r,h),append(r,f);for(let e=0;e<P.length;e+=1)P[e].m(f,null);select_option(f,e[2][1].botLevel),append(r,m),append(r,g),append(g,y),b||(v=[listen(o,"change",e[175]),listen(o,"change",e[124]),listen(c,"click",e[176]),listen(u,"click",e[177]),listen(f,"change",e[178])],b=!0)},p(e,r){if(32768&r[0]&&(A=e[15].length>0&&e[15].filter(func_3).length>0),A?w?w.p(e,r):(w=create_if_block_40(e),w.c(),w.m(t.parentNode,t)):w&&(w.d(1),w=null),S===(S=T(e))&&C?C.p(e,r):(C.d(1),C=S(e),C&&(C.c(),C.m(n.parentNode,n))),65536&r[0]&&_!==(_=l$1("Enemy civilisation for game $0",e[16]?e[90](e[16]).length+1:1)+"")&&set_data(i,_),65536&r[1]|268435456&r[11]){let t;for(I=e[47],t=0;t<I.length;t+=1){const n=get_each_context_6(e,I,t);N[t]?N[t].p(n,r):(N[t]=create_each_block_6(n),N[t].c(),N[t].m(o,null))}for(;t<N.length;t+=1)N[t].d(1);N.length=I.length}if(4&r[0]&&select_option(o,e[2][1].civ),65536&r[0]|1048580&r[2]|268435456&r[11]){let t;for(E=e[64],t=0;t<E.length;t+=1){const n=get_each_context_5(e,E,t);P[t]?P[t].p(n,r):(P[t]=create_each_block_5(n),P[t].c(),P[t].m(f,null))}for(;t<P.length;t+=1)P[t].d(1);P.length=E.length}4&r[0]&&select_option(f,e[2][1].botLevel),4&r[0]&&k!==(k=e[139](e[2][1].botLevel)+"")&&set_data(y,k)},d(e){w&&w.d(e),e&&detach(t),C.d(e),e&&detach(n),e&&detach(r),destroy_each(N,e),destroy_each(P,e),b=!1,run_all(v)}}}function create_if_block_29(e){let t,n={ctx:e,current:null,token:null,hasCatch:!0,pending:create_pending_block_1,then:create_then_block_1,catch:create_c
1490atch_block_1,error:347};return handle_promise(e[72](),n),{c(){t=empty(),n.block.c()},m(e,r){insert(e,t,r),n.block.m(e,n.anchor=r),n.mount=()=>t.parentNode,n.anchor=t},p(t,r){update_await_block_branch(n,e=t,r)},d(e){e&&detach(t),n.block.d(e),n.token=null,n=null}}}function create_if_block_24(e){let t,n,r,i,a,o,s,c,l,u,d,p,h=l$1("Number of players")+"",f=e[2],m=[];for(let t=0;t<f.length;t+=1)m[t]=create_each_block(get_each_context(e,f,t));return{c(){t=element("div"),n=text(h),r=text(": \n\t\t\t\t\t"),i=element("select"),a=element("option"),a.textContent=`1 ${l$1("player")} ('practice mode')`,o=element("option"),o.textContent=`2 ${l$1("players")}`,s=element("option"),s.textContent=`3 ${l$1("players")}`,c=element("option"),c.textContent=`4 ${l$1("players")}`,l=space();for(let e=0;e<m.length;e+=1)m[e].c();u=empty(),a.__value="1",a.value=a.__value,o.selected="selected",o.__value="2",o.value=o.__value,s.__value="3",s.value=s.__value,c.__value="4",c.value=c.__value,void 0===e[1]&&add_render_callback((()=>e[156].call(i)))},m(h,f){insert(h,t,f),append(t,n),append(t,r),append(t,i),append(i,a),append(i,o),append(i,s),append(i,c),select_option(i,e[1]),insert(h,l,f);for(let e=0;e<m.length;e+=1)m[e].m(h,f);insert(h,u,f),d||(p=[listen(i,"change",e[156]),listen(i,"change",e[157])],d=!0)},p(e,t){if(2&t[0]&&select_option(i,e[1]),10246&t[0]|142606336&t[1]|4&t[2]|33184&t[4]|268435456&t[11]){let n;for(f=e[2],n=0;n<f.length;n+=1){const r=get_each_context(e,f,n);m[n]?m[n].p(r,t):(m[n]=create_each_block(r),m[n].c(),m[n].m(u.parentNode,u))}for(;n<m.length;n+=1)m[n].d(1);m.length=f.length}},d(e){e&&detach(t),e&&detach(l),destroy_each(m,e),e&&detach(u),d=!1,run_all(p)}}}function create_if_block_40(e){let t,n,r,i,a,o,s,c=l$1(`Solo ${e[40]?"grand ":""}campaign`)+"",l=e[48],u=[];for(let t=0;t<l.length;t+=1)u[t]=create_each_block_9(get_each_context_9(e,l,t));return{c(){t=element("div"),n=text(c),r=text(":\n\t\t\t\t\t"),i=element("select");for(let e=0;e<u.length;e+=1)u[e].c();a=element("option"),a.textContent=`${l$1("Start new campaign")}`,a.__value=null,a.value=a.__value,void 0===e[16]&&add_render_callback((()=>e[170].call(i)))},m(c,l){insert(c,t,l),append(t,n),append(t,r),append(t,i);for(let e=0;e<u.length;e+=1)u[e].m(i,null);append(i,a),select_option(i,e[16]),o||(s=[listen(i,"change",e[170]),listen(i,"change",e[127])],o=!0)},p(e,t){if(512&t[1]&&c!==(c=l$1(`Solo ${e[40]?"grand ":""}campaign`)+"")&&set_data(n,c),131072&t[1]|2013265920&t[2]|268435456&t[11]){let n;for(l=e[48],n=0;n<l.length;n+=1){const r=get_each_context_9(e,l,n);u[n]?u[n].p(r,t):(u[n]=create_each_block_9(r),u[n].c(),u[n].m(i,a))}for(;n<u.length;n+=1)u[n].d(1);u.length=l.length}65536&t[0]|131072&t[1]&&select_option(i,e[16])},d(e){e&&detach(t),destroy_each(u,e),o=!1,run_all(s)}}}function create_each_block_9(e){let t,n,r,i,a,o,s,c,l,u,d=e[353].name+"",p=l$1("as")+"",h=l$1(e[353].civ.name)+"",f=l$1("played $0, won $1, lost $2, drew $3",e[90](e[353]).length,e[89](e[353]),e[91](e[353]),e[92](e[353]))+"";return{c(){t=element("option"),n=text(d),r=space(),i=text(p),a=space(),o=text(h),s=text(" ("),c=text(f),l=text(")"),t.__value=u=e[353],t.value=t.__value},m(e,u){insert(e,t,u),append(t,n),append(t,r),append(t,i),append(t,a),append(t,o),append(t,s),append(t,c),append(t,l)},p(e,r){131072&r[1]&&d!==(d=e[353].name+"")&&set_data(n,d),131072&r[1]&&h!==(h=l$1(e[353].civ.name)+"")&&set_data(o,h),131072&r[1]&&f!==(f=l$1("played $0, won $1, lost $2, drew $3",e[90](e[353]).length,e[89](e[353]),e[91](e[353]),e[92](e[353]))+"")&&set_data(c,f),131072&r[1]&&u!==(u=e[353])&&(t.__value=u,t.value=t.__value)},d(e){e&&detach(t)}}}function create_else_block_8(e){let t,n,r,i,a,o,s,c,l,u,d=l$1(`${e[84](e[16])} log to date`)+"",p=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[16]),e[91](e[16]),e[92](e[16]))+"",h=e[90](e[16]),f=[];for(let t=0;t<h.length;t+=1)f[t]=create_each_block_8(get_each_context_8(e,h,t));return{c(){t=element("div"),n=element("div"),r=text(d),i=text(":"),o=space();for(let e=0;e<f.length;e+=1)f[e].c();s=space(),c=element("div"),l=text(p),attr(n,"class","campaign_row svelte-qol35w"),attr(n,"style",a=e[16].civ.hsStyle?e[16].civ.hsStyle:"background-"+e[16].civ.style+" color:"+e[16].civ.contrastText+"; font-weight:bold; border-bottom: 1vh double "+e[16].civ.contrastText),attr(c,"class","campaign_row svelte-qol35w"),attr(c,"style",u=e[16].civ.hsStyle?e[16].civ.hsStyle:"background-"+e[16].civ.style+" color:"+e[16].civ.contrastText+"; font-weight:bold; border-top: 1vh double"+e[16].civ.contrastText+"; margin-bottom: 1vmin;"),attr(t,"class","campaign_display svelte-qol35w")},m(e,a){insert(e,t,a),append(t,n),append(n,r),append(n,i),append(t,o);for(let e=0;e<f.length;e+=1)f[e].m(t,null);
1490append(t,s),append(t,c),append(c,l)},p(e,i){if(65536&i[0]&&d!==(d=l$1(`${e[84](e[16])} log to date`)+"")&&set_data(r,d),65536&i[0]|131072&i[1]&&a!==(a=e[16].civ.hsStyle?e[16].civ.hsStyle:"background-"+e[16].civ.style+" color:"+e[16].civ.contrastText+"; font-weight:bold; border-bottom: 1vh double "+e[16].civ.contrastText)&&attr(n,"style",a),65536&i[0]|268435460&i[2]|3072&i[3]|268435456&i[11]){let n;for(h=e[90](e[16]),n=0;n<h.length;n+=1){const r=get_each_context_8(e,h,n);f[n]?f[n].p(r,i):(f[n]=create_each_block_8(r),f[n].c(),f[n].m(t,s))}for(;n<f.length;n+=1)f[n].d(1);f.length=h.length}65536&i[0]&&p!==(p=l$1("$0 win{0,s}, $1 loss{1,es}, $2 draw{2,s}",e[89](e[16]),e[91](e[16]),e[92](e[16]))+"")&&set_data(l,p),65536&i[0]|131072&i[1]&&u!==(u=e[16].civ.hsStyle?e[16].civ.hsStyle:"background-"+e[16].civ.style+" color:"+e[16].civ.contrastText+"; font-weight:bold; border-top: 1vh double"+e[16].civ.contrastText+"; margin-bottom: 1vmin;")&&attr(c,"style",u)},d(e){e&&detach(t),destroy_each(f,e)}}}function create_if_block_35(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g=l$1("Player name")+"",y=l$1("Civilisation")+"",b=e[54],v=[];for(let t=0;t<b.length;t+=1)v[t]=create_each_block_7(get_each_context_7(e,b,t));return{c(){t=element("div"),n=text(g),r=text(": "),i=element("input"),a=space(),o=element("div"),s=text(y),c=text(": \n\t\t\t\t\t"),l=element("select");for(let e=0;e<v.length;e+=1)v[e].c();u=space(),d=element("button"),d.textContent=`${l$1("Random")}`,p=space(),h=element("button"),h.textContent=`${l$1("Surprise me!")}`,attr(i,"size","10"),void 0===e[2][0].civ&&add_render_callback((()=>e[172].call(l))),attr(d,"class","random svelte-qol35w"),attr(h,"class","surprise svelte-qol35w")},m(g,y){insert(g,t,y),append(t,n),append(t,r),append(t,i),set_input_value(i,e[2][0].name),insert(g,a,y),insert(g,o,y),append(o,s),append(o,c),append(o,l);for(let e=0;e<v.length;e+=1)v[e].m(l,null);select_option(l,e[2][0].civ),append(o,u),append(o,d),append(o,p),append(o,h),f||(m=[listen(i,"input",e[171]),listen(l,"change",e[172]),listen(l,"change",e[128]),listen(d,"click",e[173]),listen(h,"click",e[174])],f=!0)},p(e,t){if(4&t[0]&&i.value!==e[2][0].name&&set_input_value(i,e[2][0].name),8388608&t[1]|268435456&t[11]){let n;for(b=e[54],n=0;n<b.length;n+=1){const r=get_each_context_7(e,b,n);v[n]?v[n].p(r,t):(v[n]=create_each_block_7(r),v[n].c(),v[n].m(l,null))}for(;n<v.length;n+=1)v[n].d(1);v.length=b.length}4&t[0]&&select_option(l,e[2][0].civ)},d(e){e&&detach(t),e&&detach(a),e&&detach(o),destroy_each(v,e),f=!1,run_all(m)}}}function create_if_block_38(e){let t,n,r,i=""!=e[364][0].cardAdded?l$1("Add")+" "+l$1(e[364][0].cardAdded):l$1("Remove")+" "+l$1(e[364][0].cardRemoved),a=5==e[364][1].botLevel&&create_if_block_39();return{c(){t=element("div"),n=text(i),r=space(),a&&a.c(),attr(t,"class","campaign_cell svelte-qol35w")},m(e,i){insert(e,t,i),append(t,n),append(t,r),a&&a.m(t,null)},p(e,r){65536&r[0]&&i!==(i=""!=e[364][0].cardAdded?l$1("Add")+" "+l$1(e[364][0].cardAdded):l$1("Remove")+" "+l$1(e[364][0].cardRemoved))&&set_data(n,i),5==e[364][1].botLevel?a?a.p(e,r):(a=create_if_block_39(),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_if_block_39(e){let t,n,r=l$1("Remove 1 <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> from common pool.")+"";return{c(){t=text(". "),n=text(r)},m(e,r){insert(e,t,r),insert(e,n,r)},p:noop$1,d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_36(e){let t,n,r,i=l$1("Start next game with 6 <img src='res.png' style=\"width: 3vmin; height: 3vmin;\"/>, 4 <img src='pop.png' style=\"width: 3vmin; height: 3vmin;\"/> and 2 <img src='pro.png' style=\"width: 3vmin; height: 3vmin;\"/>")+"",a=5==e[364][1].botLevel&&create_if_block_37();return{c(){t=element("div"),r=empty(),a&&a.c(),n=new HtmlTag(r),attr(t,"class","campaign_cell svelte-qol35w")},m(e,o){insert(e,t,o),n.m(i,t),append(t,r),a&&a.m(t,null)},p(e,n){5==e[364][1].botLevel?a?a.p(e,n):(a=create_if_block_37(),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_if_block_37(e){let t,n,r=l$1("Return 1 removed <img src='unrest.png' style=\"width: 3vmin; height: 3vmin;\"/> to common pool if possible.")+"";return{c(){t=text(". "),n=text(r)},m(e,r){insert(e,t,r),insert(e,n,r)},p:noop$1,d(e){e&&detach(t),e&&detach(n)}}}function create_each_block_8(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b=l$1(e[364][1].civ.name)+"",v=l$1(e[64][e[364][1].botLevel])+"",A=l$1(possVictory(e[364][0]))+"",_=e[364][0].score
1490+"",x=e[364][1].score+"",k="WINNER!"==e[364][0].winner&&e[103](e[364][0])<5,w="WINNER!"==e[364][1].winner&&e[104](e[364][0])<4,T=k&&create_if_block_38(e),S=w&&create_if_block_36(e);return{c(){t=element("div"),n=element("div"),r=text(b),i=text(" ("),a=text(v),o=text("):"),s=space(),c=element("div"),l=text(A),u=text(" ("),d=text(_),p=text("â"),h=text(x),f=text(")"),m=space(),T&&T.c(),g=space(),S&&S.c(),attr(n,"class","campaign_cell svelte-qol35w"),attr(c,"class","campaign_cell svelte-qol35w"),attr(t,"class","campaign_row svelte-qol35w"),attr(t,"style",y=e[364][1].civ.hsStyle?e[364][1].civ.hsStyle:"background-"+e[364][1].civ.style+" color:"+e[364][1].civ.contrastText)},m(e,y){insert(e,t,y),append(t,n),append(n,r),append(n,i),append(n,a),append(n,o),append(t,s),append(t,c),append(c,l),append(c,u),append(c,d),append(c,p),append(c,h),append(c,f),append(t,m),T&&T.m(t,null),append(t,g),S&&S.m(t,null)},p(e,n){65536&n[0]&&b!==(b=l$1(e[364][1].civ.name)+"")&&set_data(r,b),65536&n[0]&&v!==(v=l$1(e[64][e[364][1].botLevel])+"")&&set_data(a,v),65536&n[0]&&A!==(A=l$1(possVictory(e[364][0]))+"")&&set_data(l,A),65536&n[0]&&_!==(_=e[364][0].score+"")&&set_data(d,_),65536&n[0]&&x!==(x=e[364][1].score+"")&&set_data(h,x),65536&n[0]&&(k="WINNER!"==e[364][0].winner&&e[103](e[364][0])<5),k?T?T.p(e,n):(T=create_if_block_38(e),T.c(),T.m(t,g)):T&&(T.d(1),T=null),65536&n[0]&&(w="WINNER!"==e[364][1].winner&&e[104](e[364][0])<4),w?S?S.p(e,n):(S=create_if_block_36(e),S.c(),S.m(t,null)):S&&(S.d(1),S=null),65536&n[0]|131072&n[1]&&y!==(y=e[364][1].civ.hsStyle?e[364][1].civ.hsStyle:"background-"+e[364][1].civ.style+" color:"+e[364][1].civ.contrastText)&&attr(t,"style",y)},d(e){e&&detach(t),T&&T.d(),S&&S.d()}}}function create_each_block_7(e){let t,n,r,i=l$1(e[353].name)+"";return{c(){t=element("option"),n=text(i),t.__value=r=e[353],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,a){8388608&a[1]&&i!==(i=l$1(e[353].name)+"")&&set_data(n,i),8388608&a[1]&&r!==(r=e[353])&&(t.__value=r,t.value=t.__value)},d(e){e&&detach(t)}}}function create_each_block_6(e){let t,n,r,i=l$1(e[353].name)+"";return{c(){t=element("option"),n=text(i),t.__value=r=e[353],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,a){65536&a[1]&&i!==(i=l$1(e[353].name)+"")&&set_data(n,i),65536&a[1]&&r!==(r=e[353])&&(t.__value=r,t.value=t.__value)},d(e){e&&detach(t)}}}function create_if_block_34(e){let t,n,r,i=l$1("default")+"";return{c(){t=text("Â ("),n=text(i),r=text(")")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_each_block_5(e){let t,n,r=l$1(e[351])+"",i=e[350]==e[82](e[16]),a=i&&create_if_block_34();return{c(){t=element("option"),n=text(r),a&&a.c(),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n),a&&a.m(t,null)},p(e,n){65536&n[0]&&(i=e[350]==e[82](e[16])),i?a?a.p(e,n):(a=create_if_block_34(),a.c(),a.m(t,null)):a&&(a.d(1),a=null)},d(e){e&&detach(t),a&&a.d()}}}function create_catch_block_1(e){let t,n,r,i=l$1("Unable to load games in progress:")+"",a=e[347].message+"";return{c(){t=text(i),n=space(),r=text(a)},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_then_block_1(e){let t,n;function r(e,n){return(null==t||134217728&n[0])&&(t=!!(joinableGames(e[27]).length>0)),t?create_if_block_30:create_else_block_7}let i=r(e,[-1]),a=i(e);return{c(){a.c(),n=empty()},m(e,t){a.m(e,t),insert(e,n,t)},p(e,t){i===(i=r(e,t))&&a?a.p(e,t):(a.d(1),a=i(e),a&&(a.c(),a.m(n.parentNode,n)))},d(e){a.d(e),e&&detach(n)}}}function create_else_block_7(e){let t,n=l$1("No games available to join at the moment. Sorry!")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_30(e){let t,n,r,i,a,o,s,c,l,u,d=l$1("$0 game{0,s} available to join at the moment.",joinableGames(e[27]).length)+"",p=l$1("Which do you want to join?")+"",h=joinableGames(e[27]),f=[];for(let t=0;t<h.length;t+=1)f[t]=create_each_block_4(get_each_context_4(e,h,t));let m="object"==typeof e[6]&&create_if_block_31(e);return{c(){t=text(d),n=space(),r=element("div"),i=text(p),a=space(),o=element("select");for(let e=0;e<f.length;e+=1)f[e].c();s=space(),m&&m.c(),c=empty(),void 0===e[6]&&add_render_callback((()=>e[167].call(o)))},m(d,p){insert(d,t,p),insert(d,n,p),insert(d,r,p),append(r,i),append(r,a),append(r,o);for(let e=0;e<f.length;e+=1)f[e].m(o,null);select_option(o,e[6]),insert(d,s,p),m&&m.m(d,p),insert(d,c,p),l||(u=listen(o,"change",e[167]),l=!0)},p(e,n){if(134217728&n[0]&&d!==(d=l$1("$0 game{0,s} available to join at the moment.",joinableGames(e[27]).length)+"")&&set_data(t,d),134217728&n[0]|25165824&n[2]){let t;for(h=joinableGames(e[27]),t=0;t<h.length;t+=1){const r=get_each_context_4(e,h,t);f[t]?f[t].p(r,n):(f[t]=create_each_block_4(r),f[t].c(),f[t].m(o,null))}for(;t<f.length;t+=1)f[t].d(1);f.length=h.length}134217792&n[0]&&select_option(o,e[6]),"object"==typeof e[6]?m?m.p(e,n):(m=create_if_block_31(e),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},d(e){e&&detach(t),e&&detach(n),e&&detach(r),destroy_each(f,e),e&&detach(s),m&&m.d(e),e&&detach(c),l=!1,u()}}}function create_each_block_4(e){let t,n,r,i=e[86](e[85](e[348]))+"";return{c(){t=element("option"),n=text(i),t.__value=r=e[348],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,a){134217728&a[0]&&i!==(i=e[86](e[85](e[348]))+"")&&set_data(n,i),134217728&a[0]&&r!==(r=e[348])&&(t.__value=r,t.value=t.__value)},d(e){e&&detach(t)}}}function create_if_block_31(e){let t,n,r,i,a,o,s,c,l,u,d,p,h=l$1("Which player are you?")+"",f=e[6].players,m=[];for(let t=0;t<f.length;t+=1)m[t]=create_each_block_3(get_each_context_3(e,f,t));return{c(){t=element("div"),n=text(h),r=space(),i=element("select");for(let e=0;e<m.length;e+=1)m[e].c();a=space(),o=element("div"),s=element("button"),s.textContent=`${l$1("Ask permission to join")}`,c=space(),l=element("div"),u=text(e[25]),void 0===e[26]&&add_render_callback((()=>e[168].call(i))),attr(s,"class","permission svelte-qol35w"),attr(l,"class","bot_info svelte-qol35w")},m(h,f){insert(h,t,f),append(t,n),append(t,r),append(t,i);for(let e=0;e<m.length;e+=1)m[e].m(i,null);select_option(i,e[26]),insert(h,a,f),insert(h,o,f),append(o,s),append(o,c),append(o,l),append(l,u),d||(p=[listen(i,"change",e[168]),listen(s,"click",e[169])],d=!0)},p(e,t){if(64&t[0]|268435456&t[11]){let n;for(f=e[6].players,n=0;n<f.length;n+=1){const r=get_each_context_3(e,f,n);m[n]?m[n].p(r,t):(m[n]=create_each_block_3(r),m[n].c(),m[n].m(i,null))}for(;n<m.length;n+=1)m[n].d(1);m.length=f.length}67108864&t[0]&&select_option(i,e[26]),33554432&t[0]&&set_data(u,e[25])},d(e){e&&detach(t),destroy_each(m,e),e&&detach(a),e&&detach(o),d=!1,run_all(p)}}}function create_if_block_32(e){let t,n,r=l$1(e[348].civ.name)+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,t){64&t[0]&&r!==(r=l$1(e[348].civ.name)+"")&&set_data(n,r)},d(e){e&&detach(t)}}}function create_each_block_3(e){let t,n=e[350]<e[6].numPlayers&&!e[348].hasOwnProperty("playerID")||e[348].playerID==e[6].host,r=n&&create_if_block_32(e);return{c(){r&&r.c(),t=empty()},m(e,n){r&&r.m(e,n),insert(e,t,n)},p(e,i){64&i[0]&&(n=e[350]<e[6].numPlayers&&!e[348].hasOwnProperty("playerID")||e[348].playerID==e[6].host),n?r?r.p(e,i):(r=create_if_block_32(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(e){r&&r.d(e),e&&detach(t)}}}function create_pending_block_1(e){let t,n,r=l$1("Loading games in progress")+"";return{c(){t=text(r),n=text("...")},m(e,r){insert(e,t,r),insert(e,n,r)},p:noop$1,d(e){e&&detach(t),e&&detach(n)}}}function create_if_block_26(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x,k,w=l$1("Player $0",e[350]+1)+"",T=l$1("Civilisation")+"",S=l$1("Bot")+"";function C(){e[158].call(a,e[349],e[350])}let I=e[54],N=[];for(let t=0;t<I.length;t+=1)N[t]=create_each_block_2(get_each_context_2(e,I,t));function E(){e[159].call(u,e[349],e[350])}function P(...t){return e[160](e[348],...t)}function $(...t){return e[161](e[348],...t)}function R(...t){return e[162](e[348],...t)}let O="Martians"==e[348].civ.name&&!e[348].bot&&create_if_block_28(e);function M(){e[165].call(A,e[349],e[350])}let D=e[348].bot&&create_if_block_27(e);return{c(){t=element("div"),n=element("span"),r=text(w),i=text(": "),a=element("input"),o=space(),s=element("span"),c=text(T),l=text(": "),u=element("select");for(let e=0;e<N.length;e+=1)N[e].c();d=space(),p=element("button"),p.textContent=`${l$1("Random")}`,h=space(),f=element("button"),f.textContent=`${l$1("Surprise me!")}`,m=space(),O&&O.c(),g=space(),y=element("span"),b=text(S),v=text("? "),A=element("input"),_=space(),D&&D.c(),attr(a,"size","10"),set_style(n,"white-space","nowrap"),void 0===e[348].civ&&add_render_callback(E),attr(p,"class","random svelte-qol35w"),attr(f,"class","surprise svelte-qol35w"),set_style(s,"white-space","nowrap"),attr(A,"type","checkbox"),set_style(y,"white-space","nowrap")},m(w,T){insert(w,t,T),append(t,n),append(n,r),append(n,i),append(n,a),set_input_value(a,e[348].name),append(t,o),append(t,
1490s),append(s,c),append(s,l),append(s,u);for(let e=0;e<N.length;e+=1)N[e].m(u,null);select_option(u,e[348].civ),append(s,d),append(s,p),append(s,h),append(s,f),append(t,m),O&&O.m(t,null),append(t,g),append(t,y),append(y,b),append(y,v),append(y,A),A.checked=e[348].bot,append(t,_),D&&D.m(t,null),x||(k=[listen(a,"input",C),listen(u,"change",E),listen(u,"change",P),listen(p,"click",$),listen(f,"click",R),listen(A,"change",M)],x=!0)},p(n,r){if(e=n,4&r[0]&&a.value!==e[348].name&&set_input_value(a,e[348].name),10240&r[0]|142606336&r[1]|268435456&r[11]){let t;for(I=e[54],t=0;t<I.length;t+=1){const n=get_each_context_2(e,I,t);N[t]?N[t].p(n,r):(N[t]=create_each_block_2(n),N[t].c(),N[t].m(u,null))}for(;t<N.length;t+=1)N[t].d(1);N.length=I.length}4&r[0]&&select_option(u,e[348].civ),"Martians"!=e[348].civ.name||e[348].bot?O&&(O.d(1),O=null):O?O.p(e,r):(O=create_if_block_28(e),O.c(),O.m(t,g)),4&r[0]&&(A.checked=e[348].bot),e[348].bot?D?D.p(e,r):(D=create_if_block_27(e),D.c(),D.m(t,null)):D&&(D.d(1),D=null)},d(e){e&&detach(t),destroy_each(N,e),O&&O.d(),D&&D.d(),x=!1,run_all(k)}}}function create_each_block_2(e){let t,n,r,i,a=l$1(e[353].name)+"";return{c(){t=element("option"),n=text(a),t.disabled=r=!usingTradeRoutes(e[11],e[13])&&e[58].includes(e[353].name),t.__value=i=e[353],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p(e,o){8388608&o[1]&&a!==(a=l$1(e[353].name)+"")&&set_data(n,a),10240&o[0]|8388608&o[1]&&r!==(r=!usingTradeRoutes(e[11],e[13])&&e[58].includes(e[353].name))&&(t.disabled=r),8388608&o[1]&&i!==(i=e[353])&&(t.__value=i,t.value=t.__value)},d(e){e&&detach(t)}}}function create_if_block_28(e){let t,n,r,i,a,o,s;function c(...t){return e[163](e[348],e[349],e[350],...t)}function l(...t){return e[164](e[348],e[349],e[350],...t)}return{c(){t=text("Side: "),n=element("button"),r=text("A"),i=element("button"),a=text("B"),attr(n,"class","random svelte-qol35w"),set_style(n,"background-color","A"==e[348].power?"green":"black"),attr(i,"class","random svelte-qol35w"),set_style(i,"background-color","B"==e[348].power?"green":"black")},m(e,u){insert(e,t,u),insert(e,n,u),append(n,r),insert(e,i,u),append(i,a),o||(s=[listen(n,"click",c),listen(i,"click",l)],o=!0)},p(t,r){e=t,4&r[0]&&set_style(n,"background-color","A"==e[348].power?"green":"black"),4&r[0]&&set_style(i,"background-color","B"==e[348].power?"green":"black")},d(e){e&&detach(t),e&&detach(n),e&&detach(i),o=!1,run_all(s)}}}function create_if_block_27(e){let t,n,r,i,a,o,s,c,l,u=l$1("Level")+"",d=e[139](e[348].botLevel)+"",p=e[64],h=[];for(let t=0;t<p.length;t+=1)h[t]=create_each_block_1(get_each_context_1(e,p,t));function f(){e[166].call(i,e[349],e[350])}return{c(){t=element("span"),n=text(u),r=text(": "),i=element("select");for(let e=0;e<h.length;e+=1)h[e].c();a=space(),o=element("div"),s=text(d),void 0===e[348].botLevel&&add_render_callback(f),set_style(t,"white-space","nowrap"),attr(o,"class","bot_info svelte-qol35w")},m(u,d){insert(u,t,d),append(t,n),append(t,r),append(t,i);for(let e=0;e<h.length;e+=1)h[e].m(i,null);select_option(i,e[348].botLevel),insert(u,a,d),insert(u,o,d),append(o,s),c||(l=listen(i,"change",f),c=!0)},p(t,n){if(e=t,4&n[2]|268435456&n[11]){let t;for(p=e[64],t=0;t<p.length;t+=1){const r=get_each_context_1(e,p,t);h[t]?h[t].p(r,n):(h[t]=create_each_block_1(r),h[t].c(),h[t].m(i,null))}for(;t<h.length;t+=1)h[t].d(1);h.length=p.length}4&n[0]&&select_option(i,e[348].botLevel),4&n[0]&&d!==(d=e[139](e[348].botLevel)+"")&&set_data(s,d)},d(e){e&&detach(t),destroy_each(h,e),e&&detach(a),e&&detach(o),c=!1,l()}}}function create_each_block_1(e){let t,n,r=l$1(e[351])+"";return{c(){t=element("option"),n=text(r),t.__value=e[350],t.value=t.__value},m(e,r){insert(e,t,r),append(t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_25(e){let t;return{c(){t=element("div"),set_style(t,"margin-top","3px"),set_style(t,"padding-top","3px"),set_style(t,"margin-bottom","3px"),set_style(t,"padding-bottom","3px"),set_style(t,"border-top","2px dashed grey")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_each_block(e){let t,n,r=e[1]>e[350]&&create_if_block_26(e),i=e[350]<e[1]-1&&create_if_block_25();return{c(){r&&r.c(),t=space(),i&&i.c(),n=empty()},m(e,a){r&&r.m(e,a),insert(e,t,a),i&&i.m(e,a),insert(e,n,a)},p(e,a){e[1]>e[350]?r?r.p(e,a):(r=create_if_block_26(e),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null),e[350]<e[1]-1?i||(i=create_if_block_25(),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(e){r&&r.d(e),e&&detach(t),i&&i.d(e),e&&detach(n)}}}function create_if_block_17(e){let t,n,r,i,a=create_if_block_19(e),o=!e[14]&&create_if_block_18(e);return{c(){t=element("div"),a&&a.c(),n=space(),o&&o.c(),r=empty(),set_style(t,"padding-top","1vmin"),set_style(t,"border-top","3px solid white")},m(e,s){insert(e,t,s),a&&a.m(t,null),insert(e,n,s),o&&o.m(e,s),insert(e,r,s),i=!0},p(e,t){a.p(e,t),e[14]?o&&(o.d(1),o=null):o?o.p(e,t):(o=create_if_block_18(e),o.c(),o.m(r.parentNode,r))},i(e){i||(transition_in(a),i=!0)},o(e){transition_out(a),i=!1},d(e){e&&detach(t),a&&a.d(),e&&detach(n),o&&o.d(e),e&&detach(r)}}}function create_if_block_19(e){let t,n,r,i,a,o,s,c,l,u,d=l$1("Scoring method")+"",p=e[18]&&create_if_block_20(e);return{c(){t=text(d),n=text(":\n\t\t\t\t\t\t"),r=element("select"),i=element("option"),i.textContent=`${l$1("Basic scoring (enter score of scoring cards yourself)")}`,a=element("option"),a.textContent=`${l$1("Full scoring (enter your cards and the app automatically scores them)")}`,o=space(),p&&p.c(),s=empty(),i.__value=!1,i.value=i.__value,a.__value=!0,a.value=a.__value,void 0===e[18]&&add_render_callback((()=>e[179].call(r)))},m(d,h){insert(d,t,h),insert(d,n,h),insert(d,r,h),append(r,i),append(r,a),select_option(r,e[18]),insert(d,o,h),p&&p.m(d,h),insert(d,s,h),c=!0,l||(u=[listen(r,"change",e[179]),listen(r,"change",e[180])],l=!0)},p(e,t){262144&t[0]&&select_option(r,e[18]),e[18]?p?(p.p(e,t),262144&t[0]&&transition_in(p,1)):(p=create_if_block_20(e),p.c(),transition_in(p,1),p.m(s.parentNode,s)):p&&(group_outros(),transition_out(p,1,1,(()=>{p=null})),check_outros())},i(e){c||(transition_in(p),c=!0)},o(e){transition_out(p),c=!1},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(o),p&&p.d(e),e&&detach(s),l=!1,run_all(u)}}}function create_if_block_20(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f=l$1("Use Commons and Fame cards from")+"",m=e[20]&&e[20].some(func_2),g=e[2].filter(e[142]).some(e[143]);function y(t){e[181](t)}let b={containerStyles:"color: black;",items:e[20],multiple:!0};void 0!==e[13]&&(b.value=e[13]),s=new Select({props:b}),binding_callbacks.push((()=>bind$1(s,"value",y)));let v=m&&create_if_block_23(e),A=g&&create_if_block_22(e),_=e[35].length>0&&create_if_block_21(e);return{c(){t=element("div"),t.textContent=`${l$1("Let me know on BGG (username hutchies) if you find any scoring errors!")}`,n=space(),r=element("div"),i=text(f),a=text(": \n\t\t\t\t\t\t\t"),o=element("div"),create_component(s.$$.fragment),l=space(),v&&v.c(),u=space(),A&&A.c(),d=space(),_&&_.c(),p=empty(),attr(t,"class","bot_info svelte-qol35w"),attr(o,"class","multiselect svelte-qol35w")},m(c,f){insert(c,t,f),insert(c,n,f),insert(c,r,f),append(r,i),append(r,a),append(r,o),mount_component(s,o,null),append(r,l),v&&v.m(r,null),e[184](r),insert(c,u,f),A&&A.m(c,f),insert(c,d,f),_&&_.m(c,f),insert(c,p,f),h=!0},p(e,t){const n={};1048576&t[0]&&(n.items=e[20]),!c&&8192&t[0]&&(c=!0,n.value=e[13],add_flush_callback((()=>c=!1))),s.$set(n),1048576&t[0]&&(m=e[20]&&e[20].some(func_2)),m?v?v.p(e,t):(v=create_if_block_23(e),v.c(),v.m(r,null)):v&&(v.d(1),v=null),6&t[0]&&(g=e[2].filter(e[142]).some(e[143])),g?A?A.p(e,t):(A=create_if_block_22(e),A.c(),A.m(d.parentNode,d)):A&&(A.d(1),A=null),e[35].length>0?_?_.p(e,t):(_=create_if_block_21(e),_.c(),_.m(p.parentNode,p)):_&&(_.d(1),_=null)},i(e){h||(transition_in(s.$$.fragment,e),h=!0)},o(e){transition_out(s.$$.fragment,e),h=!1},d(i){i&&detach(t),i&&detach(n),i&&detach(r),destroy_component(s),v&&v.d(),e[184](null),i&&detach(u),A&&A.d(i),i&&detach(d),_&&_.d(i),i&&detach(p)}}}function create_if_block_23(e){let t,n,r,i,a,o,s;return{c(){t=text("Use Trade Routes expansion? "),n=element("button"),r=text("Yes"),i=element("button"),a=text("No"),attr(n,"class","random svelte-qol35w"),set_style(n,"background-color",usingTradeRoutes(e[11],e[13])?"green":"black"),attr(i,"class","random svelte-qol35w"),set_style(i,"background-color",usingTradeRoutes(e[11],e[13])?"black":"green")},m(c,l){insert(c,t,l),insert(c,n,l),append(n,r),insert(c,i,l),append(i,a),o||(s=[listen(n,"click",e[182]),listen(i,"click",e[183])],o=!0)},p(e,t){10240&t[0]&&set_style(n,"background-color",usingTradeRoutes(e[11],e[13])?"green":"black"),10240&t[0]&&set_style(i,"background-color",usingTradeRoutes(e[11],e[13])?"black":"green")},d(e){e&&detach(t),e&&detach(n),e&&detach(i),o=!1,run_all(s)}}}function create_if_block_22(e){let t,n,r,i,a=joinList(e[2].filter(e[185]).filter(e[186]).map(func_10))+"";return{c(){t=element("div"),n=text("Note: the Trade Routes cards are compulsory whilst playing the trader civs "),r=text(a),i=text("."),attr(t,"class","bot_info svelte-qol35w")},m(e,a){insert(e,t,a),append(t,n),append(t,r),append(t,i)},p(e,t){6&t[0]&&a!==(a=joinList(e[2].filter(e[185]).filter(e[186]).map(func_10))+"")&&set_data(r,a)},d(e){e&&detach(t)}}}function create_if_block_21(e){let t,n,r,i,a=joinList(e[35])+"";return{c(){t=element("div"),n=text("Warning: you need to replace the Tributary card(s) corresponding to the player civs "),r=text(a),i=text(" with another random Tributary before playing this game."),attr(t,"class","bot_info svelte-qol35w"),set_style(t,"font-weight","bold")},m(e,a){insert(e,t,a),append(t,n),append(t,r),append(t,i)},p(e,t){16&t[1]&&a!==(a=joinList(e[35])+"")&&set_data(r,a)},d(e){e&&detach(t)}}}function create_if_block_18(e){let t,n,r,i,a,o,s=l$1("Automatically save score after each game?")+"";return{c(){t=element("div"),n=element("input"),r=space(),i=text(s),attr(n,"type","checkbox")}
1490,m(s,c){insert(s,t,c),append(t,n),n.checked=e[17],append(t,r),append(t,i),a||(o=[listen(n,"change",e[187]),listen(n,"change",e[188])],a=!0)},p(e,t){131072&t[0]&&(n.checked=e[17])},d(e){e&&detach(t),a=!1,run_all(o)}}}function create_if_block_14(e){let t,n={ctx:e,current:null,token:null,hasCatch:!0,pending:create_pending_block,then:create_then_block,catch:create_catch_block,error:347};return handle_promise(e[71](),n),{c(){t=empty(),n.block.c()},m(e,r){insert(e,t,r),n.block.m(e,n.anchor=r),n.mount=()=>t.parentNode,n.anchor=t},p(t,r){update_await_block_branch(n,e=t,r)},d(e){e&&detach(t),n.block.d(e),n.token=null,n=null}}}function create_catch_block(e){let t,n,r,i=l$1("Unable to access online scores database:")+"",a=e[347]+"";return{c(){t=text(i),n=space(),r=text(a)},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_then_block(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g,y,b,v,A,_,x=l$1("Add your saved scores to online database for community statistics? (All identifying information is removed)")+"",k=l$1("You can view statistics for just this device on ImperiumStats by clicking here.")+"",w=l$1("You can add a username (e.g. your BGG username) to associate with this device, if you want to view results from different devices grouped together on ImperiumStats.")+"",T=create_if_block_16();function S(e,t){return e[29]?create_if_block_15:create_else_block_6}let C=S(e),I=C(e);return{c(){t=element("input"),n=space(),r=text(x),i=space(),a=element("a"),a.textContent=`${l$1("Click here to visit ImperiumStats")}`,o=space(),s=element("div"),c=element("a"),l=text(k),d=space(),p=element("div"),h=space(),f=element("div"),m=text(w),g=space(),T&&T.c(),y=space(),b=element("div"),v=space(),I.c(),attr(t,"type","checkbox"),attr(a,"href","https://imperiumstats.surge.sh"),attr(a,"class","svelte-qol35w"),attr(c,"href",u="https://imperiumstats.surge.sh"+e[30]),attr(c,"class","svelte-qol35w"),set_style(p,"margin-top","1vmin"),set_style(p,"padding-top","1vmin"),set_style(p,"border-top","3px solid white")},m(u,x){insert(u,t,x),t.checked=e[19],insert(u,n,x),insert(u,r,x),insert(u,i,x),insert(u,a,x),insert(u,o,x),insert(u,s,x),append(s,c),append(c,l),insert(u,d,x),insert(u,p,x),insert(u,h,x),insert(u,f,x),append(f,m),append(f,g),T&&T.m(f,null),append(f,y),append(f,b),append(f,v),I.m(f,null),A||(_=[listen(t,"change",e[189]),listen(t,"change",e[190])],A=!0)},p(e,n){524288&n[0]&&(t.checked=e[19]),1073741824&n[0]&&u!==(u="https://imperiumstats.surge.sh"+e[30])&&attr(c,"href",u),C===(C=S(e))&&I?I.p(e,n):(I.d(1),I=C(e),I&&(I.c(),I.m(f,null)))},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(i),e&&detach(a),e&&detach(o),e&&detach(s),e&&detach(d),e&&detach(p),e&&detach(h),e&&detach(f),T&&T.d(),I.d(),A=!1,run_all(_)}}}function create_if_block_16(e){let t,n=l$1("This will also allow players to find your game more easily for shared scoring (using 'Join game in progress' in the 'Game mode' menu).")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_6(e){let t,n,r,i,a,o=l$1("No username at present")+"";return{c(){t=text(o),n=space(),r=element("button"),r.textContent=`${l$1("Set username")}`,attr(r,"class","uidUsername svelte-qol35w")},m(o,s){insert(o,t,s),insert(o,n,s),insert(o,r,s),i||(a=listen(r,"click",e[134]),i=!0)},p:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r),i=!1,a()}}}function create_if_block_15(e){let t,n,r,i,a,o,s,c,l=l$1("Username")+"";return{c(){t=text(l),n=text(": "),r=element("b"),i=text(e[29]),a=space(),o=element("button"),o.textContent=`${l$1("Change")}`,attr(o,"class","uidUsername svelte-qol35w")},m(l,u){insert(l,t,u),insert(l,n,u),insert(l,r,u),append(r,i),insert(l,a,u),insert(l,o,u),s||(c=listen(o,"click",e[134]),s=!0)},p(e,t){536870912&t[0]&&set_data(i,e[29])},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(a),e&&detach(o),s=!1,c()}}}function create_pending_block(e){let t;return{c(){t=text("Â ")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_12(e){let t,n,r,i,a,o,s,c,l,u,d=l$1("This page can be installed as a web app on most phones or tablets, which will allow you to access it from your home screen and whilst offline. You can usually do this by choosing 'Add to home screen' in your browser.")+"",p=0!=e[32]&&
1490create_if_block_13(e);return{c(){t=element("div"),n=element("details"),r=element("summary"),r.textContent=`${l$1("Installing as a web app")}`,i=space(),a=text(d),o=element("a"),o.textContent=`${l$1("This page has more detailed instructions.")}`,s=text("\n\t\t\t\t\t\t\tIf you like this app, "),c=element("a"),c.textContent="feel free to buy me a coffee.",l=text(" The app itself will always be free."),u=space(),p&&p.c(),set_style(r,"font-weight","bold"),set_style(r,"colour","yellow"),attr(o,"href","https://medium.com/progressivewebapps/how-to-install-a-pwa-to-your-device-68a8d37fadc1"),attr(o,"class","svelte-qol35w"),attr(c,"href","https://www.buymeacoffee.com/hutchiesapps"),attr(c,"class","svelte-qol35w")},m(e,d){insert(e,t,d),append(t,n),append(n,r),append(n,i),append(n,a),append(n,o),append(n,s),append(n,c),append(n,l),append(t,u),p&&p.m(t,null)},p(e,n){0!=e[32]?p?p.p(e,n):(p=create_if_block_13(e),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},d(e){e&&detach(t),p&&p.d()}}}function create_if_block_13(e){let t,n;return{c(){t=text("Version: "),n=text(e[32])},m(e,r){insert(e,t,r),insert(e,n,r)},p(e,t){2&t[1]&&set_data(n,e[32])},d(e){e&&detach(t),e&&detach(n)}}}function create_else_block_1(e){let t,n,r;function i(e,n){return(null==t||1&n[0])&&(t=!("Campaign update"==e[77](e[0]))),t?create_if_block_7:create_else_block_4}let a=i(e,[-1]),o=a(e);function s(e,t){return e[0]==e[1]+2&&e[3]?create_if_block_6:create_else_block_2}let c=s(e),l=c(e);return{c(){o.c(),n=space(),l.c(),r=empty()},m(e,t){o.m(e,t),insert(e,n,t),l.m(e,t),insert(e,r,t)},p(e,t){a===(a=i(e,t))&&o?o.p(e,t):(o.d(1),o=a(e),o&&(o.c(),o.m(n.parentNode,n))),c===(c=s(e))&&l?l.p(e,t):(l.d(1),l=c(e),l&&(l.c(),l.m(r.parentNode,r)))},d(e){o.d(e),e&&detach(n),l.d(e),e&&detach(r)}}}function create_if_block_1(e){let t,n,r,i,a,o,s,c=l$1("Next")+"";function l(e,t){return 0!=e[0]?create_if_block_2:create_else_block}let u=l(e),d=u(e);return{c(){t=element("button"),n=text(c),i=space(),d.c(),a=empty(),attr(t,"class","next svelte-qol35w"),attr(t,"style",r=e[6]&&0==e[0]&&!e[7]?"visibility: hidden;":"")},m(r,c){insert(r,t,c),append(t,n),insert(r,i,c),d.m(r,c),insert(r,a,c),o||(s=listen(t,"click",e[87]),o=!0)},p(e,n){134217921&n[0]&&r!==(r=e[6]&&0==e[0]&&!e[7]?"visibility: hidden;":"")&&attr(t,"style",r),u===(u=l(e))&&d?d.p(e,n):(d.d(1),d=u(e),d&&(d.c(),d.m(a.parentNode,a)))},d(e){e&&detach(t),e&&detach(i),d.d(e),e&&detach(a),o=!1,s()}}}function create_if_block(e){let t,n,r,i,a,o,s,c,l,u,d=l$1("Stats")+"";return{c(){t=element("button"),t.textContent=`${l$1("Edit")}...`,n=space(),r=element("button"),i=text(d),a=text("..."),s=space(),c=element("button"),c.textContent=`${l$1("Back")}`,attr(t,"class","copy svelte-qol35w"),attr(r,"class","next svelte-qol35w"),attr(r,"style",o=e[46].length>0?"":"display: none;"),attr(c,"class","prev svelte-qol35w")},m(o,d){insert(o,t,d),insert(o,n,d),insert(o,r,d),append(r,i),append(r,a),insert(o,s,d),insert(o,c,d),l||(u=[listen(t,"click",e[118]),listen(r,"click",e[121]),listen(c,"click",e[111])],l=!0)},p(e,t){32768&t[1]&&o!==(o=e[46].length>0?"":"display: none;")&&attr(r,"style",o)},d(e){e&&detach(t),e&&detach(n),e&&detach(r),e&&detach(s),e&&detach(c),l=!1,run_all(u)}}}function create_else_block_4(e){let t,n,r,i;function a(e,t){return e[16].finished?create_else_block_5:create_if_block_10}let o=a(e),s=o(e);return{c(){t=element("button"),s.c(),attr(t,"style",n=e[16].finished||"WINNER!"!=e[2][0].winner||""!=e[2][0][e[43]]?"":"visibility: hidden;"),attr(t,"class","reset svelte-qol35w")},m(n,a){insert(n,t,a),s.m(t,null),r||(i=listen(t,"click",e[109]),r=!0)},p(e,r){o===(o=a(e))&&s?s.p(e,r):(s.d(1),s=o(e),s&&(s.c(),s.m(t,null))),65540&r[0]|135168&r[1]&&n!==(n=e[16].finished||"WINNER!"!=e[2][0].winner||""!=e[2][0][e[43]]?"":"visibility: hidden;")&&attr(t,"style",n)},d(e){e&&detach(t),s.d(),r=!1,i()}}}function create_if_block_7(e){let t,n,r,i,a;function o(e,t){return e[55]?e[2][0].origKey?create_if_block_9:create_else_block_3:create_if_block_8}let s=o(e),c=s(e);return{c(){t=element("button"),t.textContent=`${l$1("New game")}`,n=space(),c.c(),r=empty(),attr(t,"class","reset svelte-qol35w")}
1490,m(o,s){insert(o,t,s),insert(o,n,s),c.m(o,s),insert(o,r,s),i||(a=listen(t,"click",e[88]),i=!0)},p(e,t){s===(s=o(e))&&c?c.p(e,t):(c.d(1),c=s(e),c&&(c.c(),c.m(r.parentNode,r)))},d(e){e&&detach(t),e&&detach(n),c.d(e),e&&detach(r),i=!1,a()}}}function create_else_block_5(e){let t,n=l$1("Complete campaign")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_10(e){let t,n=l$1("Save progress")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_else_block_3(e){let t;return{c(){t=element("div"),t.textContent=`${l$1("Score saved")}`,attr(t,"class","highscores svelte-qol35w")},m(e,n){insert(e,t,n)},p:noop$1,d(e){e&&detach(t)}}}function create_if_block_9(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Upload score")}`,attr(t,"class","highscores svelte-qol35w")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[269]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_if_block_8(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Save score")}`,attr(t,"class","highscores svelte-qol35w")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[109]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_else_block_2(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Back")}`,attr(t,"class","prev svelte-qol35w")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[81]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_if_block_6(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Log cards")}`,attr(t,"class","prev svelte-qol35w")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[138]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_else_block(e){let t,n,r;return{c(){t=element("button"),t.textContent=`${l$1("Saved scores")}`,attr(t,"class","highscores svelte-qol35w")},m(i,a){insert(i,t,a),n||(r=listen(t,"click",e[110]),n=!0)},p:noop$1,d(e){e&&detach(t),n=!1,r()}}}function create_if_block_2(e){let t,n,r,i;function a(e,t){return e[0]>1&&e[0]<e[1]+2?create_if_block_3:1==e[0]?create_if_block_5:void 0}let o=a(e),s=o&&o(e);return{c(){s&&s.c(),t=space(),n=element("button"),n.textContent=`${l$1("Back")}`,attr(n,"class","prev svelte-qol35w")},m(a,o){s&&s.m(a,o),insert(a,t,o),insert(a,n,o),r||(i=listen(n,"click",e[81]),r=!0)},p(e,n){o===(o=a(e))&&s?s.p(e,n):(s&&s.d(1),s=o&&o(e),s&&(s.c(),s.m(t.parentNode,t)))},d(e){s&&s.d(e),e&&detach(t),e&&detach(n),r=!1,i()}}}function create_if_block_5(e){let t,n,r,i,a,o,s,c=l$1("Collapse")+"";return{c(){t=element("button"),n=element("img"),i=text(c),a=text("!"),n.src!==(r="unrest.png")&&attr(n,"src","unrest.png"),set_style(n,"width","5vmin"),set_style(n,"height","5vmin"),attr(t,"class","reset svelte-qol35w")},m(r,c){insert(r,t,c),append(t,n),append(t,i),append(t,a),o||(s=listen(t,"click",e[268]),o=!0)},p:noop$1,d(e){e&&detach(t),o=!1,s()}}}function create_if_block_3(e){let t,n,r,i,a,o=l$1("Overall score")+"",s=e[2][e[0]-2].score+"",c=e[3]&&create_if_block_4();return{c(){t=element("div"),n=text(o),r=text(": "),i=text(s),a=space(),c&&c.c(),attr(t,"class","tally svelte-qol35w")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(t,i),append(t,a),c&&c.m(t,null)},p(e,n){5&n[0]&&s!==(s=e[2][e[0]-2].score+"")&&set_data(i,s),e[3]?c?c.p(e,n):(c=create_if_block_4(),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},d(e){e&&detach(t),c&&c.d()}}}function create_if_block_4(e){let t,n,r,i=l$1("collapse")+"";return{c(){t=text("("),n=text(i),r=text("!)")},m(e,i){insert(e,t,i),insert(e,n,i),insert(e,r,i)},p:noop$1,d(e){e&&detach(t),e&&detach(n),e&&detach(r)}}}function create_fragment(e){let t,n,r,i,a,o,s,c,l,u,d,p,h,f,m,g;function y(e,t){return-1==e[0]?create_if_block_129:e[0]==e[1]+2&&e[3]?create_if_block_131:1!=e[0]?create_if_block_132:void 0}add_render_callback(e[147]);let b=y(e),v=b&&b(e);const A=[create_if_block_11,create_if_block_43,create_if_block_48,create_if_block_94,create_if_block_115,create_else_block_32],_=[];function x(e,t){return 0==e[0]?0:1==e[0]?1:e[0]>0&&e[0]-2<e[1]?2:-1==e[0]?3:(16385&t[0]&&(c=!(!e[14]||"Campaign update"!=e[77](e[0]))),c?4:5)}function k(e,t){return-1==e[0]?create_if_block:((null==h||1&t[0])&&(h=!("Final results"==e[77](e[0])||"Campaign update"==e[77](e[0]))),h?create_if_block_1:create_else_block_1)}l=x(e,[-1]),u=_[l]=A[l](e);let w=k(e,[-1]),T=w(e);return{c(){t=element("html"),n=element("meta"),r=space(),i=element("div"),a=element("header"),v&&v.c(),o=space(),s=element("main"),u.c(),d=space(),p=element("footer"),T.c(),attr(t,"lang","en"),attr(n,"name","viewport"),attr(n,"content","width=device-width, initial-scale=1"),document_1.title="Imperium Scorer",attr(a,"class","svelte-qol35w"),attr(s,"class","svelte-qol35w"),attr(p,"class","svelte-qol35w"),attr(i,"id","app"),set_style(i,"height",e[22]+"px"),attr(i,"class","svelte-qol35w")},m(c,u){append(document_1.head,t),append(document_1.head,n),insert(c,r,u),insert(c,i,u),append(i,a),v&&v.m(a,null),append(i,o),append(i,s),_[l].m(s,null),append(i,d),append(i,p),T.m(p,null),f=!0,m||(g=[listen(window_1,"load",e[68]),listen(window_1,"resize",e[57]),listen(window_1,"orientationchange",e[57]),listen(window_1,"unload",e[73]),listen(window_1,"beforeunload",e[74]),listen(window_1,"hidepage",e[73]),listen(window_1,"online",e[147]),listen(window_1,"offline",e[147])],m=!0)},p(e,t){b===(b=y(e))&&v?v.p(e,t):(v&&v.d(1),v=b&&b(e),v&&(v.c(),v.m(a,null)));let n=l;l=x(e,t),l===n?_[l].p(e,t):(group_outros(),transition_out(_[n],1,1,(()=>{_[n]=null})),check_outros(),u=_[l],u?u.p(e,t):(u=_[l]=A[l](e),u.c()),transition_in(u,1),u.m(s,null)),w===(w=k(e,t))&&T?T.p(e,t):(T.d(1),T=w(e),T&&(T.c(),T.m(p,null))),(!f||41943
149004&t[0])&&set_style(i,"height",e[22]+"px")},i(e){f||(transition_in(u),f=!0)},o(e){transition_out(u),f=!1},d(e){detach(t),detach(n),e&&detach(r),e&&detach(i),v&&v.d(),_[l].d(),T.d(),m=!1,run_all(g)}}}let showBotStats=!0;function joinableGames(e){return e.filter((e=>e.players.filter((t=>!t.hasOwnProperty("playerID")||t.playerID==e.host)).length>1))}function sortByDate(e,t){return t[0].date-e[0].date}function sortByAvgScore(e,t){let n=e.reduce(((e,t)=>e+t.score),0)/e.length;return t.reduce(((e,t)=>e+t.score),0)/t.length-n}function sortByScore(e,t){let n=Math.max.apply(Math,e.map((function(e){return e.score})));return Math.max.apply(Math,t.map((function(e){return e.score})))-n}function sortByScoreDifference(e,t){let n=Math.max.apply(Math,e.map((function(e){return e.score})))-Math.min.apply(Math,e.map((function(e){return e.score})));return Math.max.apply(Math,t.map((function(e){return e.score})))-Math.min.apply(Math,t.map((function(e){return e.score})))-n}function interpolateMessage(e,t){return e.replace("{val}",t)}function deleteSave(){possLS("gameInProgress",null)&&(removeLS("gameInProgress"),console.log("Saved game deleted"))}function convertCardsToSaveable(e,t){let n=[];if(!e[t])return[];for(let r of e[t]){let e={id:r.id};r.location&&(e.location=r.location),"object"==typeof r.garrisoning&&(e.garrisoning={id:r.garrisoning.id}),n.push(e)}return n}function savePlayers(e){let t=[];for(let n=0;n<e.length;n++){let r=Object.assign({},e[n]);e[n].cards&&(r.cards=convertCardsToSaveable(e[n],"cards"),r.extras&&(r.extras=!0)),t.push(r)}return t}function saveGame(e,t,n,r,i,a,o,s,c,l,u,d,p,h,f){if(0==r)return;let m=savePlayers(e);console.log("Saving game");let g={players:m,currentCampaign:t,campaigns:n,phase:r,numPlayers:i,currentBoxes:a,fullScore:o,autoSave:s,autoUpload:c,campaign:l,sharedGame:u,collapse:d,gameListed:p,expSelected:f,boxesSelected:h};setLS("gameInProgress",JSON.stringify(g))}function possLS(e,t=!1){return"undefined"!=typeof Storage&&localStorage.getItem(e)?localStorage.getItem(e):t}function setLS(e,t){"undefined"!=typeof Storage&&localStorage.setItem(e,t)}function removeLS(e){"undefined"!=typeof Storage&&localStorage.getItem(e)&&localStorage.removeItem(e)}function pickTextColorBasedOnBgColorAdvanced(e,t,n){var r="#"===e.charAt(0)?e.substring(1,7):e,i=[parseInt(r.substring(0,2),16)/255,parseInt(r.substring(2,4),16)/255,parseInt(r.substring(4,6),16)/255].map((e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return.2126*i[0]+.7152*i[1]+.0722*i[2]>.179?n:t}function makeShareID(e){let t=[];return t=e.players.filter(((t,n)=>n<e.numPlayers)),t.reduce(((e,t)=>e+t.civ.name+"-"),"")+e.startTime}function sum(e,t){return e[t].reduce(((e,t)=>e+t),0)}function checkSingle(e,t,n=!1){return 1!=e?t:n||t.slice(0,-1)}function possPlural(e,t,n=!1){return e.toString()+" "+checkSingle(e,t,n)}function possList(e){return 0==e.length?"":": "+e.join(", ")}function addCardTypes(e){e.numCards=[],e.optCards=[],e.starCards=[];for(let t of e.cards){let n={Number:"numCards",Conditional:"optCards",Multiplier:"starCards"};n.hasOwnProperty(t.scoretype)&&e[n[t.scoretype]].push(t.score)}}function makeDateString(e){return new Date(e).toLocaleString(navigator.languages[0],{dateStyle:"medium",timeStyle:"short"})}function exportCSV(){}function usingTradeRoutes(e,t){return!!e.includes("traderoute")}function hasExtrasToScore(e){if(!e.hasOwnProperty("extras"))return!1;for(let t of e.extras)if(""!=t.scoretype)return!0;return!1}function notCurrentCiv(e,t){return t.filter((t=>t!=e.civ))}function joinList(e){if(e.length<=2)return e.join(" and ");let t=e.pop();return e.join(", ")+" and "+t}function flash(e){requestAnimationFrame((()=>{e.style.transition="none",e.style.backgroundColor="yellow",setTimeout((()=>{e.style.transition="background 1s",e.style.color="",e.style.backgroundColor=""}))}))}function filterHS(e,t){return"all"==e?t:"campaigns"==e?t.filter((e=>e[0].hasOwnProperty("campaign"))):t.filter((e=>!e[0].hasOwnProperty("campaign")))}function possVictory(e){return"WINNER!"==e.winner?"Victory":"DRAW!"==e.winner?"Draw":"Defeat"}const func_2=e=>"merchants"==e.value,func_3=e=>!e.finished,func_6=e=>e.scoringComplete,func_10=e=>e.civ.name,func_17=(e,t)=>e+t,func_19=(e,t)=>e.area.localeCompare(t.area),func_20=e=>"Corrupted"==e.name,func_21=e=>"Summoned"==e.name,func_24=(e,t)=>e+t,func_26=(e,t)=>t.score!=e.score?t.score-e.score:e.winner!=t.winner?t.winner.localeCompare(e.winner):void 0;function instance(e,t,n){let r,i,a,o,s=allCards;if(console.log(s),replaceCardFunctions(cards),s[0].hasOwnProperty("generated")){let e=s.reduce(((e,t)=>e+"\n"+t.output),"export let cards = [\n")+"\n];";navigator.clipboard&&navigator.clipboard.writeText(e).then((()=>{console.log("copied cards to clipboard")}))}function c(){n(22,r=window.innerHeight)}onMount((()=>{c()}));let l,u,d,p,h,f,m,g,y,b,v=!1,A="true"==possLS("promos",!1),_="true"==possLS("replaceCards",!1),x=new src,k=["res","pop","pro"],w=[...k],T=[!1,!1,!1,!1],S=!1,C=!1,I=!1,N="",E=0,P=[],$=navigator.onLine,R="",O=!1,M=0,D=["Guptas","Aksumites","Tang","Abbasids","Sassanids","Wagadou"],L="Use photo...";new URLSearchParams(location.search);let U=[{label:"Classics",value:"classics"},{label:"Legends",value:"legends"},{label:"Horizons",value:"merchants"}],B=[{label:"Blood",value:"blood"},{label:"Trade Routes",value:"traderoute"}],G=[B[0]],j=[],V=["classics"],F=[U[0]];console.log(s.filter((e=>"Crete"==e.name)));let z=[{label:"Classics",value:"classics"},{label:"Legends",value:"legends"},{label:"Horizons/Blood",value:"merchants",exp:"blood"},{label:"Horizons/TRs",value:"merchants",exp:"traderoute"}],q=[];function W(){if(!V)return[];let e=o.filter(((e,t)=>t<a)).map((e=>e.civ.name)),t=V.flatMap((e=>s.filter((t=>t.box.includes(e)&&"Commons"==t.deck&&t.suits.includes("trib")))));return console.log("clash check",e,t),e.filter((e=>t.some((t=>t.name==e&&(2==t.minplayers||a>=t.minplayers)))))}let H,K,Y,Q,J,Z,X,ee,te,ne,re=[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"in history",value:"history",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}],ie={Atlanteans:[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"flooded",value:"flooded",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}],Vikings:[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}],Inuit:[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}],Utopians:[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"in history",value:"history",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile",value:"exile",count:0,tally:0}],Taino:[{name:"in play",value:"play",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"with tokens",value:"tokens",tokens:!0,tally:0},{name:"in history",value:"history",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}],Polynesians:[{name:"in play",value:"play",tally:0},{name:"held as mana",value:"mana",tally:0},{name:"garrisoned",value:"garrison",tally:0},{name:"in legends",value:"legends",tally:0},{name:"in deck/hand",value:"deck",tally:0},{name:"in exile (optional)",value:"exile",count:0,tally:0}]},ae=[{name:"Choose an end-game trigger"},{name:"King of Kings (last fame card)"},{name:"Main deck empty"},{name:"Player's final development"},{name:"Arrival of Harald Hardrada",needsCiv:"Vikings"},{name:"Discovery of Graal",needsCiv:"Arthurians"},{name:"Arrival at Shangri-La",needsCiv:"Utopians"},{name:"Ceremony of the Key completed",needsCiv:"Cultists"},{name:"Collapse"}],oe="power",se=!1,ce="single",le=!1,ue="cardAdded",de=possLS("autoSave",!0),pe="true"==possLS("fullScore","true"),he="true"==possLS("autoUpload","false"),fe=["Chieftain","Warlord","Imperator","Sovereign","Overlord","Supreme Ruler"],me=[],ge=[],ye=null,be=possLS("language","en");let ve=[{name:"Most recent first",func:sortByDate},{name:"Highest score first",func:sortByScore},{name:"Highest average score first",func:sortByAvgScore},{name:"Greatest score difference first",func:sortByScoreDifference},{name:"Winning civilisation",func:function(e,t){let n=e.find((e=>"WINNER!"==e.winner||"DRAW!"==e.winner)),r=t.find((e=>"WINNER!"==e.winner||"DRAW!"==e.winner));n=null!=n?n.civ.name:"";r=null!=r?r.civ.name:"";return l$1(n).localeCompare(l$1(r))}}],Ae=0,_e=[{name:"Conditional",max:12,neg:[-2],img:"question",label:"cards",type:"pad",key:"optCards",message:"The
1490se score differently depending on certain conditions."},{name:"Multiplier",max:10,img:"star",label:"cards",type:"pad",key:"starCards",message:"Include the civilisation's power card. No individual card may score more than 10 points."},{name:"Numeric",max:12,neg:[-4],img:"number",label:"cards",type:"pad",key:"numCards",message:"Score the number on the card."},{name:"Progress",img:"pro",label:"tokens",type:"incdec",scoreVal:1,key:"pro",message:"Each progress token scores 1 point."},{name:"Population",img:"pop",label:"tokens",type:"incdec",key:"pop",message:"Not scored directly, but may be referred to by other cards."},{name:"Material",img:"res",label:"tokens",type:"incdec",key:"res",message:"Not scored directly, but may be referred to by other cards."},{name:"Unrest",img:"unrest",label:"cards",type:"incdec",key:"unrest",scoreVal:-2,message:"Each Unrest card scores -2 points."},{name:"Notes",label:"General notes",type:"notes",message:"Add your own notes about strategy here."}],xe=[{name:"Conditional",max:12,neg:[-2],img:"question",label:"cards",type:"pad",key:"optCards",message:"The bot always scores the higher value for these cards."},{name:"Multiplier",max:12,img:"star",label:"cards",type:"incdec",key:"starCount",scoreVal:5,message:"The bot scores 5 points for each of these cards. Do not include the power card."},{name:"Numeric",max:12,neg:[-4],img:"number",label:"cards",type:"pad",key:"numCards",message:"Score the number on the card."},{name:"Progress",img:"pro",label:"tokens",type:"incdec",key:"pro",scoreVal:1,message:"Each progress token scores 1 VP."},{name:"Population",img:"pop",label:"tokens",type:"incdec",key:"pop",message:"The bot scores 1 point for every {val} Resource and Population tokens combined.",interpolation:e=>e.botLevel>=3?5:10},{name:"Resource",img:"res",label:"tokens",type:"incdec",key:"res",message:"The bot scores 1 point for every {val} Resource and Population tokens combined."},{name:"Unrest",img:"unrest",label:"cards",type:"incdec",key:"unrest",scoreVal:-2,message:"Each Unrest card scores -2 points."},{name:"Notes",label:"General notes",type:"notes",message:"Add your own notes about the bot's behaviour here."}],ke=0,we=null,Te=[{name:"Arthurians",style:"color: rgb(135, 196, 66);"},{name:"Atlanteans",style:"color: rgb(76, 200, 242);"},{name:"Egyptians",style:"color: rgb(244, 237, 55);"},{name:"Mauryans",style:"color: rgb(151, 98, 52);"},{name:"Minoans",style:"color: rgb(0, 0, 0); text-shadow: 0 0 3px white, 0 0 3px white, 0 0 3px white, 0 0 3px white;",hsStyle:"background-color: rgb(0,0,0); border: 5px solid white;"},{name:"Olmecs",style:"color: rgb(130, 134, 134);"},{name:"Qin",style:"color: rgb(243, 131, 171);"},{name:"Utopians",style:"color: rgb(15, 184, 174);"}],Se=[{name:"Carthaginians",style:"color: rgb(23, 103, 170);"},{name:"Celts",style:"color: rgb(10, 107, 63);"},{name:"Greeks",style:"color: rgb(255, 255, 255);"},{name:"Macedonians",style:"color: rgb(84, 51, 141);"},{name:"Persians",style:"color: rgb(157, 90, 159);"},{name:"Romans",style:"color: rgb(236, 31, 38);"},{name:"Scythians",style:"color: rgb(172, 181, 110);"},{name:"Vikings",style:"color: rgb(248, 159, 35);"}];Se.forEach((e=>e.box="classics")),Te.forEach((e=>e.box="legends"));let Ce=[...Se,...Te].sort(((e,t)=>e.name.localeCompare(t.name)));Ce=mergeCivs(Ce,["Magyars","Taino","Mayans","Martians","Cultists","Inuit","Japanese","Polynesians",...D]);let Ie=Ce,Ne=U.filter((e=>"merchants"!=e.value)),Ee=possLS("boxes",!1);if(Ee){let e=Ee.split(",");Ne=U.filter((t=>e.includes(t.value)))}let Pe,$e,Re;!function(){for(let e of Ie){let t=document.createElement("div");t.style="background-"+e.style;let n=`#${t.style.backgroundColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/).slice(1).map((e=>parseInt(e,10).toString(16).padStart(2,"0"))).join("")}`;e.contrastText=pickTextColorBasedOnBgColorAdvanced(n,"#FFFFFF","#000000"),e.justColor=n}}();let Oe,Me=!1;function De(e){e.waiting&&(console.log("checking whether to update"),0==i?e.update():Me=!0)}function Le(){setLang(be),$e=FuzzySet(s.map((e=>l$1(e.name).toLowerCase()))),setLS("language",be)}async function Ue(e,t){if(!$)return void n(34,L=l$1("OCR doesn't work offline..."));if(null==Oe.value)return;n(34,L=l$1("Processing image..."));var r=new FormData;console.time("OCR");let i=await imageCompression(Oe.files[0],{maxSizeMB:1,useWebWorker:!0});r.append("file",i,i.name),n(56,Oe.value=null,Oe),r.append("isOverlayRequired",!0),r.append("detectOrientation",!0),r.append("scale",!0),"zh"==be?(r.append("OCREngine",3),r.append("language","chs")):r.append("OCREngine",2);var a=new XMLHttpRequest;a.addEventListener("readystatechange",(function(){if(4===this.readyState){console.timeEnd("OCR");let r=JSON.parse(this.responseText);1!=r.OCRExitCode&&console.log("Some errors in parsing");let i=[],a=[],s=0,c=0,l=0,u=0;for(let n of r.ParsedResults){if(console.log(n),1!=n.FileParseExitCode){console.log("Error in parsing: code "+n.FileParseExitCode);continue}let r=[];for(let o of n.TextOverlay.Lines){let n=Be(e,o.LineText,"exile"==t);if(!n){null==n&&i.push(o.LineText);continue}a.push(o.LineText);let s={card:n,left:Math.min(...o.Words.map((e=>e.Left))),right:Math.max(...o.Words.map((e=>
1490e.Left+e.Width))),top:o.MinTop};r.push(s)}if("exile"==t)continue;if(0==r.length)continue;r.sort(((e,t)=>e.top-t.top));let d=[[r.shift()]];for(let e of r){let t=0,n=!1;for(let r of d){let i=r[r.length-1];if(e.left<i.left){if(e.right>i.left){r.push(e),n=!0;break}break}if(e.left<i.right){r.push(e),n=!0;break}t++}n||(d=[...d.slice(0,t),[e],...d.slice(t)])}let p=0,h=o[e].cards.filter((e=>"play"==e.location&&e.garrisoning));for(let n of d)if(o[e].bot)console.log("Bot: add only here"),n.forEach((t=>{t.card.name.toLowerCase()!=o[e].civ.name.toLowerCase()&&(Ge(e,"deck",t.card),u++)}));else if("play"==t&&n[n.length-1].card.garrisoning){let r=Ge(e,t,n.pop().card);u++,n.forEach((t=>{Ge(e,"garrison",t.card,r),s++}))}else"garrison"==t&&h.length>0?(n.forEach((t=>{Ge(e,"garrison",t.card,h[p]),s++})),p<h.length-1&&p++):n.some((t=>t.card.name.toLowerCase()==o[e].civ.name.toLowerCase()))?n.forEach((n=>{n.card.name.toLowerCase()!=o[e].civ.name.toLowerCase()&&("Vikings"!=o[e].civ.name&&"Atlanteans"!=o[e].civ.name?(Ge(e,"history",n.card),c++):"Vikings"==o[e].civ.name?(Ge(e,t,n.card),u++):"Atlanteans"==o[e].civ.name&&(Ge(e,"flooded",n.card),c++))})):"play"==t&&n.some((e=>!e.card.icons.includes("pinned")))?n.forEach((t=>{Ge(e,"deck",t.card),l++})):n.forEach((n=>{Ge(e,t,n.card),u++}))}if(i.length>0&&console.log(i.length+" cards unmatched: "+i.join(", ")),0==a.length)return void n(34,L=l$1("No cards found: was the image in the right orientation?"));if("exile"==t)return n(34,L=l$1("$0 cards counted in exile.",a.length)),void n(2,o[0].exile+=a.length,o);s=0!=s?", "+l$1("$0 cards automatically garrisoned",s):"",c=0!=c?"Atlanteans"==o[e].civ.name?", "+l$1("$0 cards automatically flooded",c):", "+l$1("$0 cards automatically put in history",c):"",l=0!=l?", "+l$1("$0 cards added to deck/hand/discard",l):"",n(34,L=l$1("$0 cards identified. $1 cards added to $2$3.",a.length,u,l$1(t),`${s}${c}${l}`)),n(2,o[0].ocrUsed=!0,o)}})),a.open("POST","https://api.ocr.space/parse/image"),a.setRequestHeader("apiKey","c18d7627dd88957"),a.send(r)}function Be(e,t,n=!1){if(""==(t=(t=t.replace(/\s+/g," ")).replace(/[^A-Z0-9Ã-ÃÃ-öø-ÿ ]/g,""))||t.length<=2)return null;if(s.find((e=>e.name.toLowerCase()==reverseL(t).toLowerCase())))return n?reverseL(t):(console.log("found w/o fuzz",reverseL(t)),je(e,reverseL(t)));{let r=function(e){let t=$e.get(e.toLowerCase(),null,.6),n=[];if(!t)return!1;for(let e of t)n.push([e[0],reverseL(e[1])]);return n}(t);if(r&&r.length>0)return n?t:(console.log("found with fuzz",r[0][1]),je(e,r[0][1]))}return null}function Ge(e,t,r,i=!1){let a=Object.assign({},r);if(a.location=t,"garrison"==a.location)if(i)a.garrisoning=i;else{if(!ye)return console.log("Nowhere to garrison "+a.name),!1;a.garrisoning=ye}return n(2,o[e].cards=[...o[e].cards,a],o),a}function je(e,t){let n=s.filter((e=>e.name.toLowerCase()==t.toLowerCase()));return n.length>1&&(n=n.filter((e=>"Commons"!=e.deck&&"Fame"!=e.deck||U[V].value.some((t=>e.box.includes(t)))))),n.length>1&&(n=n.filter((e=>"Commons"==e.deck||"Fame"==e.deck||o.some(((t,n)=>n<a&&e.deck==t.civ.name))))),n=n.length>1&&o[e].civ.name.toLowerCase()==n[0].name.toLowerCase()?n.filter((e=>e.area.startsWith("Power"))):n.filter((e=>!e.area.startsWith("Power"))),1==n.length?n[0]:n.length>1?(console.log("Multiple possibilities: "+n.map((e=>e.name)).join(", ")),n.sort(((t,n)=>t.deck==o[e].civ.name&&n.deck!=o[e].civ.name?-1:n.deck==o[e].civ.name&&t.deck!=o[e].civ.name?1:0)),n[0]):null}async function Ve(){if(S)return;firebase.apps.length?firebase.app():firebase.initializeApp({apiKey:"AIzaSyDJL6yVhSLi4CpLa8us5ujmejhyJFXWH00",authDomain:"imperium-scorer.firebaseapp.com",projectId:"imperium-scorer",storageBucket:"imperium-scorer.appspot.com",messagingSenderId:"735950727331",appId:"1:735950727331:web:232e845cba494eb22e3716"}),firebase.auth().onAuthStateChanged((async e=>{if(e){await e.getIdToken(),n(9,m=e.uid),console.log(m);let t=new URLSearchParams;t.set("uid",m),n(30,R="?"+t.toString())}})),await firebase.auth().signInAnonymously(),f=firebase.firestore();let e=f.collection("usernames").doc(m),t=await e.get();t.exists&&n(29,g=t.data().name),S=!0}function Fe(e){"visible"==document.visibilityState?async function(){C&&(console.log("Back in the game"),await f.collection("shared").doc(o[0].shareKey).update({hostHidden:!1}))}():ze()}async function ze(){0==i||Pe||(saveGame(o,Q,Y,i,a,V,pe,de,he,se,l,v,C,F,G),C&&await f.collection("shared").doc(o[0].shareKey).update({hostHidden:!0}))}async function qe(e,t){n(25,N="");try{let r=f.collection("shared").doc(e.key);await f.runTransaction((async n=>{console.log("Asking to join ",e.key);let i=await n.get(r);if(!i.exists)throw"Document does not exist";let a={uid:m,player:t,status:"incomplete"};g&&(a.username=g);let o=[...i.data().joinRequests,a];n.update(r,{joinRequests:o})})),n(25,N=l$1("Awaiting response from game host..."));let i=f.collection("shared").doc(e.key).onSnapshot((async a=>{(e=a.data()).joinRequests.some((e=>e.uid==m&&e.player==t&&"accepted"==e.status))?(e=await f.runTransaction((async e=>{let n=await e.get(r);if(!n.exists)throw"Document does not exist";let i=n.data(),a=i.joinRequests.findIndex((e=>e.uid==m&&e.player==t));return i.joinRequests=[...i.joinRequests.slice(0,a),...i.joinRequests.slice(a+1)],i.players[t].playerID=m,e.update(r,{joinRequests:i.joinRequests,players:i.players}),i})),n(7,I=!0),i()):e.joinRequests.some((e=>e.uid==m&&e.player==t&&"denied"==e.status))&&(e=await f.runTransaction((async e=>{let n=await e.get(r);if(!n.exists)throw"Document does not exist";let i=n.data(),a=i.joinRequests.findIndex((e=>e.uid==m&&e.player==t));return i.joinRequests=[...i.joinRequests.slice(0,a),...i.joinRequests.slice(a+1)],e.update(r,{joinRequests:i.joinRequests}),i})),n(7,I=!1),n(25,N=l$1("Permission denied. Try another game.")),i())}))}catch(e){console.log("Unable to ask permission to join:"+e.message)}}function We(e){n(27,P=[]),e.forEach((e=>{n(27,P=[...P,e.data()])}));let t=Date.now();n(27,P=P.filter((e=>t-e.startTime<864e5))),n(27,P=P.filter((e=>!e.hostHidden))),0!=P.length?(P.sort(((e,t)=>t.startTime-e.startTime)),l&&P.some((e=>ot(e)==ot(l)))&&n(6,l=P.find((e=>ot(e)==ot(l)))),!P.some((e=>e==l))&&joinableGames(P).length>0&&n(6,l=joinableGames(P)[0]),l&&l&&l.players[E].hasOwnProperty("playerID")&&l.players[E].playerID!=l.host&&n(26,E=l.players.findIndex((e=>!e.hasOwnProperty("playerID")||e.playerID==l.host)))):n(6,l=void 0)}async function He(e){await Ve(),f.collection("shared").doc(e).update({hostHidden:!1}),h=f.collection("shared").doc(e).onSnapshot((t=>{if(!t.exists)return h&&h(),void(h=void 0);let r=[],i=t.data().joinRequests;for(let e of i){if("incomplete"!=e.status)continue;if(o[e.player].playerID==e.uid)continue;let t=e.username||l$1("A player");confirm(l$1("$0 has asked to join the game as $1 ($2). Is this ok?",t,o[e.player].name,o[e.player].civ.name))?(e.status="accepted",n(2,o[e.player].playerID=e.uid,o),r.push(e),console.log("Player "+e.uid+" has joined as "+o[e.player].civ.name)):(e.status="denied",r.push(e))}0!=r.length&&f.runTransaction((async t=>{let n=f.collection("shared").doc(e),i=await t.get(n);if(!i.exists)throw"Document does not exist";let a=i.data().joinRequests,s=[...i.data().playerUpdates];for(let e of r){let t=a.find((t=>t.uid==e.uid&&t.player==e.player));t?(t.status=e.status,"accepted"==t.status&&(s=[...s,{uidsDone:[m],player:e.player,field:"playerID",value:e.uid}])):console.log("Unable to find request in queue!")}let c=savePlayers(o);t.update(n,{joinRequests:a,playerUpdates:s,players:c})})).catch((e=>{console.log("Processing joining failed: "+e.message)}))})),p=f.collection("shared").doc(o[0].shareKey).onSnapshot((async e=>{if(!e.exists)return p&&p(),void(p=void 0);let t=e.data();!v&&t.collapse&&Ft(!0);try{let e=f.collection("shared").doc(o[0].shareKey),t=await f.runTransaction((async t=>{let n=await t.get(e);if(!n.exists)throw"Document does not exist";let r=n.data(),i=[];if(!r)return[];for(let e=r.playerUpdates.length-1;e>=0;e--){let t=r.playerUpdates[e];r.players.every(((e,n)=>n>=a||!e.hasOwnProperty("playerID")&&t.uidsDone.includes(r.host)||t.uidsDone.includes(e.playerID)))?r.playerUpdates.splice(e,1):t.uidsDone.includes(m)||(i.push(t),t.uidsDone.push(m))}for(let e of i)e.hasOwnProperty("field")?e.hasOwnProperty("diff")?(r.players[e.player][e.field]+=e.diff,r.players[e.player][e.field]<0&&(r.players[e.player][e.field]=0)):e.hasOwnProperty("value")&&(r.players[e.player][e.field]=e.value):r.players[e.player]=e.value[0];return t.update(e,{playerUpdates:r.playerUpdates,players:r.players}),i}));for(let e of t)e.hasOwnProperty("field")?e.hasOwnProperty("diff")?(n(2,o[e.player][e.field]+=e.diff,o),o[e.player][e.field]<0&&n(2,o[e.player][e.field]=0,o)):e.hasOwnProperty("value")&&n(2,o[e.player][e.field]=e.value,o):n(2,o[e.player]=Qe(e.value)[0],o)}catch(e){console.log("Unable to update! "+e.message)}}))}async function Ke(){try{await Ve();let e=await f.collection("shared").where("host","==",m).get();e.docs.length>0&&(console.log("Removing "+e.docs.length+" previously hosted games"),e.forEach((e=>{f.collection("shared").doc(e.data().key).delete()}
1490))),d&&(d(),d=void 0),p&&(p(),p=void 0)}catch(e){console.log("Unable to access database of previously hosted games: "+e.message)}}function Ye(){Me&&Re.update(),n(0,i=0),O=!1,n(1,a=2),n(3,v=!1),n(2,o=[]),n(55,Pe=!1),n(6,l=void 0),n(7,I=!1),n(25,N=""),n(26,E=0),n(27,P=[]);for(let e=1;e<=4;e++)o.push({name:possLS("Player "+e,l$1("Player $0",e)),civ:Ie[e-1],bot:!1,botLevel:parseInt(possLS("BotLevel "+e,2)),optCards:[],starCards:[],starCount:0,numCards:[],unrest:0,fullScore:pe,canEdit:!0,power:"A",cards:[],cardAdded:"",cardRemoved:"",score:0,winner:"",exile:0,unrest:0,trigger:"",triggeringPlayer:null,general:"",notes:{strategy:[],otherStrategy:"",bigCards:""}});n(2,o[1].bot=!0,o),n(2,o[1].name="Bot",o),te||n(46,te=JSON.parse(possLS("scores","[]"))),Y||n(15,Y=JSON.parse(possLS("campaigns","[]"))),ne||(ne=parseInt(possLS("campaignCounter","0"))),function(){for(let e of te)if(e.length>0&&e[0].fullScore)for(let t of e)addCardTypes(t)}(),se&&(n(48,ge=Y.filter((e=>!e.finished))),(!Q||Q.finished)&&ge.length>0&&n(16,Q=ge[0]),Q&&(n(2,o[0].civ=Q.civ,o),n(2,o[0].name=Q.name,o)),n(47,me=Rt(Q)),n(2,o[1].civ=me[0],o),n(2,o[1].botLevel=nt(Q),o)),$t()}function Qe(e){let t=[];for(let n of e){let e=Object.assign({},n);e.cards&&(e.cards=Je(e,"cards"),e.extras&&(e.extras=e.cards.filter((e=>e.area.startsWith("Extra"))))),t.push(e)}return t}function Je(e,t){let n=[];if(!e[t])return[];for(let r of e[t]){let e=s.find((e=>e.id==r.id));if(e){let t=Object.assign({},e);r.location&&(t.location=r.location),r.garrisoning&&(t.garrisoning=r.garrisoning),n.push(t)}}for(let e of n)"object"==typeof e.garrisoning&&e.garrisoning&&(e.garrisoning=n.find((t=>t.id==e.garrisoning.id)));return n}function Ze(e){if(0==e)return"Setup";if(1==e)return"Gameplay";let t=e-2;return t<0?null:(At(o),t>a-1?se?t>a?"Campaign update":"Game results":"Final results":"Scoring")}function Xe(e){n(52,ke=e)}function et(e){n(36,oe=e),n(34,L=l$1("Use photo...")),"exile"==Vt(o[i-2])[oe].value&&n(34,L=l$1("Count from photo..."))}async function tt(e){try{let t=l?l.key:o[0].shareKey,n=f.collection("shared").doc(t);await f.runTransaction((async t=>{let r=await t.get(n);if(!r.exists)throw"Document does not exist";let i=[...r.data().playerUpdates,e];t.update(n,{playerUpdates:i})}))}catch(e){console.log("Unable to update shared game: "+e.message)}}function nt(e){if(e&&!e.finished&&ut(e).length>0){let t=ut(e)[ut(e).length-1];return"WINNER!"==t[0].winner&&t[1].botLevel<fe.length-1?t[1].botLevel+1:t[1].botLevel}return 0}function rt(e,t=null){return e?!!(ut(e).length>0&&ut(e).every((e=>5==e[1].botLevel))):5==o[1].botLevel}function it(e){let t=[];t=e.filter(((e,t)=>t<a));let n=t.reduce(((e,t)=>e+t.civ.name+t.score+"-"),"")+e[0].date.toString();for(let t of e)t.gID=n;return n}function at(e){let t=[];return t=e.filter(((e,t)=>t<a)),e[0].hasOwnProperty("date")?t.reduce(((e,t)=>e+t.civ.name+"-"),"")+e[0].date.toString():t.reduce(((e,t)=>e+t.civ.name+"-"),"")}function ot(e){let t=[];t=e.players.filter(((e,t)=>t<a));let n=makeDateString(e.startTime)+": "+t.map((e=>e.civ.name)).join(" v ");return e.hasOwnProperty("hostName")&&(n=`(${e.hostName}) ${n}`),n}async function st(){if(n(0,i++,i),n(52,ke=0),n(49,ye=null),1==i){if("single"!=ce&&l)d&&(d(),d=void 0),ct();else{if(se)Q?(ut(Q).length>0&&""==ut(Q)[ut(Q).length-1][0].winner?(n(2,o[0].res=6,o),n(2,o[0].pop=4,o),Et(o[0],2)):(n(2,o[0].res=3,o),n(2,o[0].pop=2,o),Et(o[0],1)),n(2,o[0].name=Q.name,o),n(2,o[0].civ=Q.civ,o)):(ne++,setLS("campaignCounter",ne.toString()),n(16,Q={name:o[0].name,games:[],civ:o[0].civ,campaignID:ne,finished:!1}),n(2,o[0].res=3,o),n(2,o[0].pop=2,o),Et(o[0],1),Y.push(Q)),"Martians"!=o[0].civ.name||o[0].bot||("A"==o[0].power?n(2,o[0].pro+=25,o):n(2,o[0].pro+=20,o)),n(2,o[1].name="Bot",o),n(2,o[1].bot=!0,o),o[1].botLevel>=3?(n(2,o[1].res=3,o),n(2,o[1].pop=2,o),Et(o[1],1)):(n(2,o[1].res=0,o),n(2,o[1].pop=0,o),n(2,o[1].pro=0,o),n(2,o[1].trade=0,o)),"Martians"!=o[1].civ.name||o[1].bot||n(2,o[1].pro+=20,o),n(1,a=2);else for(let[e,t]of o.entries())setLS("Player "+(e+1),t.name),t.bot&&setLS("BotLevel "+(e+1),t.botLevel),!t.bot||t.botLevel>=3?(t.res=3,t.pop=2,Et(t,1)):(t.res=0,t.pop=0,Et(t,0)),"Martians"!=t.civ.name||t.bot||("A"==t.power?t.pro+=25:t.pro+=20),"Cultists"==t.civ.name&&(t.summonedState=s.find((e=>"Corrupted"==e.name)));if(pe){for(let e of s.filter((e=>e.area.startsWith("Power"))))e.location="play";!function(e){let t=s.filter((e=>e.area.startsWith("Power")&&e.name.startsWith("Merchant")&&!e.playerNum));for(let r=0;r<e;r++)for(let e of t){if(s.some((t=>t.name==e.name&&t.playerNum==r)))continue;let t=Object.assign({},e);e.location="play",t.playerNum=r,n(21,s=[...s,t])}}(a);for(let e=0;e<a;e++){if(o[e].bot)n(2,o[e].cards=[],o);else{console.log(s.filter((t=>t.deck==o[e].civ.name)));let t=s.find((t=>t.deck==o[e].civ.name&&t.area=="Power"+o[e].power));if(t||console.log("No power card for "+o[e].civ.name+": ",s.find((t=>t.name==o[e].civ.name))),n(2,o[e].cards=[t],o),usingTradeRoutes(j)){let t=s.find((t=>t.area.startsWith("Power")&&"Merchants"==t.name&&t.playerNum==e));t?(t.count=1,n(2,o[e].cards=[...o[e].cards,t],o)):console.log("No merchant card found!")}}let t=s.filter((t=>t.deck==o[e].civ.name&&t.area.startsWith("Extra-")));if(!o[e].civ.hasOwnProperty("extraDefault")||o[e].bot&&!o[e].civ.hasOwnProperty("botExtras")){if(t.length>0&&!o[e].bot){let r="Extra-";n(2,o[e].extras=t,o),n(2,o[e].extraDeck=t[0].area.substring(r.length),o);for(let r of t)n(2,o[e].cards=[...o[e].cards,r],o)}}else{let r="Extra-",i=s.find((t=>t.name==o[e].civ.extraDefault));n(2,o[e].extras=[i],o),n(2,o[e].extraChoices=[...o[e].civ.extraChoices.map((e=>s.find((t=>t.name==e))))],o),n(2,o[e].extraDeck=t[0].area.substring(r.length),o);for(let r of t)n(2,o[e].cards=[...o[e].cards,r],o)}}}se||(At(o),async function(){if(2==a&&o.some(((e,t)=>t<a&&e.bot)))return;let e={startTime:Date.now(),numPlayers:a,players:o,currentBoxes:V,fullScore:pe,joinRequests:[],playerUpdates:[],host:m,collapse:!1};g&&(e.hostName=g),e.name=ot(e),e.key=makeShareID(e),n(2,o[0].shareKey=e.key,o),e.players=savePlayers(o.filter(((e,t)=>t<a))),n(2,o);try{await f.collection("shared").doc(e.key).set(e),await He(e.key),console.log("Listed game for joining"),n(141,C=!0)}catch(e){console.log("Couldn't make saveable game: "+e.message)}}())}x.enable()}else x.disable();if("Final results"==Ze(i)||v)if(l||o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID")&&e.playerID!=m))){l?l.key:o[0].shareKey,l?o.filter((e=>
1490e.playerID==m)).forEach((e=>{e.scoringComplete=!0})):o.filter((e=>!e.hasOwnProperty("playerID")||e.playerID==m)).forEach((e=>{e.scoringComplete=!0}));for(let e=0;e<a;e++){let t=o[e];(l||t.hasOwnProperty("playerID"))&&t.playerID!=m||await tt({uidsDone:[m],player:e,value:savePlayers([t])})}}else{let e=l?l.key:o[0].shareKey;f.collection("shared").doc(e).delete().then((()=>{console.log("Opportunity for sharing removed"),n(141,C=!1)})).catch((e=>{console.log("Unable to remove game from shared list: "+e.message)})),!de||Pe||se||v||St()}if("Game results"==Ze(i)&&se&&("WINNER!"==o[0].winner?lt(Q)+1==5&&n(16,Q.finished="victory",Q):""==o[0].winner&&4==dt(Q)&&n(16,Q.finished="defeat",Q)),"Campaign update"==Ze(i)&&v&&de&&!Pe&&!se&&St(),(l||o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID"))))&&i>1&&i-2<a){let e=i-2;l&&o[e].playerID!=m&&st(),!l&&o[e].playerID&&o[e].playerID!=m&&st()}}async function ct(){await Ve();let e=l.key,t=await f.collection("shared").doc(e).get();if(!t.exists)return console.log("Shared game has disappeared!"),n(6,l=void 0),void n(39,ce="single");n(6,l=t.data()),n(2,o=Qe(l.players)),p=f.collection("shared").doc(e).onSnapshot((async t=>{n(6,l=t.data()),!v&&l.collapse&&Ft(!0);try{let t=f.collection("shared").doc(e),r=await f.runTransaction((async e=>{let n=await e.get(t);if(!n.exists)throw"Document does not exist";let r=n.data(),i=[];if(!r)return[];for(let e=r.playerUpdates.length-1;e>=0;e--){let t=r.playerUpdates[e];r.players.every(((e,n)=>n>=a||!e.hasOwnProperty("playerID")&&t.uidsDone.includes(r.host)||t.uidsDone.includes(e.playerID)))?r.playerUpdates.splice(e,1):t.uidsDone.includes(m)||(i.push(t),t.uidsDone.push(m))}return e.update(t,{playerUpdates:r.playerUpdates}),i}));for(let e of r)e.hasOwnProperty("field")?e.hasOwnProperty("diff")?(n(2,o[e.player][e.field]+=e.diff,o),o[e.player][e.field]<0&&n(2,o[e.player][e.field]=0,o)):e.hasOwnProperty("value")&&n(2,o[e.player][e.field]=e.value,o):n(2,o[e.player]=Qe(e.value)[0],o)}catch(e){console.log("Unable to update! "+e.message)}}))}function lt(e){return ut(e).filter((e=>"WINNER!"==e[0].winner)).length}function ut(e){let t=te.filter((t=>t[0].campaign&&t[0].campaignID==e.campaignID&&at(t)!=at(o))).sort(((e,t)=>e[0].date-t[0].date));return t.forEach((e=>e.sort(((e,t)=>e.bot?1:-1)))),t}function dt(e){return ut(e).filter((e=>""==e[0].winner)).length}function pt(e){b.contains(e.target)||ht()}function ht(){y&&(isNaN(o[y.player][y.token])&&n(2,o[y.player][y.token]=0,o),n(2,o[y.player][y.token]=parseInt(o[y.player][y.token]),o)),n(31,y=void 0),n(33,b=void 0),document.removeEventListener("click",pt)}async function ft(e,t,r){await tick(),n(31,y={player:e,token:t}),n(33,b=r),await tick();let i=r.getElementsByTagName("input")[0];i&&(i.style.width=b.clientWidth+"px",i.select(),i.addEventListener("keyup",(e=>{13==e.keyCode&&ht()}))),document.addEventListener("click",pt)}function mt(e,t,r){o[e][t.key].splice(r,1),n(2,o)}function gt(){n(53,we=null)}function yt(e){let t=10;return e.botLevel>=3&&(t=5),Math.floor((resAll(e)+popAll(e)+5*tradeAll(e))/t)}function bt(){return o.filter(((e,t)=>t<a))}function vt(e){let t=0;if(pe){if(e.extras)for(let t of e.extras)t.location||"Extra-State"==t.area||(t.location="play"),"Extra-State"!=t.area&&"State"!=t.area||delete t.location;e.cards.forEach((e=>{e.contributedTo=[]})),e.cards.forEach((e=>getContribsCard(e,o))),e.hasOwnProperty("extraChoices")&&(e.cards=e.cards.filter((t=>!e.extraChoices.some((e=>e.id==t.id)))),e.cards.some((e=>"No card"==e.name))&&(e.cards=e.cards.filter((e=>"No card"!=e.name))),e.cards=[...e.cards,...e.extras.filter((e=>"No card"!=e.name))])}if(e.bot)t=pe?proAll(e)+yt(e)+e.cards.reduce(((e,t)=>e+scoreCard(t,bt())),0):e.pro+yt(e)+sum(e,"optCards")+5*e.starCount+sum(e,"numCards")-2*e.unrest;else if(pe){if(t=proAll(e)+e.cards.reduce(((e,t)=>e+scoreCard(t,bt())),0),"Cultists"==e.civ.name&&e.summonedState&&!e.cards.some((t=>t.name==e.summonedState))&&(t+=scoreCard(e.summonedState,bt())),e.cards.some((e=>specialScoringRules.hasOwnProperty(e.id)))){let n=e.cards.filter((e=>specialScoringRules.hasOwnProperty(e.id)));e.alreadyScored=[];for(let r of n)e.alreadyScored.includes(r.id)||(t=specialScoringRules[r.id](e,t,o)),e.alreadyScored.push(r.i
1490d)}}else t=e.pro+sum(e,"optCards")+sum(e,"starCards")+sum(e,"numCards")-2*e.unrest;return t}function At(e){let t=-1/0,n=[],r=1/0,i=[];if(e&&0!=e.length){for(let o=0;o<a;o++){let a=e[o];if(a.score=vt(a),a.winner="",v){if(a.collapse=!0,a.fullScore&&a.cards.some((e=>"Unrest"==e.name))){let e=a.cards.filter((e=>e.icons&&e.icons.includes("unrest"))),t=0;for(let n of e)t+=n.icons.filter((e=>"unrest"==e)).length;a.unrest=t}a.unrest<r?(r=a.unrest,i=[a]):a.unrest==r&&i.push(a)}else a.collapse=!1;a.score>t?(t=a.score,n=[a]):a.score==t&&n.length>0&&n.push(a)}if(v){let r=!1;if(e.some(((e,t)=>t<a&&e.cards&&e.cards.some((e=>collapseRules.hasOwnProperty(e.id)))))){for(let t of e.filter(((e,t)=>t<a&&e.cards&&e.cards.some((e=>collapseRules.hasOwnProperty(e.id))))))for(let n of t.cards.filter((e=>collapseRules.hasOwnProperty(e.id))))collapseRules[n.id](e.filter(((e,t)=>t<a)),t)&&(r=!0);r&&(n=[])}if(!r)if(e.some(((e,t)=>t<a&&e.bot))&&e.some(((e,t)=>t<a&&!e.bot))){for(let t of e.filter(((e,t)=>t<a&&!e.bot)))t.nonCollapseScore=t.score;e.find(((e,t)=>t<a&&e.bot)).winner="WINNER!",n=[]}else if(1==i.length){console.log("Min unrest",i),i[0].winner="WINNER!",n=[];for(let t of e.filter(((e,t)=>t<a&&!i.includes(e))))t.nonCollapseScore=t.score}else{t=-1/0,n=[];for(let r of e.filter(((e,t)=>t<a)))i.includes(r)?r.score>t?(t=r.score,n=[r]):r.score==t&&n.length>0&&n.push(r):r.nonCollapseScore=r.score}}if(1==n.length)n[0].winner="WINNER!";else if(1==n.filter((e=>e.bot)).length)n.find((e=>e.bot)).winner="WINNER!";else if(n.length>1)for(let e of n)e.winner="DRAW!"}}function _t(e){let t={players:[],uid:m,campaignGame:!1,replaceCards:_,numPlayers:e.length};(l||o.some(((e,t)=>t<a&&e.playerID&&e.playerID!=m)))&&(t.multiplayerGame=!0,l&&l.host?t.host=l.host:t.host=m,t.playerIDs=o.filter(((e,t)=>t<a)).reduce(((e,t)=>t.playerID&&!e.includes(t.playerID)?[...e,t.playerID]:e),[t.host]));for(let n of e){let e=Object.assign({},n);delete e.name,t.players.push(e),n.campaign&&(t.campaignGame=!0)}return t=JSON.parse(JSON.stringify(t)),t.key=it(e),t=fixNests(t,"score"),t}async function xt(){if($){await Ve();for(let e of te)if(1!=e.length&&(!e[0].hasOwnProperty("uploaded")||e[0].hasOwnProperty("origKey")&&e[0].canEdit)){if(e[0].hasOwnProperty("origKey"))if(e[0].hasOwnProperty("uploaded")){console.log("deleting previous game: "+e[0].origKey);try{await f.collection("scores").doc(e[0].origKey).delete(),console.log("deleted"),delete e[0].origKey}catch(e){console.log("Unable to delete previous game: "+e.message)}}else delete e[0].origKey;let t=_t(e);t.editDate=Date.now(),f&&f.collection("scores").doc(t.key).set(t).then((n=>{console.log("Uploaded highscore "+t.key),e[0].uploaded=!0,setLS("scores",JSON.stringify(te)),setLS("campaigns",JSON.stringify(Y))})).catch((e=>console.log("Unable to upload highscores: "+e.message)))}for(let e of Y)if(!(0==ut(e).length||e.hasOwnProperty("uploaded")&&e.uploaded)){let t=Object.assign({},e);delete t.name;let n=kt(t);t.key=n;let r=[];for(let e of ut(t))r.push(it(e));t.games=r,t.editDate=Date.now(),f.collection("campaigns").doc(n).set(t).then((t=>{console.log("Uploaded campaigns"),e.finished&&(e.uploaded=!0)})).catch((e=>console.log("Unable to upload campaigns: "+e.message)))}}}function kt(e){return e.key?e.key:e.civ.name+"-"+ut(e)[0][0].date+"-"+ut(e)[0][0].score}function wt(e){let t=[];for(let n of e){let e=Object.assign({},n);e.score=scoreCard(n,bt()),delete e.contributors,t.push(e)}return t}function Tt(e){return!(!O||!de)||!confirm(e)}function St(e=!1){let t=[],r=Date.now(),i=1/0,s="",c=!1;for(let e=0;e<a;e++)o[e].score<i&&(i=o[e].score,s=o[e].civ.name),o[e].bot&&0==o[e].pop&&0==o[e].pro&&0==o[e].res&&(c=!0);if(i<20&&!v&&Tt(l$1("This game had a surprisingly low final score of $0 by the $1. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved or uploaded to the community database.)",i,s)))O=!0;else if(c&&!v&&Tt(l$1("The bot ended this game with no tokens whatsoever, which is pretty unusual. Are you sure you want to save it? (If it was a test game or just trying out the app, press 'Cancel' and it won't be saved.)")))O=!0;else{if(se){"cardAdded"==ue&&n(2,o[0].cardRemoved="",o),"cardRemoved"==ue&&n(2,o[0].cardAdded="",o),console.log(o[0]);for(let e of o)e.campaign=!0,e.campaignID=Q.campaignID;Q.finished&&n(16,Q=null)}for(let e=0;e<a;e++){o[e].date||n(2,o[e].date=r,o);let i=Object.assign({},o[e]);pe&&(i.cards=wt(o[e].cards),addCardTypes(i)),i.playerID?(i.playerUID=i.playerID,delete i.playerID):l?i.playerUID=l.host:o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID")))&&(i.playerUID=m),t.push(i)}if(te.some((e=>at(e)==at(o)))){let e=te.findIndex((e=>at(e)==at(o)));n(46,te[e]=t,te)}else te.push(t);setLS("scores",JSON.stringify(te)),setLS("campaigns",JSON.stringify(Y)),(he||e)&&xt(),n(55,Pe=!0),deleteSave(),se&&Ye()}}function Ct(e){return te.filter((t=>t[0].campaign&&t[0].campaignID==e.campaignID&&at(t)!=at(o)&&""!=t.cardRemoved)).map((e=>e[0].cardRemoved))}function It(e,t){if("Unrest"==t.name)return!0;
1490if(t.deck==e.civ.name&&"Starter"==t.area)return Ct(e).filter((e=>e==t.name)).length<t.count;if("Commons"!=t.deck)return!1;let n=function(e){return te.filter((t=>t[0].campaign&&t[0].campaignID==e.campaignID&&at(t)!=at(o)&&""!=t.cardAdded)).map((e=>e[0].cardAdded))}(e),r=Ct(e);return n.filter((e=>e==t.name)).length>r.filter((e=>e==t.name)).length}function Nt(e){let t=Y.find((t=>t.campaignID==e));if(!t){let r=te.filter((t=>t[0].campaign&&t[0].campaignID==e)).sort(((e,t)=>e[0].date-t[0].date));if(0==r.length)return console.log("Unable to find campaign and games for campaign "+e),{games:[]};t={name:r[0].name,civ:r[0].civ,campaignID:e,games:r,finished:!1},lt(t)>=5&&(t.finished="victory"),dt(t)>=4&&(t.finished="defeat"),n(15,Y=[...Y,t]),console.log("Reconstructed lost campaign")}return t}function Et(e,t){usingTradeRoutes(j)?(e.trade=t,e.pro=0):(e.pro=t,e.trade=0)}function Pt(){console.log(ce),"single"==ce?(n(14,se=!1),n(6,l=void 0),d&&d()):"campaign"==ce?(n(14,se=!0),n(6,l=void 0),d&&d()):"shared"==ce&&(n(14,se=!1),n(25,N="")),Ye()}async function $t(e=!0){!function(){if(o.filter(((e,t)=>t<a)).some((e=>e.civ&&D.includes(e.civ.name)))){let e=B.find((e=>"traderoute"==e.value));return!e||(G||n(10,G=[]),G.includes(e)||n(10,G=[e]),!0)}}();let t=F,r=[];for(let e=0;e<a;e++){let t=s.find((t=>t.deck==o[e].civ.name));t?r.push(t.box[0]):(console.log(s,allCards),console.log("Can't find civ for "+o[e].civ.name,s.find((t=>t.deck==o[e].civ.name))))}if(0!=r.length){if(r.reduce(((e,t)=>t==e&&t))){let i=U[U.findIndex((e=>e.value==r[0]))];n(13,F=[i]),z.find((e=>e.value==i.value)),!t.includes(i)&&e&&u&&flash(u)}n(35,q=W())}}function Rt(e){let t;return t=e?e.civ:o[0].civ,Ie.filter((e=>e.name!=t.name&&(!Q||!ut(Q).some((t=>t[1].civ.name==e.name&&"WINNER!"==t[0].winner)))))}function Ot(e){let t=Ie.filter((t=>!o.some(((n,r)=>r<a&&n!=e&&n.civ==t))));return usingTradeRoutes(j)||(t=t.filter((e=>!D.includes(e.name)))),t}function Mt(){n(47,me=Rt(Q)),n(2,o[1].civ=me[0],o),$t()}function Dt(e){Ot(e).includes(e.civ)||(o.find((t=>t!=e&&t.civ==e.civ)).civ=Ot(e)[0]),n(2,o),$t()}async function Lt(e){confirm("Take control of "+o[e].name+" ("+o[e].civ.name+")?")&&(n(2,o[e].playerID=m,o),l&&n(6,l.players[e].playerID=m,l),await tt({uidsDone:[],player:e,field:"playerID",value:m}))}function Ut(e,t){let n=[];n=e.bot?t.map((e=>({civ:e,times:te.reduce(((t,n)=>t+n.filter((t=>t.bot&&t.civ.name==e.name)).length),0)}))):t.map((t=>({civ:t,times:te.reduce(((n,r)=>n+r.filter((n=>n.name==e.name&&n.civ.name==t.name)).length),0)})));let r=Math.min(...n.map((e=>e.times)));return n=n.filter((e=>e.times==r)),n.map((e=>e.civ))}function Bt(e,t=notCurrentCiv,n=Ie){let r=t(e,n),i=6;for(;i--;)setTimeout((()=>Gt(e,r,se,!1)),100*(7-i));setTimeout((()=>Gt(e,r,se,!0)),700)}async function Gt(e,t,r,i){if(r)e.civ=t[Math.floor(Math.random()*t.length)];else if(e.civ=t[Math.floor(Math.random()*t.length)],i)for(let t of o)t!=e&&Dt(e);n(2,o),await tick()}function jt(){if(!we)return;let e=-1;for(let[t,n]of te.entries()){for(let r of n)if(JSON.stringify(r)==JSON.stringify(we)){e=t;break}if(-1!=e)break}if(-1!=e)return te[e];console.log("Unable to find game")}function Vt(e){let t=re;if(ie.hasOwnProperty(e.civ.name)&&(t=ie[e.civ.name]),e.cards&&e.cards.some((e=>canHaveTokens(e)))&&!t.some((e=>e.tokens))){let e={name:"with tokens",value:"tokens",tokens:!0,tally:0},n=t.findIndex((e=>"garrisoned"==e.value));t=-1!=n?[...t.slice(0,n),e,...t.slice(n)]:[...t,e]}return t}function Ft(e=!1){(e||confirm(l$1("Are you sure you want to trigger the end of the game through Collapse?")))&&(n(3,v=!0),n(0,i=a+2))}function zt(){if(Ne&&Ne.some((e=>"merchants"==e.value))?n(5,_=!0):n(10,G=[B[0]]),n(54,Ie=Ce.filter((e=>Ne&&Ne.some((t=>t.value==e.box))))),console.log("civs reset"),se)n(47,me=Rt(Q)),n(2,o[1].civ=me[0],o);else for(let e=0;e<o.length;e++)n(2,o[e].civ=Ie[e],o);$t()}Le(),L=l$1("Use photo..."),Ye(),zt(),function(){let e=possLS("gameInProgress",null);if(!e)return void Ke();try{if(e=JSON.parse(e),!confirm(l$1("Game left unfinished last time. Resume?")))return deleteSave(),void Ke()}catch(e){return void console.log("Unable to restore save")}let t=Qe(e.players);n(2,o=t),n(16,Q=e.currentCampaign),n(0,i=e.phase),n(14,se=e.campaign),n(15,Y=e.campaigns),n(1,a=e.numPlayers
1490),n(12,V=e.currentBoxes),n(18,pe=e.fullScore),n(17,de=e.autoSave),n(19,he=e.autoUpload),n(6,l=e.sharedGame),n(3,v=e.collapse),n(141,C=e.gameListed),e.expSelected&&n(10,G=e.expSelected);e.boxesSelected&&n(13,F=e.boxesSelected);if(l)try{ct()}catch(e){alert(l$1("Unable to restore shared game: it may have been deleted by host")),n(6,l=!1),Ye()}else if(o[0].shareKey)try{He(o[0].shareKey)}catch(e){alert(l$1("Unable to restore shared game: it may have been deleted")),Ye()}}();return e.$$.update=()=>{1024&e.$$.dirty[0]&&(G?(console.log(G),n(11,j=G.map((e=>e.value)))):(n(10,G=[]),n(11,j=[]))),2048&e.$$.dirty[0]&&console.log("exp",j),1048608&e.$$.dirty[0]&&(_||Ne&&Ne.some((e=>"merchants"==e.value))?n(23,w=[...k,"trade"]):n(23,w=[...k])),10240&e.$$.dirty[0]&&function(e,t){if(e?(n(12,V=e.map((e=>e.value))),n(35,q=W())):n(12,V=[]),!usingTradeRoutes(t))for(let e of o)if(D.includes(e.civ.name)){let t=Ot(e).filter((e=>!o.some(((t,n)=>n<a&&t.civ==e))));e.civ=t[0]}n(2,o)}(F,j),65540&e.$$.dirty[0]&&n(40,le=rt(Q,o[1].botLevel)),16&e.$$.dirty[0]&&function(e){n(21,s=updatePromos(s,e,Ie)),setLS("promos",e)}(A),32&e.$$.dirty[0]&&function(e){n(21,s=e?allCards:[...cards,...allCards.filter((e=>e.box.includes("merchants")))]),n(21,s=updatePromos(s,A,Ie)),setLS("replaceCards",e)}(_),524544&e.$$.dirty[0]&&$&&he&&xt(),1048576&e.$$.dirty[0]&&Ne&&setLS("boxes",Ne.map((e=>e.value)).join(",")),4&e.$$.dirty[0]&&At(o),2&e.$$.dirty[0]&&a>4&&n(1,a=4),2&e.$$.dirty[0]&&a<1&&n(1,a=1),1&e.$$.dirty[0]&&i>0&&n(34,L=l$1("Use photo...")),576&e.$$.dirty[0]&&l&&l.host==m&&n(6,l=void 0),193&e.$$.dirty[0]&&0==i&&l&&1==I&&st(),64&e.$$.dirty[0]&&l&&(n(12,V=l.currentBoxes),n(18,pe=l.fullScore),n(1,a=l.numPlayers)),1045583&e.$$.dirty[0]|131072&e.$$.dirty[4]&&i>0&&"Final results"!=Ze(i)&&saveGame(o,Q,Y,i,a,V,pe,de,he,se,l,v,C,F,G),70&e.$$.dirty[0]&&(l||o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID"))))&&o.filter(((e,t)=>t<a)).every((e=>e.scoringComplete))&&async function(){let e=l?l.key:o[0].shareKey,t=f.collection("shared").doc(e);console.log("Finalising game");let n=await f.runTransaction((async e=>{let n=await e.get(t);if(!n.exists)throw"Document does not exist";let r=Date.now();return n.data().endTime?(r=n.data().endTime,console.log("Game has already been logged as ended at"+r)):(console.log("Game ended at "+r),e.update(t,{endTime:r})),r}));o.forEach((e=>e.date=n)),de&&!Pe&&St()}(),16384&e.$$.dirty[0]&&n(41,J=se?"campaigns":"single"),64&e.$$.dirty[0]|131072&e.$$.dirty[4]&&(l||C?document.addEventListener("visibilitychange",Fe):document.removeEventListener("visibilitychange",Fe))},[i,a,o,v,A,_,l,I,$,m,G,j,V,F,se,Y,Q,de,pe,he,Ne,s,r,w,T,N,E,P,u,g,R,y,M,b,L,q,oe,H,K,ce,le,J,Z,ue,X,ee,te,me,ge,ye,be,Ae,ke,we,Ie,Pe,Oe,c,D,U,B,W,ae,undefined,fe,ve,_e,xe,function(){!async function(){if("serviceWorker"in navigator&&(Re=await navigator.serviceWorker.register("/service-worker.js"),console.log("Service worker registered.",Re),Re)){Re.waiting?De(Re):Re.active&&(navigator.serviceWorker.addEventListener("message",(e=>{console.log("message received from SW"),e.data.hasOwnProperty("type")&&"VERSION"===e.data.type&&n(32,M=e.data.val)})),console.log("active"),Re.active.postMessage("VERSION_CHECK")),Re.addEventListener("updatefound",(()=>{console.log("found update"),Re.installing&&Re.installing.addEventListener("statechange",(()=>{Re.waiting&&(navigator.serviceWorker.controller?De(Re):console.log("Service Worker initialized for the first time"))}))}));let e=!1;navigator.serviceWorker.addEventListener("controllerchange",(()=>{e||(window.location.reload(),e=!0)}))}}()},function(){Le(),location.reload()},Ue,Ve,async function(){n(27,P=[]);let e=await f.collection("shared").get();return d=f.collection("shared").onSnapshot((e=>{We(e)})),We(e),P},ze,function(e){if(i>0&&!Pe)return saveGame(o,Q,Y,i,a,V,pe,de,he,se,l,v,C,F,G),e.preventDefault(),e.returnValue=l$1("Game in progress. Really quit?")},qe,function(e,t){return 0==ut(e).length?1:0==ut(t).length?-1:ut(t)[ut(t).length-1][0].date-ut(e)[ut(e).length-1][0].date},Ze,function(){n(52,ke++,ke),ke>=_e.length&&(n(52,ke=0),st())},Xe,et,async function e(){if((Ze(i).endsWith("results")||v)&&n(55,Pe=!1),(1!=i||confirm(l$1("This will delete your game in progress. Do you really want to do this?")))&&(n(0,i--,i),n(52,ke=0),0==i&&(deleteSave(),Ke(),n(6,l=void 0),Pt()),0==i&&se&&(ut(Q)&&0!=ut(Q).length||(Y.splice(Y.findIndex((e=>e==Q)),1),n(16,Q=null)),Ye()),(l||o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID"))))&&i>1&&i-2<a)){let t=i-2;l&&o[t].playerID!=m||!l&&o[t].playerID&&o[t].playerID!=m?e():await tt({uidsDone:[],player:t,field:"scoringComplete",value:!1})}},nt,rt,function(e){return rt(e)?"Grand campaign":"Campaign"},ot,function(e){return e.replace(/^(.+) (.+) v (.+)$/,((e,t,n,r)=>`${t} ${l$1(n)} v ${l$1(r)}`))},st,function(){confirm(l$1("Game in progress. Really quit?"))&&(removeLS("gameInProgress"),v&&de&&!Pe&&!se&&St(),Ye())},lt,ut,dt,function(e){return ut(e).filter((e=>"DRAW!"==e[0].winner)).length},async function(e,t,r){r<0&&(r=0);let i=r-o[e][t];n(2,o[e][t]=r,o),n(2,o),(l||o.some(((e,t)=>t<a&&e.hasOwnProperty("playerID"))))&&await tt({uidsDone:[m],player:e,field:t,diff:i})},ht,function(e){y&&(n(2,o[y.player][y.token]=o[y.player][y.token].replace(/[^0-9]/g,""),o),n(2,o[y.player][y.token]=parseInt(o[y.player][y.token]),o),isNaN(o[y.player][y.token])&&n(2,o[y.player][y.token]=0,o)),13==e.keyPress&&ht(
1490)},ft,mt,function(e,t,r){o[e][t.key].push(r),n(2,o)},function(e){n(53,we=e)},gt,function(){if(confirm("Really delete the record of this game?")){let e=-1;for(let[t,n]of te.entries()){for(let r of n)if(JSON.stringify(r)==JSON.stringify(we)){e=t;break}if(-1!=e)break}if(-1==e)return void console.log("Unable to find score");let t=te[e];if(-1!=e&&te.splice(e,1),n(46,te),t[0].campaign){let e=t[0].campaignID,r=Y.findIndex((t=>t.campaignID==e));if(-1!=r){let e=Y[r];lt(e)<5&&(e.finished=!1),dt(e)<4&&(e.finished=!1),0==ut(e).length&&(console.log("Deleting campaign as no games left"),Q==e&&n(16,Q=null),Y.splice(r,1))}else console.log("Error: can't find campaign to delete!");n(15,Y),setLS("campaigns",JSON.stringify(Y))}setLS("scores",JSON.stringify(te))}gt()},function(e){return e.campaign?ut(Nt(e.campaignID)).sort(((e,t)=>e[0].date-t[0].date)).findIndex((t=>t.some((t=>JSON.stringify(t)==JSON.stringify(e)))))+1:0},function(e){return e.campaign?ut(Nt(e.campaignID)).filter((e=>e&&"WINNER!"==e[0].winner)).findIndex((t=>t.some((t=>JSON.stringify(t)==JSON.stringify(e)))))+1:0},function(e){return e.campaign?ut(Nt(e.campaignID)).filter((e=>"WINNER!"==e[1].winner)).findIndex((t=>t.some((t=>JSON.stringify(t)==JSON.stringify(e)))))+1:0},function(e,t){return"pad"==t.type?e[t.key].reduce(((e,t)=>e+t),0)+" ("+l$1(t.label,e[t.key])+possList(e[t.key])+")":t.scoreVal?e[t.key]*t.scoreVal+" ("+l$1(t.label,e[t.key])+")":e[t.key]+" "+l$1(t.label)},yt,bt,xt,St,function(){n(53,we=null),n(0,i=-1)},function(){n(0,i=0)},It,Nt,async function(){if(navigator.clipboard)try{await navigator.clipboard.writeText(JSON.stringify({highscores:te,campaigns:Y})),n(44,X=l$1("Scores copied to clipboard"))}catch(e){prompt(l$1("Unable to copy to clipboard: $0. You can copy the data manually from the textbox below.",e.message),JSON.stringify(te))}else prompt(l$1("Unable to copy to clipboard. You can copy the data manually from the textbox below."),JSON.stringify(te))},function(){confirm(l$1("Really delete all record of previous scores?"))&&(n(46,te=[]),n(15,Y=[]),setLS("scores",JSON.stringify(te)),setLS("campaigns",JSON.stringify(Y)),n(44,X=l$1("Scores deleted")))},async function(){let e,t;try{e=await navigator.clipboard.readText()}catch(t){if(e=prompt(l$1("Unable to read from clipboard (perhaps permission was denied?). Make sure you are accessing this page through https rather than http. You can manually paste the clipboard below to import."),""),!e||""==e)return}try{t=JSON.parse(e)}catch(e){return void alert(l$1("Problem parsing data: $0",e.message))}if(t.hasOwnProperty("highscores")){let e=[];for(let n of t.campaigns)e.some((e=>e==n.campaignID))?console.log("Coincident IDs! Shouldn't happen..."):e.push(n.campaignID);for(let n of e){ne++,setLS("campaignCounter",ne.toString());let e=ne;for(let r of t.campaigns.filter((e=>e.campaignID==n)))console.log("setting campaign to ID ",ne),r.campaignID=e;for(let r of t.highscores.filter((e=>e[0].campaign&&e[0].campaignID==n)))for(let t of r)t.campaignID=e}for(let e of t.highscores)te.push(e);for(let e of t.campaigns)Y.push(e);setLS("scores",JSON.stringify(te)),setLS("campaigns",JSON.stringify(Y)),n(46,te),n(15,Y)}else{for(let e of t)te.push(e);n(46,te),setLS("scores",JSON.stringify(te))}n(44,X="Scores imported from clipboard")},function(){let e=ae.find((e=>e.name==o[0].trigger));if(!e.hasOwnProperty("needsCiv"))return;let t=e.needsCiv;n(2,o[0].triggeringPlayer=o.filter(((e,t)=>t<a)).findIndex((e=>e.civ.name==t)),o)},function(){n(44,X=""),n(37,H=!0)},function(){n(37,H=!1)},Pt,function(){n(42,Z={numGames:te.length,top:{score:-1/0,civ:"None",player:"No-one",game:null},bottom:{score:1/0,civ:"None",player:"No-one",game:null},players:[],currentPlayer:0});for(let e of te)for(let t of e)if(e[0].fullScore&&(console.log("adding types"),addCardTypes(t)),t.score>Z.top.score&&(n(42,Z.top.score=t.score,Z),n(42,Z.top.civ=t.civ,Z),n(42,Z.top.player=t.name,Z),n(42,Z.top.game=e,Z)),t.score<Z.bottom.score&&(n(42,Z.bottom.score=t.score,Z),n(42,Z.bottom.civ=t.civ,Z),n(42,Z.bottom.player=t.name,Z),n(42,Z.bottom.game=e,Z)),!Z.players.some((e=>
1490e.name==t.name))&&(!t.bot||showBotStats)){let e=t.name;Z.players.push({name:e,bot:t.bot})}n(42,Z.players=Z.players.sort(((e,t)=>e.bot&&!t.bot?1:t.bot&&!e.bot?-1:e.name.localeCompare(t.name))),Z);for(let e of Z.players){let t=te.filter((t=>t.some((t=>t.name==e.name))));e.winTally=0,e.drawTally=0,e.lossTally=0,e.topScore=-1/0,e.topCiv="",e.bottomScore=1/0,e.bottomCiv="",e.numGames=t.length;let n=0;for(let r of t){let t=r.find((t=>t.name==e.name));n+=t.score,"WINNER!"==t.winner?e.winTally++:"DRAW!"==t.winner?e.drawTally++:e.lossTally++,t.score>e.topScore&&(e.topScore=t.score,e.topCiv=t.civ.name),t.score<e.bottomScore&&(e.bottomScore=t.score,e.bottomCiv=t.civ.name)}e.avgScore=Math.round(n/e.numGames*100)/100}n(38,K=!0)},function(){n(38,K=!1)},function(e){return!!o.filter(((e,t)=>t<a)).some((t=>t.civ.name==e))},$t,function(e){let t=0;if(!e.bot)for(let n of e.cards.filter((e=>e.area.startsWith("Power"))))t+=scoreCard(n,bt());if(e.hasOwnProperty("extras"))for(let n of e.extras)t+=scoreCard(n,bt());return"Cultists"==e.civ.name&&e.summonedState&&(t+=scoreCard(e.summonedState,bt())),t},Rt,async function(){n(2,o[0].civ=Q?Q.civ:Ie[0],o),n(2,o[1].botLevel=nt(Q),o),Mt()},Mt,Dt,Lt,Ut,Bt,function(){let e=jt();if(!e)return;let t=new URLSearchParams;t.set("game",it(e));let n="?"+t.toString();window.open("https://imperiumstats.surge.sh"+n,"_blank")},async function(){n(29,g=prompt(l$1("Enter a publicly-visible username to associate with this device (or leave blank to delete)")+":",g||""));try{""==g||null==g?(n(29,g=void 0),await f.collection("usernames").doc(m).delete()):await f.collection("usernames").doc(m).set({name:g})}catch(e){console.log("Unable to alter username: "+e.message)}},function(){let e=jt();if(e){console.log(e),n(2,o=Qe(e)),n(18,pe=o[0].fullScore),n(14,se=o[0].campaign),se&&(console.log("campaign"),n(16,Q=Y.find((e=>e.campaignID==o[0].campaignID))),Q||console.log("Help! Cannot find campaign")),n(6,l=!1);for(let e of o)e.playerID&&delete e.playerID;o[0].hasOwnProperty("origKey")||n(2,o[0].origKey=it(o),o),n(0,i=2)}},Vt,Ft,function(){l?o.filter(((e,t)=>t<a&&e.playerID==m)).forEach((e=>{e.scoringComplete=!1})):o.some(((e,t)=>t<a&&e.playerID&&e.playerID!=m))&&o.filter(((e,t)=>t<a&&!e.playerID||e.playerID==m)).forEach((e=>{e.scoringComplete=!1})),n(0,i=1),st()},function(e){let t=!1;switch(e){case 0:t=l$1("This bot has a hand size of 4 (place an exhaust token on slot 5).");break;case 1:t=l$1("This bot has a hand size of 4 (place an exhaust token on slot 5).")+l$1("At the end of each bot turn, after refilling the bot's hand, place the top card of the bot deck in the discard.");break;case 3:t=l$1("This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.");break;case 4:t=l$1("This bot has a hand size of 6 (add slot marker 6).")+l$1("This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.");break;case 5:t=l$1("This bot has a hand size of 6 (add slot marker 6).")+l$1("This bot starts with the same progress, population and resource tokens as the human player{0,s}, and scores a VP for every 5 population and material tokens.")+l$1("Whenever the bot returns an Unrest card it gains 1 progress.")}return t?l$1("Note")+": "+t:""},zt,C,(e,t)=>t<a,e=>e.civ&&D.includes(e.civ.name),(e,t)=>t<a&&e.hasOwnProperty("playerID"),(e,t)=>t<a,(e,t)=>t<a&&e.bot,function(){n(8,$=navigator_1.onLine)},function(){Ae=select_value(this),n(51,Ae)},function(){o[i-2].botLevel=select_value(this),n(2,o),n(0,i)},function(){be=select_value(this),n(50,be)},function(){ce=select_value(this),n(39,ce)},function(e){Ne=e,n(20,Ne)},e=>zt(),function(){_=this.checked,n(5,_)},function(){A=this.checked,n(4,A)},function(){a=select_value(this),n(1,a),n(6,l),n(9,m)},e=>{n(35,q=W())},function(e,t){e[t].name=this.value,n(2,o)},function(e,t){e[t].civ=select_value(this),n(2,o)},(e,t)=>Dt(e),(e,t)=>Bt(e),(e,t)=>
1490Bt(e,Ut),(e,t,r,i)=>{n(2,t[r].power="A",o)},(e,t,r,i)=>{n(2,t[r].power="B",o)},function(e,t){e[t].bot=this.checked,n(2,o)},function(e,t){e[t].botLevel=select_value(this),n(2,o)},function(){l=select_value(this),n(6,l),n(9,m),n(27,P)},function(){E=select_value(this),n(26,E)},e=>qe(l,E),function(){Q=select_value(this),n(16,Q),n(48,ge)},function(){o[0].name=this.value,n(2,o)},function(){o[0].civ=select_value(this),n(2,o)},e=>Bt(o[0]),e=>Bt(o[0],Ut),function(){o[1].civ=select_value(this),n(2,o)},e=>Bt(o[1],notCurrentCiv,Rt()),e=>Bt(o[1],Ut,Rt()),function(){o[1].botLevel=select_value(this),n(2,o)},function(){pe=select_value(this),n(18,pe),n(6,l),n(9,m)},e=>{setLS("fullScore",pe)},function(e){F=e,n(13,F)},e=>{n(10,G=[B.find((e=>"traderoute"==e.value))])},e=>{F.some((e=>"merchants"==e.value))?n(10,G=[B.find((e=>"blood"==e.value))]):n(10,G=[]),console.log(G,usingTradeRoutes(j))},function(e){binding_callbacks[e?"unshift":"push"]((()=>{u=e,n(28,u)}))},(e,t)=>t<a,e=>e.civ&&D.includes(e.civ.name),function(){de=this.checked,n(17,de)},e=>{setLS("autoSave",de)},function(){he=this.checked,n(19,he)},e=>{setLS("autoUpload",he),he&&xt()},(e,t)=>Lt(e),(e,t)=>{n(24,T[e]=!T[e],T)},function(e,t,r){t[r][e]=this.value,n(2,o),n(23,w),n(5,_),n(20,Ne),n(285,k)},e=>{13==e.keyPress&&ht()},(e,t,n)=>{b!=n.target&&ft(e,t,n.target)},e=>{n(36,oe="power")},(e,t)=>e+w.reduce(((e,n)=>t[n]?e+parseInt(t[n]):e),0),(e,t)=>void 0!==t.pro&&doTokensCountFor(o[i-2])?e+parseInt(t.pro):e,(e,t)=>t.location==e.value,(e,t)=>t.location==e.value,(e,t)=>t.location==e.value,(e,t)=>e+scoreCard(t,bt()),(e,t)=>{et(e)},e=>{n(36,oe="tokens")},e=>{n(36,oe="notes")},(e,t)=>{Xe(e)},e=>{n(2,o[i-2].cards[0]=s.find((e=>e.name==o[i-2].civ.name&&"PowerA"==e.area)),o),n(2,o[i-2].power="A",o)},e=>{n(2,o[i-2].cards[0]=s.find((e=>e.name==o[i-2].civ.name&&"PowerB"==e.area)),o),n(2,o[i-2].power="B",o)},e=>e.area.startsWith("Power")&&e.name.startsWith("Merchant")&&e.playerNum==i-2,function(t){e.$$.not_equal(o[i-2].cards[1],t)&&(o[i-2].cards[1]=t,n(2,o))},function(t){e.$$.not_equal(o[i-2].extras[0],t)&&(o[i-2].extras[0]=t,n(2,o))},function(t){e.$$.not_equal(o[i-2].extras[0],t)&&(o[i-2].extras[0]=t,n(2,o))},function(t){e.$$.not_equal(o[i-2].summonedState,t)&&(o[i-2].summonedState=t,n(2,o))},function(t){e.$$.not_equal(o[i-2].summonedState,t)&&(o[i-2].summonedState=t,n(2,o))},function(){o[i-2].extras[0].location=select_value(this),n(2,o),n(0,i)},function(e){o[i-2][e]=this.value,n(2,o),n(0,i),n(23,w),n(5,_),n(20,Ne),n(285,k)},e=>{13==e.keyPress&&ht()},(e,t)=>{b!=t.target&&ft(i-2,e,t.target)},function(){o[i-2].general=this.value,n(2,o),n(0,i)},function(){o[0].trigger=select_value(this),n(2,o)},(e,t)=>t<a,function(){o[0].triggeringPlayer=select_value(this),n(2,o)},function(){o[i-2].notes.bigCards=this.value,n(2,o),n(0,i)},function(e){binding_callbacks[e?"unshift":"push"]((()=>{Oe=e,n(56,Oe)}))},e=>Ue(i-2,Vt(o[i-2])[oe].value),function(e){F=e,n(13,F)},function(e){binding_callbacks[e?"unshift":"push"]((()=>{Oe=e,n(56,Oe)}))},e=>Ue(i-2,Vt(o[i-2])[oe].value),function(e){ye=e,n(49,ye)},function(e){o=e,n(2,o)},function(){o[i-2].general=this.value,n(2,o),n(0,i)},function(){o[0].trigger=select_value(this),n(2,o)},(e,t)=>t<a,function(){o[0].triggeringPlayer=select_value(this),n(2,o)},function(){o[i-2].notes.bigCards=this.value,n(2,o),n(0,i)},(e,t)=>{mt(i-2,_e[ke],e)},function(){o[i-2][_e[ke].key]=this.value,n(2,o),n(0,i),n(66,_e),n(52,ke)},e=>{13==e.keyPress&&ht()},e=>{b!=e.target&&ft(i-2,_e[ke].key,e.target)},function(e){o[i-2][e]=this.value,n(2,o),n(0,i),n(23,w),n(5,_),n(20,Ne),n(285,k)},e=>{13==e.keyPress&&ht()},(e,t)=>{b!=t.target&&ft(i-2,e,t.target)},function(e){binding_callbacks[e?"unshift":"push"]((()=>{Oe=e,n(56,Oe)}))},e=>Ue(i-2,"deck"),function(e){o=e,n(2,o)},(e,t)=>{Xe(e)},function(){o[i-2].general=this.value,n(2,o),n(0,i)},function(){o[0].trigger=select_value(this),n(2,o)},(e,t)=>t<a,function(){o[0].triggeringPlayer=select_value(this),n(2,o)},function(){o[i-2].notes.bigCards=this.value,n(2,o),n(0,i)},(e,t)=>{mt(i-2,xe[ke],e)},function(){o[i-2][xe[ke].key]=this.value,n(2,o),n(0,i),n(67,xe),n(52,ke)},e=>
1490{13==e.keyPress&&ht()},e=>{b!=e.target&&ft(i-2,xe[ke].key,e.target)},function(){J=select_value(this),n(41,J),n(14,se)},function(){ee=this.checked,n(45,ee)},function(){Z.currentPlayer=select_value(this),n(42,Z)},function(){ue=select_value(this),n(43,ue)},e=>"Commons"==e.deck&&o[0].cards.some((t=>t.id==e.id))&&!It(Q,e),e=>It(Q,e),function(e){o=e,n(2,o)},function(t){e.$$.not_equal(o[0][ue],t)&&(o[0][ue]=t,n(2,o))},function(){o[0][ue]=this.value,n(2,o),n(43,ue)},function(e){o[e].unrest=this.value,n(2,o)},e=>{13==e.keyPress&&ht()},(e,t)=>{b!=t.target&&ft(e,"unrest",t.target)},e=>Ft(),e=>St(!0)]}class App extends SvelteComponent{constructor(e){super(),init(this,e,instance,create_fragment,safe_not_equal,{},[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}}const app=new App({target:document.body});return app}(); 1491//# sourceMappingURL=bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.