@malib/gear 0.10.1 → 0.11.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/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class I{constructor(){this.base=0,this.bonus=0,this.upgrade=0,this.enchant=0}get empty(){return this.base===0&&this.bonus===0&&this.upgrade===0&&this.enchant===0}get sum(){return Math.max(0,this.base+this.bonus+this.upgrade+this.enchant)}get diff(){return this.bonus+this.upgrade+this.enchant}}var i=(t=>(t[t.incSTR=1]="incSTR",t[t.incSTRr=2]="incSTRr",t[t.incDEX=3]="incDEX",t[t.incDEXr=4]="incDEXr",t[t.incINT=5]="incINT",t[t.incINTr=6]="incINTr",t[t.incLUK=7]="incLUK",t[t.incLUKr=8]="incLUKr",t[t.incAllStat=9]="incAllStat",t[t.incMHP=10]="incMHP",t[t.incMMP=11]="incMMP",t[t.incMHPr=12]="incMHPr",t[t.incMMPr=13]="incMMPr",t[t.incMDF=14]="incMDF",t[t.incARC=15]="incARC",t[t.incAUT=16]="incAUT",t[t.incPAD=17]="incPAD",t[t.incMAD=18]="incMAD",t[t.incAD=19]="incAD",t[t.incPDD=20]="incPDD",t[t.incSpeed=21]="incSpeed",t[t.incJump=22]="incJump",t[t.knockback=23]="knockback",t[t.bdR=24]="bdR",t[t.incBDR=25]="incBDR",t[t.imdR=26]="imdR",t[t.incIMDR=27]="incIMDR",t[t.damR=28]="damR",t[t.nbdR=29]="nbdR",t[t.statR=30]="statR",t[t.incCHUC=31]="incCHUC",t[t.incPADr=100]="incPADr",t[t.incMADr=101]="incMADr",t[t.incPDDr=102]="incPDDr",t[t.incCr=103]="incCr",t[t.incDAMr=104]="incDAMr",t[t.RecoveryHP=105]="RecoveryHP",t[t.RecoveryMP=106]="RecoveryMP",t[t.face=107]="face",t[t.prop=108]="prop",t[t.time=109]="time",t[t.HP=110]="HP",t[t.MP=111]="MP",t[t.attackType=112]="attackType",t[t.ignoreTargetDEF=113]="ignoreTargetDEF",t[t.ignoreDAM=114]="ignoreDAM",t[t.ignoreDAMr=115]="ignoreDAMr",t[t.DAMreflect=116]="DAMreflect",t[t.mpconReduce=117]="mpconReduce",t[t.incMesoProp=118]="incMesoProp",t[t.incRewardProp=119]="incRewardProp",t[t.incAllskill=120]="incAllskill",t[t.RecoveryUP=121]="RecoveryUP",t[t.boss=122]="boss",t[t.level=123]="level",t[t.incTerR=124]="incTerR",t[t.incAsrR=125]="incAsrR",t[t.incEXPr=126]="incEXPr",t[t.reduceCooltime=127]="reduceCooltime",t[t.incSTRlv=128]="incSTRlv",t[t.incDEXlv=129]="incDEXlv",t[t.incINTlv=130]="incINTlv",t[t.incLUKlv=131]="incLUKlv",t[t.incMHPlv=132]="incMHPlv",t[t.incPADlv=133]="incPADlv",t[t.incMADlv=134]="incMADlv",t[t.incCriticaldamage=135]="incCriticaldamage",t[t.attackSpeed=200]="attackSpeed",t[t.setItemID=201]="setItemID",t[t.durability=202]="durability",t[t.reduceReq=203]="reduceReq",t[t.only=1100]="only",t[t.tradeBlock=1101]="tradeBlock",t[t.accountSharable=1102]="accountSharable",t[t.onlyEquip=1103]="onlyEquip",t[t.tradeAvailable=1104]="tradeAvailable",t[t.equipTradeBlock=1105]="equipTradeBlock",t[t.sharableOnce=1106]="sharableOnce",t[t.charismaEXP=1107]="charismaEXP",t[t.senseEXP=1108]="senseEXP",t[t.insightEXP=1109]="insightEXP",t[t.willEXP=1110]="willEXP",t[t.craftEXP=1111]="craftEXP",t[t.charmEXP=1112]="charmEXP",t[t.accountShareTag=1113]="accountShareTag",t[t.bossReward=1114]="bossReward",t[t.noPotential=1115]="noPotential",t[t.fixedPotential=1116]="fixedPotential",t[t.specialGrade=1117]="specialGrade",t[t.fixedGrade=1118]="fixedGrade",t[t.superiorEqp=1119]="superiorEqp",t[t.incPQEXPr=1120]="incPQEXPr",t[t.jokerToSetItem=1121]="jokerToSetItem",t[t.blockGoldHammer=1122]="blockGoldHammer",t[t.exceptUpgrade=1123]="exceptUpgrade",t[t.onlyUpgrade=1124]="onlyUpgrade",t[t.noLookChange=1125]="noLookChange",t[t.tucIgnoreForPotential=1126]="tucIgnoreForPotential",t))(i||{}),f=(t=>(t[t.cap=100]="cap",t[t.faceAccessory=101]="faceAccessory",t[t.eyeAccessory=102]="eyeAccessory",t[t.earrings=103]="earrings",t[t.coat=104]="coat",t[t.longcoat=105]="longcoat",t[t.pants=106]="pants",t[t.shoes=107]="shoes",t[t.glove=108]="glove",t[t.cape=110]="cape",t[t.ring=111]="ring",t[t.pendant=112]="pendant",t[t.belt=113]="belt",t[t.medal=114]="medal",t[t.shoulder=115]="shoulder",t[t.pocket=116]="pocket",t[t.badge=118]="badge",t[t.android=166]="android",t[t.machineHeart=167]="machineHeart",t[t.shield=109]="shield",t[t.emblem=119]="emblem",t[t.powerSource=119020]="powerSource",t[t.shiningRod=1212]="shiningRod",t[t.tuner=1213]="tuner",t[t.breathShooter=1214]="breathShooter",t[t.soulShooter=122]="soulShooter",t[t.desperado=123]="desperado",t[t.energySword=124]="energySword",t[t.espLimiter=126]="espLimiter",t[t.chain=127]="chain",t[t.magicGauntlet=128]="magicGauntlet",t[t.ritualFan=129]="ritualFan",t[t.ohSword=130]="ohSword",t[t.ohAxe=131]="ohAxe",t[t.ohBlunt=132]="ohBlunt",t[t.dagger=133]="dagger",t[t.katara=134]="katara",t[t.cane=136]="cane",t[t.wand=137]="wand",t[t.staff=138]="staff",t[t.thSword=140]="thSword",t[t.chakram=1404]="chakram",t[t.thAxe=141]="thAxe",t[t.thBlunt=142]="thBlunt",t[t.spear=143]="spear",t[t.polearm=144]="polearm",t[t.bow=145]="bow",t[t.crossbow=146]="crossbow",t[t.claw=147]="claw",t[t.knuckle=148]="knuckle",t[t.gun=149]="gun",t[t.shovel=150]="shovel",t[t.pickaxe=151]="pickaxe",t[t.dualBowguns=152]="dualBowguns",t[t.handCannon=153]="handCannon",t[t.heavySword=156]="heavySword",t[t.longSword=157]="longSword",t[t.gauntletRevolver=158]="gauntletRevolver",t[t.ancientBow=159]="ancientBow",t[t.soulShield=1098]="soulShield",t[t.demonShield=1099]="demonShield",t[t.magicArrow=135200]="magicArrow",t[t.card=135210]="card",t[t.medallion=135220]="medallion",t[t.rosary=135221]="rosary",t[t.ironChain=135222]="ironChain",t[t.magicBook1=135223]="magicBook1",t[t.magicBook2=135224]="magicBook2",t[t.magicBook3=135225]="magicBook3",t[t.arrowFletching=135226]="arrowFletching",t[t.bowThimble=135227]="bowThimble",t[t.daggerScabbard=135228]="daggerScabbard",t[t.charm=135229]="charm",t[t.orb=135240]="orb",t[t.dragonEssence=135250]="dragonEssence",t[t.soulRing=135260]="soulRing",t[t.magnum=135270]="magnum",t[t.wristBand=135290]="wristBand",t[t.farSight=135291]="farSight",t[t.powderKeg=135292]="powderKeg",t[t.mass=135293]="mass",t[t.document=135294]="document",t[t.magicMarble=135295]="magicMarble",t[t.arrowhead=135296]="arrowhead",t[t.jewel=135297]="jewel",t[t.powderKeg2=135298]="powderKeg2",t[t.controller=135300]="controller",t[t.foxMarble=135310]="foxMarble",t[t.chessPiece=135320]="chessPiece",t[t.transmitter=135330]="transmitter",t[t.charge=135340]="charge",t[t.magicWing=135350]="magicWing",t[t.pathOfAbyss=135360]="pathOfAbyss",t[t.relic=135370]="relic",t[t.fanTassel=135380]="fanTassel",t[t.bracelet=135400]="bracelet",t[t.weaponBelt=135401]="weaponBelt",t[t.ornament=135402]="ornament",t[t.hexSeeker=135403]="hexSeeker",t[t.petEquip=180]="petEquip",t[t.machineEngine=161]="machineEngine",t[t.machineArms=162]="machineArms",t[t.machineLegs=163]="machineLegs",t[t.machineBody=164]="machineBody",t[t.machineTransistors=165]="machineTransistors",t[t.dragonMask=194]="dragonMask",t[t.dragonPendant=195]="dragonPendant",t[t.dragonWings=196]="dragonWings",t[t.dragonTail=197]="dragonTail",t))(f||{}),U=(t=>(t[t.normal=0]="normal",t[t.rare=1]="rare",t[t.epic=2]="epic",t[t.unique=3]="unique",t[t.legendary=4]="legendary",t[t.special=5]="special",t))(U||{});class j{constructor(s){this.enchanted=!1,this.charge=0,this.chargeOption=new Map,this.gear=s}enchant(){return this.enchanted||!A.isWeapon(this.gear.type)?!1:(this.enchanted=!0,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0)}disenchant(){return this.enchanted?(this.enchanted=!1,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0):!1}setSoul(s){return this.enchanted?(this.soul=s,this.setCharge(this.charge),!0):!1}removeSoul(){return!this.enchanted||!this.soul?!1:(this.soul=void 0,this.setCharge(this.charge),!0)}setCharge(s){if(!this.enchanted||s<0||s>1e3)return!1;this.charge=s;const a=this.gear.option(i.incPAD).base<this.gear.option(i.incMAD).base?i.incMAD:i.incPAD;return this.chargeOption.clear(),this.chargeOption.set(a,this.getChargeAD()),!0}getChargeAD(){if(!this.enchanted||this.charge===0)return 0;const s=Math.min(Math.ceil(this.charge/100)-1,5);if(this.soul){const o=this.soul.multiplier;return 10+s*o}return 5+s}}const E=class{constructor(){this.itemID=0,this.name="",this.desc="",this.type=0,this.props=new Map,this.options=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.upgradeFailCount=0,this.hammerCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=U.normal,this.potentials=[],this.additionalGrade=U.normal,this.additionalPotentials=[],this.soulWeapon=new j(this),this.icon={id:0,origin:[0,0]},this.req={level:0,str:0,dex:0,int:0,luk:0,job:0,specJob:0}}get upgradeCountLeft(){return this.totalUpgradeCount+this.hammerCount-this.upgradeCount-this.upgradeFailCount}get diff(){let t=0;for(const[s,o]of this.options)t+=Math.floor(o.diff/E.getPropTypeWeight(s));return t}get isNewBonusType(){return!!([...this.options.values()].some(s=>s.bonus>0)&&this.getPropValue(i.tradeAvailable)!==1)}option(t){return this.options.has(t)||this.options.set(t,new I),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return(this.props.get(t)??0)>0}setAnvil(t,s){this.anvilIcon=t,this.anvilName=s}resetAnvil(){this.anvilIcon=void 0,this.anvilName=void 0}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==f.katara||Math.floor(t/10)===121}static isDoubleHandWeapon(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}static isSubWeapon(t){switch(t){case f.katara:case f.shield:case f.demonShield:case f.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case f.shield:case f.demonShield:case f.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110||t===f.soulShield||t===f.demonShield}static isAccessory(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}static isMechanicGear(t){return t>=161&&t<=165}static isDragonGear(t){return t>=194&&t<=197}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return f.soulShield;case 1099:return f.demonShield;case 1212:return f.shiningRod;case 1213:return f.tuner;case 1214:return f.breathShooter;case 1404:return f.chakram}if(Math.floor(t/1e4)===135)switch(Math.floor(t/100)){case 13522:case 13528:case 13529:case 13540:return Math.floor(t/10);default:return Math.floor(t/100)*10}if(Math.floor(t/1e4)===119)switch(Math.floor(t/100)){case 11902:return Math.floor(t/10)}return Math.floor(t/1e4)}static getMaxStar(t){if(t.totalUpgradeCount<=0||t.getBooleanValue(i.onlyUpgrade)||E.isMechanicGear(t.type)||E.isDragonGear(t.type))return 0;let s;const o=t.req.level;for(const a of E.starData)if(o>=a[0])s=a;else break;return s===void 0?0:t.getBooleanValue(i.superiorEqp)?s[2]:s[1]}static getPropTypeWeight(t){if(t<100)switch(t){case i.incSTR:case i.incDEX:case i.incINT:case i.incLUK:case i.incPAD:case i.incMAD:case i.incSpeed:case i.incJump:return 1;case i.incMHP:case i.incMMP:return 100;case i.incPDD:return 10;case i.incAD:return 2}return Number.MAX_VALUE}};let A=E;A.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class k{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const s=[...this.option.keys()];s.sort((a,d)=>i[d].length-i[a].length);let o=this.summary;for(const a of s)o=o.replace(`#${i[a]}`,(this.option.get(a)??0).toString());return o}static getPotentialLevel(s){return s<=0?1:s>=250?25:Math.floor((s+9)/10)}static checkOptionType(s,o){switch(s){case 0:return!0;case 10:return A.isWeapon(o)||A.isSubWeapon(o)||o===f.emblem;case 11:return!k.checkOptionType(10,o);case 20:return A.isSubWeapon(o)||o===f.cap||o===f.coat||o===f.longcoat||o===f.pants||o===f.shoes||o===f.glove||o===f.cape||o===f.belt||o===f.shoulder;case 40:return o===f.faceAccessory||o===f.eyeAccessory||o===f.earrings||o===f.ring||o===f.pendant;case 51:return o===f.cap;case 52:return o===f.coat||o===f.longcoat;case 53:return o===f.pants;case 54:return o===f.glove;case 55:return o===f.shoes;default:return!1}}}var h=(t=>(t[t.STR=0]="STR",t[t.DEX=1]="DEX",t[t.INT=2]="INT",t[t.LUK=3]="LUK",t[t.STR_DEX=4]="STR_DEX",t[t.STR_INT=5]="STR_INT",t[t.STR_LUK=6]="STR_LUK",t[t.DEX_INT=7]="DEX_INT",t[t.DEX_LUK=8]="DEX_LUK",t[t.INT_LUK=9]="INT_LUK",t[t.MHP=10]="MHP",t[t.MMP=11]="MMP",t[t.PAD=12]="PAD",t[t.MAD=13]="MAD",t[t.PDD=14]="PDD",t[t.speed=15]="speed",t[t.jump=16]="jump",t[t.damR=17]="damR",t[t.bdR=18]="bdR",t[t.allStatR=19]="allStatR",t[t.reduceReq=20]="reduceReq",t))(h||{});function m(t,s,o){const a=O(t,s,o);if(a.size===0)return!1;for(const[d,r]of a)t.option(d).bonus+=r;return!0}function y(t){for(const[,s]of t.options)s.bonus=0;return!0}function O(t,s,o){const a=T(s),d=$(t,s,o);return d===0?new Map:new Map(a.map(r=>[r,d]))}function $(t,s,o){const a=t.req.level,d=t.getBooleanValue(i.bossReward),r=t.type;if(a<0||d&&o<3)return 0;switch(s){case h.STR:case h.DEX:case h.INT:case h.LUK:return(Math.floor(a/20)+1)*o;case h.STR_DEX:case h.STR_INT:case h.STR_LUK:case h.DEX_INT:case h.DEX_LUK:case h.INT_LUK:return(Math.floor(a/40)+1)*o;case h.PDD:return(Math.floor(a/20)+1)*o;case h.PAD:case h.MAD:if(A.isWeapon(r)){const v=d?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];let c=t.option(i.incPAD).base;if(r===f.heavySword||r===f.longSword){if(r===f.longSword)switch(c){case 100:c=102;break;case 103:c=105;break;case 105:c=107;break;case 112:c=114;break;case 117:c=121;break;case 135:c=139;break;case 169:c=173;break;case 203:c=207;break;case 293:c=297;break;case 337:c=342;break}const n=a>180?6:a>160?5:a>110?4:3;return Math.ceil(c*v[o-1]*n/100)}else{const n=t.option(i.incMAD).base;if(s===h.MAD&&n>=c&&(c=n),d){const u=a>160?18:a>150?15:a>110?12:9;return Math.ceil(c*v[o-1]*u/100)}else{const u=a>110?4:3;return Math.ceil(c*v[o-1]*u/100)}}}else if(a<60)return 0;return o;case h.MHP:case h.MMP:return a<10?3*o:Math.floor(a/10)*30*o;case h.speed:case h.jump:return A.isWeapon(r)?0:o;case h.damR:return A.isWeapon(r)?o:0;case h.bdR:return a<90||!A.isWeapon(r)?0:2*o;case h.allStatR:return a<70&&!A.isWeapon(r)?0:o;case h.reduceReq:return 5*o;default:return 0}}function T(t){switch(t){case h.STR:return[i.incSTR];case h.DEX:return[i.incDEX];case h.INT:return[i.incINT];case h.LUK:return[i.incLUK];case h.STR_DEX:return[i.incSTR,i.incDEX];case h.STR_INT:return[i.incSTR,i.incINT];case h.STR_LUK:return[i.incSTR,i.incLUK];case h.DEX_INT:return[i.incDEX,i.incINT];case h.DEX_LUK:return[i.incDEX,i.incLUK];case h.INT_LUK:return[i.incINT,i.incLUK];case h.PDD:return[i.incPDD];case h.PAD:return[i.incPAD];case h.MAD:return[i.incMAD];case h.MHP:return[i.incMHP];case h.MMP:return[i.incMMP];case h.speed:return[i.incSpeed];case h.jump:return[i.incJump];case h.damR:return[i.damR];case h.bdR:return[i.bdR];case h.allStatR:return[i.statR];case h.reduceReq:return[i.reduceReq];default:return[]}}const G=25,q=15;function z(t,s=!1){if(t.getBooleanValue(i.incCHUC))return!1;if(t.getBooleanValue(i.superiorEqp))return p(t);if(t.star>=t.maxStar&&!s||t.star>=G)return!1;t.star+=1;const o=t.star,a=R(t,!1,!1),d=R(t,!1,!0),r=A.isWeapon(t.type)||t.type===f.katara,v=[[i.incSTR,i.incDEX],[i.incINT,i.incLUK],[i.incDEX,i.incSTR],[i.incLUK,i.incDEX],[i.incSTR,i.incDEX]],c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];let n;const u=t.req.job;if(u===0)n=new Set([i.incSTR,i.incDEX,i.incINT,i.incLUK]);else{n=new Set;for(let D=0;D<5;D++)if(u&1<<D)for(const M of v[D])n.add(M)}for(const D of c)(n.has(D)||o>15&&(t.option(D).base>0||t.option(D).upgrade>0))&&(t.option(D).enchant+=a[o]);if(r){const D=u===0||Math.floor(u/2)%2===1||t.option(i.incMAD).upgrade>0;if(o>15)t.option(i.incPAD).enchant+=d[o],D&&(t.option(i.incMAD).enchant+=d[o]);else{const M=t.option(i.incPAD).sum-t.option(i.incPAD).bonus;if(t.option(i.incPAD).enchant+=Math.floor(M/50)+1,D){const S=t.option(i.incMAD).sum-t.option(i.incMAD).bonus;t.option(i.incMAD).enchant+=Math.floor(S/50)+1}}}else t.option(i.incPAD).enchant+=d[o],t.option(i.incMAD).enchant+=d[o],t.type===f.glove&&(u===0?(t.option(i.incPAD).enchant+=C[o],t.option(i.incMAD).enchant+=C[o]):Math.floor(u/2)%2===1?t.option(i.incMAD).enchant+=C[o]:t.option(i.incPAD).enchant+=C[o]);if(!r&&t.type!==f.machineHeart){const D=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;t.option(i.incPDD).enchant+=Math.floor(D/20)+1}const b=[f.cap,f.coat,f.longcoat,f.pants,f.cape,f.ring,f.pendant,f.belt,f.shoulder,f.shield];return r?(t.option(i.incMHP).enchant+=N[o],t.option(i.incMMP).enchant+=N[o]):b.includes(t.type)&&(t.option(i.incMHP).enchant+=N[o]),t.type===f.shoes&&(t.option(i.incSpeed).enchant+=K[o],t.option(i.incJump).enchant+=K[o]),!0}function p(t){if(t.star>=t.maxStar)return!1;t.star+=1;const s=t.star,o=R(t,!1,!1),a=R(t,!1,!0),d=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const c of d)t.option(c).base>0&&(t.option(c).enchant+=o[s]);const r=[i.incPAD,i.incMAD];for(const c of r)t.option(c).base>0&&(t.option(c).enchant+=a[s]);const v=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;return t.option(i.incPDD).enchant+=Math.floor(v/20)+1,!0}function e(t,s=!1,o=!1){if(t.getBooleanValue(i.incCHUC)||t.getBooleanValue(i.superiorEqp)||t.req.level>150||t.star>=t.maxStar&&!o||t.star>=q)return!1;t.amazing||(t.amazing=!0,t.maxStar=Math.min(t.maxStar,q)),t.star+=1;const a=t.star,d=R(t,!0,!1),r=R(t,!0,!0),v=A.isWeapon(t.type)||t.type===f.katara,c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const b of c)if(t.option(b).sum>0){let M=d[a];s&&A.isAccessory(t.type)&&(M+=a>5?2:1),t.option(b).enchant+=M}const n=[i.incPAD,i.incMAD];for(const b of n){const D=t.option(b).sum;if(D>0){v&&(t.option(b).enchant+=Math.floor(D/50)+1);let M=r[a];s&&(v||t.type===f.shield)&&(M+=1),t.option(b).enchant+=M}}s&&A.isArmor(t.type)&&(t.option(i.incMHP).enchant+=50);const u=t.option(i.incPDD).sum;return t.option(i.incPDD).enchant+=Math.floor(u/20)+1,!0}function F(t){if(t.getBooleanValue(i.incCHUC))return!1;t.star=0,t.amazing=!1,t.maxStar=A.getMaxStar(t);for(const[,s]of t.options)s.enchant=0;return!0}function t0(t){if(t.getBooleanValue(i.incCHUC)||t.amazing)return!1;const s=t.star;F(t);for(let o=0;o<s;o++)z(t,!0);return!0}function R(t,s,o){let a;t.getBooleanValue(i.superiorEqp)?o?a=n0:a=c0:s?o?a=a0:a=f0:o?A.isWeapon(t.type)||t.type===f.katara?a=s0:a=i0:a=o0;const d=t.req.level;for(const r of[...a].reverse())if(d>=r[0])return r;throw Error(`Gear has invalid reqLevel.
2
- `+t)}const n0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[110,0,0,0,0,0,5,6,7,0,0,0,0,0,0,0],[150,0,0,0,0,0,9,10,11,12,13,15,17,19,21,23]],c0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],s0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6,7,8,9,27,28,29],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6,7,8,9,10,28,29,30],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,7,8,9,10,11,29,30,31],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,9,10,11,12,30,31,32],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,10,11,12,13,31,32,33],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,10,11,12,13,14,32,33,34],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,14,14,15,16,17,34,35,36],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,16,16,17,18,19,36,37,38]],i0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7,8,9,10,12,13,15,17],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,13,14,16,18],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,17,19,21,23],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,14,15,16,17,19,21,23,25],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,15,16,17,18,19,21,23,25,27]],o0=[[0,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0],[108,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0],[118,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,0,0,0],[128,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,0,0,0],[138,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,9,9,9,9,9,9,9,0,0,0],[148,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,11,11,11,11,11,11,11,0,0,0],[158,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,13,13,13,13,13,13,13,0,0,0],[198,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,15,15,15,15,15,15,15,0,0,0],[248,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,0,0,0]],a0=[[0,0,0,0,0,0,1,2,3,4,5,6,8,10,12,14],[80,0,0,0,0,0,2,3,4,5,6,7,9,11,13,15],[90,0,0,0,0,0,3,4,5,6,7,8,10,12,14,16],[100,0,0,0,0,0,4,5,6,7,8,9,11,13,15,17],[110,0,0,0,0,0,5,6,7,8,9,10,12,14,16,18],[120,0,0,0,0,0,6,7,8,9,10,11,13,15,17,19],[130,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[140,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[150,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22]],f0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[85,3,4,6,9,13,0,0,0,0,0,0,0,0,0,0],[90,4,5,7,10,14,0,0,0,0,0,0,0,0,0,0],[95,5,6,8,11,15,0,0,0,0,0,0,0,0,0,0],[100,7,8,10,13,17,0,0,0,0,0,0,0,0,0,0],[105,8,9,11,14,18,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[115,10,11,13,16,20,0,0,0,0,0,0,0,0,0,0],[120,12,13,15,18,22,0,0,0,0,0,0,0,0,0,0],[125,13,14,16,19,23,0,0,0,0,0,0,0,0,0,0],[130,14,15,17,20,24,0,0,0,0,0,0,0,0,0,0],[135,15,16,18,21,25,0,0,0,0,0,0,0,0,0,0],[140,17,18,20,23,27,0,0,0,0,0,0,0,0,0,0],[145,18,19,21,24,28,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],C=[0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0],N=[0,5,5,5,10,10,15,15,20,20,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0],K=[0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0];function J(t,s,o){const a=s===i.incINT?i.incMAD:i.incPAD,d=t.req.level>=115?2:t.req.level>=75?1:0;let r;const v=a===i.incMAD?"마력":"공격력";switch(s){case i.incSTR:r="힘";break;case i.incDEX:r="민첩";break;case i.incINT:r="지력";break;case i.incLUK:r="운";break;case i.incAllStat:r="올스탯";break;case i.incMHP:r="체력";break}if(A.isWeapon(t.type)||t.type===f.katara){if(s===i.incAllStat)return;let c;switch(o){case 100:c=[[1,0],[2,0],[3,1]];break;case 70:c=[[2,0],[3,1],[5,2]];break;case 30:c=[[3,1],[5,2],[7,3]];break;case 15:c=[[5,2],[7,3],[9,4]];break}const n=c[d][0],u=c[d][1]*(s===i.incMHP?50:1);return{name:u>0?`${o}% ${v}(${r}) 주문서`:`${o}% ${v} 주문서`,stat:new Map([[s,u],[a,n]])}}else if(o===15)return;if(t.type===f.glove){let c;switch(o){case 100:c=[0,1,1];break;case 70:c=[1,2,2];break;case 30:c=[2,3,3];break}const n=c[d];let u,b;return n===0?(u=`${o}% 방어력 주문서`,b=new Map([[i.incPDD,3]])):(u=`${o}% ${v} 주문서`,b=new Map([[a,n]])),{name:u,stat:b}}if(A.isArmor(t.type)||t.type===f.shoulder){if(s===i.incAllStat){if(o!==30)return;const S=[[1,30,4],[2,70,7],[3,120,10]],w=S[d][0],Z=S[d][1],Y=S[d][2],P=`${o}% ${r} 주문서`,g=new Map([[i.incSTR,w],[i.incDEX,w],[i.incINT,w],[i.incLUK,w],[i.incMHP,Z],[i.incPDD,Y]]);return t.upgradeCount===3&&(t.req.job===0?(g.set(i.incMAD,1),g.set(i.incPAD,1)):Math.floor(t.req.job/2)%2===1?g.set(i.incMAD,1):g.set(i.incPAD,1)),{name:P,stat:g}}let c;switch(o){case 100:c=[[1,5,1],[2,20,2],[3,30,3]];break;case 70:c=[[2,15,2],[3,40,4],[4,70,5]];break;case 30:c=[[3,30,4],[5,70,7],[7,120,10]];break}const n=s!==i.incMHP?c[d][0]:0,u=c[d][1]+(s===i.incMHP?c[d][0]*50:0),b=c[d][2],D=`${o}% ${r} 주문서`,M=new Map([[i.incMHP,u],[i.incPDD,b]]);return n>0&&M.set(s,n),t.upgradeCount===3&&(t.req.job===0?(M.set(i.incMAD,1),M.set(i.incPAD,1)):Math.floor(t.req.job/2)%2===1?M.set(i.incMAD,1):M.set(i.incPAD,1)),{name:D,stat:M}}if(A.isAccessory(t.type)){if(s===i.incAllStat){if(o!==30)return;const M=[[1,30,4],[2,70,7],[3,120,10]][d][0],S=`${o}% ${r} 주문서`,w=new Map([[i.incSTR,M],[i.incDEX,M],[i.incINT,M],[i.incLUK,M]]);return{name:S,stat:w}}let c;switch(o){case 100:c=[1,1,2];break;case 70:c=[2,2,3];break;case 30:c=[3,4,5];break}const n=c[d]*(s===i.incMHP?50:1);return{name:`${o}% ${r} 주문서`,stat:new Map([[s,n]])}}if(t.type===f.machineHeart){let c;switch(o){case 100:c=[1,2,3];break;case 70:c=[2,3,5];break;case 30:c=[3,5,7];break}const n=c[d];return{name:`${o}% ${r} 주문서`,stat:new Map([[a,n]])}}}function h0(t){return t.getBooleanValue(i.blockGoldHammer)||t.getBooleanValue(i.onlyUpgrade)||t.totalUpgradeCount<=0||t.hammerCount>0?!1:(t.hammerCount=1,!0)}function B(t,s){if(t.upgradeCountLeft<1)return!1;t.upgradeCount+=1;for(const[o,a]of s.stat)t.option(o).upgrade+=a;return!0}function d0(t,s,o){const a=J(t,s,o);return a?B(t,a):!1}function r0(t){return t.upgradeCountLeft<1?!1:(t.upgradeFailCount+=1,!0)}function u0(t){return t.upgradeFailCount<1?!1:(t.upgradeFailCount-=1,!0)}function D0(t){t.upgradeCount=0,t.upgradeFailCount=0,t.hammerCount=0;for(const[,s]of t.options)s.upgrade=0;return!0}function l(t){const s={};s.id=t.itemID,s.n=t.name,t.desc.length>0&&(s.d=t.desc),s.i=t.icon,t.anvilIcon&&(s.i2=t.anvilIcon),t.anvilName&&(s.n2=t.anvilName),s.t=t.type,s.r=t.req,s.pr=X(t.props,a=>a!==0),s.o=X(t.options,a=>!a.empty,M0),t.totalUpgradeCount>0&&(s.c=t.totalUpgradeCount),t.upgradeCount>0&&(s.up=t.upgradeCount),t.upgradeFailCount>0&&(s.f=t.upgradeFailCount),t.hammerCount>0&&(s.h=t.hammerCount),t.maxStar>0&&(s.m=t.maxStar),t.star>0&&(s.s=t.star),t.amazing&&(s.a=t.amazing),t.karma!==void 0&&(s.k=t.karma),t.canPotential&&(s.cp=t.canPotential),t.grade>0&&(s.g=t.grade),t.grade>0&&t.potentials.length>0&&(s.p=V(t.potentials,void 0,x)),t.additionalGrade>0&&(s.g2=t.additionalGrade),t.additionalGrade>0&&t.additionalPotentials.length>0&&(s.p2=V(t.additionalPotentials,void 0,x));const o=A0(t.soulWeapon);return o&&(s.w=o),s}function M0(t){return[t.base,t.bonus,t.upgrade,t.enchant]}function x(t){return t?{c:t.code,t:t.optionType,l:t.reqLevel,s:t.summary,o:X(t.option,s=>s!==0)}:null}function A0(t){const s={};if(t.enchanted&&(s.e=t.enchanted),t.soul&&(s.s=t.soul),t.charge>0&&(s.c=t.charge),t.chargeOption.size>0&&(s.o=X(t.chargeOption,o=>o!==0)),Object.keys(s).length>0)return s}const Q=t=>{const s=c=>typeof c.id=="number"&&typeof c.n=="string"&&(c.d===void 0||typeof c.d=="string")&&typeof c.i=="object"&&c.i!==null&&o(c.i)&&(c.i2===void 0||typeof c.i2=="object"&&c.i2!==null&&o(c.i2))&&(c.n2===void 0||typeof c.n2=="string")&&(c.t===100||c.t===101||c.t===102||c.t===103||c.t===104||c.t===105||c.t===106||c.t===107||c.t===108||c.t===110||c.t===111||c.t===112||c.t===113||c.t===114||c.t===115||c.t===116||c.t===118||c.t===166||c.t===167||c.t===109||c.t===119||c.t===119020||c.t===1212||c.t===1213||c.t===1214||c.t===122||c.t===123||c.t===124||c.t===126||c.t===127||c.t===128||c.t===129||c.t===130||c.t===131||c.t===132||c.t===133||c.t===134||c.t===136||c.t===137||c.t===138||c.t===140||c.t===1404||c.t===141||c.t===142||c.t===143||c.t===144||c.t===145||c.t===146||c.t===147||c.t===148||c.t===149||c.t===150||c.t===151||c.t===152||c.t===153||c.t===156||c.t===157||c.t===158||c.t===159||c.t===1098||c.t===1099||c.t===135200||c.t===135210||c.t===135220||c.t===135221||c.t===135222||c.t===135223||c.t===135224||c.t===135225||c.t===135226||c.t===135227||c.t===135228||c.t===135229||c.t===135240||c.t===135250||c.t===135260||c.t===135270||c.t===135290||c.t===135291||c.t===135292||c.t===135293||c.t===135294||c.t===135295||c.t===135296||c.t===135297||c.t===135298||c.t===135300||c.t===135310||c.t===135320||c.t===135330||c.t===135340||c.t===135350||c.t===135360||c.t===135370||c.t===135380||c.t===135400||c.t===135401||c.t===135402||c.t===135403||c.t===180||c.t===161||c.t===162||c.t===163||c.t===164||c.t===165||c.t===194||c.t===195||c.t===196||c.t===197)&&typeof c.r=="object"&&c.r!==null&&a(c.r)&&Array.isArray(c.pr)&&c.pr.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&Array.isArray(n[1])&&n[1].length===4&&typeof n[1][0]=="number"&&typeof n[1][1]=="number"&&typeof n[1][2]=="number"&&typeof n[1][3]=="number")&&(c.c===void 0||typeof c.c=="number")&&(c.up===void 0||typeof c.up=="number")&&(c.f===void 0||typeof c.f=="number")&&(c.h===void 0||typeof c.h=="number")&&(c.m===void 0||typeof c.m=="number")&&(c.s===void 0||typeof c.s=="number")&&(c.a===void 0||typeof c.a=="boolean")&&(c.k===void 0||typeof c.k=="number")&&(c.cp===void 0||typeof c.cp=="boolean")&&(c.g===void 0||c.g===0||c.g===1||c.g===2||c.g===3||c.g===4||c.g===5)&&(c.p===void 0||Array.isArray(c.p)&&c.p.every(n=>n===null||typeof n=="object"&&n!==null&&d(n)))&&(c.g2===void 0||c.g2===0||c.g2===1||c.g2===2||c.g2===3||c.g2===4||c.g2===5)&&(c.p2===void 0||Array.isArray(c.p2)&&c.p2.every(n=>n===null||typeof n=="object"&&n!==null&&d(n)))&&(c.w===void 0||typeof c.w=="object"&&c.w!==null&&Array.isArray(c.w)===!1&&r(c.w)),o=c=>typeof c.id=="number"&&Array.isArray(c.origin)&&c.origin.length===2&&typeof c.origin[0]=="number"&&typeof c.origin[1]=="number",a=c=>typeof c.level=="number"&&typeof c.str=="number"&&typeof c.luk=="number"&&typeof c.dex=="number"&&typeof c.int=="number"&&typeof c.job=="number"&&typeof c.specJob=="number",d=c=>typeof c.c=="number"&&typeof c.t=="number"&&typeof c.l=="number"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"),r=c=>(c.e===void 0||typeof c.e=="boolean")&&(c.s===void 0||typeof c.s=="object"&&c.s!==null&&v(c.s))&&(c.c===void 0||typeof c.c=="number")&&(c.o===void 0||Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")),v=c=>typeof c.name=="string"&&typeof c.skill=="string"&&c.option instanceof Map&&[...c.option].every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&typeof c.multiplier=="number";return typeof t=="object"&&t!==null&&s(t)};function b0(t){return JSON.stringify(l(t))}function v0(t){return H(JSON.parse(t))}function S0(t){const s=JSON.parse(t);return Q(s)?H(s):null}function X(t,s,o){let a=[...t];return s&&(a=a.filter(d=>s(d[1]))),o?a.map(d=>[d[0],o(d[1])]):a}function V(t,s,o){let a=t;return s&&(a=a.filter(s)),o?a.map(o):a===t?[...t]:a}function L(t,s){return s?new Map(t.map(o=>[o[0],s(o[1])])):new Map(t)}function W(t,s){return s?[...t].map(s):[...t]}function H(t){const s=new A;return s.itemID=t.id,s.name=t.n,t.d&&(s.desc=t.d),s.icon=t.i,t.i2&&t.n2&&(s.anvilIcon=t.i2,s.anvilName=t.n2),s.type=t.t,s.req=t.r,s.props=L(t.pr),s.options=L(t.o,w0),t.c&&(s.totalUpgradeCount=t.c),t.up&&(s.upgradeCount=t.up),t.f&&(s.upgradeFailCount=t.f),t.h&&(s.hammerCount=t.h),t.m&&(s.maxStar=t.m),t.s&&(s.star=t.s),t.a&&(s.amazing=t.a),t.k&&(s.karma=t.k),t.cp&&(s.canPotential=t.cp),t.g&&(s.grade=t.g),t.p&&(s.potentials=W(t.p,_)),t.g2&&(s.additionalGrade=t.g2),t.p2&&(s.additionalPotentials=W(t.p2,_)),R0(t.w,s),s}function w0(t){const s=new I;return s.base=t[0],s.bonus=t[1],s.upgrade=t[2],s.enchant=t[3],s}function _(t){if(!t)return null;const s=new k;return s.code=t.c,s.optionType=t.t,s.reqLevel=t.l,s.summary=t.s,s.option=L(t.o),s}function R0(t,s){if(t){const o=s.soulWeapon;t?.e&&(o.enchanted=t.e),t?.s&&(o.soul=t.s),t?.c&&(o.charge=t.c),t?.o&&(o.chargeOption=L(t.o))}}exports.BonusStatType=h;exports.Gear=A;exports.GearOption=I;exports.GearPropType=i;exports.GearType=f;exports.Potential=k;exports.PotentialGrade=U;exports.SoulWeapon=j;exports.addAmazingEnhancement=e;exports.addBonusStat=m;exports.addStarforce=z;exports.addUpgradeFailCount=r0;exports.applyGoldHammer=h0;exports.applyScroll=B;exports.applySpellTrace=d0;exports.gearToPlain=l;exports.getBonusStatOption=O;exports.getBonusStatValue=$;exports.getSpellTraceScroll=J;exports.isGearLike=Q;exports.parseGear=v0;exports.plainToGear=H;exports.recalculateStarforce=t0;exports.resetBonusStat=y;exports.resetEnhancement=F;exports.resetUpgrade=D0;exports.restoreUpgradeCount=u0;exports.stringifyGear=b0;exports.validateParseGear=S0;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class I{constructor(){this.base=0,this.bonus=0,this.upgrade=0,this.enchant=0}get empty(){return this.base===0&&this.bonus===0&&this.upgrade===0&&this.enchant===0}get sum(){return Math.max(0,this.base+this.bonus+this.upgrade+this.enchant)}get diff(){return this.bonus+this.upgrade+this.enchant}}var i=(t=>(t[t.incSTR=1]="incSTR",t[t.incSTRr=2]="incSTRr",t[t.incDEX=3]="incDEX",t[t.incDEXr=4]="incDEXr",t[t.incINT=5]="incINT",t[t.incINTr=6]="incINTr",t[t.incLUK=7]="incLUK",t[t.incLUKr=8]="incLUKr",t[t.incAllStat=9]="incAllStat",t[t.incMHP=10]="incMHP",t[t.incMMP=11]="incMMP",t[t.incMHPr=12]="incMHPr",t[t.incMMPr=13]="incMMPr",t[t.incMDF=14]="incMDF",t[t.incARC=15]="incARC",t[t.incAUT=16]="incAUT",t[t.incPAD=17]="incPAD",t[t.incMAD=18]="incMAD",t[t.incAD=19]="incAD",t[t.incPDD=20]="incPDD",t[t.incSpeed=21]="incSpeed",t[t.incJump=22]="incJump",t[t.knockback=23]="knockback",t[t.bdR=24]="bdR",t[t.incBDR=25]="incBDR",t[t.imdR=26]="imdR",t[t.incIMDR=27]="incIMDR",t[t.damR=28]="damR",t[t.nbdR=29]="nbdR",t[t.statR=30]="statR",t[t.incCHUC=31]="incCHUC",t[t.incPADr=100]="incPADr",t[t.incMADr=101]="incMADr",t[t.incPDDr=102]="incPDDr",t[t.incCr=103]="incCr",t[t.incDAMr=104]="incDAMr",t[t.RecoveryHP=105]="RecoveryHP",t[t.RecoveryMP=106]="RecoveryMP",t[t.face=107]="face",t[t.prop=108]="prop",t[t.time=109]="time",t[t.HP=110]="HP",t[t.MP=111]="MP",t[t.attackType=112]="attackType",t[t.ignoreTargetDEF=113]="ignoreTargetDEF",t[t.ignoreDAM=114]="ignoreDAM",t[t.ignoreDAMr=115]="ignoreDAMr",t[t.DAMreflect=116]="DAMreflect",t[t.mpconReduce=117]="mpconReduce",t[t.incMesoProp=118]="incMesoProp",t[t.incRewardProp=119]="incRewardProp",t[t.incAllskill=120]="incAllskill",t[t.RecoveryUP=121]="RecoveryUP",t[t.boss=122]="boss",t[t.level=123]="level",t[t.incTerR=124]="incTerR",t[t.incAsrR=125]="incAsrR",t[t.incEXPr=126]="incEXPr",t[t.reduceCooltime=127]="reduceCooltime",t[t.incSTRlv=128]="incSTRlv",t[t.incDEXlv=129]="incDEXlv",t[t.incINTlv=130]="incINTlv",t[t.incLUKlv=131]="incLUKlv",t[t.incMHPlv=132]="incMHPlv",t[t.incPADlv=133]="incPADlv",t[t.incMADlv=134]="incMADlv",t[t.incCriticaldamage=135]="incCriticaldamage",t[t.attackSpeed=200]="attackSpeed",t[t.setItemID=201]="setItemID",t[t.durability=202]="durability",t[t.reduceReq=203]="reduceReq",t[t.only=1100]="only",t[t.tradeBlock=1101]="tradeBlock",t[t.accountSharable=1102]="accountSharable",t[t.onlyEquip=1103]="onlyEquip",t[t.tradeAvailable=1104]="tradeAvailable",t[t.equipTradeBlock=1105]="equipTradeBlock",t[t.sharableOnce=1106]="sharableOnce",t[t.charismaEXP=1107]="charismaEXP",t[t.senseEXP=1108]="senseEXP",t[t.insightEXP=1109]="insightEXP",t[t.willEXP=1110]="willEXP",t[t.craftEXP=1111]="craftEXP",t[t.charmEXP=1112]="charmEXP",t[t.accountShareTag=1113]="accountShareTag",t[t.bossReward=1114]="bossReward",t[t.noPotential=1115]="noPotential",t[t.fixedPotential=1116]="fixedPotential",t[t.specialGrade=1117]="specialGrade",t[t.fixedGrade=1118]="fixedGrade",t[t.superiorEqp=1119]="superiorEqp",t[t.incPQEXPr=1120]="incPQEXPr",t[t.jokerToSetItem=1121]="jokerToSetItem",t[t.blockGoldHammer=1122]="blockGoldHammer",t[t.exceptUpgrade=1123]="exceptUpgrade",t[t.onlyUpgrade=1124]="onlyUpgrade",t[t.noLookChange=1125]="noLookChange",t[t.tucIgnoreForPotential=1126]="tucIgnoreForPotential",t))(i||{}),f=(t=>(t[t.cap=100]="cap",t[t.faceAccessory=101]="faceAccessory",t[t.eyeAccessory=102]="eyeAccessory",t[t.earrings=103]="earrings",t[t.coat=104]="coat",t[t.longcoat=105]="longcoat",t[t.pants=106]="pants",t[t.shoes=107]="shoes",t[t.glove=108]="glove",t[t.cape=110]="cape",t[t.ring=111]="ring",t[t.pendant=112]="pendant",t[t.belt=113]="belt",t[t.medal=114]="medal",t[t.shoulder=115]="shoulder",t[t.pocket=116]="pocket",t[t.badge=118]="badge",t[t.android=166]="android",t[t.machineHeart=167]="machineHeart",t[t.shield=109]="shield",t[t.emblem=119]="emblem",t[t.powerSource=119020]="powerSource",t[t.shiningRod=1212]="shiningRod",t[t.tuner=1213]="tuner",t[t.breathShooter=1214]="breathShooter",t[t.soulShooter=122]="soulShooter",t[t.desperado=123]="desperado",t[t.energySword=124]="energySword",t[t.espLimiter=126]="espLimiter",t[t.chain=127]="chain",t[t.magicGauntlet=128]="magicGauntlet",t[t.ritualFan=129]="ritualFan",t[t.ohSword=130]="ohSword",t[t.ohAxe=131]="ohAxe",t[t.ohBlunt=132]="ohBlunt",t[t.dagger=133]="dagger",t[t.katara=134]="katara",t[t.cane=136]="cane",t[t.wand=137]="wand",t[t.staff=138]="staff",t[t.thSword=140]="thSword",t[t.chakram=1404]="chakram",t[t.thAxe=141]="thAxe",t[t.thBlunt=142]="thBlunt",t[t.spear=143]="spear",t[t.polearm=144]="polearm",t[t.bow=145]="bow",t[t.crossbow=146]="crossbow",t[t.claw=147]="claw",t[t.knuckle=148]="knuckle",t[t.gun=149]="gun",t[t.shovel=150]="shovel",t[t.pickaxe=151]="pickaxe",t[t.dualBowguns=152]="dualBowguns",t[t.handCannon=153]="handCannon",t[t.heavySword=156]="heavySword",t[t.longSword=157]="longSword",t[t.gauntletRevolver=158]="gauntletRevolver",t[t.ancientBow=159]="ancientBow",t[t.soulShield=1098]="soulShield",t[t.demonShield=1099]="demonShield",t[t.magicArrow=135200]="magicArrow",t[t.card=135210]="card",t[t.medallion=135220]="medallion",t[t.rosary=135221]="rosary",t[t.ironChain=135222]="ironChain",t[t.magicBook1=135223]="magicBook1",t[t.magicBook2=135224]="magicBook2",t[t.magicBook3=135225]="magicBook3",t[t.arrowFletching=135226]="arrowFletching",t[t.bowThimble=135227]="bowThimble",t[t.daggerScabbard=135228]="daggerScabbard",t[t.charm=135229]="charm",t[t.orb=135240]="orb",t[t.dragonEssence=135250]="dragonEssence",t[t.soulRing=135260]="soulRing",t[t.magnum=135270]="magnum",t[t.wristBand=135290]="wristBand",t[t.farSight=135291]="farSight",t[t.powderKeg=135292]="powderKeg",t[t.mass=135293]="mass",t[t.document=135294]="document",t[t.magicMarble=135295]="magicMarble",t[t.arrowhead=135296]="arrowhead",t[t.jewel=135297]="jewel",t[t.powderKeg2=135298]="powderKeg2",t[t.controller=135300]="controller",t[t.foxMarble=135310]="foxMarble",t[t.chessPiece=135320]="chessPiece",t[t.transmitter=135330]="transmitter",t[t.charge=135340]="charge",t[t.magicWing=135350]="magicWing",t[t.pathOfAbyss=135360]="pathOfAbyss",t[t.relic=135370]="relic",t[t.fanTassel=135380]="fanTassel",t[t.bracelet=135400]="bracelet",t[t.weaponBelt=135401]="weaponBelt",t[t.ornament=135402]="ornament",t[t.hexSeeker=135403]="hexSeeker",t[t.petEquip=180]="petEquip",t[t.machineEngine=161]="machineEngine",t[t.machineArms=162]="machineArms",t[t.machineLegs=163]="machineLegs",t[t.machineBody=164]="machineBody",t[t.machineTransistors=165]="machineTransistors",t[t.dragonMask=194]="dragonMask",t[t.dragonPendant=195]="dragonPendant",t[t.dragonWings=196]="dragonWings",t[t.dragonTail=197]="dragonTail",t))(f||{}),C=(t=>(t[t.normal=0]="normal",t[t.rare=1]="rare",t[t.epic=2]="epic",t[t.unique=3]="unique",t[t.legendary=4]="legendary",t[t.special=5]="special",t))(C||{});class F{constructor(s){this.enchanted=!1,this.charge=0,this.chargeOption=new Map,this.gear=s}enchant(){return this.enchanted||!D.isWeapon(this.gear.type)?!1:(this.enchanted=!0,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0)}disenchant(){return this.enchanted?(this.enchanted=!1,this.soul=void 0,this.charge=0,this.chargeOption.clear(),!0):!1}setSoul(s){return this.enchanted?(this.soul=s,this.setCharge(this.charge),!0):!1}removeSoul(){return!this.enchanted||!this.soul?!1:(this.soul=void 0,this.setCharge(this.charge),!0)}setCharge(s){if(!this.enchanted||s<0||s>1e3)return!1;this.charge=s;const a=this.gear.option(i.incPAD).base<this.gear.option(i.incMAD).base?i.incMAD:i.incPAD;return this.chargeOption.clear(),this.chargeOption.set(a,this.getChargeAD()),!0}getChargeAD(){if(!this.enchanted||this.charge===0)return 0;const s=Math.min(Math.ceil(this.charge/100)-1,5);if(this.soul){const o=this.soul.multiplier;return 10+s*o}return 5+s}}const w=class{constructor(){this.itemID=0,this.name="",this.desc="",this.type=0,this.props=new Map,this.options=new Map,this.totalUpgradeCount=0,this.upgradeCount=0,this.upgradeFailCount=0,this.hammerCount=0,this.maxStar=0,this.star=0,this.amazing=!1,this.canPotential=!1,this.grade=C.normal,this.potentials=[],this.additionalGrade=C.normal,this.additionalPotentials=[],this.soulWeapon=new F(this),this.icon={id:0,origin:[0,0]},this.req={level:0,str:0,dex:0,int:0,luk:0,job:0,specJob:0}}get upgradeCountLeft(){return this.totalUpgradeCount+this.hammerCount-this.upgradeCount-this.upgradeFailCount}get diff(){let t=0;for(const[s,o]of this.options)t+=Math.floor(o.diff/w.getPropTypeWeight(s));return t}get isNewBonusType(){return!!([...this.options.values()].some(s=>s.bonus>0)&&this.getPropValue(i.tradeAvailable)!==1)}option(t){return this.options.has(t)||this.options.set(t,new I),this.options.get(t)}getPropValue(t){return this.props.get(t)??0}getBooleanValue(t){return(this.props.get(t)??0)>0}setAnvil(t,s){this.anvilIcon=t,this.anvilName=s}resetAnvil(){this.anvilIcon=void 0,this.anvilName=void 0}static isWeapon(t){return this.isLeftWeapon(t)||this.isDoubleHandWeapon(t)}static isLeftWeapon(t){return t>=121&&t<=139&&t!==f.katara||Math.floor(t/10)===121}static isDoubleHandWeapon(t){return t>=140&&t<=149||t>=152&&t<=159||Math.floor(t/10)===140}static isSubWeapon(t){switch(t){case f.katara:case f.shield:case f.demonShield:case f.soulShield:return!0;default:return Math.floor(t/1e3)===135}}static isShield(t){switch(t){case f.shield:case f.demonShield:case f.soulShield:return!0;default:return!1}}static isArmor(t){return t===100||t>=104&&t<=110||t===f.soulShield||t===f.demonShield}static isAccessory(t){return t>=101&&t<=103||t>=111&&t<=113||t===115}static isMechanicGear(t){return t>=161&&t<=165}static isDragonGear(t){return t>=194&&t<=197}static getGearType(t){switch(Math.floor(t/1e3)){case 1098:return f.soulShield;case 1099:return f.demonShield;case 1212:return f.shiningRod;case 1213:return f.tuner;case 1214:return f.breathShooter;case 1404:return f.chakram}if(Math.floor(t/1e4)===135)switch(Math.floor(t/100)){case 13522:case 13528:case 13529:case 13540:return Math.floor(t/10);default:return Math.floor(t/100)*10}if(Math.floor(t/1e4)===119)switch(Math.floor(t/100)){case 11902:return Math.floor(t/10)}return Math.floor(t/1e4)}static getMaxStar(t){if(t.totalUpgradeCount<=0||t.getBooleanValue(i.onlyUpgrade)||w.isMechanicGear(t.type)||w.isDragonGear(t.type))return 0;let s;const o=t.req.level;for(const a of w.starData)if(o>=a[0])s=a;else break;return s===void 0?0:t.getBooleanValue(i.superiorEqp)?s[2]:s[1]}static getPropTypeWeight(t){if(t<100)switch(t){case i.incSTR:case i.incDEX:case i.incINT:case i.incLUK:case i.incPAD:case i.incMAD:case i.incSpeed:case i.incJump:return 1;case i.incMHP:case i.incMMP:return 100;case i.incPDD:return 10;case i.incAD:return 2}return Number.MAX_VALUE}};let D=w;D.starData=[[0,5,3],[95,8,5],[110,10,8],[120,15,10],[130,20,12],[140,25,15]];class L{constructor(){this.code=0,this.optionType=0,this.reqLevel=0,this.summary="",this.option=new Map}get convertSummary(){const s=[...this.option.keys()];s.sort((a,r)=>i[r].length-i[a].length);let o=this.summary;for(const a of s)o=o.replace(`#${i[a]}`,(this.option.get(a)??0).toString());return o}static getPotentialLevel(s){return s<=0?1:s>=250?25:Math.floor((s+9)/10)}static checkOptionType(s,o){switch(s){case 0:return!0;case 10:return D.isWeapon(o)||D.isSubWeapon(o)||o===f.emblem;case 11:return!L.checkOptionType(10,o);case 20:return D.isSubWeapon(o)||o===f.cap||o===f.coat||o===f.longcoat||o===f.pants||o===f.shoes||o===f.glove||o===f.cape||o===f.belt||o===f.shoulder;case 40:return o===f.faceAccessory||o===f.eyeAccessory||o===f.earrings||o===f.ring||o===f.pendant;case 51:return o===f.cap;case 52:return o===f.coat||o===f.longcoat;case 53:return o===f.pants;case 54:return o===f.glove;case 55:return o===f.shoes;default:return!1}}}var h=(t=>(t[t.STR=0]="STR",t[t.DEX=1]="DEX",t[t.INT=2]="INT",t[t.LUK=3]="LUK",t[t.STR_DEX=4]="STR_DEX",t[t.STR_INT=5]="STR_INT",t[t.STR_LUK=6]="STR_LUK",t[t.DEX_INT=7]="DEX_INT",t[t.DEX_LUK=8]="DEX_LUK",t[t.INT_LUK=9]="INT_LUK",t[t.MHP=10]="MHP",t[t.MMP=11]="MMP",t[t.PAD=12]="PAD",t[t.MAD=13]="MAD",t[t.PDD=14]="PDD",t[t.speed=15]="speed",t[t.jump=16]="jump",t[t.damR=17]="damR",t[t.bdR=18]="bdR",t[t.allStatR=19]="allStatR",t[t.reduceReq=20]="reduceReq",t))(h||{});function T(t,s,o){const a=l(t,s,o);if(a.size===0)return!1;for(const[r,d]of a)t.option(r).bonus+=d;return!0}function G(t){for(const[,s]of t.options)s.bonus=0;return!0}function l(t,s,o){const a=p(s),r=J(t,s,o);return r===0?new Map:new Map(a.map(d=>[d,r]))}function J(t,s,o){const a=t.req.level,r=t.getBooleanValue(i.bossReward),d=t.type;if(a<0||r&&o<3)return 0;switch(s){case h.STR:case h.DEX:case h.INT:case h.LUK:return(Math.floor(a/20)+1)*o;case h.STR_DEX:case h.STR_INT:case h.STR_LUK:case h.DEX_INT:case h.DEX_LUK:case h.INT_LUK:return(Math.floor(a/40)+1)*o;case h.PDD:return(Math.floor(a/20)+1)*o;case h.PAD:case h.MAD:if(D.isWeapon(d)){const A=r?[0,0,1,1.4666,2.0166,2.663,3.4166]:[1,2.222,3.63,5.325,7.32,8.777,10.25];let c=t.option(i.incPAD).base;if(d===f.heavySword||d===f.longSword){if(d===f.longSword)switch(c){case 100:c=102;break;case 103:c=105;break;case 105:c=107;break;case 112:c=114;break;case 117:c=121;break;case 135:c=139;break;case 169:c=173;break;case 203:c=207;break;case 293:c=297;break;case 337:c=342;break}const n=a>180?6:a>160?5:a>110?4:3;return Math.ceil(c*A[o-1]*n/100)}else{const n=t.option(i.incMAD).base;if(s===h.MAD&&n>=c&&(c=n),r){const M=a>160?18:a>150?15:a>110?12:9;return Math.ceil(c*A[o-1]*M/100)}else{const M=a>110?4:3;return Math.ceil(c*A[o-1]*M/100)}}}else if(a<60)return 0;return o;case h.MHP:case h.MMP:return a<10?3*o:Math.floor(a/10)*30*o;case h.speed:case h.jump:return D.isWeapon(d)?0:o;case h.damR:return D.isWeapon(d)?o:0;case h.bdR:return a<90||!D.isWeapon(d)?0:2*o;case h.allStatR:return a<70&&!D.isWeapon(d)?0:o;case h.reduceReq:return 5*o;default:return 0}}function p(t){switch(t){case h.STR:return[i.incSTR];case h.DEX:return[i.incDEX];case h.INT:return[i.incINT];case h.LUK:return[i.incLUK];case h.STR_DEX:return[i.incSTR,i.incDEX];case h.STR_INT:return[i.incSTR,i.incINT];case h.STR_LUK:return[i.incSTR,i.incLUK];case h.DEX_INT:return[i.incDEX,i.incINT];case h.DEX_LUK:return[i.incDEX,i.incLUK];case h.INT_LUK:return[i.incINT,i.incLUK];case h.PDD:return[i.incPDD];case h.PAD:return[i.incPAD];case h.MAD:return[i.incMAD];case h.MHP:return[i.incMHP];case h.MMP:return[i.incMMP];case h.speed:return[i.incSpeed];case h.jump:return[i.incJump];case h.damR:return[i.damR];case h.bdR:return[i.bdR];case h.allStatR:return[i.statR];case h.reduceReq:return[i.reduceReq];default:return[]}}const e=25,q=15;function B(t,s=!1){if(t.getBooleanValue(i.incCHUC))return!1;if(t.getBooleanValue(i.superiorEqp))return t0(t);if(t.star>=t.maxStar&&!s||t.star>=e)return!1;t.star+=1;const o=t.star,a=b(t,!1,!1),r=b(t,!1,!0),d=D.isWeapon(t.type)||t.type===f.katara,A=[[i.incSTR,i.incDEX],[i.incINT,i.incLUK],[i.incDEX,i.incSTR],[i.incLUK,i.incDEX],[i.incSTR,i.incDEX]],c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];let n;const M=t.req.job;if(M===0)n=new Set([i.incSTR,i.incDEX,i.incINT,i.incLUK]);else{n=new Set;for(let u=0;u<5;u++)if(M&1<<u)for(const S of A[u])n.add(S)}for(const u of c)(n.has(u)||o>15&&(t.option(u).base>0||t.option(u).upgrade>0))&&(t.option(u).enchant+=a[o]);if(d){const u=M===0||Math.floor(M/2)%2===1||t.option(i.incMAD).upgrade>0;if(o>15)t.option(i.incPAD).enchant+=r[o],u&&(t.option(i.incMAD).enchant+=r[o]);else{const S=t.option(i.incPAD).sum-t.option(i.incPAD).bonus;if(t.option(i.incPAD).enchant+=Math.floor(S/50)+1,u){const y=t.option(i.incMAD).sum-t.option(i.incMAD).bonus;t.option(i.incMAD).enchant+=Math.floor(y/50)+1}}}else t.option(i.incPAD).enchant+=r[o],t.option(i.incMAD).enchant+=r[o],t.type===f.glove&&(M===0?(t.option(i.incPAD).enchant+=E[o],t.option(i.incMAD).enchant+=E[o]):Math.floor(M/2)%2===1?t.option(i.incMAD).enchant+=E[o]:t.option(i.incPAD).enchant+=E[o]);if(!d&&t.type!==f.machineHeart){const u=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;t.option(i.incPDD).enchant+=Math.floor(u/20)+1}const v=[f.cap,f.coat,f.longcoat,f.pants,f.cape,f.ring,f.pendant,f.belt,f.shoulder,f.shield];return d?(t.option(i.incMHP).enchant+=N[o],t.option(i.incMMP).enchant+=N[o]):v.includes(t.type)&&(t.option(i.incMHP).enchant+=N[o]),t.type===f.shoes&&(t.option(i.incSpeed).enchant+=x[o],t.option(i.incJump).enchant+=x[o]),!0}function t0(t){if(t.star>=t.maxStar)return!1;t.star+=1;const s=t.star,o=b(t,!1,!1),a=b(t,!1,!0),r=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const c of r)t.option(c).base>0&&(t.option(c).enchant+=o[s]);const d=[i.incPAD,i.incMAD];for(const c of d)t.option(c).base>0&&(t.option(c).enchant+=a[s]);const A=t.option(i.incPDD).sum-t.option(i.incPDD).bonus;return t.option(i.incPDD).enchant+=Math.floor(A/20)+1,!0}function n0(t,s=!1,o=!1){if(t.getBooleanValue(i.incCHUC)||t.getBooleanValue(i.superiorEqp)||t.req.level>150||t.star>=t.maxStar&&!o||t.star>=q)return!1;t.amazing||(t.amazing=!0,t.maxStar=Math.min(t.maxStar,q)),t.star+=1;const a=t.star,r=b(t,!0,!1),d=b(t,!0,!0),A=D.isWeapon(t.type)||t.type===f.katara,c=[i.incSTR,i.incDEX,i.incINT,i.incLUK];for(const v of c)if(t.option(v).sum>0){let S=r[a];s&&D.isAccessory(t.type)&&(S+=a>5?2:1),t.option(v).enchant+=S}const n=[i.incPAD,i.incMAD];for(const v of n){const u=t.option(v).sum;if(u>0){A&&(t.option(v).enchant+=Math.floor(u/50)+1);let S=d[a];s&&(A||t.type===f.shield)&&(S+=1),t.option(v).enchant+=S}}s&&D.isArmor(t.type)&&(t.option(i.incMHP).enchant+=50);const M=t.option(i.incPDD).sum;return t.option(i.incPDD).enchant+=Math.floor(M/20)+1,!0}function Q(t){if(t.getBooleanValue(i.incCHUC))return!1;t.star=0,t.amazing=!1,t.maxStar=D.getMaxStar(t);for(const[,s]of t.options)s.enchant=0;return!0}function c0(t){if(t.getBooleanValue(i.incCHUC)||t.amazing)return!1;const s=t.star;Q(t);for(let o=0;o<s;o++)B(t,!0);return!0}function b(t,s,o){let a;t.getBooleanValue(i.superiorEqp)?o?a=s0:a=i0:s?o?a=h0:a=r0:o?D.isWeapon(t.type)||t.type===f.katara?a=o0:a=a0:a=f0;const r=t.req.level;for(const d of[...a].reverse())if(r>=d[0])return d;throw Error(`Gear has invalid reqLevel.
2
+ `+t)}const s0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[110,0,0,0,0,0,5,6,7,0,0,0,0,0,0,0],[150,0,0,0,0,0,9,10,11,12,13,15,17,19,21,23]],i0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],o0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6,7,8,9,27,28,29],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6,7,8,9,10,28,29,30],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,7,8,9,10,11,29,30,31],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,8,9,10,11,12,30,31,32],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,9,10,11,12,13,31,32,33],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,10,11,12,13,14,32,33,34],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,14,14,15,16,17,34,35,36],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,16,16,17,18,19,36,37,38]],a0=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7,8,9,10,12,13,15,17],[118,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,13,14,16,18],[128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[148,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22],[158,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,17,19,21,23],[198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,14,15,16,17,19,21,23,25],[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,15,16,17,18,19,21,23,25,27]],f0=[[0,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0],[108,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0],[118,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,0,0,0],[128,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,7,7,7,7,7,7,7,0,0,0],[138,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,9,9,9,9,9,9,9,0,0,0],[148,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,11,11,11,11,11,11,11,0,0,0],[158,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,13,13,13,13,13,13,13,0,0,0],[198,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,15,15,15,15,15,15,15,0,0,0],[248,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,17,17,17,17,17,17,17,0,0,0]],h0=[[0,0,0,0,0,0,1,2,3,4,5,6,8,10,12,14],[80,0,0,0,0,0,2,3,4,5,6,7,9,11,13,15],[90,0,0,0,0,0,3,4,5,6,7,8,10,12,14,16],[100,0,0,0,0,0,4,5,6,7,8,9,11,13,15,17],[110,0,0,0,0,0,5,6,7,8,9,10,12,14,16,18],[120,0,0,0,0,0,6,7,8,9,10,11,13,15,17,19],[130,0,0,0,0,0,7,8,9,10,11,12,14,16,18,20],[140,0,0,0,0,0,8,9,10,11,12,13,15,17,19,21],[150,0,0,0,0,0,9,10,11,12,13,14,16,18,20,22]],r0=[[0,1,2,4,7,11,0,0,0,0,0,0,0,0,0,0],[80,2,3,5,8,12,0,0,0,0,0,0,0,0,0,0],[85,3,4,6,9,13,0,0,0,0,0,0,0,0,0,0],[90,4,5,7,10,14,0,0,0,0,0,0,0,0,0,0],[95,5,6,8,11,15,0,0,0,0,0,0,0,0,0,0],[100,7,8,10,13,17,0,0,0,0,0,0,0,0,0,0],[105,8,9,11,14,18,0,0,0,0,0,0,0,0,0,0],[110,9,10,12,15,19,0,0,0,0,0,0,0,0,0,0],[115,10,11,13,16,20,0,0,0,0,0,0,0,0,0,0],[120,12,13,15,18,22,0,0,0,0,0,0,0,0,0,0],[125,13,14,16,19,23,0,0,0,0,0,0,0,0,0,0],[130,14,15,17,20,24,0,0,0,0,0,0,0,0,0,0],[135,15,16,18,21,25,0,0,0,0,0,0,0,0,0,0],[140,17,18,20,23,27,0,0,0,0,0,0,0,0,0,0],[145,18,19,21,24,28,0,0,0,0,0,0,0,0,0,0],[150,19,20,22,25,29,0,0,0,0,0,0,0,0,0,0]],E=[0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0],N=[0,5,5,5,10,10,15,15,20,20,25,25,25,25,25,25,0,0,0,0,0,0,0,0,0,0],x=[0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0];function Z(t,s,o){if(D.isWeapon(t.type)||t.type===f.katara)return A0(t,s,o);if(t.type===f.glove)return S0(t,s,o);if(D.isArmor(t.type)||t.type===f.shoulder)return M0(t,s,o);if(D.isAccessory(t.type))return v0(t,s,o);if(t.type===f.machineHeart)return b0(t,s,o)}const d0={100:[[1,0],[2,0],[3,1]],70:[[2,0],[3,1],[5,2]],30:[[3,1],[5,2],[7,3]],15:[[5,2],[7,3],[9,4]]},u0={100:[[1,5,1],[2,20,2],[3,30,3]],70:[[2,15,2],[3,40,4],[4,70,5]],30:[[3,30,4],[5,70,7],[7,120,10]],15:[[4,45,6],[7,110,10],[10,170,15]]},W={30:[1,2,3],15:[2,3,4]},_={30:[1,2,3]},D0={100:[0,1,1],70:[1,2,2],30:[2,3,3],15:[3,4,4]},k={100:[1,1,2],70:[2,2,3],30:[3,4,5]},O={100:[1,2,3],70:[2,3,5],30:[3,5,7]},H={[i.incSTR]:i.incPAD,[i.incDEX]:i.incPAD,[i.incINT]:i.incMAD,[i.incLUK]:i.incPAD,[i.incMHP]:i.incPAD,[i.incAllStat]:i.incPAD},R={[i.incSTR]:"힘",[i.incDEX]:"민첩",[i.incINT]:"지력",[i.incLUK]:"운",[i.incMHP]:"체력",[i.incAllStat]:"올스탯",[i.incPAD]:"공격력",[i.incMAD]:"마력"};function g(t){return t.req.level>110?2:t.req.level>70?1:0}function A0(t,s,o){if(s===i.incAllStat)return;const a=g(t);let[r,d]=d0[o][a];const A=H[s],c=R[A];return s===i.incMHP&&(d*=50),{name:d>0?`${o}% ${c}(${R[s]}) 주문서`:`${o}% ${c} 주문서`,option:new Map([[s,d],[A,r]])}}function M0(t,s,o){const a=g(t),[r,d,A]=u0[o][a];let c=[],n=[],M=[];if(s===i.incMHP)n=[[i.incMHP,d+r*50]];else if(n=[[i.incMHP,d]],s===i.incAllStat){if(!(o in W))return;const S=W[o][a];c=[[i.incSTR,S],[i.incDEX,S],[i.incINT,S],[i.incLUK,S]]}else c=[[s,r]];t.upgradeCount===3&&(t.req.job===0?M=[[i.incPAD,1],[i.incMAD,1]]:Math.floor(t.req.job/2)%2===1?M=[[i.incMAD,1]]:M=[[i.incPAD,1]]);const v=`${o}% ${R[s]} 주문서`,u=new Map([...c,...M,...n,[i.incPDD,A]]);return{name:v,option:u}}function S0(t,s,o){const a=g(t),r=D0[o][a];if(r===0)return{name:`${o}% 방어력 주문서`,option:new Map([[i.incPDD,3]])};{const d=H[s];return{name:`${o}% ${R[d]} 주문서`,option:new Map([[d,r]])}}}function v0(t,s,o){if(!(o in k))return;const a=g(t),r=k[o][a];let d=[];if(s===i.incMHP)d=[[i.incMHP,r*50]];else if(s===i.incAllStat){if(!(o in _))return;const n=_[o][a];d=[[i.incSTR,n],[i.incDEX,n],[i.incINT,n],[i.incLUK,n]]}else d=[[s,r]];const A=`${o}% ${R[s]} 주문서`,c=new Map(d);return{name:A,option:c}}function b0(t,s,o){if(!(o in O))return;const a=g(t),r=O[o][a],d=H[s];return{name:`${o}% ${R[s]} 주문서`,option:new Map([[d,r]])}}function R0(t){return t.getBooleanValue(i.blockGoldHammer)||t.getBooleanValue(i.onlyUpgrade)||t.totalUpgradeCount<=0||t.hammerCount>0?!1:(t.hammerCount=1,!0)}function Y(t,s){if(t.upgradeCountLeft<1)return!1;t.upgradeCount+=1;for(const[o,a]of s.option)t.option(o).upgrade+=a;return!0}function w0(t,s,o){const a=Z(t,s,o);return a?Y(t,a):!1}function g0(t){return t.upgradeCountLeft<1?!1:(t.upgradeFailCount+=1,!0)}function E0(t){return t.upgradeFailCount<1?!1:(t.upgradeFailCount-=1,!0)}function C0(t){t.upgradeCount=0,t.upgradeFailCount=0,t.hammerCount=0;for(const[,s]of t.options)s.upgrade=0;return!0}function P(t){const s={};s.id=t.itemID,s.n=t.name,t.desc.length>0&&(s.d=t.desc),s.i=t.icon,t.anvilIcon&&(s.i2=t.anvilIcon),t.anvilName&&(s.n2=t.anvilName),s.t=t.type,s.r=t.req,s.pr=U(t.props,a=>a!==0),s.o=U(t.options,a=>!a.empty,U0),t.totalUpgradeCount>0&&(s.c=t.totalUpgradeCount),t.upgradeCount>0&&(s.up=t.upgradeCount),t.upgradeFailCount>0&&(s.f=t.upgradeFailCount),t.hammerCount>0&&(s.h=t.hammerCount),t.maxStar>0&&(s.m=t.maxStar),t.star>0&&(s.s=t.star),t.amazing&&(s.a=t.amazing),t.karma!==void 0&&(s.k=t.karma),t.canPotential&&(s.cp=t.canPotential),t.grade>0&&(s.g=t.grade),t.grade>0&&t.potentials.length>0&&(s.p=z(t.potentials,void 0,j)),t.additionalGrade>0&&(s.g2=t.additionalGrade),t.additionalGrade>0&&t.additionalPotentials.length>0&&(s.p2=z(t.additionalPotentials,void 0,j));const o=X0(t.soulWeapon);return o&&(s.w=o),s}function U0(t){return[t.base,t.bonus,t.upgrade,t.enchant]}function j(t){return t?{c:t.code,t:t.optionType,l:t.reqLevel,s:t.summary,o:U(t.option,s=>s!==0)}:null}function X0(t){const s={};if(t.enchanted&&(s.e=t.enchanted),t.soul&&(s.s=t.soul),t.charge>0&&(s.c=t.charge),t.chargeOption.size>0&&(s.o=U(t.chargeOption,o=>o!==0)),Object.keys(s).length>0)return s}const m=t=>{const s=c=>typeof c.id=="number"&&typeof c.n=="string"&&(c.d===void 0||typeof c.d=="string")&&typeof c.i=="object"&&c.i!==null&&o(c.i)&&(c.i2===void 0||typeof c.i2=="object"&&c.i2!==null&&o(c.i2))&&(c.n2===void 0||typeof c.n2=="string")&&(c.t===100||c.t===101||c.t===102||c.t===103||c.t===104||c.t===105||c.t===106||c.t===107||c.t===108||c.t===110||c.t===111||c.t===112||c.t===113||c.t===114||c.t===115||c.t===116||c.t===118||c.t===166||c.t===167||c.t===109||c.t===119||c.t===119020||c.t===1212||c.t===1213||c.t===1214||c.t===122||c.t===123||c.t===124||c.t===126||c.t===127||c.t===128||c.t===129||c.t===130||c.t===131||c.t===132||c.t===133||c.t===134||c.t===136||c.t===137||c.t===138||c.t===140||c.t===1404||c.t===141||c.t===142||c.t===143||c.t===144||c.t===145||c.t===146||c.t===147||c.t===148||c.t===149||c.t===150||c.t===151||c.t===152||c.t===153||c.t===156||c.t===157||c.t===158||c.t===159||c.t===1098||c.t===1099||c.t===135200||c.t===135210||c.t===135220||c.t===135221||c.t===135222||c.t===135223||c.t===135224||c.t===135225||c.t===135226||c.t===135227||c.t===135228||c.t===135229||c.t===135240||c.t===135250||c.t===135260||c.t===135270||c.t===135290||c.t===135291||c.t===135292||c.t===135293||c.t===135294||c.t===135295||c.t===135296||c.t===135297||c.t===135298||c.t===135300||c.t===135310||c.t===135320||c.t===135330||c.t===135340||c.t===135350||c.t===135360||c.t===135370||c.t===135380||c.t===135400||c.t===135401||c.t===135402||c.t===135403||c.t===180||c.t===161||c.t===162||c.t===163||c.t===164||c.t===165||c.t===194||c.t===195||c.t===196||c.t===197)&&typeof c.r=="object"&&c.r!==null&&a(c.r)&&Array.isArray(c.pr)&&c.pr.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&Array.isArray(n[1])&&n[1].length===4&&typeof n[1][0]=="number"&&typeof n[1][1]=="number"&&typeof n[1][2]=="number"&&typeof n[1][3]=="number")&&(c.c===void 0||typeof c.c=="number")&&(c.up===void 0||typeof c.up=="number")&&(c.f===void 0||typeof c.f=="number")&&(c.h===void 0||typeof c.h=="number")&&(c.m===void 0||typeof c.m=="number")&&(c.s===void 0||typeof c.s=="number")&&(c.a===void 0||typeof c.a=="boolean")&&(c.k===void 0||typeof c.k=="number")&&(c.cp===void 0||typeof c.cp=="boolean")&&(c.g===void 0||c.g===0||c.g===1||c.g===2||c.g===3||c.g===4||c.g===5)&&(c.p===void 0||Array.isArray(c.p)&&c.p.every(n=>n===null||typeof n=="object"&&n!==null&&r(n)))&&(c.g2===void 0||c.g2===0||c.g2===1||c.g2===2||c.g2===3||c.g2===4||c.g2===5)&&(c.p2===void 0||Array.isArray(c.p2)&&c.p2.every(n=>n===null||typeof n=="object"&&n!==null&&r(n)))&&(c.w===void 0||typeof c.w=="object"&&c.w!==null&&Array.isArray(c.w)===!1&&d(c.w)),o=c=>typeof c.id=="number"&&Array.isArray(c.origin)&&c.origin.length===2&&typeof c.origin[0]=="number"&&typeof c.origin[1]=="number",a=c=>typeof c.level=="number"&&typeof c.str=="number"&&typeof c.luk=="number"&&typeof c.dex=="number"&&typeof c.int=="number"&&typeof c.job=="number"&&typeof c.specJob=="number",r=c=>typeof c.c=="number"&&typeof c.t=="number"&&typeof c.l=="number"&&typeof c.s=="string"&&Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number"),d=c=>(c.e===void 0||typeof c.e=="boolean")&&(c.s===void 0||typeof c.s=="object"&&c.s!==null&&A(c.s))&&(c.c===void 0||typeof c.c=="number")&&(c.o===void 0||Array.isArray(c.o)&&c.o.every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")),A=c=>typeof c.name=="string"&&typeof c.skill=="string"&&c.option instanceof Map&&[...c.option].every(n=>Array.isArray(n)&&n.length===2&&(n[0]===1||n[0]===2||n[0]===3||n[0]===4||n[0]===5||n[0]===6||n[0]===7||n[0]===8||n[0]===9||n[0]===10||n[0]===11||n[0]===12||n[0]===13||n[0]===14||n[0]===15||n[0]===16||n[0]===17||n[0]===18||n[0]===19||n[0]===20||n[0]===21||n[0]===22||n[0]===23||n[0]===24||n[0]===25||n[0]===26||n[0]===27||n[0]===28||n[0]===29||n[0]===30||n[0]===31||n[0]===100||n[0]===101||n[0]===102||n[0]===103||n[0]===104||n[0]===105||n[0]===106||n[0]===107||n[0]===108||n[0]===109||n[0]===110||n[0]===111||n[0]===112||n[0]===113||n[0]===114||n[0]===115||n[0]===116||n[0]===117||n[0]===118||n[0]===119||n[0]===120||n[0]===121||n[0]===122||n[0]===123||n[0]===124||n[0]===125||n[0]===126||n[0]===127||n[0]===128||n[0]===129||n[0]===130||n[0]===131||n[0]===132||n[0]===133||n[0]===134||n[0]===135||n[0]===200||n[0]===201||n[0]===202||n[0]===203||n[0]===1100||n[0]===1101||n[0]===1102||n[0]===1103||n[0]===1104||n[0]===1105||n[0]===1106||n[0]===1107||n[0]===1108||n[0]===1109||n[0]===1110||n[0]===1111||n[0]===1112||n[0]===1113||n[0]===1114||n[0]===1115||n[0]===1116||n[0]===1117||n[0]===1118||n[0]===1119||n[0]===1120||n[0]===1121||n[0]===1122||n[0]===1123||n[0]===1124||n[0]===1125||n[0]===1126)&&typeof n[1]=="number")&&typeof c.multiplier=="number";return typeof t=="object"&&t!==null&&s(t)};function L0(t){return JSON.stringify(P(t))}function N0(t){return K(JSON.parse(t))}function I0(t){try{const s=JSON.parse(t);if(m(s))return K(s)}catch{}return null}function U(t,s,o){let a=[...t];return s&&(a=a.filter(r=>s(r[1]))),o?a.map(r=>[r[0],o(r[1])]):a}function z(t,s,o){let a=t;return s&&(a=a.filter(s)),o?a.map(o):a===t?[...t]:a}function X(t,s){return s?new Map(t.map(o=>[o[0],s(o[1])])):new Map(t)}function V(t,s){return s?[...t].map(s):[...t]}function K(t){const s=new D;return s.itemID=t.id,s.name=t.n,t.d&&(s.desc=t.d),s.icon=t.i,t.i2&&t.n2&&(s.anvilIcon=t.i2,s.anvilName=t.n2),s.type=t.t,s.req=t.r,s.props=X(t.pr),s.options=X(t.o,H0),t.c&&(s.totalUpgradeCount=t.c),t.up&&(s.upgradeCount=t.up),t.f&&(s.upgradeFailCount=t.f),t.h&&(s.hammerCount=t.h),t.m&&(s.maxStar=t.m),t.s&&(s.star=t.s),t.a&&(s.amazing=t.a),t.k&&(s.karma=t.k),t.cp&&(s.canPotential=t.cp),t.g&&(s.grade=t.g),t.p&&(s.potentials=V(t.p,$)),t.g2&&(s.additionalGrade=t.g2),t.p2&&(s.additionalPotentials=V(t.p2,$)),K0(t.w,s),s}function H0(t){const s=new I;return s.base=t[0],s.bonus=t[1],s.upgrade=t[2],s.enchant=t[3],s}function $(t){if(!t)return null;const s=new L;return s.code=t.c,s.optionType=t.t,s.reqLevel=t.l,s.summary=t.s,s.option=X(t.o),s}function K0(t,s){if(t){const o=s.soulWeapon;t?.e&&(o.enchanted=t.e),t?.s&&(o.soul=t.s),t?.c&&(o.charge=t.c),t?.o&&(o.chargeOption=X(t.o))}}exports.BonusStatType=h;exports.Gear=D;exports.GearOption=I;exports.GearPropType=i;exports.GearType=f;exports.Potential=L;exports.PotentialGrade=C;exports.SoulWeapon=F;exports.addAmazingEnhancement=n0;exports.addBonusStat=T;exports.addStarforce=B;exports.addUpgradeFailCount=g0;exports.applyGoldHammer=R0;exports.applyScroll=Y;exports.applySpellTrace=w0;exports.gearToPlain=P;exports.getBonusStatOption=l;exports.getBonusStatValue=J;exports.getSpellTraceScroll=Z;exports.isGearLike=m;exports.parseGear=N0;exports.plainToGear=K;exports.recalculateStarforce=c0;exports.resetBonusStat=G;exports.resetEnhancement=Q;exports.resetUpgrade=C0;exports.restoreUpgradeCount=E0;exports.stringifyGear=L0;exports.validateParseGear=I0;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- class W {
1
+ class $ {
2
2
  constructor() {
3
3
  this.base = 0, this.bonus = 0, this.upgrade = 0, this.enchant = 0;
4
4
  }
@@ -15,8 +15,8 @@ class W {
15
15
  return this.bonus + this.upgrade + this.enchant;
16
16
  }
17
17
  }
18
- var i = /* @__PURE__ */ ((t) => (t[t.incSTR = 1] = "incSTR", t[t.incSTRr = 2] = "incSTRr", t[t.incDEX = 3] = "incDEX", t[t.incDEXr = 4] = "incDEXr", t[t.incINT = 5] = "incINT", t[t.incINTr = 6] = "incINTr", t[t.incLUK = 7] = "incLUK", t[t.incLUKr = 8] = "incLUKr", t[t.incAllStat = 9] = "incAllStat", t[t.incMHP = 10] = "incMHP", t[t.incMMP = 11] = "incMMP", t[t.incMHPr = 12] = "incMHPr", t[t.incMMPr = 13] = "incMMPr", t[t.incMDF = 14] = "incMDF", t[t.incARC = 15] = "incARC", t[t.incAUT = 16] = "incAUT", t[t.incPAD = 17] = "incPAD", t[t.incMAD = 18] = "incMAD", t[t.incAD = 19] = "incAD", t[t.incPDD = 20] = "incPDD", t[t.incSpeed = 21] = "incSpeed", t[t.incJump = 22] = "incJump", t[t.knockback = 23] = "knockback", t[t.bdR = 24] = "bdR", t[t.incBDR = 25] = "incBDR", t[t.imdR = 26] = "imdR", t[t.incIMDR = 27] = "incIMDR", t[t.damR = 28] = "damR", t[t.nbdR = 29] = "nbdR", t[t.statR = 30] = "statR", t[t.incCHUC = 31] = "incCHUC", t[t.incPADr = 100] = "incPADr", t[t.incMADr = 101] = "incMADr", t[t.incPDDr = 102] = "incPDDr", t[t.incCr = 103] = "incCr", t[t.incDAMr = 104] = "incDAMr", t[t.RecoveryHP = 105] = "RecoveryHP", t[t.RecoveryMP = 106] = "RecoveryMP", t[t.face = 107] = "face", t[t.prop = 108] = "prop", t[t.time = 109] = "time", t[t.HP = 110] = "HP", t[t.MP = 111] = "MP", t[t.attackType = 112] = "attackType", t[t.ignoreTargetDEF = 113] = "ignoreTargetDEF", t[t.ignoreDAM = 114] = "ignoreDAM", t[t.ignoreDAMr = 115] = "ignoreDAMr", t[t.DAMreflect = 116] = "DAMreflect", t[t.mpconReduce = 117] = "mpconReduce", t[t.incMesoProp = 118] = "incMesoProp", t[t.incRewardProp = 119] = "incRewardProp", t[t.incAllskill = 120] = "incAllskill", t[t.RecoveryUP = 121] = "RecoveryUP", t[t.boss = 122] = "boss", t[t.level = 123] = "level", t[t.incTerR = 124] = "incTerR", t[t.incAsrR = 125] = "incAsrR", t[t.incEXPr = 126] = "incEXPr", t[t.reduceCooltime = 127] = "reduceCooltime", t[t.incSTRlv = 128] = "incSTRlv", t[t.incDEXlv = 129] = "incDEXlv", t[t.incINTlv = 130] = "incINTlv", t[t.incLUKlv = 131] = "incLUKlv", t[t.incMHPlv = 132] = "incMHPlv", t[t.incPADlv = 133] = "incPADlv", t[t.incMADlv = 134] = "incMADlv", t[t.incCriticaldamage = 135] = "incCriticaldamage", t[t.attackSpeed = 200] = "attackSpeed", t[t.setItemID = 201] = "setItemID", t[t.durability = 202] = "durability", t[t.reduceReq = 203] = "reduceReq", t[t.only = 1100] = "only", t[t.tradeBlock = 1101] = "tradeBlock", t[t.accountSharable = 1102] = "accountSharable", t[t.onlyEquip = 1103] = "onlyEquip", t[t.tradeAvailable = 1104] = "tradeAvailable", t[t.equipTradeBlock = 1105] = "equipTradeBlock", t[t.sharableOnce = 1106] = "sharableOnce", t[t.charismaEXP = 1107] = "charismaEXP", t[t.senseEXP = 1108] = "senseEXP", t[t.insightEXP = 1109] = "insightEXP", t[t.willEXP = 1110] = "willEXP", t[t.craftEXP = 1111] = "craftEXP", t[t.charmEXP = 1112] = "charmEXP", t[t.accountShareTag = 1113] = "accountShareTag", t[t.bossReward = 1114] = "bossReward", t[t.noPotential = 1115] = "noPotential", t[t.fixedPotential = 1116] = "fixedPotential", t[t.specialGrade = 1117] = "specialGrade", t[t.fixedGrade = 1118] = "fixedGrade", t[t.superiorEqp = 1119] = "superiorEqp", t[t.incPQEXPr = 1120] = "incPQEXPr", t[t.jokerToSetItem = 1121] = "jokerToSetItem", t[t.blockGoldHammer = 1122] = "blockGoldHammer", t[t.exceptUpgrade = 1123] = "exceptUpgrade", t[t.onlyUpgrade = 1124] = "onlyUpgrade", t[t.noLookChange = 1125] = "noLookChange", t[t.tucIgnoreForPotential = 1126] = "tucIgnoreForPotential", t))(i || {}), f = /* @__PURE__ */ ((t) => (t[t.cap = 100] = "cap", t[t.faceAccessory = 101] = "faceAccessory", t[t.eyeAccessory = 102] = "eyeAccessory", t[t.earrings = 103] = "earrings", t[t.coat = 104] = "coat", t[t.longcoat = 105] = "longcoat", t[t.pants = 106] = "pants", t[t.shoes = 107] = "shoes", t[t.glove = 108] = "glove", t[t.cape = 110] = "cape", t[t.ring = 111] = "ring", t[t.pendant = 112] = "pendant", t[t.belt = 113] = "belt", t[t.medal = 114] = "medal", t[t.shoulder = 115] = "shoulder", t[t.pocket = 116] = "pocket", t[t.badge = 118] = "badge", t[t.android = 166] = "android", t[t.machineHeart = 167] = "machineHeart", t[t.shield = 109] = "shield", t[t.emblem = 119] = "emblem", t[t.powerSource = 119020] = "powerSource", t[t.shiningRod = 1212] = "shiningRod", t[t.tuner = 1213] = "tuner", t[t.breathShooter = 1214] = "breathShooter", t[t.soulShooter = 122] = "soulShooter", t[t.desperado = 123] = "desperado", t[t.energySword = 124] = "energySword", t[t.espLimiter = 126] = "espLimiter", t[t.chain = 127] = "chain", t[t.magicGauntlet = 128] = "magicGauntlet", t[t.ritualFan = 129] = "ritualFan", t[t.ohSword = 130] = "ohSword", t[t.ohAxe = 131] = "ohAxe", t[t.ohBlunt = 132] = "ohBlunt", t[t.dagger = 133] = "dagger", t[t.katara = 134] = "katara", t[t.cane = 136] = "cane", t[t.wand = 137] = "wand", t[t.staff = 138] = "staff", t[t.thSword = 140] = "thSword", t[t.chakram = 1404] = "chakram", t[t.thAxe = 141] = "thAxe", t[t.thBlunt = 142] = "thBlunt", t[t.spear = 143] = "spear", t[t.polearm = 144] = "polearm", t[t.bow = 145] = "bow", t[t.crossbow = 146] = "crossbow", t[t.claw = 147] = "claw", t[t.knuckle = 148] = "knuckle", t[t.gun = 149] = "gun", t[t.shovel = 150] = "shovel", t[t.pickaxe = 151] = "pickaxe", t[t.dualBowguns = 152] = "dualBowguns", t[t.handCannon = 153] = "handCannon", t[t.heavySword = 156] = "heavySword", t[t.longSword = 157] = "longSword", t[t.gauntletRevolver = 158] = "gauntletRevolver", t[t.ancientBow = 159] = "ancientBow", t[t.soulShield = 1098] = "soulShield", t[t.demonShield = 1099] = "demonShield", t[t.magicArrow = 135200] = "magicArrow", t[t.card = 135210] = "card", t[t.medallion = 135220] = "medallion", t[t.rosary = 135221] = "rosary", t[t.ironChain = 135222] = "ironChain", t[t.magicBook1 = 135223] = "magicBook1", t[t.magicBook2 = 135224] = "magicBook2", t[t.magicBook3 = 135225] = "magicBook3", t[t.arrowFletching = 135226] = "arrowFletching", t[t.bowThimble = 135227] = "bowThimble", t[t.daggerScabbard = 135228] = "daggerScabbard", t[t.charm = 135229] = "charm", t[t.orb = 135240] = "orb", t[t.dragonEssence = 135250] = "dragonEssence", t[t.soulRing = 135260] = "soulRing", t[t.magnum = 135270] = "magnum", t[t.wristBand = 135290] = "wristBand", t[t.farSight = 135291] = "farSight", t[t.powderKeg = 135292] = "powderKeg", t[t.mass = 135293] = "mass", t[t.document = 135294] = "document", t[t.magicMarble = 135295] = "magicMarble", t[t.arrowhead = 135296] = "arrowhead", t[t.jewel = 135297] = "jewel", t[t.powderKeg2 = 135298] = "powderKeg2", t[t.controller = 135300] = "controller", t[t.foxMarble = 135310] = "foxMarble", t[t.chessPiece = 135320] = "chessPiece", t[t.transmitter = 135330] = "transmitter", t[t.charge = 135340] = "charge", t[t.magicWing = 135350] = "magicWing", t[t.pathOfAbyss = 135360] = "pathOfAbyss", t[t.relic = 135370] = "relic", t[t.fanTassel = 135380] = "fanTassel", t[t.bracelet = 135400] = "bracelet", t[t.weaponBelt = 135401] = "weaponBelt", t[t.ornament = 135402] = "ornament", t[t.hexSeeker = 135403] = "hexSeeker", t[t.petEquip = 180] = "petEquip", t[t.machineEngine = 161] = "machineEngine", t[t.machineArms = 162] = "machineArms", t[t.machineLegs = 163] = "machineLegs", t[t.machineBody = 164] = "machineBody", t[t.machineTransistors = 165] = "machineTransistors", t[t.dragonMask = 194] = "dragonMask", t[t.dragonPendant = 195] = "dragonPendant", t[t.dragonWings = 196] = "dragonWings", t[t.dragonTail = 197] = "dragonTail", t))(f || {}), k = /* @__PURE__ */ ((t) => (t[t.normal = 0] = "normal", t[t.rare = 1] = "rare", t[t.epic = 2] = "epic", t[t.unique = 3] = "unique", t[t.legendary = 4] = "legendary", t[t.special = 5] = "special", t))(k || {});
19
- class O {
18
+ var i = /* @__PURE__ */ ((t) => (t[t.incSTR = 1] = "incSTR", t[t.incSTRr = 2] = "incSTRr", t[t.incDEX = 3] = "incDEX", t[t.incDEXr = 4] = "incDEXr", t[t.incINT = 5] = "incINT", t[t.incINTr = 6] = "incINTr", t[t.incLUK = 7] = "incLUK", t[t.incLUKr = 8] = "incLUKr", t[t.incAllStat = 9] = "incAllStat", t[t.incMHP = 10] = "incMHP", t[t.incMMP = 11] = "incMMP", t[t.incMHPr = 12] = "incMHPr", t[t.incMMPr = 13] = "incMMPr", t[t.incMDF = 14] = "incMDF", t[t.incARC = 15] = "incARC", t[t.incAUT = 16] = "incAUT", t[t.incPAD = 17] = "incPAD", t[t.incMAD = 18] = "incMAD", t[t.incAD = 19] = "incAD", t[t.incPDD = 20] = "incPDD", t[t.incSpeed = 21] = "incSpeed", t[t.incJump = 22] = "incJump", t[t.knockback = 23] = "knockback", t[t.bdR = 24] = "bdR", t[t.incBDR = 25] = "incBDR", t[t.imdR = 26] = "imdR", t[t.incIMDR = 27] = "incIMDR", t[t.damR = 28] = "damR", t[t.nbdR = 29] = "nbdR", t[t.statR = 30] = "statR", t[t.incCHUC = 31] = "incCHUC", t[t.incPADr = 100] = "incPADr", t[t.incMADr = 101] = "incMADr", t[t.incPDDr = 102] = "incPDDr", t[t.incCr = 103] = "incCr", t[t.incDAMr = 104] = "incDAMr", t[t.RecoveryHP = 105] = "RecoveryHP", t[t.RecoveryMP = 106] = "RecoveryMP", t[t.face = 107] = "face", t[t.prop = 108] = "prop", t[t.time = 109] = "time", t[t.HP = 110] = "HP", t[t.MP = 111] = "MP", t[t.attackType = 112] = "attackType", t[t.ignoreTargetDEF = 113] = "ignoreTargetDEF", t[t.ignoreDAM = 114] = "ignoreDAM", t[t.ignoreDAMr = 115] = "ignoreDAMr", t[t.DAMreflect = 116] = "DAMreflect", t[t.mpconReduce = 117] = "mpconReduce", t[t.incMesoProp = 118] = "incMesoProp", t[t.incRewardProp = 119] = "incRewardProp", t[t.incAllskill = 120] = "incAllskill", t[t.RecoveryUP = 121] = "RecoveryUP", t[t.boss = 122] = "boss", t[t.level = 123] = "level", t[t.incTerR = 124] = "incTerR", t[t.incAsrR = 125] = "incAsrR", t[t.incEXPr = 126] = "incEXPr", t[t.reduceCooltime = 127] = "reduceCooltime", t[t.incSTRlv = 128] = "incSTRlv", t[t.incDEXlv = 129] = "incDEXlv", t[t.incINTlv = 130] = "incINTlv", t[t.incLUKlv = 131] = "incLUKlv", t[t.incMHPlv = 132] = "incMHPlv", t[t.incPADlv = 133] = "incPADlv", t[t.incMADlv = 134] = "incMADlv", t[t.incCriticaldamage = 135] = "incCriticaldamage", t[t.attackSpeed = 200] = "attackSpeed", t[t.setItemID = 201] = "setItemID", t[t.durability = 202] = "durability", t[t.reduceReq = 203] = "reduceReq", t[t.only = 1100] = "only", t[t.tradeBlock = 1101] = "tradeBlock", t[t.accountSharable = 1102] = "accountSharable", t[t.onlyEquip = 1103] = "onlyEquip", t[t.tradeAvailable = 1104] = "tradeAvailable", t[t.equipTradeBlock = 1105] = "equipTradeBlock", t[t.sharableOnce = 1106] = "sharableOnce", t[t.charismaEXP = 1107] = "charismaEXP", t[t.senseEXP = 1108] = "senseEXP", t[t.insightEXP = 1109] = "insightEXP", t[t.willEXP = 1110] = "willEXP", t[t.craftEXP = 1111] = "craftEXP", t[t.charmEXP = 1112] = "charmEXP", t[t.accountShareTag = 1113] = "accountShareTag", t[t.bossReward = 1114] = "bossReward", t[t.noPotential = 1115] = "noPotential", t[t.fixedPotential = 1116] = "fixedPotential", t[t.specialGrade = 1117] = "specialGrade", t[t.fixedGrade = 1118] = "fixedGrade", t[t.superiorEqp = 1119] = "superiorEqp", t[t.incPQEXPr = 1120] = "incPQEXPr", t[t.jokerToSetItem = 1121] = "jokerToSetItem", t[t.blockGoldHammer = 1122] = "blockGoldHammer", t[t.exceptUpgrade = 1123] = "exceptUpgrade", t[t.onlyUpgrade = 1124] = "onlyUpgrade", t[t.noLookChange = 1125] = "noLookChange", t[t.tucIgnoreForPotential = 1126] = "tucIgnoreForPotential", t))(i || {}), f = /* @__PURE__ */ ((t) => (t[t.cap = 100] = "cap", t[t.faceAccessory = 101] = "faceAccessory", t[t.eyeAccessory = 102] = "eyeAccessory", t[t.earrings = 103] = "earrings", t[t.coat = 104] = "coat", t[t.longcoat = 105] = "longcoat", t[t.pants = 106] = "pants", t[t.shoes = 107] = "shoes", t[t.glove = 108] = "glove", t[t.cape = 110] = "cape", t[t.ring = 111] = "ring", t[t.pendant = 112] = "pendant", t[t.belt = 113] = "belt", t[t.medal = 114] = "medal", t[t.shoulder = 115] = "shoulder", t[t.pocket = 116] = "pocket", t[t.badge = 118] = "badge", t[t.android = 166] = "android", t[t.machineHeart = 167] = "machineHeart", t[t.shield = 109] = "shield", t[t.emblem = 119] = "emblem", t[t.powerSource = 119020] = "powerSource", t[t.shiningRod = 1212] = "shiningRod", t[t.tuner = 1213] = "tuner", t[t.breathShooter = 1214] = "breathShooter", t[t.soulShooter = 122] = "soulShooter", t[t.desperado = 123] = "desperado", t[t.energySword = 124] = "energySword", t[t.espLimiter = 126] = "espLimiter", t[t.chain = 127] = "chain", t[t.magicGauntlet = 128] = "magicGauntlet", t[t.ritualFan = 129] = "ritualFan", t[t.ohSword = 130] = "ohSword", t[t.ohAxe = 131] = "ohAxe", t[t.ohBlunt = 132] = "ohBlunt", t[t.dagger = 133] = "dagger", t[t.katara = 134] = "katara", t[t.cane = 136] = "cane", t[t.wand = 137] = "wand", t[t.staff = 138] = "staff", t[t.thSword = 140] = "thSword", t[t.chakram = 1404] = "chakram", t[t.thAxe = 141] = "thAxe", t[t.thBlunt = 142] = "thBlunt", t[t.spear = 143] = "spear", t[t.polearm = 144] = "polearm", t[t.bow = 145] = "bow", t[t.crossbow = 146] = "crossbow", t[t.claw = 147] = "claw", t[t.knuckle = 148] = "knuckle", t[t.gun = 149] = "gun", t[t.shovel = 150] = "shovel", t[t.pickaxe = 151] = "pickaxe", t[t.dualBowguns = 152] = "dualBowguns", t[t.handCannon = 153] = "handCannon", t[t.heavySword = 156] = "heavySword", t[t.longSword = 157] = "longSword", t[t.gauntletRevolver = 158] = "gauntletRevolver", t[t.ancientBow = 159] = "ancientBow", t[t.soulShield = 1098] = "soulShield", t[t.demonShield = 1099] = "demonShield", t[t.magicArrow = 135200] = "magicArrow", t[t.card = 135210] = "card", t[t.medallion = 135220] = "medallion", t[t.rosary = 135221] = "rosary", t[t.ironChain = 135222] = "ironChain", t[t.magicBook1 = 135223] = "magicBook1", t[t.magicBook2 = 135224] = "magicBook2", t[t.magicBook3 = 135225] = "magicBook3", t[t.arrowFletching = 135226] = "arrowFletching", t[t.bowThimble = 135227] = "bowThimble", t[t.daggerScabbard = 135228] = "daggerScabbard", t[t.charm = 135229] = "charm", t[t.orb = 135240] = "orb", t[t.dragonEssence = 135250] = "dragonEssence", t[t.soulRing = 135260] = "soulRing", t[t.magnum = 135270] = "magnum", t[t.wristBand = 135290] = "wristBand", t[t.farSight = 135291] = "farSight", t[t.powderKeg = 135292] = "powderKeg", t[t.mass = 135293] = "mass", t[t.document = 135294] = "document", t[t.magicMarble = 135295] = "magicMarble", t[t.arrowhead = 135296] = "arrowhead", t[t.jewel = 135297] = "jewel", t[t.powderKeg2 = 135298] = "powderKeg2", t[t.controller = 135300] = "controller", t[t.foxMarble = 135310] = "foxMarble", t[t.chessPiece = 135320] = "chessPiece", t[t.transmitter = 135330] = "transmitter", t[t.charge = 135340] = "charge", t[t.magicWing = 135350] = "magicWing", t[t.pathOfAbyss = 135360] = "pathOfAbyss", t[t.relic = 135370] = "relic", t[t.fanTassel = 135380] = "fanTassel", t[t.bracelet = 135400] = "bracelet", t[t.weaponBelt = 135401] = "weaponBelt", t[t.ornament = 135402] = "ornament", t[t.hexSeeker = 135403] = "hexSeeker", t[t.petEquip = 180] = "petEquip", t[t.machineEngine = 161] = "machineEngine", t[t.machineArms = 162] = "machineArms", t[t.machineLegs = 163] = "machineLegs", t[t.machineBody = 164] = "machineBody", t[t.machineTransistors = 165] = "machineTransistors", t[t.dragonMask = 194] = "dragonMask", t[t.dragonPendant = 195] = "dragonPendant", t[t.dragonWings = 196] = "dragonWings", t[t.dragonTail = 197] = "dragonTail", t))(f || {}), L = /* @__PURE__ */ ((t) => (t[t.normal = 0] = "normal", t[t.rare = 1] = "rare", t[t.epic = 2] = "epic", t[t.unique = 3] = "unique", t[t.legendary = 4] = "legendary", t[t.special = 5] = "special", t))(L || {});
19
+ class J {
20
20
  constructor(s) {
21
21
  this.enchanted = !1, this.charge = 0, this.chargeOption = /* @__PURE__ */ new Map(), this.gear = s;
22
22
  }
@@ -81,9 +81,9 @@ class O {
81
81
  return 5 + s;
82
82
  }
83
83
  }
84
- const g = class {
84
+ const w = class {
85
85
  constructor() {
86
- this.itemID = 0, this.name = "", this.desc = "", this.type = 0, this.props = /* @__PURE__ */ new Map(), this.options = /* @__PURE__ */ new Map(), this.totalUpgradeCount = 0, this.upgradeCount = 0, this.upgradeFailCount = 0, this.hammerCount = 0, this.maxStar = 0, this.star = 0, this.amazing = !1, this.canPotential = !1, this.grade = k.normal, this.potentials = [], this.additionalGrade = k.normal, this.additionalPotentials = [], this.soulWeapon = new O(this), this.icon = {
86
+ this.itemID = 0, this.name = "", this.desc = "", this.type = 0, this.props = /* @__PURE__ */ new Map(), this.options = /* @__PURE__ */ new Map(), this.totalUpgradeCount = 0, this.upgradeCount = 0, this.upgradeFailCount = 0, this.hammerCount = 0, this.maxStar = 0, this.star = 0, this.amazing = !1, this.canPotential = !1, this.grade = L.normal, this.potentials = [], this.additionalGrade = L.normal, this.additionalPotentials = [], this.soulWeapon = new J(this), this.icon = {
87
87
  id: 0,
88
88
  origin: [0, 0]
89
89
  }, this.req = {
@@ -108,7 +108,7 @@ const g = class {
108
108
  get diff() {
109
109
  let t = 0;
110
110
  for (const [s, o] of this.options)
111
- t += Math.floor(o.diff / g.getPropTypeWeight(s));
111
+ t += Math.floor(o.diff / w.getPropTypeWeight(s));
112
112
  return t;
113
113
  }
114
114
  /**
@@ -127,7 +127,7 @@ const g = class {
127
127
  * @returns 장비 옵션 객체. 존재하지 않을 경우 장비에 추가한 뒤 반환합니다.
128
128
  */
129
129
  option(t) {
130
- return this.options.has(t) || this.options.set(t, new W()), this.options.get(t);
130
+ return this.options.has(t) || this.options.set(t, new $()), this.options.get(t);
131
131
  }
132
132
  /**
133
133
  * 지정된 장비 속성 종류과 연결된 값을 가져옵니다.
@@ -290,11 +290,11 @@ const g = class {
290
290
  * 최대 업그레이드 가능 횟수가 `0`이거나 `onlyUpgrade` 속성이 존재하거나 메카닉 장비 또는 드래곤 장비일 경우 `0`입니다.
291
291
  */
292
292
  static getMaxStar(t) {
293
- if (t.totalUpgradeCount <= 0 || t.getBooleanValue(i.onlyUpgrade) || g.isMechanicGear(t.type) || g.isDragonGear(t.type))
293
+ if (t.totalUpgradeCount <= 0 || t.getBooleanValue(i.onlyUpgrade) || w.isMechanicGear(t.type) || w.isDragonGear(t.type))
294
294
  return 0;
295
295
  let s;
296
296
  const o = t.req.level;
297
- for (const a of g.starData)
297
+ for (const a of w.starData)
298
298
  if (o >= a[0])
299
299
  s = a;
300
300
  else
@@ -324,7 +324,7 @@ const g = class {
324
324
  return Number.MAX_VALUE;
325
325
  }
326
326
  };
327
- let A = g;
327
+ let A = w;
328
328
  A.starData = [
329
329
  [0, 5, 3],
330
330
  [95, 8, 5],
@@ -393,25 +393,25 @@ class N {
393
393
  }
394
394
  }
395
395
  var h = /* @__PURE__ */ ((t) => (t[t.STR = 0] = "STR", t[t.DEX = 1] = "DEX", t[t.INT = 2] = "INT", t[t.LUK = 3] = "LUK", t[t.STR_DEX = 4] = "STR_DEX", t[t.STR_INT = 5] = "STR_INT", t[t.STR_LUK = 6] = "STR_LUK", t[t.DEX_INT = 7] = "DEX_INT", t[t.DEX_LUK = 8] = "DEX_LUK", t[t.INT_LUK = 9] = "INT_LUK", t[t.MHP = 10] = "MHP", t[t.MMP = 11] = "MMP", t[t.PAD = 12] = "PAD", t[t.MAD = 13] = "MAD", t[t.PDD = 14] = "PDD", t[t.speed = 15] = "speed", t[t.jump = 16] = "jump", t[t.damR = 17] = "damR", t[t.bdR = 18] = "bdR", t[t.allStatR = 19] = "allStatR", t[t.reduceReq = 20] = "reduceReq", t))(h || {});
396
- function h0(t, s, o) {
397
- const a = F(t, s, o);
396
+ function R0(t, s, o) {
397
+ const a = B(t, s, o);
398
398
  if (a.size === 0)
399
399
  return !1;
400
- for (const [d, u] of a)
401
- t.option(d).bonus += u;
400
+ for (const [d, r] of a)
401
+ t.option(d).bonus += r;
402
402
  return !0;
403
403
  }
404
- function d0(t) {
404
+ function w0(t) {
405
405
  for (const [, s] of t.options)
406
406
  s.bonus = 0;
407
407
  return !0;
408
408
  }
409
- function F(t, s, o) {
410
- const a = B(s), d = J(t, s, o);
411
- return d === 0 ? /* @__PURE__ */ new Map() : new Map(a.map((u) => [u, d]));
409
+ function B(t, s, o) {
410
+ const a = Z(s), d = Q(t, s, o);
411
+ return d === 0 ? /* @__PURE__ */ new Map() : new Map(a.map((r) => [r, d]));
412
412
  }
413
- function J(t, s, o) {
414
- const a = t.req.level, d = t.getBooleanValue(i.bossReward), u = t.type;
413
+ function Q(t, s, o) {
414
+ const a = t.req.level, d = t.getBooleanValue(i.bossReward), r = t.type;
415
415
  if (a < 0 || d && o < 3)
416
416
  return 0;
417
417
  switch (s) {
@@ -431,11 +431,11 @@ function J(t, s, o) {
431
431
  return (Math.floor(a / 20) + 1) * o;
432
432
  case h.PAD:
433
433
  case h.MAD:
434
- if (A.isWeapon(u)) {
435
- const v = d ? [0, 0, 1, 1.4666, 2.0166, 2.663, 3.4166] : [1, 2.222, 3.63, 5.325, 7.32, 8.777, 10.25];
434
+ if (A.isWeapon(r)) {
435
+ const D = d ? [0, 0, 1, 1.4666, 2.0166, 2.663, 3.4166] : [1, 2.222, 3.63, 5.325, 7.32, 8.777, 10.25];
436
436
  let c = t.option(i.incPAD).base;
437
- if (u === f.heavySword || u === f.longSword) {
438
- if (u === f.longSword)
437
+ if (r === f.heavySword || r === f.longSword) {
438
+ if (r === f.longSword)
439
439
  switch (c) {
440
440
  case 100:
441
441
  c = 102;
@@ -469,15 +469,15 @@ function J(t, s, o) {
469
469
  break;
470
470
  }
471
471
  const n = a > 180 ? 6 : a > 160 ? 5 : a > 110 ? 4 : 3;
472
- return Math.ceil(c * v[o - 1] * n / 100);
472
+ return Math.ceil(c * D[o - 1] * n / 100);
473
473
  } else {
474
474
  const n = t.option(i.incMAD).base;
475
475
  if (s === h.MAD && n >= c && (c = n), d) {
476
- const r = a > 160 ? 18 : a > 150 ? 15 : a > 110 ? 12 : 9;
477
- return Math.ceil(c * v[o - 1] * r / 100);
476
+ const M = a > 160 ? 18 : a > 150 ? 15 : a > 110 ? 12 : 9;
477
+ return Math.ceil(c * D[o - 1] * M / 100);
478
478
  } else {
479
- const r = a > 110 ? 4 : 3;
480
- return Math.ceil(c * v[o - 1] * r / 100);
479
+ const M = a > 110 ? 4 : 3;
480
+ return Math.ceil(c * D[o - 1] * M / 100);
481
481
  }
482
482
  }
483
483
  } else if (a < 60)
@@ -488,20 +488,20 @@ function J(t, s, o) {
488
488
  return a < 10 ? 3 * o : Math.floor(a / 10) * 30 * o;
489
489
  case h.speed:
490
490
  case h.jump:
491
- return A.isWeapon(u) ? 0 : o;
491
+ return A.isWeapon(r) ? 0 : o;
492
492
  case h.damR:
493
- return A.isWeapon(u) ? o : 0;
493
+ return A.isWeapon(r) ? o : 0;
494
494
  case h.bdR:
495
- return a < 90 || !A.isWeapon(u) ? 0 : 2 * o;
495
+ return a < 90 || !A.isWeapon(r) ? 0 : 2 * o;
496
496
  case h.allStatR:
497
- return a < 70 && !A.isWeapon(u) ? 0 : o;
497
+ return a < 70 && !A.isWeapon(r) ? 0 : o;
498
498
  case h.reduceReq:
499
499
  return 5 * o;
500
500
  default:
501
501
  return 0;
502
502
  }
503
503
  }
504
- function B(t) {
504
+ function Z(t) {
505
505
  switch (t) {
506
506
  case h.STR:
507
507
  return [i.incSTR];
@@ -549,16 +549,16 @@ function B(t) {
549
549
  return [];
550
550
  }
551
551
  }
552
- const Q = 25, I = 15;
553
- function Z(t, s = !1) {
552
+ const Y = 25, H = 15;
553
+ function l(t, s = !1) {
554
554
  if (t.getBooleanValue(i.incCHUC))
555
555
  return !1;
556
556
  if (t.getBooleanValue(i.superiorEqp))
557
- return Y(t);
558
- if (t.star >= t.maxStar && !s || t.star >= Q)
557
+ return P(t);
558
+ if (t.star >= t.maxStar && !s || t.star >= Y)
559
559
  return !1;
560
560
  t.star += 1;
561
- const o = t.star, a = R(t, !1, !1), d = R(t, !1, !0), u = A.isWeapon(t.type) || t.type === f.katara, v = [
561
+ const o = t.star, a = S(t, !1, !1), d = S(t, !1, !0), r = A.isWeapon(t.type) || t.type === f.katara, D = [
562
562
  [i.incSTR, i.incDEX],
563
563
  [i.incINT, i.incLUK],
564
564
  [i.incDEX, i.incSTR],
@@ -571,8 +571,8 @@ function Z(t, s = !1) {
571
571
  i.incLUK
572
572
  ];
573
573
  let n;
574
- const r = t.req.job;
575
- if (r === 0)
574
+ const M = t.req.job;
575
+ if (M === 0)
576
576
  n = /* @__PURE__ */ new Set([
577
577
  i.incSTR,
578
578
  i.incDEX,
@@ -581,29 +581,29 @@ function Z(t, s = !1) {
581
581
  ]);
582
582
  else {
583
583
  n = /* @__PURE__ */ new Set();
584
- for (let D = 0; D < 5; D++)
585
- if (r & 1 << D)
586
- for (const M of v[D])
587
- n.add(M);
584
+ for (let u = 0; u < 5; u++)
585
+ if (M & 1 << u)
586
+ for (const v of D[u])
587
+ n.add(v);
588
588
  }
589
- for (const D of c)
590
- (n.has(D) || o > 15 && (t.option(D).base > 0 || t.option(D).upgrade > 0)) && (t.option(D).enchant += a[o]);
591
- if (u) {
592
- const D = r === 0 || Math.floor(r / 2) % 2 === 1 || t.option(i.incMAD).upgrade > 0;
589
+ for (const u of c)
590
+ (n.has(u) || o > 15 && (t.option(u).base > 0 || t.option(u).upgrade > 0)) && (t.option(u).enchant += a[o]);
591
+ if (r) {
592
+ const u = M === 0 || Math.floor(M / 2) % 2 === 1 || t.option(i.incMAD).upgrade > 0;
593
593
  if (o > 15)
594
- t.option(i.incPAD).enchant += d[o], D && (t.option(i.incMAD).enchant += d[o]);
594
+ t.option(i.incPAD).enchant += d[o], u && (t.option(i.incMAD).enchant += d[o]);
595
595
  else {
596
- const M = t.option(i.incPAD).sum - t.option(i.incPAD).bonus;
597
- if (t.option(i.incPAD).enchant += Math.floor(M / 50) + 1, D) {
598
- const S = t.option(i.incMAD).sum - t.option(i.incMAD).bonus;
599
- t.option(i.incMAD).enchant += Math.floor(S / 50) + 1;
596
+ const v = t.option(i.incPAD).sum - t.option(i.incPAD).bonus;
597
+ if (t.option(i.incPAD).enchant += Math.floor(v / 50) + 1, u) {
598
+ const F = t.option(i.incMAD).sum - t.option(i.incMAD).bonus;
599
+ t.option(i.incMAD).enchant += Math.floor(F / 50) + 1;
600
600
  }
601
601
  }
602
602
  } else
603
- t.option(i.incPAD).enchant += d[o], t.option(i.incMAD).enchant += d[o], t.type === f.glove && (r === 0 ? (t.option(i.incPAD).enchant += C[o], t.option(i.incMAD).enchant += C[o]) : Math.floor(r / 2) % 2 === 1 ? t.option(i.incMAD).enchant += C[o] : t.option(i.incPAD).enchant += C[o]);
604
- if (!u && t.type !== f.machineHeart) {
605
- const D = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
606
- t.option(i.incPDD).enchant += Math.floor(D / 20) + 1;
603
+ t.option(i.incPAD).enchant += d[o], t.option(i.incMAD).enchant += d[o], t.type === f.glove && (M === 0 ? (t.option(i.incPAD).enchant += E[o], t.option(i.incMAD).enchant += E[o]) : Math.floor(M / 2) % 2 === 1 ? t.option(i.incMAD).enchant += E[o] : t.option(i.incPAD).enchant += E[o]);
604
+ if (!r && t.type !== f.machineHeart) {
605
+ const u = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
606
+ t.option(i.incPDD).enchant += Math.floor(u / 20) + 1;
607
607
  }
608
608
  const b = [
609
609
  f.cap,
@@ -617,13 +617,13 @@ function Z(t, s = !1) {
617
617
  f.shoulder,
618
618
  f.shield
619
619
  ];
620
- return u ? (t.option(i.incMHP).enchant += L[o], t.option(i.incMMP).enchant += L[o]) : b.includes(t.type) && (t.option(i.incMHP).enchant += L[o]), t.type === f.shoes && (t.option(i.incSpeed).enchant += H[o], t.option(i.incJump).enchant += H[o]), !0;
620
+ return r ? (t.option(i.incMHP).enchant += X[o], t.option(i.incMMP).enchant += X[o]) : b.includes(t.type) && (t.option(i.incMHP).enchant += X[o]), t.type === f.shoes && (t.option(i.incSpeed).enchant += K[o], t.option(i.incJump).enchant += K[o]), !0;
621
621
  }
622
- function Y(t) {
622
+ function P(t) {
623
623
  if (t.star >= t.maxStar)
624
624
  return !1;
625
625
  t.star += 1;
626
- const s = t.star, o = R(t, !1, !1), a = R(t, !1, !0), d = [
626
+ const s = t.star, o = S(t, !1, !1), a = S(t, !1, !0), d = [
627
627
  i.incSTR,
628
628
  i.incDEX,
629
629
  i.incINT,
@@ -631,17 +631,17 @@ function Y(t) {
631
631
  ];
632
632
  for (const c of d)
633
633
  t.option(c).base > 0 && (t.option(c).enchant += o[s]);
634
- const u = [i.incPAD, i.incMAD];
635
- for (const c of u)
634
+ const r = [i.incPAD, i.incMAD];
635
+ for (const c of r)
636
636
  t.option(c).base > 0 && (t.option(c).enchant += a[s]);
637
- const v = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
638
- return t.option(i.incPDD).enchant += Math.floor(v / 20) + 1, !0;
637
+ const D = t.option(i.incPDD).sum - t.option(i.incPDD).bonus;
638
+ return t.option(i.incPDD).enchant += Math.floor(D / 20) + 1, !0;
639
639
  }
640
- function u0(t, s = !1, o = !1) {
641
- if (t.getBooleanValue(i.incCHUC) || t.getBooleanValue(i.superiorEqp) || t.req.level > 150 || t.star >= t.maxStar && !o || t.star >= I)
640
+ function g0(t, s = !1, o = !1) {
641
+ if (t.getBooleanValue(i.incCHUC) || t.getBooleanValue(i.superiorEqp) || t.req.level > 150 || t.star >= t.maxStar && !o || t.star >= H)
642
642
  return !1;
643
- t.amazing || (t.amazing = !0, t.maxStar = Math.min(t.maxStar, I)), t.star += 1;
644
- const a = t.star, d = R(t, !0, !1), u = R(t, !0, !0), v = A.isWeapon(t.type) || t.type === f.katara, c = [
643
+ t.amazing || (t.amazing = !0, t.maxStar = Math.min(t.maxStar, H)), t.star += 1;
644
+ const a = t.star, d = S(t, !0, !1), r = S(t, !0, !0), D = A.isWeapon(t.type) || t.type === f.katara, c = [
645
645
  i.incSTR,
646
646
  i.incDEX,
647
647
  i.incINT,
@@ -649,23 +649,23 @@ function u0(t, s = !1, o = !1) {
649
649
  ];
650
650
  for (const b of c)
651
651
  if (t.option(b).sum > 0) {
652
- let M = d[a];
653
- s && A.isAccessory(t.type) && (M += a > 5 ? 2 : 1), t.option(b).enchant += M;
652
+ let v = d[a];
653
+ s && A.isAccessory(t.type) && (v += a > 5 ? 2 : 1), t.option(b).enchant += v;
654
654
  }
655
655
  const n = [i.incPAD, i.incMAD];
656
656
  for (const b of n) {
657
- const D = t.option(b).sum;
658
- if (D > 0) {
659
- v && (t.option(b).enchant += Math.floor(D / 50) + 1);
660
- let M = u[a];
661
- s && (v || t.type === f.shield) && (M += 1), t.option(b).enchant += M;
657
+ const u = t.option(b).sum;
658
+ if (u > 0) {
659
+ D && (t.option(b).enchant += Math.floor(u / 50) + 1);
660
+ let v = r[a];
661
+ s && (D || t.type === f.shield) && (v += 1), t.option(b).enchant += v;
662
662
  }
663
663
  }
664
664
  s && A.isArmor(t.type) && (t.option(i.incMHP).enchant += 50);
665
- const r = t.option(i.incPDD).sum;
666
- return t.option(i.incPDD).enchant += Math.floor(r / 20) + 1, !0;
665
+ const M = t.option(i.incPDD).sum;
666
+ return t.option(i.incPDD).enchant += Math.floor(M / 20) + 1, !0;
667
667
  }
668
- function l(t) {
668
+ function m(t) {
669
669
  if (t.getBooleanValue(i.incCHUC))
670
670
  return !1;
671
671
  t.star = 0, t.amazing = !1, t.maxStar = A.getMaxStar(t);
@@ -673,35 +673,35 @@ function l(t) {
673
673
  s.enchant = 0;
674
674
  return !0;
675
675
  }
676
- function r0(t) {
676
+ function E0(t) {
677
677
  if (t.getBooleanValue(i.incCHUC) || t.amazing)
678
678
  return !1;
679
679
  const s = t.star;
680
- l(t);
680
+ m(t);
681
681
  for (let o = 0; o < s; o++)
682
- Z(t, !0);
682
+ l(t, !0);
683
683
  return !0;
684
684
  }
685
- function R(t, s, o) {
685
+ function S(t, s, o) {
686
686
  let a;
687
- t.getBooleanValue(i.superiorEqp) ? o ? a = P : a = m : s ? o ? a = p : a = e : o ? A.isWeapon(t.type) || t.type === f.katara ? a = y : a = T : a = G;
687
+ t.getBooleanValue(i.superiorEqp) ? o ? a = y : a = T : s ? o ? a = t0 : a = n0 : o ? A.isWeapon(t.type) || t.type === f.katara ? a = G : a = p : a = e;
688
688
  const d = t.req.level;
689
- for (const u of [...a].reverse())
690
- if (d >= u[0])
691
- return u;
689
+ for (const r of [...a].reverse())
690
+ if (d >= r[0])
691
+ return r;
692
692
  throw Error(`Gear has invalid reqLevel.
693
693
  ` + t);
694
694
  }
695
- const P = [
695
+ const y = [
696
696
  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
697
697
  [110, 0, 0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0],
698
698
  [150, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 15, 17, 19, 21, 23]
699
- ], m = [
699
+ ], T = [
700
700
  [0, 1, 2, 4, 7, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
701
701
  [80, 2, 3, 5, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
702
702
  [110, 9, 10, 12, 15, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
703
703
  [150, 19, 20, 22, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
704
- ], y = [
704
+ ], G = [
705
705
  [
706
706
  0,
707
707
  0,
@@ -954,7 +954,7 @@ const P = [
954
954
  37,
955
955
  38
956
956
  ]
957
- ], T = [
957
+ ], p = [
958
958
  [
959
959
  0,
960
960
  0,
@@ -1207,7 +1207,7 @@ const P = [
1207
1207
  25,
1208
1208
  27
1209
1209
  ]
1210
- ], G = [
1210
+ ], e = [
1211
1211
  [
1212
1212
  0,
1213
1213
  2,
@@ -1460,7 +1460,7 @@ const P = [
1460
1460
  0,
1461
1461
  0
1462
1462
  ]
1463
- ], p = [
1463
+ ], t0 = [
1464
1464
  [0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 14],
1465
1465
  [80, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15],
1466
1466
  [90, 0, 0, 0, 0, 0, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16],
@@ -1470,7 +1470,7 @@ const P = [
1470
1470
  [130, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20],
1471
1471
  [140, 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 13, 15, 17, 19, 21],
1472
1472
  [150, 0, 0, 0, 0, 0, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22]
1473
- ], e = [
1473
+ ], n0 = [
1474
1474
  [0, 1, 2, 4, 7, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1475
1475
  [80, 2, 3, 5, 8, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1476
1476
  [85, 3, 4, 6, 9, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -1487,7 +1487,7 @@ const P = [
1487
1487
  [140, 17, 18, 20, 23, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1488
1488
  [145, 18, 19, 21, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
1489
1489
  [150, 19, 20, 22, 25, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1490
- ], C = [
1490
+ ], E = [
1491
1491
  0,
1492
1492
  0,
1493
1493
  0,
@@ -1514,7 +1514,7 @@ const P = [
1514
1514
  0,
1515
1515
  0,
1516
1516
  0
1517
- ], L = [
1517
+ ], X = [
1518
1518
  0,
1519
1519
  5,
1520
1520
  5,
@@ -1541,7 +1541,7 @@ const P = [
1541
1541
  0,
1542
1542
  0,
1543
1543
  0
1544
- ], H = [
1544
+ ], K = [
1545
1545
  0,
1546
1546
  0,
1547
1547
  0,
@@ -1569,239 +1569,236 @@ const P = [
1569
1569
  0,
1570
1570
  0
1571
1571
  ];
1572
- function t0(t, s, o) {
1573
- const a = s === i.incINT ? i.incMAD : i.incPAD, d = t.req.level >= 115 ? 2 : t.req.level >= 75 ? 1 : 0;
1574
- let u;
1575
- const v = a === i.incMAD ? "마력" : "공격력";
1576
- switch (s) {
1577
- case i.incSTR:
1578
- u = "힘";
1579
- break;
1580
- case i.incDEX:
1581
- u = "민첩";
1582
- break;
1583
- case i.incINT:
1584
- u = "지력";
1585
- break;
1586
- case i.incLUK:
1587
- u = "운";
1588
- break;
1589
- case i.incAllStat:
1590
- u = "올스탯";
1591
- break;
1592
- case i.incMHP:
1593
- u = "체력";
1594
- break;
1572
+ function c0(t, s, o) {
1573
+ if (A.isWeapon(t.type) || t.type === f.katara)
1574
+ return a0(t, s, o);
1575
+ if (t.type === f.glove)
1576
+ return h0(t, s, o);
1577
+ if (A.isArmor(t.type) || t.type === f.shoulder)
1578
+ return f0(t, s, o);
1579
+ if (A.isAccessory(t.type))
1580
+ return d0(t, s, o);
1581
+ if (t.type === f.machineHeart)
1582
+ return r0(t, s, o);
1583
+ }
1584
+ const s0 = {
1585
+ 100: [
1586
+ [1, 0],
1587
+ [2, 0],
1588
+ [3, 1]
1589
+ ],
1590
+ 70: [
1591
+ [2, 0],
1592
+ [3, 1],
1593
+ [5, 2]
1594
+ ],
1595
+ 30: [
1596
+ [3, 1],
1597
+ [5, 2],
1598
+ [7, 3]
1599
+ ],
1600
+ 15: [
1601
+ [5, 2],
1602
+ [7, 3],
1603
+ [9, 4]
1604
+ ]
1605
+ }, i0 = {
1606
+ 100: [
1607
+ [1, 5, 1],
1608
+ [2, 20, 2],
1609
+ [3, 30, 3]
1610
+ ],
1611
+ 70: [
1612
+ [2, 15, 2],
1613
+ [3, 40, 4],
1614
+ [4, 70, 5]
1615
+ ],
1616
+ 30: [
1617
+ [3, 30, 4],
1618
+ [5, 70, 7],
1619
+ [7, 120, 10]
1620
+ ],
1621
+ 15: [
1622
+ [4, 45, 6],
1623
+ [7, 110, 10],
1624
+ [10, 170, 15]
1625
+ ]
1626
+ }, q = {
1627
+ 30: [1, 2, 3],
1628
+ 15: [2, 3, 4]
1629
+ }, x = {
1630
+ 30: [1, 2, 3]
1631
+ }, o0 = {
1632
+ 100: [0, 1, 1],
1633
+ 70: [1, 2, 2],
1634
+ 30: [2, 3, 3],
1635
+ 15: [3, 4, 4]
1636
+ }, W = {
1637
+ 100: [1, 1, 2],
1638
+ 70: [2, 2, 3],
1639
+ 30: [3, 4, 5]
1640
+ }, _ = {
1641
+ 100: [1, 2, 3],
1642
+ 70: [2, 3, 5],
1643
+ 30: [3, 5, 7]
1644
+ }, I = {
1645
+ [i.incSTR]: i.incPAD,
1646
+ [i.incDEX]: i.incPAD,
1647
+ [i.incINT]: i.incMAD,
1648
+ [i.incLUK]: i.incPAD,
1649
+ [i.incMHP]: i.incPAD,
1650
+ [i.incAllStat]: i.incPAD
1651
+ }, R = {
1652
+ [i.incSTR]: "힘",
1653
+ [i.incDEX]: "민첩",
1654
+ [i.incINT]: "지력",
1655
+ [i.incLUK]: "운",
1656
+ [i.incMHP]: "체력",
1657
+ [i.incAllStat]: "올스탯",
1658
+ [i.incPAD]: "공격력",
1659
+ [i.incMAD]: "마력"
1660
+ };
1661
+ function g(t) {
1662
+ return t.req.level > 110 ? 2 : t.req.level > 70 ? 1 : 0;
1663
+ }
1664
+ function a0(t, s, o) {
1665
+ if (s === i.incAllStat)
1666
+ return;
1667
+ const a = g(t);
1668
+ let [d, r] = s0[o][a];
1669
+ const D = I[s], c = R[D];
1670
+ return s === i.incMHP && (r *= 50), { name: r > 0 ? `${o}% ${c}(${R[s]}) 주문서` : `${o}% ${c} 주문서`, option: /* @__PURE__ */ new Map([
1671
+ [s, r],
1672
+ [D, d]
1673
+ ]) };
1674
+ }
1675
+ function f0(t, s, o) {
1676
+ const a = g(t), [d, r, D] = i0[o][a];
1677
+ let c = [], n = [], M = [];
1678
+ if (s === i.incMHP)
1679
+ n = [[i.incMHP, r + d * 50]];
1680
+ else if (n = [[i.incMHP, r]], s === i.incAllStat) {
1681
+ if (!(o in q))
1682
+ return;
1683
+ const v = q[o][a];
1684
+ c = [
1685
+ [i.incSTR, v],
1686
+ [i.incDEX, v],
1687
+ [i.incINT, v],
1688
+ [i.incLUK, v]
1689
+ ];
1690
+ } else
1691
+ c = [[s, d]];
1692
+ t.upgradeCount === 3 && (t.req.job === 0 ? M = [
1693
+ [i.incPAD, 1],
1694
+ [i.incMAD, 1]
1695
+ ] : Math.floor(t.req.job / 2) % 2 === 1 ? M = [[i.incMAD, 1]] : M = [[i.incPAD, 1]]);
1696
+ const b = `${o}% ${R[s]} 주문서`, u = new Map([
1697
+ ...c,
1698
+ ...M,
1699
+ ...n,
1700
+ [i.incPDD, D]
1701
+ ]);
1702
+ return { name: b, option: u };
1703
+ }
1704
+ function h0(t, s, o) {
1705
+ const a = g(t), d = o0[o][a];
1706
+ if (d === 0)
1707
+ return {
1708
+ name: `${o}% 방어력 주문서`,
1709
+ option: /* @__PURE__ */ new Map([[i.incPDD, 3]])
1710
+ };
1711
+ {
1712
+ const r = I[s];
1713
+ return {
1714
+ name: `${o}% ${R[r]} 주문서`,
1715
+ option: /* @__PURE__ */ new Map([[r, d]])
1716
+ };
1595
1717
  }
1596
- if (A.isWeapon(t.type) || t.type === f.katara) {
1597
- if (s === i.incAllStat)
1718
+ }
1719
+ function d0(t, s, o) {
1720
+ if (!(o in W))
1721
+ return;
1722
+ const a = g(t), d = W[o][a];
1723
+ let r = [];
1724
+ if (s === i.incMHP)
1725
+ r = [[i.incMHP, d * 50]];
1726
+ else if (s === i.incAllStat) {
1727
+ if (!(o in x))
1598
1728
  return;
1599
- let c;
1600
- switch (o) {
1601
- case 100:
1602
- c = [
1603
- [1, 0],
1604
- [2, 0],
1605
- [3, 1]
1606
- ];
1607
- break;
1608
- case 70:
1609
- c = [
1610
- [2, 0],
1611
- [3, 1],
1612
- [5, 2]
1613
- ];
1614
- break;
1615
- case 30:
1616
- c = [
1617
- [3, 1],
1618
- [5, 2],
1619
- [7, 3]
1620
- ];
1621
- break;
1622
- case 15:
1623
- c = [
1624
- [5, 2],
1625
- [7, 3],
1626
- [9, 4]
1627
- ];
1628
- break;
1629
- }
1630
- const n = c[d][0], r = c[d][1] * (s === i.incMHP ? 50 : 1);
1631
- return { name: r > 0 ? `${o}% ${v}(${u}) 주문서` : `${o}% ${v} 주문서`, stat: /* @__PURE__ */ new Map([
1632
- [s, r],
1633
- [a, n]
1634
- ]) };
1635
- } else if (o === 15)
1729
+ const n = x[o][a];
1730
+ r = [
1731
+ [i.incSTR, n],
1732
+ [i.incDEX, n],
1733
+ [i.incINT, n],
1734
+ [i.incLUK, n]
1735
+ ];
1736
+ } else
1737
+ r = [[s, d]];
1738
+ const D = `${o}% ${R[s]} 주문서`, c = new Map(r);
1739
+ return { name: D, option: c };
1740
+ }
1741
+ function r0(t, s, o) {
1742
+ if (!(o in _))
1636
1743
  return;
1637
- if (t.type === f.glove) {
1638
- let c;
1639
- switch (o) {
1640
- case 100:
1641
- c = [0, 1, 1];
1642
- break;
1643
- case 70:
1644
- c = [1, 2, 2];
1645
- break;
1646
- case 30:
1647
- c = [2, 3, 3];
1648
- break;
1649
- }
1650
- const n = c[d];
1651
- let r, b;
1652
- return n === 0 ? (r = `${o}% 방어력 주문서`, b = /* @__PURE__ */ new Map([[i.incPDD, 3]])) : (r = `${o}% ${v} 주문서`, b = /* @__PURE__ */ new Map([[a, n]])), { name: r, stat: b };
1653
- }
1654
- if (A.isArmor(t.type) || t.type === f.shoulder) {
1655
- if (s === i.incAllStat) {
1656
- if (o !== 30)
1657
- return;
1658
- const S = [
1659
- [1, 30, 4],
1660
- [2, 70, 7],
1661
- [3, 120, 10]
1662
- ], w = S[d][0], j = S[d][1], $ = S[d][2], z = `${o}% ${u} 주문서`, E = /* @__PURE__ */ new Map([
1663
- [i.incSTR, w],
1664
- [i.incDEX, w],
1665
- [i.incINT, w],
1666
- [i.incLUK, w],
1667
- [i.incMHP, j],
1668
- [i.incPDD, $]
1669
- ]);
1670
- return t.upgradeCount === 3 && (t.req.job === 0 ? (E.set(i.incMAD, 1), E.set(i.incPAD, 1)) : Math.floor(t.req.job / 2) % 2 === 1 ? E.set(i.incMAD, 1) : E.set(i.incPAD, 1)), { name: z, stat: E };
1671
- }
1672
- let c;
1673
- switch (o) {
1674
- case 100:
1675
- c = [
1676
- [1, 5, 1],
1677
- [2, 20, 2],
1678
- [3, 30, 3]
1679
- ];
1680
- break;
1681
- case 70:
1682
- c = [
1683
- [2, 15, 2],
1684
- [3, 40, 4],
1685
- [4, 70, 5]
1686
- ];
1687
- break;
1688
- case 30:
1689
- c = [
1690
- [3, 30, 4],
1691
- [5, 70, 7],
1692
- [7, 120, 10]
1693
- ];
1694
- break;
1695
- }
1696
- const n = s !== i.incMHP ? c[d][0] : 0, r = c[d][1] + (s === i.incMHP ? c[d][0] * 50 : 0), b = c[d][2], D = `${o}% ${u} 주문서`, M = /* @__PURE__ */ new Map([
1697
- [i.incMHP, r],
1698
- [i.incPDD, b]
1699
- ]);
1700
- return n > 0 && M.set(s, n), t.upgradeCount === 3 && (t.req.job === 0 ? (M.set(i.incMAD, 1), M.set(i.incPAD, 1)) : Math.floor(t.req.job / 2) % 2 === 1 ? M.set(i.incMAD, 1) : M.set(i.incPAD, 1)), { name: D, stat: M };
1701
- }
1702
- if (A.isAccessory(t.type)) {
1703
- if (s === i.incAllStat) {
1704
- if (o !== 30)
1705
- return;
1706
- const M = [
1707
- [1, 30, 4],
1708
- [2, 70, 7],
1709
- [3, 120, 10]
1710
- ][d][0], S = `${o}% ${u} 주문서`, w = /* @__PURE__ */ new Map([
1711
- [i.incSTR, M],
1712
- [i.incDEX, M],
1713
- [i.incINT, M],
1714
- [i.incLUK, M]
1715
- ]);
1716
- return { name: S, stat: w };
1717
- }
1718
- let c;
1719
- switch (o) {
1720
- case 100:
1721
- c = [1, 1, 2];
1722
- break;
1723
- case 70:
1724
- c = [2, 2, 3];
1725
- break;
1726
- case 30:
1727
- c = [3, 4, 5];
1728
- break;
1729
- }
1730
- const n = c[d] * (s === i.incMHP ? 50 : 1);
1731
- return { name: `${o}% ${u} 주문서`, stat: /* @__PURE__ */ new Map([[s, n]]) };
1732
- }
1733
- if (t.type === f.machineHeart) {
1734
- let c;
1735
- switch (o) {
1736
- case 100:
1737
- c = [1, 2, 3];
1738
- break;
1739
- case 70:
1740
- c = [2, 3, 5];
1741
- break;
1742
- case 30:
1743
- c = [3, 5, 7];
1744
- break;
1745
- }
1746
- const n = c[d];
1747
- return { name: `${o}% ${u} 주문서`, stat: /* @__PURE__ */ new Map([[a, n]]) };
1748
- }
1744
+ const a = g(t), d = _[o][a], r = I[s];
1745
+ return { name: `${o}% ${R[s]} 주문서`, option: /* @__PURE__ */ new Map([[r, d]]) };
1749
1746
  }
1750
- function D0(t) {
1747
+ function C0(t) {
1751
1748
  return t.getBooleanValue(i.blockGoldHammer) || t.getBooleanValue(i.onlyUpgrade) || t.totalUpgradeCount <= 0 || t.hammerCount > 0 ? !1 : (t.hammerCount = 1, !0);
1752
1749
  }
1753
- function n0(t, s) {
1750
+ function u0(t, s) {
1754
1751
  if (t.upgradeCountLeft < 1)
1755
1752
  return !1;
1756
1753
  t.upgradeCount += 1;
1757
- for (const [o, a] of s.stat)
1754
+ for (const [o, a] of s.option)
1758
1755
  t.option(o).upgrade += a;
1759
1756
  return !0;
1760
1757
  }
1761
- function M0(t, s, o) {
1762
- const a = t0(t, s, o);
1763
- return a ? n0(t, a) : !1;
1758
+ function U0(t, s, o) {
1759
+ const a = c0(t, s, o);
1760
+ return a ? u0(t, a) : !1;
1764
1761
  }
1765
- function A0(t) {
1762
+ function X0(t) {
1766
1763
  return t.upgradeCountLeft < 1 ? !1 : (t.upgradeFailCount += 1, !0);
1767
1764
  }
1768
- function b0(t) {
1765
+ function L0(t) {
1769
1766
  return t.upgradeFailCount < 1 ? !1 : (t.upgradeFailCount -= 1, !0);
1770
1767
  }
1771
- function v0(t) {
1768
+ function N0(t) {
1772
1769
  t.upgradeCount = 0, t.upgradeFailCount = 0, t.hammerCount = 0;
1773
1770
  for (const [, s] of t.options)
1774
1771
  s.upgrade = 0;
1775
1772
  return !0;
1776
1773
  }
1777
- function c0(t) {
1774
+ function D0(t) {
1778
1775
  const s = {};
1779
- s.id = t.itemID, s.n = t.name, t.desc.length > 0 && (s.d = t.desc), s.i = t.icon, t.anvilIcon && (s.i2 = t.anvilIcon), t.anvilName && (s.n2 = t.anvilName), s.t = t.type, s.r = t.req, s.pr = U(t.props, (a) => a !== 0), s.o = U(t.options, (a) => !a.empty, s0), t.totalUpgradeCount > 0 && (s.c = t.totalUpgradeCount), t.upgradeCount > 0 && (s.up = t.upgradeCount), t.upgradeFailCount > 0 && (s.f = t.upgradeFailCount), t.hammerCount > 0 && (s.h = t.hammerCount), t.maxStar > 0 && (s.m = t.maxStar), t.star > 0 && (s.s = t.star), t.amazing && (s.a = t.amazing), t.karma !== void 0 && (s.k = t.karma), t.canPotential && (s.cp = t.canPotential), t.grade > 0 && (s.g = t.grade), t.grade > 0 && t.potentials.length > 0 && (s.p = K(t.potentials, void 0, q)), t.additionalGrade > 0 && (s.g2 = t.additionalGrade), t.additionalGrade > 0 && t.additionalPotentials.length > 0 && (s.p2 = K(
1776
+ s.id = t.itemID, s.n = t.name, t.desc.length > 0 && (s.d = t.desc), s.i = t.icon, t.anvilIcon && (s.i2 = t.anvilIcon), t.anvilName && (s.n2 = t.anvilName), s.t = t.type, s.r = t.req, s.pr = C(t.props, (a) => a !== 0), s.o = C(t.options, (a) => !a.empty, A0), t.totalUpgradeCount > 0 && (s.c = t.totalUpgradeCount), t.upgradeCount > 0 && (s.up = t.upgradeCount), t.upgradeFailCount > 0 && (s.f = t.upgradeFailCount), t.hammerCount > 0 && (s.h = t.hammerCount), t.maxStar > 0 && (s.m = t.maxStar), t.star > 0 && (s.s = t.star), t.amazing && (s.a = t.amazing), t.karma !== void 0 && (s.k = t.karma), t.canPotential && (s.cp = t.canPotential), t.grade > 0 && (s.g = t.grade), t.grade > 0 && t.potentials.length > 0 && (s.p = j(t.potentials, void 0, k)), t.additionalGrade > 0 && (s.g2 = t.additionalGrade), t.additionalGrade > 0 && t.additionalPotentials.length > 0 && (s.p2 = j(
1780
1777
  t.additionalPotentials,
1781
1778
  void 0,
1782
- q
1779
+ k
1783
1780
  ));
1784
- const o = i0(t.soulWeapon);
1781
+ const o = M0(t.soulWeapon);
1785
1782
  return o && (s.w = o), s;
1786
1783
  }
1787
- function s0(t) {
1784
+ function A0(t) {
1788
1785
  return [t.base, t.bonus, t.upgrade, t.enchant];
1789
1786
  }
1790
- function q(t) {
1787
+ function k(t) {
1791
1788
  return t ? {
1792
1789
  c: t.code,
1793
1790
  t: t.optionType,
1794
1791
  l: t.reqLevel,
1795
1792
  s: t.summary,
1796
- o: U(t.option, (s) => s !== 0)
1793
+ o: C(t.option, (s) => s !== 0)
1797
1794
  } : null;
1798
1795
  }
1799
- function i0(t) {
1796
+ function M0(t) {
1800
1797
  const s = {};
1801
- if (t.enchanted && (s.e = t.enchanted), t.soul && (s.s = t.soul), t.charge > 0 && (s.c = t.charge), t.chargeOption.size > 0 && (s.o = U(t.chargeOption, (o) => o !== 0)), Object.keys(s).length > 0)
1798
+ if (t.enchanted && (s.e = t.enchanted), t.soul && (s.s = t.soul), t.charge > 0 && (s.c = t.charge), t.chargeOption.size > 0 && (s.o = C(t.chargeOption, (o) => o !== 0)), Object.keys(s).length > 0)
1802
1799
  return s;
1803
1800
  }
1804
- const o0 = (t) => {
1801
+ const v0 = (t) => {
1805
1802
  const s = (c) => typeof c.id == "number" && typeof c.n == "string" && (c.d === void 0 || typeof c.d == "string") && typeof c.i == "object" && c.i !== null && o(c.i) && (c.i2 === void 0 || typeof c.i2 == "object" && c.i2 !== null && o(c.i2)) && (c.n2 === void 0 || typeof c.n2 == "string") && (c.t === 100 || c.t === 101 || c.t === 102 || c.t === 103 || c.t === 104 || c.t === 105 || c.t === 106 || c.t === 107 || c.t === 108 || c.t === 110 || c.t === 111 || c.t === 112 || c.t === 113 || c.t === 114 || c.t === 115 || c.t === 116 || c.t === 118 || c.t === 166 || c.t === 167 || c.t === 109 || c.t === 119 || c.t === 119020 || c.t === 1212 || c.t === 1213 || c.t === 1214 || c.t === 122 || c.t === 123 || c.t === 124 || c.t === 126 || c.t === 127 || c.t === 128 || c.t === 129 || c.t === 130 || c.t === 131 || c.t === 132 || c.t === 133 || c.t === 134 || c.t === 136 || c.t === 137 || c.t === 138 || c.t === 140 || c.t === 1404 || c.t === 141 || c.t === 142 || c.t === 143 || c.t === 144 || c.t === 145 || c.t === 146 || c.t === 147 || c.t === 148 || c.t === 149 || c.t === 150 || c.t === 151 || c.t === 152 || c.t === 153 || c.t === 156 || c.t === 157 || c.t === 158 || c.t === 159 || c.t === 1098 || c.t === 1099 || c.t === 135200 || c.t === 135210 || c.t === 135220 || c.t === 135221 || c.t === 135222 || c.t === 135223 || c.t === 135224 || c.t === 135225 || c.t === 135226 || c.t === 135227 || c.t === 135228 || c.t === 135229 || c.t === 135240 || c.t === 135250 || c.t === 135260 || c.t === 135270 || c.t === 135290 || c.t === 135291 || c.t === 135292 || c.t === 135293 || c.t === 135294 || c.t === 135295 || c.t === 135296 || c.t === 135297 || c.t === 135298 || c.t === 135300 || c.t === 135310 || c.t === 135320 || c.t === 135330 || c.t === 135340 || c.t === 135350 || c.t === 135360 || c.t === 135370 || c.t === 135380 || c.t === 135400 || c.t === 135401 || c.t === 135402 || c.t === 135403 || c.t === 180 || c.t === 161 || c.t === 162 || c.t === 163 || c.t === 164 || c.t === 165 || c.t === 194 || c.t === 195 || c.t === 196 || c.t === 197) && typeof c.r == "object" && c.r !== null && a(c.r) && Array.isArray(c.pr) && c.pr.every(
1806
1803
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1807
1804
  ) && Array.isArray(c.o) && c.o.every(
@@ -1810,87 +1807,92 @@ const o0 = (t) => {
1810
1807
  (n) => n === null || typeof n == "object" && n !== null && d(n)
1811
1808
  )) && (c.g2 === void 0 || c.g2 === 0 || c.g2 === 1 || c.g2 === 2 || c.g2 === 3 || c.g2 === 4 || c.g2 === 5) && (c.p2 === void 0 || Array.isArray(c.p2) && c.p2.every(
1812
1809
  (n) => n === null || typeof n == "object" && n !== null && d(n)
1813
- )) && (c.w === void 0 || typeof c.w == "object" && c.w !== null && Array.isArray(c.w) === !1 && u(c.w)), o = (c) => typeof c.id == "number" && Array.isArray(c.origin) && c.origin.length === 2 && typeof c.origin[0] == "number" && typeof c.origin[1] == "number", a = (c) => typeof c.level == "number" && typeof c.str == "number" && typeof c.luk == "number" && typeof c.dex == "number" && typeof c.int == "number" && typeof c.job == "number" && typeof c.specJob == "number", d = (c) => typeof c.c == "number" && typeof c.t == "number" && typeof c.l == "number" && typeof c.s == "string" && Array.isArray(c.o) && c.o.every(
1810
+ )) && (c.w === void 0 || typeof c.w == "object" && c.w !== null && Array.isArray(c.w) === !1 && r(c.w)), o = (c) => typeof c.id == "number" && Array.isArray(c.origin) && c.origin.length === 2 && typeof c.origin[0] == "number" && typeof c.origin[1] == "number", a = (c) => typeof c.level == "number" && typeof c.str == "number" && typeof c.luk == "number" && typeof c.dex == "number" && typeof c.int == "number" && typeof c.job == "number" && typeof c.specJob == "number", d = (c) => typeof c.c == "number" && typeof c.t == "number" && typeof c.l == "number" && typeof c.s == "string" && Array.isArray(c.o) && c.o.every(
1814
1811
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1815
- ), u = (c) => (c.e === void 0 || typeof c.e == "boolean") && (c.s === void 0 || typeof c.s == "object" && c.s !== null && v(c.s)) && (c.c === void 0 || typeof c.c == "number") && (c.o === void 0 || Array.isArray(c.o) && c.o.every(
1812
+ ), r = (c) => (c.e === void 0 || typeof c.e == "boolean") && (c.s === void 0 || typeof c.s == "object" && c.s !== null && D(c.s)) && (c.c === void 0 || typeof c.c == "number") && (c.o === void 0 || Array.isArray(c.o) && c.o.every(
1816
1813
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1817
- )), v = (c) => typeof c.name == "string" && typeof c.skill == "string" && c.option instanceof Map && [...c.option].every(
1814
+ )), D = (c) => typeof c.name == "string" && typeof c.skill == "string" && c.option instanceof Map && [...c.option].every(
1818
1815
  (n) => Array.isArray(n) && n.length === 2 && (n[0] === 1 || n[0] === 2 || n[0] === 3 || n[0] === 4 || n[0] === 5 || n[0] === 6 || n[0] === 7 || n[0] === 8 || n[0] === 9 || n[0] === 10 || n[0] === 11 || n[0] === 12 || n[0] === 13 || n[0] === 14 || n[0] === 15 || n[0] === 16 || n[0] === 17 || n[0] === 18 || n[0] === 19 || n[0] === 20 || n[0] === 21 || n[0] === 22 || n[0] === 23 || n[0] === 24 || n[0] === 25 || n[0] === 26 || n[0] === 27 || n[0] === 28 || n[0] === 29 || n[0] === 30 || n[0] === 31 || n[0] === 100 || n[0] === 101 || n[0] === 102 || n[0] === 103 || n[0] === 104 || n[0] === 105 || n[0] === 106 || n[0] === 107 || n[0] === 108 || n[0] === 109 || n[0] === 110 || n[0] === 111 || n[0] === 112 || n[0] === 113 || n[0] === 114 || n[0] === 115 || n[0] === 116 || n[0] === 117 || n[0] === 118 || n[0] === 119 || n[0] === 120 || n[0] === 121 || n[0] === 122 || n[0] === 123 || n[0] === 124 || n[0] === 125 || n[0] === 126 || n[0] === 127 || n[0] === 128 || n[0] === 129 || n[0] === 130 || n[0] === 131 || n[0] === 132 || n[0] === 133 || n[0] === 134 || n[0] === 135 || n[0] === 200 || n[0] === 201 || n[0] === 202 || n[0] === 203 || n[0] === 1100 || n[0] === 1101 || n[0] === 1102 || n[0] === 1103 || n[0] === 1104 || n[0] === 1105 || n[0] === 1106 || n[0] === 1107 || n[0] === 1108 || n[0] === 1109 || n[0] === 1110 || n[0] === 1111 || n[0] === 1112 || n[0] === 1113 || n[0] === 1114 || n[0] === 1115 || n[0] === 1116 || n[0] === 1117 || n[0] === 1118 || n[0] === 1119 || n[0] === 1120 || n[0] === 1121 || n[0] === 1122 || n[0] === 1123 || n[0] === 1124 || n[0] === 1125 || n[0] === 1126) && typeof n[1] == "number"
1819
1816
  ) && typeof c.multiplier == "number";
1820
1817
  return typeof t == "object" && t !== null && s(t);
1821
1818
  };
1822
- function S0(t) {
1823
- return JSON.stringify(c0(t));
1819
+ function I0(t) {
1820
+ return JSON.stringify(D0(t));
1824
1821
  }
1825
- function w0(t) {
1826
- return _(JSON.parse(t));
1822
+ function H0(t) {
1823
+ return V(JSON.parse(t));
1827
1824
  }
1828
- function R0(t) {
1829
- const s = JSON.parse(t);
1830
- return o0(s) ? _(s) : null;
1825
+ function K0(t) {
1826
+ try {
1827
+ const s = JSON.parse(t);
1828
+ if (v0(s))
1829
+ return V(s);
1830
+ } catch {
1831
+ }
1832
+ return null;
1831
1833
  }
1832
- function U(t, s, o) {
1834
+ function C(t, s, o) {
1833
1835
  let a = [...t];
1834
1836
  return s && (a = a.filter((d) => s(d[1]))), o ? a.map((d) => [d[0], o(d[1])]) : a;
1835
1837
  }
1836
- function K(t, s, o) {
1838
+ function j(t, s, o) {
1837
1839
  let a = t;
1838
1840
  return s && (a = a.filter(s)), o ? a.map(o) : a === t ? [...t] : a;
1839
1841
  }
1840
- function X(t, s) {
1842
+ function U(t, s) {
1841
1843
  return s ? new Map(t.map((o) => [o[0], s(o[1])])) : new Map(t);
1842
1844
  }
1843
- function x(t, s) {
1845
+ function z(t, s) {
1844
1846
  return s ? [...t].map(s) : [...t];
1845
1847
  }
1846
- function _(t) {
1848
+ function V(t) {
1847
1849
  const s = new A();
1848
- return s.itemID = t.id, s.name = t.n, t.d && (s.desc = t.d), s.icon = t.i, t.i2 && t.n2 && (s.anvilIcon = t.i2, s.anvilName = t.n2), s.type = t.t, s.req = t.r, s.props = X(t.pr), s.options = X(t.o, a0), t.c && (s.totalUpgradeCount = t.c), t.up && (s.upgradeCount = t.up), t.f && (s.upgradeFailCount = t.f), t.h && (s.hammerCount = t.h), t.m && (s.maxStar = t.m), t.s && (s.star = t.s), t.a && (s.amazing = t.a), t.k && (s.karma = t.k), t.cp && (s.canPotential = t.cp), t.g && (s.grade = t.g), t.p && (s.potentials = x(t.p, V)), t.g2 && (s.additionalGrade = t.g2), t.p2 && (s.additionalPotentials = x(t.p2, V)), f0(t.w, s), s;
1850
+ return s.itemID = t.id, s.name = t.n, t.d && (s.desc = t.d), s.icon = t.i, t.i2 && t.n2 && (s.anvilIcon = t.i2, s.anvilName = t.n2), s.type = t.t, s.req = t.r, s.props = U(t.pr), s.options = U(t.o, b0), t.c && (s.totalUpgradeCount = t.c), t.up && (s.upgradeCount = t.up), t.f && (s.upgradeFailCount = t.f), t.h && (s.hammerCount = t.h), t.m && (s.maxStar = t.m), t.s && (s.star = t.s), t.a && (s.amazing = t.a), t.k && (s.karma = t.k), t.cp && (s.canPotential = t.cp), t.g && (s.grade = t.g), t.p && (s.potentials = z(t.p, O)), t.g2 && (s.additionalGrade = t.g2), t.p2 && (s.additionalPotentials = z(t.p2, O)), S0(t.w, s), s;
1849
1851
  }
1850
- function a0(t) {
1851
- const s = new W();
1852
+ function b0(t) {
1853
+ const s = new $();
1852
1854
  return s.base = t[0], s.bonus = t[1], s.upgrade = t[2], s.enchant = t[3], s;
1853
1855
  }
1854
- function V(t) {
1856
+ function O(t) {
1855
1857
  if (!t)
1856
1858
  return null;
1857
1859
  const s = new N();
1858
- return s.code = t.c, s.optionType = t.t, s.reqLevel = t.l, s.summary = t.s, s.option = X(t.o), s;
1860
+ return s.code = t.c, s.optionType = t.t, s.reqLevel = t.l, s.summary = t.s, s.option = U(t.o), s;
1859
1861
  }
1860
- function f0(t, s) {
1862
+ function S0(t, s) {
1861
1863
  if (t) {
1862
1864
  const o = s.soulWeapon;
1863
- t?.e && (o.enchanted = t.e), t?.s && (o.soul = t.s), t?.c && (o.charge = t.c), t?.o && (o.chargeOption = X(t.o));
1865
+ t?.e && (o.enchanted = t.e), t?.s && (o.soul = t.s), t?.c && (o.charge = t.c), t?.o && (o.chargeOption = U(t.o));
1864
1866
  }
1865
1867
  }
1866
1868
  export {
1867
1869
  h as BonusStatType,
1868
1870
  A as Gear,
1869
- W as GearOption,
1871
+ $ as GearOption,
1870
1872
  i as GearPropType,
1871
1873
  f as GearType,
1872
1874
  N as Potential,
1873
- k as PotentialGrade,
1874
- O as SoulWeapon,
1875
- u0 as addAmazingEnhancement,
1876
- h0 as addBonusStat,
1877
- Z as addStarforce,
1878
- A0 as addUpgradeFailCount,
1879
- D0 as applyGoldHammer,
1880
- n0 as applyScroll,
1881
- M0 as applySpellTrace,
1882
- c0 as gearToPlain,
1883
- F as getBonusStatOption,
1884
- J as getBonusStatValue,
1885
- t0 as getSpellTraceScroll,
1886
- o0 as isGearLike,
1887
- w0 as parseGear,
1888
- _ as plainToGear,
1889
- r0 as recalculateStarforce,
1890
- d0 as resetBonusStat,
1891
- l as resetEnhancement,
1892
- v0 as resetUpgrade,
1893
- b0 as restoreUpgradeCount,
1894
- S0 as stringifyGear,
1895
- R0 as validateParseGear
1875
+ L as PotentialGrade,
1876
+ J as SoulWeapon,
1877
+ g0 as addAmazingEnhancement,
1878
+ R0 as addBonusStat,
1879
+ l as addStarforce,
1880
+ X0 as addUpgradeFailCount,
1881
+ C0 as applyGoldHammer,
1882
+ u0 as applyScroll,
1883
+ U0 as applySpellTrace,
1884
+ D0 as gearToPlain,
1885
+ B as getBonusStatOption,
1886
+ Q as getBonusStatValue,
1887
+ c0 as getSpellTraceScroll,
1888
+ v0 as isGearLike,
1889
+ H0 as parseGear,
1890
+ V as plainToGear,
1891
+ E0 as recalculateStarforce,
1892
+ w0 as resetBonusStat,
1893
+ m as resetEnhancement,
1894
+ N0 as resetUpgrade,
1895
+ L0 as restoreUpgradeCount,
1896
+ I0 as stringifyGear,
1897
+ K0 as validateParseGear
1896
1898
  };
@@ -13,9 +13,9 @@ export type SpellTraceStatType = GearPropType.incSTR | GearPropType.incDEX | Gea
13
13
  */
14
14
  export interface Scroll {
15
15
  /** 주문서 이름 */
16
- name: string;
16
+ name?: string;
17
17
  /** 주문서 옵션 */
18
- stat: Map<GearPropType, number>;
18
+ option: Map<GearPropType, number>;
19
19
  }
20
20
  /**
21
21
  * 주문의 흔적 주문서를 생성합니다.
@@ -14,7 +14,7 @@ export declare function parseGear(like: string): Gear;
14
14
  /**
15
15
  * 문자열을 장비로 변환합니다. 입력을 검사하고 `JSON.parse`를 사용합니다.
16
16
  * @param gear 변환할 문자열.
17
- * @returns 장비. 입력이 잘못되었을 경우 `null`을 반환합니다.
17
+ * @returns 장비. 입력이 올바른 JSON이 아니거나 `GearLike`가 아닐 경우 `null`을 반환합니다.
18
18
  */
19
19
  export declare function validateParseGear(maybe: string): Gear | null;
20
20
  export declare function serializeMap<K, V>(map: Map<K, V>, filterFunc?: (val: V) => boolean): [K, V][];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malib/gear",
3
- "version": "0.10.1",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",