@flesh-and-blood/search 4.0.78 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/filters.js +36 -24
- package/dist/index.cjs +1 -1
- package/dist/related.d.ts +17 -14
- package/dist/related.js +45 -119
- package/package.json +4 -4
package/dist/filters.js
CHANGED
|
@@ -13,7 +13,10 @@ import { getExcludedMetaFilters, getMetaFilters } from "./metaFilters.js";
|
|
|
13
13
|
import { multiWordShorthands, singleWordShorthands } from "./shorthands.js";
|
|
14
14
|
import { PUNCTUATION } from "./constants.js";
|
|
15
15
|
import { getCardByName } from "./helpers.js";
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
getCardsByReferencedCardIdentifier,
|
|
18
|
+
getReferencedCards
|
|
19
|
+
} from "./related.js";
|
|
17
20
|
const availableModifiers = [">=", ">", "<=", "<"];
|
|
18
21
|
const availableExclusions = ["!", "-"];
|
|
19
22
|
const arcaneFilter = {
|
|
@@ -378,46 +381,55 @@ const getKeywordsAndAppliedFiltersFromText = (text, cards, additionalHeroes = []
|
|
|
378
381
|
}
|
|
379
382
|
}
|
|
380
383
|
};
|
|
384
|
+
const cardsByReferencedCardIdentifier = getCardsByReferencedCardIdentifier(cards);
|
|
381
385
|
for (const relatedCardName of relatedCardNames) {
|
|
382
386
|
if (counter > limit) {
|
|
383
387
|
break;
|
|
384
388
|
}
|
|
385
|
-
const
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
const relatedCard = getCardByName(relatedCardName, cards);
|
|
390
|
+
getReferencedCards(relatedCard, cards).forEach(addToSetAndRelated);
|
|
391
|
+
if (counter === 0 && relatedCard) {
|
|
392
|
+
const referencingCards = cardsByReferencedCardIdentifier.get(
|
|
393
|
+
relatedCard.cardIdentifier
|
|
394
|
+
) || [];
|
|
395
|
+
referencingCards.forEach(addToSetAndRelated);
|
|
392
396
|
}
|
|
393
397
|
counter++;
|
|
394
398
|
}
|
|
395
399
|
values = Array.from(names);
|
|
396
400
|
} else if (["referencedby", "references"].includes(filterKey)) {
|
|
397
|
-
const
|
|
401
|
+
const isNamedByFilter = ["referencedby"].includes(filterKey);
|
|
398
402
|
const relatedCardNames = [...values].filter((value) => !!value);
|
|
399
403
|
values = [];
|
|
400
404
|
filterKey = "name";
|
|
401
405
|
isOr = true;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
...references.map(
|
|
410
|
-
({ name }) => name.toLowerCase().replaceAll(PUNCTUATION, "")
|
|
411
|
-
)
|
|
412
|
-
);
|
|
413
|
-
} else if (["references"].includes(originalKey)) {
|
|
414
|
-
values.push(
|
|
415
|
-
...referencedBy.map(
|
|
416
|
-
({ name }) => name.toLowerCase().replaceAll(PUNCTUATION, "")
|
|
406
|
+
const relatedCards = [];
|
|
407
|
+
if (isNamedByFilter) {
|
|
408
|
+
for (const relatedCardName of relatedCardNames) {
|
|
409
|
+
relatedCards.push(
|
|
410
|
+
...getReferencedCards(
|
|
411
|
+
getCardByName(relatedCardName, cards),
|
|
412
|
+
cards
|
|
417
413
|
)
|
|
418
414
|
);
|
|
419
415
|
}
|
|
416
|
+
} else {
|
|
417
|
+
const cardsByReferencedCardIdentifier = getCardsByReferencedCardIdentifier(cards);
|
|
418
|
+
for (const relatedCardName of relatedCardNames) {
|
|
419
|
+
const relatedCard = getCardByName(relatedCardName, cards);
|
|
420
|
+
if (relatedCard) {
|
|
421
|
+
const referencingCards = cardsByReferencedCardIdentifier.get(
|
|
422
|
+
relatedCard.cardIdentifier
|
|
423
|
+
) || [];
|
|
424
|
+
relatedCards.push(...referencingCards);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
420
427
|
}
|
|
428
|
+
values.push(
|
|
429
|
+
...relatedCards.map(
|
|
430
|
+
({ name }) => name.toLowerCase().replaceAll(PUNCTUATION, "")
|
|
431
|
+
)
|
|
432
|
+
);
|
|
421
433
|
} else if (["art", "artist"].includes(filterKey)) {
|
|
422
434
|
artists = values;
|
|
423
435
|
} else if (["print", "prints", "printing", "printings"].includes(filterKey)) {
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var ur=Object.create;var J=Object.defineProperty;var fr=Object.getOwnPropertyDescriptor;var gr=Object.getOwnPropertyNames;var hr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var yr=(e,r)=>{for(var t in r)J(e,t,{get:r[t],enumerable:!0})},Le=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of gr(r))!mr.call(e,a)&&a!==t&&J(e,a,{get:()=>r[a],enumerable:!(i=fr(r,a))||i.enumerable});return e};var br=(e,r,t)=>(t=e!=null?ur(hr(e)):{},Le(r||!e||!e.__esModule?J(t,"default",{value:e,enumerable:!0}):t,e)),Cr=e=>Le(J({},"__esModule",{value:!0}),e);var yt={};yr(yt,{FilterProperty:()=>Re,PUNCTUATION:()=>d,RARITY_VALUES_MAPPING:()=>Pe,abbreviations:()=>de,availableExclusions:()=>sr,availableModifiers:()=>ar,default:()=>lr,filterCard:()=>cr,filtersToCardPropertyMappings:()=>oe,getAbbreviation:()=>Q,getAbbreviationByCard:()=>Fr,getCardByName:()=>be,getCleanText:()=>ye,getExcludedMetaFilters:()=>fe,getKeywordsAndAppliedFiltersFromText:()=>we,getMetaFilters:()=>ue,getNormalizedText:()=>z,getRelatedCards:()=>Ce,getRelatedCardsByName:()=>te,getTokensReferencedByCards:()=>Dr,multiWordShorthands:()=>he,shorthands:()=>ge,singleWordShorthands:()=>me});module.exports=Cr(yt);var ne=require("@flesh-and-blood/types"),Se=br(require("fuse.js"),1);var d=/[!"#$%&'’(),./:;<=>?@[\]^_`|~]/g;var l=require("@flesh-and-blood/types");var Q=e=>de.find(({abbreviations:r})=>r.find(t=>t.toLowerCase()===e)),Fr=e=>de.find(({card:r})=>r.toLowerCase()===e.name.toLowerCase()),de=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Slippy","Arakni Slipped Through the Cracks","Arakni, Slipped Through the Cracks"],card:"Arakni, 5L!p3d 7hRu 7h3 cR4X"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CBelly"],card:"Cerebellum Processor"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CLV"],card:"Channel Lightning Valley"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CMI"],card:"Channel Mount Isen"},{abbreviations:["CMT"],card:"Channel the Millennium Tree"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["Sea and Sea"],card:"Conqueror of the High Seas"},{abbreviations:["CYB"],card:"Count Your Blessings"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DnD"],card:"Devotion Never Dies"},{abbreviations:["DIO"],card:"Dash I/O"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Yum yum"],card:"Fruits of the Forest"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["Habibi"],card:"Hanabi Blaster"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["RKO","Cheato"],card:"Kayo, Underhanded Cheat"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["MoPL"],card:"Mask of the Pouncing Lynx"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["P-Bone"],card:"Performance Bonus"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PtW"],card:"Poison the Well"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["DPot","D Pot"],card:"Potion of D\xE9j\xE0 Vu"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["Eugene"],card:"Rhinar, Reckless Rampage",isHidden:!0},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFaS","S4aS"],card:"Scar for a Scar"},{abbreviations:["Tyler"],card:"Scurv, Stowaway",isHidden:!0},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["Snaps"],card:"Snapdragon Scalers"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["Wreckless Wing"],card:"War Cry of Bellona"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var L=require("@flesh-and-blood/types");var Re=(i=>(i.BannedFormats="bannedFormats",i.LegalFormats="legalFormats",i.LegalHeroes="legalHeroes",i))(Re||{}),re=Array.from(Array(50).keys()).map(e=>`${e}`),Mr=[{format:L.Format.ClassicConstructed,nicknames:["cc","classic"]},{format:L.Format.LivingLegend,nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:L.Format.SilverAge,nicknames:["sage"]},{format:L.Format.GoldenAge,nicknames:["gage"]},{format:L.Format.UltimatePitFight,nicknames:["upf"]}],vr=Object.values(L.Format).map(e=>{let r=Mr.find(({format:i})=>i===e),t=e.toLowerCase().replaceAll(d,"");return r?{...r,format:t}:{format:t}}),Ar=[{hero:L.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:L.Hero.Dorinthea,nicknames:["dori"]},{hero:L.Hero.Genis,nicknames:["genis"]},{hero:L.Hero.GravyBones,nicknames:["gravy"]},{hero:L.Hero.Iyslander,nicknames:["islander"]}],Tr=Object.values(L.Hero).map(e=>{let r=Ar.find(({hero:i})=>i===e),t=e.toLowerCase().replaceAll(d,"");return r?{...r,hero:t}:{hero:t}}),Z=["common","rare","super rare","majestic","legendary","fabled"],xr=(e,r,t,i)=>{let a=[];if(!r)a.push(...e);else for(let s of e)switch(r){case">=":{let n=!1;for(let o of Z)n?a.push(o):o===s&&(n=!0,a.push(o));break}case">":{let n=!1;for(let o of Z)n?a.push(o):o===s&&(n=!0);break}case"<=":{let n=!1;for(let o of Z.slice().reverse())n?a.push(o):o===s&&(n=!0,a.push(o));break}case"<":{let n=!1;for(let o of Z.slice().reverse())n?a.push(o):o===s&&(n=!0);break}default:break}return{filterToPropertyMapping:{nestedProperty:"rarity",property:"printings",isArray:!0},isExcluded:t,isOptional:i,isOr:!0,values:a}},Ee=(e,r,t,i,a)=>{let s=i.map(h=>({hero:h.toLowerCase().replaceAll(d,"")})),n=[],o=[],c=[];for(let h of e){let g=vr.find(({format:p,nicknames:b})=>p===h||!!b&&b.includes(h));if(g)o.push(g.format);else{let p=Tr.find(({hero:b,nicknames:M})=>b===h||!!M&&M.includes(h))||s.find(({hero:b})=>b===h);p&&c.push(p.hero)}}let m=a||"legalFormats";return o.length>0&&n.push({filterToPropertyMapping:{property:m,isArray:!0},values:o,isOr:!0,isExcluded:r,isOptional:t}),c.length>0&&n.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:c,isOr:!0,isExcluded:r,isOptional:t}),n},Pr=(e,r,t,i)=>Ee(e,r,t,i,"bannedFormats"),ue=(e,r,t,i,a,s)=>{let n=[];return kr(t)?n.push(...Ee(i,e,r,s)):Rr(t)?n.push(...Pr(i,e,r,s)):Br(t)&&n.push(xr(i,a,e,r)),n},K=[{filterToPropertyMapping:{property:"cost",isNumber:!0},isExcluded:!0,values:re},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token","weapon"]}],V=[{filterToPropertyMapping:{property:"defense",isNumber:!0},isExcluded:!0,values:re},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["hero","placeholder","token","weapon"]}],X=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},isExcluded:!0,values:re},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token","weapon"]},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},isExcluded:!0,values:["true"]}],U=[{filterToPropertyMapping:{property:"power",isNumber:!0},isExcluded:!0,values:re},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token"]}],ee=[{filterToPropertyMapping:{property:"talents",isArray:!0},isExcluded:!0,values:Object.values(L.Talent).map(e=>e.toLowerCase())}],wr={"!co":K,"-co":K,"!cost":K,"-cost":K,"!color":K,"-color":K,"!b":V,"-b":V,"!block":V,"-block":V,"!d":V,"-d":V,"!def":V,"-def":V,"!defense":V,"-defense":V,"!pitch":X,"-pitch":X,"!p":X,"-p":X,"!attack":U,"-attack":U,"!power":U,"-power":U,"!pwr":U,"-pwr":U,"!pow":U,"-pow":U,"!talents":ee,"-talents":ee,"!tal":ee,"-tal":ee},fe=e=>{let r=[],t=wr[e];return t&&r.push(...t),r},Sr=["l","legal","hero"],kr=e=>Sr.includes(e),Lr=["banned"],Rr=e=>Lr.includes(e),Er=["r","rarity"],Br=e=>Er.includes(e);var I=require("@flesh-and-blood/types"),ge=[{description:"Attack actions",expanded:["st:attack"],filters:{subtypes:[I.Subtype.Attack]},isCardProperty:!1,shorthands:["AA"]},{description:"Arcane barrier",expanded:['k:"arcane barrier"'],filters:{keywords:[I.Keyword.ArcaneBarrier]},isCardProperty:!1,shorthands:["AB"]},{description:"Attack reactions",expanded:['t:"attack reaction"'],filters:{types:[I.Type.AttackReaction]},isCardProperty:!1,shorthands:["AR"]},{description:"Defense reactions",expanded:['t:"defense reaction"'],filters:{types:[I.Type.DefenseReaction]},isCardProperty:!1,shorthands:["DR"]},{description:"Gain life",expanded:["gain {h}"],filters:{functionalText:"gain {h}"},isCardProperty:!1,shorthands:["Gain life","Gains life"]},{description:"Go again",expanded:['k:"go again"'],filters:{keywords:[I.Keyword.GoAgain]},isCardProperty:!1,shorthands:["GA"]},{description:"Non-attack actions",expanded:["t:action","st:non-attack"],filters:{subtypes:[I.Subtype.NonAttack],types:[I.Type.Action]},isCardProperty:!1,shorthands:["NAA"]},{description:"Plus defense",expanded:["+ {d}"],filters:{functionalText:"+ {d}"},isCardProperty:!1,shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Spellvoid",expanded:['k:"spellvoid"'],filters:{keywords:[I.Keyword.Spellvoid]},isCardProperty:!1,shorthands:["SV"]}],he=ge.filter(({shorthands:e})=>e.some(r=>r.includes(" "))).map(e=>({...e,shorthands:e.shorthands.filter(r=>r.includes(" ")).map(r=>r.toLowerCase()).sort((r,t)=>t.length-r.length)})),me=ge.filter(({shorthands:e})=>e.some(r=>!r.includes(" "))).map(e=>({...e,shorthands:e.shorthands.filter(r=>!r.includes(" ")).map(r=>r.toLowerCase()).sort((r,t)=>t.length-r.length)}));var be=(e,r)=>{let t=r.find(i=>ye(i.name)===e);return t||(t=r.find(i=>ye(i.name).includes(e))),t},ye=e=>z(e.toLowerCase().trim().replace(d,"")),z=e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"");var j=require("@flesh-and-blood/types");var _=require("@flesh-and-blood/types"),Nr={"Dawnblade, Resplendent":"Dawnblade"},Be=e=>Nr[e.name]||e.name,Ne=e=>e.functionalText?.replaceAll(e.name,""),te=(e,r)=>{let t=r.find(i=>i.name.toLowerCase().replace(d,"")===e);return t||(t=r.find(i=>i.name.toLowerCase().replace(d,"").includes(e))),Ce(t,r)},Ce=(e,r,t)=>{let i={},a={},s={};if(e){let m=[],h=[],g=Be(e);for(let p of r){let b=Be(p),M=g===b,T=e.cardIdentifier!==p.cardIdentifier,G=e.pitch!==p.pitch;if(M&&T&&G)i[p.cardIdentifier]=p;else if(!M&&!t?.shouldSkipReferences){let x=e.name==="Seismic Surge",k=p.keywords?.includes(_.Keyword.Heave),u=x&&k,D=e.name==="Marked",f=p.keywords?.includes(_.Keyword.Mark),y=D&&f,A=Ne(p),C=A?.includes(g)||e.traits?.some(pe=>A?.includes(pe)),P=Ne(e);(C||u||y)&&m.push(p);let B=new RegExp(b,"g"),q=new RegExp(`\\*\\*${b}\\*\\*`,"g"),W=P?.match(B)||[],v=P?.match(q)||[],E=W.length===v.length,w=P?.includes(b)&&!E,H=(p.traits||[]).some(pe=>P?.includes(pe)),O=w||H,R=p.name==="Seismic Surge",S=e.keywords?.includes(_.Keyword.Heave),ce=R&&S,pr=p.name==="Marked",dr=e.keywords?.includes(_.Keyword.Mark);(O||ce||pr&&dr)&&h.push(p)}}for(let p of m)a[p.cardIdentifier]=p;for(let p of h){let b=p.name;g!==b&&!h.some(M=>{let T=M.name;return T!==b&&T?.includes(b)})&&(s[p.cardIdentifier]=p)}}let n=Object.values(i),o=Object.values(a),c=Object.values(s);return{otherPitches:n,referencedBy:o,references:c}},Or=["cash-in-yellow"],Ir={[j.Hero.Crackni]:{traits:[j.Trait.AgentOfChaos]},[j.Hero.Maxx]:{tokens:["hyper-driver"]}},Dr=(e,r,t)=>{let i=new Set;for(let a of e.filter(({cardIdentifier:s})=>!Or.includes(s))){let{references:s}=Ce(a,r);for(let n of s.filter(o=>{let c=o.name==="Hyper Driver",m=t===j.Hero.Maxx;return!c||m}))i.add(n)}if(t){let a=Ir[t];if(a){if(a.cards)for(let s of e)a.cards?.includes(s.cardIdentifier)&&i.add(s);if(a.tokens)for(let s of r)a.tokens?.includes(s.cardIdentifier)&&i.add(s)}}return Array.from(i)};var ar=[">=",">","<=","<"],sr=["!","-"],Hr={property:"arcane",specialProperty:"specialArcane",isNumber:!0,partialMatch:!0},Fe={property:"artists",isArray:!0,partialMatch:!0},Oe={property:"n/a",isMeta:!0},Ie={property:"bonds",isArray:!0},Vr={property:"n/a"},De={property:"classes",isArray:!0,partialMatch:!0},He={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},$={property:"defense",specialProperty:"specialDefense",isNumber:!0},Ve={property:"flows",isArray:!0},Ge={nestedProperty:"foiling",property:"printings",isArray:!0},Ue={property:"fusions",isArray:!0},We={property:"intellect",isNumber:!0},Ke={property:"keywords",isArray:!0},Me={property:"n/a",isMeta:!0},je={property:"life",specialProperty:"specialLife",isNumber:!0},xe={property:"meta",isArray:!0},qe={property:"name",isString:!0,partialMatch:!0},ve={property:"pitch",isNumber:!0},ze={property:"firstReleaseDate",isDate:!0},ie={property:"power",specialProperty:"specialPower",isNumber:!0},Gr={property:"setIdentifiers",isArray:!0,partialMatch:!0},_e={property:"n/a",isMeta:!0},Ur={property:"n/a"},Wr={property:"n/a"},$e={property:"sets",isArray:!0,partialMatch:!0},Ae={property:"shorthands",isArray:!0,partialMatch:!0},ae={property:"specializations",isArray:!0,partialMatch:!0},Ye={property:"subtypes",isArray:!0},Je={property:"types",isArray:!0},Qe={property:"talents",isArray:!0},Kr={property:"functionalText",isString:!0,partialMatch:!0},jr={property:"traits",isArray:!0,partialMatch:!0},qr={property:"typeText",isString:!0,partialMatch:!0},se={nestedProperty:"treatments",property:"printings",isArray:!0,isNestedPropertyArray:!0},zr={property:"firstReleaseDate",isString:!0,partialMatch:!0},oe={arcane:Hr,a:Fe,artist:Fe,art:Fe,attack:ie,b:$,block:$,banned:Oe,bond:Ie,bonds:Ie,c:De,class:De,chain:Vr,co:He,cost:He,color:ve,d:$,def:$,defense:$,flow:Ve,flows:Ve,f:Ue,fusion:Ue,foil:Ge,foiling:Ge,i:We,intellect:We,is:xe,k:Ke,keyword:Ke,l:Me,legal:Me,hero:Me,li:je,life:je,meta:xe,n:qe,name:qe,p:ve,pitch:ve,pwr:ie,pow:ie,power:ie,print:Gr,r:_e,rarity:_e,referencedby:Ur,references:Wr,rf:Oe,s:$e,set:$e,short:Ae,shorthand:Ae,shorthands:Ae,sp:ae,spec:ae,specialization:ae,specializations:ae,st:Ye,subtype:Ye,t:Je,type:Je,tal:Qe,talent:Qe,text:Kr,trait:jr,treat:se,treatment:se,var:se,variation:se,x:qr,year:zr},_r=[{text:l.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:l.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(d,"")}],$r=e=>{let r=[],t=e.replaceAll("\u201D",'"');for(let{text:a,override:s}of _r)t.includes(a)&&(t=t.replace(a,s));if(Q(t)?.card)r.push(t);else{let a=t.split(/[ ]+/),s="",n=0;for(let o of a)n===2&&(r.push(s.trim().replaceAll('"',"")),s="",n=0),n<2&&o.split('"').length===2?(s+=" "+o,n++):n===0&&s===""?r.push(o):n===1&&(s+=" "+o);n===2&&(r.push(s.trim().replaceAll('"',"")),s="",n=0)}return r},we=(e,r,t=[],i=[],a=rt())=>{let s=e.trim().toLowerCase();for(let{expanded:x,shorthands:k}of he)for(let u of k)if(s.includes(u)){s=s.replace(u,x.join(" "));break}for(let[x,k]of Object.entries(l.setToSetIdentifierMappings))s.includes(x.toLowerCase())&&(s=s.replace(x.toLowerCase(),k[0]));let n=$r(s),o=[];for(let x of n){let k=me.find(({shorthands:u})=>u.includes(x));k&&!k.isCardProperty?o.push(...k.expanded):o.push(x)}let c=[],m=[],h=[],g=[],p=!1,b=[],M=[],T=[],G=[];for(let x of o)if(lt(x)){let[k,u]=x.split(":"),{modifier:D,values:f,isAnd:y,isOr:A}=ot(u),{filterKey:C,isExcluded:P,isOptional:B,isMeta:q}=nt(k),W=!1;if(q){if(["rarity","r"].includes(C)){let v=st(f);P||(M=[...v]),f=v.map(E=>E.toLowerCase())}["legal","l","hero"].includes(C),c.push(...ue(P,B,C,f,D,t))}else{if(["chain"].includes(C)){let v=R=>R.name.toLowerCase().replaceAll(d,""),E=f.map(R=>be(R,r)).filter(R=>!!R).map(v),w=new Set(E);C="name",A=!0;let N=20,H=0,O=R=>{if(!R.types.includes(l.Type.Hero)){let S=v(R);w.add(S),E.includes(S)||E.push(S)}};for(let R of E){if(H>N)break;let{referencedBy:S,references:ce}=te(R,r);ce.forEach(O),H===0&&S.forEach(O),H++}f=Array.from(w)}else if(["referencedby","references"].includes(C)){let v=C,E=[...f].filter(w=>!!w);f=[],C="name",A=!0;for(let w of E){let{referencedBy:N,references:H}=te(w,r);["referencedby"].includes(v)?f.push(...H.map(({name:O})=>O.toLowerCase().replaceAll(d,""))):["references"].includes(v)&&f.push(...N.map(({name:O})=>O.toLowerCase().replaceAll(d,"")))}}else if(["art","artist"].includes(C))m=f;else if(["print","prints","printing","printings"].includes(C))b=f;else if(["is","meta"].includes(C)){let v=[],E=[],w=[],N=[];for(let S of f)Zr.includes(S)?v.push(S):Xr.includes(S)?E.push(S):et.includes(S)?w.push(S):N.push(S);v.length>0&&(c.push({filterToPropertyMapping:xe,values:[l.Meta.Reprint.toLowerCase().replaceAll(d,"")],isAnd:y,isOr:A,isExcluded:!P,isOptional:B}),W=N.length===0);let H=E.length>0;H&&c.push({filterToPropertyMapping:ze,values:[a],isAnd:y,isOr:A,isExcluded:P,isOptional:B});let O=w.length>0;O&&c.push({filterToPropertyMapping:ze,values:[a],isAnd:y,isOr:A,isExcluded:!P,isOptional:B}),(H||O)&&(W=N.length===0);let R=tt(N);f=R.map(S=>S.toLowerCase().replaceAll(d,"")),R.includes(l.Meta.Expansion)&&!P&&(p=!0)}else["foiling","foil"].includes(C)?(g=it(f),f=g.map(v=>v.toLowerCase())):["treat","treatment","var","variation"].includes(C)?(G=at(f),f=G.map(v=>v.toLowerCase())):["set","s"].includes(C)?(T=Yr(f,i),f=T.map(v=>v.toLowerCase().replaceAll(d,""))):["pitch","p","color"].includes(C)&&(f=Qr(f));oe[C]&&!W&&c.push({filterToPropertyMapping:oe[C],values:f,isAnd:y,isOr:A,modifier:D,isExcluded:P,isOptional:B})}}else if(x){let k=Q(x)?.card,u=fe(x);k?h.push(`"${k.toLowerCase().replace(d,"")}"`):u&&u.length>0?c.push(...u):h.push(x.replace(d,""))}return{appliedFilters:c,attributes:{artists:m,foilings:g,isExpansionSlot:p,prints:b,rarities:M,releases:T,treatments:G},keywords:h}},Yr=(e,r=[])=>{let t=[];for(let i of e)t.push(...Jr(i,r));return t},Jr=(e,r=[])=>{let t=[],i=Object.values(l.Release).find(a=>a.toLowerCase().replaceAll(d,"")===e);if(i&&t.push(i),t.length===0){let a=l.setIdentifierToSetMappings[e];a&&t.push(a)}if(t.length===0){let a=Object.values(l.Release).filter(s=>s.toLowerCase().includes(e));a.length>0&&t.push(...a)}if(t.length===0){let a=r.find(s=>s.toLowerCase().replaceAll(d,"")===e);a&&t.push(a)}return t},Te={purple:4,blue:3,yellow:2,red:1,white:0},Qr=e=>{let r=[];for(let t of e)Te[t]||Te[t]===0?r.push(Te[t].toString()):r.push(t);return r},Zr=["unique"],Xr=["preview","spoiler","unreleased"],et=["released"],rt=()=>{let e=new Date,r=`${e.getMonth()+1}`.padStart(2,"0"),t=`${e.getDate()}`.padStart(2,"0");return`${e.getFullYear()}-${r}-${t}`},Ze={dual:l.Meta.DualClass,exp:l.Meta.Expansion,expansion:l.Meta.Expansion,expansionSlot:l.Meta.Expansion,rainbow:l.Meta.Rainbow,reprint:l.Meta.Reprint,reprints:l.Meta.Reprint},tt=e=>{let r=[];for(let t of e)Ze[t]?r.push(Ze[t]):l.Meta[t]&&r.push(l.Meta[t]);if(e.length>0&&r.length===0){for(let t of Object.values(l.Meta))for(let i of e)if(t.toLowerCase().includes(i)){r.push(t);break}}return r},Xe={r:l.Foiling.Rainbow,rf:l.Foiling.Rainbow,rainbow:l.Foiling.Rainbow,c:l.Foiling.Cold,cf:l.Foiling.Cold,cold:l.Foiling.Cold,g:l.Foiling.Gold,gf:l.Foiling.Gold,gold:l.Foiling.Gold},it=e=>{let r=[];for(let t of e)Xe[t]&&r.push(Xe[t]);return r},er={...Object.values(l.Treatment).reduce((e,r)=>(e[r.toLowerCase()]=r,e),{}),aa:l.Treatment.AA,alt:l.Treatment.AA,"alt art":l.Treatment.AA,ab:l.Treatment.AB,"alt border":l.Treatment.AB,at:l.Treatment.AT,"alt text":l.Treatment.AT,ea:l.Treatment.EA,extended:l.Treatment.EA,"extended art":l.Treatment.EA,fa:l.Treatment.FA,full:l.Treatment.FA,"full art":l.Treatment.FA},at=e=>{let r=[];for(let t of e)er[t]?r.push(er[t]):l.Treatment[t.toUpperCase()]&&r.push(l.Treatment[t.toUpperCase()]);return r},Pe={b:l.Rarity.Basic,c:l.Rarity.Common,f:l.Rarity.Fabled,l:l.Rarity.Legendary,m:l.Rarity.Majestic,p:l.Rarity.Promo,r:l.Rarity.Rare,s:l.Rarity.SuperRare,t:l.Rarity.Token,v:l.Rarity.Marvel},st=e=>{let r=[];for(let t of e)Pe[t]?r.push(Pe[t]):r.push(t);return r},ot=e=>{let r=[],t,i,a=ar.find(s=>e.includes(s));if(a){let[,s]=e.split(a);rr(s)?(t=!0,r.push(...s.trim().split("+").map(n=>n.replace(d,"")))):tr(s)?(i=!0,r.push(...s.trim().split(",").map(n=>n.replace(d,"")))):r.push(s.trim().replace(d,""))}else rr(e)?(t=!0,r.push(...e.trim().split("+").map(s=>s.replace(d,"")))):tr(e)?(i=!0,r.push(...e.trim().split(",").map(s=>s.replace(d,"")))):e.startsWith('"')&&e.endsWith('"')?r.push(e.trim().replaceAll('"',"").replace(d,"")):r.push(e.trim().replace(d,""));return{modifier:a,values:r,isAnd:t,isOr:i}},nt=e=>{let r=ct(e);if(r){let[,t]=e.split(r);return{filterKey:t,isExcluded:!0,isOptional:!1,isMeta:ir(t)}}else return{filterKey:e,isExcluded:!1,isOptional:!1,isMeta:ir(e)}},lt=e=>e.indexOf(":")>=0,rr=e=>e.indexOf("+")>=0,tr=e=>e.indexOf(",")>=0,ir=e=>!!oe[e]?.isMeta,ct=e=>sr.find(r=>e.includes(r))?.slice(0,1);var F=require("@flesh-and-blood/types"),or={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[F.Class.Generic],defaultImage:"FNG000",firstReleaseDate:"2022-06-02",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",legalFormats:[],legalHeroes:[F.Hero.Kayo,F.Hero.Levia,F.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",rarity:F.Rarity.Rare,set:F.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${F.Treatment.FA}`,rarity:F.Rarity.Marvel,set:F.Release.Promos,treatment:F.Treatment.FA}],name:"Fangs A Lot",rarities:[F.Rarity.Rare,F.Rarity.Marvel],rarity:F.Rarity.Rare,sets:[F.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[F.Subtype.Attack],types:[F.Type.Action],typeText:"Generic Action - Attack"},nr=[{keyword:or.name.toLowerCase(),card:or}];var ke=class{constructor(r,t=[],i=[],a=!1){this.log=(r,...t)=>{this.debug&&console.log(r,...t)};this.search=(r,t)=>{let i,{appliedFilters:a,attributes:s,keywords:n}=we(r,this.cards,this.additionalHeroes,this.additionalSets),o=n.join(" "),c=t?nr.filter(u=>u.keyword===o):[];if(c.length>0?i=c.map(({card:u})=>u):n.length?i=this.fuse.search(o).map(u=>u.item):i=[...this.cards],a.length&&(i=i.filter(u=>u&&cr(u,a))),n.length===0){let u="";if(s.releases.length===1)try{let y=s.releases[0];u=ne.setToSetIdentifierMappings[y][0].toUpperCase()}catch(y){console.error("Error getting set identifier from search",y)}if(!u&&s.prints.length===1)try{let y=s.prints[0];ne.setIdentifierToSetMappings[y]&&(u=y.toUpperCase())}catch(y){console.error("Error getting set identifier from search",y)}u?i.sort((y,A)=>{let C=y.setIdentifiers.find(B=>B.includes(u))?.replace(u,""),P=A.setIdentifiers.find(B=>B.includes(u))?.replace(u,"");return C&&P?C.localeCompare(P):-1}):i.sort((y,A)=>y.name===A.name?`${y.pitch}`.localeCompare(`${A.pitch}`):y.name.localeCompare(A.name))}else{let u=[],D=[],f=n.map(y=>y.toLowerCase().replace(d,"")).join(" ");for(let y of i)y.name.toLowerCase().replace(d,"")===f?u.push(y):D.push(y);i=[...u,...D]}let m,{artists:h,isExpansionSlot:g,foilings:p,prints:b,rarities:M,releases:T,treatments:G}=s;(h.length>0||g||p.length>0||b.length>0||M.length>0||T.length>0||G.length>0)&&(m=i.map(u=>{let D=u.printings.filter(f=>{let y=!!f.image,A=h.length===0||h.some(w=>f.artists.find(N=>N.replace(d,"").toLowerCase().includes(w))),C=!g||g===f.isExpansionSlot,P=p.length===0||p.includes(f.foiling),B=b.length===0||b.some(w=>f.identifier.includes(w.toUpperCase())),q=M.length===0||M.includes(f.rarity),W=T.length===0||T.includes(f.set),v=G.length===0||f.treatments?.some(w=>G.includes(w));return y&&A&&C&&P&&B&&q&&W&&v});return{...u,matchingPrintings:D}}));let k=m?.length>0?m:i;return{appliedFilters:a,attributes:s,keywords:n,searchResults:k}};let s={getFn:(n,o)=>{let c=Se.default.config.getFn(n,o);return c&&(Array.isArray(c)?c.map(m=>z(m.replace(d,""))):z(c).replace(d,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"shorthands",weight:4},{name:"setIdentifiers",weight:2},{name:"traits",weight:4},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.additionalHeroes=t,this.additionalSets=i,this.cards=[...r],this.debug=a,this.fuse=new Se.default([...r],s)}},lr=ke,cr=(e,r)=>{let t=!0,i=!1;for(let a of r){let s=a.isOptional,{isNumber:n,isString:o,isArray:c,isBoolean:m,isDate:h}=a.filterToPropertyMapping;if(n){let g=pt(e,a);s?g&&(i=!0):t=t&&g}else if(o){let g=dt(e,a);s?g&&(i=!0):t=t&&g}else if(c){let g=ut(e,a,r);s?g&&(i=!0):t=t&&g}else if(m){let g=ft(e,a);s?g&&(i=!0):t=t&&g}else if(h){let g=gt(e,a);s?g&&(i=!0):t=t&&g}}return t},pt=(e,r)=>{if(Y(r,e)){let{values:t,modifier:i,isExcluded:a,filterToPropertyMapping:{partialMatch:s}}=r,n=le(e,r);if(n!=null&&!isNaN(n))if(n=parseInt(n),i)switch(i){case">=":{let o=t?.some(c=>n>=parseInt(c));return a?!o:o}case">":{let o=t?.some(c=>n>parseInt(c));return a?!o:o}case"<=":{let o=t?.some(c=>n<=parseInt(c));return a?!o:o}case"<":{let o=t?.some(c=>n<parseInt(c));return a?!o:o}default:return!1}else{let o=t?.some(c=>n===parseInt(c));return a?!o:o}else{let o=mt(e,r)?.toLowerCase(),c=s?t?.some(m=>o?.includes(m)):t?.some(m=>o===m);return a?!c:c}}else return!0},dt=(e,r)=>{if(Y(r,e)){let{values:t,isAnd:i,isExcluded:a,filterToPropertyMapping:{partialMatch:s}}=r,n=le(e,r)?.replaceAll(d,"");if(s){let o=i?t?.every(c=>n?.toLowerCase().includes(c)):t?.some(c=>n?.toLowerCase().includes(c));return a?!o:o}else{let o=i?t?.every(c=>n?.toLowerCase()===c):t?.some(c=>n?.toLowerCase()===c);return a?!o:o}}else return!0},ut=(e,r,t)=>{if(Y(r,e)){let{values:i,isAnd:a,isExcluded:s,filterToPropertyMapping:{partialMatch:n}}=r,o=ht(e,r,t).map(c=>c?.replaceAll(d,""));if(n){let c=a?i.every(h=>o?.some(g=>g?.toLowerCase().includes(h))):i.some(h=>o?.some(g=>g?.toLowerCase().includes(h))),m=o.length===0;return s?!c||m:c}else{let c=a?i.every(m=>o?.some(h=>h?.toLowerCase()===m)):i.some(m=>o?.some(h=>h?.toLowerCase()===m));return s?!c:c}}else return!0},ft=(e,r)=>{if(Y(r,e)){let{isExcluded:t}=r,i=le(e,r);return t?!i:i}else return!0},gt=(e,r)=>{if(Y(r,e)){let{values:t,isExcluded:i}=r,a=le(e,r),s=t?.some(n=>a>n);return i?!s:s}else return!0},le=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.property]},ht=(e,r,t)=>{let{filterToPropertyMapping:{isNestedPropertyArray:i,nestedProperty:a,property:s}}=r,n=e[s]||[],o=[],c=Object.keys(e.legalOverrides||{}).length>0,m=r.filterToPropertyMapping.property==="legalHeroes",h=t.find(({filterToPropertyMapping:p})=>p.property==="legalFormats");if(c&&m&&!!h){let p=new Set;for(let{format:b,heroes:M}of e.legalOverrides||[])if(h.values.includes(b.toLowerCase()))for(let T of M)p.add(T);o=Array.from(p)}if(o.length===0)if(a){let p=new Set;for(let b of n)if(i){let M=b[a]||[];for(let T of M)p.add(T)}else{let M=b[a];M&&p.add(M)}o=Array.from(p)}else o=n;return o},mt=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.specialProperty]},Y=({cardTypes:e},{types:r,subtypes:t})=>!e||e?.some(i=>r.map(a=>a.toLowerCase()).includes(i.toLowerCase())||t.map(a=>a.toLowerCase()).includes(i.toLowerCase()));0&&(module.exports={FilterProperty,PUNCTUATION,RARITY_VALUES_MAPPING,abbreviations,availableExclusions,availableModifiers,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCleanText,getExcludedMetaFilters,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getRelatedCards,getRelatedCardsByName,getTokensReferencedByCards,multiWordShorthands,shorthands,singleWordShorthands});
|
|
1
|
+
var sr=Object.create;var Y=Object.defineProperty;var or=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var lr=Object.getPrototypeOf,cr=Object.prototype.hasOwnProperty;var pr=(e,r)=>{for(var t in r)Y(e,t,{get:r[t],enumerable:!0})},we=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of nr(r))!cr.call(e,a)&&a!==t&&Y(e,a,{get:()=>r[a],enumerable:!(i=or(r,a))||i.enumerable});return e};var dr=(e,r,t)=>(t=e!=null?sr(lr(e)):{},we(r||!e||!e.__esModule?Y(t,"default",{value:e,enumerable:!0}):t,e)),ur=e=>we(Y({},"__esModule",{value:!0}),e);var lt={};pr(lt,{FilterProperty:()=>Se,PUNCTUATION:()=>u,RARITY_VALUES_MAPPING:()=>Ae,abbreviations:()=>pe,availableExclusions:()=>er,availableModifiers:()=>Xe,default:()=>ir,filterCard:()=>ar,filtersToCardPropertyMappings:()=>oe,getAbbreviation:()=>J,getAbbreviationByCard:()=>fr,getCardByName:()=>j,getCardsByReferencedCardIdentifier:()=>te,getCleanText:()=>be,getExcludedMetaFilters:()=>ue,getKeywordsAndAppliedFiltersFromText:()=>Te,getMetaFilters:()=>de,getNormalizedText:()=>z,getOtherPitches:()=>wr,getReferencedCards:()=>re,getTokensReferencedByCards:()=>Sr,multiWordShorthands:()=>ge,shorthands:()=>fe,singleWordShorthands:()=>he});module.exports=ur(lt);var ne=require("@flesh-and-blood/types"),Pe=dr(require("fuse.js"),1);var u=/[!"#$%&'’(),./:;<=>?@[\]^_`|~]/g;var l=require("@flesh-and-blood/types");var J=e=>pe.find(({abbreviations:r})=>r.find(t=>t.toLowerCase()===e)),fr=e=>pe.find(({card:r})=>r.toLowerCase()===e.name.toLowerCase()),pe=[{abbreviations:["10k"],card:"10,000 Year Reunion"},{abbreviations:["Pajamas","PJs"],card:"Alluvion Constellas"},{abbreviations:["Slippy","Arakni Slipped Through the Cracks","Arakni, Slipped Through the Cracks"],card:"Arakni, 5L!p3d 7hRu 7h3 cR4X"},{abbreviations:["Dullcap"],card:"Arcanite Skullcap"},{abbreviations:["ALS"],card:"Arc Light Sentinel"},{abbreviations:["AoW"],card:"Art of War"},{abbreviations:["BBD"],card:"Barraging Beatdown"},{abbreviations:["BBS"],card:"Big Blue Sky"},{abbreviations:["Starvo"],card:"Bravo, Star of the Show"},{abbreviations:["BEB"],card:"Bull's Eye Bracers"},{abbreviations:["BLW"],card:"Be Like Water"},{abbreviations:["BoJ"],card:"Balance of Justice"},{abbreviations:["BOHH"],card:"Blood on Her Hands"},{abbreviations:["BRB"],card:"Bloodrush Bellow"},{abbreviations:["Breezies"],card:"Breeze Rider Boots"},{abbreviations:["BTA"],card:"Burn Them All"},{abbreviations:["CStrike","C-Strike","C Strike"],card:"Celestial Cataclysm"},{abbreviations:["CBelly"],card:"Cerebellum Processor"},{abbreviations:["CLF"],card:"Channel Lake Frigid"},{abbreviations:["CLV"],card:"Channel Lightning Valley"},{abbreviations:["CMH"],card:"Channel Mount Heroic"},{abbreviations:["CMI"],card:"Channel Mount Isen"},{abbreviations:["CMT"],card:"Channel the Millennium Tree"},{abbreviations:["CnC","C&C"],card:"Command and Conquer"},{abbreviations:["Sea and Sea"],card:"Conqueror of the High Seas"},{abbreviations:["CYB"],card:"Count Your Blessings"},{abbreviations:["Cat","Kitty"],card:"Crouching Tiger"},{abbreviations:["CoD"],card:"Crown of Dominion"},{abbreviations:["CoP"],card:"Crown of Providence"},{abbreviations:["CtW"],card:"Crush the Weak"},{abbreviations:["DD"],card:"Death Dealer"},{abbreviations:["DnD"],card:"Devotion Never Dies"},{abbreviations:["DIO"],card:"Dash I/O"},{abbreviations:["EBTT"],card:"Even Bigger Than That!"},{abbreviations:["NewNigma"],card:"Enigma, New Moon"},{abbreviations:["EPot","E Pot"],card:"Energy Potion"},{abbreviations:["EStrike","E-Strike","E Strike"],card:"Enlightened Strike"},{abbreviations:["FFS"],card:"Fyendal's Fighting Spirit"},{abbreviations:["FoN"],card:"Force of Nature"},{abbreviations:["Frosty","\u{1F976}","\u{1F9CA}","\u2744\uFE0F"],card:"Frostbite"},{abbreviations:["Yum yum"],card:"Fruits of the Forest"},{abbreviations:["GnT"],card:"Give and Take"},{abbreviations:["Habibi"],card:"Hanabi Blaster"},{abbreviations:["HMH"],card:"Hope Merchant's Hood"},{abbreviations:["HoI"],card:"Heart of Ice"},{abbreviations:["Pumpkin"],card:"Jack-o'-lantern"},{abbreviations:["RKO","Cheato"],card:"Kayo, Underhanded Cheat"},{abbreviations:["KKBB"],card:"Knick Knack Bric-a-brac"},{abbreviations:["BStrike"],card:"Levels of Enlightenment"},{abbreviations:["LAG","Twominaris"],card:"Luminaris, Angel's Glow"},{abbreviations:["LCF","Newminaris"],card:"Luminaris, Celestial Fury"},{abbreviations:["LDE"],card:"Last Ditch Effort"},{abbreviations:["LtC"],card:"Lead the Charge"},{abbreviations:["LNW"],card:"Leave No Witnesses"},{abbreviations:["LFaL","L4aL"],card:"Life for a Life"},{abbreviations:["LiT"],card:"Lost in Thought"},{abbreviations:["MMB"],card:"Mage Master Boots"},{abbreviations:["MaxV"],card:"Maximum Velocity"},{abbreviations:["MoM"],card:"Mask of Momentum"},{abbreviations:["MoPL"],card:"Mask of the Pouncing Lynx"},{abbreviations:["MnG"],card:"Meat and Greet"},{abbreviations:["Cake","\u{1F382}"],card:"Ninth Blade of the Blood Oath"},{abbreviations:["PoM"],card:"Peace of Mind"},{abbreviations:["P-Bone"],card:"Performance Bonus"},{abbreviations:["PF","\u{1F525}"],card:"Phoenix Flame"},{abbreviations:["PtW"],card:"Poison the Well"},{abbreviations:["Thanos","Infinity Gauntlet"],card:"Polarity Reversal Script"},{abbreviations:["DPot","D Pot"],card:"Potion of D\xE9j\xE0 Vu"},{abbreviations:["Ponder Run"],card:"Premeditate"},{abbreviations:["Qi Unbound"],card:"Qi Unleashed"},{abbreviations:["RitL"],card:"Red in the Ledger"},{abbreviations:["Cats","Ghost cat","Ghost cats"],card:"Restless Coalescence"},{abbreviations:["Eugene"],card:"Rhinar, Reckless Rampage",isHidden:!0},{abbreviations:["SSGB"],card:"Sandscour Greatbow"},{abbreviations:["SSP"],card:"Sand Sketched Plan"},{abbreviations:["SFaS","S4aS"],card:"Scar for a Scar"},{abbreviations:["Tyler"],card:"Scurv, Stowaway",isHidden:!0},{abbreviations:["SWOMB"],card:"Shifting Winds of the Mystic Beast"},{abbreviations:["Snaps"],card:"Snapdragon Scalers"},{abbreviations:["SWK"],card:"Spinning Wheel Kick"},{abbreviations:["SFTL"],card:"Swing Fist, Think Later"},{abbreviations:["TTT"],card:"Take the Tempo"},{abbreviations:["Ultron"],card:"Teklovossen, the Mechropotent"},{abbreviations:["ToS"],card:"Test of Strength"},{abbreviations:["TAYG"],card:"That All You Got?"},{abbreviations:["TROM"],card:"This Round's on Me"},{abbreviations:["3oak"],card:"Three of a Kind"},{abbreviations:["Pox Malone","Post Malone"],card:"Virulent Touch"},{abbreviations:["Cast Homes"],card:"Visit Goldmane Estate"},{abbreviations:["Frosty Hammer"],card:"Winter's Wail"},{abbreviations:["Wreckless Wing"],card:"War Cry of Bellona"},{abbreviations:["ZTS"],card:"Zero to Sixty"}];var x=require("@flesh-and-blood/types");var Se=(i=>(i.BannedFormats="bannedFormats",i.LegalFormats="legalFormats",i.LegalHeroes="legalHeroes",i))(Se||{}),ee=Array.from(Array(50).keys()).map(e=>`${e}`),gr=[{format:x.Format.ClassicConstructed,nicknames:["cc","classic"]},{format:x.Format.LivingLegend,nicknames:["cc ll","classic constructed ll","ll cc","ll","living legend"]},{format:x.Format.SilverAge,nicknames:["sage"]},{format:x.Format.GoldenAge,nicknames:["gage"]},{format:x.Format.UltimatePitFight,nicknames:["upf"]}],hr=Object.values(x.Format).map(e=>{let r=gr.find(({format:i})=>i===e),t=e.toLowerCase().replaceAll(u,"");return r?{...r,format:t}:{format:t}}),br=[{hero:x.Hero.DataDoll,nicknames:["data","datadoll"]},{hero:x.Hero.Dorinthea,nicknames:["dori"]},{hero:x.Hero.Genis,nicknames:["genis"]},{hero:x.Hero.GravyBones,nicknames:["gravy"]},{hero:x.Hero.Iyslander,nicknames:["islander"]}],mr=Object.values(x.Hero).map(e=>{let r=br.find(({hero:i})=>i===e),t=e.toLowerCase().replaceAll(u,"");return r?{...r,hero:t}:{hero:t}}),Q=["common","rare","super rare","majestic","legendary","fabled"],yr=(e,r,t,i)=>{let a=[];if(!r)a.push(...e);else for(let s of e)switch(r){case">=":{let o=!1;for(let n of Q)o?a.push(n):n===s&&(o=!0,a.push(n));break}case">":{let o=!1;for(let n of Q)o?a.push(n):n===s&&(o=!0);break}case"<=":{let o=!1;for(let n of Q.slice().reverse())o?a.push(n):n===s&&(o=!0,a.push(n));break}case"<":{let o=!1;for(let n of Q.slice().reverse())o?a.push(n):n===s&&(o=!0);break}default:break}return{filterToPropertyMapping:{nestedProperty:"rarity",property:"printings",isArray:!0},isExcluded:t,isOptional:i,isOr:!0,values:a}},ke=(e,r,t,i,a)=>{let s=i.map(g=>({hero:g.toLowerCase().replaceAll(u,"")})),o=[],n=[],c=[];for(let g of e){let f=hr.find(({format:C,nicknames:M})=>C===g||!!M&&M.includes(g));if(f)n.push(f.format);else{let C=mr.find(({hero:M,nicknames:A})=>M===g||!!A&&A.includes(g))||s.find(({hero:M})=>M===g);C&&c.push(C.hero)}}let b=a||"legalFormats";return n.length>0&&o.push({filterToPropertyMapping:{property:b,isArray:!0},values:n,isOr:!0,isExcluded:r,isOptional:t}),c.length>0&&o.push({filterToPropertyMapping:{property:"legalHeroes",isArray:!0},values:c,isOr:!0,isExcluded:r,isOptional:t}),o},Cr=(e,r,t,i)=>ke(e,r,t,i,"bannedFormats"),de=(e,r,t,i,a,s)=>{let o=[];return vr(t)?o.push(...ke(i,e,r,s)):Tr(t)?o.push(...Cr(i,e,r,s)):xr(t)&&o.push(yr(i,a,e,r)),o},K=[{filterToPropertyMapping:{property:"cost",isNumber:!0},isExcluded:!0,values:ee},{filterToPropertyMapping:{property:"specialCost",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token","weapon"]}],I=[{filterToPropertyMapping:{property:"defense",isNumber:!0},isExcluded:!0,values:ee},{filterToPropertyMapping:{property:"specialDefense",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["hero","placeholder","token","weapon"]}],Z=[{filterToPropertyMapping:{property:"pitch",isNumber:!0},isExcluded:!0,values:ee},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token","weapon"]},{filterToPropertyMapping:{property:"isCardBack",isBoolean:!0},isExcluded:!0,values:["true"]}],V=[{filterToPropertyMapping:{property:"power",isNumber:!0},isExcluded:!0,values:ee},{filterToPropertyMapping:{property:"specialPower",isString:!0,partialMatch:!0},isExcluded:!0,values:["*","x"]},{filterToPropertyMapping:{property:"types",isArray:!0,partialMatch:!0},isExcluded:!0,values:["equipment","hero","placeholder","token"]}],X=[{filterToPropertyMapping:{property:"talents",isArray:!0},isExcluded:!0,values:Object.values(x.Talent).map(e=>e.toLowerCase())}],Fr={"!co":K,"-co":K,"!cost":K,"-cost":K,"!color":K,"-color":K,"!b":I,"-b":I,"!block":I,"-block":I,"!d":I,"-d":I,"!def":I,"-def":I,"!defense":I,"-defense":I,"!pitch":Z,"-pitch":Z,"!p":Z,"-p":Z,"!attack":V,"-attack":V,"!power":V,"-power":V,"!pwr":V,"-pwr":V,"!pow":V,"-pow":V,"!talents":X,"-talents":X,"!tal":X,"-tal":X},ue=e=>{let r=[],t=Fr[e];return t&&r.push(...t),r},Mr=["l","legal","hero"],vr=e=>Mr.includes(e),Ar=["banned"],Tr=e=>Ar.includes(e),Pr=["r","rarity"],xr=e=>Pr.includes(e);var N=require("@flesh-and-blood/types"),fe=[{description:"Attack actions",expanded:["st:attack"],filters:{subtypes:[N.Subtype.Attack]},isCardProperty:!1,shorthands:["AA"]},{description:"Arcane barrier",expanded:['k:"arcane barrier"'],filters:{keywords:[N.Keyword.ArcaneBarrier]},isCardProperty:!1,shorthands:["AB"]},{description:"Attack reactions",expanded:['t:"attack reaction"'],filters:{types:[N.Type.AttackReaction]},isCardProperty:!1,shorthands:["AR"]},{description:"Defense reactions",expanded:['t:"defense reaction"'],filters:{types:[N.Type.DefenseReaction]},isCardProperty:!1,shorthands:["DR"]},{description:"Gain life",expanded:["gain {h}"],filters:{functionalText:"gain {h}"},isCardProperty:!1,shorthands:["Gain life","Gains life"]},{description:"Go again",expanded:['k:"go again"'],filters:{keywords:[N.Keyword.GoAgain]},isCardProperty:!1,shorthands:["GA"]},{description:"Non-attack actions",expanded:["t:action","st:non-attack"],filters:{subtypes:[N.Subtype.NonAttack],types:[N.Type.Action]},isCardProperty:!1,shorthands:["NAA"]},{description:"Plus defense",expanded:["+ {d}"],filters:{functionalText:"+ {d}"},isCardProperty:!1,shorthands:["Pump defense","Pumps defense","Buff defense","Buffs defense"]},{description:"Spellvoid",expanded:['k:"spellvoid"'],filters:{keywords:[N.Keyword.Spellvoid]},isCardProperty:!1,shorthands:["SV"]}],ge=fe.filter(({shorthands:e})=>e.some(r=>r.includes(" "))).map(e=>({...e,shorthands:e.shorthands.filter(r=>r.includes(" ")).map(r=>r.toLowerCase()).sort((r,t)=>t.length-r.length)})),he=fe.filter(({shorthands:e})=>e.some(r=>!r.includes(" "))).map(e=>({...e,shorthands:e.shorthands.filter(r=>!r.includes(" ")).map(r=>r.toLowerCase()).sort((r,t)=>t.length-r.length)}));var j=(e,r)=>{let t=r.find(i=>be(i.name)===e);return t||(t=r.find(i=>be(i.name).includes(e))),t},be=e=>z(e.toLowerCase().trim().replace(u,"")),z=e=>e.normalize("NFD").replace(/\p{Diacritic}/gu,"");var wr=(e,r)=>{let t=[];if(e)for(let i of r){let a=i.name===e.name,s=i.cardIdentifier!==e.cardIdentifier,o=i.pitch!==e.pitch;a&&s&&o&&t.push(i)}return t},re=(e,r)=>{let t=new Set(e?.referencedCards),i=[];for(let a of r)t.has(a.cardIdentifier)&&i.push(a);return i},te=e=>{let r=new Map;for(let t of e)for(let i of t.referencedCards||[]){let a=r.get(i);a?a.push(t):r.set(i,[t])}return r},Sr=(e,r)=>{let t=new Set;for(let a of e)for(let s of a.createdExtras||[])t.add(s);let i=[];for(let a of r)t.has(a.cardIdentifier)&&i.push(a);return i};var Xe=[">=",">","<=","<"],er=["!","-"],kr={property:"arcane",specialProperty:"specialArcane",isNumber:!0,partialMatch:!0},me={property:"artists",isArray:!0,partialMatch:!0},Le={property:"n/a",isMeta:!0},Re={property:"bonds",isArray:!0},Lr={property:"n/a"},Ee={property:"classes",isArray:!0,partialMatch:!0},Be={property:"cost",specialProperty:"specialCost",isNumber:!0,partialMatch:!0},$={property:"defense",specialProperty:"specialDefense",isNumber:!0},Ne={property:"flows",isArray:!0},Ie={nestedProperty:"foiling",property:"printings",isArray:!0},De={property:"fusions",isArray:!0},Oe={property:"intellect",isNumber:!0},He={property:"keywords",isArray:!0},ye={property:"n/a",isMeta:!0},Ve={property:"life",specialProperty:"specialLife",isNumber:!0},ve={property:"meta",isArray:!0},Ge={property:"name",isString:!0,partialMatch:!0},Ce={property:"pitch",isNumber:!0},We={property:"firstReleaseDate",isDate:!0},ie={property:"power",specialProperty:"specialPower",isNumber:!0},Rr={property:"setIdentifiers",isArray:!0,partialMatch:!0},Ue={property:"n/a",isMeta:!0},Er={property:"n/a"},Br={property:"n/a"},Ke={property:"sets",isArray:!0,partialMatch:!0},Fe={property:"shorthands",isArray:!0,partialMatch:!0},ae={property:"specializations",isArray:!0,partialMatch:!0},je={property:"subtypes",isArray:!0},qe={property:"types",isArray:!0},ze={property:"talents",isArray:!0},Nr={property:"functionalText",isString:!0,partialMatch:!0},Ir={property:"traits",isArray:!0,partialMatch:!0},Dr={property:"typeText",isString:!0,partialMatch:!0},se={nestedProperty:"treatments",property:"printings",isArray:!0,isNestedPropertyArray:!0},Or={property:"firstReleaseDate",isString:!0,partialMatch:!0},oe={arcane:kr,a:me,artist:me,art:me,attack:ie,b:$,block:$,banned:Le,bond:Re,bonds:Re,c:Ee,class:Ee,chain:Lr,co:Be,cost:Be,color:Ce,d:$,def:$,defense:$,flow:Ne,flows:Ne,f:De,fusion:De,foil:Ie,foiling:Ie,i:Oe,intellect:Oe,is:ve,k:He,keyword:He,l:ye,legal:ye,hero:ye,li:Ve,life:Ve,meta:ve,n:Ge,name:Ge,p:Ce,pitch:Ce,pwr:ie,pow:ie,power:ie,print:Rr,r:Ue,rarity:Ue,referencedby:Er,references:Br,rf:Le,s:Ke,set:Ke,short:Fe,shorthand:Fe,shorthands:Fe,sp:ae,spec:ae,specialization:ae,specializations:ae,st:je,subtype:je,t:qe,type:qe,tal:ze,talent:ze,text:Nr,trait:Ir,treat:se,treatment:se,var:se,variation:se,x:Dr,year:Or},Hr=[{text:l.Release.ClassicBattlesRhinarDorinthea.toLowerCase(),override:l.Release.ClassicBattlesRhinarDorinthea.toLowerCase().replaceAll(u,"")}],Vr=e=>{let r=[],t=e.replaceAll("\u201D",'"');for(let{text:a,override:s}of Hr)t.includes(a)&&(t=t.replace(a,s));if(J(t)?.card)r.push(t);else{let a=t.split(/[ ]+/),s="",o=0;for(let n of a)o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0),o<2&&n.split('"').length===2?(s+=" "+n,o++):o===0&&s===""?r.push(n):o===1&&(s+=" "+n);o===2&&(r.push(s.trim().replaceAll('"',"")),s="",o=0)}return r},Te=(e,r,t=[],i=[],a=zr())=>{let s=e.trim().toLowerCase();for(let{expanded:w,shorthands:k}of ge)for(let p of k)if(s.includes(p)){s=s.replace(p,w.join(" "));break}for(let[w,k]of Object.entries(l.setToSetIdentifierMappings))s.includes(w.toLowerCase())&&(s=s.replace(w.toLowerCase(),k[0]));let o=Vr(s),n=[];for(let w of o){let k=he.find(({shorthands:p})=>p.includes(w));k&&!k.isCardProperty?n.push(...k.expanded):n.push(w)}let c=[],b=[],g=[],f=[],C=!1,M=[],A=[],R=[],G=[];for(let w of n)if(Xr(w)){let[k,p]=w.split(":"),{modifier:D,values:d,isAnd:h,isOr:T}=Qr(p),{filterKey:y,isExcluded:E,isOptional:B,isMeta:ce}=Zr(k),q=!1;if(ce){if(["rarity","r"].includes(y)){let v=Jr(d);E||(A=[...v]),d=v.map(L=>L.toLowerCase())}["legal","l","hero"].includes(y),c.push(...de(E,B,y,d,D,t))}else{if(["chain"].includes(y)){let v=F=>F.name.toLowerCase().replaceAll(u,""),L=d.map(F=>j(F,r)).filter(F=>!!F).map(v),S=new Set(L);y="name",T=!0;let P=20,O=0,H=F=>{if(!F.types.includes(l.Type.Hero)){let W=v(F);S.add(W),L.includes(W)||L.push(W)}},U=te(r);for(let F of L){if(O>P)break;let W=j(F,r);re(W,r).forEach(H),O===0&&W&&(U.get(W.cardIdentifier)||[]).forEach(H),O++}d=Array.from(S)}else if(["referencedby","references"].includes(y)){let v=["referencedby"].includes(y),L=[...d].filter(P=>!!P);d=[],y="name",T=!0;let S=[];if(v)for(let P of L)S.push(...re(j(P,r),r));else{let P=te(r);for(let O of L){let H=j(O,r);if(H){let U=P.get(H.cardIdentifier)||[];S.push(...U)}}}d.push(...S.map(({name:P})=>P.toLowerCase().replaceAll(u,"")))}else if(["art","artist"].includes(y))b=d;else if(["print","prints","printing","printings"].includes(y))M=d;else if(["is","meta"].includes(y)){let v=[],L=[],S=[],P=[];for(let F of d)Kr.includes(F)?v.push(F):jr.includes(F)?L.push(F):qr.includes(F)?S.push(F):P.push(F);v.length>0&&(c.push({filterToPropertyMapping:ve,values:[l.Meta.Reprint.toLowerCase().replaceAll(u,"")],isAnd:h,isOr:T,isExcluded:!E,isOptional:B}),q=P.length===0);let O=L.length>0;O&&c.push({filterToPropertyMapping:We,values:[a],isAnd:h,isOr:T,isExcluded:E,isOptional:B});let H=S.length>0;H&&c.push({filterToPropertyMapping:We,values:[a],isAnd:h,isOr:T,isExcluded:!E,isOptional:B}),(O||H)&&(q=P.length===0);let U=$r(P);d=U.map(F=>F.toLowerCase().replaceAll(u,"")),U.includes(l.Meta.Expansion)&&!E&&(C=!0)}else["foiling","foil"].includes(y)?(f=_r(d),d=f.map(v=>v.toLowerCase())):["treat","treatment","var","variation"].includes(y)?(G=Yr(d),d=G.map(v=>v.toLowerCase())):["set","s"].includes(y)?(R=Gr(d,i),d=R.map(v=>v.toLowerCase().replaceAll(u,""))):["pitch","p","color"].includes(y)&&(d=Ur(d));oe[y]&&!q&&c.push({filterToPropertyMapping:oe[y],values:d,isAnd:h,isOr:T,modifier:D,isExcluded:E,isOptional:B})}}else if(w){let k=J(w)?.card,p=ue(w);k?g.push(`"${k.toLowerCase().replace(u,"")}"`):p&&p.length>0?c.push(...p):g.push(w.replace(u,""))}return{appliedFilters:c,attributes:{artists:b,foilings:f,isExpansionSlot:C,prints:M,rarities:A,releases:R,treatments:G},keywords:g}},Gr=(e,r=[])=>{let t=[];for(let i of e)t.push(...Wr(i,r));return t},Wr=(e,r=[])=>{let t=[],i=Object.values(l.Release).find(a=>a.toLowerCase().replaceAll(u,"")===e);if(i&&t.push(i),t.length===0){let a=l.setIdentifierToSetMappings[e];a&&t.push(a)}if(t.length===0){let a=Object.values(l.Release).filter(s=>s.toLowerCase().includes(e));a.length>0&&t.push(...a)}if(t.length===0){let a=r.find(s=>s.toLowerCase().replaceAll(u,"")===e);a&&t.push(a)}return t},Me={purple:4,blue:3,yellow:2,red:1,white:0},Ur=e=>{let r=[];for(let t of e)Me[t]||Me[t]===0?r.push(Me[t].toString()):r.push(t);return r},Kr=["unique"],jr=["preview","spoiler","unreleased"],qr=["released"],zr=()=>{let e=new Date,r=`${e.getMonth()+1}`.padStart(2,"0"),t=`${e.getDate()}`.padStart(2,"0");return`${e.getFullYear()}-${r}-${t}`},$e={dual:l.Meta.DualClass,exp:l.Meta.Expansion,expansion:l.Meta.Expansion,expansionSlot:l.Meta.Expansion,rainbow:l.Meta.Rainbow,reprint:l.Meta.Reprint,reprints:l.Meta.Reprint},$r=e=>{let r=[];for(let t of e)$e[t]?r.push($e[t]):l.Meta[t]&&r.push(l.Meta[t]);if(e.length>0&&r.length===0){for(let t of Object.values(l.Meta))for(let i of e)if(t.toLowerCase().includes(i)){r.push(t);break}}return r},_e={r:l.Foiling.Rainbow,rf:l.Foiling.Rainbow,rainbow:l.Foiling.Rainbow,c:l.Foiling.Cold,cf:l.Foiling.Cold,cold:l.Foiling.Cold,g:l.Foiling.Gold,gf:l.Foiling.Gold,gold:l.Foiling.Gold},_r=e=>{let r=[];for(let t of e)_e[t]&&r.push(_e[t]);return r},Ye={...Object.values(l.Treatment).reduce((e,r)=>(e[r.toLowerCase()]=r,e),{}),aa:l.Treatment.AA,alt:l.Treatment.AA,"alt art":l.Treatment.AA,ab:l.Treatment.AB,"alt border":l.Treatment.AB,at:l.Treatment.AT,"alt text":l.Treatment.AT,ea:l.Treatment.EA,extended:l.Treatment.EA,"extended art":l.Treatment.EA,fa:l.Treatment.FA,full:l.Treatment.FA,"full art":l.Treatment.FA},Yr=e=>{let r=[];for(let t of e)Ye[t]?r.push(Ye[t]):l.Treatment[t.toUpperCase()]&&r.push(l.Treatment[t.toUpperCase()]);return r},Ae={b:l.Rarity.Basic,c:l.Rarity.Common,f:l.Rarity.Fabled,l:l.Rarity.Legendary,m:l.Rarity.Majestic,p:l.Rarity.Promo,r:l.Rarity.Rare,s:l.Rarity.SuperRare,t:l.Rarity.Token,v:l.Rarity.Marvel},Jr=e=>{let r=[];for(let t of e)Ae[t]?r.push(Ae[t]):r.push(t);return r},Qr=e=>{let r=[],t,i,a=Xe.find(s=>e.includes(s));if(a){let[,s]=e.split(a);Je(s)?(t=!0,r.push(...s.trim().split("+").map(o=>o.replace(u,"")))):Qe(s)?(i=!0,r.push(...s.trim().split(",").map(o=>o.replace(u,"")))):r.push(s.trim().replace(u,""))}else Je(e)?(t=!0,r.push(...e.trim().split("+").map(s=>s.replace(u,"")))):Qe(e)?(i=!0,r.push(...e.trim().split(",").map(s=>s.replace(u,"")))):e.startsWith('"')&&e.endsWith('"')?r.push(e.trim().replaceAll('"',"").replace(u,"")):r.push(e.trim().replace(u,""));return{modifier:a,values:r,isAnd:t,isOr:i}},Zr=e=>{let r=et(e);if(r){let[,t]=e.split(r);return{filterKey:t,isExcluded:!0,isOptional:!1,isMeta:Ze(t)}}else return{filterKey:e,isExcluded:!1,isOptional:!1,isMeta:Ze(e)}},Xr=e=>e.indexOf(":")>=0,Je=e=>e.indexOf("+")>=0,Qe=e=>e.indexOf(",")>=0,Ze=e=>!!oe[e]?.isMeta,et=e=>er.find(r=>e.includes(r))?.slice(0,1);var m=require("@flesh-and-blood/types"),rr={artists:["Hoodwill"],cardIdentifier:"fangs-a-lot-blue",classes:[m.Class.Generic],defaultImage:"FNG000",firstReleaseDate:"2022-06-02",functionalText:"If Fangs A Lot is put into your banished zone from your graveyard, instead put it into your hand.",legalFormats:[],legalHeroes:[m.Hero.Kayo,m.Hero.Levia,m.Hero.Rhinar],printings:[{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000",print:"FNG000",rarity:m.Rarity.Rare,set:m.Release.Promos},{artists:["Hoodwill"],identifier:"FNG000",image:"FNG000_Marvel",print:`FNG000-${m.Treatment.FA}`,rarity:m.Rarity.Marvel,set:m.Release.Promos,treatment:m.Treatment.FA}],name:"Fangs A Lot",rarities:[m.Rarity.Rare,m.Rarity.Marvel],rarity:m.Rarity.Rare,sets:[m.Release.Promos],setIdentifiers:["FNG000"],specialImage:"FNG000_Marvel",subtypes:[m.Subtype.Attack],types:[m.Type.Action],typeText:"Generic Action - Attack"},tr=[{keyword:rr.name.toLowerCase(),card:rr}];var xe=class{constructor(r,t=[],i=[],a=!1){this.log=(r,...t)=>{this.debug&&console.log(r,...t)};this.search=(r,t)=>{let i,{appliedFilters:a,attributes:s,keywords:o}=Te(r,this.cards,this.additionalHeroes,this.additionalSets),n=o.join(" "),c=t?tr.filter(p=>p.keyword===n):[];if(c.length>0?i=c.map(({card:p})=>p):o.length?i=this.fuse.search(n).map(p=>p.item):i=[...this.cards],a.length&&(i=i.filter(p=>p&&ar(p,a))),o.length===0){let p="";if(s.releases.length===1)try{let h=s.releases[0];p=ne.setToSetIdentifierMappings[h][0].toUpperCase()}catch(h){console.error("Error getting set identifier from search",h)}if(!p&&s.prints.length===1)try{let h=s.prints[0];ne.setIdentifierToSetMappings[h]&&(p=h.toUpperCase())}catch(h){console.error("Error getting set identifier from search",h)}p?i.sort((h,T)=>{let y=h.setIdentifiers.find(B=>B.includes(p))?.replace(p,""),E=T.setIdentifiers.find(B=>B.includes(p))?.replace(p,"");return y&&E?y.localeCompare(E):-1}):i.sort((h,T)=>h.name===T.name?`${h.pitch}`.localeCompare(`${T.pitch}`):h.name.localeCompare(T.name))}else{let p=[],D=[],d=o.map(h=>h.toLowerCase().replace(u,"")).join(" ");for(let h of i)h.name.toLowerCase().replace(u,"")===d?p.push(h):D.push(h);i=[...p,...D]}let b,{artists:g,isExpansionSlot:f,foilings:C,prints:M,rarities:A,releases:R,treatments:G}=s;(g.length>0||f||C.length>0||M.length>0||A.length>0||R.length>0||G.length>0)&&(b=i.map(p=>{let D=p.printings.filter(d=>{let h=!!d.image,T=g.length===0||g.some(S=>d.artists.find(P=>P.replace(u,"").toLowerCase().includes(S))),y=!f||f===d.isExpansionSlot,E=C.length===0||C.includes(d.foiling),B=M.length===0||M.some(S=>d.identifier.includes(S.toUpperCase())),ce=A.length===0||A.includes(d.rarity),q=R.length===0||R.includes(d.set),v=G.length===0||d.treatments?.some(S=>G.includes(S));return h&&T&&y&&E&&B&&ce&&q&&v});return{...p,matchingPrintings:D}}));let k=b?.length>0?b:i;return{appliedFilters:a,attributes:s,keywords:o,searchResults:k}};let s={getFn:(o,n)=>{let c=Pe.default.config.getFn(o,n);return c&&(Array.isArray(c)?c.map(b=>z(b.replace(u,""))):z(c).replace(u,""))},ignoreLocation:!0,includeScore:!0,keys:[{name:"name",weight:10},{name:"functionalText",weight:6},{name:"shorthands",weight:4},{name:"setIdentifiers",weight:2},{name:"traits",weight:4},{name:"typeText",weight:6}],threshold:.15,useExtendedSearch:!0};this.additionalHeroes=t,this.additionalSets=i,this.cards=[...r],this.debug=a,this.fuse=new Pe.default([...r],s)}},ir=xe,ar=(e,r)=>{let t=!0,i=!1;for(let a of r){let s=a.isOptional,{isNumber:o,isString:n,isArray:c,isBoolean:b,isDate:g}=a.filterToPropertyMapping;if(o){let f=rt(e,a);s?f&&(i=!0):t=t&&f}else if(n){let f=tt(e,a);s?f&&(i=!0):t=t&&f}else if(c){let f=it(e,a,r);s?f&&(i=!0):t=t&&f}else if(b){let f=at(e,a);s?f&&(i=!0):t=t&&f}else if(g){let f=st(e,a);s?f&&(i=!0):t=t&&f}}return t},rt=(e,r)=>{if(_(r,e)){let{values:t,modifier:i,isExcluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=le(e,r);if(o!=null&&!isNaN(o))if(o=parseInt(o),i)switch(i){case">=":{let n=t?.some(c=>o>=parseInt(c));return a?!n:n}case">":{let n=t?.some(c=>o>parseInt(c));return a?!n:n}case"<=":{let n=t?.some(c=>o<=parseInt(c));return a?!n:n}case"<":{let n=t?.some(c=>o<parseInt(c));return a?!n:n}default:return!1}else{let n=t?.some(c=>o===parseInt(c));return a?!n:n}else{let n=nt(e,r)?.toLowerCase(),c=s?t?.some(b=>n?.includes(b)):t?.some(b=>n===b);return a?!c:c}}else return!0},tt=(e,r)=>{if(_(r,e)){let{values:t,isAnd:i,isExcluded:a,filterToPropertyMapping:{partialMatch:s}}=r,o=le(e,r)?.replaceAll(u,"");if(s){let n=i?t?.every(c=>o?.toLowerCase().includes(c)):t?.some(c=>o?.toLowerCase().includes(c));return a?!n:n}else{let n=i?t?.every(c=>o?.toLowerCase()===c):t?.some(c=>o?.toLowerCase()===c);return a?!n:n}}else return!0},it=(e,r,t)=>{if(_(r,e)){let{values:i,isAnd:a,isExcluded:s,filterToPropertyMapping:{partialMatch:o}}=r,n=ot(e,r,t).map(c=>c?.replaceAll(u,""));if(o){let c=a?i.every(g=>n?.some(f=>f?.toLowerCase().includes(g))):i.some(g=>n?.some(f=>f?.toLowerCase().includes(g))),b=n.length===0;return s?!c||b:c}else{let c=a?i.every(b=>n?.some(g=>g?.toLowerCase()===b)):i.some(b=>n?.some(g=>g?.toLowerCase()===b));return s?!c:c}}else return!0},at=(e,r)=>{if(_(r,e)){let{isExcluded:t}=r,i=le(e,r);return t?!i:i}else return!0},st=(e,r)=>{if(_(r,e)){let{values:t,isExcluded:i}=r,a=le(e,r),s=t?.some(o=>a>o);return i?!s:s}else return!0},le=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.property]},ot=(e,r,t)=>{let{filterToPropertyMapping:{isNestedPropertyArray:i,nestedProperty:a,property:s}}=r,o=e[s]||[],n=[],c=Object.keys(e.legalOverrides||{}).length>0,b=r.filterToPropertyMapping.property==="legalHeroes",g=t.find(({filterToPropertyMapping:C})=>C.property==="legalFormats");if(c&&b&&!!g){let C=new Set;for(let{format:M,heroes:A}of e.legalOverrides||[])if(g.values.includes(M.toLowerCase()))for(let R of A)C.add(R);n=Array.from(C)}if(n.length===0)if(a){let C=new Set;for(let M of o)if(i){let A=M[a]||[];for(let R of A)C.add(R)}else{let A=M[a];A&&C.add(A)}n=Array.from(C)}else n=o;return n},nt=(e,r)=>{let{filterToPropertyMapping:t}=r;return e[t.specialProperty]},_=({cardTypes:e},{types:r,subtypes:t})=>!e||e?.some(i=>r.map(a=>a.toLowerCase()).includes(i.toLowerCase())||t.map(a=>a.toLowerCase()).includes(i.toLowerCase()));0&&(module.exports={FilterProperty,PUNCTUATION,RARITY_VALUES_MAPPING,abbreviations,availableExclusions,availableModifiers,filterCard,filtersToCardPropertyMappings,getAbbreviation,getAbbreviationByCard,getCardByName,getCardsByReferencedCardIdentifier,getCleanText,getExcludedMetaFilters,getKeywordsAndAppliedFiltersFromText,getMetaFilters,getNormalizedText,getOtherPitches,getReferencedCards,getTokensReferencedByCards,multiWordShorthands,shorthands,singleWordShorthands});
|
package/dist/related.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { Card
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { Card } from "@flesh-and-blood/types";
|
|
2
|
+
/** The same card printed at another pitch value. */
|
|
3
|
+
export declare const getOtherPitches: (card: Card | undefined, cards: Card[]) => Card[];
|
|
4
|
+
/** The cards a card names, in the order the corpus holds them. */
|
|
5
|
+
export declare const getReferencedCards: (card: Card | undefined, cards: Card[]) => Card[];
|
|
6
|
+
/**
|
|
7
|
+
* The cards naming each card, keyed by the named card's identifier. One pass
|
|
8
|
+
* answers the reverse relation for every card in the corpus, so a page or a
|
|
9
|
+
* filter asking about several of them builds this once.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getCardsByReferencedCardIdentifier: (cards: Card[]) => Map<string, Card[]>;
|
|
12
|
+
/**
|
|
13
|
+
* The extras a set of cards brings, out of the ones available to them. A card
|
|
14
|
+
* carries what it creates, so the hero's own card has to be among the cards for
|
|
15
|
+
* what the hero creates to count.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getTokensReferencedByCards: (cards: Card[], availableTokens: Card[]) => Card[];
|
package/dist/related.js
CHANGED
|
@@ -1,135 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Keyword } from "@flesh-and-blood/types";
|
|
4
|
-
const nameOverrides = {
|
|
5
|
-
"Dawnblade, Resplendent": "Dawnblade"
|
|
6
|
-
};
|
|
7
|
-
const getOverrideOrName = (card) => nameOverrides[card.name] || card.name;
|
|
8
|
-
const getFunctionalTextWithoutSelfReferences = (card) => card.functionalText?.replaceAll(card.name, "");
|
|
9
|
-
const getRelatedCardsByName = (name, cards) => {
|
|
10
|
-
let card = cards.find(
|
|
11
|
-
(card2) => card2.name.toLowerCase().replace(PUNCTUATION, "") === name
|
|
12
|
-
);
|
|
13
|
-
if (!card) {
|
|
14
|
-
card = cards.find(
|
|
15
|
-
(card2) => card2.name.toLowerCase().replace(PUNCTUATION, "").includes(name)
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
return getRelatedCards(card, cards);
|
|
19
|
-
};
|
|
20
|
-
const getRelatedCards = (card, availableCards, options) => {
|
|
21
|
-
const otherPitchMapping = {};
|
|
22
|
-
const referencedByMapping = {};
|
|
23
|
-
const referencesMapping = {};
|
|
1
|
+
const getOtherPitches = (card, cards) => {
|
|
2
|
+
const otherPitches = [];
|
|
24
3
|
if (card) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const differentCard = card.cardIdentifier !== other.cardIdentifier;
|
|
32
|
-
const differentPitch = card.pitch !== other.pitch;
|
|
33
|
-
if (sameName && differentCard && differentPitch) {
|
|
34
|
-
otherPitchMapping[other.cardIdentifier] = other;
|
|
35
|
-
} else if (!sameName && !options?.shouldSkipReferences) {
|
|
36
|
-
const isCardSeismicSurge = card.name === "Seismic Surge";
|
|
37
|
-
const isOtherCardHeaved = other.keywords?.includes(Keyword.Heave);
|
|
38
|
-
const isOtherCardHeaveOverride = isCardSeismicSurge && isOtherCardHeaved;
|
|
39
|
-
const isCardMarked = card.name === "Marked";
|
|
40
|
-
const isOtherCardMarking = other.keywords?.includes(Keyword.Mark);
|
|
41
|
-
const isOtherCardMarkOverride = isCardMarked && isOtherCardMarking;
|
|
42
|
-
const otherFunctionalText = getFunctionalTextWithoutSelfReferences(other);
|
|
43
|
-
const cardIsInOtherFunctionalTextOrTraits = otherFunctionalText?.includes(cardName) || card.traits?.some((trait) => otherFunctionalText?.includes(trait));
|
|
44
|
-
const functionalText = getFunctionalTextWithoutSelfReferences(card);
|
|
45
|
-
if (cardIsInOtherFunctionalTextOrTraits || isOtherCardHeaveOverride || isOtherCardMarkOverride) {
|
|
46
|
-
initialReferencedBy.push(other);
|
|
47
|
-
}
|
|
48
|
-
const functionalTextRegex = new RegExp(otherName, "g");
|
|
49
|
-
const functionalTextKeywordRegex = new RegExp(
|
|
50
|
-
`\\*\\*${otherName}\\*\\*`,
|
|
51
|
-
"g"
|
|
52
|
-
);
|
|
53
|
-
const functionalTextReferences = functionalText?.match(functionalTextRegex) || [];
|
|
54
|
-
const functionalTextKeywordReferences = functionalText?.match(functionalTextKeywordRegex) || [];
|
|
55
|
-
const referenceIsKeywordOrFlow = functionalTextReferences.length === functionalTextKeywordReferences.length;
|
|
56
|
-
const otherCardIsInFunctionalText = functionalText?.includes(otherName) && !referenceIsKeywordOrFlow;
|
|
57
|
-
const otherCardTraits = other.traits || [];
|
|
58
|
-
const otherCardIsInTraits = otherCardTraits.some(
|
|
59
|
-
(otherCardTrait) => functionalText?.includes(otherCardTrait)
|
|
60
|
-
);
|
|
61
|
-
const otherCardIsInFunctionalTextOrTraits = otherCardIsInFunctionalText || otherCardIsInTraits;
|
|
62
|
-
const isOtherCardSeismicSurge = other.name === "Seismic Surge";
|
|
63
|
-
const isCardHeaved = card.keywords?.includes(Keyword.Heave);
|
|
64
|
-
const isCardHeaveOverride = isOtherCardSeismicSurge && isCardHeaved;
|
|
65
|
-
const isOtherCardMarked = other.name === "Marked";
|
|
66
|
-
const isCardMarking = card.keywords?.includes(Keyword.Mark);
|
|
67
|
-
const isCardMarkOverride = isOtherCardMarked && isCardMarking;
|
|
68
|
-
if (otherCardIsInFunctionalTextOrTraits || isCardHeaveOverride || isCardMarkOverride) {
|
|
69
|
-
initialReferences.push(other);
|
|
70
|
-
}
|
|
4
|
+
for (const other of cards) {
|
|
5
|
+
const isSameName = other.name === card.name;
|
|
6
|
+
const isAnotherCard = other.cardIdentifier !== card.cardIdentifier;
|
|
7
|
+
const isAnotherPitch = other.pitch !== card.pitch;
|
|
8
|
+
if (isSameName && isAnotherCard && isAnotherPitch) {
|
|
9
|
+
otherPitches.push(other);
|
|
71
10
|
}
|
|
72
11
|
}
|
|
73
|
-
|
|
74
|
-
|
|
12
|
+
}
|
|
13
|
+
return otherPitches;
|
|
14
|
+
};
|
|
15
|
+
const getReferencedCards = (card, cards) => {
|
|
16
|
+
const referencedCardIdentifiers = new Set(card?.referencedCards);
|
|
17
|
+
const referencedCards = [];
|
|
18
|
+
for (const other of cards) {
|
|
19
|
+
if (referencedCardIdentifiers.has(other.cardIdentifier)) {
|
|
20
|
+
referencedCards.push(other);
|
|
75
21
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
22
|
+
}
|
|
23
|
+
return referencedCards;
|
|
24
|
+
};
|
|
25
|
+
const getCardsByReferencedCardIdentifier = (cards) => {
|
|
26
|
+
const cardsByReferencedCardIdentifier = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const card of cards) {
|
|
28
|
+
for (const referencedCardIdentifier of card.referencedCards || []) {
|
|
29
|
+
const referencingCards = cardsByReferencedCardIdentifier.get(
|
|
30
|
+
referencedCardIdentifier
|
|
31
|
+
);
|
|
32
|
+
if (referencingCards) {
|
|
33
|
+
referencingCards.push(card);
|
|
34
|
+
} else {
|
|
35
|
+
cardsByReferencedCardIdentifier.set(referencedCardIdentifier, [card]);
|
|
83
36
|
}
|
|
84
37
|
}
|
|
85
38
|
}
|
|
86
|
-
|
|
87
|
-
const referencedBy = Object.values(referencedByMapping);
|
|
88
|
-
const references = Object.values(referencesMapping);
|
|
89
|
-
return { otherPitches, referencedBy, references };
|
|
90
|
-
};
|
|
91
|
-
const CARD_IDENTIFIERS_TO_SKIP = ["cash-in-yellow"];
|
|
92
|
-
const heroReferences = {
|
|
93
|
-
[Hero.Crackni]: { traits: [Trait.AgentOfChaos] },
|
|
94
|
-
[Hero.Maxx]: { tokens: ["hyper-driver"] }
|
|
39
|
+
return cardsByReferencedCardIdentifier;
|
|
95
40
|
};
|
|
96
|
-
const getTokensReferencedByCards = (cards, availableTokens
|
|
97
|
-
const
|
|
98
|
-
for (const card of cards
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
const { references } = getRelatedCards(card, availableTokens);
|
|
102
|
-
for (const token of references.filter((token2) => {
|
|
103
|
-
const isHyperDriver = token2.name === "Hyper Driver";
|
|
104
|
-
const isMaxx = hero === Hero.Maxx;
|
|
105
|
-
return !isHyperDriver || isMaxx;
|
|
106
|
-
})) {
|
|
107
|
-
referencedTokens.add(token);
|
|
41
|
+
const getTokensReferencedByCards = (cards, availableTokens) => {
|
|
42
|
+
const createdExtraIdentifiers = /* @__PURE__ */ new Set();
|
|
43
|
+
for (const card of cards) {
|
|
44
|
+
for (const createdExtraIdentifier of card.createdExtras || []) {
|
|
45
|
+
createdExtraIdentifiers.add(createdExtraIdentifier);
|
|
108
46
|
}
|
|
109
47
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
for (const card of cards) {
|
|
115
|
-
if (heroCards.cards?.includes(card.cardIdentifier)) {
|
|
116
|
-
referencedTokens.add(card);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
if (heroCards.tokens) {
|
|
121
|
-
for (const token of availableTokens) {
|
|
122
|
-
if (heroCards.tokens?.includes(token.cardIdentifier)) {
|
|
123
|
-
referencedTokens.add(token);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
48
|
+
const referencedTokens = [];
|
|
49
|
+
for (const token of availableTokens) {
|
|
50
|
+
if (createdExtraIdentifiers.has(token.cardIdentifier)) {
|
|
51
|
+
referencedTokens.push(token);
|
|
127
52
|
}
|
|
128
53
|
}
|
|
129
|
-
return
|
|
54
|
+
return referencedTokens;
|
|
130
55
|
};
|
|
131
56
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
57
|
+
getCardsByReferencedCardIdentifier,
|
|
58
|
+
getOtherPitches,
|
|
59
|
+
getReferencedCards,
|
|
134
60
|
getTokensReferencedByCards
|
|
135
61
|
};
|
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": "4.0
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "dist/index.cjs",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@flesh-and-blood/types": "^4.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@flesh-and-blood/cards": "^4.0
|
|
50
|
-
"@flesh-and-blood/types": "^4.0
|
|
49
|
+
"@flesh-and-blood/cards": "^4.1.0",
|
|
50
|
+
"@flesh-and-blood/types": "^4.1.0",
|
|
51
51
|
"@types/jest": "^29.5.11",
|
|
52
52
|
"@types/node": "^20.10.5",
|
|
53
53
|
"esbuild": "^0.19.10",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"FAB",
|
|
78
78
|
"FABTCG"
|
|
79
79
|
],
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "bb392bb60feaad216eb7bfd340e2de705b989e9e"
|
|
81
81
|
}
|