@flesh-and-blood/search 2.1.7 → 2.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Qr=Object.create;var ce=Object.defineProperty,Jr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptor,Xr=Object.getOwnPropertyDescriptors,qr=Object.getOwnPropertyNames,Tt=Object.getOwnPropertySymbols,ei=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable;var St=(e,t,r)=>t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y=(e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&St(e,r,t[r]);if(Tt)for(var r of Tt(t))ti.call(t,r)&&St(e,r,t[r]);return e},ue=(e,t)=>Jr(e,Xr(t));var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ri=(e,t)=>{for(var r in t)ce(e,r,{get:t[r],enumerable:!0})},Pt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qr(t))!xt.call(e,n)&&n!==r&&ce(e,n,{get:()=>t[n],enumerable:!(i=Zr(t,n))||i.enumerable});return e};var W=(e,t,r)=>(r=e!=null?Qr(ei(e)):{},Pt(t||!e||!e.__esModule?ce(r,"default",{value:e,enumerable:!0}):r,e)),ii=e=>Pt(ce({},"__esModule",{value:!0}),e);var j=Bt((to,Qt)=>{var me=Object.defineProperty,ni=Object.defineProperties,ai=Object.getOwnPropertyDescriptor,oi=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertyNames,wt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable,Lt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ci=(e,t)=>{for(var r in t||(t={}))Dt.call(t,r)&&Lt(e,r,t[r]);if(wt)for(var r of wt(t))li.call(t,r)&&Lt(e,r,t[r]);return e},ui=(e,t)=>ni(e,oi(t)),di=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},pi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of si(t))!Dt.call(e,n)&&n!==r&&me(e,n,{get:()=>t[n],enumerable:!(i=ai(t,n))||i.enumerable});return e},hi=e=>pi(me({},"__esModule",{value:!0}),e),Rt={};di(Rt,{Class:()=>_t,Foiling:()=>It,Format:()=>Ot,Fusion:()=>zt,Hero:()=>Kt,Keyword:()=>Ut,Rarity:()=>Nt,Release:()=>Ht,ReleaseEdition:()=>$t,Subtype:()=>Gt,Talent:()=>Wt,Treatment:()=>Et,Type:()=>jt,fullSetIdentifiers:()=>Yt,getPrint:()=>gi,setIdentifierToSetMappings:()=>Vt,setToSetIdentifierMappings:()=>mi});Qt.exports=hi(Rt);var It=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(It||{}),Et=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.EA="Extended Art",e.FA="Full Art",e))(Et||{}),_t=(e=>(e.NotClassed="NotClassed",e.Generic="Generic",e.Adjudicator="Adjudicator",e.Assassin="Assassin",e.Bard="Bard",e.Brute="Brute",e.Guardian="Guardian",e.Illusionist="Illusionist",e.Mechanologist="Mechanologist",e.Merchant="Merchant",e.Ninja="Ninja",e.Ranger="Ranger",e.Runeblade="Runeblade",e.Shapeshifter="Shapeshifter",e.Warrior="Warrior",e.Wizard="Wizard",e))(_t||{}),Ot=(e=>(e.Blitz="Blitz",e.BlitzLivingLegend="Blitz (Living Legend)",e.Clash="Clash",e.ClassicConstructed="Classic Constructed",e.ClassicConstructedLivingLegend="Classic Constructed (Living Legend)",e.Commoner="Commoner",e.Draft="Draft",e.Open="Open",e.Sealed="Sealed",e.UltimatePitFight="Ultimate Pit Fight",e))(Ot||{}),zt=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(zt||{}),Nt=(e=>(e.Token="Token",e.Common="Common",e.Rare="Rare",e.SuperRare="Super Rare",e.Majestic="Majestic",e.Marvel="Marvel",e.Legendary="Legendary",e.Fabled="Fabled",e.Promo="Promo",e))(Nt||{}),Ht=(e=>(e.ArcaneRising="Arcane Rising",e.BrightLights="Bright Lights",e.CrucibleOfWar="Crucible of War",e.DuskTillDawn="Dusk till Dawn",e.Dynasty="Dynasty",e.Everfest="Everfest",e.HeavyHitters="Heavy Hitters",e.HistoryPack1="History Pack 1",e.Monarch="Monarch",e.Outsiders="Outsiders",e.PartTheMistveil="Part the Mistveil",e.TalesOfAria="Tales of Aria",e.Uprising="Uprising",e.WelcomeToRathe="Welcome to Rathe",e.ArmoryDeckKayo="Armory Deck: Kayo",e.ArmoryDeckBoltyn="Armory Deck: Boltyn",e.ArakniBlitzDeck="Arakni Blitz Deck",e.AzaleaBlitzDeck="Azalea Blitz Deck",e.BenjiBlitzDeck="Benji Blitz Deck",e.BetsyBlitzDeck="Betsy Blitz Deck",e.BoltynBlitzDeck="Boltyn Blitz Deck",e.BriarBlitzDeck="Briar Blitz Deck",e.BravoBlitzDeck="Bravo Blitz Deck",e.ChaneBlitzDeck="Chane Blitz Deck",e.DromaiBlitzDeck="Dromai Blitz Deck",e.EnigmaBlitzDeck="Enigma Blitz Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.KassaiBlitzDeck="Kassai Blitz Deck",e.KatsuBlitzDeck="Katsu Blitz Deck",e.KayoBlitzDeck="Kayo Blitz Deck",e.LeviaBlitzDeck="Levia Blitz Deck",e.LexiBlitzDeck="Lexi Blitz Deck",e.NuuBlitzDeck="Nuu Blitz Deck",e.OldhimBlitzDeck="Oldhim Blitz Deck",e.OlympiaBlitzDeck="Olympia Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.ZenBlitzDeck="Zen Blitz Deck",e.DorintheaHeroDeck="Dorinthea Hero Deck",e.KatsuHeroDeck="Katsu Hero Deck",e.RhinarHeroDeck="Rhinar Hero Deck",e.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",e.IraWelcomeDeck="Ira Welcome Deck",e.RoundTheTable="Round the Table",e.Promos="Promos",e))(Ht||{}),$t=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))($t||{}),Wt=(e=>(e.Draconic="Draconic",e.Earth="Earth",e.Elemental="Elemental",e.Ice="Ice",e.Light="Light",e.Lightning="Lightning",e.Mystic="Mystic",e.Royal="Royal",e.Shadow="Shadow",e))(Wt||{}),jt=(e=>(e.Action="Action",e.AttackReaction="Attack Reaction",e.Block="Block",e.DefenseReaction="Defense Reaction",e.DemiHero="Demi-Hero",e.Equipment="Equipment",e.Hero="Hero",e.Instant="Instant",e.Mentor="Mentor",e.Resource="Resource",e.Token="Token",e.Weapon="Weapon",e))(jt||{}),Gt=(e=>(e.OneHanded="1H",e.TwoHanded="2H",e.Affliction="Affliction",e.Ally="Ally",e.Angel="Angel",e.Arms="Arms",e.Arrow="Arrow",e.Ash="Ash",e.Attack="Attack",e.Aura="Aura",e.Axe="Axe",e.Base="Base",e.Book="Book",e.Bow="Bow",e.Chest="Chest",e.Chi="Chi",e.Claw="Claw",e.Club="Club",e.Construct="Construct",e.Dagger="Dagger",e.Demon="Demon",e.Dragon="Dragon",e.Evo="Evo",e.Fiddle="Fiddle",e.Figment="Figment",e.Flail="Flail",e.Gem="Gem",e.Gun="Gun",e.Hammer="Hammer",e.Head="Head",e.Invocation="Invocation",e.Item="Item",e.Landmark="Landmark",e.Lute="Lute",e.Legs="Legs",e.NonAttack="Non-Attack",e.OffHand="Off-Hand",e.Orb="Orb",e.Pistol="Pistol",e.Quiver="Quiver",e.Rock="Rock",e.Shuriken="Shuriken",e.Scepter="Scepter",e.Scroll="Scroll",e.Scythe="Scythe",e.Song="Song",e.Staff="Staff",e.Sword="Sword",e.Trap="Trap",e.Wrench="Wrench",e.Young="Young",e))(Gt||{}),Kt=(e=>(e.Arakni="Arakni",e.Azalea="Azalea",e.Benji="Benji",e.Betsy="Betsy",e.Blaze="Blaze",e.Boltyn="Boltyn",e.Bravo="Bravo",e.Brevant="Brevant",e.Briar="Briar",e.Brutus="Brutus",e.Chane="Chane",e.Dash="Dash",e.DataDoll="Data Doll",e.Dorinthea="Dorinthea",e.Dromai="Dromai",e.Emperor="Emperor",e.Enigma="Enigma",e.Fai="Fai",e.GenisWotchuneed="Genis Wotchuneed",e.Ira="Ira",e.Iyslander="Iyslander",e.Kano="Kano",e.Kassai="Kassai",e.Katsu="Katsu",e.Kavdaen="Kavdaen",e.Kayo="Kayo",e.Levia="Levia",e.Lexi="Lexi",e.Maxx="Maxx",e.Melody="Melody",e.Nuu="Nuu",e.Oldhim="Oldhim",e.Olympia="Olympia",e.Prism="Prism",e.Rhinar="Rhinar",e.Riptide="Riptide",e.Ruudi="Ruu'di",e.Shiyana="Shiyana",e.Squizzy="Squizzy",e.Taipanis="Taipanis",e.Taylor="Taylor",e.Teklovossen="Teklovossen",e.Theryon="Theryon",e.Uzuri="Uzuri",e.Valda="Valda",e.Victor="Victor",e.Vynnset="Vynnset",e.Viserai="Viserai",e.Yorick="Yorick",e.Yoji="Yoji",e.Zen="Zen",e))(Kt||{}),Ut=(e=>(e.Ambush="Ambush",e.Amp="Amp",e.ArcaneBarrier="Arcane Barrier",e.Awaken="Awaken",e.Battleworn="Battleworn",e.BeatChest="Beat Chest",e.BladeBreak="Blade Break",e.BloodDebt="Blood Debt",e.Boost="Boost",e.Channel="Channel",e.Charge="Charge",e.Clash="Clash",e.Cloaked="Cloaked",e.Combo="Combo",e.Contract="Contract",e.Crank="Crank",e.Crush="Crush",e.Dominate="Dominate",e.Ephemeral="Ephemeral",e.Essence="Essence",e.EvoUpgrade="Evo Upgrade",e.Freeze="Freeze",e.Fusion="Fusion",e.Galvanize="Galvanize",e.GoAgain="Go again",e.Guardwell="Guardwell",e.Heave="Heave",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Material="Material",e.Modular="Modular",e.Mirage="Mirage",e.Negate="Negate",e.Opt="Opt",e.Overpower="Overpower",e.Pairs="Pairs",e.Piercing="Piercing",e.Phantasm="Phantasm",e.Protect="Protect",e.Quell="Quell",e.Reload="Reload",e.Reprise="Reprise",e.RuneGate="Rune Gate",e.Rupture="Rupture",e.Scrap="Scrap",e.Solflare="Solflare",e.Specialization="Specialization",e.Spectra="Spectra",e.Spellvoid="Spellvoid",e.Stealth="Stealth",e.Surge="Surge",e.Temper="Temper",e.Tower="Tower",e.Transform="Transform",e.Transcend="Transcend",e.Universal="Universal",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Wager="Wager",e.Ward="Ward",e))(Ut||{}),fi={"Rhinar Blitz Deck":"-Blitz"},gi=e=>{var t,r;let i=fi[e.set]||"",n=`${e.identifier}${i}`,a=e.edition?`-${e.edition}`:"",s=e.foiling?`-${e.foiling}`:"",o=e.treatment?`-${e.treatment}`:"",c=(t=e.image)!=null&&t.toLowerCase().includes("back")?"-Back":"",u=(r=e.image)!=null&&r.toLowerCase().includes("_v3")?"-V3":"";return`${n}${a}${s}${o}${c}${u}`},Yt={wtr:"Welcome to Rathe",arc:"Arcane Rising",cru:"Crucible of War",mon:"Monarch",ele:"Tales of Aria",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",upr:"Uprising",dyn:"Dynasty",out:"Outsiders",dtd:"Dusk till Dawn",evo:"Bright Lights",hvy:"Heavy Hitters",mst:"Part the Mistveil"},Vt=ui(ci({},Yt),{ako:"Armory Deck: Kayo",asb:"Armory Deck: Boltyn",ara:"Arakni Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bet:"Betsy Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",bvo:"Bravo Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",eng:"Enigma Blitz Deck",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",ksi:"Kassai Blitz Deck",kyo:"Kayo Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi Blitz Deck",nuu:"Nuu Blitz Deck",old:"Oldhim Blitz Deck",ola:"Olympia Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",rnr:"Rhinar Blitz Deck",uzu:"Uzuri Blitz Deck",vic:"Victor Blitz Deck",zen:"Zen Blitz Deck",dvr:"Classic Battles: Rhinar vs Dorinthea",rvd:"Classic Battles: Rhinar vs Dorinthea",ira:"Ira Welcome Deck",tcc:"Round the Table",tea:"Dorinthea Hero Deck",ksu:"Katsu Hero Deck",rnr2:"Rhinar Hero Deck",fab:"Promos",her:"Promos",jdg:"Promos",lgs:"Promos",lss:"Promos",oxo:"Promos",xxx:"Promos",win:"Promos"}),ze={};for(let[e,t]of Object.entries(Vt)){let r=ze[t];r?r.push(e):ze[t]=[e]}var mi=ze});var hr=Bt((ro,pr)=>{"use strict";function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jt(Object(r),!0).forEach(function(i){$e(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function He(e){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function O(e,t,r){return t&&Zt(e.prototype,t),r&&Zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&We(e,t)}function ve(e){return ve=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ve(e)}function We(e,t){return We=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},We(e,t)}function yi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bi(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function X(e){var t=yi();return function(){var i=ve(e),n;if(t){var a=ve(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return bi(this,n)}}function ie(e){return Ai(e)||Mi(e)||Ci(e)||ki()}function Ai(e){if(Array.isArray(e))return je(e)}function Mi(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ci(e,t){if(e){if(typeof e=="string")return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}}function je(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function ki(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(e){return Array.isArray?Array.isArray(e):ar(e)==="[object Array]"}var Fi=1/0;function Ti(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-Fi?"-0":t}function Si(e){return e==null?"":Ti(e)}function G(e){return typeof e=="string"}function ir(e){return typeof e=="number"}function xi(e){return e===!0||e===!1||Bi(e)&&ar(e)=="[object Boolean]"}function nr(e){return He(e)==="object"}function Bi(e){return nr(e)&&e!==null}function N(e){return e!=null}function Ne(e){return!e.trim().length}function ar(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Pi="Incorrect 'index' type",wi=function(t){return"Invalid value for key ".concat(t)},Li=function(t){return"Pattern length exceeds max of ".concat(t,".")},Di=function(t){return"Missing ".concat(t," property in key")},Ri=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},Xt=Object.prototype.hasOwnProperty,Ii=function(){function e(t){var r=this;_(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach(function(n){var a=or(n);i+=a.weight,r._keys.push(a),r._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return O(e,[{key:"get",value:function(r){return this._keyMap[r]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function or(e){var t=null,r=null,i=null,n=1,a=null;if(G(e)||V(e))i=e,t=qt(e),r=Ge(e);else{if(!Xt.call(e,"name"))throw new Error(Di("name"));var s=e.name;if(i=s,Xt.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Ri(s));t=qt(s),r=Ge(s),a=e.getFn}return{path:t,id:r,weight:n,src:i,getFn:a}}function qt(e){return V(e)?e:e.split(".")}function Ge(e){return V(e)?e.join("."):e}function Ei(e,t){var r=[],i=!1,n=function a(s,o,c){if(N(s))if(!o[c])r.push(s);else{var u=o[c],d=s[u];if(!N(d))return;if(c===o.length-1&&(G(d)||ir(d)||xi(d)))r.push(Si(d));else if(V(d)){i=!0;for(var f=0,h=d.length;f<h;f+=1)a(d[f],o,c+1)}else o.length&&a(d,o,c+1)}};return n(e,G(t)?t.split("."):t,0),i?r:r[0]}var _i={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Oi={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,r){return t.score===r.score?t.idx<r.idx?-1:1:t.score<r.score?-1:1}},zi={location:0,threshold:.6,distance:100},Ni={useExtendedSearch:!1,getFn:Ei,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},C=ae(ae(ae(ae({},Oi),_i),zi),Ni),Hi=/[^ ]+/g;function $i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,r=new Map,i=Math.pow(10,t);return{get:function(a){var s=a.match(Hi).length;if(r.has(s))return r.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return r.set(s,c),c},clear:function(){r.clear()}}}var Qe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n;_(this,e),this.norm=$i(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return O(e,[{key:"setSources",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=r}},{key:"setIndexRecords",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=r}},{key:"setKeys",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){r._keysMap[n.id]=a})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach(function(i,n){r._addString(i,n)}):this.docs.forEach(function(i,n){r._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(r){var i=this.size();G(r)?this._addString(r,i):this._addObject(r,i)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var i=r,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,i){return r[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,i){if(!(!N(r)||Ne(r))){var n={v:r,i,n:this.norm.get(r)};this.records.push(n)}}},{key:"_addObject",value:function(r,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(r):n.getFn(r,s.path);if(N(c)){if(V(c))(function(){for(var d=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var h=f.pop(),m=h.nestedArrIndex,y=h.value;if(N(y))if(G(y)&&!Ne(y)){var p={v:y,i:m,n:n.norm.get(y)};d.push(p)}else V(y)&&y.forEach(function(v,g){f.push({nestedArrIndex:g,value:v})})}a.$[o]=d})();else if(G(c)&&!Ne(c)){var u={v:c,n:n.norm.get(c)};a.$[o]=u}}}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function sr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.getFn,n=i===void 0?C.getFn:i,a=r.fieldNormWeight,s=a===void 0?C.fieldNormWeight:a,o=new Qe({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(or)),o.setSources(t),o.create(),o}function Wi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n,s=e.keys,o=e.records,c=new Qe({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function ye(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,i=r===void 0?0:r,n=t.currentLocation,a=n===void 0?0:n,s=t.expectedLocation,o=s===void 0?0:s,c=t.distance,u=c===void 0?C.distance:c,d=t.ignoreLocation,f=d===void 0?C.ignoreLocation:d,h=i/e.length;if(f)return h;var m=Math.abs(o-a);return u?h+m/u:m?1:h}function ji(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.minMatchCharLength,r=[],i=-1,n=-1,a=0,s=e.length;a<s;a+=1){var o=e[a];o&&i===-1?i=a:!o&&i!==-1&&(n=a-1,n-i+1>=t&&r.push([i,n]),i=-1)}return e[a-1]&&a-i>=t&&r.push([i,a-1]),r}var re=32;function Gi(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?C.location:n,s=i.distance,o=s===void 0?C.distance:s,c=i.threshold,u=c===void 0?C.threshold:c,d=i.findAllMatches,f=d===void 0?C.findAllMatches:d,h=i.minMatchCharLength,m=h===void 0?C.minMatchCharLength:h,y=i.includeMatches,p=y===void 0?C.includeMatches:y,v=i.ignoreLocation,g=v===void 0?C.ignoreLocation:v;if(t.length>re)throw new Error(Li(re));for(var F=t.length,x=e.length,b=Math.max(0,Math.min(a,x)),T=u,B=b,S=m>1||p,D=S?Array(x):[],L;(L=e.indexOf(t,B))>-1;){var Q=ye(t,{currentLocation:L,expectedLocation:b,distance:o,ignoreLocation:g});if(T=Math.min(Q,T),B=L+F,S)for(var E=0;E<F;)D[L+E]=1,E+=1}B=-1;for(var z=[],I=1,H=F+x,Ee=1<<F-1,te=0;te<F;te+=1){for(var fe=0,J=H;fe<J;){var Yr=ye(t,{errors:te,currentLocation:b+J,expectedLocation:b,distance:o,ignoreLocation:g});Yr<=T?fe=J:H=J,J=Math.floor((H-fe)/2+fe)}H=J;var Ct=Math.max(1,b-J+1),_e=f?x:Math.min(b+J,x)+F,ne=Array(_e+2);ne[_e+1]=(1<<te)-1;for(var $=_e;$>=Ct;$-=1){var ge=$-1,kt=r[e.charAt(ge)];if(S&&(D[ge]=+!!kt),ne[$]=(ne[$+1]<<1|1)&kt,te&&(ne[$]|=(z[$+1]|z[$])<<1|1|z[$+1]),ne[$]&Ee&&(I=ye(t,{errors:te,currentLocation:ge,expectedLocation:b,distance:o,ignoreLocation:g}),I<=T)){if(T=I,B=ge,B<=b)break;Ct=Math.max(1,2*b-B)}}var Vr=ye(t,{errors:te+1,currentLocation:b,expectedLocation:b,distance:o,ignoreLocation:g});if(Vr>T)break;z=ne}var Oe={isMatch:B>=0,score:Math.max(.001,I)};if(S){var Ft=ji(D,m);Ft.length?p&&(Oe.indices=Ft):Oe.isMatch=!1}return Oe}function Ki(e){for(var t={},r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var lr=function(){function e(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?C.location:n,s=i.threshold,o=s===void 0?C.threshold:s,c=i.distance,u=c===void 0?C.distance:c,d=i.includeMatches,f=d===void 0?C.includeMatches:d,h=i.findAllMatches,m=h===void 0?C.findAllMatches:h,y=i.minMatchCharLength,p=y===void 0?C.minMatchCharLength:y,v=i.isCaseSensitive,g=v===void 0?C.isCaseSensitive:v,F=i.ignoreLocation,x=F===void 0?C.ignoreLocation:F;if(_(this,e),this.options={location:a,threshold:o,distance:u,includeMatches:f,findAllMatches:m,minMatchCharLength:p,isCaseSensitive:g,ignoreLocation:x},this.pattern=g?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var b=function(E,z){r.chunks.push({pattern:E,alphabet:Ki(E),startIndex:z})},T=this.pattern.length;if(T>re){for(var B=0,S=T%re,D=T-S;B<D;)b(this.pattern.substr(B,re),B),B+=re;if(S){var L=T-re;b(this.pattern.substr(L),L)}}else b(this.pattern,0)}}return O(e,[{key:"searchIn",value:function(r){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(r=r.toLowerCase()),this.pattern===r){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,r.length-1]]),s}var o=this.options,c=o.location,u=o.distance,d=o.threshold,f=o.findAllMatches,h=o.minMatchCharLength,m=o.ignoreLocation,y=[],p=0,v=!1;this.chunks.forEach(function(F){var x=F.pattern,b=F.alphabet,T=F.startIndex,B=Gi(r,x,b,{location:c+T,distance:u,threshold:d,findAllMatches:f,minMatchCharLength:h,includeMatches:a,ignoreLocation:m}),S=B.isMatch,D=B.score,L=B.indices;S&&(v=!0),p+=D,S&&L&&(y=[].concat(ie(y),ie(L)))});var g={isMatch:v,score:v?p/this.chunks.length:1};return v&&a&&(g.indices=y),g}}]),e}(),q=function(){function e(t){_(this,e),this.pattern=t}return O(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return er(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return er(r,this.singleRegex)}}]),e}();function er(e,t){var r=e.match(t);return r?r[1]:null}var Ui=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n===this.pattern;return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),r}(q),Yi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.indexOf(this.pattern),s=a===-1;return{isMatch:s,score:s?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(q),Vi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),r}(q),Qi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=!n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(q),Ji=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(q),Zi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=!n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(q),cr=function(e){Z(r,e);var t=X(r);function r(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?C.location:s,c=a.threshold,u=c===void 0?C.threshold:c,d=a.distance,f=d===void 0?C.distance:d,h=a.includeMatches,m=h===void 0?C.includeMatches:h,y=a.findAllMatches,p=y===void 0?C.findAllMatches:y,v=a.minMatchCharLength,g=v===void 0?C.minMatchCharLength:v,F=a.isCaseSensitive,x=F===void 0?C.isCaseSensitive:F,b=a.ignoreLocation,T=b===void 0?C.ignoreLocation:b;return _(this,r),n=t.call(this,i),n._bitapSearch=new lr(i,{location:o,threshold:u,distance:f,includeMatches:m,findAllMatches:p,minMatchCharLength:g,isCaseSensitive:x,ignoreLocation:T}),n}return O(r,[{key:"search",value:function(n){return this._bitapSearch.searchIn(n)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(q),ur=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){for(var a=0,s,o=[],c=this.pattern.length;(s=n.indexOf(this.pattern,a))>-1;)a=s+c,o.push([s,a-1]);var u=!!o.length;return{isMatch:u,score:u?0:1,indices:o}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(q),Ke=[Ui,ur,Vi,Qi,Zi,Ji,Yi,cr],tr=Ke.length,Xi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,qi="|";function en(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(qi).map(function(r){for(var i=r.trim().split(Xi).filter(function(y){return y&&!!y.trim()}),n=[],a=0,s=i.length;a<s;a+=1){for(var o=i[a],c=!1,u=-1;!c&&++u<tr;){var d=Ke[u],f=d.isMultiMatch(o);f&&(n.push(new d(f,t)),c=!0)}if(!c)for(u=-1;++u<tr;){var h=Ke[u],m=h.isSingleMatch(o);if(m){n.push(new h(m,t));break}}}return n})}var tn=new Set([cr.type,ur.type]),rn=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.isCaseSensitive,n=i===void 0?C.isCaseSensitive:i,a=r.includeMatches,s=a===void 0?C.includeMatches:a,o=r.minMatchCharLength,c=o===void 0?C.minMatchCharLength:o,u=r.ignoreLocation,d=u===void 0?C.ignoreLocation:u,f=r.findAllMatches,h=f===void 0?C.findAllMatches:f,m=r.location,y=m===void 0?C.location:m,p=r.threshold,v=p===void 0?C.threshold:p,g=r.distance,F=g===void 0?C.distance:g;_(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:h,ignoreLocation:d,location:y,threshold:v,distance:F},this.pattern=n?t:t.toLowerCase(),this.query=en(this.pattern,this.options)}return O(e,[{key:"searchIn",value:function(r){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;r=s?r:r.toLowerCase();for(var o=0,c=[],u=0,d=0,f=i.length;d<f;d+=1){var h=i[d];c.length=0,o=0;for(var m=0,y=h.length;m<y;m+=1){var p=h[m],v=p.search(r),g=v.isMatch,F=v.indices,x=v.score;if(g){if(o+=1,u+=x,a){var b=p.constructor.type;tn.has(b)?c=[].concat(ie(c),ie(F)):c.push(F)}}else{u=0,o=0,c.length=0;break}}if(o){var T={isMatch:!0,score:u/o};return a&&(T.indices=c),T}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,i){return i.useExtendedSearch}}]),e}(),be=[];function nn(){be.push.apply(be,arguments)}function Ue(e,t){for(var r=0,i=be.length;r<i;r+=1){var n=be[r];if(n.condition(e,t))return new n(e,t)}return new lr(e,t)}var Ae={AND:"$and",OR:"$or"},Ye={PATH:"$path",PATTERN:"$val"},Ve=function(t){return!!(t[Ae.AND]||t[Ae.OR])},an=function(t){return!!t[Ye.PATH]},on=function(t){return!V(t)&&nr(t)&&!Ve(t)},rr=function(t){return $e({},Ae.AND,Object.keys(t).map(function(r){return $e({},r,t[r])}))};function dr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),u=an(o);if(!u&&c.length>1&&!Ve(o))return s(rr(o));if(on(o)){var d=u?o[Ye.PATH]:c[0],f=u?o[Ye.PATTERN]:o[d];if(!G(f))throw new Error(wi(d));var h={keyId:Ge(d),pattern:f};return n&&(h.searcher=Ue(f,t)),h}var m={children:[],operator:c[0]};return c.forEach(function(y){var p=o[y];V(p)&&p.forEach(function(v){m.children.push(s(v))})}),m};return Ve(e)||(e=rr(e)),a(e)}function sn(e,t){var r=t.ignoreFieldNorm,i=r===void 0?C.ignoreFieldNorm:r;e.forEach(function(n){var a=1;n.matches.forEach(function(s){var o=s.key,c=s.norm,u=s.score,d=o?o.weight:null;a*=Math.pow(u===0&&d?Number.EPSILON:u,(d||1)*(i?1:c))}),n.score=a})}function ln(e,t){var r=e.matches;t.matches=[],N(r)&&r.forEach(function(i){if(!(!N(i.indices)||!i.indices.length)){var n=i.indices,a=i.value,s={indices:n,value:a};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),t.matches.push(s)}})}function cn(e,t){t.score=e.score}function un(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.includeMatches,n=i===void 0?C.includeMatches:i,a=r.includeScore,s=a===void 0?C.includeScore:a,o=[];return n&&o.push(ln),s&&o.push(cn),e.map(function(c){var u=c.idx,d={item:t[u],refIndex:u};return o.length&&o.forEach(function(f){f(c,d)}),d})}var oe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;_(this,e),this.options=ae(ae({},C),r),this.options.useExtendedSearch,this._keyStore=new Ii(this.options.keys),this.setCollection(t,i)}return O(e,[{key:"setCollection",value:function(r,i){if(this._docs=r,i&&!(i instanceof Qe))throw new Error(Pi);this._myIndex=i||sr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(r){N(r)&&(this._docs.push(r),this._myIndex.add(r))}},{key:"remove",value:function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){return!1},i=[],n=0,a=this._docs.length;n<a;n+=1){var s=this._docs[n];r(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(r){this._docs.splice(r,1),this._myIndex.removeAt(r)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.limit,a=n===void 0?-1:n,s=this.options,o=s.includeMatches,c=s.includeScore,u=s.shouldSort,d=s.sortFn,f=s.ignoreFieldNorm,h=G(r)?G(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return sn(h,{ignoreFieldNorm:f}),u&&h.sort(d),ir(a)&&a>-1&&(h=h.slice(0,a)),un(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(r){var i=Ue(r,this.options),n=this._myIndex.records,a=[];return n.forEach(function(s){var o=s.v,c=s.i,u=s.n;if(N(o)){var d=i.searchIn(o),f=d.isMatch,h=d.score,m=d.indices;f&&a.push({item:o,idx:c,matches:[{score:h,value:o,norm:u,indices:m}]})}}),a}},{key:"_searchLogical",value:function(r){var i=this,n=dr(r,this.options),a=function u(d,f,h){if(!d.children){var m=d.keyId,y=d.searcher,p=i._findMatches({key:i._keyStore.get(m),value:i._myIndex.getValueForItemAtKeyId(f,m),searcher:y});return p&&p.length?[{idx:h,item:f,matches:p}]:[]}for(var v=[],g=0,F=d.children.length;g<F;g+=1){var x=d.children[g],b=u(x,f,h);if(b.length)v.push.apply(v,ie(b));else if(d.operator===Ae.AND)return[]}return v},s=this._myIndex.records,o={},c=[];return s.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var h=a(n,d,f);h.length&&(o[f]||(o[f]={idx:f,item:d,matches:[]},c.push(o[f])),h.forEach(function(m){var y,p=m.matches;(y=o[f].matches).push.apply(y,ie(p))}))}}),c}},{key:"_searchObjectList",value:function(r){var i=this,n=Ue(r,this.options),a=this._myIndex,s=a.keys,o=a.records,c=[];return o.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var h=[];s.forEach(function(m,y){h.push.apply(h,ie(i._findMatches({key:m,value:d[y],searcher:n})))}),h.length&&c.push({idx:f,item:d,matches:h})}}),c}},{key:"_findMatches",value:function(r){var i=r.key,n=r.value,a=r.searcher;if(!N(n))return[];var s=[];if(V(n))n.forEach(function(m){var y=m.v,p=m.i,v=m.n;if(N(y)){var g=a.searchIn(y),F=g.isMatch,x=g.score,b=g.indices;F&&s.push({score:x,key:i,value:y,idx:p,norm:v,indices:b})}});else{var o=n.v,c=n.n,u=a.searchIn(o),d=u.isMatch,f=u.score,h=u.indices;d&&s.push({score:f,key:i,value:o,norm:c,indices:h})}return s}}]),e}();oe.version="6.6.2";oe.createIndex=sr;oe.parseIndex=Wi;oe.config=C;oe.parseQuery=dr;nn(rn);var dn=oe;pr.exports=dn});var qa={};ri(qa,{PUNCTUATION:()=>P,abbreviations:()=>Xe,availableExclusions:()=>Nr,availableModifiers:()=>zr,clashBannedCards:()=>Je,clashSpecializationOverrides:()=>Ze,default:()=>Wr,filterCard:()=>jr,filtersToCardPropertyMappings:()=>De,getAbbreviation:()=>Ce,getAbbreviationByCard:()=>pn,getCardByName:()=>ft,getCleanText:()=>bt,getDeckFilters:()=>ba,getExcludedMetaFilters:()=>at,getHeroBreakdown:()=>Qa,getKeywordsAndAppliedFiltersFromText:()=>ht,getMetaFilters:()=>nt,getNormalizedText:()=>he,getRelatedCards:()=>Mt,getRelatedCardsByName:()=>Re,getTokensReferencedByCards:()=>Xa,heroHasFilters:()=>Aa,multiWordShorthands:()=>st,shorthands:()=>ot,singleWordShorthands:()=>lt});module.exports=ii(qa);var w=W(j()),gt=W(hr());var Me=W(j()),Je=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Ze=[{heroes:[Me.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[Me.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[Me.Hero.Prism],cardIdentifiers:["figment-of-erudition-yellow","figment-of-judgment-yellow","figment-of-protection-yellow","figment-of-ravages-yellow","figment-of-rebirth-yellow","figment-of-tenacity-yellow","figment-of-triumph-yellow","figment-of-war-yellow"]}];var P=/[!"#$%&'’()+,-./:;<=>?@[\]^_`|~]/g;var k=W(j());var Ce=e=>Xe.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),pn=e=>Xe.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Xe=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DPot","D Pot"],card:"Potion of Deja Vu"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats"],card:"Restless Coalescence"},{abbreviations:["SFaF","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var l=W(j());var xe=Array.from(Array(50).keys()).map(e=>`${e}`),A=(e,t=[])=>{let r=[...e,l.Class.Generic];return t.length>0&&r.push(l.Class.NotClassed),[{filterToPropertyMapping:{property:"classes",isArray:!0},values:r.map(i=>i.toLowerCase()),isOr:!0},hn(t)]},M=(e,t=[])=>{let r=Object.values(l.Hero).filter(i=>i!==e&&!t.includes(i)).map(i=>i.toLowerCase());return[{filterToPropertyMapping:{property:"hero",isString:!0},values:r,excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"specializations",isArray:!0},values:r,excluded:!0,isOr:!0}]},hn=e=>{let t=Object.values(l.Talent).filter(r=>!e.includes(r)).map(r=>r.toLowerCase());return{filterToPropertyMapping:{property:"talents",isArray:!0},values:t,excluded:!0}},Be=[l.Talent.Draconic],fn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice,l.Talent.Lightning],gn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice],mn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Lightning],yn=[l.Talent.Elemental,l.Talent.Ice],vn=[l.Talent.Elemental,l.Talent.Ice,l.Talent.Lightning],tt=[l.Talent.Light],rt=[l.Talent.Mystic],it=[l.Talent.Shadow],bn=[...A([l.Class.Assassin]),...M(l.Hero.Arakni)],An=[...A([l.Class.Ranger]),...M(l.Hero.Azalea)],Mn=[...A([l.Class.Ninja]),...M(l.Hero.Benji)],Cn=[...A([l.Class.Guardian]),...M(l.Hero.Betsy)],kn=[...A([l.Class.Wizard]),...M(l.Hero.Blaze)],Fn=[...A([l.Class.Warrior],tt),{filterToPropertyMapping:{property:"subtypes",isArray:!0,partialMatch:!0},values:["angel"],excluded:!0,isOr:!0},...M(l.Hero.Boltyn)],Tn=[...A([l.Class.Guardian]),...M(l.Hero.Bravo)],Sn=[...A([l.Class.Guardian]),...M(l.Hero.Brevant)],xn=[...A([l.Class.Runeblade],mn),...M(l.Hero.Briar)],Bn=[...A([l.Class.Adjudicator]),...M(l.Hero.Brutus)],Pn=[...A([l.Class.Runeblade],it),...M(l.Hero.Chane)],wn=[...A([l.Class.Mechanologist]),...M(l.Hero.Dash)],qe=[...A([l.Class.Mechanologist]),...M(l.Hero.DataDoll)],fr=[...A([l.Class.Warrior]),...M(l.Hero.Dorinthea)],Ln=[...A([l.Class.Illusionist],Be),...M(l.Hero.Dromai,[l.Hero.Fai])],Dn=[...A([l.Class.Warrior,l.Class.Wizard],Be),{filterToPropertyMapping:{property:"pitch",isNumber:!0},values:[void 0,"0","2","3"],cardTypes:[l.Type.Action,l.Type.AttackReaction,l.Type.DefenseReaction,l.Type.Instant,l.Type.Mentor,l.Type.Resource],excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","mentor"],excluded:!0,isOr:!0},...M(l.Hero.Emperor)],Rn=[...A([l.Class.Illusionist],rt),...M(l.Hero.Enigma)],In=[...A([l.Class.Ninja],Be),...M(l.Hero.Fai,[l.Hero.Dromai])],gr=[...A([l.Class.Merchant]),...M(l.Hero.GenisWotchuneed)],En=[...A([l.Class.Ninja]),...M(l.Hero.Ira)],mr=[...A([l.Class.Wizard],yn),...M(l.Hero.Iyslander)],_n=[...A([l.Class.Wizard]),...M(l.Hero.Kano)],On=[...A([l.Class.Warrior]),...M(l.Hero.Kassai)],zn=[...A([l.Class.Ninja]),...M(l.Hero.Katsu)],Nn=[...A([l.Class.Merchant]),...M(l.Hero.Kavdaen)],Hn=[...A([l.Class.Brute]),...M(l.Hero.Kayo)],$n=[...A([l.Class.Brute],it),...M(l.Hero.Levia)],Wn=[...A([l.Class.Ranger],vn),...M(l.Hero.Lexi)],jn=[...A([l.Class.Mechanologist]),...M(l.Hero.Maxx)],Gn=[...A([l.Class.Bard]),...M(l.Hero.Melody)],Kn=[...A([l.Class.Assassin],rt),...M(l.Hero.Nuu)],Un=[...A([l.Class.Guardian],gn),...M(l.Hero.Oldhim)],Yn=[...A([l.Class.Warrior]),...M(l.Hero.Olympia)],Vn=[...A([l.Class.Illusionist],tt),...M(l.Hero.Prism)],Qn=[...A([l.Class.Brute]),...M(l.Hero.Rhinar)],Jn=[...A([l.Class.Ranger]),...M(l.Hero.Riptide)],Zn=[...A([l.Class.Merchant]),...M(l.Hero.Ruudi)],Xn=[{filterToPropertyMapping:{property:"classes",isArray:!0},values:["generic"],isOr:!0}],qn=[...A([l.Class.Merchant]),...M(l.Hero.Squizzy)],ea=[...A([l.Class.Guardian],fn),...M(l.Hero.Bravo)],ta=[...A([l.Class.Adjudicator],Be),...M(l.Hero.Taipanis)],ra=[...A([]),...M(l.Hero.Taylor)],ia=[...A([l.Class.Mechanologist]),...M(l.Hero.Teklovossen)],na=[...A([l.Class.Adjudicator],tt),...M(l.Hero.Theryon)],aa=[...A([l.Class.Assassin]),...M(l.Hero.Uzuri)],oa=[...A([l.Class.Guardian]),...M(l.Hero.Valda)],sa=[...A([l.Class.Guardian]),...M(l.Hero.Victor)],la=[...A([l.Class.Runeblade]),...M(l.Hero.Viserai)],ca=[...A([l.Class.Runeblade],it),...M(l.Hero.Vynnset)],ua=[...A([l.Class.Bard]),...M(l.Hero.Yorick)],da=[...A([l.Class.Guardian]),...M(l.Hero.Yoji)],pa=[...A([l.Class.Ninja],rt),...M(l.Hero.Zen)],ha=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],yr=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],fa=[{filterToPropertyMapping:{property:"rarities",isArray:!0},values:["super rare","majestic","legendary","fabled"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],ke=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],se=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],ga=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["commoner"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],et=[{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],de={blitz:ha,"blitz ll":yr,"blitz living legend":yr,clash:fa,cc:ke,classic:ke,"classic constructed":ke,ll:se,"living legend":se,"cc ll":se,"ll cc":se,"classic constructed ll":se,"classic constructed living legend":se,constructed:ke,commoner:ga,upf:et,ultimate:et,"ultimate pit fight":et,arakni:bn,azalea:An,benji:Mn,betsy:Cn,blaze:kn,boltyn:Fn,bravo:Tn,brevant:Sn,briar:xn,brutus:Bn,chane:Pn,dash:wn,data:qe,"data doll":qe,datadoll:qe,dori:fr,dorinthea:fr,dromai:Ln,emperor:Dn,enigma:Rn,fai:In,genis:gr,geniswotchuneed:gr,ira:En,iyslander:mr,islander:mr,kano:_n,kassai:On,katsu:zn,kavdaen:Nn,kayo:Hn,levia:$n,lexi:Wn,maxx:jn,melody:Gn,nuu:Kn,oldhim:Un,olympia:Yn,prism:Vn,rhinar:Qn,riptide:Jn,ruudi:Zn,shiyana:Xn,squizzy:qn,starvo:ea,taipanis:ta,taylor:ra,teklovossen:ia,theryon:na,uzuri:aa,valda:oa,victor:sa,viserai:la,vynnset:ca,yorick:ua,yoji:da,zen:pa},Fe=["common","rare","super rare","majestic","legendary","fabled"],ma=(e,t,r)=>{let i=[];if(!t)i.push(...e);else for(let n of e)switch(t){case">=":let a=!1;for(let u of Fe)a?i.push(u):u===n&&(a=!0,i.push(u));break;case">":let s=!1;for(let u of Fe)s?i.push(u):u===n&&(s=!0);break;case"<=":let o=!1;for(let u of Fe.slice().reverse())o?i.push(u):u===n&&(o=!0,i.push(u));break;case"<":let c=!1;for(let u of Fe.slice().reverse())c?i.push(u):u===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:r}},ya=(e,t)=>{let r=[];for(let i of e)if(de[i]){let n=de[i];for(let a of n){let s=Y({},a);t&&!a.filterToPropertyMapping.isString&&(s.excluded=!a.excluded),r.push(s)}}return r},nt=(e,t,r,i)=>{let n=[];return Ca(t)?n.push(...ya(r,e)):Fa(t)&&n.push(ma(r,i,e)),n},le=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:xe,excluded:!0},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0}],K=[{filterToPropertyMapping:{property:"defense",isNumber:!0},values:xe,excluded:!0},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","placeholder","token","weapon"],excluded:!0}],Te=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:xe},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],ee=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:xe},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token"],excluded:!0}],Se=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(l.Talent).map(e=>e.toLowerCase())}],va={"!co":le,"-co":le,"!cost":le,"-cost":le,"!color":le,"-color":le,"!b":K,"-b":K,"!block":K,"-block":K,"!d":K,"-d":K,"!def":K,"-def":K,"!defense":K,"-defense":K,"!pitch":Te,"-pitch":Te,"!p":Te,"-p":Te,"!attack":ee,"-attack":ee,"!power":ee,"-power":ee,"!pwr":ee,"-pwr":ee,"!pow":ee,"-pow":ee,"!talents":Se,"-talents":Se,"!tal":Se,"-tal":Se},at=e=>{let t=[],r=va[e];return r&&t.push(...r),t},ba=(e,t)=>[...de[e.toLowerCase()],...t?de[t.toLowerCase()]:[]],Aa=e=>{var t;return((t=de[e.toLowerCase().split(" ")[0]])==null?void 0:t.length)>0},Ma=["l","legal","hero"],Ca=e=>Ma.includes(e),ka=["r","rarity"],Fa=e=>ka.includes(e);var ot=[{description:"Attack actions",filters:["st:attack"],shorthands:["AA"]},{description:"Arcane barrier",filters:['k:"arcane barrier"'],shorthands:["AB"]},{description:"Attack reactions",filters:['t:"attack reaction"'],shorthands:["AR"]},{description:"Defense reactions",filters:['t:"defense reaction"'],shorthands:["DR"]},{description:"Go again",filters:['k:"go again"'],shorthands:["GA"]},{description:"Non-attack actions",filters:["t:action","st:nonattack"],shorthands:["NAA"]},{description:"Plus defense",filters:["+ {d}"],shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Plus power",filters:["+ {p}"],shorthands:["Pumps","Pump","Buff","Buffs","Pump attack","Pump attacks","Pumps attack","Pumps attacks","Buff attack","Buff attacks","Buffs attack","Buffs attacks"]},{description:"Poppers",filters:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],helper:'6+ power non-Illusionist attacks that can "pop" phantasm attacks when defending',shorthands:["Poppers","Popper"]},{description:"Spellvoid",filters:['k:"spellvoid"'],shorthands:["SV"]}],st=ot.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>ue(Y({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase())})),lt=ot.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>ue(Y({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase())}));var zr=[">=",">","<=","<"],Nr=["!","-"],ct={property:"artists",isArray:!0,partialMatch:!0},vr={property:"bannedFormats",isArray:!0,partialMatch:!0},Ta={property:"n/a"},br={property:"classes",isArray:!0,partialMatch:!0},Ar={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},pe={property:"defense",specialProperty:"specialDefense",isNumber:!0},Mr={nestedProperty:"foiling",property:"printings",isArray:!0},Cr={property:"fusions",isArray:!0},kr={property:"intellect",isNumber:!0},Fr={property:"keywords",isArray:!0,partialMatch:!0},ut={property:"n/a",isMeta:!0},Tr={property:"life",specialProperty:"specialLife",isNumber:!0},Sr={property:"name",isString:!0},dt={property:"pitch",isNumber:!0},Pe={property:"power",specialProperty:"specialPower",isNumber:!0},xr={property:"n/a",isMeta:!0},Sa={property:"n/a"},xa={property:"n/a"},Br={property:"sets",isArray:!0,partialMatch:!0},we={property:"specializations",isArray:!0,partialMatch:!0},Pr={property:"subtypes",isArray:!0},wr={property:"types",isArray:!0},Lr={property:"talents",isArray:!0},Ba={property:"functionalText",isString:!0,partialMatch:!0},Pa={property:"typeText",isString:!0,partialMatch:!0},Le={nestedProperty:"treatment",property:"printings",isArray:!0},De={a:ct,artist:ct,art:ct,attack:Pe,b:pe,block:pe,banned:vr,c:br,class:br,chain:Ta,co:Ar,cost:Ar,color:dt,d:pe,def:pe,defense:pe,f:Cr,fusion:Cr,foil:Mr,foiling:Mr,i:kr,intellect:kr,k:Fr,keyword:Fr,l:ut,legal:ut,hero:ut,li:Tr,life:Tr,n:Sr,name:Sr,p:dt,pitch:dt,pwr:Pe,pow:Pe,power:Pe,r:xr,rarity:xr,referencedby:Sa,references:xa,rf:vr,s:Br,set:Br,sp:we,spec:we,specialization:we,specializations:we,st:Pr,subtype:Pr,t:wr,type:wr,tal:Lr,talent:Lr,text:Ba,treat:Le,treatment:Le,var:Le,variation:Le,x:Pa},wa=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(P,"")}],La=e=>{var n;let t=[],r=e.trim().toLowerCase();for(let{text:a,override:s}of wa)r.includes(a)&&(r=r.replace(a,s));if((n=Ce(r))==null?void 0:n.card)t.push(r);else{let a=r.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?t.push(c):o===1&&(s+=" "+c);o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0)}return t},Da=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],ht=(e,t)=>{var h;let r=e;for(let{filters:m,shorthands:y}of st)for(let p of y)if(r.includes(p)){r=r.replace(p,m.join(" "));break}let i=La(r),n=[];for(let m of i){let y=lt.find(({shorthands:p})=>p.includes(m));y?n.push(...y.filters):n.push(m)}let a=[],s=[],o=[],c=[],u=[],d=[],f={isClash:!1,heroes:[]};for(let m of n)if($a(m)){let[y,p]=m.split(":"),{modifier:v,values:g,isAnd:F,isOr:x}=Na(p),{filterKey:b,excluded:T,isMeta:B}=Ha(y);if(B){if(["rarity","r"].includes(b)&&(g=za(g)),["legal","l","hero"].includes(b)){for(let S of Da)p.includes(S.toLowerCase())&&(f.heroes.includes(S)||f.heroes.push(S));p.includes("clash")&&(f.isClash=!0)}a.push(...nt(T,b,g,v))}else{if(["chain"].includes(b)){let S=I=>I.name.toLowerCase().replaceAll(P,""),D=g.map(I=>ft(I,t)).filter(I=>!!I).map(S),L=new Set(D);b="name",x=!0;let Q=20,E=0,z=I=>{if(!I.types.includes(k.Type.Hero)){let H=S(I);L.add(H),D.includes(H)||D.push(H)}};for(let I of D){if(E>Q)break;let{referencedBy:H,references:Ee}=Re(I,t);Ee.forEach(z),E===0&&H.forEach(z),E++}g=Array.from(L)}else if(["referencedby","references"].includes(b)){let S=b,D=[...g].filter(L=>!!L);g=[],b="name",x=!0;for(let L of D){let{referencedBy:Q,references:E}=Re(L,t);["referencedby"].includes(S)?g.push(...E.map(({name:z})=>z.toLowerCase().replaceAll(P,""))):["references"].includes(S)&&g.push(...Q.map(({name:z})=>z.toLowerCase().replaceAll(P,"")))}}else["art","artist"].includes(b)?s=g:["foiling","foil"].includes(b)?(c=_a(g),g=c.map(S=>S.toLowerCase())):["treat","treatment","var","variation"].includes(b)?(d=Oa(g),g=d.map(S=>S.toLowerCase())):["set","s"].includes(b)?(u=Ra(g),g=u.map(S=>S.toLowerCase().replaceAll(P,""))):["pitch","p","color"].includes(b)&&(g=Ea(g));De[b]&&a.push({filterToPropertyMapping:De[b],values:g,isAnd:F,isOr:x,modifier:v,excluded:T})}}else if(m){let y=(h=Ce(m))==null?void 0:h.card,p=at(m);y?o.push(`"${y.toLowerCase().replace(P,"")}"`):p&&p.length>0?a.push(...p):o.push(m.replace(P,""))}return{appliedFilters:a,attributes:{artists:s,foilings:c,releases:u,treatments:d},keywords:o,specialConditions:f}},Ra=e=>{let t=[];for(let r of e)t.push(...Ia(r));return t},Ia=e=>{let t=[],r=Object.values(k.Release).find(i=>i.toLowerCase().replaceAll(P,"")===e);if(r&&t.push(r),t.length===0){let i=k.setIdentifierToSetMappings[e];i&&t.push(i)}if(t.length===0){let i=Object.values(k.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&t.push(...i)}return t},pt={blue:3,yellow:2,red:1,white:0},Ea=e=>{let t=[];for(let r of e)pt[r]||pt[r]===0?t.push(pt[r].toString()):t.push(r);return t},Dr={r:k.Foiling.R,rf:k.Foiling.R,rainbow:k.Foiling.R,c:k.Foiling.C,cf:k.Foiling.C,cold:k.Foiling.C,g:k.Foiling.G,gf:k.Foiling.G,gold:k.Foiling.G},_a=e=>{let t=[];for(let r of e)Dr[r]&&t.push(Dr[r]);return t},Rr=ue(Y({},Object.values(k.Treatment).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})),{aa:k.Treatment.AA,alt:k.Treatment.AA,"alt art":k.Treatment.AA,ab:k.Treatment.AB,"alt border":k.Treatment.AB,at:k.Treatment.AT,"alt text":k.Treatment.AT,ea:k.Treatment.EA,extended:k.Treatment.EA,"extended art":k.Treatment.EA,fa:k.Treatment.FA,full:k.Treatment.FA,"full art":k.Treatment.FA}),Oa=e=>{let t=[];for(let r of e)Rr[r]?t.push(Rr[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Ir={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},za=e=>{let t=[];for(let r of e)Ir[r]?t.push(Ir[r]):t.push(r);return t},Na=e=>{let t=[],r,i,n=zr.find(a=>e.includes(a));if(n){let[,a]=e.split(n);Er(a)?(r=!0,t.push(...a.trim().split("+").map(s=>s.replace(P,"")))):_r(a)?(i=!0,t.push(...a.trim().split(",").map(s=>s.replace(P,"")))):t.push(a.trim().replace(P,""))}else Er(e)?(r=!0,t.push(...e.trim().split("+").map(a=>a.replace(P,"")))):_r(e)?(i=!0,t.push(...e.trim().split(",").map(a=>a.replace(P,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(P,"")):t.push(e.trim().replace(P,""));return{modifier:n,values:t,isAnd:r,isOr:i}},Ha=e=>{let t=Wa(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:Or(r)}}else return{excluded:!1,filterKey:e,isMeta:Or(e)}},$a=e=>e.indexOf(":")>=0,Er=e=>e.indexOf("+")>=0,_r=e=>e.indexOf(",")>=0,Or=e=>{var t;return!!((t=De[e])!=null&&t.isMeta)},Wa=e=>{var t;return(t=Nr.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var R=W(j()),Hr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[R.Class.Generic],defaultImage:"FNG000",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",printings:[{artist:"Hoodwill",identifier:"FNG000",image:"FNG000",print:"FNG000",set:R.Release.Promos},{artist:"Hoodwill",identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${R.Treatment.FA}`,set:R.Release.Promos,treatment:R.Treatment.FA}],name:"Fangs A Lot",rarities:[R.Rarity.Rare],rarity:R.Rarity.Rare,sets:[R.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[R.Subtype.Attack],types:[R.Type.Action],typeText:"Generic Action - Attack"},$r=[{keyword:Hr.name.toLowerCase(),card:Hr}];var mt=W(j());var yt=class{constructor(t){this.search=(t,r)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=ht(t,this.cards),c=s.join(" "),u=r?$r.filter(p=>p.keyword===c):[];if(u.length>0?i=u.map(({card:p})=>p):s.length?i=this.fuse.search(c).map(p=>p.item):i=[...this.cards],n.length&&(i=i.filter(p=>p&&jr(p,n,o)),n.some(({excluded:p,values:v})=>!p&&v.includes(w.Format.ClassicConstructed.toLowerCase()))&&(i=i.filter(p=>!p.young)),n.some(({excluded:p,values:v})=>!p&&(v.includes(w.Format.Blitz.toLowerCase())||v.includes(w.Format.Commoner.toLowerCase())))&&(i=i.filter(p=>{let{types:v,young:g}=p;return!(v.includes(w.Type.Hero)&&!g)}))),s.length===0){let p="";if(a.releases.length===1)try{let v=a.releases[0];p=w.setToSetIdentifierMappings[v][0].toUpperCase()}catch(v){console.error("Error getting set identifier from search",v)}p?i.sort((v,g)=>{var b,T;let F=(b=v.setIdentifiers.find(B=>B.includes(p)))==null?void 0:b.replace(p,""),x=(T=g.setIdentifiers.find(B=>B.includes(p)))==null?void 0:T.replace(p,"");return F&&x?F.localeCompare(x):-1}):i.sort((v,g)=>v.name===g.name?`${v.pitch}`.localeCompare(`${g.pitch}`):v.name.localeCompare(g.name))}else{let p=[],v=[],g=s.map(F=>F.toLowerCase().replace(P,"")).join(" ");for(let F of i)F.name.toLowerCase().replace(P,"")===g?p.push(F):v.push(F);i=[...p,...v]}let d,{artists:f,foilings:h,releases:m,treatments:y}=a;return(f.length>0||h.length>0||m.length>0||y.length>0)&&(d=i.map(p=>{let v=p.printings.filter(g=>{let F=!!g.image,x=f.length===0||f.some(S=>g.artist.replace(P,"").toLowerCase().includes(S)),b=h.length===0||h.includes(g.foiling),T=m.length===0||m.includes(g.set),B=y.length===0||y.includes(g.treatment);return F&&x&&b&&T&&B});return Y({matchingPrintings:v},p)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:d||i}};let r={getFn:(i,n)=>{let a=gt.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>he(s.replace(P,""))):he(a).replace(P,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"setIdentifiers",weight:2},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.cards=[...t],this.fuse=new gt.default([...t],r)}},Wr=yt,jr=(e,t,r)=>{var n,a,s,o;let i=!0;for(let c of t){let{isNumber:u,isString:d,isArray:f,isBoolean:h,property:m}=c.filterToPropertyMapping;if((u&&!ja(e,c)||d&&!Ga(e,c)||f&&!Ka(e,c)||h&&!Ua(e,c))&&(i=!1),r.isClash&&["rarities","bannedFormats"].includes(m)){let b=[w.Rarity.SuperRare,w.Rarity.Majestic,w.Rarity.Legendary,w.Rarity.Fabled].some(L=>e.rarities.includes(L)),T=!1;for(let{cardIdentifiers:L,heroes:Q}of Ze)for(let E of r.heroes)Q.includes(E)&&L.includes(e.cardIdentifier)&&(T=!0);let B=!!e.specializations&&e.specializations.length>0||T,S=[w.Type.Mentor,w.Type.Weapon].some(L=>e.types.includes(L)),D=Je.includes(e.name);!i&&!D&&(B||S)&&b&&(i=!0),D&&(i=!1)}if(r.isClash&&r.heroes.includes(w.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i&&r.heroes.includes(w.Hero.Brutus)){let b=((n=e.specializations)==null?void 0:n.length)>0;((a=e.keywords)==null?void 0:a.includes(mt.Keyword.Clash))&&!b&&(i=!0)}if(!i&&r.heroes.includes(w.Hero.Shiyana)&&["classes"].includes(m)){let b=((s=e.specializations)==null?void 0:s.length)>0,T=e.types.includes(w.Type.Token),B=e.cardIdentifier==="cracked-bauble-yellow",S=(o=e.keywords)==null?void 0:o.includes(mt.Keyword.Ephemeral);(b||T||B||S)&&(i=!0)}let g=e.types.includes(w.Type.Equipment);if(!i&&r.heroes.includes(w.Hero.Taylor)&&g&&g&&(i=!0),!i&&r.heroes.includes(w.Hero.Yorick)&&(["classes"].includes(m)||["talents"].includes(m))&&e.types.includes(w.Type.Token)&&(i=!0),!i)break}return i},ja=(e,t)=>{var r;if(Ie(t,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=vt(e,t);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(h=>o>=parseInt(h));return a?!c:c;case">":let u=i==null?void 0:i.some(h=>o>parseInt(h));return a?!u:u;case"<=":let d=i==null?void 0:i.some(h=>o<=parseInt(h));return a?!d:d;case"<":let f=i==null?void 0:i.some(h=>o<parseInt(h));return a?!f:f;default:return!1}else{let c=i==null?void 0:i.some(u=>o===parseInt(u));return a?!c:c}else{let c=(r=Va(e,t))==null?void 0:r.toLowerCase(),u=s?i==null?void 0:i.some(d=>c==null?void 0:c.includes(d)):i==null?void 0:i.some(d=>c===d);return a?!u:u}}else return!0},Ga=(e,t)=>{var r;if(Ie(t,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=(r=vt(e,t))==null?void 0:r.replaceAll(P,"");if(s){let c=n?i==null?void 0:i.every(u=>o==null?void 0:o.toLowerCase().includes(u)):i==null?void 0:i.some(u=>o==null?void 0:o.toLowerCase().includes(u));return a?!c:c}else{let c=n?i==null?void 0:i.every(u=>(o==null?void 0:o.toLowerCase())===u):i==null?void 0:i.some(u=>(o==null?void 0:o.toLowerCase())===u);return a?!c:c}}else return!0},Ka=(e,t)=>{if(Ie(t,e)){let{values:r,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=t,s=Ya(e,t).map(o=>o==null?void 0:o.replaceAll(P,""));if(a){let o=i?r.every(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))):r.some(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))),c=s.length===0;return n?!o||c:o}else{let o=i?r.every(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c)):r.some(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c));return n?!o:o}}else return!0},Ua=(e,t)=>{if(Ie(t,e)){let{excluded:r}=t,i=vt(e,t);return r?!i:i}else return!0},vt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},Ya=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:i}}=t,n=e[i]||[];return r?n.map(a=>a[r]).filter(a=>!!a):n},Va=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Ie=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(i=>t.map(n=>n.toLowerCase()).includes(i.toLowerCase())||r.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var ft=(e,t)=>{let r=t.find(i=>bt(i.name)===e);return r||(r=t.find(i=>bt(i.name).includes(e))),r},bt=e=>he(e.toLowerCase().trim().replace(P,"")),he=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var U=W(j()),Qa=e=>{let t=e.filter(o=>o.types.includes(U.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),r=t.filter(o=>!o.young&&!o.classes.includes(U.Class.Adjudicator)),i=t.filter(o=>{let c=o.rarities.some(d=>d!==U.Rarity.Promo),u=o.sets.some(d=>d!==U.Release.Promos);return c||u}),n=t.filter(o=>{let c=o.rarities.every(d=>d===U.Rarity.Promo),u=o.sets.every(d=>d===U.Release.Promos);return c&&u}),a=t.filter(o=>o.young),s=a.filter(({hero:o})=>!r.find(c=>c.hero===o));return{all:t,adult:r,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var Ur=W(j());var At=W(j()),Ja={"Dawnblade, Resplendent":"Dawnblade"},Gr=e=>Ja[e.name]||e.name,Kr=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},Re=(e,t)=>{let r=t.find(i=>i.name.toLowerCase().replace(P,"")===e);return r||(r=t.find(i=>i.name.toLowerCase().replace(P,"").includes(e))),Mt(r,t)},Mt=(e,t)=>{var a,s;let r=[],i=[],n=[];if(e){let o=[],c=[],u=Gr(e);for(let d of t){let f=Gr(d),h=u===f,m=e.pitch!==d.pitch;if(h&&m)r.push(d);else if(!h){let y=e.name==="Seismic Surge",p=(a=d.keywords)==null?void 0:a.includes(At.Keyword.Heave),v=y&&p,g=Kr(d),F=g==null?void 0:g.includes(u),x=Kr(e),b=x==null?void 0:x.includes(f);(F||v)&&o.push(d);let T=d.name==="Seismic Surge",B=(s=e.keywords)==null?void 0:s.includes(At.Keyword.Heave);(b||T&&B)&&c.push(d)}}for(let d of o)i.push(d);for(let d of c){let f=d.name;u!==f&&!c.some(h=>{let m=h.name;return m!==f&&m.includes(f)})&&n.push(d)}}return{otherPitches:r,referencedBy:i,references:n}},Za=["cash-in-yellow"],Xa=(e,t,r)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!Za.includes(a))){let{references:a}=Mt(n,t);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",u=r===Ur.Hero.Maxx;return!c||u}))i.add(s)}return Array.from(i)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getDeckFilters,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,heroHasFilters,multiWordShorthands,shorthands,singleWordShorthands});
|
|
1
|
+
var Qr=Object.create;var ce=Object.defineProperty,Jr=Object.defineProperties,Zr=Object.getOwnPropertyDescriptor,Xr=Object.getOwnPropertyDescriptors,qr=Object.getOwnPropertyNames,Tt=Object.getOwnPropertySymbols,ei=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable;var St=(e,t,r)=>t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Y=(e,t)=>{for(var r in t||(t={}))xt.call(t,r)&&St(e,r,t[r]);if(Tt)for(var r of Tt(t))ti.call(t,r)&&St(e,r,t[r]);return e},ue=(e,t)=>Jr(e,Xr(t));var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ri=(e,t)=>{for(var r in t)ce(e,r,{get:t[r],enumerable:!0})},wt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qr(t))!xt.call(e,n)&&n!==r&&ce(e,n,{get:()=>t[n],enumerable:!(i=Zr(t,n))||i.enumerable});return e};var W=(e,t,r)=>(r=e!=null?Qr(ei(e)):{},wt(t||!e||!e.__esModule?ce(r,"default",{value:e,enumerable:!0}):r,e)),ii=e=>wt(ce({},"__esModule",{value:!0}),e);var j=Bt((to,Qt)=>{var me=Object.defineProperty,ni=Object.defineProperties,ai=Object.getOwnPropertyDescriptor,oi=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertyNames,Pt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable,Lt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ci=(e,t)=>{for(var r in t||(t={}))Dt.call(t,r)&&Lt(e,r,t[r]);if(Pt)for(var r of Pt(t))li.call(t,r)&&Lt(e,r,t[r]);return e},ui=(e,t)=>ni(e,oi(t)),di=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},pi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of si(t))!Dt.call(e,n)&&n!==r&&me(e,n,{get:()=>t[n],enumerable:!(i=ai(t,n))||i.enumerable});return e},hi=e=>pi(me({},"__esModule",{value:!0}),e),Rt={};di(Rt,{Class:()=>_t,Foiling:()=>It,Format:()=>Ot,Fusion:()=>zt,Hero:()=>Kt,Keyword:()=>Ut,Rarity:()=>Nt,Release:()=>Ht,ReleaseEdition:()=>$t,Subtype:()=>Gt,Talent:()=>Wt,Treatment:()=>Et,Type:()=>jt,fullSetIdentifiers:()=>Yt,getPrint:()=>gi,setIdentifierToSetMappings:()=>Vt,setToSetIdentifierMappings:()=>mi});Qt.exports=hi(Rt);var It=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(It||{}),Et=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.EA="Extended Art",e.FA="Full Art",e))(Et||{}),_t=(e=>(e.NotClassed="NotClassed",e.Generic="Generic",e.Adjudicator="Adjudicator",e.Assassin="Assassin",e.Bard="Bard",e.Brute="Brute",e.Guardian="Guardian",e.Illusionist="Illusionist",e.Mechanologist="Mechanologist",e.Merchant="Merchant",e.Ninja="Ninja",e.Ranger="Ranger",e.Runeblade="Runeblade",e.Shapeshifter="Shapeshifter",e.Warrior="Warrior",e.Wizard="Wizard",e))(_t||{}),Ot=(e=>(e.Blitz="Blitz",e.BlitzLivingLegend="Blitz (Living Legend)",e.Clash="Clash",e.ClassicConstructed="Classic Constructed",e.ClassicConstructedLivingLegend="Classic Constructed (Living Legend)",e.Commoner="Commoner",e.Draft="Draft",e.Open="Open",e.Sealed="Sealed",e.UltimatePitFight="Ultimate Pit Fight",e))(Ot||{}),zt=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(zt||{}),Nt=(e=>(e.Token="Token",e.Common="Common",e.Rare="Rare",e.SuperRare="Super Rare",e.Majestic="Majestic",e.Marvel="Marvel",e.Legendary="Legendary",e.Fabled="Fabled",e.Promo="Promo",e))(Nt||{}),Ht=(e=>(e.ArcaneRising="Arcane Rising",e.BrightLights="Bright Lights",e.CrucibleOfWar="Crucible of War",e.DuskTillDawn="Dusk till Dawn",e.Dynasty="Dynasty",e.Everfest="Everfest",e.HeavyHitters="Heavy Hitters",e.HistoryPack1="History Pack 1",e.Monarch="Monarch",e.Outsiders="Outsiders",e.PartTheMistveil="Part the Mistveil",e.TalesOfAria="Tales of Aria",e.Uprising="Uprising",e.WelcomeToRathe="Welcome to Rathe",e.ArmoryDeckKayo="Armory Deck: Kayo",e.ArmoryDeckBoltyn="Armory Deck: Boltyn",e.ArakniBlitzDeck="Arakni Blitz Deck",e.AzaleaBlitzDeck="Azalea Blitz Deck",e.BenjiBlitzDeck="Benji Blitz Deck",e.BetsyBlitzDeck="Betsy Blitz Deck",e.BoltynBlitzDeck="Boltyn Blitz Deck",e.BriarBlitzDeck="Briar Blitz Deck",e.BravoBlitzDeck="Bravo Blitz Deck",e.ChaneBlitzDeck="Chane Blitz Deck",e.DromaiBlitzDeck="Dromai Blitz Deck",e.EnigmaBlitzDeck="Enigma Blitz Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.KassaiBlitzDeck="Kassai Blitz Deck",e.KatsuBlitzDeck="Katsu Blitz Deck",e.KayoBlitzDeck="Kayo Blitz Deck",e.LeviaBlitzDeck="Levia Blitz Deck",e.LexiBlitzDeck="Lexi Blitz Deck",e.NuuBlitzDeck="Nuu Blitz Deck",e.OldhimBlitzDeck="Oldhim Blitz Deck",e.OlympiaBlitzDeck="Olympia Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.ZenBlitzDeck="Zen Blitz Deck",e.DorintheaHeroDeck="Dorinthea Hero Deck",e.KatsuHeroDeck="Katsu Hero Deck",e.RhinarHeroDeck="Rhinar Hero Deck",e.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",e.IraWelcomeDeck="Ira Welcome Deck",e.RoundTheTable="Round the Table",e.Promos="Promos",e))(Ht||{}),$t=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))($t||{}),Wt=(e=>(e.Draconic="Draconic",e.Earth="Earth",e.Elemental="Elemental",e.Ice="Ice",e.Light="Light",e.Lightning="Lightning",e.Mystic="Mystic",e.Royal="Royal",e.Shadow="Shadow",e))(Wt||{}),jt=(e=>(e.Action="Action",e.AttackReaction="Attack Reaction",e.Block="Block",e.DefenseReaction="Defense Reaction",e.DemiHero="Demi-Hero",e.Equipment="Equipment",e.Hero="Hero",e.Instant="Instant",e.Mentor="Mentor",e.Resource="Resource",e.Token="Token",e.Weapon="Weapon",e))(jt||{}),Gt=(e=>(e.OneHanded="1H",e.TwoHanded="2H",e.Affliction="Affliction",e.Ally="Ally",e.Angel="Angel",e.Arms="Arms",e.Arrow="Arrow",e.Ash="Ash",e.Attack="Attack",e.Aura="Aura",e.Axe="Axe",e.Base="Base",e.Book="Book",e.Bow="Bow",e.Chest="Chest",e.Chi="Chi",e.Claw="Claw",e.Club="Club",e.Construct="Construct",e.Dagger="Dagger",e.Demon="Demon",e.Dragon="Dragon",e.Evo="Evo",e.Fiddle="Fiddle",e.Figment="Figment",e.Flail="Flail",e.Gem="Gem",e.Gun="Gun",e.Hammer="Hammer",e.Head="Head",e.Invocation="Invocation",e.Item="Item",e.Landmark="Landmark",e.Lute="Lute",e.Legs="Legs",e.NonAttack="Non-Attack",e.OffHand="Off-Hand",e.Orb="Orb",e.Pistol="Pistol",e.Quiver="Quiver",e.Rock="Rock",e.Shuriken="Shuriken",e.Scepter="Scepter",e.Scroll="Scroll",e.Scythe="Scythe",e.Song="Song",e.Staff="Staff",e.Sword="Sword",e.Trap="Trap",e.Wrench="Wrench",e.Young="Young",e))(Gt||{}),Kt=(e=>(e.Arakni="Arakni",e.Azalea="Azalea",e.Benji="Benji",e.Betsy="Betsy",e.Blaze="Blaze",e.Boltyn="Boltyn",e.Bravo="Bravo",e.Brevant="Brevant",e.Briar="Briar",e.Brutus="Brutus",e.Chane="Chane",e.Dash="Dash",e.DataDoll="Data Doll",e.Dorinthea="Dorinthea",e.Dromai="Dromai",e.Emperor="Emperor",e.Enigma="Enigma",e.Fai="Fai",e.GenisWotchuneed="Genis Wotchuneed",e.Ira="Ira",e.Iyslander="Iyslander",e.Kano="Kano",e.Kassai="Kassai",e.Katsu="Katsu",e.Kavdaen="Kavdaen",e.Kayo="Kayo",e.Levia="Levia",e.Lexi="Lexi",e.Maxx="Maxx",e.Melody="Melody",e.Nuu="Nuu",e.Oldhim="Oldhim",e.Olympia="Olympia",e.Prism="Prism",e.Rhinar="Rhinar",e.Riptide="Riptide",e.Ruudi="Ruu'di",e.Shiyana="Shiyana",e.Squizzy="Squizzy",e.Taipanis="Taipanis",e.Taylor="Taylor",e.Teklovossen="Teklovossen",e.Theryon="Theryon",e.Uzuri="Uzuri",e.Valda="Valda",e.Victor="Victor",e.Vynnset="Vynnset",e.Viserai="Viserai",e.Yorick="Yorick",e.Yoji="Yoji",e.Zen="Zen",e))(Kt||{}),Ut=(e=>(e.Ambush="Ambush",e.Amp="Amp",e.ArcaneBarrier="Arcane Barrier",e.Awaken="Awaken",e.Battleworn="Battleworn",e.BeatChest="Beat Chest",e.BladeBreak="Blade Break",e.BloodDebt="Blood Debt",e.Boost="Boost",e.Channel="Channel",e.Charge="Charge",e.Clash="Clash",e.Cloaked="Cloaked",e.Combo="Combo",e.Contract="Contract",e.Crank="Crank",e.Crush="Crush",e.Dominate="Dominate",e.Ephemeral="Ephemeral",e.Essence="Essence",e.EvoUpgrade="Evo Upgrade",e.Freeze="Freeze",e.Fusion="Fusion",e.Galvanize="Galvanize",e.GoAgain="Go again",e.Guardwell="Guardwell",e.Heave="Heave",e.Intimidate="Intimidate",e.Legendary="Legendary",e.Material="Material",e.Modular="Modular",e.Mirage="Mirage",e.Negate="Negate",e.Opt="Opt",e.Overpower="Overpower",e.Pairs="Pairs",e.Piercing="Piercing",e.Phantasm="Phantasm",e.Protect="Protect",e.Quell="Quell",e.Reload="Reload",e.Reprise="Reprise",e.RuneGate="Rune Gate",e.Rupture="Rupture",e.Scrap="Scrap",e.Solflare="Solflare",e.Specialization="Specialization",e.Spectra="Spectra",e.Spellvoid="Spellvoid",e.Stealth="Stealth",e.Surge="Surge",e.Temper="Temper",e.Tower="Tower",e.Transform="Transform",e.Transcend="Transcend",e.Universal="Universal",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Wager="Wager",e.Ward="Ward",e))(Ut||{}),fi={"Rhinar Blitz Deck":"-Blitz"},gi=e=>{var t,r;let i=fi[e.set]||"",n=`${e.identifier}${i}`,a=e.edition?`-${e.edition}`:"",s=e.foiling?`-${e.foiling}`:"",o=e.treatment?`-${e.treatment}`:"",c=(t=e.image)!=null&&t.toLowerCase().includes("back")?"-Back":"",u=(r=e.image)!=null&&r.toLowerCase().includes("_v3")?"-V3":"";return`${n}${a}${s}${o}${c}${u}`},Yt={wtr:"Welcome to Rathe",arc:"Arcane Rising",cru:"Crucible of War",mon:"Monarch",ele:"Tales of Aria",evr:"Everfest","1hp":"History Pack 1",hp1:"History Pack 1",upr:"Uprising",dyn:"Dynasty",out:"Outsiders",dtd:"Dusk till Dawn",evo:"Bright Lights",hvy:"Heavy Hitters",mst:"Part the Mistveil"},Vt=ui(ci({},Yt),{ako:"Armory Deck: Kayo",asb:"Armory Deck: Boltyn",ara:"Arakni Blitz Deck",azl:"Azalea Blitz Deck",ben:"Benji Blitz Deck",bet:"Betsy Blitz Deck",bol:"Boltyn Blitz Deck",bri:"Briar Blitz Deck",bvo:"Bravo Blitz Deck",chn:"Chane Blitz Deck",dro:"Dromai Blitz Deck",eng:"Enigma Blitz Deck",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",ksi:"Kassai Blitz Deck",kyo:"Kayo Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi Blitz Deck",nuu:"Nuu Blitz Deck",old:"Oldhim Blitz Deck",ola:"Olympia Blitz Deck",psm:"Prism Blitz Deck",rip:"Riptide Blitz Deck",rnr:"Rhinar Blitz Deck",uzu:"Uzuri Blitz Deck",vic:"Victor Blitz Deck",zen:"Zen Blitz Deck",dvr:"Classic Battles: Rhinar vs Dorinthea",rvd:"Classic Battles: Rhinar vs Dorinthea",ira:"Ira Welcome Deck",tcc:"Round the Table",tea:"Dorinthea Hero Deck",ksu:"Katsu Hero Deck",rnr2:"Rhinar Hero Deck",fab:"Promos",her:"Promos",jdg:"Promos",lgs:"Promos",lss:"Promos",oxo:"Promos",xxx:"Promos",win:"Promos"}),ze={};for(let[e,t]of Object.entries(Vt)){let r=ze[t];r?r.push(e):ze[t]=[e]}var mi=ze});var hr=Bt((ro,pr)=>{"use strict";function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jt(Object(r),!0).forEach(function(i){$e(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function He(e){"@babel/helpers - typeof";return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},He(e)}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zt(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function O(e,t,r){return t&&Zt(e.prototype,t),r&&Zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&We(e,t)}function ve(e){return ve=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ve(e)}function We(e,t){return We=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},We(e,t)}function yi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bi(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function X(e){var t=yi();return function(){var i=ve(e),n;if(t){var a=ve(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return bi(this,n)}}function ie(e){return Ai(e)||Mi(e)||Ci(e)||ki()}function Ai(e){if(Array.isArray(e))return je(e)}function Mi(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ci(e,t){if(e){if(typeof e=="string")return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}}function je(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function ki(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V(e){return Array.isArray?Array.isArray(e):ar(e)==="[object Array]"}var Fi=1/0;function Ti(e){if(typeof e=="string")return e;var t=e+"";return t=="0"&&1/e==-Fi?"-0":t}function Si(e){return e==null?"":Ti(e)}function G(e){return typeof e=="string"}function ir(e){return typeof e=="number"}function xi(e){return e===!0||e===!1||Bi(e)&&ar(e)=="[object Boolean]"}function nr(e){return He(e)==="object"}function Bi(e){return nr(e)&&e!==null}function N(e){return e!=null}function Ne(e){return!e.trim().length}function ar(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var wi="Incorrect 'index' type",Pi=function(t){return"Invalid value for key ".concat(t)},Li=function(t){return"Pattern length exceeds max of ".concat(t,".")},Di=function(t){return"Missing ".concat(t," property in key")},Ri=function(t){return"Property 'weight' in key '".concat(t,"' must be a positive integer")},Xt=Object.prototype.hasOwnProperty,Ii=function(){function e(t){var r=this;_(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach(function(n){var a=or(n);i+=a.weight,r._keys.push(a),r._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return O(e,[{key:"get",value:function(r){return this._keyMap[r]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function or(e){var t=null,r=null,i=null,n=1,a=null;if(G(e)||V(e))i=e,t=qt(e),r=Ge(e);else{if(!Xt.call(e,"name"))throw new Error(Di("name"));var s=e.name;if(i=s,Xt.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Ri(s));t=qt(s),r=Ge(s),a=e.getFn}return{path:t,id:r,weight:n,src:i,getFn:a}}function qt(e){return V(e)?e:e.split(".")}function Ge(e){return V(e)?e.join("."):e}function Ei(e,t){var r=[],i=!1,n=function a(s,o,c){if(N(s))if(!o[c])r.push(s);else{var u=o[c],d=s[u];if(!N(d))return;if(c===o.length-1&&(G(d)||ir(d)||xi(d)))r.push(Si(d));else if(V(d)){i=!0;for(var f=0,h=d.length;f<h;f+=1)a(d[f],o,c+1)}else o.length&&a(d,o,c+1)}};return n(e,G(t)?t.split("."):t,0),i?r:r[0]}var _i={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Oi={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(t,r){return t.score===r.score?t.idx<r.idx?-1:1:t.score<r.score?-1:1}},zi={location:0,threshold:.6,distance:100},Ni={useExtendedSearch:!1,getFn:Ei,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},C=ae(ae(ae(ae({},Oi),_i),zi),Ni),Hi=/[^ ]+/g;function $i(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,r=new Map,i=Math.pow(10,t);return{get:function(a){var s=a.match(Hi).length;if(r.has(s))return r.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return r.set(s,c),c},clear:function(){r.clear()}}}var Qe=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n;_(this,e),this.norm=$i(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return O(e,[{key:"setSources",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=r}},{key:"setIndexRecords",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=r}},{key:"setKeys",value:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){r._keysMap[n.id]=a})}},{key:"create",value:function(){var r=this;this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach(function(i,n){r._addString(i,n)}):this.docs.forEach(function(i,n){r._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(r){var i=this.size();G(r)?this._addString(r,i):this._addObject(r,i)}},{key:"removeAt",value:function(r){this.records.splice(r,1);for(var i=r,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(r,i){return r[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(r,i){if(!(!N(r)||Ne(r))){var n={v:r,i,n:this.norm.get(r)};this.records.push(n)}}},{key:"_addObject",value:function(r,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(r):n.getFn(r,s.path);if(N(c)){if(V(c))(function(){for(var d=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var h=f.pop(),m=h.nestedArrIndex,y=h.value;if(N(y))if(G(y)&&!Ne(y)){var p={v:y,i:m,n:n.norm.get(y)};d.push(p)}else V(y)&&y.forEach(function(v,g){f.push({nestedArrIndex:g,value:v})})}a.$[o]=d})();else if(G(c)&&!Ne(c)){var u={v:c,n:n.norm.get(c)};a.$[o]=u}}}),this.records.push(a)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function sr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.getFn,n=i===void 0?C.getFn:i,a=r.fieldNormWeight,s=a===void 0?C.fieldNormWeight:a,o=new Qe({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(or)),o.setSources(t),o.create(),o}function Wi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.getFn,i=r===void 0?C.getFn:r,n=t.fieldNormWeight,a=n===void 0?C.fieldNormWeight:n,s=e.keys,o=e.records,c=new Qe({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function ye(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.errors,i=r===void 0?0:r,n=t.currentLocation,a=n===void 0?0:n,s=t.expectedLocation,o=s===void 0?0:s,c=t.distance,u=c===void 0?C.distance:c,d=t.ignoreLocation,f=d===void 0?C.ignoreLocation:d,h=i/e.length;if(f)return h;var m=Math.abs(o-a);return u?h+m/u:m?1:h}function ji(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C.minMatchCharLength,r=[],i=-1,n=-1,a=0,s=e.length;a<s;a+=1){var o=e[a];o&&i===-1?i=a:!o&&i!==-1&&(n=a-1,n-i+1>=t&&r.push([i,n]),i=-1)}return e[a-1]&&a-i>=t&&r.push([i,a-1]),r}var re=32;function Gi(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?C.location:n,s=i.distance,o=s===void 0?C.distance:s,c=i.threshold,u=c===void 0?C.threshold:c,d=i.findAllMatches,f=d===void 0?C.findAllMatches:d,h=i.minMatchCharLength,m=h===void 0?C.minMatchCharLength:h,y=i.includeMatches,p=y===void 0?C.includeMatches:y,v=i.ignoreLocation,g=v===void 0?C.ignoreLocation:v;if(t.length>re)throw new Error(Li(re));for(var F=t.length,x=e.length,b=Math.max(0,Math.min(a,x)),T=u,B=b,S=m>1||p,D=S?Array(x):[],L;(L=e.indexOf(t,B))>-1;){var Q=ye(t,{currentLocation:L,expectedLocation:b,distance:o,ignoreLocation:g});if(T=Math.min(Q,T),B=L+F,S)for(var E=0;E<F;)D[L+E]=1,E+=1}B=-1;for(var z=[],I=1,H=F+x,Ee=1<<F-1,te=0;te<F;te+=1){for(var fe=0,J=H;fe<J;){var Yr=ye(t,{errors:te,currentLocation:b+J,expectedLocation:b,distance:o,ignoreLocation:g});Yr<=T?fe=J:H=J,J=Math.floor((H-fe)/2+fe)}H=J;var Ct=Math.max(1,b-J+1),_e=f?x:Math.min(b+J,x)+F,ne=Array(_e+2);ne[_e+1]=(1<<te)-1;for(var $=_e;$>=Ct;$-=1){var ge=$-1,kt=r[e.charAt(ge)];if(S&&(D[ge]=+!!kt),ne[$]=(ne[$+1]<<1|1)&kt,te&&(ne[$]|=(z[$+1]|z[$])<<1|1|z[$+1]),ne[$]&Ee&&(I=ye(t,{errors:te,currentLocation:ge,expectedLocation:b,distance:o,ignoreLocation:g}),I<=T)){if(T=I,B=ge,B<=b)break;Ct=Math.max(1,2*b-B)}}var Vr=ye(t,{errors:te+1,currentLocation:b,expectedLocation:b,distance:o,ignoreLocation:g});if(Vr>T)break;z=ne}var Oe={isMatch:B>=0,score:Math.max(.001,I)};if(S){var Ft=ji(D,m);Ft.length?p&&(Oe.indices=Ft):Oe.isMatch=!1}return Oe}function Ki(e){for(var t={},r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var lr=function(){function e(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?C.location:n,s=i.threshold,o=s===void 0?C.threshold:s,c=i.distance,u=c===void 0?C.distance:c,d=i.includeMatches,f=d===void 0?C.includeMatches:d,h=i.findAllMatches,m=h===void 0?C.findAllMatches:h,y=i.minMatchCharLength,p=y===void 0?C.minMatchCharLength:y,v=i.isCaseSensitive,g=v===void 0?C.isCaseSensitive:v,F=i.ignoreLocation,x=F===void 0?C.ignoreLocation:F;if(_(this,e),this.options={location:a,threshold:o,distance:u,includeMatches:f,findAllMatches:m,minMatchCharLength:p,isCaseSensitive:g,ignoreLocation:x},this.pattern=g?t:t.toLowerCase(),this.chunks=[],!!this.pattern.length){var b=function(E,z){r.chunks.push({pattern:E,alphabet:Ki(E),startIndex:z})},T=this.pattern.length;if(T>re){for(var B=0,S=T%re,D=T-S;B<D;)b(this.pattern.substr(B,re),B),B+=re;if(S){var L=T-re;b(this.pattern.substr(L),L)}}else b(this.pattern,0)}}return O(e,[{key:"searchIn",value:function(r){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(r=r.toLowerCase()),this.pattern===r){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,r.length-1]]),s}var o=this.options,c=o.location,u=o.distance,d=o.threshold,f=o.findAllMatches,h=o.minMatchCharLength,m=o.ignoreLocation,y=[],p=0,v=!1;this.chunks.forEach(function(F){var x=F.pattern,b=F.alphabet,T=F.startIndex,B=Gi(r,x,b,{location:c+T,distance:u,threshold:d,findAllMatches:f,minMatchCharLength:h,includeMatches:a,ignoreLocation:m}),S=B.isMatch,D=B.score,L=B.indices;S&&(v=!0),p+=D,S&&L&&(y=[].concat(ie(y),ie(L)))});var g={isMatch:v,score:v?p/this.chunks.length:1};return v&&a&&(g.indices=y),g}}]),e}(),q=function(){function e(t){_(this,e),this.pattern=t}return O(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(r){return er(r,this.multiRegex)}},{key:"isSingleMatch",value:function(r){return er(r,this.singleRegex)}}]),e}();function er(e,t){var r=e.match(t);return r?r[1]:null}var Ui=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n===this.pattern;return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),r}(q),Yi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.indexOf(this.pattern),s=a===-1;return{isMatch:s,score:s?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),r}(q),Vi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),r}(q),Qi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=!n.startsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),r}(q),Ji=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),r}(q),Zi=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){var a=!n.endsWith(this.pattern);return{isMatch:a,score:a?0:1,indices:[0,n.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),r}(q),cr=function(e){Z(r,e);var t=X(r);function r(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?C.location:s,c=a.threshold,u=c===void 0?C.threshold:c,d=a.distance,f=d===void 0?C.distance:d,h=a.includeMatches,m=h===void 0?C.includeMatches:h,y=a.findAllMatches,p=y===void 0?C.findAllMatches:y,v=a.minMatchCharLength,g=v===void 0?C.minMatchCharLength:v,F=a.isCaseSensitive,x=F===void 0?C.isCaseSensitive:F,b=a.ignoreLocation,T=b===void 0?C.ignoreLocation:b;return _(this,r),n=t.call(this,i),n._bitapSearch=new lr(i,{location:o,threshold:u,distance:f,includeMatches:m,findAllMatches:p,minMatchCharLength:g,isCaseSensitive:x,ignoreLocation:T}),n}return O(r,[{key:"search",value:function(n){return this._bitapSearch.searchIn(n)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),r}(q),ur=function(e){Z(r,e);var t=X(r);function r(i){return _(this,r),t.call(this,i)}return O(r,[{key:"search",value:function(n){for(var a=0,s,o=[],c=this.pattern.length;(s=n.indexOf(this.pattern,a))>-1;)a=s+c,o.push([s,a-1]);var u=!!o.length;return{isMatch:u,score:u?0:1,indices:o}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),r}(q),Ke=[Ui,ur,Vi,Qi,Zi,Ji,Yi,cr],tr=Ke.length,Xi=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,qi="|";function en(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(qi).map(function(r){for(var i=r.trim().split(Xi).filter(function(y){return y&&!!y.trim()}),n=[],a=0,s=i.length;a<s;a+=1){for(var o=i[a],c=!1,u=-1;!c&&++u<tr;){var d=Ke[u],f=d.isMultiMatch(o);f&&(n.push(new d(f,t)),c=!0)}if(!c)for(u=-1;++u<tr;){var h=Ke[u],m=h.isSingleMatch(o);if(m){n.push(new h(m,t));break}}}return n})}var tn=new Set([cr.type,ur.type]),rn=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.isCaseSensitive,n=i===void 0?C.isCaseSensitive:i,a=r.includeMatches,s=a===void 0?C.includeMatches:a,o=r.minMatchCharLength,c=o===void 0?C.minMatchCharLength:o,u=r.ignoreLocation,d=u===void 0?C.ignoreLocation:u,f=r.findAllMatches,h=f===void 0?C.findAllMatches:f,m=r.location,y=m===void 0?C.location:m,p=r.threshold,v=p===void 0?C.threshold:p,g=r.distance,F=g===void 0?C.distance:g;_(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:h,ignoreLocation:d,location:y,threshold:v,distance:F},this.pattern=n?t:t.toLowerCase(),this.query=en(this.pattern,this.options)}return O(e,[{key:"searchIn",value:function(r){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;r=s?r:r.toLowerCase();for(var o=0,c=[],u=0,d=0,f=i.length;d<f;d+=1){var h=i[d];c.length=0,o=0;for(var m=0,y=h.length;m<y;m+=1){var p=h[m],v=p.search(r),g=v.isMatch,F=v.indices,x=v.score;if(g){if(o+=1,u+=x,a){var b=p.constructor.type;tn.has(b)?c=[].concat(ie(c),ie(F)):c.push(F)}}else{u=0,o=0,c.length=0;break}}if(o){var T={isMatch:!0,score:u/o};return a&&(T.indices=c),T}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(r,i){return i.useExtendedSearch}}]),e}(),be=[];function nn(){be.push.apply(be,arguments)}function Ue(e,t){for(var r=0,i=be.length;r<i;r+=1){var n=be[r];if(n.condition(e,t))return new n(e,t)}return new lr(e,t)}var Ae={AND:"$and",OR:"$or"},Ye={PATH:"$path",PATTERN:"$val"},Ve=function(t){return!!(t[Ae.AND]||t[Ae.OR])},an=function(t){return!!t[Ye.PATH]},on=function(t){return!V(t)&&nr(t)&&!Ve(t)},rr=function(t){return $e({},Ae.AND,Object.keys(t).map(function(r){return $e({},r,t[r])}))};function dr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),u=an(o);if(!u&&c.length>1&&!Ve(o))return s(rr(o));if(on(o)){var d=u?o[Ye.PATH]:c[0],f=u?o[Ye.PATTERN]:o[d];if(!G(f))throw new Error(Pi(d));var h={keyId:Ge(d),pattern:f};return n&&(h.searcher=Ue(f,t)),h}var m={children:[],operator:c[0]};return c.forEach(function(y){var p=o[y];V(p)&&p.forEach(function(v){m.children.push(s(v))})}),m};return Ve(e)||(e=rr(e)),a(e)}function sn(e,t){var r=t.ignoreFieldNorm,i=r===void 0?C.ignoreFieldNorm:r;e.forEach(function(n){var a=1;n.matches.forEach(function(s){var o=s.key,c=s.norm,u=s.score,d=o?o.weight:null;a*=Math.pow(u===0&&d?Number.EPSILON:u,(d||1)*(i?1:c))}),n.score=a})}function ln(e,t){var r=e.matches;t.matches=[],N(r)&&r.forEach(function(i){if(!(!N(i.indices)||!i.indices.length)){var n=i.indices,a=i.value,s={indices:n,value:a};i.key&&(s.key=i.key.src),i.idx>-1&&(s.refIndex=i.idx),t.matches.push(s)}})}function cn(e,t){t.score=e.score}function un(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.includeMatches,n=i===void 0?C.includeMatches:i,a=r.includeScore,s=a===void 0?C.includeScore:a,o=[];return n&&o.push(ln),s&&o.push(cn),e.map(function(c){var u=c.idx,d={item:t[u],refIndex:u};return o.length&&o.forEach(function(f){f(c,d)}),d})}var oe=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;_(this,e),this.options=ae(ae({},C),r),this.options.useExtendedSearch,this._keyStore=new Ii(this.options.keys),this.setCollection(t,i)}return O(e,[{key:"setCollection",value:function(r,i){if(this._docs=r,i&&!(i instanceof Qe))throw new Error(wi);this._myIndex=i||sr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(r){N(r)&&(this._docs.push(r),this._myIndex.add(r))}},{key:"remove",value:function(){for(var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){return!1},i=[],n=0,a=this._docs.length;n<a;n+=1){var s=this._docs[n];r(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(r){this._docs.splice(r,1),this._myIndex.removeAt(r)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.limit,a=n===void 0?-1:n,s=this.options,o=s.includeMatches,c=s.includeScore,u=s.shouldSort,d=s.sortFn,f=s.ignoreFieldNorm,h=G(r)?G(this._docs[0])?this._searchStringList(r):this._searchObjectList(r):this._searchLogical(r);return sn(h,{ignoreFieldNorm:f}),u&&h.sort(d),ir(a)&&a>-1&&(h=h.slice(0,a)),un(h,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(r){var i=Ue(r,this.options),n=this._myIndex.records,a=[];return n.forEach(function(s){var o=s.v,c=s.i,u=s.n;if(N(o)){var d=i.searchIn(o),f=d.isMatch,h=d.score,m=d.indices;f&&a.push({item:o,idx:c,matches:[{score:h,value:o,norm:u,indices:m}]})}}),a}},{key:"_searchLogical",value:function(r){var i=this,n=dr(r,this.options),a=function u(d,f,h){if(!d.children){var m=d.keyId,y=d.searcher,p=i._findMatches({key:i._keyStore.get(m),value:i._myIndex.getValueForItemAtKeyId(f,m),searcher:y});return p&&p.length?[{idx:h,item:f,matches:p}]:[]}for(var v=[],g=0,F=d.children.length;g<F;g+=1){var x=d.children[g],b=u(x,f,h);if(b.length)v.push.apply(v,ie(b));else if(d.operator===Ae.AND)return[]}return v},s=this._myIndex.records,o={},c=[];return s.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var h=a(n,d,f);h.length&&(o[f]||(o[f]={idx:f,item:d,matches:[]},c.push(o[f])),h.forEach(function(m){var y,p=m.matches;(y=o[f].matches).push.apply(y,ie(p))}))}}),c}},{key:"_searchObjectList",value:function(r){var i=this,n=Ue(r,this.options),a=this._myIndex,s=a.keys,o=a.records,c=[];return o.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var h=[];s.forEach(function(m,y){h.push.apply(h,ie(i._findMatches({key:m,value:d[y],searcher:n})))}),h.length&&c.push({idx:f,item:d,matches:h})}}),c}},{key:"_findMatches",value:function(r){var i=r.key,n=r.value,a=r.searcher;if(!N(n))return[];var s=[];if(V(n))n.forEach(function(m){var y=m.v,p=m.i,v=m.n;if(N(y)){var g=a.searchIn(y),F=g.isMatch,x=g.score,b=g.indices;F&&s.push({score:x,key:i,value:y,idx:p,norm:v,indices:b})}});else{var o=n.v,c=n.n,u=a.searchIn(o),d=u.isMatch,f=u.score,h=u.indices;d&&s.push({score:f,key:i,value:o,norm:c,indices:h})}return s}}]),e}();oe.version="6.6.2";oe.createIndex=sr;oe.parseIndex=Wi;oe.config=C;oe.parseQuery=dr;nn(rn);var dn=oe;pr.exports=dn});var qa={};ri(qa,{PUNCTUATION:()=>w,abbreviations:()=>Xe,availableExclusions:()=>Nr,availableModifiers:()=>zr,clashBannedCards:()=>Je,clashSpecializationOverrides:()=>Ze,default:()=>Wr,filterCard:()=>jr,filtersToCardPropertyMappings:()=>De,getAbbreviation:()=>Ce,getAbbreviationByCard:()=>pn,getCardByName:()=>ft,getCleanText:()=>bt,getDeckFilters:()=>ba,getExcludedMetaFilters:()=>at,getHeroBreakdown:()=>Qa,getKeywordsAndAppliedFiltersFromText:()=>ht,getMetaFilters:()=>nt,getNormalizedText:()=>he,getRelatedCards:()=>Mt,getRelatedCardsByName:()=>Re,getTokensReferencedByCards:()=>Xa,heroHasFilters:()=>Aa,multiWordShorthands:()=>st,shorthands:()=>ot,singleWordShorthands:()=>lt});module.exports=ii(qa);var P=W(j()),gt=W(hr());var Me=W(j()),Je=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Ze=[{heroes:[Me.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[Me.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[Me.Hero.Prism],cardIdentifiers:["figment-of-erudition-yellow","figment-of-judgment-yellow","figment-of-protection-yellow","figment-of-ravages-yellow","figment-of-rebirth-yellow","figment-of-tenacity-yellow","figment-of-triumph-yellow","figment-of-war-yellow"]}];var w=/[!"#$%&'’()+,-./:;<=>?@[\]^_`|~]/g;var k=W(j());var Ce=e=>Xe.find(({abbreviations:t})=>t.find(r=>r.toLowerCase()===e)),pn=e=>Xe.find(({card:t})=>t.toLowerCase()===e.name.toLowerCase()),Xe=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DPot","D Pot"],card:"Potion of Deja Vu"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LoW"],card:"Lord of Wind"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats"],card:"Restless Coalescence"},{abbreviations:["SFaF","S4aS"],card:"Scar for a Scar"},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var l=W(j());var xe=Array.from(Array(50).keys()).map(e=>`${e}`),A=(e,t=[])=>{let r=[...e,l.Class.Generic];return t.length>0&&r.push(l.Class.NotClassed),[{filterToPropertyMapping:{property:"classes",isArray:!0},values:r.map(i=>i.toLowerCase()),isOr:!0},hn(t)]},M=(e,t=[])=>{let r=Object.values(l.Hero).filter(i=>i!==e&&!t.includes(i)).map(i=>i.toLowerCase());return[{filterToPropertyMapping:{property:"hero",isString:!0},values:r,excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"specializations",isArray:!0},values:r,excluded:!0,isOr:!0}]},hn=e=>{let t=Object.values(l.Talent).filter(r=>!e.includes(r)).map(r=>r.toLowerCase());return{filterToPropertyMapping:{property:"talents",isArray:!0},values:t,excluded:!0}},Be=[l.Talent.Draconic],fn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice,l.Talent.Lightning],gn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice],mn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Lightning],yn=[l.Talent.Elemental,l.Talent.Ice],vn=[l.Talent.Elemental,l.Talent.Ice,l.Talent.Lightning],tt=[l.Talent.Light],rt=[l.Talent.Mystic],it=[l.Talent.Shadow],bn=[...A([l.Class.Assassin]),...M(l.Hero.Arakni)],An=[...A([l.Class.Ranger]),...M(l.Hero.Azalea)],Mn=[...A([l.Class.Ninja]),...M(l.Hero.Benji)],Cn=[...A([l.Class.Guardian]),...M(l.Hero.Betsy)],kn=[...A([l.Class.Wizard]),...M(l.Hero.Blaze)],Fn=[...A([l.Class.Warrior],tt),{filterToPropertyMapping:{property:"subtypes",isArray:!0,partialMatch:!0},values:["angel"],excluded:!0,isOr:!0},...M(l.Hero.Boltyn)],Tn=[...A([l.Class.Guardian]),...M(l.Hero.Bravo)],Sn=[...A([l.Class.Guardian]),...M(l.Hero.Brevant)],xn=[...A([l.Class.Runeblade],mn),...M(l.Hero.Briar)],Bn=[...A([l.Class.Adjudicator]),...M(l.Hero.Brutus)],wn=[...A([l.Class.Runeblade],it),...M(l.Hero.Chane)],Pn=[...A([l.Class.Mechanologist]),...M(l.Hero.Dash)],qe=[...A([l.Class.Mechanologist]),...M(l.Hero.DataDoll)],fr=[...A([l.Class.Warrior]),...M(l.Hero.Dorinthea)],Ln=[...A([l.Class.Illusionist],Be),...M(l.Hero.Dromai,[l.Hero.Fai])],Dn=[...A([l.Class.Warrior,l.Class.Wizard],Be),{filterToPropertyMapping:{property:"pitch",isNumber:!0},values:[void 0,"0","2","3"],cardTypes:[l.Type.Action,l.Type.AttackReaction,l.Type.DefenseReaction,l.Type.Instant,l.Type.Mentor,l.Type.Resource],excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","mentor"],excluded:!0,isOr:!0},...M(l.Hero.Emperor)],Rn=[...A([l.Class.Illusionist],rt),...M(l.Hero.Enigma)],In=[...A([l.Class.Ninja],Be),...M(l.Hero.Fai,[l.Hero.Dromai])],gr=[...A([l.Class.Merchant]),...M(l.Hero.GenisWotchuneed)],En=[...A([l.Class.Ninja]),...M(l.Hero.Ira)],mr=[...A([l.Class.Wizard],yn),...M(l.Hero.Iyslander)],_n=[...A([l.Class.Wizard]),...M(l.Hero.Kano)],On=[...A([l.Class.Warrior]),...M(l.Hero.Kassai)],zn=[...A([l.Class.Ninja]),...M(l.Hero.Katsu)],Nn=[...A([l.Class.Merchant]),...M(l.Hero.Kavdaen)],Hn=[...A([l.Class.Brute]),...M(l.Hero.Kayo)],$n=[...A([l.Class.Brute],it),...M(l.Hero.Levia)],Wn=[...A([l.Class.Ranger],vn),...M(l.Hero.Lexi)],jn=[...A([l.Class.Mechanologist]),...M(l.Hero.Maxx)],Gn=[...A([l.Class.Bard]),...M(l.Hero.Melody)],Kn=[...A([l.Class.Assassin],rt),...M(l.Hero.Nuu)],Un=[...A([l.Class.Guardian],gn),...M(l.Hero.Oldhim)],Yn=[...A([l.Class.Warrior]),...M(l.Hero.Olympia)],Vn=[...A([l.Class.Illusionist],tt),...M(l.Hero.Prism)],Qn=[...A([l.Class.Brute]),...M(l.Hero.Rhinar)],Jn=[...A([l.Class.Ranger]),...M(l.Hero.Riptide)],Zn=[...A([l.Class.Merchant]),...M(l.Hero.Ruudi)],Xn=[{filterToPropertyMapping:{property:"classes",isArray:!0},values:["generic"],isOr:!0}],qn=[...A([l.Class.Merchant]),...M(l.Hero.Squizzy)],ea=[...A([l.Class.Guardian],fn),...M(l.Hero.Bravo)],ta=[...A([l.Class.Adjudicator],Be),...M(l.Hero.Taipanis)],ra=[...A([]),...M(l.Hero.Taylor)],ia=[...A([l.Class.Mechanologist]),...M(l.Hero.Teklovossen)],na=[...A([l.Class.Adjudicator],tt),...M(l.Hero.Theryon)],aa=[...A([l.Class.Assassin]),...M(l.Hero.Uzuri)],oa=[...A([l.Class.Guardian]),...M(l.Hero.Valda)],sa=[...A([l.Class.Guardian]),...M(l.Hero.Victor)],la=[...A([l.Class.Runeblade]),...M(l.Hero.Viserai)],ca=[...A([l.Class.Runeblade],it),...M(l.Hero.Vynnset)],ua=[...A([l.Class.Bard]),...M(l.Hero.Yorick)],da=[...A([l.Class.Guardian]),...M(l.Hero.Yoji)],pa=[...A([l.Class.Ninja],rt),...M(l.Hero.Zen)],ha=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],yr=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],fa=[{filterToPropertyMapping:{property:"rarities",isArray:!0},values:["super rare","majestic","legendary","fabled"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],ke=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],se=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],ga=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["commoner"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],et=[{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],de={blitz:ha,"blitz ll":yr,"blitz living legend":yr,clash:fa,cc:ke,classic:ke,"classic constructed":ke,ll:se,"living legend":se,"cc ll":se,"ll cc":se,"classic constructed ll":se,"classic constructed living legend":se,constructed:ke,commoner:ga,upf:et,ultimate:et,"ultimate pit fight":et,arakni:bn,azalea:An,benji:Mn,betsy:Cn,blaze:kn,boltyn:Fn,bravo:Tn,brevant:Sn,briar:xn,brutus:Bn,chane:wn,dash:Pn,data:qe,"data doll":qe,datadoll:qe,dori:fr,dorinthea:fr,dromai:Ln,emperor:Dn,enigma:Rn,fai:In,genis:gr,geniswotchuneed:gr,ira:En,iyslander:mr,islander:mr,kano:_n,kassai:On,katsu:zn,kavdaen:Nn,kayo:Hn,levia:$n,lexi:Wn,maxx:jn,melody:Gn,nuu:Kn,oldhim:Un,olympia:Yn,prism:Vn,rhinar:Qn,riptide:Jn,ruudi:Zn,shiyana:Xn,squizzy:qn,starvo:ea,taipanis:ta,taylor:ra,teklovossen:ia,theryon:na,uzuri:aa,valda:oa,victor:sa,viserai:la,vynnset:ca,yorick:ua,yoji:da,zen:pa},Fe=["common","rare","super rare","majestic","legendary","fabled"],ma=(e,t,r)=>{let i=[];if(!t)i.push(...e);else for(let n of e)switch(t){case">=":let a=!1;for(let u of Fe)a?i.push(u):u===n&&(a=!0,i.push(u));break;case">":let s=!1;for(let u of Fe)s?i.push(u):u===n&&(s=!0);break;case"<=":let o=!1;for(let u of Fe.slice().reverse())o?i.push(u):u===n&&(o=!0,i.push(u));break;case"<":let c=!1;for(let u of Fe.slice().reverse())c?i.push(u):u===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:r}},ya=(e,t)=>{let r=[];for(let i of e)if(de[i]){let n=de[i];for(let a of n){let s=Y({},a);t&&!a.filterToPropertyMapping.isString&&(s.excluded=!a.excluded),r.push(s)}}return r},nt=(e,t,r,i)=>{let n=[];return Ca(t)?n.push(...ya(r,e)):Fa(t)&&n.push(ma(r,i,e)),n},le=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:xe,excluded:!0},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0}],K=[{filterToPropertyMapping:{property:"defense",isNumber:!0},values:xe,excluded:!0},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["hero","placeholder","token","weapon"],excluded:!0}],Te=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:xe},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],ee=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:xe},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},values:["*","x"],excluded:!0},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token"],excluded:!0}],Se=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(l.Talent).map(e=>e.toLowerCase())}],va={"!co":le,"-co":le,"!cost":le,"-cost":le,"!color":le,"-color":le,"!b":K,"-b":K,"!block":K,"-block":K,"!d":K,"-d":K,"!def":K,"-def":K,"!defense":K,"-defense":K,"!pitch":Te,"-pitch":Te,"!p":Te,"-p":Te,"!attack":ee,"-attack":ee,"!power":ee,"-power":ee,"!pwr":ee,"-pwr":ee,"!pow":ee,"-pow":ee,"!talents":Se,"-talents":Se,"!tal":Se,"-tal":Se},at=e=>{let t=[],r=va[e];return r&&t.push(...r),t},ba=(e,t)=>[...de[e.toLowerCase()],...t?de[t.toLowerCase()]:[]],Aa=e=>{var t;return((t=de[e.toLowerCase().split(" ")[0]])==null?void 0:t.length)>0},Ma=["l","legal","hero"],Ca=e=>Ma.includes(e),ka=["r","rarity"],Fa=e=>ka.includes(e);var ot=[{description:"Attack actions",filters:["st:attack"],shorthands:["AA"]},{description:"Arcane barrier",filters:['k:"arcane barrier"'],shorthands:["AB"]},{description:"Attack reactions",filters:['t:"attack reaction"'],shorthands:["AR"]},{description:"Defense reactions",filters:['t:"defense reaction"'],shorthands:["DR"]},{description:"Go again",filters:['k:"go again"'],shorthands:["GA"]},{description:"Non-attack actions",filters:["t:action","st:nonattack"],shorthands:["NAA"]},{description:"Plus defense",filters:["+ {d}"],shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Plus power",filters:["+ {p}"],shorthands:["Pumps","Pump","Buff","Buffs","Pump attack","Pump attacks","Pumps attack","Pumps attacks","Buff attack","Buff attacks","Buffs attack","Buffs attacks","Pump power","Pumps power","Buff power","Buffs power"]},{description:"Poppers",filters:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],helper:'6+ power non-Illusionist attacks that can "pop" phantasm attacks when defending',shorthands:["Poppers","Popper"]},{description:"Spellvoid",filters:['k:"spellvoid"'],shorthands:["SV"]}],st=ot.filter(({shorthands:e})=>e.some(t=>t.includes(" "))).map(e=>ue(Y({},e),{shorthands:e.shorthands.filter(t=>t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)})),lt=ot.filter(({shorthands:e})=>e.some(t=>!t.includes(" "))).map(e=>ue(Y({},e),{shorthands:e.shorthands.filter(t=>!t.includes(" ")).map(t=>t.toLowerCase()).sort((t,r)=>r.length-t.length)}));var zr=[">=",">","<=","<"],Nr=["!","-"],ct={property:"artists",isArray:!0,partialMatch:!0},vr={property:"bannedFormats",isArray:!0,partialMatch:!0},Ta={property:"n/a"},br={property:"classes",isArray:!0,partialMatch:!0},Ar={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},pe={property:"defense",specialProperty:"specialDefense",isNumber:!0},Mr={nestedProperty:"foiling",property:"printings",isArray:!0},Cr={property:"fusions",isArray:!0},kr={property:"intellect",isNumber:!0},Fr={property:"keywords",isArray:!0,partialMatch:!0},ut={property:"n/a",isMeta:!0},Tr={property:"life",specialProperty:"specialLife",isNumber:!0},Sr={property:"name",isString:!0},dt={property:"pitch",isNumber:!0},we={property:"power",specialProperty:"specialPower",isNumber:!0},xr={property:"n/a",isMeta:!0},Sa={property:"n/a"},xa={property:"n/a"},Br={property:"sets",isArray:!0,partialMatch:!0},Pe={property:"specializations",isArray:!0,partialMatch:!0},wr={property:"subtypes",isArray:!0},Pr={property:"types",isArray:!0},Lr={property:"talents",isArray:!0},Ba={property:"functionalText",isString:!0,partialMatch:!0},wa={property:"typeText",isString:!0,partialMatch:!0},Le={nestedProperty:"treatment",property:"printings",isArray:!0},De={a:ct,artist:ct,art:ct,attack:we,b:pe,block:pe,banned:vr,c:br,class:br,chain:Ta,co:Ar,cost:Ar,color:dt,d:pe,def:pe,defense:pe,f:Cr,fusion:Cr,foil:Mr,foiling:Mr,i:kr,intellect:kr,k:Fr,keyword:Fr,l:ut,legal:ut,hero:ut,li:Tr,life:Tr,n:Sr,name:Sr,p:dt,pitch:dt,pwr:we,pow:we,power:we,r:xr,rarity:xr,referencedby:Sa,references:xa,rf:vr,s:Br,set:Br,sp:Pe,spec:Pe,specialization:Pe,specializations:Pe,st:wr,subtype:wr,t:Pr,type:Pr,tal:Lr,talent:Lr,text:Ba,treat:Le,treatment:Le,var:Le,variation:Le,x:wa},Pa=[{text:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:k.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(w,"")}],La=e=>{var n;let t=[],r=e;for(let{text:a,override:s}of Pa)r.includes(a)&&(r=r.replace(a,s));if((n=Ce(r))==null?void 0:n.card)t.push(r);else{let a=r.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?t.push(c):o===1&&(s+=" "+c);o===2&&(t.push(s.trim().replaceAll('"',"")),s="",o=0)}return t},Da=[k.Hero.Briar,k.Hero.Brutus,k.Hero.Emperor,k.Hero.Prism,k.Hero.Shiyana,k.Hero.Taylor,k.Hero.Yorick],ht=(e,t)=>{var h;let r=e.trim().toLowerCase();for(let{filters:m,shorthands:y}of st)for(let p of y)if(r.includes(p)){r=r.replace(p,m.join(" "));break}let i=La(r),n=[];for(let m of i){let y=lt.find(({shorthands:p})=>p.includes(m));y?n.push(...y.filters):n.push(m)}let a=[],s=[],o=[],c=[],u=[],d=[],f={isClash:!1,heroes:[]};for(let m of n)if($a(m)){let[y,p]=m.split(":"),{modifier:v,values:g,isAnd:F,isOr:x}=Na(p),{filterKey:b,excluded:T,isMeta:B}=Ha(y);if(B){if(["rarity","r"].includes(b)&&(g=za(g)),["legal","l","hero"].includes(b)){for(let S of Da)p.includes(S.toLowerCase())&&(f.heroes.includes(S)||f.heroes.push(S));p.includes("clash")&&(f.isClash=!0)}a.push(...nt(T,b,g,v))}else{if(["chain"].includes(b)){let S=I=>I.name.toLowerCase().replaceAll(w,""),D=g.map(I=>ft(I,t)).filter(I=>!!I).map(S),L=new Set(D);b="name",x=!0;let Q=20,E=0,z=I=>{if(!I.types.includes(k.Type.Hero)){let H=S(I);L.add(H),D.includes(H)||D.push(H)}};for(let I of D){if(E>Q)break;let{referencedBy:H,references:Ee}=Re(I,t);Ee.forEach(z),E===0&&H.forEach(z),E++}g=Array.from(L)}else if(["referencedby","references"].includes(b)){let S=b,D=[...g].filter(L=>!!L);g=[],b="name",x=!0;for(let L of D){let{referencedBy:Q,references:E}=Re(L,t);["referencedby"].includes(S)?g.push(...E.map(({name:z})=>z.toLowerCase().replaceAll(w,""))):["references"].includes(S)&&g.push(...Q.map(({name:z})=>z.toLowerCase().replaceAll(w,"")))}}else["art","artist"].includes(b)?s=g:["foiling","foil"].includes(b)?(c=_a(g),g=c.map(S=>S.toLowerCase())):["treat","treatment","var","variation"].includes(b)?(d=Oa(g),g=d.map(S=>S.toLowerCase())):["set","s"].includes(b)?(u=Ra(g),g=u.map(S=>S.toLowerCase().replaceAll(w,""))):["pitch","p","color"].includes(b)&&(g=Ea(g));De[b]&&a.push({filterToPropertyMapping:De[b],values:g,isAnd:F,isOr:x,modifier:v,excluded:T})}}else if(m){let y=(h=Ce(m))==null?void 0:h.card,p=at(m);y?o.push(`"${y.toLowerCase().replace(w,"")}"`):p&&p.length>0?a.push(...p):o.push(m.replace(w,""))}return{appliedFilters:a,attributes:{artists:s,foilings:c,releases:u,treatments:d},keywords:o,specialConditions:f}},Ra=e=>{let t=[];for(let r of e)t.push(...Ia(r));return t},Ia=e=>{let t=[],r=Object.values(k.Release).find(i=>i.toLowerCase().replaceAll(w,"")===e);if(r&&t.push(r),t.length===0){let i=k.setIdentifierToSetMappings[e];i&&t.push(i)}if(t.length===0){let i=Object.values(k.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&t.push(...i)}return t},pt={blue:3,yellow:2,red:1,white:0},Ea=e=>{let t=[];for(let r of e)pt[r]||pt[r]===0?t.push(pt[r].toString()):t.push(r);return t},Dr={r:k.Foiling.R,rf:k.Foiling.R,rainbow:k.Foiling.R,c:k.Foiling.C,cf:k.Foiling.C,cold:k.Foiling.C,g:k.Foiling.G,gf:k.Foiling.G,gold:k.Foiling.G},_a=e=>{let t=[];for(let r of e)Dr[r]&&t.push(Dr[r]);return t},Rr=ue(Y({},Object.values(k.Treatment).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{})),{aa:k.Treatment.AA,alt:k.Treatment.AA,"alt art":k.Treatment.AA,ab:k.Treatment.AB,"alt border":k.Treatment.AB,at:k.Treatment.AT,"alt text":k.Treatment.AT,ea:k.Treatment.EA,extended:k.Treatment.EA,"extended art":k.Treatment.EA,fa:k.Treatment.FA,full:k.Treatment.FA,"full art":k.Treatment.FA}),Oa=e=>{let t=[];for(let r of e)Rr[r]?t.push(Rr[r]):k.Treatment[r.toUpperCase()]&&t.push(k.Treatment[r.toUpperCase()]);return t},Ir={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},za=e=>{let t=[];for(let r of e)Ir[r]?t.push(Ir[r]):t.push(r);return t},Na=e=>{let t=[],r,i,n=zr.find(a=>e.includes(a));if(n){let[,a]=e.split(n);Er(a)?(r=!0,t.push(...a.trim().split("+").map(s=>s.replace(w,"")))):_r(a)?(i=!0,t.push(...a.trim().split(",").map(s=>s.replace(w,"")))):t.push(a.trim().replace(w,""))}else Er(e)?(r=!0,t.push(...e.trim().split("+").map(a=>a.replace(w,"")))):_r(e)?(i=!0,t.push(...e.trim().split(",").map(a=>a.replace(w,"")))):e.startsWith('"')&&e.endsWith('"')?t.push(e.trim().replaceAll('"',"").replace(w,"")):t.push(e.trim().replace(w,""));return{modifier:n,values:t,isAnd:r,isOr:i}},Ha=e=>{let t=Wa(e);if(t){let[,r]=e.split(t);return{excluded:!0,filterKey:r,isMeta:Or(r)}}else return{excluded:!1,filterKey:e,isMeta:Or(e)}},$a=e=>e.indexOf(":")>=0,Er=e=>e.indexOf("+")>=0,_r=e=>e.indexOf(",")>=0,Or=e=>{var t;return!!((t=De[e])!=null&&t.isMeta)},Wa=e=>{var t;return(t=Nr.find(r=>e.includes(r)))==null?void 0:t.slice(0,1)};var R=W(j()),Hr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[R.Class.Generic],defaultImage:"FNG000",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",printings:[{artist:"Hoodwill",identifier:"FNG000",image:"FNG000",print:"FNG000",set:R.Release.Promos},{artist:"Hoodwill",identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${R.Treatment.FA}`,set:R.Release.Promos,treatment:R.Treatment.FA}],name:"Fangs A Lot",rarities:[R.Rarity.Rare],rarity:R.Rarity.Rare,sets:[R.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[R.Subtype.Attack],types:[R.Type.Action],typeText:"Generic Action - Attack"},$r=[{keyword:Hr.name.toLowerCase(),card:Hr}];var mt=W(j());var yt=class{constructor(t){this.search=(t,r)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=ht(t,this.cards),c=s.join(" "),u=r?$r.filter(p=>p.keyword===c):[];if(u.length>0?i=u.map(({card:p})=>p):s.length?i=this.fuse.search(c).map(p=>p.item):i=[...this.cards],n.length&&(i=i.filter(p=>p&&jr(p,n,o)),n.some(({excluded:p,values:v})=>!p&&v.includes(P.Format.ClassicConstructed.toLowerCase()))&&(i=i.filter(p=>!p.young)),n.some(({excluded:p,values:v})=>!p&&(v.includes(P.Format.Blitz.toLowerCase())||v.includes(P.Format.Commoner.toLowerCase())))&&(i=i.filter(p=>{let{types:v,young:g}=p;return!(v.includes(P.Type.Hero)&&!g)}))),s.length===0){let p="";if(a.releases.length===1)try{let v=a.releases[0];p=P.setToSetIdentifierMappings[v][0].toUpperCase()}catch(v){console.error("Error getting set identifier from search",v)}p?i.sort((v,g)=>{var b,T;let F=(b=v.setIdentifiers.find(B=>B.includes(p)))==null?void 0:b.replace(p,""),x=(T=g.setIdentifiers.find(B=>B.includes(p)))==null?void 0:T.replace(p,"");return F&&x?F.localeCompare(x):-1}):i.sort((v,g)=>v.name===g.name?`${v.pitch}`.localeCompare(`${g.pitch}`):v.name.localeCompare(g.name))}else{let p=[],v=[],g=s.map(F=>F.toLowerCase().replace(w,"")).join(" ");for(let F of i)F.name.toLowerCase().replace(w,"")===g?p.push(F):v.push(F);i=[...p,...v]}let d,{artists:f,foilings:h,releases:m,treatments:y}=a;return(f.length>0||h.length>0||m.length>0||y.length>0)&&(d=i.map(p=>{let v=p.printings.filter(g=>{let F=!!g.image,x=f.length===0||f.some(S=>g.artist.replace(w,"").toLowerCase().includes(S)),b=h.length===0||h.includes(g.foiling),T=m.length===0||m.includes(g.set),B=y.length===0||y.includes(g.treatment);return F&&x&&b&&T&&B});return Y({matchingPrintings:v},p)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:d||i}};let r={getFn:(i,n)=>{let a=gt.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>he(s.replace(w,""))):he(a).replace(w,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"setIdentifiers",weight:2},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.cards=[...t],this.fuse=new gt.default([...t],r)}},Wr=yt,jr=(e,t,r)=>{var n,a,s,o;let i=!0;for(let c of t){let{isNumber:u,isString:d,isArray:f,isBoolean:h,property:m}=c.filterToPropertyMapping;if((u&&!ja(e,c)||d&&!Ga(e,c)||f&&!Ka(e,c)||h&&!Ua(e,c))&&(i=!1),r.isClash&&["rarities","bannedFormats"].includes(m)){let b=[P.Rarity.SuperRare,P.Rarity.Majestic,P.Rarity.Legendary,P.Rarity.Fabled].some(L=>e.rarities.includes(L)),T=!1;for(let{cardIdentifiers:L,heroes:Q}of Ze)for(let E of r.heroes)Q.includes(E)&&L.includes(e.cardIdentifier)&&(T=!0);let B=!!e.specializations&&e.specializations.length>0||T,S=[P.Type.Mentor,P.Type.Weapon].some(L=>e.types.includes(L)),D=Je.includes(e.name);!i&&!D&&(B||S)&&b&&(i=!0),D&&(i=!1)}if(r.isClash&&r.heroes.includes(P.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i&&r.heroes.includes(P.Hero.Brutus)){let b=((n=e.specializations)==null?void 0:n.length)>0;((a=e.keywords)==null?void 0:a.includes(mt.Keyword.Clash))&&!b&&(i=!0)}if(!i&&r.heroes.includes(P.Hero.Shiyana)&&["classes"].includes(m)){let b=((s=e.specializations)==null?void 0:s.length)>0,T=e.types.includes(P.Type.Token),B=e.cardIdentifier==="cracked-bauble-yellow",S=(o=e.keywords)==null?void 0:o.includes(mt.Keyword.Ephemeral);(b||T||B||S)&&(i=!0)}let g=e.types.includes(P.Type.Equipment);if(!i&&r.heroes.includes(P.Hero.Taylor)&&g&&g&&(i=!0),!i&&r.heroes.includes(P.Hero.Yorick)&&(["classes"].includes(m)||["talents"].includes(m))&&e.types.includes(P.Type.Token)&&(i=!0),!i)break}return i},ja=(e,t)=>{var r;if(Ie(t,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=vt(e,t);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(h=>o>=parseInt(h));return a?!c:c;case">":let u=i==null?void 0:i.some(h=>o>parseInt(h));return a?!u:u;case"<=":let d=i==null?void 0:i.some(h=>o<=parseInt(h));return a?!d:d;case"<":let f=i==null?void 0:i.some(h=>o<parseInt(h));return a?!f:f;default:return!1}else{let c=i==null?void 0:i.some(u=>o===parseInt(u));return a?!c:c}else{let c=(r=Va(e,t))==null?void 0:r.toLowerCase(),u=s?i==null?void 0:i.some(d=>c==null?void 0:c.includes(d)):i==null?void 0:i.some(d=>c===d);return a?!u:u}}else return!0},Ga=(e,t)=>{var r;if(Ie(t,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=t,o=(r=vt(e,t))==null?void 0:r.replaceAll(w,"");if(s){let c=n?i==null?void 0:i.every(u=>o==null?void 0:o.toLowerCase().includes(u)):i==null?void 0:i.some(u=>o==null?void 0:o.toLowerCase().includes(u));return a?!c:c}else{let c=n?i==null?void 0:i.every(u=>(o==null?void 0:o.toLowerCase())===u):i==null?void 0:i.some(u=>(o==null?void 0:o.toLowerCase())===u);return a?!c:c}}else return!0},Ka=(e,t)=>{if(Ie(t,e)){let{values:r,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=t,s=Ya(e,t).map(o=>o==null?void 0:o.replaceAll(w,""));if(a){let o=i?r.every(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))):r.some(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))),c=s.length===0;return n?!o||c:o}else{let o=i?r.every(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c)):r.some(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c));return n?!o:o}}else return!0},Ua=(e,t)=>{if(Ie(t,e)){let{excluded:r}=t,i=vt(e,t);return r?!i:i}else return!0},vt=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.property]},Ya=(e,t)=>{let{filterToPropertyMapping:{nestedProperty:r,property:i}}=t,n=e[i]||[];return r?n.map(a=>a[r]).filter(a=>!!a):n},Va=(e,t)=>{let{filterToPropertyMapping:r}=t;return e[r.specialProperty]},Ie=({cardTypes:e},{types:t,subtypes:r})=>!e||(e==null?void 0:e.some(i=>t.map(n=>n.toLowerCase()).includes(i.toLowerCase())||r.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var ft=(e,t)=>{let r=t.find(i=>bt(i.name)===e);return r||(r=t.find(i=>bt(i.name).includes(e))),r},bt=e=>he(e.toLowerCase().trim().replace(w,"")),he=e=>e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"");var U=W(j()),Qa=e=>{let t=e.filter(o=>o.types.includes(U.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),r=t.filter(o=>!o.young&&!o.classes.includes(U.Class.Adjudicator)),i=t.filter(o=>{let c=o.rarities.some(d=>d!==U.Rarity.Promo),u=o.sets.some(d=>d!==U.Release.Promos);return c||u}),n=t.filter(o=>{let c=o.rarities.every(d=>d===U.Rarity.Promo),u=o.sets.every(d=>d===U.Release.Promos);return c&&u}),a=t.filter(o=>o.young),s=a.filter(({hero:o})=>!r.find(c=>c.hero===o));return{all:t,adult:r,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var Ur=W(j());var At=W(j()),Ja={"Dawnblade, Resplendent":"Dawnblade"},Gr=e=>Ja[e.name]||e.name,Kr=e=>{var t;return(t=e.functionalText)==null?void 0:t.replaceAll(e.name,"")},Re=(e,t)=>{let r=t.find(i=>i.name.toLowerCase().replace(w,"")===e);return r||(r=t.find(i=>i.name.toLowerCase().replace(w,"").includes(e))),Mt(r,t)},Mt=(e,t)=>{var a,s;let r=[],i=[],n=[];if(e){let o=[],c=[],u=Gr(e);for(let d of t){let f=Gr(d),h=u===f,m=e.pitch!==d.pitch;if(h&&m)r.push(d);else if(!h){let y=e.name==="Seismic Surge",p=(a=d.keywords)==null?void 0:a.includes(At.Keyword.Heave),v=y&&p,g=Kr(d),F=g==null?void 0:g.includes(u),x=Kr(e),b=x==null?void 0:x.includes(f);(F||v)&&o.push(d);let T=d.name==="Seismic Surge",B=(s=e.keywords)==null?void 0:s.includes(At.Keyword.Heave);(b||T&&B)&&c.push(d)}}for(let d of o)i.push(d);for(let d of c){let f=d.name;u!==f&&!c.some(h=>{let m=h.name;return m!==f&&m.includes(f)})&&n.push(d)}}return{otherPitches:r,referencedBy:i,references:n}},Za=["cash-in-yellow"],Xa=(e,t,r)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!Za.includes(a))){let{references:a}=Mt(n,t);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",u=r===Ur.Hero.Maxx;return!c||u}))i.add(s)}return Array.from(i)};0&&(module.exports={PUNCTUATION,abbreviations,availableExclusions,availableModifiers,clashBannedCards,clashSpecializationOverrides,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getDeckFilters,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,heroHasFilters,multiWordShorthands,shorthands,singleWordShorthands});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flesh-and-blood/search",
|
|
3
3
|
"description": "TypeScript search engine for Flesh and Blood cards",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.9",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"fuse.js": "^6.6.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@flesh-and-blood/cards": "^2.1.
|
|
19
|
+
"@flesh-and-blood/cards": "^2.1.9",
|
|
20
20
|
"@types/jest": "^29.5.11",
|
|
21
21
|
"@types/node": "^20.10.5",
|
|
22
22
|
"esbuild": "^0.19.10",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"FAB",
|
|
47
47
|
"FABTCG"
|
|
48
48
|
],
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0cb402d419abdabbbf4fcaa456458916f831b14d"
|
|
50
50
|
}
|