@flesh-and-blood/search 2.0.48 → 2.0.50

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  var Gr=Object.create;var le=Object.defineProperty;var Kr=Object.getOwnPropertyDescriptor;var Ur=Object.getOwnPropertyNames,bt=Object.getOwnPropertySymbols,Yr=Object.getPrototypeOf,At=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable;var Mt=(e,r,t)=>r in e?le(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,he=(e,r)=>{for(var t in r||(r={}))At.call(r,t)&&Mt(e,t,r[t]);if(bt)for(var t of bt(r))Vr.call(r,t)&&Mt(e,t,r[t]);return e};var Ct=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Qr=(e,r)=>{for(var t in r)le(e,t,{get:r[t],enumerable:!0})},kt=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Ur(r))!At.call(e,n)&&n!==t&&le(e,n,{get:()=>r[n],enumerable:!(i=Kr(r,n))||i.enumerable});return e};var W=(e,r,t)=>(t=e!=null?Gr(Yr(e)):{},kt(r||!e||!e.__esModule?le(t,"default",{value:e,enumerable:!0}):t,e)),Jr=e=>kt(le({},"__esModule",{value:!0}),e);var j=Ct((Ka,jt)=>{var fe=Object.defineProperty,Zr=Object.defineProperties,Xr=Object.getOwnPropertyDescriptor,qr=Object.getOwnPropertyDescriptors,ei=Object.getOwnPropertyNames,Ft=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,ti=Object.prototype.propertyIsEnumerable,Tt=(e,r,t)=>r in e?fe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ri=(e,r)=>{for(var t in r||(r={}))St.call(r,t)&&Tt(e,t,r[t]);if(Ft)for(var t of Ft(r))ti.call(r,t)&&Tt(e,t,r[t]);return e},ii=(e,r)=>Zr(e,qr(r)),ni=(e,r)=>{for(var t in r)fe(e,t,{get:r[t],enumerable:!0})},ai=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ei(r))!St.call(e,n)&&n!==t&&fe(e,n,{get:()=>r[n],enumerable:!(i=Xr(r,n))||i.enumerable});return e},oi=e=>ai(fe({},"__esModule",{value:!0}),e),xt={};ni(xt,{Class:()=>Pt,Foiling:()=>Lt,Format:()=>Bt,Fusion:()=>It,Hero:()=>zt,Keyword:()=>Ht,Rarity:()=>Rt,Release:()=>_t,ReleaseEdition:()=>Dt,Subtype:()=>Nt,Talent:()=>Et,Treatment:()=>wt,Type:()=>Ot,fullSetIdentifiers:()=>$t,setIdentifierToSetMappings:()=>Wt,setToSetIdentifierMappings:()=>si});jt.exports=oi(xt);var Lt=(e=>(e.C="Cold",e.G="Gold",e.R="Rainbow",e))(Lt||{}),wt=(e=>(e.AB="Alternate Border",e.AA="Alternate Art",e.AT="Alternate Text",e.DS="Double Sided",e.EA="Extended Art",e.FA="Full Art",e))(wt||{}),Pt=(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))(Pt||{}),Bt=(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))(Bt||{}),It=(e=>(e.Earth="Earth",e.Ice="Ice",e.Lightning="Lightning",e))(It||{}),Rt=(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))(Rt||{}),_t=(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.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.ClassicBattlesRhinarDorinthea="Classic Battles: Rhinar vs Dorinthea",e.DromaiBlitzDeck="Dromai Blitz Deck",e.DorintheaHeroDeck="Dorinthea Hero Deck",e.FaiBlitzDeck="Fai Blitz Deck",e.IraWelcomeDeck="Ira Welcome Deck",e.KassaiBlitzDeck="Kassai Blitz Deck",e.KatsuBlitzDeck="Katsu Blitz Deck",e.KatsuHeroDeck="Katsu Hero Deck",e.KayoBlitzDeck="Kayo Blitz Deck",e.LeviaBlitzDeck="Levia Blitz Deck",e.LexiBlitzDeck="Lexi Blitz Deck",e.OldhimBlitzDeck="Oldhim Blitz Deck",e.OlympiaBlitzDeck="Olympia Blitz Deck",e.PrismBlitzDeck="Prism Blitz Deck",e.RhinarBlitzDeck="Rhinar Blitz Deck",e.RhinarHeroDeck="Rhinar Hero Deck",e.RiptideBlitzDeck="Riptide Blitz Deck",e.RoundTheTable="Round the Table",e.UzuriBlitzDeck="Uzuri Blitz Deck",e.VictorBlitzDeck="Victor Blitz Deck",e.Promos="Promos",e))(_t||{}),Dt=(e=>(e.Alpha="Alpha",e.First="First",e.Unlimited="Unlimited",e.Promo="Promo",e))(Dt||{}),Et=(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))(Et||{}),Ot=(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))(Ot||{}),Nt=(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.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.Scythe="Scythe",e.Song="Song",e.Staff="Staff",e.Sword="Sword",e.Trap="Trap",e.Wrench="Wrench",e.Young="Young",e))(Nt||{}),zt=(e=>(e.Arakni="Arakni",e.Azalea="Azalea",e.Benji="Benji",e.Betsy="Betsy",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))(zt||{}),Ht=(e=>(e.Ambush="Ambush",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.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.Universal="Universal",e.Unfreeze="Unfreeze",e.Unity="Unity",e.Wager="Wager",e.Ward="Ward",e))(Ht||{}),$t={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"},Wt=ii(ri({},$t),{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",fai:"Fai Blitz Deck",kat:"Katsu Blitz Deck",ksi:"Kassai Blitz Deck",kyo:"Kayo Blitz Deck",lev:"Levia Blitz Deck",lxi:"Lexi 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",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"}),De={};for(let[e,r]of Object.entries(Wt)){let t=De[r];t?t.push(e):De[r]=[e]}var si=De});var sr=Ct((Ua,or)=>{"use strict";function Gt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ne(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Gt(Object(t),!0).forEach(function(i){Ne(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gt(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Oe(e)}function E(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Kt(e,r){for(var t=0;t<r.length;t++){var i=r[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function O(e,r,t){return r&&Kt(e.prototype,r),t&&Kt(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ne(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Q(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),r&&ze(e,r)}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},me(e)}function ze(e,r){return ze=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},ze(e,r)}function li(){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 ci(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ui(e,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ci(e)}function J(e){var r=li();return function(){var i=me(e),n;if(r){var a=me(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return ui(this,n)}}function te(e){return di(e)||pi(e)||hi(e)||fi()}function di(e){if(Array.isArray(e))return He(e)}function pi(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hi(e,r){if(e){if(typeof e=="string")return He(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return He(e,r)}}function He(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,i=new Array(r);t<r;t++)i[t]=e[t];return i}function fi(){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 Y(e){return Array.isArray?Array.isArray(e):qt(e)==="[object Array]"}var gi=1/0;function mi(e){if(typeof e=="string")return e;var r=e+"";return r=="0"&&1/e==-gi?"-0":r}function yi(e){return e==null?"":mi(e)}function G(e){return typeof e=="string"}function Zt(e){return typeof e=="number"}function vi(e){return e===!0||e===!1||bi(e)&&qt(e)=="[object Boolean]"}function Xt(e){return Oe(e)==="object"}function bi(e){return Xt(e)&&e!==null}function N(e){return e!=null}function Ee(e){return!e.trim().length}function qt(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Mi="Incorrect 'index' type",Ai=function(r){return"Invalid value for key ".concat(r)},Ci=function(r){return"Pattern length exceeds max of ".concat(r,".")},ki=function(r){return"Missing ".concat(r," property in key")},Fi=function(r){return"Property 'weight' in key '".concat(r,"' must be a positive integer")},Ut=Object.prototype.hasOwnProperty,Ti=function(){function e(r){var t=this;E(this,e),this._keys=[],this._keyMap={};var i=0;r.forEach(function(n){var a=er(n);i+=a.weight,t._keys.push(a),t._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return O(e,[{key:"get",value:function(t){return this._keyMap[t]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function er(e){var r=null,t=null,i=null,n=1,a=null;if(G(e)||Y(e))i=e,r=Yt(e),t=$e(e);else{if(!Ut.call(e,"name"))throw new Error(ki("name"));var s=e.name;if(i=s,Ut.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Fi(s));r=Yt(s),t=$e(s),a=e.getFn}return{path:r,id:t,weight:n,src:i,getFn:a}}function Yt(e){return Y(e)?e:e.split(".")}function $e(e){return Y(e)?e.join("."):e}function Si(e,r){var t=[],i=!1,n=function a(s,o,c){if(N(s))if(!o[c])t.push(s);else{var u=o[c],d=s[u];if(!N(d))return;if(c===o.length-1&&(G(d)||Zt(d)||vi(d)))t.push(yi(d));else if(Y(d)){i=!0;for(var f=0,p=d.length;f<p;f+=1)a(d[f],o,c+1)}else o.length&&a(d,o,c+1)}};return n(e,G(r)?r.split("."):r,0),i?t:t[0]}var xi={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Li={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(r,t){return r.score===t.score?r.idx<t.idx?-1:1:r.score<t.score?-1:1}},wi={location:0,threshold:.6,distance:100},Pi={useExtendedSearch:!1,getFn:Si,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},A=ne(ne(ne(ne({},Li),xi),wi),Pi),Bi=/[^ ]+/g;function Ii(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t=new Map,i=Math.pow(10,r);return{get:function(a){var s=a.match(Bi).length;if(t.has(s))return t.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return t.set(s,c),c},clear:function(){t.clear()}}}var Ue=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.getFn,i=t===void 0?A.getFn:t,n=r.fieldNormWeight,a=n===void 0?A.fieldNormWeight:n;E(this,e),this.norm=Ii(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return O(e,[{key:"setSources",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=t}},{key:"setIndexRecords",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=t}},{key:"setKeys",value:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){t._keysMap[n.id]=a})}},{key:"create",value:function(){var t=this;this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach(function(i,n){t._addString(i,n)}):this.docs.forEach(function(i,n){t._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(t){var i=this.size();G(t)?this._addString(t,i):this._addObject(t,i)}},{key:"removeAt",value:function(t){this.records.splice(t,1);for(var i=t,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(t,i){return t[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(t,i){if(!(!N(t)||Ee(t))){var n={v:t,i,n:this.norm.get(t)};this.records.push(n)}}},{key:"_addObject",value:function(t,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(t):n.getFn(t,s.path);if(N(c)){if(Y(c))(function(){for(var d=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var p=f.pop(),m=p.nestedArrIndex,y=p.value;if(N(y))if(G(y)&&!Ee(y)){var g={v:y,i:m,n:n.norm.get(y)};d.push(g)}else Y(y)&&y.forEach(function(h,v){f.push({nestedArrIndex:v,value:h})})}a.$[o]=d})();else if(G(c)&&!Ee(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 tr(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.getFn,n=i===void 0?A.getFn:i,a=t.fieldNormWeight,s=a===void 0?A.fieldNormWeight:a,o=new Ue({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(er)),o.setSources(r),o.create(),o}function Ri(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.getFn,i=t===void 0?A.getFn:t,n=r.fieldNormWeight,a=n===void 0?A.fieldNormWeight:n,s=e.keys,o=e.records,c=new Ue({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function ge(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.errors,i=t===void 0?0:t,n=r.currentLocation,a=n===void 0?0:n,s=r.expectedLocation,o=s===void 0?0:s,c=r.distance,u=c===void 0?A.distance:c,d=r.ignoreLocation,f=d===void 0?A.ignoreLocation:d,p=i/e.length;if(f)return p;var m=Math.abs(o-a);return u?p+m/u:m?1:p}function _i(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.minMatchCharLength,t=[],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>=r&&t.push([i,n]),i=-1)}return e[a-1]&&a-i>=r&&t.push([i,a-1]),t}var ee=32;function Di(e,r,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?A.location:n,s=i.distance,o=s===void 0?A.distance:s,c=i.threshold,u=c===void 0?A.threshold:c,d=i.findAllMatches,f=d===void 0?A.findAllMatches:d,p=i.minMatchCharLength,m=p===void 0?A.minMatchCharLength:p,y=i.includeMatches,g=y===void 0?A.includeMatches:y,h=i.ignoreLocation,v=h===void 0?A.ignoreLocation:h;if(r.length>ee)throw new Error(Ci(ee));for(var k=r.length,S=e.length,F=Math.max(0,Math.min(a,S)),x=u,T=F,w=m>1||g,I=w?Array(S):[],B;(B=e.indexOf(r,T))>-1;){var z=ge(r,{currentLocation:B,expectedLocation:F,distance:o,ignoreLocation:v});if(x=Math.min(z,x),T=B+k,w)for(var D=0;D<k;)I[B+D]=1,D+=1}T=-1;for(var R=[],H=1,re=k+S,$r=1<<k-1,q=0;q<k;q+=1){for(var de=0,V=re;de<V;){var Wr=ge(r,{errors:q,currentLocation:F+V,expectedLocation:F,distance:o,ignoreLocation:v});Wr<=x?de=V:re=V,V=Math.floor((re-de)/2+de)}re=V;var mt=Math.max(1,F-V+1),Re=f?S:Math.min(F+V,S)+k,ie=Array(Re+2);ie[Re+1]=(1<<q)-1;for(var $=Re;$>=mt;$-=1){var pe=$-1,yt=t[e.charAt(pe)];if(w&&(I[pe]=+!!yt),ie[$]=(ie[$+1]<<1|1)&yt,q&&(ie[$]|=(R[$+1]|R[$])<<1|1|R[$+1]),ie[$]&$r&&(H=ge(r,{errors:q,currentLocation:pe,expectedLocation:F,distance:o,ignoreLocation:v}),H<=x)){if(x=H,T=pe,T<=F)break;mt=Math.max(1,2*F-T)}}var jr=ge(r,{errors:q+1,currentLocation:F,expectedLocation:F,distance:o,ignoreLocation:v});if(jr>x)break;R=ie}var _e={isMatch:T>=0,score:Math.max(.001,H)};if(w){var vt=_i(I,m);vt.length?g&&(_e.indices=vt):_e.isMatch=!1}return _e}function Ei(e){for(var r={},t=0,i=e.length;t<i;t+=1){var n=e.charAt(t);r[n]=(r[n]||0)|1<<i-t-1}return r}var rr=function(){function e(r){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?A.location:n,s=i.threshold,o=s===void 0?A.threshold:s,c=i.distance,u=c===void 0?A.distance:c,d=i.includeMatches,f=d===void 0?A.includeMatches:d,p=i.findAllMatches,m=p===void 0?A.findAllMatches:p,y=i.minMatchCharLength,g=y===void 0?A.minMatchCharLength:y,h=i.isCaseSensitive,v=h===void 0?A.isCaseSensitive:h,k=i.ignoreLocation,S=k===void 0?A.ignoreLocation:k;if(E(this,e),this.options={location:a,threshold:o,distance:u,includeMatches:f,findAllMatches:m,minMatchCharLength:g,isCaseSensitive:v,ignoreLocation:S},this.pattern=v?r:r.toLowerCase(),this.chunks=[],!!this.pattern.length){var F=function(D,R){t.chunks.push({pattern:D,alphabet:Ei(D),startIndex:R})},x=this.pattern.length;if(x>ee){for(var T=0,w=x%ee,I=x-w;T<I;)F(this.pattern.substr(T,ee),T),T+=ee;if(w){var B=x-ee;F(this.pattern.substr(B),B)}}else F(this.pattern,0)}}return O(e,[{key:"searchIn",value:function(t){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(t=t.toLowerCase()),this.pattern===t){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,t.length-1]]),s}var o=this.options,c=o.location,u=o.distance,d=o.threshold,f=o.findAllMatches,p=o.minMatchCharLength,m=o.ignoreLocation,y=[],g=0,h=!1;this.chunks.forEach(function(k){var S=k.pattern,F=k.alphabet,x=k.startIndex,T=Di(t,S,F,{location:c+x,distance:u,threshold:d,findAllMatches:f,minMatchCharLength:p,includeMatches:a,ignoreLocation:m}),w=T.isMatch,I=T.score,B=T.indices;w&&(h=!0),g+=I,w&&B&&(y=[].concat(te(y),te(B)))});var v={isMatch:h,score:h?g/this.chunks.length:1};return h&&a&&(v.indices=y),v}}]),e}(),Z=function(){function e(r){E(this,e),this.pattern=r}return O(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(t){return Vt(t,this.multiRegex)}},{key:"isSingleMatch",value:function(t){return Vt(t,this.singleRegex)}}]),e}();function Vt(e,r){var t=e.match(r);return t?t[1]:null}var Oi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^=(.*)$/}}]),t}(Z),Ni=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!(.*)$/}}]),t}(Z),zi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^\^(.*)$/}}]),t}(Z),Hi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!\^(.*)$/}}]),t}(Z),$i=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^(.*)\$$/}}]),t}(Z),Wi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!(.*)\$$/}}]),t}(Z),ir=function(e){Q(t,e);var r=J(t);function t(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?A.location:s,c=a.threshold,u=c===void 0?A.threshold:c,d=a.distance,f=d===void 0?A.distance:d,p=a.includeMatches,m=p===void 0?A.includeMatches:p,y=a.findAllMatches,g=y===void 0?A.findAllMatches:y,h=a.minMatchCharLength,v=h===void 0?A.minMatchCharLength:h,k=a.isCaseSensitive,S=k===void 0?A.isCaseSensitive:k,F=a.ignoreLocation,x=F===void 0?A.ignoreLocation:F;return E(this,t),n=r.call(this,i),n._bitapSearch=new rr(i,{location:o,threshold:u,distance:f,includeMatches:m,findAllMatches:g,minMatchCharLength:v,isCaseSensitive:S,ignoreLocation:x}),n}return O(t,[{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/^(.*)$/}}]),t}(Z),nr=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^'(.*)$/}}]),t}(Z),We=[Oi,nr,zi,Hi,Wi,$i,Ni,ir],Qt=We.length,ji=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Gi="|";function Ki(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(Gi).map(function(t){for(var i=t.trim().split(ji).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<Qt;){var d=We[u],f=d.isMultiMatch(o);f&&(n.push(new d(f,r)),c=!0)}if(!c)for(u=-1;++u<Qt;){var p=We[u],m=p.isSingleMatch(o);if(m){n.push(new p(m,r));break}}}return n})}var Ui=new Set([ir.type,nr.type]),Yi=function(){function e(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.isCaseSensitive,n=i===void 0?A.isCaseSensitive:i,a=t.includeMatches,s=a===void 0?A.includeMatches:a,o=t.minMatchCharLength,c=o===void 0?A.minMatchCharLength:o,u=t.ignoreLocation,d=u===void 0?A.ignoreLocation:u,f=t.findAllMatches,p=f===void 0?A.findAllMatches:f,m=t.location,y=m===void 0?A.location:m,g=t.threshold,h=g===void 0?A.threshold:g,v=t.distance,k=v===void 0?A.distance:v;E(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:p,ignoreLocation:d,location:y,threshold:h,distance:k},this.pattern=n?r:r.toLowerCase(),this.query=Ki(this.pattern,this.options)}return O(e,[{key:"searchIn",value:function(t){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;t=s?t:t.toLowerCase();for(var o=0,c=[],u=0,d=0,f=i.length;d<f;d+=1){var p=i[d];c.length=0,o=0;for(var m=0,y=p.length;m<y;m+=1){var g=p[m],h=g.search(t),v=h.isMatch,k=h.indices,S=h.score;if(v){if(o+=1,u+=S,a){var F=g.constructor.type;Ui.has(F)?c=[].concat(te(c),te(k)):c.push(k)}}else{u=0,o=0,c.length=0;break}}if(o){var x={isMatch:!0,score:u/o};return a&&(x.indices=c),x}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(t,i){return i.useExtendedSearch}}]),e}(),ye=[];function Vi(){ye.push.apply(ye,arguments)}function je(e,r){for(var t=0,i=ye.length;t<i;t+=1){var n=ye[t];if(n.condition(e,r))return new n(e,r)}return new rr(e,r)}var ve={AND:"$and",OR:"$or"},Ge={PATH:"$path",PATTERN:"$val"},Ke=function(r){return!!(r[ve.AND]||r[ve.OR])},Qi=function(r){return!!r[Ge.PATH]},Ji=function(r){return!Y(r)&&Xt(r)&&!Ke(r)},Jt=function(r){return Ne({},ve.AND,Object.keys(r).map(function(t){return Ne({},t,r[t])}))};function ar(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),u=Qi(o);if(!u&&c.length>1&&!Ke(o))return s(Jt(o));if(Ji(o)){var d=u?o[Ge.PATH]:c[0],f=u?o[Ge.PATTERN]:o[d];if(!G(f))throw new Error(Ai(d));var p={keyId:$e(d),pattern:f};return n&&(p.searcher=je(f,r)),p}var m={children:[],operator:c[0]};return c.forEach(function(y){var g=o[y];Y(g)&&g.forEach(function(h){m.children.push(s(h))})}),m};return Ke(e)||(e=Jt(e)),a(e)}function Zi(e,r){var t=r.ignoreFieldNorm,i=t===void 0?A.ignoreFieldNorm:t;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 Xi(e,r){var t=e.matches;r.matches=[],N(t)&&t.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),r.matches.push(s)}})}function qi(e,r){r.score=e.score}function en(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.includeMatches,n=i===void 0?A.includeMatches:i,a=t.includeScore,s=a===void 0?A.includeScore:a,o=[];return n&&o.push(Xi),s&&o.push(qi),e.map(function(c){var u=c.idx,d={item:r[u],refIndex:u};return o.length&&o.forEach(function(f){f(c,d)}),d})}var ae=function(){function e(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;E(this,e),this.options=ne(ne({},A),t),this.options.useExtendedSearch,this._keyStore=new Ti(this.options.keys),this.setCollection(r,i)}return O(e,[{key:"setCollection",value:function(t,i){if(this._docs=t,i&&!(i instanceof Ue))throw new Error(Mi);this._myIndex=i||tr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(t){N(t)&&(this._docs.push(t),this._myIndex.add(t))}},{key:"remove",value:function(){for(var t=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];t(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(t){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,p=G(t)?G(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Zi(p,{ignoreFieldNorm:f}),u&&p.sort(d),Zt(a)&&a>-1&&(p=p.slice(0,a)),en(p,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(t){var i=je(t,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,p=d.score,m=d.indices;f&&a.push({item:o,idx:c,matches:[{score:p,value:o,norm:u,indices:m}]})}}),a}},{key:"_searchLogical",value:function(t){var i=this,n=ar(t,this.options),a=function u(d,f,p){if(!d.children){var m=d.keyId,y=d.searcher,g=i._findMatches({key:i._keyStore.get(m),value:i._myIndex.getValueForItemAtKeyId(f,m),searcher:y});return g&&g.length?[{idx:p,item:f,matches:g}]:[]}for(var h=[],v=0,k=d.children.length;v<k;v+=1){var S=d.children[v],F=u(S,f,p);if(F.length)h.push.apply(h,te(F));else if(d.operator===ve.AND)return[]}return h},s=this._myIndex.records,o={},c=[];return s.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var p=a(n,d,f);p.length&&(o[f]||(o[f]={idx:f,item:d,matches:[]},c.push(o[f])),p.forEach(function(m){var y,g=m.matches;(y=o[f].matches).push.apply(y,te(g))}))}}),c}},{key:"_searchObjectList",value:function(t){var i=this,n=je(t,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 p=[];s.forEach(function(m,y){p.push.apply(p,te(i._findMatches({key:m,value:d[y],searcher:n})))}),p.length&&c.push({idx:f,item:d,matches:p})}}),c}},{key:"_findMatches",value:function(t){var i=t.key,n=t.value,a=t.searcher;if(!N(n))return[];var s=[];if(Y(n))n.forEach(function(m){var y=m.v,g=m.i,h=m.n;if(N(y)){var v=a.searchIn(y),k=v.isMatch,S=v.score,F=v.indices;k&&s.push({score:S,key:i,value:y,idx:g,norm:h,indices:F})}});else{var o=n.v,c=n.n,u=a.searchIn(o),d=u.isMatch,f=u.score,p=u.indices;d&&s.push({score:f,key:i,value:o,norm:c,indices:p})}return s}}]),e}();ae.version="6.6.2";ae.createIndex=tr;ae.parseIndex=Ri;ae.config=A;ae.parseQuery=ar;Vi(Yi);var tn=ae;or.exports=tn});var ja={};Qr(ja,{PUNCTUATION:()=>L,abbreviations:()=>Qe,availableExclusions:()=>Rr,availableModifiers:()=>Ir,clashBannedCards:()=>Ye,clashSpecializationOverrides:()=>Ve,default:()=>Er,filterCard:()=>Or,filtersToCardPropertyMappings:()=>Pe,getAbbreviation:()=>Me,getAbbreviationByCard:()=>rn,getCardByName:()=>ct,getDeckFilters:()=>ca,getExcludedMetaFilters:()=>rt,getHeroBreakdown:()=>za,getKeywordsAndAppliedFiltersFromText:()=>lt,getMetaFilters:()=>tt,getRelatedCards:()=>gt,getRelatedCardsByName:()=>Be,getTokensReferencedByCards:()=>Wa,heroHasFilters:()=>ua,shorthands:()=>it});module.exports=Jr(ja);var P=W(j()),ut=W(sr());var be=W(j()),Ye=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Ve=[{heroes:[be.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[be.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[be.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 L=/[!"#$%&'’()+,-./:;<=>?@[\]^_`|~]/g;var C=W(j());var Me=e=>Qe.find(({abbreviations:r})=>r.find(t=>t.toLowerCase()===e)),rn=e=>Qe.find(({card:r})=>r.toLowerCase()===e.name.toLowerCase()),Qe=[{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:["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:["\u{1F382}","Cake"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["C&C","CnC"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{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:["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:["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:["PJs","Pajamas"],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:["SFaF","S4aS"],card:"Scar for a Scar"},{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 Te=Array.from(Array(50).keys()).map(e=>`${e}`),b=(e,r=[])=>{let t=[...e,l.Class.Generic];return r.length>0&&t.push(l.Class.NotClassed),[{filterToPropertyMapping:{property:"classes",isArray:!0},values:t.map(i=>i.toLowerCase()),isOr:!0},nn(r)]},M=(e,r=[])=>{let t=Object.values(l.Hero).filter(i=>i!==e&&!r.includes(i)).map(i=>i.toLowerCase());return[{filterToPropertyMapping:{property:"hero",isString:!0},values:t,excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"specializations",isArray:!0},values:t,excluded:!0,isOr:!0}]},nn=e=>{let r=Object.values(l.Talent).filter(t=>!e.includes(t)).map(t=>t.toLowerCase());return{filterToPropertyMapping:{property:"talents",isArray:!0},values:r,excluded:!0}},Se=[l.Talent.Draconic],an=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice,l.Talent.Lightning],on=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice],sn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Lightning],ln=[l.Talent.Elemental,l.Talent.Ice],cn=[l.Talent.Elemental,l.Talent.Ice,l.Talent.Lightning],Xe=[l.Talent.Light],qe=[l.Talent.Mystic],et=[l.Talent.Shadow],un=[...b([l.Class.Assassin]),...M(l.Hero.Arakni)],dn=[...b([l.Class.Ranger]),...M(l.Hero.Azalea)],pn=[...b([l.Class.Ninja]),...M(l.Hero.Benji)],hn=[...b([l.Class.Guardian]),...M(l.Hero.Betsy)],fn=[...b([l.Class.Warrior],Xe),{filterToPropertyMapping:{property:"subtypes",isArray:!0,partialMatch:!0},values:["angel"],excluded:!0,isOr:!0},...M(l.Hero.Boltyn)],gn=[...b([l.Class.Guardian]),...M(l.Hero.Bravo)],mn=[...b([l.Class.Guardian]),...M(l.Hero.Brevant)],yn=[...b([l.Class.Runeblade],sn),...M(l.Hero.Briar)],vn=[...b([l.Class.Adjudicator]),...M(l.Hero.Brutus)],bn=[...b([l.Class.Runeblade],et),...M(l.Hero.Chane)],Mn=[...b([l.Class.Mechanologist]),...M(l.Hero.Dash)],Je=[...b([l.Class.Mechanologist]),...M(l.Hero.DataDoll)],lr=[...b([l.Class.Warrior]),...M(l.Hero.Dorinthea)],An=[...b([l.Class.Illusionist],Se),...M(l.Hero.Dromai,[l.Hero.Fai])],Cn=[...b([l.Class.Warrior,l.Class.Wizard],Se),{filterToPropertyMapping:{property:"pitch",isNumber:!0},values:["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)],kn=[...b([l.Class.Illusionist],qe),...M(l.Hero.Enigma)],Fn=[...b([l.Class.Ninja],Se),...M(l.Hero.Fai,[l.Hero.Dromai])],cr=[...b([l.Class.Merchant]),...M(l.Hero.GenisWotchuneed)],Tn=[...b([l.Class.Ninja]),...M(l.Hero.Ira)],ur=[...b([l.Class.Wizard],ln),...M(l.Hero.Iyslander)],Sn=[...b([l.Class.Wizard])],xn=[...b([l.Class.Warrior]),...M(l.Hero.Kassai)],Ln=[...b([l.Class.Ninja]),...M(l.Hero.Katsu)],wn=[...b([l.Class.Merchant]),...M(l.Hero.Kavdaen)],Pn=[...b([l.Class.Brute]),...M(l.Hero.Kayo)],Bn=[...b([l.Class.Brute],et),...M(l.Hero.Levia)],In=[...b([l.Class.Ranger],cn),...M(l.Hero.Lexi)],Rn=[...b([l.Class.Mechanologist]),...M(l.Hero.Maxx)],_n=[...b([l.Class.Bard]),...M(l.Hero.Melody)],Dn=[...b([l.Class.Illusionist],qe),...M(l.Hero.Nuu)],En=[...b([l.Class.Guardian],on),...M(l.Hero.Oldhim)],On=[...b([l.Class.Warrior]),...M(l.Hero.Olympia)],Nn=[...b([l.Class.Illusionist],Xe),...M(l.Hero.Prism)],zn=[...b([l.Class.Brute]),...M(l.Hero.Rhinar)],Hn=[...b([l.Class.Ranger]),...M(l.Hero.Riptide)],$n=[...b([l.Class.Merchant]),...M(l.Hero.Ruudi)],Wn=[{filterToPropertyMapping:{property:"classes",isArray:!0},values:["generic"],isOr:!0}],jn=[...b([l.Class.Merchant]),...M(l.Hero.Squizzy)],Gn=[...b([l.Class.Guardian],an),...M(l.Hero.Bravo)],Kn=[...b([l.Class.Adjudicator],Se),...M(l.Hero.Taipanis)],Un=[...b([]),...M(l.Hero.Taylor)],Yn=[...b([l.Class.Mechanologist]),...M(l.Hero.Teklovossen)],Vn=[...b([l.Class.Adjudicator],Xe),...M(l.Hero.Theryon)],Qn=[...b([l.Class.Assassin]),...M(l.Hero.Uzuri)],Jn=[...b([l.Class.Guardian]),...M(l.Hero.Valda)],Zn=[...b([l.Class.Guardian]),...M(l.Hero.Victor)],Xn=[...b([l.Class.Runeblade]),...M(l.Hero.Viserai)],qn=[...b([l.Class.Runeblade],et),...M(l.Hero.Vynnset)],ea=[...b([l.Class.Bard]),...M(l.Hero.Yorick)],ta=[...b([l.Class.Guardian]),...M(l.Hero.Yoji)],ra=[...b([l.Class.Illusionist],qe),...M(l.Hero.Zen)],ia=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],dr=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],na=[{filterToPropertyMapping:{property:"rarities",isArray:!0},values:["super rare","majestic","legendary","fabled"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],Ae=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],oe=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],aa=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["commoner"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],Ze=[{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],ce={blitz:ia,"blitz ll":dr,"blitz living legend":dr,clash:na,cc:Ae,classic:Ae,"classic constructed":Ae,ll:oe,"living legend":oe,"cc ll":oe,"ll cc":oe,"classic constructed ll":oe,"classic constructed living legend":oe,constructed:Ae,commoner:aa,upf:Ze,ultimate:Ze,"ultimate pit fight":Ze,arakni:un,azalea:dn,benji:pn,betsy:hn,boltyn:fn,bravo:gn,brevant:mn,briar:yn,brutus:vn,chane:bn,dash:Mn,data:Je,"data doll":Je,datadoll:Je,dori:lr,dorinthea:lr,dromai:An,emperor:Cn,enigma:kn,fai:Fn,genis:cr,geniswotchuneed:cr,ira:Tn,iyslander:ur,islander:ur,kano:Sn,kassai:xn,katsu:Ln,kavdaen:wn,kayo:Pn,levia:Bn,lexi:In,maxx:Rn,melody:_n,nuu:Dn,oldhim:En,olympia:On,prism:Nn,rhinar:zn,riptide:Hn,ruudi:$n,shiyana:Wn,squizzy:jn,starvo:Gn,taipanis:Kn,taylor:Un,teklovossen:Yn,theryon:Vn,uzuri:Qn,valda:Jn,victor:Zn,viserai:Xn,vynnset:qn,yorick:ea,yoji:ta,zen:ra},Ce=["common","rare","super rare","majestic","legendary","fabled"],oa=(e,r,t)=>{let i=[];if(!r)i.push(...e);else for(let n of e)switch(r){case">=":let a=!1;for(let u of Ce)a?i.push(u):u===n&&(a=!0,i.push(u));break;case">":let s=!1;for(let u of Ce)s?i.push(u):u===n&&(s=!0);break;case"<=":let o=!1;for(let u of Ce.slice().reverse())o?i.push(u):u===n&&(o=!0,i.push(u));break;case"<":let c=!1;for(let u of Ce.slice().reverse())c?i.push(u):u===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:t}},sa=(e,r)=>{let t=[];for(let i of e)if(ce[i]){let n=ce[i];for(let a of n){let s=he({},a);r&&!a.filterToPropertyMapping.isString&&(s.excluded=!a.excluded),t.push(s)}}return t},tt=(e,r,t,i)=>{let n=[];return pa(r)?n.push(...sa(t,e)):fa(r)&&n.push(oa(t,i,e)),n},se=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Te,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:Te,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}],ke=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Te},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],X=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Te},{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}],Fe=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(l.Talent).map(e=>e.toLowerCase())}],la={"!co":se,"-co":se,"!cost":se,"-cost":se,"!color":se,"-color":se,"!b":K,"-b":K,"!block":K,"-block":K,"!d":K,"-d":K,"!def":K,"-def":K,"!defense":K,"-defense":K,"!pitch":ke,"-pitch":ke,"!p":ke,"-p":ke,"!attack":X,"-attack":X,"!power":X,"-power":X,"!pwr":X,"-pwr":X,"!pow":X,"-pow":X,"!talents":Fe,"-talents":Fe,"!tal":Fe,"-tal":Fe},rt=e=>{let r=[],t=la[e];return t&&r.push(...t),r},ca=(e,r)=>[...ce[e.toLowerCase()],...r?ce[r.toLowerCase()]:[]],ua=e=>{var r;return((r=ce[e.toLowerCase().split(" ")[0]])==null?void 0:r.length)>0},da=["l","legal","hero"],pa=e=>da.includes(e),ha=["r","rarity"],fa=e=>ha.includes(e);var it={aa:["st:attack"],ab:['k:"arcane barrier"'],ar:['t:"attack reaction"'],dr:['t:"defense reaction"'],ga:['k:"go again"'],naa:["t:action","st:nonattack"],poppers:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],popper:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],sv:['k:"spellvoid"']};var Ir=[">=",">","<=","<"],Rr=["!","-"],nt={property:"artists",isArray:!0,partialMatch:!0},ga={property:"n/a"},pr={property:"classes",isArray:!0,partialMatch:!0},hr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ue={property:"defense",specialProperty:"specialDefense",isNumber:!0},fr={nestedProperty:"foiling",property:"printings",isArray:!0},gr={property:"fusions",isArray:!0},mr={property:"intellect",isNumber:!0},yr={property:"keywords",isArray:!0,partialMatch:!0},at={property:"n/a",isMeta:!0},vr={property:"life",specialProperty:"specialLife",isNumber:!0},br={property:"name",isString:!0},ot={property:"pitch",isNumber:!0},xe={property:"power",specialProperty:"specialPower",isNumber:!0},Mr={property:"n/a",isMeta:!0},ma={property:"n/a"},ya={property:"n/a"},Ar={property:"restrictedFormats",isArray:!0,partialMatch:!0},Cr={property:"sets",isArray:!0,partialMatch:!0},Le={property:"specializations",isArray:!0,partialMatch:!0},kr={property:"subtypes",isArray:!0},Fr={property:"types",isArray:!0},Tr={property:"talents",isArray:!0},va={property:"functionalText",isString:!0,partialMatch:!0},ba={property:"typeText",isString:!0,partialMatch:!0},we={nestedProperty:"treatment",property:"printings",isArray:!0},Pe={a:nt,artist:nt,art:nt,attack:xe,b:ue,block:ue,c:pr,class:pr,chain:ga,co:hr,cost:hr,color:ot,d:ue,def:ue,defense:ue,f:gr,fusion:gr,foil:fr,foiling:fr,i:mr,intellect:mr,k:yr,keyword:yr,l:at,legal:at,hero:at,li:vr,life:vr,n:br,name:br,p:ot,pitch:ot,pwr:xe,pow:xe,power:xe,r:Mr,rarity:Mr,referencedby:ma,references:ya,rf:Ar,restricted:Ar,s:Cr,set:Cr,sp:Le,spec:Le,specialization:Le,specializations:Le,st:kr,subtype:kr,t:Fr,type:Fr,tal:Tr,talent:Tr,text:va,treat:we,treatment:we,var:we,variation:we,x:ba},Ma=[{text:C.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:C.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(L,"")}],Aa=e=>{var n;let r=[],t=e.trim().toLowerCase();for(let{text:a,override:s}of Ma)t.includes(a)&&(t=t.replace(a,s));if((n=Me(t))==null?void 0:n.card)r.push(t);else{let a=t.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?r.push(c):o===1&&(s+=" "+c);o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0)}return r},Ca=[C.Hero.Briar,C.Hero.Brutus,C.Hero.Emperor,C.Hero.Prism,C.Hero.Shiyana,C.Hero.Taylor,C.Hero.Yorick],lt=(e,r)=>{var f;let t=Aa(e),i=[];for(let p of t){let m=it[p];m?i.push(...m):i.push(p)}let n=[],a=[],s=[],o=[],c=[],u=[],d={isClash:!1,heroes:[]};for(let p of i)if(Ba(p)){let[m,y]=p.split(":"),{modifier:g,values:h,isAnd:v,isOr:k}=wa(y),{filterKey:S,excluded:F,isMeta:x}=Pa(m);if(x){if(["rarity","r"].includes(S)&&(h=La(h)),["legal","l","hero"].includes(S)){for(let T of Ca)y.includes(T.toLowerCase())&&(d.heroes.includes(T)||d.heroes.push(T));y.includes("clash")&&(d.isClash=!0)}n.push(...tt(F,S,h,g))}else{if(["chain"].includes(S)){let T=R=>R.name.toLowerCase().replaceAll(L,""),w=h.map(R=>ct(R,r)).filter(R=>!!R).map(T),I=new Set(w);S="name",k=!0;let B=20,z=0,D=R=>{if(!R.types.includes(C.Type.Hero)){let H=T(R);I.add(H),w.includes(H)||w.push(H)}};for(let R of w){if(z>B)break;let{referencedBy:H,references:re}=Be(R,r);re.forEach(D),z===0&&H.forEach(D),z++}h=Array.from(I)}else if(["referencedby","references"].includes(S)){let T=S,w=[...h].filter(I=>!!I);h=[],S="name",k=!0;for(let I of w){let{referencedBy:B,references:z}=Be(I,r);["referencedby"].includes(T)?h.push(...z.map(({name:D})=>D.toLowerCase().replaceAll(L,""))):["references"].includes(T)&&h.push(...B.map(({name:D})=>D.toLowerCase().replaceAll(L,"")))}}else["art","artist"].includes(S)?a=h:["foiling","foil"].includes(S)?(o=Sa(h),h=o.map(T=>T.toLowerCase())):["treat","treatment","var","variation"].includes(S)?(u=xa(h),h=u.map(T=>T.toLowerCase())):["set","s"].includes(S)?(c=ka(h),h=c.map(T=>T.toLowerCase().replaceAll(L,""))):["pitch","p","color"].includes(S)&&(h=Ta(h));Pe[S]&&n.push({filterToPropertyMapping:Pe[S],values:h,isAnd:v,isOr:k,modifier:g,excluded:F})}}else if(p){let m=(f=Me(p))==null?void 0:f.card,y=rt(p);m?s.push(`"${m.toLowerCase().replace(L,"")}"`):y&&y.length>0?n.push(...y):s.push(p.replace(L,""))}return{appliedFilters:n,attributes:{artists:a,foilings:o,releases:c,treatments:u},keywords:s,specialConditions:d}},ka=e=>{let r=[];for(let t of e)r.push(...Fa(t));return r},Fa=e=>{let r=[],t=Object.values(C.Release).find(i=>i.toLowerCase().replaceAll(L,"")===e);if(t&&r.push(t),r.length===0){let i=C.setIdentifierToSetMappings[e];i&&r.push(i)}if(r.length===0){let i=Object.values(C.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&r.push(...i)}return r},st={blue:3,yellow:2,red:1,white:0},Ta=e=>{let r=[];for(let t of e)st[t]||st[t]===0?r.push(st[t].toString()):r.push(t);return r},Sr={r:C.Foiling.R,rf:C.Foiling.R,rainbow:C.Foiling.R,c:C.Foiling.C,cf:C.Foiling.C,cold:C.Foiling.C,g:C.Foiling.G,gf:C.Foiling.G,gold:C.Foiling.G},Sa=e=>{let r=[];for(let t of e)Sr[t]&&r.push(Sr[t]);return r},xr={aa:C.Treatment.AA,alt:C.Treatment.AA,"alt art":C.Treatment.AA,ab:C.Treatment.AB,"alt border":C.Treatment.AB,at:C.Treatment.AT,"alt text":C.Treatment.AT,ds:C.Treatment.DS,"double sided":C.Treatment.DS,ea:C.Treatment.EA,extended:C.Treatment.EA,"extended art":C.Treatment.EA,fa:C.Treatment.FA,full:C.Treatment.FA,"full art":C.Treatment.FA},xa=e=>{let r=[];for(let t of e)xr[t]?r.push(xr[t]):C.Treatment[t.toUpperCase()]&&r.push(C.Treatment[t.toUpperCase()]);return r},Lr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},La=e=>{let r=[];for(let t of e)Lr[t]?r.push(Lr[t]):r.push(t);return r},wa=e=>{let r=[],t,i,n=Ir.find(a=>e.includes(a));if(n){let[,a]=e.split(n);wr(a)?(t=!0,r.push(...a.trim().split("+").map(s=>s.replace(L,"")))):Pr(a)?(i=!0,r.push(...a.trim().split(",").map(s=>s.replace(L,"")))):r.push(a.trim().replace(L,""))}else wr(e)?(t=!0,r.push(...e.trim().split("+").map(a=>a.replace(L,"")))):Pr(e)?(i=!0,r.push(...e.trim().split(",").map(a=>a.replace(L,"")))):e.startsWith('"')&&e.endsWith('"')?r.push(e.trim().replaceAll('"',"").replace(L,"")):r.push(e.trim().replace(L,""));return{modifier:n,values:r,isAnd:t,isOr:i}},Pa=e=>{let r=Ia(e);if(r){let[,t]=e.split(r);return{excluded:!0,filterKey:t,isMeta:Br(t)}}else return{excluded:!1,filterKey:e,isMeta:Br(e)}},Ba=e=>e.indexOf(":")>=0,wr=e=>e.indexOf("+")>=0,Pr=e=>e.indexOf(",")>=0,Br=e=>{var r;return!!((r=Pe[e])!=null&&r.isMeta)},Ia=e=>{var r;return(r=Rr.find(t=>e.includes(t)))==null?void 0:r.slice(0,1)};var _=W(j()),_r={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[_.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:_.Release.Promos},{artist:"Hoodwill",identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${_.Treatment.FA}`,set:_.Release.Promos,treatment:_.Treatment.FA}],name:"Fangs A Lot",rarities:[_.Rarity.Rare],rarity:_.Rarity.Rare,sets:[_.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[_.Subtype.Attack],types:[_.Type.Action],typeText:"Generic Action - Attack"},Dr=[{keyword:_r.name.toLowerCase(),card:_r}];var dt=W(j());var pt=class{constructor(r){this.search=(r,t)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=lt(r,this.cards),c=s.join(" "),u=t?Dr.filter(g=>g.keyword===c):[];if(u.length>0?i=u.map(({card:g})=>g):s.length?i=this.fuse.search(c).map(g=>g.item):i=[...this.cards],n.length&&(i=i.filter(g=>g&&Or(g,n,o)),n.some(({excluded:g,values:h})=>!g&&h.includes(P.Format.ClassicConstructed.toLowerCase()))&&(i=i.filter(g=>!g.young)),n.some(({excluded:g,values:h})=>!g&&(h.includes(P.Format.Blitz.toLowerCase())||h.includes(P.Format.Commoner.toLowerCase())))&&(i=i.filter(g=>{let{types:h,young:v}=g;return!(h.includes(P.Type.Hero)&&!v)}))),s.length===0){let g="";if(a.releases.length===1)try{let h=a.releases[0];g=P.setToSetIdentifierMappings[h][0].toUpperCase()}catch(h){console.error("Error getting set identifier from search",h)}g?i.sort((h,v)=>{var F,x;let k=(F=h.setIdentifiers.find(T=>T.includes(g)))==null?void 0:F.replace(g,""),S=(x=v.setIdentifiers.find(T=>T.includes(g)))==null?void 0:x.replace(g,"");return k&&S?k.localeCompare(S):-1}):i.sort((h,v)=>h.name===v.name?`${h.pitch}`.localeCompare(`${v.pitch}`):h.name.localeCompare(v.name))}else{let g=[],h=[],v=s.map(k=>k.toLowerCase().replace(L,"")).join(" ");for(let k of i)k.name.toLowerCase().replace(L,"")===v?g.push(k):h.push(k);i=[...g,...h]}let d,{artists:f,foilings:p,releases:m,treatments:y}=a;return(f.length>0||p.length>0||m.length>0||y.length>0)&&(d=i.map(g=>{let h=g.printings.filter(v=>{let k=!!v.image,S=f.length===0||f.some(w=>v.artist.replace(L,"").toLowerCase().includes(w)),F=p.length===0||p.includes(v.foiling),x=m.length===0||m.includes(v.set),T=y.length===0||y.includes(v.treatment);return k&&S&&F&&x&&T});return he({matchingPrintings:h},g)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:d||i}};let t={getFn:(i,n)=>{let a=ut.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>s.replace(L,"")):a.replace(L,""))},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=[...r],this.fuse=new ut.default([...r],t)}},Er=pt,Or=(e,r,t)=>{var n,a,s,o;let i=!0;for(let c of r){let{isNumber:u,isString:d,isArray:f,isBoolean:p,property:m}=c.filterToPropertyMapping;if((u&&!Ra(e,c)||d&&!_a(e,c)||f&&!Da(e,c)||p&&!Ea(e,c))&&(i=!1),t.isClash&&["rarities","bannedFormats"].includes(m)){let F=[P.Rarity.SuperRare,P.Rarity.Majestic,P.Rarity.Legendary,P.Rarity.Fabled].some(B=>e.rarities.includes(B)),x=!1;for(let{cardIdentifiers:B,heroes:z}of Ve)for(let D of t.heroes)z.includes(D)&&B.includes(e.cardIdentifier)&&(x=!0);let T=!!e.specializations&&e.specializations.length>0||x,w=[P.Type.Mentor,P.Type.Weapon].some(B=>e.types.includes(B)),I=Ye.includes(e.name);!i&&!I&&(T||w)&&F&&(i=!0),I&&(i=!1)}if(t.isClash&&t.heroes.includes(P.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i&&t.heroes.includes(P.Hero.Brutus)){let F=((n=e.specializations)==null?void 0:n.length)>0;((a=e.keywords)==null?void 0:a.includes(dt.Keyword.Clash))&&!F&&(i=!0)}if(!i&&t.heroes.includes(P.Hero.Shiyana)&&["classes"].includes(m)){let F=((s=e.specializations)==null?void 0:s.length)>0,x=e.types.includes(P.Type.Token),T=e.cardIdentifier==="cracked-bauble-yellow",w=(o=e.keywords)==null?void 0:o.includes(dt.Keyword.Ephemeral);(F||x||T||w)&&(i=!0)}let v=e.types.includes(P.Type.Equipment);if(!i&&t.heroes.includes(P.Hero.Taylor)&&v&&v&&(i=!0),!i&&t.heroes.includes(P.Hero.Yorick)&&(["classes"].includes(m)||["talents"].includes(m))&&e.types.includes(P.Type.Token)&&(i=!0),!i)break}return i},Ra=(e,r)=>{var t;if(Ie(r,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=ht(e,r);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(p=>o>=parseInt(p));return a?!c:c;case">":let u=i==null?void 0:i.some(p=>o>parseInt(p));return a?!u:u;case"<=":let d=i==null?void 0:i.some(p=>o<=parseInt(p));return a?!d:d;case"<":let f=i==null?void 0:i.some(p=>o<parseInt(p));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=(t=Na(e,r))==null?void 0:t.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},_a=(e,r)=>{var t;if(Ie(r,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=(t=ht(e,r))==null?void 0:t.replaceAll(L,"");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},Da=(e,r)=>{if(Ie(r,e)){let{values:t,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=r,s=Oa(e,r).map(o=>o==null?void 0:o.replaceAll(L,""));if(a){let o=i?t.every(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))):t.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?t.every(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c)):t.some(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c));return n?!o:o}}else return!0},Ea=(e,r)=>{if(Ie(r,e)){let{excluded:t}=r,i=ht(e,r);return t?!i:i}else return!0},ht=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.property]},Oa=(e,r)=>{let{filterToPropertyMapping:{nestedProperty:t,property:i}}=r,n=e[i]||[];return t?n.map(a=>a[t]).filter(a=>!!a):n},Na=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.specialProperty]},Ie=({cardTypes:e},{types:r,subtypes:t})=>!e||(e==null?void 0:e.some(i=>r.map(n=>n.toLowerCase()).includes(i.toLowerCase())||t.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var ct=(e,r)=>{let t=r.find(i=>i.name.toLowerCase().replace(L,"")===e);return t||(t=r.find(i=>i.name.toLowerCase().replace(L,"").includes(e))),t};var U=W(j()),za=e=>{let r=e.filter(o=>o.types.includes(U.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),t=r.filter(o=>!o.young&&!o.classes.includes(U.Class.Adjudicator)),i=r.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=r.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=r.filter(o=>o.young),s=a.filter(({hero:o})=>!t.find(c=>c.hero===o));return{all:r,adult:t,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var Hr=W(j());var ft=W(j()),Ha={"Dawnblade, Resplendent":"Dawnblade"},Nr=e=>Ha[e.name]||e.name,zr=e=>{var r;return(r=e.functionalText)==null?void 0:r.replaceAll(e.name,"")},Be=(e,r)=>{let t=r.find(i=>i.name.toLowerCase().replace(L,"")===e);return t||(t=r.find(i=>i.name.toLowerCase().replace(L,"").includes(e))),gt(t,r)},gt=(e,r)=>{var a,s;let t=[],i=[],n=[];if(e){let o=[],c=[],u=Nr(e);for(let d of r){let f=Nr(d),p=u===f,m=e.pitch!==d.pitch;if(p&&m)t.push(d);else if(!p){let y=e.name==="Seismic Surge",g=(a=d.keywords)==null?void 0:a.includes(ft.Keyword.Heave),h=y&&g,v=zr(d),k=v==null?void 0:v.includes(u),S=zr(e),F=S==null?void 0:S.includes(f);(k||h)&&o.push(d);let x=d.name==="Seismic Surge",T=(s=e.keywords)==null?void 0:s.includes(ft.Keyword.Heave);(F||x&&T)&&c.push(d)}}for(let d of o)i.push(d);for(let d of c){let f=d.name;u!==f&&!c.some(p=>{let m=p.name;return m!==f&&m.includes(f)})&&n.push(d)}}return{otherPitches:t,referencedBy:i,references:n}},$a=["cash-in-yellow"],Wa=(e,r,t)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!$a.includes(a))){let{references:a}=gt(n,r);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",u=t===Hr.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,getDeckFilters,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,heroHasFilters,shorthands});
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y(e){return Array.isArray?Array.isArray(e):qt(e)==="[object Array]"}var gi=1/0;function mi(e){if(typeof e=="string")return e;var r=e+"";return r=="0"&&1/e==-gi?"-0":r}function yi(e){return e==null?"":mi(e)}function G(e){return typeof e=="string"}function Zt(e){return typeof e=="number"}function vi(e){return e===!0||e===!1||bi(e)&&qt(e)=="[object Boolean]"}function Xt(e){return Oe(e)==="object"}function bi(e){return Xt(e)&&e!==null}function N(e){return e!=null}function Ee(e){return!e.trim().length}function qt(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Mi="Incorrect 'index' type",Ai=function(r){return"Invalid value for key ".concat(r)},Ci=function(r){return"Pattern length exceeds max of ".concat(r,".")},ki=function(r){return"Missing ".concat(r," property in key")},Fi=function(r){return"Property 'weight' in key '".concat(r,"' must be a positive integer")},Ut=Object.prototype.hasOwnProperty,Ti=function(){function e(r){var t=this;E(this,e),this._keys=[],this._keyMap={};var i=0;r.forEach(function(n){var a=er(n);i+=a.weight,t._keys.push(a),t._keyMap[a.id]=a,i+=a.weight}),this._keys.forEach(function(n){n.weight/=i})}return O(e,[{key:"get",value:function(t){return this._keyMap[t]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function er(e){var r=null,t=null,i=null,n=1,a=null;if(G(e)||Y(e))i=e,r=Yt(e),t=$e(e);else{if(!Ut.call(e,"name"))throw new Error(ki("name"));var s=e.name;if(i=s,Ut.call(e,"weight")&&(n=e.weight,n<=0))throw new Error(Fi(s));r=Yt(s),t=$e(s),a=e.getFn}return{path:r,id:t,weight:n,src:i,getFn:a}}function Yt(e){return Y(e)?e:e.split(".")}function $e(e){return Y(e)?e.join("."):e}function Si(e,r){var t=[],i=!1,n=function a(s,o,c){if(N(s))if(!o[c])t.push(s);else{var u=o[c],d=s[u];if(!N(d))return;if(c===o.length-1&&(G(d)||Zt(d)||vi(d)))t.push(yi(d));else if(Y(d)){i=!0;for(var f=0,p=d.length;f<p;f+=1)a(d[f],o,c+1)}else o.length&&a(d,o,c+1)}};return n(e,G(r)?r.split("."):r,0),i?t:t[0]}var xi={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Li={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(r,t){return r.score===t.score?r.idx<t.idx?-1:1:r.score<t.score?-1:1}},wi={location:0,threshold:.6,distance:100},Pi={useExtendedSearch:!1,getFn:Si,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},A=ne(ne(ne(ne({},Li),xi),wi),Pi),Bi=/[^ ]+/g;function Ii(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t=new Map,i=Math.pow(10,r);return{get:function(a){var s=a.match(Bi).length;if(t.has(s))return t.get(s);var o=1/Math.pow(s,.5*e),c=parseFloat(Math.round(o*i)/i);return t.set(s,c),c},clear:function(){t.clear()}}}var Ue=function(){function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=r.getFn,i=t===void 0?A.getFn:t,n=r.fieldNormWeight,a=n===void 0?A.fieldNormWeight:n;E(this,e),this.norm=Ii(a,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return O(e,[{key:"setSources",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.docs=t}},{key:"setIndexRecords",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.records=t}},{key:"setKeys",value:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this.keys=i,this._keysMap={},i.forEach(function(n,a){t._keysMap[n.id]=a})}},{key:"create",value:function(){var t=this;this.isCreated||!this.docs.length||(this.isCreated=!0,G(this.docs[0])?this.docs.forEach(function(i,n){t._addString(i,n)}):this.docs.forEach(function(i,n){t._addObject(i,n)}),this.norm.clear())}},{key:"add",value:function(t){var i=this.size();G(t)?this._addString(t,i):this._addObject(t,i)}},{key:"removeAt",value:function(t){this.records.splice(t,1);for(var i=t,n=this.size();i<n;i+=1)this.records[i].i-=1}},{key:"getValueForItemAtKeyId",value:function(t,i){return t[this._keysMap[i]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(t,i){if(!(!N(t)||Ee(t))){var n={v:t,i,n:this.norm.get(t)};this.records.push(n)}}},{key:"_addObject",value:function(t,i){var n=this,a={i,$:{}};this.keys.forEach(function(s,o){var c=s.getFn?s.getFn(t):n.getFn(t,s.path);if(N(c)){if(Y(c))(function(){for(var d=[],f=[{nestedArrIndex:-1,value:c}];f.length;){var p=f.pop(),m=p.nestedArrIndex,y=p.value;if(N(y))if(G(y)&&!Ee(y)){var g={v:y,i:m,n:n.norm.get(y)};d.push(g)}else Y(y)&&y.forEach(function(h,v){f.push({nestedArrIndex:v,value:h})})}a.$[o]=d})();else if(G(c)&&!Ee(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 tr(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.getFn,n=i===void 0?A.getFn:i,a=t.fieldNormWeight,s=a===void 0?A.fieldNormWeight:a,o=new Ue({getFn:n,fieldNormWeight:s});return o.setKeys(e.map(er)),o.setSources(r),o.create(),o}function Ri(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.getFn,i=t===void 0?A.getFn:t,n=r.fieldNormWeight,a=n===void 0?A.fieldNormWeight:n,s=e.keys,o=e.records,c=new Ue({getFn:i,fieldNormWeight:a});return c.setKeys(s),c.setIndexRecords(o),c}function ge(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=r.errors,i=t===void 0?0:t,n=r.currentLocation,a=n===void 0?0:n,s=r.expectedLocation,o=s===void 0?0:s,c=r.distance,u=c===void 0?A.distance:c,d=r.ignoreLocation,f=d===void 0?A.ignoreLocation:d,p=i/e.length;if(f)return p;var m=Math.abs(o-a);return u?p+m/u:m?1:p}function _i(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.minMatchCharLength,t=[],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>=r&&t.push([i,n]),i=-1)}return e[a-1]&&a-i>=r&&t.push([i,a-1]),t}var ee=32;function Di(e,r,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=i.location,a=n===void 0?A.location:n,s=i.distance,o=s===void 0?A.distance:s,c=i.threshold,u=c===void 0?A.threshold:c,d=i.findAllMatches,f=d===void 0?A.findAllMatches:d,p=i.minMatchCharLength,m=p===void 0?A.minMatchCharLength:p,y=i.includeMatches,g=y===void 0?A.includeMatches:y,h=i.ignoreLocation,v=h===void 0?A.ignoreLocation:h;if(r.length>ee)throw new Error(Ci(ee));for(var k=r.length,S=e.length,F=Math.max(0,Math.min(a,S)),x=u,T=F,w=m>1||g,I=w?Array(S):[],B;(B=e.indexOf(r,T))>-1;){var z=ge(r,{currentLocation:B,expectedLocation:F,distance:o,ignoreLocation:v});if(x=Math.min(z,x),T=B+k,w)for(var D=0;D<k;)I[B+D]=1,D+=1}T=-1;for(var R=[],H=1,re=k+S,$r=1<<k-1,q=0;q<k;q+=1){for(var de=0,V=re;de<V;){var Wr=ge(r,{errors:q,currentLocation:F+V,expectedLocation:F,distance:o,ignoreLocation:v});Wr<=x?de=V:re=V,V=Math.floor((re-de)/2+de)}re=V;var mt=Math.max(1,F-V+1),Re=f?S:Math.min(F+V,S)+k,ie=Array(Re+2);ie[Re+1]=(1<<q)-1;for(var $=Re;$>=mt;$-=1){var pe=$-1,yt=t[e.charAt(pe)];if(w&&(I[pe]=+!!yt),ie[$]=(ie[$+1]<<1|1)&yt,q&&(ie[$]|=(R[$+1]|R[$])<<1|1|R[$+1]),ie[$]&$r&&(H=ge(r,{errors:q,currentLocation:pe,expectedLocation:F,distance:o,ignoreLocation:v}),H<=x)){if(x=H,T=pe,T<=F)break;mt=Math.max(1,2*F-T)}}var jr=ge(r,{errors:q+1,currentLocation:F,expectedLocation:F,distance:o,ignoreLocation:v});if(jr>x)break;R=ie}var _e={isMatch:T>=0,score:Math.max(.001,H)};if(w){var vt=_i(I,m);vt.length?g&&(_e.indices=vt):_e.isMatch=!1}return _e}function Ei(e){for(var r={},t=0,i=e.length;t<i;t+=1){var n=e.charAt(t);r[n]=(r[n]||0)|1<<i-t-1}return r}var rr=function(){function e(r){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=i.location,a=n===void 0?A.location:n,s=i.threshold,o=s===void 0?A.threshold:s,c=i.distance,u=c===void 0?A.distance:c,d=i.includeMatches,f=d===void 0?A.includeMatches:d,p=i.findAllMatches,m=p===void 0?A.findAllMatches:p,y=i.minMatchCharLength,g=y===void 0?A.minMatchCharLength:y,h=i.isCaseSensitive,v=h===void 0?A.isCaseSensitive:h,k=i.ignoreLocation,S=k===void 0?A.ignoreLocation:k;if(E(this,e),this.options={location:a,threshold:o,distance:u,includeMatches:f,findAllMatches:m,minMatchCharLength:g,isCaseSensitive:v,ignoreLocation:S},this.pattern=v?r:r.toLowerCase(),this.chunks=[],!!this.pattern.length){var F=function(D,R){t.chunks.push({pattern:D,alphabet:Ei(D),startIndex:R})},x=this.pattern.length;if(x>ee){for(var T=0,w=x%ee,I=x-w;T<I;)F(this.pattern.substr(T,ee),T),T+=ee;if(w){var B=x-ee;F(this.pattern.substr(B),B)}}else F(this.pattern,0)}}return O(e,[{key:"searchIn",value:function(t){var i=this.options,n=i.isCaseSensitive,a=i.includeMatches;if(n||(t=t.toLowerCase()),this.pattern===t){var s={isMatch:!0,score:0};return a&&(s.indices=[[0,t.length-1]]),s}var o=this.options,c=o.location,u=o.distance,d=o.threshold,f=o.findAllMatches,p=o.minMatchCharLength,m=o.ignoreLocation,y=[],g=0,h=!1;this.chunks.forEach(function(k){var S=k.pattern,F=k.alphabet,x=k.startIndex,T=Di(t,S,F,{location:c+x,distance:u,threshold:d,findAllMatches:f,minMatchCharLength:p,includeMatches:a,ignoreLocation:m}),w=T.isMatch,I=T.score,B=T.indices;w&&(h=!0),g+=I,w&&B&&(y=[].concat(te(y),te(B)))});var v={isMatch:h,score:h?g/this.chunks.length:1};return h&&a&&(v.indices=y),v}}]),e}(),Z=function(){function e(r){E(this,e),this.pattern=r}return O(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(t){return Vt(t,this.multiRegex)}},{key:"isSingleMatch",value:function(t){return Vt(t,this.singleRegex)}}]),e}();function Vt(e,r){var t=e.match(r);return t?t[1]:null}var Oi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^=(.*)$/}}]),t}(Z),Ni=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!(.*)$/}}]),t}(Z),zi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^\^(.*)$/}}]),t}(Z),Hi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!\^(.*)$/}}]),t}(Z),$i=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^(.*)\$$/}}]),t}(Z),Wi=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^!(.*)\$$/}}]),t}(Z),ir=function(e){Q(t,e);var r=J(t);function t(i){var n,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.location,o=s===void 0?A.location:s,c=a.threshold,u=c===void 0?A.threshold:c,d=a.distance,f=d===void 0?A.distance:d,p=a.includeMatches,m=p===void 0?A.includeMatches:p,y=a.findAllMatches,g=y===void 0?A.findAllMatches:y,h=a.minMatchCharLength,v=h===void 0?A.minMatchCharLength:h,k=a.isCaseSensitive,S=k===void 0?A.isCaseSensitive:k,F=a.ignoreLocation,x=F===void 0?A.ignoreLocation:F;return E(this,t),n=r.call(this,i),n._bitapSearch=new rr(i,{location:o,threshold:u,distance:f,includeMatches:m,findAllMatches:g,minMatchCharLength:v,isCaseSensitive:S,ignoreLocation:x}),n}return O(t,[{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/^(.*)$/}}]),t}(Z),nr=function(e){Q(t,e);var r=J(t);function t(i){return E(this,t),r.call(this,i)}return O(t,[{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/^'(.*)$/}}]),t}(Z),We=[Oi,nr,zi,Hi,Wi,$i,Ni,ir],Qt=We.length,ji=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Gi="|";function Ki(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.split(Gi).map(function(t){for(var i=t.trim().split(ji).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<Qt;){var d=We[u],f=d.isMultiMatch(o);f&&(n.push(new d(f,r)),c=!0)}if(!c)for(u=-1;++u<Qt;){var p=We[u],m=p.isSingleMatch(o);if(m){n.push(new p(m,r));break}}}return n})}var Ui=new Set([ir.type,nr.type]),Yi=function(){function e(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.isCaseSensitive,n=i===void 0?A.isCaseSensitive:i,a=t.includeMatches,s=a===void 0?A.includeMatches:a,o=t.minMatchCharLength,c=o===void 0?A.minMatchCharLength:o,u=t.ignoreLocation,d=u===void 0?A.ignoreLocation:u,f=t.findAllMatches,p=f===void 0?A.findAllMatches:f,m=t.location,y=m===void 0?A.location:m,g=t.threshold,h=g===void 0?A.threshold:g,v=t.distance,k=v===void 0?A.distance:v;E(this,e),this.query=null,this.options={isCaseSensitive:n,includeMatches:s,minMatchCharLength:c,findAllMatches:p,ignoreLocation:d,location:y,threshold:h,distance:k},this.pattern=n?r:r.toLowerCase(),this.query=Ki(this.pattern,this.options)}return O(e,[{key:"searchIn",value:function(t){var i=this.query;if(!i)return{isMatch:!1,score:1};var n=this.options,a=n.includeMatches,s=n.isCaseSensitive;t=s?t:t.toLowerCase();for(var o=0,c=[],u=0,d=0,f=i.length;d<f;d+=1){var p=i[d];c.length=0,o=0;for(var m=0,y=p.length;m<y;m+=1){var g=p[m],h=g.search(t),v=h.isMatch,k=h.indices,S=h.score;if(v){if(o+=1,u+=S,a){var F=g.constructor.type;Ui.has(F)?c=[].concat(te(c),te(k)):c.push(k)}}else{u=0,o=0,c.length=0;break}}if(o){var x={isMatch:!0,score:u/o};return a&&(x.indices=c),x}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(t,i){return i.useExtendedSearch}}]),e}(),ye=[];function Vi(){ye.push.apply(ye,arguments)}function je(e,r){for(var t=0,i=ye.length;t<i;t+=1){var n=ye[t];if(n.condition(e,r))return new n(e,r)}return new rr(e,r)}var ve={AND:"$and",OR:"$or"},Ge={PATH:"$path",PATTERN:"$val"},Ke=function(r){return!!(r[ve.AND]||r[ve.OR])},Qi=function(r){return!!r[Ge.PATH]},Ji=function(r){return!Y(r)&&Xt(r)&&!Ke(r)},Jt=function(r){return Ne({},ve.AND,Object.keys(r).map(function(t){return Ne({},t,r[t])}))};function ar(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.auto,n=i===void 0?!0:i,a=function s(o){var c=Object.keys(o),u=Qi(o);if(!u&&c.length>1&&!Ke(o))return s(Jt(o));if(Ji(o)){var d=u?o[Ge.PATH]:c[0],f=u?o[Ge.PATTERN]:o[d];if(!G(f))throw new Error(Ai(d));var p={keyId:$e(d),pattern:f};return n&&(p.searcher=je(f,r)),p}var m={children:[],operator:c[0]};return c.forEach(function(y){var g=o[y];Y(g)&&g.forEach(function(h){m.children.push(s(h))})}),m};return Ke(e)||(e=Jt(e)),a(e)}function Zi(e,r){var t=r.ignoreFieldNorm,i=t===void 0?A.ignoreFieldNorm:t;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 Xi(e,r){var t=e.matches;r.matches=[],N(t)&&t.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),r.matches.push(s)}})}function qi(e,r){r.score=e.score}function en(e,r){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=t.includeMatches,n=i===void 0?A.includeMatches:i,a=t.includeScore,s=a===void 0?A.includeScore:a,o=[];return n&&o.push(Xi),s&&o.push(qi),e.map(function(c){var u=c.idx,d={item:r[u],refIndex:u};return o.length&&o.forEach(function(f){f(c,d)}),d})}var ae=function(){function e(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;E(this,e),this.options=ne(ne({},A),t),this.options.useExtendedSearch,this._keyStore=new Ti(this.options.keys),this.setCollection(r,i)}return O(e,[{key:"setCollection",value:function(t,i){if(this._docs=t,i&&!(i instanceof Ue))throw new Error(Mi);this._myIndex=i||tr(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(t){N(t)&&(this._docs.push(t),this._myIndex.add(t))}},{key:"remove",value:function(){for(var t=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];t(s,n)&&(this.removeAt(n),n-=1,a-=1,i.push(s))}return i}},{key:"removeAt",value:function(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(t){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,p=G(t)?G(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Zi(p,{ignoreFieldNorm:f}),u&&p.sort(d),Zt(a)&&a>-1&&(p=p.slice(0,a)),en(p,this._docs,{includeMatches:o,includeScore:c})}},{key:"_searchStringList",value:function(t){var i=je(t,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,p=d.score,m=d.indices;f&&a.push({item:o,idx:c,matches:[{score:p,value:o,norm:u,indices:m}]})}}),a}},{key:"_searchLogical",value:function(t){var i=this,n=ar(t,this.options),a=function u(d,f,p){if(!d.children){var m=d.keyId,y=d.searcher,g=i._findMatches({key:i._keyStore.get(m),value:i._myIndex.getValueForItemAtKeyId(f,m),searcher:y});return g&&g.length?[{idx:p,item:f,matches:g}]:[]}for(var h=[],v=0,k=d.children.length;v<k;v+=1){var S=d.children[v],F=u(S,f,p);if(F.length)h.push.apply(h,te(F));else if(d.operator===ve.AND)return[]}return h},s=this._myIndex.records,o={},c=[];return s.forEach(function(u){var d=u.$,f=u.i;if(N(d)){var p=a(n,d,f);p.length&&(o[f]||(o[f]={idx:f,item:d,matches:[]},c.push(o[f])),p.forEach(function(m){var y,g=m.matches;(y=o[f].matches).push.apply(y,te(g))}))}}),c}},{key:"_searchObjectList",value:function(t){var i=this,n=je(t,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 p=[];s.forEach(function(m,y){p.push.apply(p,te(i._findMatches({key:m,value:d[y],searcher:n})))}),p.length&&c.push({idx:f,item:d,matches:p})}}),c}},{key:"_findMatches",value:function(t){var i=t.key,n=t.value,a=t.searcher;if(!N(n))return[];var s=[];if(Y(n))n.forEach(function(m){var y=m.v,g=m.i,h=m.n;if(N(y)){var v=a.searchIn(y),k=v.isMatch,S=v.score,F=v.indices;k&&s.push({score:S,key:i,value:y,idx:g,norm:h,indices:F})}});else{var o=n.v,c=n.n,u=a.searchIn(o),d=u.isMatch,f=u.score,p=u.indices;d&&s.push({score:f,key:i,value:o,norm:c,indices:p})}return s}}]),e}();ae.version="6.6.2";ae.createIndex=tr;ae.parseIndex=Ri;ae.config=A;ae.parseQuery=ar;Vi(Yi);var tn=ae;or.exports=tn});var ja={};Qr(ja,{PUNCTUATION:()=>L,abbreviations:()=>Qe,availableExclusions:()=>Rr,availableModifiers:()=>Ir,clashBannedCards:()=>Ye,clashSpecializationOverrides:()=>Ve,default:()=>Er,filterCard:()=>Or,filtersToCardPropertyMappings:()=>Pe,getAbbreviation:()=>Me,getAbbreviationByCard:()=>rn,getCardByName:()=>ct,getDeckFilters:()=>ca,getExcludedMetaFilters:()=>rt,getHeroBreakdown:()=>za,getKeywordsAndAppliedFiltersFromText:()=>lt,getMetaFilters:()=>tt,getRelatedCards:()=>gt,getRelatedCardsByName:()=>Be,getTokensReferencedByCards:()=>Wa,heroHasFilters:()=>ua,shorthands:()=>it});module.exports=Jr(ja);var P=W(j()),ut=W(sr());var be=W(j()),Ye=["Amulet of Ice","Ball Lightning","Belittle","Drone of Brutality","Duskblade","Rosetta Thorn","Stubby Hammerers"],Ve=[{heroes:[be.Hero.Briar],cardIdentifiers:["rosetta-thorn"]},{heroes:[be.Hero.Emperor],cardIdentifiers:["command-and-conquer-red"]},{heroes:[be.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 L=/[!"#$%&'’()+,-./:;<=>?@[\]^_`|~]/g;var C=W(j());var Me=e=>Qe.find(({abbreviations:r})=>r.find(t=>t.toLowerCase()===e)),rn=e=>Qe.find(({card:r})=>r.toLowerCase()===e.name.toLowerCase()),Qe=[{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:["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:["\u{1F382}","Cake"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["C&C","CnC"],card:"Command and Conquer"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{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:["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:["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:["PJs","Pajamas"],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:["SFaF","S4aS"],card:"Scar for a Scar"},{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 Te=Array.from(Array(50).keys()).map(e=>`${e}`),b=(e,r=[])=>{let t=[...e,l.Class.Generic];return r.length>0&&t.push(l.Class.NotClassed),[{filterToPropertyMapping:{property:"classes",isArray:!0},values:t.map(i=>i.toLowerCase()),isOr:!0},nn(r)]},M=(e,r=[])=>{let t=Object.values(l.Hero).filter(i=>i!==e&&!r.includes(i)).map(i=>i.toLowerCase());return[{filterToPropertyMapping:{property:"hero",isString:!0},values:t,excluded:!0,isOr:!0},{filterToPropertyMapping:{property:"specializations",isArray:!0},values:t,excluded:!0,isOr:!0}]},nn=e=>{let r=Object.values(l.Talent).filter(t=>!e.includes(t)).map(t=>t.toLowerCase());return{filterToPropertyMapping:{property:"talents",isArray:!0},values:r,excluded:!0}},Se=[l.Talent.Draconic],an=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice,l.Talent.Lightning],on=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Ice],sn=[l.Talent.Elemental,l.Talent.Earth,l.Talent.Lightning],ln=[l.Talent.Elemental,l.Talent.Ice],cn=[l.Talent.Elemental,l.Talent.Ice,l.Talent.Lightning],Xe=[l.Talent.Light],qe=[l.Talent.Mystic],et=[l.Talent.Shadow],un=[...b([l.Class.Assassin]),...M(l.Hero.Arakni)],dn=[...b([l.Class.Ranger]),...M(l.Hero.Azalea)],pn=[...b([l.Class.Ninja]),...M(l.Hero.Benji)],hn=[...b([l.Class.Guardian]),...M(l.Hero.Betsy)],fn=[...b([l.Class.Warrior],Xe),{filterToPropertyMapping:{property:"subtypes",isArray:!0,partialMatch:!0},values:["angel"],excluded:!0,isOr:!0},...M(l.Hero.Boltyn)],gn=[...b([l.Class.Guardian]),...M(l.Hero.Bravo)],mn=[...b([l.Class.Guardian]),...M(l.Hero.Brevant)],yn=[...b([l.Class.Runeblade],sn),...M(l.Hero.Briar)],vn=[...b([l.Class.Adjudicator]),...M(l.Hero.Brutus)],bn=[...b([l.Class.Runeblade],et),...M(l.Hero.Chane)],Mn=[...b([l.Class.Mechanologist]),...M(l.Hero.Dash)],Je=[...b([l.Class.Mechanologist]),...M(l.Hero.DataDoll)],lr=[...b([l.Class.Warrior]),...M(l.Hero.Dorinthea)],An=[...b([l.Class.Illusionist],Se),...M(l.Hero.Dromai,[l.Hero.Fai])],Cn=[...b([l.Class.Warrior,l.Class.Wizard],Se),{filterToPropertyMapping:{property:"pitch",isNumber:!0},values:["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)],kn=[...b([l.Class.Illusionist],qe),...M(l.Hero.Enigma)],Fn=[...b([l.Class.Ninja],Se),...M(l.Hero.Fai,[l.Hero.Dromai])],cr=[...b([l.Class.Merchant]),...M(l.Hero.GenisWotchuneed)],Tn=[...b([l.Class.Ninja]),...M(l.Hero.Ira)],ur=[...b([l.Class.Wizard],ln),...M(l.Hero.Iyslander)],Sn=[...b([l.Class.Wizard])],xn=[...b([l.Class.Warrior]),...M(l.Hero.Kassai)],Ln=[...b([l.Class.Ninja]),...M(l.Hero.Katsu)],wn=[...b([l.Class.Merchant]),...M(l.Hero.Kavdaen)],Pn=[...b([l.Class.Brute]),...M(l.Hero.Kayo)],Bn=[...b([l.Class.Brute],et),...M(l.Hero.Levia)],In=[...b([l.Class.Ranger],cn),...M(l.Hero.Lexi)],Rn=[...b([l.Class.Mechanologist]),...M(l.Hero.Maxx)],_n=[...b([l.Class.Bard]),...M(l.Hero.Melody)],Dn=[...b([l.Class.Assassin],qe),...M(l.Hero.Nuu)],En=[...b([l.Class.Guardian],on),...M(l.Hero.Oldhim)],On=[...b([l.Class.Warrior]),...M(l.Hero.Olympia)],Nn=[...b([l.Class.Illusionist],Xe),...M(l.Hero.Prism)],zn=[...b([l.Class.Brute]),...M(l.Hero.Rhinar)],Hn=[...b([l.Class.Ranger]),...M(l.Hero.Riptide)],$n=[...b([l.Class.Merchant]),...M(l.Hero.Ruudi)],Wn=[{filterToPropertyMapping:{property:"classes",isArray:!0},values:["generic"],isOr:!0}],jn=[...b([l.Class.Merchant]),...M(l.Hero.Squizzy)],Gn=[...b([l.Class.Guardian],an),...M(l.Hero.Bravo)],Kn=[...b([l.Class.Adjudicator],Se),...M(l.Hero.Taipanis)],Un=[...b([]),...M(l.Hero.Taylor)],Yn=[...b([l.Class.Mechanologist]),...M(l.Hero.Teklovossen)],Vn=[...b([l.Class.Adjudicator],Xe),...M(l.Hero.Theryon)],Qn=[...b([l.Class.Assassin]),...M(l.Hero.Uzuri)],Jn=[...b([l.Class.Guardian]),...M(l.Hero.Valda)],Zn=[...b([l.Class.Guardian]),...M(l.Hero.Victor)],Xn=[...b([l.Class.Runeblade]),...M(l.Hero.Viserai)],qn=[...b([l.Class.Runeblade],et),...M(l.Hero.Vynnset)],ea=[...b([l.Class.Bard]),...M(l.Hero.Yorick)],ta=[...b([l.Class.Guardian]),...M(l.Hero.Yoji)],ra=[...b([l.Class.Ninja],qe),...M(l.Hero.Zen)],ia=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],dr=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["blitz (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],na=[{filterToPropertyMapping:{property:"rarities",isArray:!0},values:["super rare","majestic","legendary","fabled"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],Ae=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],oe=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["classic constructed (living legend)"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"],excluded:!0}],aa=[{filterToPropertyMapping:{property:"bannedFormats",isArray:!0},values:["commoner"],excluded:!0},{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],Ze=[{filterToPropertyMapping:{property:"young",isBoolean:!0},values:[],cardTypes:["hero"]}],ce={blitz:ia,"blitz ll":dr,"blitz living legend":dr,clash:na,cc:Ae,classic:Ae,"classic constructed":Ae,ll:oe,"living legend":oe,"cc ll":oe,"ll cc":oe,"classic constructed ll":oe,"classic constructed living legend":oe,constructed:Ae,commoner:aa,upf:Ze,ultimate:Ze,"ultimate pit fight":Ze,arakni:un,azalea:dn,benji:pn,betsy:hn,boltyn:fn,bravo:gn,brevant:mn,briar:yn,brutus:vn,chane:bn,dash:Mn,data:Je,"data doll":Je,datadoll:Je,dori:lr,dorinthea:lr,dromai:An,emperor:Cn,enigma:kn,fai:Fn,genis:cr,geniswotchuneed:cr,ira:Tn,iyslander:ur,islander:ur,kano:Sn,kassai:xn,katsu:Ln,kavdaen:wn,kayo:Pn,levia:Bn,lexi:In,maxx:Rn,melody:_n,nuu:Dn,oldhim:En,olympia:On,prism:Nn,rhinar:zn,riptide:Hn,ruudi:$n,shiyana:Wn,squizzy:jn,starvo:Gn,taipanis:Kn,taylor:Un,teklovossen:Yn,theryon:Vn,uzuri:Qn,valda:Jn,victor:Zn,viserai:Xn,vynnset:qn,yorick:ea,yoji:ta,zen:ra},Ce=["common","rare","super rare","majestic","legendary","fabled"],oa=(e,r,t)=>{let i=[];if(!r)i.push(...e);else for(let n of e)switch(r){case">=":let a=!1;for(let u of Ce)a?i.push(u):u===n&&(a=!0,i.push(u));break;case">":let s=!1;for(let u of Ce)s?i.push(u):u===n&&(s=!0);break;case"<=":let o=!1;for(let u of Ce.slice().reverse())o?i.push(u):u===n&&(o=!0,i.push(u));break;case"<":let c=!1;for(let u of Ce.slice().reverse())c?i.push(u):u===n&&(c=!0);break;default:break}return{filterToPropertyMapping:{property:"rarities",isArray:!0},isOr:!0,values:i,excluded:t}},sa=(e,r)=>{let t=[];for(let i of e)if(ce[i]){let n=ce[i];for(let a of n){let s=he({},a);r&&!a.filterToPropertyMapping.isString&&(s.excluded=!a.excluded),t.push(s)}}return t},tt=(e,r,t,i)=>{let n=[];return pa(r)?n.push(...sa(t,e)):fa(r)&&n.push(oa(t,i,e)),n},se=[{filterToPropertyMapping:{property:"cost",isNumber:!0},values:Te,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:Te,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}],ke=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},excluded:!0,values:Te},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},values:["equipment","hero","placeholder","token","weapon"],excluded:!0},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},values:["true"],excluded:!0}],X=[{filterToPropertyMapping:{property:"power",isNumber:!0},excluded:!0,values:Te},{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}],Fe=[{filterToPropertyMapping:{property:"talents",isArray:!0},excluded:!0,values:Object.values(l.Talent).map(e=>e.toLowerCase())}],la={"!co":se,"-co":se,"!cost":se,"-cost":se,"!color":se,"-color":se,"!b":K,"-b":K,"!block":K,"-block":K,"!d":K,"-d":K,"!def":K,"-def":K,"!defense":K,"-defense":K,"!pitch":ke,"-pitch":ke,"!p":ke,"-p":ke,"!attack":X,"-attack":X,"!power":X,"-power":X,"!pwr":X,"-pwr":X,"!pow":X,"-pow":X,"!talents":Fe,"-talents":Fe,"!tal":Fe,"-tal":Fe},rt=e=>{let r=[],t=la[e];return t&&r.push(...t),r},ca=(e,r)=>[...ce[e.toLowerCase()],...r?ce[r.toLowerCase()]:[]],ua=e=>{var r;return((r=ce[e.toLowerCase().split(" ")[0]])==null?void 0:r.length)>0},da=["l","legal","hero"],pa=e=>da.includes(e),ha=["r","rarity"],fa=e=>ha.includes(e);var it={aa:["st:attack"],ab:['k:"arcane barrier"'],ar:['t:"attack reaction"'],dr:['t:"defense reaction"'],ga:['k:"go again"'],naa:["t:action","st:nonattack"],poppers:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],popper:["!c:illusionist","st:attack","pwr:>=6","def:>=0"],sv:['k:"spellvoid"']};var Ir=[">=",">","<=","<"],Rr=["!","-"],nt={property:"artists",isArray:!0,partialMatch:!0},ga={property:"n/a"},pr={property:"classes",isArray:!0,partialMatch:!0},hr={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},ue={property:"defense",specialProperty:"specialDefense",isNumber:!0},fr={nestedProperty:"foiling",property:"printings",isArray:!0},gr={property:"fusions",isArray:!0},mr={property:"intellect",isNumber:!0},yr={property:"keywords",isArray:!0,partialMatch:!0},at={property:"n/a",isMeta:!0},vr={property:"life",specialProperty:"specialLife",isNumber:!0},br={property:"name",isString:!0},ot={property:"pitch",isNumber:!0},xe={property:"power",specialProperty:"specialPower",isNumber:!0},Mr={property:"n/a",isMeta:!0},ma={property:"n/a"},ya={property:"n/a"},Ar={property:"restrictedFormats",isArray:!0,partialMatch:!0},Cr={property:"sets",isArray:!0,partialMatch:!0},Le={property:"specializations",isArray:!0,partialMatch:!0},kr={property:"subtypes",isArray:!0},Fr={property:"types",isArray:!0},Tr={property:"talents",isArray:!0},va={property:"functionalText",isString:!0,partialMatch:!0},ba={property:"typeText",isString:!0,partialMatch:!0},we={nestedProperty:"treatment",property:"printings",isArray:!0},Pe={a:nt,artist:nt,art:nt,attack:xe,b:ue,block:ue,c:pr,class:pr,chain:ga,co:hr,cost:hr,color:ot,d:ue,def:ue,defense:ue,f:gr,fusion:gr,foil:fr,foiling:fr,i:mr,intellect:mr,k:yr,keyword:yr,l:at,legal:at,hero:at,li:vr,life:vr,n:br,name:br,p:ot,pitch:ot,pwr:xe,pow:xe,power:xe,r:Mr,rarity:Mr,referencedby:ma,references:ya,rf:Ar,restricted:Ar,s:Cr,set:Cr,sp:Le,spec:Le,specialization:Le,specializations:Le,st:kr,subtype:kr,t:Fr,type:Fr,tal:Tr,talent:Tr,text:va,treat:we,treatment:we,var:we,variation:we,x:ba},Ma=[{text:C.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:C.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(L,"")}],Aa=e=>{var n;let r=[],t=e.trim().toLowerCase();for(let{text:a,override:s}of Ma)t.includes(a)&&(t=t.replace(a,s));if((n=Me(t))==null?void 0:n.card)r.push(t);else{let a=t.split(/[ ]+/),s="",o=0;for(let c of a)o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&c.split('"').length===2?(s+=" "+c,o++):o===0&&s===""?r.push(c):o===1&&(s+=" "+c);o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0)}return r},Ca=[C.Hero.Briar,C.Hero.Brutus,C.Hero.Emperor,C.Hero.Prism,C.Hero.Shiyana,C.Hero.Taylor,C.Hero.Yorick],lt=(e,r)=>{var f;let t=Aa(e),i=[];for(let p of t){let m=it[p];m?i.push(...m):i.push(p)}let n=[],a=[],s=[],o=[],c=[],u=[],d={isClash:!1,heroes:[]};for(let p of i)if(Ba(p)){let[m,y]=p.split(":"),{modifier:g,values:h,isAnd:v,isOr:k}=wa(y),{filterKey:S,excluded:F,isMeta:x}=Pa(m);if(x){if(["rarity","r"].includes(S)&&(h=La(h)),["legal","l","hero"].includes(S)){for(let T of Ca)y.includes(T.toLowerCase())&&(d.heroes.includes(T)||d.heroes.push(T));y.includes("clash")&&(d.isClash=!0)}n.push(...tt(F,S,h,g))}else{if(["chain"].includes(S)){let T=R=>R.name.toLowerCase().replaceAll(L,""),w=h.map(R=>ct(R,r)).filter(R=>!!R).map(T),I=new Set(w);S="name",k=!0;let B=20,z=0,D=R=>{if(!R.types.includes(C.Type.Hero)){let H=T(R);I.add(H),w.includes(H)||w.push(H)}};for(let R of w){if(z>B)break;let{referencedBy:H,references:re}=Be(R,r);re.forEach(D),z===0&&H.forEach(D),z++}h=Array.from(I)}else if(["referencedby","references"].includes(S)){let T=S,w=[...h].filter(I=>!!I);h=[],S="name",k=!0;for(let I of w){let{referencedBy:B,references:z}=Be(I,r);["referencedby"].includes(T)?h.push(...z.map(({name:D})=>D.toLowerCase().replaceAll(L,""))):["references"].includes(T)&&h.push(...B.map(({name:D})=>D.toLowerCase().replaceAll(L,"")))}}else["art","artist"].includes(S)?a=h:["foiling","foil"].includes(S)?(o=Sa(h),h=o.map(T=>T.toLowerCase())):["treat","treatment","var","variation"].includes(S)?(u=xa(h),h=u.map(T=>T.toLowerCase())):["set","s"].includes(S)?(c=ka(h),h=c.map(T=>T.toLowerCase().replaceAll(L,""))):["pitch","p","color"].includes(S)&&(h=Ta(h));Pe[S]&&n.push({filterToPropertyMapping:Pe[S],values:h,isAnd:v,isOr:k,modifier:g,excluded:F})}}else if(p){let m=(f=Me(p))==null?void 0:f.card,y=rt(p);m?s.push(`"${m.toLowerCase().replace(L,"")}"`):y&&y.length>0?n.push(...y):s.push(p.replace(L,""))}return{appliedFilters:n,attributes:{artists:a,foilings:o,releases:c,treatments:u},keywords:s,specialConditions:d}},ka=e=>{let r=[];for(let t of e)r.push(...Fa(t));return r},Fa=e=>{let r=[],t=Object.values(C.Release).find(i=>i.toLowerCase().replaceAll(L,"")===e);if(t&&r.push(t),r.length===0){let i=C.setIdentifierToSetMappings[e];i&&r.push(i)}if(r.length===0){let i=Object.values(C.Release).filter(n=>n.toLowerCase().includes(e));i.length>0&&r.push(...i)}return r},st={blue:3,yellow:2,red:1,white:0},Ta=e=>{let r=[];for(let t of e)st[t]||st[t]===0?r.push(st[t].toString()):r.push(t);return r},Sr={r:C.Foiling.R,rf:C.Foiling.R,rainbow:C.Foiling.R,c:C.Foiling.C,cf:C.Foiling.C,cold:C.Foiling.C,g:C.Foiling.G,gf:C.Foiling.G,gold:C.Foiling.G},Sa=e=>{let r=[];for(let t of e)Sr[t]&&r.push(Sr[t]);return r},xr={aa:C.Treatment.AA,alt:C.Treatment.AA,"alt art":C.Treatment.AA,ab:C.Treatment.AB,"alt border":C.Treatment.AB,at:C.Treatment.AT,"alt text":C.Treatment.AT,ds:C.Treatment.DS,"double sided":C.Treatment.DS,ea:C.Treatment.EA,extended:C.Treatment.EA,"extended art":C.Treatment.EA,fa:C.Treatment.FA,full:C.Treatment.FA,"full art":C.Treatment.FA},xa=e=>{let r=[];for(let t of e)xr[t]?r.push(xr[t]):C.Treatment[t.toUpperCase()]&&r.push(C.Treatment[t.toUpperCase()]);return r},Lr={c:"common",f:"fabled",l:"legendary",m:"majestic",v:"marvel",r:"rare",s:"super rare",t:"token"},La=e=>{let r=[];for(let t of e)Lr[t]?r.push(Lr[t]):r.push(t);return r},wa=e=>{let r=[],t,i,n=Ir.find(a=>e.includes(a));if(n){let[,a]=e.split(n);wr(a)?(t=!0,r.push(...a.trim().split("+").map(s=>s.replace(L,"")))):Pr(a)?(i=!0,r.push(...a.trim().split(",").map(s=>s.replace(L,"")))):r.push(a.trim().replace(L,""))}else wr(e)?(t=!0,r.push(...e.trim().split("+").map(a=>a.replace(L,"")))):Pr(e)?(i=!0,r.push(...e.trim().split(",").map(a=>a.replace(L,"")))):e.startsWith('"')&&e.endsWith('"')?r.push(e.trim().replaceAll('"',"").replace(L,"")):r.push(e.trim().replace(L,""));return{modifier:n,values:r,isAnd:t,isOr:i}},Pa=e=>{let r=Ia(e);if(r){let[,t]=e.split(r);return{excluded:!0,filterKey:t,isMeta:Br(t)}}else return{excluded:!1,filterKey:e,isMeta:Br(e)}},Ba=e=>e.indexOf(":")>=0,wr=e=>e.indexOf("+")>=0,Pr=e=>e.indexOf(",")>=0,Br=e=>{var r;return!!((r=Pe[e])!=null&&r.isMeta)},Ia=e=>{var r;return(r=Rr.find(t=>e.includes(t)))==null?void 0:r.slice(0,1)};var _=W(j()),_r={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[_.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:_.Release.Promos},{artist:"Hoodwill",identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${_.Treatment.FA}`,set:_.Release.Promos,treatment:_.Treatment.FA}],name:"Fangs A Lot",rarities:[_.Rarity.Rare],rarity:_.Rarity.Rare,sets:[_.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[_.Subtype.Attack],types:[_.Type.Action],typeText:"Generic Action - Attack"},Dr=[{keyword:_r.name.toLowerCase(),card:_r}];var dt=W(j());var pt=class{constructor(r){this.search=(r,t)=>{let i,{appliedFilters:n,attributes:a,keywords:s,specialConditions:o}=lt(r,this.cards),c=s.join(" "),u=t?Dr.filter(g=>g.keyword===c):[];if(u.length>0?i=u.map(({card:g})=>g):s.length?i=this.fuse.search(c).map(g=>g.item):i=[...this.cards],n.length&&(i=i.filter(g=>g&&Or(g,n,o)),n.some(({excluded:g,values:h})=>!g&&h.includes(P.Format.ClassicConstructed.toLowerCase()))&&(i=i.filter(g=>!g.young)),n.some(({excluded:g,values:h})=>!g&&(h.includes(P.Format.Blitz.toLowerCase())||h.includes(P.Format.Commoner.toLowerCase())))&&(i=i.filter(g=>{let{types:h,young:v}=g;return!(h.includes(P.Type.Hero)&&!v)}))),s.length===0){let g="";if(a.releases.length===1)try{let h=a.releases[0];g=P.setToSetIdentifierMappings[h][0].toUpperCase()}catch(h){console.error("Error getting set identifier from search",h)}g?i.sort((h,v)=>{var F,x;let k=(F=h.setIdentifiers.find(T=>T.includes(g)))==null?void 0:F.replace(g,""),S=(x=v.setIdentifiers.find(T=>T.includes(g)))==null?void 0:x.replace(g,"");return k&&S?k.localeCompare(S):-1}):i.sort((h,v)=>h.name===v.name?`${h.pitch}`.localeCompare(`${v.pitch}`):h.name.localeCompare(v.name))}else{let g=[],h=[],v=s.map(k=>k.toLowerCase().replace(L,"")).join(" ");for(let k of i)k.name.toLowerCase().replace(L,"")===v?g.push(k):h.push(k);i=[...g,...h]}let d,{artists:f,foilings:p,releases:m,treatments:y}=a;return(f.length>0||p.length>0||m.length>0||y.length>0)&&(d=i.map(g=>{let h=g.printings.filter(v=>{let k=!!v.image,S=f.length===0||f.some(w=>v.artist.replace(L,"").toLowerCase().includes(w)),F=p.length===0||p.includes(v.foiling),x=m.length===0||m.includes(v.set),T=y.length===0||y.includes(v.treatment);return k&&S&&F&&x&&T});return he({matchingPrintings:h},g)})),{appliedFilters:n,attributes:a,keywords:s,searchResults:d||i}};let t={getFn:(i,n)=>{let a=ut.default.config.getFn(i,n);return a&&(Array.isArray(a)?a.map(s=>s.replace(L,"")):a.replace(L,""))},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=[...r],this.fuse=new ut.default([...r],t)}},Er=pt,Or=(e,r,t)=>{var n,a,s,o;let i=!0;for(let c of r){let{isNumber:u,isString:d,isArray:f,isBoolean:p,property:m}=c.filterToPropertyMapping;if((u&&!Ra(e,c)||d&&!_a(e,c)||f&&!Da(e,c)||p&&!Ea(e,c))&&(i=!1),t.isClash&&["rarities","bannedFormats"].includes(m)){let F=[P.Rarity.SuperRare,P.Rarity.Majestic,P.Rarity.Legendary,P.Rarity.Fabled].some(B=>e.rarities.includes(B)),x=!1;for(let{cardIdentifiers:B,heroes:z}of Ve)for(let D of t.heroes)z.includes(D)&&B.includes(e.cardIdentifier)&&(x=!0);let T=!!e.specializations&&e.specializations.length>0||x,w=[P.Type.Mentor,P.Type.Weapon].some(B=>e.types.includes(B)),I=Ye.includes(e.name);!i&&!I&&(T||w)&&F&&(i=!0),I&&(i=!1)}if(t.isClash&&t.heroes.includes(P.Hero.Briar)&&e.name==="Rosetta Thorn"&&(i=!0),!i&&t.heroes.includes(P.Hero.Brutus)){let F=((n=e.specializations)==null?void 0:n.length)>0;((a=e.keywords)==null?void 0:a.includes(dt.Keyword.Clash))&&!F&&(i=!0)}if(!i&&t.heroes.includes(P.Hero.Shiyana)&&["classes"].includes(m)){let F=((s=e.specializations)==null?void 0:s.length)>0,x=e.types.includes(P.Type.Token),T=e.cardIdentifier==="cracked-bauble-yellow",w=(o=e.keywords)==null?void 0:o.includes(dt.Keyword.Ephemeral);(F||x||T||w)&&(i=!0)}let v=e.types.includes(P.Type.Equipment);if(!i&&t.heroes.includes(P.Hero.Taylor)&&v&&v&&(i=!0),!i&&t.heroes.includes(P.Hero.Yorick)&&(["classes"].includes(m)||["talents"].includes(m))&&e.types.includes(P.Type.Token)&&(i=!0),!i)break}return i},Ra=(e,r)=>{var t;if(Ie(r,e)){let{values:i,modifier:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=ht(e,r);if(o!=null&&!isNaN(o))if(o=parseInt(o),n)switch(n){case">=":let c=i==null?void 0:i.some(p=>o>=parseInt(p));return a?!c:c;case">":let u=i==null?void 0:i.some(p=>o>parseInt(p));return a?!u:u;case"<=":let d=i==null?void 0:i.some(p=>o<=parseInt(p));return a?!d:d;case"<":let f=i==null?void 0:i.some(p=>o<parseInt(p));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=(t=Na(e,r))==null?void 0:t.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},_a=(e,r)=>{var t;if(Ie(r,e)){let{values:i,isAnd:n,excluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=(t=ht(e,r))==null?void 0:t.replaceAll(L,"");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},Da=(e,r)=>{if(Ie(r,e)){let{values:t,isAnd:i,excluded:n,filterToPropertyMapping:{partialMatch:a}}=r,s=Oa(e,r).map(o=>o==null?void 0:o.replaceAll(L,""));if(a){let o=i?t.every(u=>s==null?void 0:s.some(d=>d==null?void 0:d.toLowerCase().includes(u))):t.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?t.every(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c)):t.some(c=>s==null?void 0:s.some(u=>(u==null?void 0:u.toLowerCase())===c));return n?!o:o}}else return!0},Ea=(e,r)=>{if(Ie(r,e)){let{excluded:t}=r,i=ht(e,r);return t?!i:i}else return!0},ht=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.property]},Oa=(e,r)=>{let{filterToPropertyMapping:{nestedProperty:t,property:i}}=r,n=e[i]||[];return t?n.map(a=>a[t]).filter(a=>!!a):n},Na=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.specialProperty]},Ie=({cardTypes:e},{types:r,subtypes:t})=>!e||(e==null?void 0:e.some(i=>r.map(n=>n.toLowerCase()).includes(i.toLowerCase())||t.map(n=>n.toLowerCase()).includes(i.toLowerCase())));var ct=(e,r)=>{let t=r.find(i=>i.name.toLowerCase().replace(L,"")===e);return t||(t=r.find(i=>i.name.toLowerCase().replace(L,"").includes(e))),t};var U=W(j()),za=e=>{let r=e.filter(o=>o.types.includes(U.Type.Hero)).sort((o,c)=>o.name.localeCompare(c.name)),t=r.filter(o=>!o.young&&!o.classes.includes(U.Class.Adjudicator)),i=r.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=r.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=r.filter(o=>o.young),s=a.filter(({hero:o})=>!t.find(c=>c.hero===o));return{all:r,adult:t,nonPromo:i,promoOnly:n,young:a,youngOnly:s}};var Hr=W(j());var ft=W(j()),Ha={"Dawnblade, Resplendent":"Dawnblade"},Nr=e=>Ha[e.name]||e.name,zr=e=>{var r;return(r=e.functionalText)==null?void 0:r.replaceAll(e.name,"")},Be=(e,r)=>{let t=r.find(i=>i.name.toLowerCase().replace(L,"")===e);return t||(t=r.find(i=>i.name.toLowerCase().replace(L,"").includes(e))),gt(t,r)},gt=(e,r)=>{var a,s;let t=[],i=[],n=[];if(e){let o=[],c=[],u=Nr(e);for(let d of r){let f=Nr(d),p=u===f,m=e.pitch!==d.pitch;if(p&&m)t.push(d);else if(!p){let y=e.name==="Seismic Surge",g=(a=d.keywords)==null?void 0:a.includes(ft.Keyword.Heave),h=y&&g,v=zr(d),k=v==null?void 0:v.includes(u),S=zr(e),F=S==null?void 0:S.includes(f);(k||h)&&o.push(d);let x=d.name==="Seismic Surge",T=(s=e.keywords)==null?void 0:s.includes(ft.Keyword.Heave);(F||x&&T)&&c.push(d)}}for(let d of o)i.push(d);for(let d of c){let f=d.name;u!==f&&!c.some(p=>{let m=p.name;return m!==f&&m.includes(f)})&&n.push(d)}}return{otherPitches:t,referencedBy:i,references:n}},$a=["cash-in-yellow"],Wa=(e,r,t)=>{let i=new Set;for(let n of e.filter(({cardIdentifier:a})=>!$a.includes(a))){let{references:a}=gt(n,r);for(let s of a.filter(o=>{let c=o.name==="Hyper Driver",u=t===Hr.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,getDeckFilters,getExcludedMetaFilters,getHeroBreakdown,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,heroHasFilters,shorthands});
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.0.48",
4
+ "version": "2.0.50",
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.0.48",
19
+ "@flesh-and-blood/cards": "^2.0.49",
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": "2575063983fcde979228962374529da15dc5abd8"
49
+ "gitHead": "a59b95726f7dc73bec29dad845e2a0d60a762067"
50
50
  }