diff --git a/bundle/modules/dsa5.js b/bundle/modules/dsa5.js index 0d1070ac..ca7f1f1a 100644 --- a/bundle/modules/dsa5.js +++ b/bundle/modules/dsa5.js @@ -40,14 +40,14 @@ var tr=Object.defineProperty;var u=(o,e)=>tr(o,"name",{value:e,configurable:!0}) ${c.armorPen?" data-armorPen="+c.armorPen:""} ${c.selected?" selected":""}> ${c.name} [${c.value}] - `;$(this._element).find(".modifiers select").html(l)}else r.length>0&&(r.parent().remove(),this.position.height-=86,this.setPosition(this.position))}}changeSpecAbVariant(e){e.stopPropagation(),e.preventDefault();let t=g.getSpeaker(this.dialogData.speaker);if(t){let s=Number(e.currentTarget.dataset.current)+1;s>=Number(e.currentTarget.dataset.variantcount)&&(s=0),e.currentTarget.dataset.current=s,$(e.currentTarget).text(["A","B","C"][s]);let i=$(e.currentTarget).closest(".specAbs")[0],n=t.items.get(i.dataset.id),r=`effect.value${["","2","3"][s]}`,l=D.specAbsDataset([n],t,this.dialogData.mode,r)[0];i.dataset.dmmalus=l.dmmalus||0,i.dataset.atbonus=l.atbonus||0,i.dataset.tpbonus=l.tpbonus||0,i.dataset.pabonus=l.pabonus||0,this.setCombatSpecTooltip(i),this.calculateModifier()}}async close(e={}){return clearInterval(this.checkTargets),await super.close(e)}_postItem(e){e.stopPropagation();let t=$(e.currentTarget).closest(".specAbs"),a=t.attr("data-actor"),s=t.attr("data-id");return game.actors.get(a).items.get(s).postItem(),!1}recallSettings(e,t,a,s){return super.recallSettings(e,t,a,s),this.prepareWeapon(),this}syncSituationalModifiers(e,t=""){let a=0;for(let s of e.situationalModifiers)s.value!=null&&(a+=s.type==t||t==""&&s.type==null?Number(s.value):0);return a}prepareWeapon(e=void 0){e=e||this.dialogData.renderData;let t=this.dialogData.source;if(["meleeweapon","rangeweapon"].includes(t.type)){let a=g.getSpeaker(this.dialogData.speaker);if(a){let s=t.system.combatskill.value,i,n=O._calculateCombatSkillValues(a.items.find(r=>r.type=="combatskill"&&r.name==s).toObject(),a.system,{step:this.syncSituationalModifiers(e,"step"),[this.dialogData.mode]:this.syncSituationalModifiers(e,this.dialogData.mode)});switch(t.type){case"meleeweapon":i=O._prepareMeleeWeapon(t,[n],a);break;case"rangeweapon":i=O._prepareRangeWeapon(t,[],[n],a);break}this.dialogData.mode=="attack"||this.dialogData.counterAttack?this.dialogData.rollValue=i.attack:this.dialogData.mode=="parry"&&(this.dialogData.rollValue=i.parry)}else t.type=="dodge"?this.dialogData.rollValue=t.system.value:this.dialogData.mode=="attack"||this.dialogData.counterAttack?this.dialogData.rollValue=Number(t.system.at.value):this.dialogData.mode=="parry"&&(this.dialogData.rollValue=Number(t.system.pa))}}async prepareFormRecall(e){await super.prepareFormRecall(e);let t=g.getSpeaker(this.dialogData.speaker);ne.lightLevel(t,e);let a=H.isRiding(t),s=e.find('[name="advantageousPosition"]')[0];if(this.dialogData.mode=="attack"){let i=Array.from(game.user.targets).some(r=>H.isRiding(r.actor));s&&(i||a)&&(s.checked=a&&!i);let n=e.find('[name="mountedOptions"]')[0];if(a&&n){let r=H.getHorse(t);r&&(n.selectedIndex=H.horseSpeedModifier(r))}}else if(this.dialogData.mode=="parry"&&t.flags.oppose){let i=g.getSpeaker(t.flags.oppose.speaker),n=H.isRiding(i);s&&(n||a)&&(s.checked=a&&!n)}await this.calculateModifier()}static assassinationModifiers(e,t){let a=t.assassinate;if(!a||a=="-")return[];e.opposingWeaponSize=0;let s=t.advantageousPosition?2:0,i=b.meleeRangesArray.indexOf(t.weaponsize),n=game.i18n.localize(`DIALOG.${a}`),r=[{name:n,value:10-s-i}];if(a=="assassinate"){let l=b.meleeRangesArray.indexOf(e.source.system.reach.value);!N.isYieldedTwohanded(e.source)&&e.source.system.worn?.wrongGrip&&(l=Math.min(l,1));let c=Math.max(1,new Roll(e.source.system.damage.value.replace(/[DWw]/g,"d")).terms.reduce((p,f)=>p+(f.faces?f.number:0),0))-1,d=[2,0,-2,-4][l]-c*2,m=Math.max(1,5-l-c);r.push({name:n+" ("+game.i18n.localize("CHARAbbrev.damage")+")",damageBonus:d,value:0,step:1},{name:n+" (*)",damageBonus:`*${m}`,value:0,step:1})}else e.source.effects||(e.source.effects=[]),e.source.effects.find(l=>l._id==n)||e.source.effects.push({_id:n,changes:[],disabled:!1,duration:{},icon:"icons/svg/aura.svg",name:n,transfer:!0,flags:{dsa5:{description:n,resistRoll:`${game.i18n.localize("LocalizedIDs.selfControl")} -3`,hideOnToken:!1,hidePlayers:!1,customDuration:"",advancedFunction:"1",args0:"unconscious",args1:""}}});return r}static isMelee(e){return e.type=="meleeweapon"||e.type=="dodge"||e.type=="trait"&&ca(e,"system.traitType.value")=="meleeAttack"}async calculateModifier(){if(this.dialogData.mode=="damage")return;let e=this.dialogData.source,t={source:this.dialogData.source,extra:{options:{}}},a=g.getSpeaker(this.dialogData.speaker);o.isMelee(e)?o.resolveMeleeDialog(t,{},this.element,a,{},this.dialogData.renderData.multipleDefenseValue??-3,this.dialogData.mode):o.resolveRangeDialog(t,{},this.element,a,{},this.dialogData.mode),this.prepareWeapon(t),this.dialogData.modifier=await R._situationalModifiers(t);let s=R._situationalMultipliers(t);this.updateRollButton(this.readTargets(),s)}static getNarrowSpaceModifier(e,t){return t?N.isShield(e.source)?ca(b.narrowSpaceModifiers,`shield${e.source.system.reach.shieldSize}.${t}`)||0:ca(b.narrowSpaceModifiers,`weapon${e.source.system.reach.value}.${t}`)||0:0}static resolveMeleeDialog(e,t,a,s,i,n,r){this._resolveDefault(e,t,a,i);let l=new FormDataExtended(a.find("form")[0]).object,c=o.targetIsSwarm(e),d=s.isSwarm();e.opposingWeaponSize=d?0:l.weaponsize,e.attackOfOpportunity=this.attackOfOpportunity(e.situationalModifiers,l),e.extra.attackFromBehind=Number(l.attackFromBehind)||0,e.situationalModifiers.push(D.parseValueType(game.i18n.localize("sight"),l.vision||0),{name:game.i18n.localize("MODS.attackFromBehind"),value:e.extra.attackFromBehind},{name:game.i18n.localize("MODS.damage"),damageBonus:l.damageModifier,value:0,step:1},{name:game.i18n.format("defenseCount",{malus:n}),value:(Number(l.defenseCount)||0)*n},{name:game.i18n.localize("MODS.wrongHand"),value:Number(l.wrongHand)||0},{name:game.i18n.localize("MODS.advantageousPosition"),value:Number(l.advantageousPosition)||0},{name:game.i18n.localize("sizeCategory"),value:c?0:b.meleeSizeModifier[l.size]||0},...D.getSpecAbModifiers(a,r),...this.assassinationModifiers(e,l),{name:game.i18n.localize("MODS.narrowSpace"),value:Number(l.narrowSpace)||0},{name:game.i18n.localize("MODS.doubleAttack"),value:Number(l.doubleAttack)||0}),e.situationalModifiers.some(m=>m.name==game.i18n.localize("LocalizedIDs.counterAttack"))&&(e.mode="attack",e.extra.counterAttack=!0)}static resolveRangeDialog(e,t,a,s,i){this._resolveDefault(e,t,a,i);let n=new FormDataExtended(a.find("form")[0]).object,r=Number(n.quickChange)||0,l=Number(n.size)||0,c=a.find('[name="distance"] option:selected')[0].dataset;e.situationalModifiers.push({name:game.i18n.localize("MODS.targetMovement")+" "+a.find('[name="targetMovement"] option:selected').text(),value:Number(n.targetMovement)||0},{name:game.i18n.localize("shooter")+" "+a.find('[name="shooterMovement"] option:selected').text(),value:Number(n.shooterMovement)||0},{name:game.i18n.localize("mount")+" "+a.find('[name="mountedOptions"] option:selected').text(),value:Number(n.mountedOptions)||0},{name:game.i18n.localize("MODS.quickChange"),value:r},{name:game.i18n.localize("MODS.combatTurmoil"),value:Number(n.combatTurmoil)||0},{name:game.i18n.localize("MODS.aim"),value:Math.min(Number(n.aim)||0,4)},{name:game.i18n.localize("MODS.damage"),damageBonus:n.damageModifier,value:0,step:1},{name:game.i18n.localize("sight"),value:Number(n.vision)||0},{name:game.i18n.localize("sizeCategory"),value:l},{name:game.i18n.localize("distance"),value:c.attack,damageBonus:c.damage},...D.getSpecAbModifiers(a,"attack"));let d=s.items.find(m=>m.type=="specialability"&&m.name==game.i18n.localize("LocalizedIDs.sharpshooter"));if(d){let m=ca(e.source,"system.combatskill.value")?.toLowerCase();if(m&&d.system.list.value.split(/;|,/).map(p=>p.trim().toLowerCase()).includes(m)){let p=[n.targetMovement,n.shooterMovement,n.mountedOptions,r,l,c],f=Math.abs(p.reduce((y,k)=>(Number(k)<0&&(y+=Number(k)),y),0)),h=Math.min(Number(d.system.step.value)*2,f);h&&e.situationalModifiers.push({name:game.i18n.localize("LocalizedIDs.sharpshooter"),value:h})}}}static _resolveDefault(e,t,a,s){t.rollMode=a.find('[name="rollMode"]:checked').val(),e.situationalModifiers=O._parseModifiers(a),Ks(e.extra.options,s)}static targetIsSwarm(){let e=!1;return game.user.targets.forEach(t=>{if(t.actor?.isSwarm()){e=!0;return}}),e}static attackOfOpportunity(e,t){let a=Number(t.opportunityAttack)||0;if(a){e.push({name:game.i18n.localize("MODS.opportunityAttack"),value:a});let s=game.i18n.localize("LocalizedIDs.enemySense"),i=game.i18n.localize("LocalizedIDs.winhallStyle");game.user.targets.forEach(n=>{for(let r of n.actor?.items||[])r.type=="specialability"&&(r.name==s?e.push({name:s,value:-4}):r.name==i&&e.push({name:i,value:-2}))})}return a!=0}static getRollButtons(e,t,a,s){let i=ae.getRollButtons(e,t,a,s);if(e.source.type=="rangeweapon"||e.source.type=="trait"&&e.source.system.traitType.value=="rangeAttack"){let n=e.source.type=="trait"?Number(e.source.system.reloadTime.value):O.calcLZ(e.source,e.extra.actor),r=e.source.system.reloadTime.progress;r{let l=await g.getSpeaker(e.extra.speaker);await l.updateEmbeddedDocuments("Item",[{_id:e.source._id,"system.reloadTime.progress":r+1}]);let c=game.i18n.format("WEAPON.isReloading",{actor:l.token?.name||l.prototypeToken.name,item:e.source.name,status:`${r+1}/${n}`});await ChatMessage.create(g.chatDataSetup(c))},"callback")}})}return i}};var{mergeObject:Ys}=foundry.utils,Ot=class extends de{static{u(this,"DSA5SkillDialog")}static getRollButtons(e,t,a,s){let i=ae.getRollButtons(e,t,a,s);i.rollButton.label=game.i18n.localize("Opposed");let n={nonOpposedButton:{label:game.i18n.localize("Roll"),callback:u(r=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,r),e.opposable=!1,a(t.callback(r))},"callback")},routineRoll:{label:game.i18n.localize("ROLL.routine"),callback:u(r=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,r),e.routine=!0,Ys(e.extra.options,{cheat:!0,predefinedResult:[{val:2,index:0},{val:2,index:1},{val:2,index:2}]}),a(t.callback(r))},"callback")}};return Ys(n,i),n}activateListeners(e){super.activateListeners(e),e.on("change","input,select",s=>this.rememberFormData(s));let t=this.readTargets(),a=this;this.checkTargets=setInterval(function(){t=a.compareTargets(e,t)},500),this.rememberFormData(),e.on("mousedown",".quantity-click",s=>this.rememberFormData(s)),e.find(".modifiers option").mousedown(s=>{this.rememberFormData(s)})}rememberFormData(e){let t=new FormDataExtended(this.element.find("form")[0]).object;t.situationalModifiers=O._parseModifiers(this._element),this.calculateRoutine(t)}async calculateRoutine(e){let t=g.getSpeaker(this.dialogData.speaker),a=this.element.find(".routineRoll");if(!t)return a.prop("disabled",!0);let s=!0;for(let m=0;m<3;m++)if(t.system.characteristics[e[`characteristics${m}`]].max*e[`ch${m}`].max<13){s=!1;break}let i=Number(this.dialogData.source.system.talentValue.value)+e.fw+await R._situationalModifiers(e,"FW"),n=b.skillDifficultyModifiers[e.testDifficulty]+await R._situationalModifiers(e),r=Math.clamp(10-n*3,1,19),l=i>=r,c=s&&l,d=game.i18n.localize("ROLL.routine");a.prop("disabled",!c),a.html(c?`${d} (${game.i18n.localize("CHARAbbrev.FW")} ${Math.round(i/2)})`:d),this.calculateProbability(t,this.dialogData.source,n,i)}static get defaultOptions(){let e=super.defaultOptions;return Ys(e,{width:700,resizable:!0}),e}};var{mergeObject:Dn}=foundry.utils,ae=class o extends de{static{u(this,"DSA5Dialog")}static getDialogForItem(e,t){let a=e.extra.actor,s=e.source.type;switch(s){case"rangeweapon":case"meleeweapon":case"dodge":case"trait":return t.rollModifiers=fe.setData(a,s,e,t),fe;case"spell":case"ritual":case"liturgy":case"ceremony":return t.rollModifiers=Se.setData(a,s,t),Se;case"skill":return Ot}return o}static getRollButtons(e,t,a,s){let i={rollButton:{label:game.i18n.localize("Roll"),callback:u(n=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,n),a(t.callback(n))},"callback")}};return game.user.isGM&&Dn(i,{cheat:{label:game.i18n.localize("DIALOG.cheat"),callback:u(n=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,n),a(t.callback(n,{cheat:!0}))},"callback")}}),i}activateListeners(e){super.activateListeners(e),e.find(".dieButton").click(t=>{let a=$(t.currentTarget);a.attr("data-single")=="true"&&a.closest(".dialog-content").find(".dieButton").removeClass("dieSelected"),a.toggleClass("dieSelected")})}static get defaultOptions(){let e=super.defaultOptions;return Dn(e,{resizable:!0}),e}};var he=class extends te{static{u(this,"TraitRulesDSA5")}static async traitAdded(e,t){b.addTraitRules[t.name]&&await b.addTraitRules[t.name](e,t)}static hasTrait(e,t){return super.hasItem(e,t,["trait"])}};Hooks.on("setup",()=>{let o=game.i18n.localize("LocalizedIDs.familiar");b.addTraitRules[o]=async(e,t)=>{t.effects.length==0&&(t.effects=[{changes:[{key:"system.status.wounds.gearmodifier",mode:2,value:10},{key:"system.status.soulpower.gearmodifier",mode:2,value:1},{key:"system.status.toughness.gearmodifier",mode:2,value:1},{key:"system.status.astralenergy.gearmodifier",mode:2,value:15},{key:"system.characteristics.mu.gearmodifier",mode:2,value:1},{key:"system.characteristics.kl.gearmodifier",mode:2,value:1},{key:"system.characteristics.in.gearmodifier",mode:2,value:1},{key:"system.characteristics.ch.gearmodifier",mode:2,value:1},{key:"system.characteristics.ff.gearmodifier",mode:2,value:1},{key:"system.characteristics.ge.gearmodifier",mode:2,value:1},{key:"system.characteristics.ko.gearmodifier",mode:2,value:1},{key:"system.characteristics.kk.gearmodifier",mode:2,value:1},{key:"system.totalArmor",mode:2,value:1}],duration:{},icon:"icons/svg/aura.svg",name:o,transfer:!0,flags:{dsa5:{description:o,hideOnToken:!0,hidePlayers:!1}}}]);let a=game.i18n.localize("LocalizedIDs.witchSense");if(!te.hasItem(e,a,["trait"])){let s=await g.findAnyItem([{name:a,type:"trait"}]);await e.createEmbeddedDocuments("Item",s)}}});var{mergeObject:Mn,getProperty:Dr}=foundry.utils,ke=class o extends Dialog{static{u(this,"DialogReactDSA5")}static async showDialog(e){let t=this.callbackResult;new o({title:game.i18n.localize("Unopposed"),content:await this.getTemplate(e),default:"ok",buttons:{ok:{icon:'',label:game.i18n.localize("ok"),callback:u(a=>{t(a.find('[name="entryselection"]').val(),e)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}}}).render(!0)}activateListeners(e){super.activateListeners(e),e.find(".select2").select2()}static getTargetActor(e){if(!canvas.tokens)return{};let t=e.flags.unopposeData.targetSpeaker,a=g.getSpeaker(t);return a?{actor:a,tokenId:t.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}static async getTemplate(e){return""}static callbackResult(e,t,a){}static get defaultOptions(){let e=super.defaultOptions;return Mn(e,{resizable:!0}),e}},yt=class extends ke{static{u(this,"ReactToSkillDialog")}static async getTemplate(e){let s=game.messages.get(e.flags.unopposeData.attackMessageId).flags.data.preData.source.name,i=(await g.allSkillsList()).map(n=>({name:n,id:n}));return i.unshift({name:game.i18n.localize("doNothing"),id:"doNothing"}),renderTemplate("systems/dsa5/templates/dialog/dialog-act.html",{items:i,original:s,title:"DIALOG.selectReaction"})}static callbackResult(e,t){let{actor:a,tokenId:s}=ke.getTargetActor(t);if(e=="doNothing")ee.resolveUndefended(t);else{let i=a.items.find(n=>n.name==e&&n.type=="skill");i&&a.setupSkill(i,{},s).then(n=>{a.basicTest(n)})}}},bt=class o extends Dialog{static{u(this,"ActAttackDialog")}static async showDialog(e,t){let a=new o({title:game.i18n.localize("attacktest"),content:await this.getTemplate(e),buttons:{}});a.actor=e,a.tokenId=t,a.render(!0)}activateListeners(e){super.activateListeners(e),e.find(".reactClick").click(t=>{this.callbackResult(t.currentTarget.dataset,this.actor,this.tokenId),this.close()})}static async getTemplate(e){let t=e.items.filter(r=>r.type=="combatskill").map(r=>O._calculateCombatSkillValues(r.toObject(),e.system)),a=t.find(r=>r.name==game.i18n.localize("LocalizedIDs.wrestle")),s=[{name:game.i18n.localize("attackWeaponless"),id:"attackWeaponless",img:"systems/dsa5/icons/categories/attack_weaponless.webp",value:a.system.attack.value}],i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"];for(let r of e.items)if(i.includes(r.type)&&r.system.worn.value==!0){let l=r.type=="meleeweapon"?O._prepareMeleeWeapon(r.toObject(),t,e):O._prepareRangeWeapon(r.toObject(),[],t,e);s.push({name:r.name,id:r.name,img:r.img,value:l.attack,item:l});for(let[c,d]of Object.entries(l.subweapons||{}))s.push({name:d.name,id:r.name,subweapon:c,img:r.img,value:d.attack,item:d})}else r.type=="trait"&&n.includes(r.system.traitType.value)&&s.push({name:r.name,id:r.name,img:r.img,value:r.system.at.value});return await renderTemplate("systems/dsa5/templates/dialog/dialog-reaction-attack.html",{dieClass:"die-mu",items:s,title:"DIALOG.selectAction"})}callbackResult(e,t,a){if(e.value=="attackWeaponless")t.setupWeaponless("attack",{},a).then(s=>{t.basicTest(s)});else{let s=["meleeweapon","trait","rangeweapon"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.value);e.subweapon&&(i=O.buildSubweapon(i,e.subweapon)),i&&t.setupWeapon(i,"attack",{},a).then(n=>{t.basicTest(n)})}}static get defaultOptions(){let e=super.defaultOptions;return e.width=550,e}},kt=class o extends ke{static{u(this,"ReactToAttackDialog")}static async showDialog(e){let t=new o({title:game.i18n.localize("Unopposed"),content:await this.getTemplate(e),buttons:{}});t.startMessage=e,t.render(!0)}static getAttackActor(e){if(!canvas.tokens)return{};let t=e.flags.unopposeData.attackMessageId,s=game.messages.get(t).flags.data.preData.extra.speaker,i=g.getSpeaker(s);return i?{actor:i,tokenId:s.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}activateListeners(e){super.activateListeners(e),e.find(".reactClick").click(t=>{this.callbackResult(t.currentTarget.dataset.value,this.startMessage),this.close()})}static get defaultOptions(){let e=super.defaultOptions;return Mn(e,{width:550}),e}static async getTemplate(e){let{actor:t,tokenId:a}=ke.getTargetActor(e),s=o.getAttackActor(e),i=t.items.filter(d=>d.type=="combatskill").map(d=>O._calculateCombatSkillValues(d.toObject(),t.system)),n=i.find(d=>d.name==game.i18n.localize("LocalizedIDs.wrestle")),r=[{name:game.i18n.localize("doNothing"),id:"doNothing",img:"systems/dsa5/icons/categories/disease.webp"},{name:game.i18n.localize("dodge"),id:"dodge",img:"systems/dsa5/icons/categories/Dodge.webp",value:t.system.status.dodge.max},{name:game.i18n.localize("parryWeaponless"),id:"parryWeaponless",img:"systems/dsa5/icons/categories/attack_weaponless.webp",value:n.system.parry.value}],l=0,c="";if(t){let d=["meleeweapon"];for(let m of t.items)if(d.includes(m.type)&&m.system.worn.value==!0){let p=O._prepareMeleeWeapon(m.toObject(),i,t);r.push({name:m.name,id:m.name,img:m.img,value:p.parry})}else m.type=="trait"&&Number(m.system.pa)>0&&r.push({name:m.name,id:m.name,img:m.img,value:m.system.pa});if(s){let m=Dr(s.actor.system,"status.size.value");m=="big"?c="DIALOGDESCRIPTION.bigEnemy":m=="giant"&&(c="DIALOGDESCRIPTION.giantEnemy")}game.combat&&(l=await game.combat.getDefenseCount({actor:t.id,token:a,scene:canvas.scene?canvas.scene.id:null}))}return await renderTemplate("systems/dsa5/templates/dialog/dialog-reaction-attack.html",{dieClass:"die-in",items:r,defenses:l,title:"DIALOG.selectReaction",sizeNotification:c})}callbackResult(e,t){let{actor:a,tokenId:s}=ke.getTargetActor(t);if(e=="doNothing")ee.resolveUndefended(t);else if(e=="dodge")a.setupDodge({},s).then(i=>{a.basicTest(i)});else if(e=="parryWeaponless")a.setupWeaponless("parry",{},s).then(i=>{a.basicTest(i)});else{let i=["meleeweapon","trait"],n=a.items.find(r=>i.includes(r.type)&&r.name==e);n&&a.setupWeapon(n,"parry",{},s).then(r=>{a.basicTest(r)})}}};var{getProperty:xt}=foundry.utils,W=class o{static{u(this,"EquipmentDamage")}static armorWearModifier(e,t){if(game.settings.get("dsa5","armorAndWeaponDamage"))switch(o.calculateWear(e)){case 1:case 2:t-=1;break;case 3:case 4:t=0}return Math.max(0,Number(t))}static armorGetsDamage(e,t){return(e>14||t.successLevel>2)&&game.settings.get("dsa5","armorAndWeaponDamage")}static armorEncumbranceModifier(e){return game.settings.get("dsa5","armorAndWeaponDamage")&&o.calculateWear(e)>1?1:0}static async showDamageToGear(e,t){if(game.settings.get("dsa5","armorAndWeaponDamage")){let a=g.getSpeaker(e.extra.speaker),s=0,i=xt(a,"flags.oppose.messageId");if(i){let r=game.messages.get(i);r&&(s=xt(r,"flags.data.postData.successLevel")||0)}let n=e.source;if(n._id&&n.system.structure&&(t.successLevel<-2||s>2)&&["meleeweapon","rangeweapon","armor"].includes(n.type))return a=await g.getSpeaker(t.speaker),a.items.get(n._id).uuid}}static breakingTest(e){if(!e)return ui.notifications.warn(game.i18n.format("DSAError.notfound",{category:"",name:game.i18n.localize("equipment")}));if(e.system.structure.max<=0)return ui.notifications.warn(game.i18n.format("DSAError.noBreakingStructure",{name:e.name}));let t=0,a;if(e.type=="armor"?(a=game.i18n.localize(`ARMORSUBCATEGORIES.${e.system.subcategory}`),t=xt(e,"system.structure.breakPointRating")||b.armorSubcategories[e.system.subcategory]):(a=e.system.combatskill.value,t=xt(e,"system.structure.breakPointRating")||b.weaponStabilities[game.i18n.localize(`LocalizedCTs.${a}`)]),!t){ui.notifications.error(game.i18n.format("DSAError.noBreakingResistance",{item:e.name}));return}let s="",i=xt(e,"effect.attributes")||"";new RegExp(`${x.magical}`,"i").test(i)?s=`${game.i18n.format("WEAPON.attributeWarning",{domain:x.clerical})}
`:new RegExp(`${x.clerical}`,"i").test(i)&&(s=`${game.i18n.format("WEAPON.attributeWarning",{domain:x.magical})}
`),new de({title:game.i18n.localize("DSASETTINGS.armorAndWeaponDamage"),content:`${s}: `,buttons:{Yes:{icon:'',label:game.i18n.localize("Roll"),callback:u(n=>{o.resolveBreakingTest(e,Number(n.find('[name="threshold"]').val()),a)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}},default:"Yes"}).render(!0)}static async applyDamageLevelToItem(e,t){let a=Math.ceil(e.system.structure.max*.25)*t;await e.update({"system.structure.value":Math.max(0,e.system.structure.value-a)})}static async absoluteDamageLevelToItem(e,t){let a=Math.ceil(e.system.structure.max*.25)*t;await e.update({"system.structure.value":Math.min(e.system.structure.value,Math.max(0,e.system.structure.max-a))})}static async resolveBreakingTest(e,t,a){let s=await R.manualRolls(await new Roll("1d20").evaluate(),game.i18n.format("WEAR.check",{category:a}));await R.showDiceSoNice(s,game.settings.get("core","rollMode"));let i=s.total>t?1:0;await this.applyDamageLevelToItem(e,i);let n=o.calculateWear(e),r=await renderTemplate("systems/dsa5/templates/system/breakingtest.html",{wear:n,item:e,threshold:t,category:a,roll:s,result:game.i18n.localize(`WEAR.${e.type}.${n}`)});ChatMessage.create(g.chatDataSetup(r))}static damageTooltip(e){if(game.settings.get("dsa5","armorAndWeaponDamage")){let t=this.calculateWear(e);return{msg:game.i18n.localize(`WEAR.${e.type}.${t}`),css:`gearD damaged${t}`}}return{msg:"",css:""}}static weaponWearModifier(e){if(game.settings.get("dsa5","armorAndWeaponDamage"))switch(o.calculateWear(e)){case 1:e.attack-=1,e.parry&&(e.parry-=1);break;case 2:e.attack-=2,e.parry&&(e.parry-=2);break;case 3:case 4:e.attack=0,e.parry&&(e.parry=0)}}static calculateWear(e){return!e.system.structure||Number(e.system.structure.max)<=0?0:Math.floor((1-e.system.structure.value/e.system.structure.max)*4)}};var{mergeObject:Mr,getProperty:In}=foundry.utils,ee=class o{static{u(this,"OpposedDsa5")}static async handleOpposedTarget(e){if(!e)return;let t=g.getSpeaker(e.speaker);if(!t)return;let a=e.flags.data.postData,s=e.flags.data.preData;t.flags.oppose?o.answerOpposedTest(t,e,a,s):game.user.targets.size&&e.flags.data.isOpposedTest&&!e.flags.data.defenderMessage&&!e.flags.data.attackerMessage?o.createOpposedTest(t,e,a,s):e.flags.data.defenderMessage||e.flags.data.attackerMessage?o.resolveFinalMessage(e):e.flags.data.unopposedStartMessage?o.redoUndefended(e):e.flags.data.startMessagesList?o.changeStartMessage(e):(await this.showDamage(e),await this.showSpellWithoutTarget(e))}static async redoUndefended(e){let t=game.messages.get(e.flags.data.unopposedStartMessage);startmessage.flags.unopposeData.attackMessageId=e.id,this.resolveUndefended(t)}static async answerOpposedTest(e,t,a,s){let i=game.messages.get(e.flags.oppose.messageId);if(!i)return ui.notifications.error("DSAError.staleData",{localize:!0}),await o.clearOpposed(e),o.createOpposedTest(e,t,a,s);let n={speaker:e.flags.oppose.speaker,testResult:i.flags.data.postData,messageId:i.id,img:g.getSpeaker(e.flags.oppose.speaker)?.img};n.testResult.source=i.flags.data.preData.source,n.testResult.ammo&&n.testResult.source.effects.push(...n.testResult.ammo.effects);let r={speaker:t.speaker,testResult:a,messageId:t.id,img:e.msg},l=i.flags.data.defenderMessage?Array.from(i.flags.data.defenderMessage):[];l.push(t.id),game.user.isGM&&await i.update({"flags.data.defenderMessage":l}),await t.update({"flags.data.attackerMessage":i.id}),await this.completeOpposedProcess(n,r,{target:!0,startMessageId:e.flags.oppose.startMessageId,whisper:t.whisper,blind:t.blind}),await o.clearOpposed(e)}static videoOrImgTag(e){return/\.webm$/.test(e)?``:``}static async createOpposedTest(e,t,a,s){let i;t.speaker.token?i=canvas.tokens.get(t.speaker.token).document:i=e.prototypeToken;let n=a.options?.mode=="damage";if(a.successLevel>0||n){let r=t.flags.data.preData.attackOfOpportunity,l=r?"":`
`,c=[];game.user.targets.forEach(async d=>{if(d.actor){let m=`${o.opposeMessage(i,d,!1)} ${l}`,p=await ChatMessage.create({user:game.user.id,content:m,speaker:t.speaker,"flags.unopposeData":{attackMessageId:t.id,targetSpeaker:{scene:d.scene.id,token:d.id,alias:d.document.name}}}),f={speaker:t.speaker,messageId:t.id,startMessageId:p.id};game.user.isGM?await d.actor.update({"flags.oppose":f}):game.socket.emit("system.dsa5",{type:"target",payload:{target:d.id,scene:d.scene?.id||canvas.scene?.id,opposeFlag:f}}),c.push(p.id),r?await o.resolveUndefended(p,game.i18n.localize("OPPOSED.attackOfOpportunity")):n&&await o.resolveUndefended(p),Hooks.call("DSAOpposedRollStart",d)}}),t.flags.data.startMessagesList=c}else game.user.targets.forEach(async r=>{r.actor&&await ChatMessage.create({user:game.user.id,content:o.opposeMessage(i,r,!0),speaker:t.speaker})})}static opposeMessage(e,t,a){return`
+ `;$(this._element).find(".modifiers select").html(l)}else r.length>0&&(r.parent().remove(),this.position.height-=86,this.setPosition(this.position))}}changeSpecAbVariant(e){e.stopPropagation(),e.preventDefault();let t=g.getSpeaker(this.dialogData.speaker);if(t){let s=Number(e.currentTarget.dataset.current)+1;s>=Number(e.currentTarget.dataset.variantcount)&&(s=0),e.currentTarget.dataset.current=s,$(e.currentTarget).text(["A","B","C"][s]);let i=$(e.currentTarget).closest(".specAbs")[0],n=t.items.get(i.dataset.id),r=`effect.value${["","2","3"][s]}`,l=D.specAbsDataset([n],t,this.dialogData.mode,r)[0];i.dataset.dmmalus=l.dmmalus||0,i.dataset.atbonus=l.atbonus||0,i.dataset.tpbonus=l.tpbonus||0,i.dataset.pabonus=l.pabonus||0,this.setCombatSpecTooltip(i),this.calculateModifier()}}async close(e={}){return clearInterval(this.checkTargets),await super.close(e)}_postItem(e){e.stopPropagation();let t=$(e.currentTarget).closest(".specAbs"),a=t.attr("data-actor"),s=t.attr("data-id");return game.actors.get(a).items.get(s).postItem(),!1}recallSettings(e,t,a,s){return super.recallSettings(e,t,a,s),this.prepareWeapon(),this}syncSituationalModifiers(e,t=""){let a=0;for(let s of e.situationalModifiers)s.value!=null&&(a+=s.type==t||t==""&&s.type==null?Number(s.value):0);return a}prepareWeapon(e=void 0){e=e||this.dialogData.renderData;let t=this.dialogData.source;if(["meleeweapon","rangeweapon"].includes(t.type)){let a=g.getSpeaker(this.dialogData.speaker);if(a){let s=t.system.combatskill.value,i,n=O._calculateCombatSkillValues(a.items.find(r=>r.type=="combatskill"&&r.name==s).toObject(),a.system,{step:this.syncSituationalModifiers(e,"step"),[this.dialogData.mode]:this.syncSituationalModifiers(e,this.dialogData.mode)});switch(t.type){case"meleeweapon":i=O._prepareMeleeWeapon(t,[n],a);break;case"rangeweapon":i=O._prepareRangeWeapon(t,[],[n],a);break}this.dialogData.mode=="attack"||this.dialogData.counterAttack?this.dialogData.rollValue=i.attack:this.dialogData.mode=="parry"&&(this.dialogData.rollValue=i.parry)}else t.type=="dodge"?this.dialogData.rollValue=t.system.value:this.dialogData.mode=="attack"||this.dialogData.counterAttack?this.dialogData.rollValue=Number(t.system.at.value):this.dialogData.mode=="parry"&&(this.dialogData.rollValue=Number(t.system.pa))}}async prepareFormRecall(e){await super.prepareFormRecall(e);let t=g.getSpeaker(this.dialogData.speaker);ne.lightLevel(t,e);let a=H.isRiding(t),s=e.find('[name="advantageousPosition"]')[0];if(this.dialogData.mode=="attack"){let i=Array.from(game.user.targets).some(r=>H.isRiding(r.actor));s&&(i||a)&&(s.checked=a&&!i);let n=e.find('[name="mountedOptions"]')[0];if(a&&n){let r=H.getHorse(t);r&&(n.selectedIndex=H.horseSpeedModifier(r))}}else if(this.dialogData.mode=="parry"&&t.flags.oppose){let i=g.getSpeaker(t.flags.oppose.speaker),n=H.isRiding(i);s&&(n||a)&&(s.checked=a&&!n)}await this.calculateModifier()}static assassinationModifiers(e,t){let a=t.assassinate;if(!a||a=="-")return[];e.opposingWeaponSize=0;let s=t.advantageousPosition?2:0,i=b.meleeRangesArray.indexOf(t.weaponsize),n=game.i18n.localize(`DIALOG.${a}`),r=[{name:n,value:10-s-i}];if(a=="assassinate"){let l=b.meleeRangesArray.indexOf(e.source.system.reach.value);!N.isYieldedTwohanded(e.source)&&e.source.system.worn?.wrongGrip&&(l=Math.min(l,1));let c=Math.max(1,new Roll(e.source.system.damage.value.replace(/[DWw]/g,"d")).terms.reduce((p,f)=>p+(f.faces?f.number:0),0))-1,d=[2,0,-2,-4][l]-c*2,m=Math.max(1,5-l-c);r.push({name:n+" ("+game.i18n.localize("CHARAbbrev.damage")+")",damageBonus:d,value:0,step:1},{name:n+" (*)",damageBonus:`*${m}`,value:0,step:1})}else e.source.effects||(e.source.effects=[]),e.source.effects.find(l=>l._id==n)||e.source.effects.push({_id:n,changes:[],disabled:!1,duration:{},icon:"icons/svg/aura.svg",name:n,transfer:!0,flags:{dsa5:{description:n,resistRoll:`${game.i18n.localize("LocalizedIDs.selfControl")} -3`,hideOnToken:!1,hidePlayers:!1,customDuration:"",advancedFunction:"1",args0:"unconscious",args1:""}}});return r}static isMelee(e){return e.type=="meleeweapon"||e.type=="dodge"||e.type=="trait"&&ca(e,"system.traitType.value")=="meleeAttack"}async calculateModifier(){if(this.dialogData.mode=="damage")return;let e=this.dialogData.source,t={source:this.dialogData.source,extra:{options:{}}},a=g.getSpeaker(this.dialogData.speaker);o.isMelee(e)?o.resolveMeleeDialog(t,{},this.element,a,{},this.dialogData.renderData.multipleDefenseValue??-3,this.dialogData.mode):o.resolveRangeDialog(t,{},this.element,a,{},this.dialogData.mode),this.prepareWeapon(t),this.dialogData.modifier=await R._situationalModifiers(t);let s=R._situationalMultipliers(t);this.updateRollButton(this.readTargets(),s)}static getNarrowSpaceModifier(e,t){return t?N.isShield(e.source)?ca(b.narrowSpaceModifiers,`shield${e.source.system.reach.shieldSize}.${t}`)||0:ca(b.narrowSpaceModifiers,`weapon${e.source.system.reach.value}.${t}`)||0:0}static resolveMeleeDialog(e,t,a,s,i,n,r){this._resolveDefault(e,t,a,i);let l=new FormDataExtended(a.find("form")[0]).object,c=o.targetIsSwarm(e),d=s.isSwarm();e.opposingWeaponSize=d?0:l.weaponsize,e.attackOfOpportunity=this.attackOfOpportunity(e.situationalModifiers,l),e.extra.attackFromBehind=Number(l.attackFromBehind)||0,e.situationalModifiers.push(D.parseValueType(game.i18n.localize("sight"),l.vision||0),{name:game.i18n.localize("MODS.attackFromBehind"),value:e.extra.attackFromBehind},{name:game.i18n.localize("MODS.damage"),damageBonus:l.damageModifier,value:0,step:1},{name:game.i18n.format("defenseCount",{malus:n}),value:(Number(l.defenseCount)||0)*n},{name:game.i18n.localize("MODS.wrongHand"),value:Number(l.wrongHand)||0},{name:game.i18n.localize("MODS.advantageousPosition"),value:Number(l.advantageousPosition)||0},{name:game.i18n.localize("sizeCategory"),value:c?0:b.meleeSizeModifier[l.size]||0},...D.getSpecAbModifiers(a,r),...this.assassinationModifiers(e,l),{name:game.i18n.localize("MODS.narrowSpace"),value:Number(l.narrowSpace)||0},{name:game.i18n.localize("MODS.doubleAttack"),value:Number(l.doubleAttack)||0}),e.situationalModifiers.some(m=>m.name==game.i18n.localize("LocalizedIDs.counterAttack"))&&(e.mode="attack",e.extra.counterAttack=!0)}static resolveRangeDialog(e,t,a,s,i){this._resolveDefault(e,t,a,i);let n=new FormDataExtended(a.find("form")[0]).object,r=Number(n.quickChange)||0,l=Number(n.size)||0,c=a.find('[name="distance"] option:selected')[0].dataset;e.situationalModifiers.push({name:game.i18n.localize("MODS.targetMovement")+" "+a.find('[name="targetMovement"] option:selected').text(),value:Number(n.targetMovement)||0},{name:game.i18n.localize("shooter")+" "+a.find('[name="shooterMovement"] option:selected').text(),value:Number(n.shooterMovement)||0},{name:game.i18n.localize("mount")+" "+a.find('[name="mountedOptions"] option:selected').text(),value:Number(n.mountedOptions)||0},{name:game.i18n.localize("MODS.quickChange"),value:r},{name:game.i18n.localize("MODS.combatTurmoil"),value:Number(n.combatTurmoil)||0},{name:game.i18n.localize("MODS.aim"),value:Math.min(Number(n.aim)||0,4)},{name:game.i18n.localize("MODS.damage"),damageBonus:n.damageModifier,value:0,step:1},{name:game.i18n.localize("sight"),value:Number(n.vision)||0},{name:game.i18n.localize("sizeCategory"),value:l},{name:game.i18n.localize("distance"),value:c.attack,damageBonus:c.damage},...D.getSpecAbModifiers(a,"attack"));let d=s.items.find(m=>m.type=="specialability"&&m.name==game.i18n.localize("LocalizedIDs.sharpshooter"));if(d){let m=ca(e.source,"system.combatskill.value")?.toLowerCase();if(m&&d.system.list.value.split(/;|,/).map(p=>p.trim().toLowerCase()).includes(m)){let p=[n.targetMovement,n.shooterMovement,n.mountedOptions,r,l,c],f=Math.abs(p.reduce((y,k)=>(Number(k)<0&&(y+=Number(k)),y),0)),h=Math.min(Number(d.system.step.value)*2,f);h&&e.situationalModifiers.push({name:game.i18n.localize("LocalizedIDs.sharpshooter"),value:h})}}}static _resolveDefault(e,t,a,s){t.rollMode=a.find('[name="rollMode"]:checked').val(),e.situationalModifiers=O._parseModifiers(a),Ks(e.extra.options,s)}static targetIsSwarm(){let e=!1;return game.user.targets.forEach(t=>{if(t.actor?.isSwarm()){e=!0;return}}),e}static attackOfOpportunity(e,t){let a=Number(t.opportunityAttack)||0;if(a){e.push({name:game.i18n.localize("MODS.opportunityAttack"),value:a});let s=game.i18n.localize("LocalizedIDs.enemySense"),i=game.i18n.localize("LocalizedIDs.winhallStyle");game.user.targets.forEach(n=>{for(let r of n.actor?.items||[])r.type=="specialability"&&(r.name==s?e.push({name:s,value:-4}):r.name==i&&e.push({name:i,value:-2}))})}return a!=0}static getRollButtons(e,t,a,s){let i=ae.getRollButtons(e,t,a,s);if(e.source.type=="rangeweapon"||e.source.type=="trait"&&e.source.system.traitType.value=="rangeAttack"){let n=e.source.type=="trait"?Number(e.source.system.reloadTime.value):O.calcLZ(e.source,e.extra.actor),r=e.source.system.reloadTime.progress;r{let l=await g.getSpeaker(e.extra.speaker);await l.updateEmbeddedDocuments("Item",[{_id:e.source._id,"system.reloadTime.progress":r+1}]);let c=game.i18n.format("WEAPON.isReloading",{actor:l.token?.name||l.prototypeToken.name,item:e.source.name,status:`${r+1}/${n}`});await ChatMessage.create(g.chatDataSetup(c))},"callback")}})}return i}};var{mergeObject:Ys}=foundry.utils,Ot=class extends de{static{u(this,"DSA5SkillDialog")}static getRollButtons(e,t,a,s){let i=ae.getRollButtons(e,t,a,s);i.rollButton.label=game.i18n.localize("Opposed");let n={nonOpposedButton:{label:game.i18n.localize("Roll"),callback:u(r=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,r),e.opposable=!1,a(t.callback(r))},"callback")},routineRoll:{label:game.i18n.localize("ROLL.routine"),callback:u(r=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,r),e.routine=!0,Ys(e.extra.options,{cheat:!0,predefinedResult:[{val:2,index:0},{val:2,index:1},{val:2,index:2}]}),a(t.callback(r))},"callback")}};return Ys(n,i),n}activateListeners(e){super.activateListeners(e),e.on("change","input,select",s=>this.rememberFormData(s));let t=this.readTargets(),a=this;this.checkTargets=setInterval(function(){t=a.compareTargets(e,t)},500),this.rememberFormData(),e.on("mousedown",".quantity-click",s=>this.rememberFormData(s)),e.find(".modifiers option").mousedown(s=>{this.rememberFormData(s)})}rememberFormData(e){let t=new FormDataExtended(this.element.find("form")[0]).object;t.situationalModifiers=O._parseModifiers(this._element),this.calculateRoutine(t)}async calculateRoutine(e){let t=g.getSpeaker(this.dialogData.speaker),a=this.element.find(".routineRoll");if(!t)return a.prop("disabled",!0);let s=!0;for(let m=0;m<3;m++)if(t.system.characteristics[e[`characteristics${m}`]].max*e[`ch${m}`].max<13){s=!1;break}let i=Number(this.dialogData.source.system.talentValue.value)+e.fw+await R._situationalModifiers(e,"FW"),n=b.skillDifficultyModifiers[e.testDifficulty]+await R._situationalModifiers(e),r=Math.clamp(10-n*3,1,19),l=i>=r,c=s&&l,d=game.i18n.localize("ROLL.routine");a.prop("disabled",!c),a.html(c?`${d} (${game.i18n.localize("CHARAbbrev.FW")} ${Math.round(i/2)})`:d),this.calculateProbability(t,this.dialogData.source,n,i)}static get defaultOptions(){let e=super.defaultOptions;return Ys(e,{width:700,resizable:!0}),e}};var{mergeObject:Dn}=foundry.utils,ae=class o extends de{static{u(this,"DSA5Dialog")}static getDialogForItem(e,t){let a=e.extra.actor,s=e.source.type;switch(s){case"rangeweapon":case"meleeweapon":case"dodge":case"trait":return t.rollModifiers=fe.setData(a,s,e,t),fe;case"spell":case"ritual":case"liturgy":case"ceremony":return t.rollModifiers=Se.setData(a,s,t),Se;case"skill":return Ot}return o}static getRollButtons(e,t,a,s){let i={rollButton:{label:game.i18n.localize("Roll"),callback:u(n=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,n),a(t.callback(n))},"callback")}};return game.user.isGM&&Dn(i,{cheat:{label:game.i18n.localize("DIALOG.cheat"),callback:u(n=>{game.dsa5.memory.remember(e.extra.speaker,e.source,e.mode,n),a(t.callback(n,{cheat:!0}))},"callback")}}),i}activateListeners(e){super.activateListeners(e),e.find(".dieButton").click(t=>{let a=$(t.currentTarget);a.attr("data-single")=="true"&&a.closest(".dialog-content").find(".dieButton").removeClass("dieSelected"),a.toggleClass("dieSelected")})}static get defaultOptions(){let e=super.defaultOptions;return Dn(e,{resizable:!0}),e}};var he=class extends te{static{u(this,"TraitRulesDSA5")}static async traitAdded(e,t){b.addTraitRules[t.name]&&await b.addTraitRules[t.name](e,t)}static hasTrait(e,t){return super.hasItem(e,t,["trait"])}};Hooks.on("setup",()=>{let o=game.i18n.localize("LocalizedIDs.familiar");b.addTraitRules[o]=async(e,t)=>{t.effects.length==0&&(t.effects=[{changes:[{key:"system.status.wounds.gearmodifier",mode:2,value:10},{key:"system.status.soulpower.gearmodifier",mode:2,value:1},{key:"system.status.toughness.gearmodifier",mode:2,value:1},{key:"system.status.astralenergy.gearmodifier",mode:2,value:15},{key:"system.characteristics.mu.gearmodifier",mode:2,value:1},{key:"system.characteristics.kl.gearmodifier",mode:2,value:1},{key:"system.characteristics.in.gearmodifier",mode:2,value:1},{key:"system.characteristics.ch.gearmodifier",mode:2,value:1},{key:"system.characteristics.ff.gearmodifier",mode:2,value:1},{key:"system.characteristics.ge.gearmodifier",mode:2,value:1},{key:"system.characteristics.ko.gearmodifier",mode:2,value:1},{key:"system.characteristics.kk.gearmodifier",mode:2,value:1},{key:"system.totalArmor",mode:2,value:1}],duration:{},icon:"icons/svg/aura.svg",name:o,transfer:!0,flags:{dsa5:{description:o,hideOnToken:!0,hidePlayers:!1}}}]);let a=game.i18n.localize("LocalizedIDs.witchSense");if(!te.hasItem(e,a,["trait"])){let s=await g.findAnyItem([{name:a,type:"trait"}]);await e.createEmbeddedDocuments("Item",s)}}});var{mergeObject:Mn,getProperty:Dr}=foundry.utils,ke=class o extends Dialog{static{u(this,"DialogReactDSA5")}static async showDialog(e){let t=this.callbackResult;new o({title:game.i18n.localize("Unopposed"),content:await this.getTemplate(e),default:"ok",buttons:{ok:{icon:'',label:game.i18n.localize("ok"),callback:u(a=>{t(a.find('[name="entryselection"]').val(),e)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}}}).render(!0)}activateListeners(e){super.activateListeners(e),e.find(".select2").select2()}static getTargetActor(e){if(!canvas.tokens)return{};let t=e.flags.unopposeData.targetSpeaker,a=g.getSpeaker(t);return a?{actor:a,tokenId:t.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}static async getTemplate(e){return""}static callbackResult(e,t,a){}static get defaultOptions(){let e=super.defaultOptions;return Mn(e,{resizable:!0}),e}},yt=class extends ke{static{u(this,"ReactToSkillDialog")}static async getTemplate(e){let s=game.messages.get(e.flags.unopposeData.attackMessageId).flags.data.preData.source.name,i=(await g.allSkillsList()).map(n=>({name:n,id:n}));return i.unshift({name:game.i18n.localize("doNothing"),id:"doNothing"}),renderTemplate("systems/dsa5/templates/dialog/dialog-act.html",{items:i,original:s,title:"DIALOG.selectReaction"})}static callbackResult(e,t){let{actor:a,tokenId:s}=ke.getTargetActor(t);if(e=="doNothing")ee.resolveUndefended(t);else{let i=a.items.find(n=>n.name==e&&n.type=="skill");i&&a.setupSkill(i,{},s).then(n=>{a.basicTest(n)})}}},bt=class o extends Dialog{static{u(this,"ActAttackDialog")}static async showDialog(e,t){let a=new o({title:game.i18n.localize("attacktest"),content:await this.getTemplate(e),buttons:{}});a.actor=e,a.tokenId=t,a.render(!0)}activateListeners(e){super.activateListeners(e),e.find(".reactClick").click(t=>{this.callbackResult(t.currentTarget.dataset,this.actor,this.tokenId),this.close()})}static async getTemplate(e){let t=e.items.filter(r=>r.type=="combatskill").map(r=>O._calculateCombatSkillValues(r.toObject(),e.system)),a=t.find(r=>r.name==game.i18n.localize("LocalizedIDs.wrestle")),s=[{name:game.i18n.localize("attackWeaponless"),id:"attackWeaponless",img:"systems/dsa5/icons/categories/attack_weaponless.webp",value:a.system.attack.value}],i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"];for(let r of e.items)if(i.includes(r.type)&&r.system.worn.value==!0){let l=r.type=="meleeweapon"?O._prepareMeleeWeapon(r.toObject(),t,e):O._prepareRangeWeapon(r.toObject(),[],t,e);s.push({name:r.name,id:r.name,img:r.img,value:l.attack,item:l});for(let[c,d]of Object.entries(l.subweapons||{}))s.push({name:d.name,id:r.name,subweapon:c,img:r.img,value:d.attack,item:d})}else r.type=="trait"&&n.includes(r.system.traitType.value)&&s.push({name:r.name,id:r.name,img:r.img,value:r.system.at.value});return await renderTemplate("systems/dsa5/templates/dialog/dialog-reaction-attack.html",{dieClass:"die-mu",items:s,title:"DIALOG.selectAction"})}callbackResult(e,t,a){if(e.value=="attackWeaponless")t.setupWeaponless("attack",{},a).then(s=>{t.basicTest(s)});else{let s=["meleeweapon","trait","rangeweapon"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.value);e.subweapon&&(i=O.buildSubweapon(i,e.subweapon)),i&&t.setupWeapon(i,"attack",{},a).then(n=>{t.basicTest(n)})}}static get defaultOptions(){let e=super.defaultOptions;return e.width=550,e}},kt=class o extends ke{static{u(this,"ReactToAttackDialog")}static async showDialog(e){let t=new o({title:game.i18n.localize("Unopposed"),content:await this.getTemplate(e),buttons:{}});t.startMessage=e,t.render(!0)}static getAttackActor(e){if(!canvas.tokens)return{};let t=e.flags.unopposeData.attackMessageId,s=game.messages.get(t).flags.data.preData.extra.speaker,i=g.getSpeaker(s);return i?{actor:i,tokenId:s.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}activateListeners(e){super.activateListeners(e),e.find(".reactClick").click(t=>{this.callbackResult(t.currentTarget.dataset.value,this.startMessage),this.close()})}static get defaultOptions(){let e=super.defaultOptions;return Mn(e,{width:550}),e}static async getTemplate(e){let{actor:t,tokenId:a}=ke.getTargetActor(e),s=o.getAttackActor(e),i=t.items.filter(d=>d.type=="combatskill").map(d=>O._calculateCombatSkillValues(d.toObject(),t.system)),n=i.find(d=>d.name==game.i18n.localize("LocalizedIDs.wrestle")),r=[{name:game.i18n.localize("doNothing"),id:"doNothing",img:"systems/dsa5/icons/categories/disease.webp"},{name:game.i18n.localize("dodge"),id:"dodge",img:"systems/dsa5/icons/categories/Dodge.webp",value:t.system.status.dodge.max},{name:game.i18n.localize("parryWeaponless"),id:"parryWeaponless",img:"systems/dsa5/icons/categories/attack_weaponless.webp",value:n.system.parry.value}],l=0,c="";if(t){let d=["meleeweapon"];for(let m of t.items)if(d.includes(m.type)&&m.system.worn.value==!0){let p=O._prepareMeleeWeapon(m.toObject(),i,t);r.push({name:m.name,id:m.name,img:m.img,value:p.parry})}else m.type=="trait"&&Number(m.system.pa)>0&&r.push({name:m.name,id:m.name,img:m.img,value:m.system.pa});if(s){let m=Dr(s.actor.system,"status.size.value");m=="big"?c="DIALOGDESCRIPTION.bigEnemy":m=="giant"&&(c="DIALOGDESCRIPTION.giantEnemy")}game.combat&&(l=await game.combat.getDefenseCount({actor:t.id,token:a,scene:canvas.scene?canvas.scene.id:null}))}return await renderTemplate("systems/dsa5/templates/dialog/dialog-reaction-attack.html",{dieClass:"die-in",items:r,defenses:l,title:"DIALOG.selectReaction",sizeNotification:c})}callbackResult(e,t){let{actor:a,tokenId:s}=ke.getTargetActor(t);if(e=="doNothing")ee.resolveUndefended(t);else if(e=="dodge")a.setupDodge({},s).then(i=>{a.basicTest(i)});else if(e=="parryWeaponless")a.setupWeaponless("parry",{},s).then(i=>{a.basicTest(i)});else{let i=["meleeweapon","trait"],n=a.items.find(r=>i.includes(r.type)&&r.name==e);n&&a.setupWeapon(n,"parry",{},s).then(r=>{a.basicTest(r)})}}};var{getProperty:xt}=foundry.utils,W=class o{static{u(this,"EquipmentDamage")}static armorWearModifier(e,t){if(game.settings.get("dsa5","armorAndWeaponDamage"))switch(o.calculateWear(e)){case 1:case 2:t-=1;break;case 3:case 4:t=0}return Math.max(0,Number(t))}static armorGetsDamage(e,t){return(e>14||t.successLevel>2)&&game.settings.get("dsa5","armorAndWeaponDamage")}static armorEncumbranceModifier(e){return game.settings.get("dsa5","armorAndWeaponDamage")&&o.calculateWear(e)>1?1:0}static async showDamageToGear(e,t){if(game.settings.get("dsa5","armorAndWeaponDamage")){let a=g.getSpeaker(e.extra.speaker),s=0,i=xt(a,"flags.oppose.messageId");if(i){let r=game.messages.get(i);r&&(s=xt(r,"flags.data.postData.successLevel")||0)}let n=e.source;if(n._id&&n.system.structure&&(t.successLevel<-2||s>2)&&["meleeweapon","rangeweapon","armor"].includes(n.type))return a=await g.getSpeaker(t.speaker),a.items.get(n._id).uuid}}static breakingTest(e){if(!e)return ui.notifications.warn(game.i18n.format("DSAError.notFound",{category:"",name:game.i18n.localize("TYPES.Item.equipment")}));if(e.system.structure.max<=0)return ui.notifications.warn(game.i18n.format("DSAError.noBreakingStructure",{name:e.name}));let t=0,a;if(e.type=="armor"?(a=game.i18n.localize(`ARMORSUBCATEGORIES.${e.system.subcategory}`),t=xt(e,"system.structure.breakPointRating")||b.armorSubcategories[e.system.subcategory]):(a=e.system.combatskill.value,t=xt(e,"system.structure.breakPointRating")||b.weaponStabilities[game.i18n.localize(`LocalizedCTs.${a}`)]),!t){ui.notifications.error(game.i18n.format("DSAError.noBreakingResistance",{item:e.name}));return}let s="",i=xt(e,"effect.attributes")||"";new RegExp(`${x.magical}`,"i").test(i)?s=`${game.i18n.format("WEAPON.attributeWarning",{domain:x.clerical})}
`:new RegExp(`${x.clerical}`,"i").test(i)&&(s=`${game.i18n.format("WEAPON.attributeWarning",{domain:x.magical})}
`),new de({title:game.i18n.localize("DSASETTINGS.armorAndWeaponDamage"),content:`${s}: `,buttons:{Yes:{icon:'',label:game.i18n.localize("Roll"),callback:u(n=>{o.resolveBreakingTest(e,Number(n.find('[name="threshold"]').val()),a)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}},default:"Yes"}).render(!0)}static async applyDamageLevelToItem(e,t){let a=Math.ceil(e.system.structure.max*.25)*t;await e.update({"system.structure.value":Math.max(0,e.system.structure.value-a)})}static async absoluteDamageLevelToItem(e,t){let a=Math.ceil(e.system.structure.max*.25)*t;await e.update({"system.structure.value":Math.min(e.system.structure.value,Math.max(0,e.system.structure.max-a))})}static async resolveBreakingTest(e,t,a){let s=await R.manualRolls(await new Roll("1d20").evaluate(),game.i18n.format("WEAR.check",{category:a}));await R.showDiceSoNice(s,game.settings.get("core","rollMode"));let i=s.total>t?1:0;await this.applyDamageLevelToItem(e,i);let n=o.calculateWear(e),r=await renderTemplate("systems/dsa5/templates/system/breakingtest.html",{wear:n,item:e,threshold:t,category:a,roll:s,result:game.i18n.localize(`WEAR.${e.type}.${n}`)});ChatMessage.create(g.chatDataSetup(r))}static damageTooltip(e){if(game.settings.get("dsa5","armorAndWeaponDamage")){let t=this.calculateWear(e);return{msg:game.i18n.localize(`WEAR.${e.type}.${t}`),css:`gearD damaged${t}`}}return{msg:"",css:""}}static weaponWearModifier(e){if(game.settings.get("dsa5","armorAndWeaponDamage"))switch(o.calculateWear(e)){case 1:e.attack-=1,e.parry&&(e.parry-=1);break;case 2:e.attack-=2,e.parry&&(e.parry-=2);break;case 3:case 4:e.attack=0,e.parry&&(e.parry=0)}}static calculateWear(e){return!e.system.structure||Number(e.system.structure.max)<=0?0:Math.floor((1-e.system.structure.value/e.system.structure.max)*4)}};var{mergeObject:Mr,getProperty:In}=foundry.utils,ee=class o{static{u(this,"OpposedDsa5")}static async handleOpposedTarget(e){if(!e)return;let t=g.getSpeaker(e.speaker);if(!t)return;let a=e.flags.data.postData,s=e.flags.data.preData;t.flags.oppose?o.answerOpposedTest(t,e,a,s):game.user.targets.size&&e.flags.data.isOpposedTest&&!e.flags.data.defenderMessage&&!e.flags.data.attackerMessage?o.createOpposedTest(t,e,a,s):e.flags.data.defenderMessage||e.flags.data.attackerMessage?o.resolveFinalMessage(e):e.flags.data.unopposedStartMessage?o.redoUndefended(e):e.flags.data.startMessagesList?o.changeStartMessage(e):(await this.showDamage(e),await this.showSpellWithoutTarget(e))}static async redoUndefended(e){let t=game.messages.get(e.flags.data.unopposedStartMessage);startmessage.flags.unopposeData.attackMessageId=e.id,this.resolveUndefended(t)}static async answerOpposedTest(e,t,a,s){let i=game.messages.get(e.flags.oppose.messageId);if(!i)return ui.notifications.error("DSAError.staleData",{localize:!0}),await o.clearOpposed(e),o.createOpposedTest(e,t,a,s);let n={speaker:e.flags.oppose.speaker,testResult:i.flags.data.postData,messageId:i.id,img:g.getSpeaker(e.flags.oppose.speaker)?.img};n.testResult.source=i.flags.data.preData.source,n.testResult.ammo&&n.testResult.source.effects.push(...n.testResult.ammo.effects);let r={speaker:t.speaker,testResult:a,messageId:t.id,img:e.msg},l=i.flags.data.defenderMessage?Array.from(i.flags.data.defenderMessage):[];l.push(t.id),game.user.isGM&&await i.update({"flags.data.defenderMessage":l}),await t.update({"flags.data.attackerMessage":i.id}),await this.completeOpposedProcess(n,r,{target:!0,startMessageId:e.flags.oppose.startMessageId,whisper:t.whisper,blind:t.blind}),await o.clearOpposed(e)}static videoOrImgTag(e){return/\.webm$/.test(e)?``:``}static async createOpposedTest(e,t,a,s){let i;t.speaker.token?i=canvas.tokens.get(t.speaker.token).document:i=e.prototypeToken;let n=a.options?.mode=="damage";if(a.successLevel>0||n){let r=t.flags.data.preData.attackOfOpportunity,l=r?"":`
`,c=[];game.user.targets.forEach(async d=>{if(d.actor){let m=`${o.opposeMessage(i,d,!1)} ${l}`,p=await ChatMessage.create({user:game.user.id,content:m,speaker:t.speaker,"flags.unopposeData":{attackMessageId:t.id,targetSpeaker:{scene:d.scene.id,token:d.id,alias:d.document.name}}}),f={speaker:t.speaker,messageId:t.id,startMessageId:p.id};game.user.isGM?await d.actor.update({"flags.oppose":f}):game.socket.emit("system.dsa5",{type:"target",payload:{target:d.id,scene:d.scene?.id||canvas.scene?.id,opposeFlag:f}}),c.push(p.id),r?await o.resolveUndefended(p,game.i18n.localize("OPPOSED.attackOfOpportunity")):n&&await o.resolveUndefended(p),Hooks.call("DSAOpposedRollStart",d)}}),t.flags.data.startMessagesList=c}else game.user.targets.forEach(async r=>{r.actor&&await ChatMessage.create({user:game.user.id,content:o.opposeMessage(i,r,!0),speaker:t.speaker})})}static opposeMessage(e,t,a){return`
${e.name} ${game.i18n.localize("ROLL.Targeting")} ${t.document.name} ${a?game.i18n.localize("ROLL.failed"):""}
${o.videoOrImgTag(e.texture.src)}
${o.videoOrImgTag(t.document.texture.src)}
- `}static async changeStartMessage(e){for(let t of e.flags.data.startMessagesList){let a=game.messages.get(t),s=a.flags.unopposeData;game.socket.emit("system.dsa5",{type:"target",payload:{target:s.targetSpeaker.token,scene:canvas.scene.id,opposeFlag:{speaker:e.speaker,messageId:e.id,startMessageId:a.id}}}),await a.update({"flags.unopposeData.attackMessageId":e.id})}}static resolveFinalMessage(e){let t,a;if(e.flags.data.defenderMessage)for(let s of e.flags.data.defenderMessage){t=o.getMessageDude(e);let i=game.messages.get(s);a=o.getMessageDude(i),this.completeOpposedProcess(t,a,{blind:e.blind,whisper:e.whisper})}else{a=o.getMessageDude(e);let s=game.messages.get(e.flags.data.attackerMessage);t=o.getMessageDude(s),this.completeOpposedProcess(t,a,{blind:e.blind,whisper:e.whisper})}}static getMessageDude(e){let t={speaker:e.speaker,testResult:Mr(e.flags.data.postData,{source:e.flags.data.preData.source}),img:g.getSpeaker(e.speaker).img,messageId:e.id};return t.testResult.ammo&&t.testResult.source.effects.push(...t.testResult.ammo.effects),t}static async showDamage(e,t=!1){game.user.isGM?(!t||!e.flags.data.hideDamage)&&e.flags.data.postData.damageRoll&&(await e.update({content:e.content.replace(`data-hide-damage="${!t}"`,`data-hide-damage="${t}"`),"flags.data.hideDamage":t}),t||R._addRollDiceSoNice(e.flags.data.preData,Roll.fromData(e.flags.data.postData.damageRoll),game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("damage"))):game.socket.emit("system.dsa5",{type:"showDamage",payload:{id:e.id,hide:t}})}static async playAutomatedJBA2(e,t,a){if(g.moduleEnabled("autoanimations")){let s=g.getSpeaker(e.speaker).getActiveTokens()[0],i=g.getSpeaker(t.speaker).getActiveTokens()[0];if(!s||!s.actor||!i||!i.actor)return;let n=s.actor.items.get(e.testResult.source._id);if(n||(n=new D(e.testResult.source)),!n)return;n=n.toObject();let r=[i],l=a.winner=="attacker",c=l?r:[],d=e.testResult.successLevel>1&&l,m=e.testResult.successLevel<1&&!l,p=t.testResult.successLevel>1&&!l,f=t.testResult.successLevel<1&&l,h=[],y=[];d?y.push(game.i18n.localize("CriticalSuccess")):m?y.push(game.i18n.localize("CriticalFailure")):p?y.push(`${game.i18n.localize("CHAR.PARRY")} ${game.i18n.localize("CriticalSuccess")}`):f&&y.push(`${game.i18n.localize("CHAR.PARRY")} ${game.i18n.localize("CriticalFailure")}`),l||y.push(game.i18n.localize("CHAR.PARRY"));for(let k of y)h.push({name:`${n.name} (${k})`},{name:k});h.push(n);for(let k of h)if(await AutomatedAnimations.playAnimation(s,k,{targets:r,hitTargets:c,playOnMiss:!0}))break}}static async showSpellWithoutTarget(e){if(g.moduleEnabled("autoanimations")){let t=In(e,"flags.data");if(!t||t.isOpposedTest)return;if((In(t,"postData.result")||-1)>0){let s=g.getSpeaker(t.postData.speaker).getActiveTokens()[0];if(!s||!s.actor)return;let i=Array.from(game.user.targets),n=s.actor.items.get(t.preData.source._id);i.length||(i=[s]),AutomatedAnimations.playAnimation(s,n,{targets:i})}}}static async clearOpposed(e){game.user.isGM?await e.update({"flags.-=oppose":null}):game.socket.emit("system.dsa5",{type:"clearOpposed",payload:{actorId:e.id}})}static async _handleReaction(e){let t=$(e.currentTarget).parents(".message").attr("data-message-id"),a=game.messages.get(t);switch(game.messages.get(a.flags.unopposeData.attackMessageId).flags.data.preData.source.type){case"skill":yt.showDialog(a);break;default:kt.showDialog(a)}}static async chatListeners(e){e.on("click",".unopposed-button",t=>{t.preventDefault(),this._handleReaction(t)})}static async hideReactionButton(e){if(e)if(game.user.isGM){let t=game.messages.get(e),a=$(t.content);a.find("button.unopposed-button").remove(),a=$("
").append(a),await t.update({content:a.html()})}else game.socket.emit("system.dsa5",{type:"hideQueryButton",payload:{id:e}})}static async completeOpposedProcess(e,t,a){await pe.postOpposed({attacker:e,defender:t,options:a});let s=await this.evaluateOpposedTest(e.testResult,t.testResult,a);return this.formatOpposedResult(s,e.speaker,t.speaker),this.rerenderMessagesWithModifiers(s,e,t),Hooks.call("finishOpposedTest",e,t,s,a),await this.finishOpposedTestHookAsync(e,t,s,a),this.playAutomatedJBA2(e,t,s),await this.renderOpposedResult(s,a),await this.hideReactionButton(a.startMessageId),s}static async finishOpposedTestHookAsync(e,t,a,s){}static async evaluateOpposedTest(e,t,a={}){let s={};if(s.other=[],a.additionalInfo&&s.other.push(a.additionalInfo),s.winner="attacker",["weapon","spell","liturgy","ceremony","ritual","combatskill"].includes(e.rollType)&&t.successLevel==null&&(t.successLevel=-5),e.rollType=="damage"&&(t.successLevel=-5,e.successLevel=1),t.successLevel!=null)switch(e.rollType){case"combatskill":case"talent":this._evaluateTalentOpposedRoll(e,t,s,a);break;case"ceremony":case"ritual":case"spell":case"liturgy":case"weapon":case"damage":this._evaluateWeaponOpposedRoll(e,t,s,a);break;default:ui.notifications.error("Can not oppose "+e.rollType),console.warn("Can not oppose "+e.rollType)}return s}static _evaluateWeaponOpposedRoll(e,t,a,s={}){if(e.successLevel>0&&t.successLevel<0){let i=this._calculateOpposedDamage(e,t,s);if(i.armorDamaged.damaged&&i.armorDamaged.ids.length){let c=i.armorDamaged.ids.join(";");a.other.push(`
`)}t.counterAttack&&(i.damage+=2,i.sum=i.damage-i.armor,i.tooltip=game.i18n.localize("LocalizedIDs.counterAttack")+" 2"),i.messages.length&&(i.tooltip||(i.tooltip=""),i.tooltip+=` ${i.messages.join("
")}`),a.winner="attacker";let n=[i.armorMod!=0?`${i.armorMod} ${game.i18n.localize("Modifier")}`:"",i.armorMultiplier!=1?`*${i.armorMultiplier} ${game.i18n.localize("Modifier")}`:"",i.spellArmor!=0?`${i.spellArmor} ${game.i18n.localize("spellArmor")}`:"",i.liturgyArmor!=0?`${i.liturgyArmor} ${game.i18n.localize("liturgyArmor")}`:""].join(""),l=`${game.combat?.isBrawling?game.i18n.localize("BRAWLING.temporary"):game.i18n.localize("damage")}: ${i.damage} - ${i.armor} = ${i.sum}`;a.damage={description:l,value:i.sum,sp:i.damage,armorMod:i.armorMod,armorMultiplier:i.armorMultiplier,spellArmor:i.spellArmor,liturgyArmor:i.liturgyArmor}}else a.winner="defender"}static _calculateOpposedDamage(e,t,a={}){let s=g.getSpeaker(t.speaker),i=[],n=e.damage,r=game.i18n.localize("LocalizedIDs.immuneToCrit");e.doubleDamage&&s.items.find(S=>S.name==r&&S.type=="trait")&&(n=Math.floor(n/e.doubleDamage),i.push(r)),a.origin=e.source,a.defender=s,a.damage=n,a.defenderTest=t,a.attackerTest=e;let{wornArmor:l,armor:c}=O.armorValue(s,a);a.armor=c;let d=Z.applyRollTransformation(s,a,pe.EVENTS.DAMAGE_TRANSFORMATION).options;c=d.armor;let m=d.damage,p=[],f=0,h=e.armorPen||[];for(let S of h)/^\*/.test(S)?p.push(Number(S.replace("*",""))):f+=Number(S);let y=0,k=0;["spell","ritual"].includes(e.source.type)?y+=s.system.spellArmor||0:["liturgy","ceremony"].includes(e.source.type)&&(y+=s.system.liturgyArmor||0),c+=f;let C=p.reduce((S,j)=>S*j,1);c=Math.max(Math.round(c*C),0),c+=y+k;let v=W.armorGetsDamage(m,e),I=l.map(S=>S.uuid);return{damage:m,armor:c,armorDamaged:{damaged:v,ids:I},armorMod:f,spellArmor:y,liturgyArmor:k,armorMultiplier:C,messages:i,sum:m-c}}static _evaluateTalentOpposedRoll(e,t,a,s={}){e.successLevel>0&&e.successLevel>t.successLevel?a.winner="attacker":e.qualityStep>t.qualityStep||e.result>=0&&t.result<0?(a.winner="attacker",a.differenceSL=e.qualityStep-t.qualityStep):(a.winner="defender",a.differenceSL=t.qualityStep-e.qualityStep)}static formatOpposedResult(e,t,a){let s=e.differenceSL?"winsFP":"wins";return e.winner=="attacker"?(e.result=game.i18n.format("OPPOSED."+s,{winner:t.alias,loser:a.alias,SL:e.differenceSL}),e.img=t.img):e.winner=="defender"&&(e.result=game.i18n.format("OPPOSED."+s,{winner:a.alias,loser:t.alias,SL:e.differenceSL}),e.img=a.img),e.speakerAttack=t,e.speakerDefend=a,e}static rerenderMessagesWithModifiers(e,t,a){let s=game.messages.get(t.messageId);this.showDamage(s,e.winner!="attacker")}static async renderOpposedResult(e,t={}){let a=game.settings.get("dsa5","hideOpposedDamageSelect");e.hideData=[1,2].includes(a),e.applyDamageInChat=game.settings.get("dsa5","applyDamageInChat"),e.isBrawling=game.combat?.isBrawling;let s=await renderTemplate("systems/dsa5/templates/chat/roll/opposed-result.html",e),i={user:game.user.id,content:s,flags:{opposeData:e,hideData:e.hideData},whisper:a>1?[]:t.whisper,blind:t.blind};t.target&&(i["flags.startMessageId"]=t.startMessageId),await ChatMessage.create(i)}static async resolveUndefended(e,t=""){let a=e.flags.unopposeData,s=game.messages.get(a.attackMessageId),i={speaker:s.speaker,testResult:s.flags.data.postData,messageId:a.attackMessageId};i.testResult.source=s.flags.data.preData.source,i.testResult.ammo&&i.testResult.source.effects.push(...i.testResult.ammo.effects);let n=canvas.tokens.get(a.targetSpeaker.token),r={speaker:a.targetSpeaker,testResult:{actor:n.actor,speaker:{token:a.targetSpeaker.token}}};await this.clearOpposed(n.actor),await this.completeOpposedProcess(i,r,{target:!0,startMessageId:e.id,additionalInfo:t}),game.user.isGM?await s.update({"flags.data.unopposedStartMessage":e.id}):await game.socket.emit("system.dsa5",{type:"updateAttackMessage",payload:{messageId:s.id,startMessageId:e.id}})}};var zt=class o extends foundry.applications.api.HandlebarsApplicationMixin(foundry.applications.api.ApplicationV2){static{u(this,"EquipmentDamageDialog")}static DEFAULT_OPTIONS={window:{title:"WEAR.checkShort"}};static PARTS={main:{template:"systems/dsa5/templates/dialog/dialog-reaction-attack.html"}};constructor(e){super(),this.items=e}async _prepareContext(e){let t=await super._prepareContext(e);return t.items=this.items.map(a=>({name:a.name,id:a.id,img:a.img})),t.title="WEAR.checkShort",t}_onRender(e,t){super._onRender(t),$(this.element).find(".reactClick").on("click",s=>{this.callbackResult(s),this.close()})}static async showDialog(e){new o(e).render(!0)}callbackResult(e){W.breakingTest(this.items.find(t=>t.id==e.currentTarget.dataset.value))}};var{getProperty:Ir,mergeObject:En}=foundry.utils,B=class o{static{u(this,"DSATables")}static async showBotchCard(e,t={}){t.speaker={token:e.token,actor:e.actor,scene:e.scene},t.source=e.source;let a=b.systemTables.find(i=>i.name==e.table),s=await o.getRollTable(a.pack[game.i18n.lang],game.i18n.localize(`TABLENAMES.${e.table}`),e);for(let i of s){let n=t.speaker?await o.hasEffect(i):!1,r=g.replaceDies(g.replaceConditions(i.results[0].text)),l=`${game.i18n.localize("TABLENAMES."+e.table)}`,c=await renderTemplate("systems/dsa5/templates/tables/tableCard.html",{result:r,title:l,hasEffect:n}),d=await this.buildEffects(i,n);ChatMessage.create({user:game.user.id,content:c,whisper:t.whisper,blind:t.blind,flags:{data:{preData:{source:{effects:d},extra:{actor:{id:t.speaker.actor},speaker:t.speaker},situationalModifiers:[]},postData:{}},dsa5:{hasEffect:n,options:t}}})}}static async hasEffect(e){return Ir(e.results[0],"flags.dsa5")||!1}static async buildEffects(e,t){let a=[];if(t&&t.resistEffect){let s=Array.isArray(t.resistEffect.fail)?t.resistEffect.fail:[t.resistEffect.fail];for(let i of s){let n=J.effectBaseDummy(i.description,t.resistEffect.changes||[],t.resistEffect.duration||{});i.systemEffect?En(n,{_id:"botchEffect",flags:{dsa5:{hideOnToken:!1,hidePlayers:!1,advancedFunction:2,args3:`await actor.addCondition("${i.systemEffect}", ${i.level||1});`}}}):i.command&&En(n,{_id:"botchEffect",flags:{dsa5:{hideOnToken:!1,hidePlayers:!1,advancedFunction:2,args3:i.command}}}),a.push(n)}}return a}static async getRollTable(e,t,a={}){let i=(await game.packs.get(e).getDocuments({name__in:[t]}))[0],n=await i.draw({displayChat:!1});return a.weaponless=="true"&&n.roll.total<7&&(n.roll.editRollAtIndex([{index:0,val:n.roll.total+5}]),n=await i.draw({displayChat:!1,roll:n.roll})),[n]}static async tableEnabledFor(e){let t=b.systemTables.find(a=>a.name==e);return t?game.settings.get(t.setting.module,t.setting.key):!1}static rollCritBotchButton(e,t,a){let s=game.i18n.localize(`TABLENAMES.${e}`),i=a.extra.speaker,n=a.source._id;return`, ${s}`}static async defaultBotch(){return", "+game.i18n.localize("selfDamage")+(await new Roll("1d6+2").evaluate()).total}static defaultAttackCrit(e){let t=", "+game.i18n.localize("halfDefense");return e&&(t+=", "+game.i18n.format("doubleDamage",{x:2})),t}static defaultParryCrit(){return", "+game.i18n.localize("attackOfOpportunity")}};var re=class o{static{u(this,"DSA5ChatAutoCompletion")}static skills=[];static cmds=["sk","at","pa","sp","li","rq","gc","w","ch"];constructor(){o.skills.length==0&&g.allSkills().then(e=>{o.skills=e.map(t=>({name:t.name,type:"skill"})).concat(Object.values(game.dsa5.config.characteristics).map(t=>({name:game.i18n.localize(t),type:"attribute"})).concat([{name:game.i18n.localize("regenerate"),type:"regeneration"},{name:game.i18n.localize("fallingDamage"),type:"fallingDamage"}]))}),this.filtering=!1,this.combatConstants={dodge:game.i18n.localize("dodge"),parryWeaponless:game.i18n.localize("parryWeaponless"),attackWeaponless:game.i18n.localize("attackWeaponless")}}get regex(){return new RegExp(`^/(${o.cmds.join(" |")})`)}async chatListeners(e){let t=this,a=e.find("#chat-message");e.on("keyup","#chat-message",async function(i){t._parseInput(i)}),e.on("click",".quick-item",async function(i){t._quickSelect($(i.currentTarget))}),a.on("keydown",function(i){t._navigateQuickFind(i)});let s=jQuery._data(a[0]).events.keydown;s.unshift(s.pop())}_parseInput(e){let t=e.target.value;if(this.regex.test(t)){if([38,40,13,9].includes(e.which))return!1;if(e.which==27)return this._closeQuickfind(e),!1;let a=this._getCmd(t),s=t.substring(1+a.length).toLowerCase().trim();this[`_filter${a}`](s,e),this.filtering=!0}else this._closeQuickfind(e)}_getCmd(e){return e.substring(1,3).toUpperCase().trim()}_completeCurrentEntry(e){$("#chat-message").val($("#chat-message").val().split(" ")[0]+" "+e.text())+""}_closeQuickfind(e){this.filtering=!1,$(e.currentTarget).closest("#chat-form").find(".quickfind").remove()}_filterW(e,t){let a=game.users.contents.filter(s=>s.active&&s.name.toLowerCase().trim().indexOf(e)!=-1).map(s=>({name:s.name,type:"user"}));this._checkEmpty(a),this._setList(a,"W",t)}_filterAT(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"],r=a.items.filter(l=>(i.includes(l.type)&&l.system.worn.value==!0||l.type=="trait"&&n.includes(l.system.traitType.value))&&l.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(l=>({name:l.name,type:"item"})).concat([{name:this.combatConstants.attackWeaponless,type:"item"}].filter(l=>l.name.toLowerCase().trim().indexOf(e)!=-1));this._checkEmpty(r),this._setList(r,"AT",t)}}_filterPA(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["meleeweapon"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1&&r.system.worn.value==!0).slice(0,5).map(r=>({name:r.name,type:"item"})).concat([{name:this.combatConstants.dodge,type:"item"},{name:this.combatConstants.parryWeaponless,type:"item"}].filter(r=>r.name.toLowerCase().trim().indexOf(e)!=-1));this._checkEmpty(n),this._setList(n,"PA",t)}}_filterSP(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["spell","ritual"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(r=>({name:r.name,type:"item"}));this._checkEmpty(n),this._setList(n,"SP",t)}}_checkEmpty(e){e.length||e.push({name:game.i18n.localize("DSAError.noMatch"),type:"none"})}_filterLI(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["liturgy","ceremony"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(r=>({name:r.name,type:"item"}));this._checkEmpty(n),this._setList(n,"LI",t)}}_getSkills(e,t=void 0){e=e.replace(/(-|\+)?\d+/g,"").trim();let a=o.skills.filter(s=>s.name.toLowerCase().trim().indexOf(e)!=-1&&(t==null||t==s.type)).slice(0,5);return this._checkEmpty(a),a}_filterCH(e,t){this._setList(this._getSkills(e),"CH",t)}_filterSK(e,t){this._setList(this._getSkills(e),"SK",t)}_filterRQ(e,t){this._setList(this._getSkills(e),"RQ",t)}_filterGC(e,t){this._setList(this._getSkills(e,"skill"),"GC",t)}_setList(e,t,a){let s=$(`
    ${e.map(r=>`
  • ${r.name}
  • `).join("")}
`);s.find(".quick-item:first").addClass("focus");let i=$(a.currentTarget).closest("#chat-form"),n=i.find(".quickfind");n.length?n.replaceWith(s):i.append(s)}_navigateQuickFind(e){if(this.filtering){let t=$(e.currentTarget).closest("#chat-form").find(".focus");switch(e.which){case 38:return t.prev(".quick-item").length&&t.removeClass("focus").prev(".quick-item").addClass("focus"),!1;case 40:return t.next(".quick-item").length&&t.removeClass("focus").next(".quick-item").addClass("focus"),!1;case 13:if(t.attr("data-category")=="W")break;return e.stopPropagation(),e.preventDefault(),this._quickSelect(t),!1;case 9:return e.stopPropagation(),e.preventDefault(),this._completeCurrentEntry(t),!1}}return!0}static _getActor(){let e=ChatMessage.getSpeaker(),t;return e.token&&(t=game.actors.tokens[e.token]),t||(t=game.actors.get(e.actor)),t?{actor:t,tokenId:e.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}_quickSelect(e){let t=e.attr("data-category");switch(t){case"NM":case"GC":case"RQ":case"CH":this[`_quick${t}`](e);break;case"W":this._completeCurrentEntry(e);break;default:let{actor:a,tokenId:s}=o._getActor();a&&(this._resetChatAutoCompletion(e),this[`_quick${t}`](e,a,s))}}_quickW(e,t,a){}_quickCH(e){le.check3D20(e),this._resetChatAutoCompletion(e)}_quickSK(e,t,a){switch(e.attr("data-type")){case"skill":let s=t.items.find(n=>n.name==e.text()&&n.type=="skill");s&&t.setupSkill(s,{},a).then(n=>{t.basicTest(n)});break;case"attribute":let i=Object.keys(game.dsa5.config.characteristics).find(n=>game.i18n.localize(game.dsa5.config.characteristics[n])==e.text());t.setupCharacteristic(i,{},a).then(n=>{t.basicTest(n)});break;case"regeneration":t.setupRegeneration("regenerate",{},a).then(n=>{t.basicTest(n)});break}}_resetChatAutoCompletion(e){let t=e.closest("#chat-form");t.find("#chat-message").val(""),t.find(".quickfind").remove()}_quickGC(e){let t=Number($("#chat-message").val().match(/(-|\+)?\d+/g))||0;this._resetChatAutoCompletion(e),ie.showGCMessage(e.text(),t)}_quickRQ(e){let t=Number($("#chat-message").val().match(/(-|\+)?\d+/g))||0;this._resetChatAutoCompletion(e),ie.showRQMessage(e.text(),t)}_quickPA(e,t,a){let s=e.text();if(this.combatConstants.dodge==s)t.setupDodge({},a).then(i=>{t.basicTest(i)});else if(this.combatConstants.parryWeaponless==s)t.setupWeaponless("parry",{},a).then(i=>{t.basicTest(i)});else{let i=["meleeweapon"],n=t.items.find(r=>i.includes(r.type)&&r.name==e.text());n&&t.setupWeapon(n,"parry",{},a).then(r=>{t.basicTest(r)})}}_quickAT(e,t,a){let s=e.text();if(this.combatConstants.attackWeaponless==s)t.setupWeaponless("attack",{},a).then(i=>{t.basicTest(i)});else{let i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"],r=t.items.find(l=>i.includes(l.type)&&l.name==e.text());r||(r=t.items.find(l=>l.type=="trait"&&l.name==e.text()&&n.includes(l.system.traitType.value))),r&&t.setupWeapon(r,"attack",{},a).then(l=>{t.basicTest(l)})}}_quickSP(e,t,a){let s=["ritual","spell"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.text());i&&t.setupSpell(i,{},a).then(n=>{t.basicTest(n)})}_quickLI(e,t,a){let s=["liturgy","ceremony"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.text());i&&t.setupSpell(i,{},a).then(n=>{t.basicTest(n)})}static async infoItemAsync(e){(await fromUuid(e)).postItem()}static bindRollCommands(e){e.on("click",".request-roll",s=>{let i=s.currentTarget.dataset;return ie.showRQMessage(i.name,Number(i.modifier)||0,i.label),s.stopPropagation(),!1}),e.on("click",".postInfo",s=>{let i=fromUuidSync(s.currentTarget.dataset.uuid);return i&&(typeof i.postItem=="function"?i.postItem():this.infoItemAsync(s.currentTarget.dataset.uuid)),s.stopPropagation(),!1}),e.on("click",".postContentChat",async s=>{let i=$(s.currentTarget).closest(".postChatSection").find(".postChatContent").html();ft.getDialog(i)}),e.on("click",".request-GC",s=>(ie.showGCMessage(s.currentTarget.dataset.name,Number(s.currentTarget.dataset.modifier)||0),s.stopPropagation(),!1)),e.on("click",".request-CH",s=>(le.check3D20($(s.currentTarget),s.currentTarget.dataset.name,{modifier:Number(s.currentTarget.dataset.modifier)||0}),s.stopPropagation(),!1)),e.on("click",".request-Pay",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.doPayment(i.selectedIDs(),!0,s.currentTarget.dataset.modifier)}),e.on("click",".request-GetPaid",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.doPayment(i.selectedIDs(),!1,s.currentTarget.dataset.modifier)}),e.on("click",".request-AP",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.getExp(i.selectedIDs(),s.currentTarget.dataset.modifier)});let t=u(s=>{s.stopPropagation();let i=s.currentTarget.dataset.type,n=s.currentTarget.dataset.uuid;!n||!i||s.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:i,uuid:n}))},"itemDragStart"),a=e.find(".show-item");a.click(async s=>{let i=s.currentTarget.dataset.uuid;(await fromUuid(i)).sheet.render(!0)}),a.attr("draggable",!0).on("dragstart",s=>t(s)),e.on("click",".actorEmbeddedAbility",async s=>{let n=(await fromUuid(s.currentTarget.dataset.actor)).items.get(s.currentTarget.dataset.id);n&&n.sheet.render(!0)})}};var{mergeObject:Er}=foundry.utils,ie=class o{static{u(this,"RequestRoll")}static async requestGC(e,t,a,s=0){let{actor:i,tokenId:n}=re._getActor();if(!i)return;game.user.updateTokenTargets([]);let r={modifier:s,postFunction:{cummulative:a,functionName:"game.dsa5.apps.RequestRoll.autoEditGroupCheckRoll"}};switch(e){case"attribute":break;default:let l=i.items.find(c=>c.name==t&&c.type==e);i.setupSkill(l,r,n).then(async c=>{let d=await i.basicTest(c);await o.editGroupCheckRoll(a,d,t,e)})}}static async autoEditGroupCheckRoll(e,t,a){await o.editGroupCheckRoll(e.cummulative,t,a.name,a.type)}static async editGroupCheckRoll(e,t,a,s){let i=await game.messages.get(e),n=i.flags,l=t.result.successLevel>1?2:1;n.botched=n.botched||t.result.successLevel<-1;let c=g.getSpeaker(t.result.speaker),d={messageId:t.result.messageId,actor:c.name,qs:(t.result.qualityStep||0)*l,success:t.result.successLevel,target:a,type:s},m=n.results.findIndex(p=>p.messageId==d.messageId);m>=0?n.results[m]=d:n.results.push(d),o.rerenderGC(i,n)}static async requestRoll(e,t,a=0,s={}){let{actor:i,tokenId:n}=re._getActor();if(i)switch(game.user.updateTokenTargets([]),s.modifier=a,e){case"attribute":let r=Object.keys(game.dsa5.config.characteristics).find(c=>game.i18n.localize(game.dsa5.config.characteristics[c])==t);i.setupCharacteristic(r,s,n).then(c=>{i.basicTest(c)});break;case"regeneration":i.setupRegeneration("regenerate",s,n).then(c=>{i.basicTest(c)});break;case"fallingDamage":i.setupFallingDamage(s,n);break;default:let l=i.items.find(c=>c.name==t&&c.type==e);i.setupSkill(l,s,n).then(c=>{i.basicTest(c)})}}static async rerenderGC(e,t){if(game.user.isGM){let a=0;t.qs=t.results.reduce((i,n)=>(a+=n.success<0?1:0,n.success>1&&(a=0),i+n.qs),0),t.failed=a;for(let i of t.rollOptions)i.calculatedModifier=i.modifier-a;t.openRolls=t.maxRolls-t.results.length,t.doneRolls=t.results.length;let s=await renderTemplate("systems/dsa5/templates/chat/roll/groupcheck.html",t);e.update({content:s,flags:t})}else game.socket.emit("system.dsa5",{type:"updateGroupCheck",payload:{messageId:e.id,data:t}});$("#chat-log").find(`[data-message-id="${e.id}"`).appendTo("#chat-log")}static showRQMessage(e,t=0,a=void 0){let s=t<0?` ${t}`:t>0?` +${t}`:"",i=re.skills.find(r=>r.name==e).type,n=game.i18n.format("CHATNOTIFICATION.requestRoll",{user:game.user.name,item:` ${a||e}${s}`});ChatMessage.create(g.chatDataSetup(n))}static async showGCMessage(e,t=0,a={}){let s=re.skills.find(l=>l.name==e).type,i={results:[],qs:0,failed:0,modifier:t,name:game.user.name,maxRolls:7,openRolls:7,doneRolls:0,targetQs:10,rollOptions:[{type:s,modifier:t,calculatedModifier:t,target:e}]};Er(i,a);let n=await renderTemplate("systems/dsa5/templates/chat/roll/groupcheck.html",i),r=g.chatDataSetup(n);r.flags=i,ChatMessage.create(r)}static async addSkillToGC(e){let t=$(e.currentTarget).parents(".message").attr("data-message-id"),a=await renderTemplate("systems/dsa5/templates/dialog/addgroupcheckskill.html",{skills:re.skills.filter(i=>i.type=="skill").sort((i,n)=>i.name.localeCompare(n.name))}),s={title:game.i18n.localize("HELP.groupcheck"),content:a,buttons:{ok:{icon:'',label:game.i18n.localize("ok"),callback:u(async i=>{let n=game.messages.get(t),r=n.flags;r.rollOptions.push({type:"skill",modifier:i.find('[name="modifier"]').val(),target:i.find('[name="skill"]').val()}),o.rerenderGC(n,r)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}}};new ae(s).render(!0)}static async removeGCEntry(e){let t=$(e.currentTarget),a=Number(e.currentTarget.dataset.index),s=game.messages.get(t.parents(".message").attr("data-message-id")),i=s.flags;i.results.splice(a,1),o.rerenderGC(s,i)}static removeSkillFromGC(e){let t=$(e.currentTarget),a=game.messages.get(t.parents(".message").attr("data-message-id")),s=a.flags;s.rollOptions=s.rollOptions.filter(i=>!(i.type==e.currentTarget.dataset.type&&i.target==e.currentTarget.dataset.name)),s.results=s.results.filter(i=>!(i.type==e.currentTarget.dataset.type&&i.target==e.currentTarget.dataset.name)),o.rerenderGC(a,s)}static async editGC(e){let t=$(e.currentTarget),a=Number(e.currentTarget.dataset.index),s=game.messages.get(t.parents(".message").attr("data-message-id")),i=s.flags;if(a)i.results[a].qs=Number(t.val());else if(e.currentTarget.dataset.name){let n=i.rollOptions.find(r=>r.target==e.currentTarget.dataset.name&&e.currentTarget.dataset.type==r.type);n[e.currentTarget.dataset.field]=Number(t.val())}else i[e.currentTarget.dataset.field]=Number(t.val());o.rerenderGC(s,i)}static async updateInformationRoll(e,t,a){let s=[],i=await fromUuid(e.uuid),n=t.result.qualityStep||0;for(let r=1;r<=n;r++){let l=`qs${r}`;i.system[l]&&s.push(i.system[l])}if(t.result.successLevel>1&&i.system.crit?s.push(i.system.crit):t.result.successLevel<-1&&i.system.botch?s.push(i.system.botch):i.system.fail&&!n&&s.push(i.system.fail),s.length>0){await Promise.all(s.map(async l=>await TextEditor.enrichHTML(l,{async:!0}))),s.unshift(`

${i.name}

`);let r=g.chatDataSetup(s.join(""));e.recipients.length&&(r.whisper=e.recipients),ChatMessage.create(r)}}static async informationRequestRoll(e){let t=e.currentTarget.dataset.mod,a=e.currentTarget.dataset.uuid,{actor:s,tokenId:i}=re._getActor();if(!s)return;let n=game.settings.get("dsa5","informationDistribution"),r=[];n==1?(r=game.users.filter(d=>d.isGM).map(d=>d.id),r.push(game.user.id)):n==2&&(r=game.users.filter(d=>d.isGM).map(d=>d.id));let l={modifier:t,postFunction:{functionName:"game.dsa5.apps.RequestRoll.updateInformationRoll",uuid:a,recipients:r}},c=s.items.find(d=>d.name==e.currentTarget.dataset.skill&&d.type=="skill");s.setupSkill(c,l,i).then(async d=>{d.testData.opposable=!1;let m=await s.basicTest(d);this.updateInformationRoll(l.postFunction,m)})}static chatListeners(e){e.on("change",".editGC",t=>o.editGC(t)),e.on("mousedown",".request-roll",t=>{let a=t.currentTarget.dataset,s={};if(t.button==2){let i=0,n=$(t.currentTarget).closest(".chat-message"),r=setInterval(function(){i++;let l=n.find("nav");l.length>0&&(l.remove(),clearInterval(r)),i>=20&&clearInterval(r)},10);s.rollMode="blindroll"}o.requestRoll(a.type,a.name,Number(a.modifier)||0,s)}),e.on("click",".request-gc",t=>{let a=t.currentTarget.dataset;o.requestGC(a.type,a.name,$(t.currentTarget).parents(".message").attr("data-message-id"),Number(a.modifier)||0)}),e.on("click",".removeGC",t=>o.removeGCEntry(t)),e.on("click",".removeSkillFromGC",t=>o.removeSkillFromGC(t)),e.on("click",".addSkillToGC",t=>o.addSkillToGC(t)),e.on("click",".informationRequestRoll",t=>o.informationRequestRoll(t))}};var{getProperty:da,duplicate:$r,mergeObject:Or}=foundry.utils,Nt=class o{static{u(this,"TableEffects")}static async applyEffect(e,t){let a=game.messages.get(e),s=da(a,"flags.dsa5.hasEffect"),i=da(a,"flags.dsa5.options")||{};if(s){let n=["damageModifier","gearDamaged","gearLost","resistEffect","malus","selfDamage","nextAction"],r=[],l;if(t=="self"){let d=g.getSpeaker(i.speaker);r.push(d),l=i.source?d.items.get(i.source):void 0}else r=Array.from(game.user.targets).map(d=>d.actor);for(let d of n){let m=da(s,d);m&&(await o[d](m,t,r,l,e,a)||console.warn(`Table effect for <${d} not working yet`,m,t,r,l))}let c=game.i18n.format("ActiveEffects.appliedEffect",{source:game.i18n.localize("table"),target:r.map(d=>d.name).join(", ")});await a.update({content:a.content.replace(/hideAnchor">/,`hideAnchor">`)})}}static async damageModifier(e,t,a,s){}static async nextAction(e,t,a,s){}static async opportunityAttack(e,t,a,s){}static async gearDamaged(e,t,a,s){if(s&&["meleeweapon","rangeweapon"].includes(s.type)){let i=da(s,"system.effect.attributes")||"";return new RegExp(`(${x.magical}|${x.clerical})`,"i").test(i)?await s.update({"system.worn.value":!1}):await W.absoluteDamageLevelToItem(s,e),!0}}static async gearLost(e,t,a,s){if(s&&["meleeweapon","rangeweapon"].includes(s.type)){if(await s.update({"system.worn.value":!1}),e.distance){let i=await new Roll(e.distance).evaluate(),n=await i.render(),r=game.i18n.format("WEAPON.dropped",{distance:i.total});ChatMessage.create(g.chatDataSetup(`

${r}

${n}`))}return!0}}static async resistEffect(e,t,a,s,i){for(let n of a){let r=[{skill:e.roll,mod:e.modifier||0,effect:{_id:"botchEffect",name:e.fail.description},target:n,token:n.token?n.token.id:void 0}];Z.createResistRollMessage(r,i,t)}return!0}static evaluateTargetArg(e,t){let a=t,s=!0;if(e.target=="victim"){let i=Array.from(game.user.targets).map(n=>n.actor);i.length?a=i:(s=!1,ui.notifications.warn("DSAError.noVictim",{localize:!0}))}return{hasTargets:s,finalTargets:a}}static async malus(e,t,a,s){for(let i of e){let{hasTargets:n,finalTargets:r}=this.evaluateTargetArg(i,a),l=!n&&i.noTarget,c=l?i.noTarget.systemEffect:i.systemEffect,d=l?i.noTarget.level:i.level||1,m=l?i.noTarget.changes:i.changes,p=l?i.noTarget.duration:i.duration;if(c){let f=CONFIG.statusEffects.find(y=>y.id==c);if(!m){m=$r(f.changes||[]);let y=m.find(k=>k.key==`system.condition.${c}`);y&&(y.value=d)}let h;if(m){let y=game.i18n.localize(`CONDITION.${c}`)+" - "+game.i18n.localize("botchCritEffect");h=J.effectBaseDummy(y,m,p||{}),h.icon=f.icon}else h=c;for(let y of r)await y.addCondition(h);return!0}else if(m){let f=J.effectBaseDummy(game.i18n.localize("botchCritEffect"),m||[],p||{});Or(f,{flags:{dsa5:{hideOnToken:!1,hidePlayers:!1}}});for(let h of r)await h.addCondition(f);return!0}}}static async selfAttack(e,t,a,s){let{hasTargets:i,finalTargets:n}=this.evaluateTargetArg(e,a)}static async selfDamage(e,t,a,s){let{hasTargets:i,finalTargets:n}=this.evaluateTargetArg(e,a);if(s){let r=g.toObjectIfPossible(s);for(let l of n){let c=l.items.filter(f=>f.type=="combatskill").map(f=>O._calculateCombatSkillValues(f.toObject(),l.system)),d;e.damage?d={damagedie:e.damage,damageAdd:""}:s.type=="rangeweapon"?d=O._prepareRangeWeapon(r,[],c,l):s.type=="meleeweapon"?d=O._prepareMeleeWeapon(r,c,l):d=s.system.traitType.value=="meleeAttack"?O._prepareRangeTrait(r,l.system):O._prepareMeleetrait(r,l.system);let m=(d.damagedie+d.damageAdd).replace(/wWD/g,"d"),p=await new Roll(`(${m})*${e.multiplier||1}${e.modifier||""}`).evaluate();await l.applyDamage(Math.round(p.total)),ChatMessage.create(g.chatDataSetup(await p.render()))}return!0}else{for(let r of n){let l=await new Roll("1d6").evaluate();await r.applyDamage(Math.round(l.total)),ChatMessage.create(g.chatDataSetup(await l.render()))}return!0}}};var{getProperty:ma}=foundry.utils,wt=u(async(o,e,t=1)=>{let a=game.messages.get(o[0].dataset.messageId),s=a.flags.opposeData,i=s?.speakerDefend,n=g.getSpeaker(i);if(!n.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});await n.applyDamage(s.damage[e]*t);let r={"flags.data.damageApplied":!0,content:a.content.replace(/hideAnchor">/,`hideAnchor">`)};game.user.isGM?await a.update(r):game.socket.emit("system.dsa5",{type:"updateMsg",payload:{id:o[0].dataset.messageId,updateData:r}})},"applyDamage");function $n(){let o=u((A,M)=>g.fateAvailable(A,M),"fateAvailable"),e=u(function(A,M="damage.value"){let T=game.messages.get(A[0].dataset.messageId).flags.opposeData,L=T?g.getSpeaker(T.speakerDefend)?.isOwner:!1;return((game.user.isGM||L)&&A.find(".opposed-card").length||A.find(".dice-roll").length)&&(ma(T,M)||0)>0},"canHurt"),t=u(function(A){return e(A,"damage.sp")},"canHurtSP"),a=u(function(A){let M=game.messages.get(A[0].dataset.messageId);return M.speaker.actor&&M.flags.data&&(game.actors.get(M.speaker.actor).isOwner||game.user.isGM)?["liturgy","ceremony","spell","ritual","magicalsign"].includes(M.flags.data.preData.source.type)||ma(M.flags.data.preData,"calculatedSpellModifiers.costsMana"):!1},"canCostMana"),s=u(function(A){if(!(game.user.isGM&&game.settings.get("dsa5","hideOpposedDamageSelect")))return!1;let M=game.messages.get(A[0].dataset.messageId);return"hideData"in M.flags&&M.flags.hideData},"canUnhideData"),i=u(function(A){if(!(game.user.isGM&&game.settings.get("dsa5","hideOpposedDamageSelect")))return!1;let M=game.messages.get(A[0].dataset.messageId);return"hideData"in M.flags&&!M.flags.hideData},"canHideData"),n=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data&&T.flags.data.postData.successLevel>-2){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M)){let q=T.flags.data.preData.source.type,ve=T.flags.data.preData.mode||"";["skill","spell","liturgy","ritual","ceremony"].includes(q)&&(q="char");let Te=game.i18n.localize(`SCHIPSKILLS.${q}${ve}`);return!T.flags.data.fateImproved&&L.items.getName(Te)}}return!1},"canImproveRoll"),r=u(function(A){return n(A,!0)},"canImproveRollGroup"),l=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M)&&!T.flags.data.fatePointAddQSUsed)return T.flags.data.postData.successLevel>0&&T.flags.data.postData.qualityStep!=null}return!1},"canIncreaseQS"),c=u(function(A){return l(A,!0)},"canIncreaseQSGroup"),d=u(function(A){let M=game.messages.get(A[0].dataset.messageId);if(M.speaker.actor&&M.flags.data){let T=game.actors.get(M.speaker.actor);if(T.isOwner)return T.items.find(L=>L.name==`${game.i18n.localize("LocalizedIDs.aptitude")} (${M.flags.data.preData.source.name})`)!=null&&!M.flags.data.talentedRerollUsed}return!1},"isTalented"),m=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M))return T.flags.data.postData.damageRoll!=null&&!T.flags.data.fatePointDamageRerollUsed}return!1},"canRerollDamage"),p=u(function(A){return m(A,!0)},"canRerollDamageGroup"),f=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M))return!T.flags.data.fatePointRerollUsed&&T.flags.data.postData.rollType!="regenerate"}return!1},"canReroll"),h=u(function(A){return f(A,!0)},"canRerollGroup"),y=u(function(A){let M=game.messages.get(A[0].dataset.messageId);return M.speaker.actor&&M.flags.data&&game.actors.get(M.speaker.actor).isOwner&&["LeP","KaP","AsP"].some(L=>ma(M.flags,`data.postData.${L}`)!=null)?!M.flags.data.healApplied:!1},"canHeal"),k=u(function(A){if(game.user.isGM){let M=game.messages.get(A[0].dataset.messageId);if("hideData"in M.flags){let T=!M.flags.hideData,L=$(M.content);L.find(".hideAnchor")[T?"addClass":"removeClass"]("hideData"),L=$("
").append(L),M.update({content:L.html(),"flags.hideData":T})}}},"showHideData"),C=u(A=>{let M=game.messages.get(A.data("messageId"));return!M||!canvas.tokens?!1:M.isRoll&&M.isContentVisible&&canvas.tokens.controlled.length&&A.find(".dice-roll").length},"canApplyDefaultRolls"),v=u((A,M,T=0)=>{let L=game.messages.get(A[0].dataset.messageId);game.actors.get(L.speaker.actor).useFateOnRoll(L,M,T)},"useFate"),I=u((A,M,T=1)=>{let q=game.messages.get(A.data("messageId")).rolls[0];return Promise.all(canvas.tokens.controlled.map(ve=>{let Te=ve.actor,qe=Math.round((M!="sp"?q.total-O.armorValue(Te).armor:q.total)*T);return Te.applyDamage(Math.max(0,qe))}))},"applyChatCardDamage"),S=u(async A=>{let M=game.messages.get(A[0].dataset.messageId),T=M.flags.data,L=g.getSpeaker(M.speaker);if(!L.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});let q=T.preData.calculatedSpellModifiers.maintainCost.trim(),ve=["ritual","spell"].includes(T.preData.source.type)||ma(T.preData.calculatedSpellModifiers,"costsMana")?"AsP":"KaP",Te=await L.applyMana(T.preData.calculatedSpellModifiers.finalcost,ve);if(q&&q!=0&&Te&&T.postData.successLevel>0){let qe=T.preData.source.name;try{let St=q.match(/^\d{1,3}/)[0],lt=q.replace(/^\d{1,3}/,"").match(/\d{1,3}/);lt=lt&&Number(lt[0])||1;let ct={name:`${qe} (${game.i18n.localize("maintainCost")})`,img:"icons/svg/daze.svg",flags:{dsa5:{description:q,maintain:St,payType:ve}},changes:[],duration:{}},Zt=[{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.combatRounds"),"gi"),seconds:5},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.minutes"),"gi"),seconds:60},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.hours"),"gi"),seconds:3600},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.days"),"gi"),seconds:3600*24},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.seconds"),"gi"),seconds:1},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.weeks"),"gi"),seconds:3600*24*7},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.months"),"gi"),seconds:3600*24*30},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.years"),"gi"),seconds:3600*24*350}];for(let At of Zt)if(At.regEx.test(q)){let w=Number(lt)*At.seconds;ct.duration.seconds=w,ct.duration.rounds=ct.duration.seconds/5;break}await L.addCondition(ct)}catch{console.error(`Could not parse duration '${q}' of '${qe}'`)}}await M.update({"flags.data.manaApplied":!0,content:M.content.replace(//,'')})},"payMana"),j=u(()=>game.i18n.localize(game.combat?.isBrawling?"CHATCONTEXT.ApplyDamagePP":"CHATCONTEXT.ApplyDamage"),"applyDamageLabel");Hooks.on("getChatLogEntryContext",(A,M)=>{M.push({name:"CHATCONTEXT.hideData",icon:'',condition:i,callback:u(T=>{k(T)},"callback")},{name:"CHATCONTEXT.showData",icon:'',condition:s,callback:u(T=>{k(T)},"callback")},{name:"regenerate",icon:'',condition:y,callback:u(async T=>{let L=await game.messages.get(T[0].dataset.messageId),q=g.getSpeaker(L.speaker);if(!q.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});await L.update({"flags.data.healApplied":!0,content:L.content.replace(/<\/div>$/,'
')}),await q.applyRegeneration(L.flags.data.postData.LeP,L.flags.data.postData.AsP,L.flags.data.postData.KaP)},"callback")},{name:"CHATCONTEXT.ApplyMana",icon:'',condition:a,callback:u(async T=>{S(T)},"callback")},{name:j(),icon:'',condition:e,callback:u(T=>{wt(T,"value")},"callback")},{name:"CHATCONTEXT.ApplyDamageSP",icon:'',condition:t,callback:u(T=>{wt(T,"sp")},"callback")},{name:j(),icon:'',condition:C,callback:u(T=>{I(T,"value")},"callback")},{name:"CHATCONTEXT.ApplyDamageSP",icon:'',condition:C,callback:u(T=>{I(T,"sp")},"callback")},{name:"CHATCONTEXT.Reroll",icon:'',condition:f,callback:u(T=>{v(T,"reroll")},"callback")},{name:"CHATCONTEXT.RerollGroup",icon:'',condition:h,callback:u(T=>{v(T,"reroll",1)},"callback")},{name:"CHATCONTEXT.talentedReroll",icon:'',condition:d,callback:u(T=>{v(T,"isTalented")},"callback")},{name:"CHATCONTEXT.AddQS",icon:'',condition:l,callback:u(T=>{v(T,"addQS")},"callback")},{name:"CHATCONTEXT.AddQSGroup",icon:'',condition:c,callback:u(T=>{v(T,"addQS",1)},"callback")},{name:"CHATCONTEXT.rerollDamage",icon:'',condition:m,callback:u(T=>{v(T,"rerollDamage")},"callback")},{name:"CHATCONTEXT.rerollDamageGroup",icon:'',condition:p,callback:u(T=>{v(T,"rerollDamage",1)},"callback")},{name:"CHATCONTEXT.improveFate",icon:'',condition:n,callback:u(T=>{v(T,"Improve")},"callback")},{name:"CHATCONTEXT.improveFateGroup",icon:'',condition:r,callback:u(T=>{v(T,"Improve",1)},"callback")}),game.settings.get("dsa5","doubleDamageOptions")&&M.push({name:j()+" x2",icon:'',condition:e,callback:u(T=>{wt(T,"value",2)},"callback")},{name:game.i18n.localize("CHATCONTEXT.ApplyDamageSP")+" x2",icon:'',condition:t,callback:u(T=>{wt(T,"sp",2)},"callback")},{name:j()+" x2",icon:'',condition:C,callback:u(T=>{I(T,"value",2)},"callback")},{name:game.i18n.localize("CHATCONTEXT.ApplyDamageSP")+" x2",icon:'',condition:C,callback:u(T=>{I(T,"sp",2)},"callback")})})}u($n,"chatContext");var{mergeObject:oe,deepClone:On,duplicate:xr,getProperty:$e}=foundry.utils,R=class _DiceDSA5{static{u(this,"DiceDSA5")}static async rollTest(o){let e;switch(o.source.type){case"ceremony":case"ritual":case"liturgy":case"spell":e=await this.rollSpell(o);break;case"skill":e=await this.rollTalent(o);break;case"combatskill":e=await this.rollCombatskill(o);break;case"trait":o.mode=="parry"&&await this.updateDefenseCount(o),e=o.mode=="damage"?await this.rollDamage(o):await this.rollCombatTrait(o);break;case"regenerate":e=await this.rollRegeneration(o);break;case"meleeweapon":case"rangeweapon":o.mode=="parry"&&await this.updateDefenseCount(o),e=o.mode=="damage"?await this.rollDamage(o):await this.rollWeapon(o);break;case"dodge":await this.updateDefenseCount(o),e=await this.rollStatus(o);break;case"poison":case"disease":e=await this.rollItem(o);break;case"fallingDamage":e=await this.rollFallingDamage(o);break;default:e=await this.rollAttribute(o)}return oe(e,On(o.extra)),e}static async rollDices(o,e){if(!o.roll){let t=game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration,a;switch(o.source.type){case"liturgy":case"spell":case"ceremony":case"ritual":case"skill":a=await new Roll("1d20+1d20+1d20").evaluate(),oe(a.dice[0].options,t(o.source.system.characteristic1.value)),oe(a.dice[1].options,t(o.source.system.characteristic2.value)),oe(a.dice[2].options,t(o.source.system.characteristic3.value));break;case"regenerate":let s=[];o.regenerateLeP&&s.push([game.settings.get("dsa5","lessRegeneration")?"1d3":"1d6"]),o.extra.actor.isMage&&o.regenerateAsP&&s.push("1d6"),o.extra.actor.isPriest&&o.regenerateKaP&&s.push("1d6"),a=await new Roll(s.join("+")).evaluate(),o.regenerateLeP&&oe(a.dice[0].options,t("mu")),o.extra.actor.isMage&&o.regenerateAsP&&oe(a.dice[s.length-1].options,t("ge")),o.extra.actor.isPriest&&o.regenerateKaP&&oe(a.dice[s.length-1].options,t("in")),o.extra.actor.isMage&&o.regenerateAsP&&o.extra.actor.isPriest&&o.regenerateKaP&&oe(a.dice[s.length-2].options,t("ge"));break;case"meleeweapon":case"rangeweapon":case"weaponless":case"combatskill":case"trait":if(o.mode=="damage"){let l=await this.damageFormula(o);a=await new Roll(l,o.extra.actor.system).evaluate();for(let c=0;c{r.actor&&n.push({name:r.actor.name,id:r.id,img:r.actor.img})}),oe(o.data,{hasSituationalModifiers:i.length>0,situationalModifiers:i,attributesList:["mu","kl","in","ch","ff","ge","ko","kk"].reduce((r,l)=>(r[l]=game.i18n.localize(`CHARAbbrev.${l.toUpperCase()}`),r),{}),rollMode:o.data.rollMode||a,defenseCount:await this.getDefenseCount(e),targets:n}),t.user=game.user.id,e.extra.options.bypass)return t.rollMode=e.extra.options.rollMode||a,e.situationalModifiers||(e.situationalModifiers=[]),{testData:e,cardOptions:t,dialogOptions:o};{let r=ae.getDialogForItem(e,o.data),l=await renderTemplate(o.template,o.data);return new Promise((c,d)=>{new r({title:o.title,content:l,buttons:r.getRollButtons(e,o,c,d),default:"rollButton"}).recallSettings(e.extra.speaker,e.source,e.mode,o.data).render(!0)})}}static async getDefenseCount(o){return game.combat?await game.combat.getDefenseCount(o.extra.speaker):0}static async getDuplicatusRoll(o,e){let t=e.situationalModifiers.find(a=>a.name.includes("Duplicatus")&&a.value>0&&a.value<5);if(t){let a=Math.round(1/(t.value+1)*20),s=await _DiceDSA5.manualRolls(await new Roll("1d20").evaluate());this._addRollDiceSoNice(e,s,game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("ch"));let i=a>=s._total,n=`
Duplicatus-${game.i18n.localize("Roll")}: ${s._total}0&&(o.description=`${game.i18n.localize("Failure")}, ${game.i18n.localize("CHATNOTIFICATION.duplicatus")}`,o.successLevel=0)}}static async _rollConfirm(){return await new Roll("1d20").evaluate()}static async _rollSingleD20(o,e,t,a,s,i="",n=1){let r="";e=Math.round((e+a)*n);let l=o.total??o._total,c=game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration(t),d=e-l>=0,m=[{char:t,res:l,suc:d,tar:e}],p=d?1:-1,f=20,h=1,y={meleeweapon:"meleeStats",rangeweapon:"rangeStats"}[s.source.type];y&&(f=Math.min(s.extra.actor.system[y].botch,s.source.system.botch),h=Math.max(s.extra.actor.system[y].crit,s.source.system.crit)),N.improvisedWeapon.test(s.source.name)&&(F.hasAbility(s.extra.actor,game.i18n.localize("LocalizedIDs.improvisedWeaponMaster"))||(f=Math.min(19,f)),this._appendSituationalModifiers(s,`${game.i18n.localize("CHAR.ATTACK")} - ${game.i18n.localize("WEAPON.improvised")}`,2,"defenseMalus")),s.situationalModifiers.find(v=>v.name==game.i18n.localize("MODS.opportunityAttack")&&v.value!=0)&&(f=50,h=-50);let k=l<=h,C=l>=f;if(k||C){if(r=game.i18n.localize(k?"CriticalSuccess":"CriticalFailure"),p=k?3:-3,!game.settings.get("dsa5","noConfirmationRoll")){let v=await _DiceDSA5.manualRolls(await _DiceDSA5._rollConfirm(),"confirmationRoll",s.extra.options),I=$e(s.source,`system.${k?"critConfirm":"botchConfirm"}`)||0,S=e-Math.clamp(v.total+I,1,20);if(P.hasVantage(s.extra.actor,`${game.i18n.localize("LocalizedIDs.weaponAptitude")} (${i})`)&&!(S>=0)){let A=v.total;v=await _DiceDSA5.manualRolls(await _DiceDSA5._rollConfirm(),"LocalizedIDs.weaponAptitude",s.extra.options),S=e-Math.clamp(v.total+I,1,20),r+=`, ${game.i18n.format("usedWeaponExpertise",{a:A,b:v.total})}`}this._addRollDiceSoNice(s,v,c);let j=S>=0;C&&(j=!j),m.push({char:t,res:Math.clamp(v.total+I,1,20),suc:j,tar:e}),r=`${game.i18n.localize(j?"confirmed":"unconfirmed")} ${r}`,j?p=k?3:-3:p=k?2:-2}}else r=game.i18n.localize(d?"Success":"Failure");return{successLevel:p,characteristics:m,description:r,preData:s,modifiers:a,extra:{attackFromBehind:s.extra.attackFromBehind}}}static async rollFallingDamage(o){let e=o.roll,t=[];for(let s of e.terms[0].results)t.push({char:"damage",res:s.result,suc:!1});return{rollType:"fallingDamage",preData:o,modifiers:await this._situationalModifiers(o),extra:{},damage:Math.max(0,e.total),formula:e.formula,characteristics:t}}static async rollRegeneration(o){let e=await this._situationalModifiers(o),t=o.roll,a=[],s={rollType:"regenerate",preData:o,modifiers:e,extra:{}},i=[];o.regenerateLeP&&i.push("LeP"),o.extra.actor.system.isMage&&o.regenerateAsP&&i.push("AsP"),o.extra.actor.system.isPriest&&o.regenerateKaP&&i.push("KaP");let n=0;if(o.extra.actor.effects.some(l=>l.statuses.includes("sick"))){this._appendSituationalModifiers(o,game.i18n.localize("CONDITION.sick"),"*0");for(let l of i)a.push({char:l,res:0,die:"d6"}),s[l]=0,n+=2}else for(let l of i)this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.regeneration${l}`),P.vantageStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.regeneration${l}`)),l),this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.weakRegeneration${l}`),P.vantageStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.weakRegeneration${l}`))*-1,l),this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.advancedRegeneration${l}`),F.abilityStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.advancedRegeneration${l}`)),l),this._appendSituationalModifiers(o,`${game.i18n.localize(`CHARAbbrev.${l}`)} ${game.i18n.localize("Modifier")}`,o[`${l}Modifier`],l),this._appendSituationalModifiers(o,`${game.i18n.localize(`CHARAbbrev.${l}`)} ${game.i18n.localize("regenerate")}`,o[`regeneration${l}`],l),a.push({char:l,res:t.terms[n].results[0].result,die:"d6"}),s[l]=Math.round(Math.max(0,Number(t.terms[n].results[0].result)+Number(e)+await this._situationalModifiers(o,l))*Number(o.regenerationFactor)),n+=2;return s.characteristics=a,s}static async rollStatus(o){let e=o.roll||await new Roll("1d20").evaluate(),t=await this._rollSingleD20(e,o.source.system.max,o.extra.statusId,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));t.rollType="dodge";let a=o.extra.statusId=="dodge";return a&&t.successLevel==3?await B.tableEnabledFor("criticalMeleeDefense")?t.description+=B.rollCritBotchButton("criticalMeleeDefense",!1,o,o):t.description+=B.defaultParryCrit():a&&t.successLevel==-3&&(await B.tableEnabledFor("Defense")?t.description+=B.rollCritBotchButton("Defense",!0,o,o):t.description+=await B.defaultBotch()),t}static async rollAttribute(o){let e=o.roll?o.roll:await new Roll("1d20").evaluate();this._appendSituationalModifiers(o,game.i18n.localize("Difficulty"),o.testDifficulty);let t=await this._rollSingleD20(e,o.source.system.value,o.extra.characteristicId,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));return t.rollType="attribute",t}static async damageFormula(o){let e;if(o.source.type=="meleeweapon"){let t=O._calculateCombatSkillValues(o.extra.actor.items.find(a=>a.type=="combatskill"&&a.name==o.source.system.combatskill.value),o.extra.actor.system);e=O._prepareMeleeWeapon(o.source,[t],o.extra.actor)}else if(o.source.type=="rangeweapon"){let t=O._calculateCombatSkillValues(o.extra.actor.items.find(a=>a.type=="combatskill"&&a.name==o.source.system.combatskill.value),o.extra.actor.system);e=O._prepareRangeWeapon(o.source,[],[t],o.extra.actor)}else e=o.source.system;return this.replaceDieLocalization(o.source.system.damage.value)+`+${e.extraDamage||0}`}static async rollDamage(o){let e=await this._situationalModifiers(o),t=[],a=o.roll,s=a.total+e;for(let i of a.terms)if(i instanceof foundry.dice.terms.Die||i.class=="Die")for(let n of i.results)t.push({char:o.mode,res:n.result,die:"d"+i.faces});return{rollType:"damage",damage:s,characteristics:t,preData:o,modifiers:e,extra:{}}}static async _situationalModifiers(o,e=""){let t=0;for(let a of o.situationalModifiers){if(a.value==null)continue;let s=Number(a.value)||await this._stringToRoll(a.value);t+=a.type==e||e==""&&a.type==null?s:0}return t}static _situationalPartCheckModifiers(o){return o.situationalModifiers.reduce(function(e,t){if(t.type=="TPM"){let a=t.value.split("|");return a.length!=3||(e[0]=e[0]+Number(a[0]),e[1]=e[1]+Number(a[1]),e[2]=e[2]+Number(a[2])),e}else return e},[0,0,0])}static _situationalMultipliers(o){return o.situationalModifiers.reduce(function(e,t){return e*(t.type=="*"&&Number(`${t.value}`.replace(/,/,"."))||1)},1)}static _appendSituationalModifiers(o,e,t,a=""){let s=o.situationalModifiers.find(i=>i.name==e);s?s.value=t:o.situationalModifiers.push({name:e,value:t,type:a})}static async rollCombatTrait(o){let e=o.roll||await new Roll("1d20").evaluate(),t=o.source,a=t.system.traitType.value=="meleeAttack",s=o.mode=="attack";if(a){let l={system:{combatskill:{value:"-"},reach:{value:t.system.reach.value}}};this._appendSituationalModifiers(o,game.i18n.localize("opposingWeaponSize"),this._compareWeaponReach(l,o))}let i=await this._rollSingleD20(e,Number(s?t.system.at.value:t.system.pa),o.mode,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));await this.getDuplicatusRoll(i,o);let n=i.successLevel>0;await this.detailedWeaponResult(i,o,t),s&&n&&await _DiceDSA5.evaluateDamage(o,i,t,!a,i.doubleDamage),i.rollType="weapon";let r=_DiceDSA5.parseEffect(t);return r&&(i.parsedEffect=r),i}static async _stringToRoll(o,e){let t=[],a=/\d{1}[dDwW]\d/g,s=`${o}`;s.replace(a,function(r){t.push(new Roll(_DiceDSA5.replaceDieLocalization(r),e.extra.actor.system).evaluate())});let i=await Promise.all(t),n=s.replace(a,()=>{let r=i.shift();return e&&_DiceDSA5._addRollDiceSoNice(e,r,game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("ch")),r.total});return await Roll.safeEval(n)}static replaceDieLocalization(o){return o.replace(/[Ww](?=\d)/g,"d")}static async evaluateDamage(o,e,t,a,s){let i=this.replaceDieLocalization(t.system.damage.value),n=[],r=t.dmgMultipliers||[],l=r.map(y=>`${y.name} *${y.val}`),c=[],d=0;for(let y of o.situationalModifiers){let k=0;if(y.armorPen&&c.push(y.armorPen),y.damageBonus){if(/^\*/.test(y.damageBonus)){g.pushOnlyIfUnique(r,{name:y.name,val:Number(y.damageBonus.replace("*",""))});continue}let C=/^=/.test(y.damageBonus),v=`${y.damageBonus}`.replace(/^=/,""),I=await _DiceDSA5._stringToRoll(v,o);if(k=I*(y.step||1),C){i=this.replaceDieLocalization(v),n.push({name:y.name,roll:I});continue}else y.damageBonus=I,d+=k}}let m=o.damageRoll||await _DiceDSA5.manualRolls(await new Roll(i,o.extra.actor.system).evaluate(),"CHAR.DAMAGE",o.extra.options),p=m.total,f=0;for(let y of m.terms)if(y instanceof foundry.dice.terms.Die||y.class=="Die")for(let k of y.results)f+=Number(k.result),e.characteristics.push({char:"damage",res:k.result,die:"d"+y.faces});let h=p-f;if(n.length>0)l.push(n[0].name+" "+p);else{p+=d,l.push(game.i18n.localize("Roll")+" "+f),h!=0&&l.push(game.i18n.localize("weaponModifier")+" "+h),o.situationalModifiers.reduce((I,S)=>{if(S.damageBonus){let j=/^\*/.test(S.damageBonus)?S.damageBonus:Number(S.damageBonus)*(S.step||1);l.push(`${S.name} ${j}`)}},l),o.situationalModifiers.find(I=>I.name.indexOf(game.i18n.localize("CONDITION.bloodrush"))>-1)&&(p+=2,l.push(game.i18n.localize("CONDITION.bloodrush")+" 2")),t.extraDamage&&(p=Number(t.extraDamage)+Number(p),l.push(game.i18n.localize("damageThreshold")+" "+t.extraDamage));let y=o.extra.actor.system[a?"rangeStats":"meleeStats"].damage,k=await _DiceDSA5._stringToRoll(y,o);k!=0&&(p+=k,l.push(game.i18n.localize("statuseffects")+" "+k));let C=$e(t,"system.combatskill.value"),v=o.extra.actor.system.skillModifiers.combat.damage.reduce((I,S)=>(S.target==C&&(I+=Number(S.value)),I),0);v&&(p=p+v,l.push(`${game.i18n.localize("TYPES.Item.combatskill")} (${game.i18n.localize("CHARAbbrev.damage")}) ${v}`))}s&&(p=p*s,l.push(game.i18n.format("doubleDamage",{x:s})));for(let y of r)p=p*y.val;e.armorPen=c,e.damagedescription=l.join(", "),e.damage=Math.round(p),e.damageRoll=xr(m)}static async rollWeapon(o){let e=o.roll||await new Roll("1d20").evaluate(),t,a=o.source,s=a.system.combatskill.value,i=O._calculateCombatSkillValues(o.extra.actor.items.find(c=>c.type=="combatskill"&&c.name==s),o.extra.actor.system,{step:await this._situationalModifiers(o,"step"),[o.mode]:await this._situationalModifiers(o,o.mode)}),n=a.type=="meleeweapon";n?(t=O._prepareMeleeWeapon(a,[i],o.extra.actor),o.mode=="attack"&&this._appendSituationalModifiers(o,game.i18n.localize("opposingWeaponSize"),this._compareWeaponReach(t,o))):t=O._prepareRangeWeapon(a,[],[i],o.extra.actor);let r=await this._rollSingleD20(e,t[o.mode],o.mode,await this._situationalModifiers(o),o,s,this._situationalMultipliers(o));await this.getDuplicatusRoll(r,o),await this.detailedWeaponResult(r,o,a),o.mode=="attack"&&r.successLevel>0&&!o.extra.counterAttack&&await _DiceDSA5.evaluateDamage(o,r,t,!n,r.doubleDamage),o.extra.counterAttack&&(g.getSpeaker(o.extra.speaker).addCondition("stunned"),r.description+=", "+g.replaceConditions(game.i18n.localize("stunnedByCounterAttack"))),r.rollType="weapon";let l=_DiceDSA5.parseEffect(t);return l&&(r.parsedEffect=l),r}static _weaponBotchCritEffect(o,e,t){let a=[];for(let s of o.effects)for(let i of s.changes)if(i.key==e){if(i.value=="description")a.push(s.description);else if(/^condition /.test(i.value)){let n=i.value.replace(/^condition /,"").split(" "),r=Number(n[1])||1,l=game.i18n.localize(`CONDITION.${n[0]}`),c=g.replaceConditions(game.i18n.format("CHATNOTIFICATION.suffersCondition",{actor:t.name,condition:l,count:r}));a.push(`

${c}

`)}}return a.join("
")}static async detailedWeaponResult(o,e,t){let a=e.mode=="attack"&&!e.extra.counterAttack,s=t.type=="meleeweapon"||$e(t,"system.traitType.value")=="meleeAttack";switch(o.successLevel){case 3:a?(await B.tableEnabledFor("criticalAttack")?o.description+=B.rollCritBotchButton("criticalAttack",!1,e):(o.description+=B.defaultAttackCrit(!0),o.doubleDamage=2),o.halfDefense=!0):e.isRangeDefense&&await B.tableEnabledFor("criticalRangeDefense")?o.description+=B.rollCritBotchButton("criticalRangeDefense",!1,e):await B.tableEnabledFor("criticalMeleeDefense")?o.description+=B.rollCritBotchButton("criticalMeleeDefense",!1,e):o.description+=B.defaultParryCrit(),o.description+=this._weaponBotchCritEffect(t,"self.criteffect",e.extra.actor);break;case-3:let i=$e(t,"system.combatskill.value")==game.i18n.localize("LocalizedIDs.wrestle")||t.type=="trait";a&&s&&await B.tableEnabledFor("Melee")?o.description+=B.rollCritBotchButton("Melee",i,e):a&&await B.tableEnabledFor("Range")?o.description+=B.rollCritBotchButton("Range",!1,e):!a&&await B.tableEnabledFor("Defense")?o.description+=B.rollCritBotchButton("Defense",i,e):o.description+=await B.defaultBotch(),o.description+=this._weaponBotchCritEffect(t,"self.botcheffect",e.extra.actor);break;case 2:a&&(o.description+=B.defaultAttackCrit(!1),o.halfDefense=!0);break;case-2:break}}static async _addRollDiceSoNice(o,e,t){if(o.rollMode){for(let a=0;a{new ae({title:game.i18n.localize(t.cheat?"DIALOG.cheat":"DSASETTINGS.allowPhysicalDice"),content:r,default:"ok",buttons:{ok:{icon:'',label:game.i18n.localize("yes"),callback:u(d=>l([!0,d]),"callback")},cancel:{icon:'',label:game.i18n.localize("cancel"),callback:u(()=>l([!1,0]),"callback")}}}).render(!0)}),s){let l=[];i.find(".dieInput").each(function(c){let d=Number($(this).val());d>0&&l.push({val:d,index:c}),c++}),o.editRollAtIndex(l)}}return o}static parseEffect(o){let e=o.system.effect?o.system.effect.value:void 0,t=[];if(e){let s=/^[a-z]+\|[öäüÖÄÜa-zA-z ]+$/;for(let i of e.split(";"))if(s.test(i.trim())){let n=i.split("|").map(r=>r.trim());if(n[0]=="condition"){let r=CONFIG.statusEffects.find(l=>l.id==n[1]);t.push(` + `}static async changeStartMessage(e){for(let t of e.flags.data.startMessagesList){let a=game.messages.get(t),s=a.flags.unopposeData;game.socket.emit("system.dsa5",{type:"target",payload:{target:s.targetSpeaker.token,scene:canvas.scene.id,opposeFlag:{speaker:e.speaker,messageId:e.id,startMessageId:a.id}}}),await a.update({"flags.unopposeData.attackMessageId":e.id})}}static resolveFinalMessage(e){let t,a;if(e.flags.data.defenderMessage)for(let s of e.flags.data.defenderMessage){t=o.getMessageDude(e);let i=game.messages.get(s);a=o.getMessageDude(i),this.completeOpposedProcess(t,a,{blind:e.blind,whisper:e.whisper})}else{a=o.getMessageDude(e);let s=game.messages.get(e.flags.data.attackerMessage);t=o.getMessageDude(s),this.completeOpposedProcess(t,a,{blind:e.blind,whisper:e.whisper})}}static getMessageDude(e){let t={speaker:e.speaker,testResult:Mr(e.flags.data.postData,{source:e.flags.data.preData.source}),img:g.getSpeaker(e.speaker).img,messageId:e.id};return t.testResult.ammo&&t.testResult.source.effects.push(...t.testResult.ammo.effects),t}static async showDamage(e,t=!1){game.user.isGM?(!t||!e.flags.data.hideDamage)&&e.flags.data.postData.damageRoll&&(await e.update({content:e.content.replace(`data-hide-damage="${!t}"`,`data-hide-damage="${t}"`),"flags.data.hideDamage":t}),t||R._addRollDiceSoNice(e.flags.data.preData,Roll.fromData(e.flags.data.postData.damageRoll),game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("damage"))):game.socket.emit("system.dsa5",{type:"showDamage",payload:{id:e.id,hide:t}})}static async playAutomatedJBA2(e,t,a){if(g.moduleEnabled("autoanimations")){let s=g.getSpeaker(e.speaker).getActiveTokens()[0],i=g.getSpeaker(t.speaker).getActiveTokens()[0];if(!s||!s.actor||!i||!i.actor)return;let n=s.actor.items.get(e.testResult.source._id);if(n||(n=new D(e.testResult.source)),!n)return;n=n.toObject();let r=[i],l=a.winner=="attacker",c=l?r:[],d=e.testResult.successLevel>1&&l,m=e.testResult.successLevel<1&&!l,p=t.testResult.successLevel>1&&!l,f=t.testResult.successLevel<1&&l,h=[],y=[];d?y.push(game.i18n.localize("CriticalSuccess")):m?y.push(game.i18n.localize("CriticalFailure")):p?y.push(`${game.i18n.localize("CHAR.PARRY")} ${game.i18n.localize("CriticalSuccess")}`):f&&y.push(`${game.i18n.localize("CHAR.PARRY")} ${game.i18n.localize("CriticalFailure")}`),l||y.push(game.i18n.localize("CHAR.PARRY"));for(let k of y)h.push({name:`${n.name} (${k})`},{name:k});h.push(n);for(let k of h)if(await AutomatedAnimations.playAnimation(s,k,{targets:r,hitTargets:c,playOnMiss:!0}))break}}static async showSpellWithoutTarget(e){if(g.moduleEnabled("autoanimations")){let t=In(e,"flags.data");if(!t||t.isOpposedTest)return;if((In(t,"postData.result")||-1)>0){let s=g.getSpeaker(t.postData.speaker).getActiveTokens()[0];if(!s||!s.actor)return;let i=Array.from(game.user.targets),n=s.actor.items.get(t.preData.source._id);i.length||(i=[s]),AutomatedAnimations.playAnimation(s,n,{targets:i})}}}static async clearOpposed(e){game.user.isGM?await e.update({"flags.-=oppose":null}):game.socket.emit("system.dsa5",{type:"clearOpposed",payload:{actorId:e.id}})}static async _handleReaction(e){let t=$(e.currentTarget).parents(".message").attr("data-message-id"),a=game.messages.get(t);switch(game.messages.get(a.flags.unopposeData.attackMessageId).flags.data.preData.source.type){case"skill":yt.showDialog(a);break;default:kt.showDialog(a)}}static async chatListeners(e){e.on("click",".unopposed-button",t=>{t.preventDefault(),this._handleReaction(t)})}static async hideReactionButton(e){if(e)if(game.user.isGM){let t=game.messages.get(e),a=$(t.content);a.find("button.unopposed-button").remove(),a=$("
").append(a),await t.update({content:a.html()})}else game.socket.emit("system.dsa5",{type:"hideQueryButton",payload:{id:e}})}static async completeOpposedProcess(e,t,a){await pe.postOpposed({attacker:e,defender:t,options:a});let s=await this.evaluateOpposedTest(e.testResult,t.testResult,a);return this.formatOpposedResult(s,e.speaker,t.speaker),this.rerenderMessagesWithModifiers(s,e,t),Hooks.call("finishOpposedTest",e,t,s,a),await this.finishOpposedTestHookAsync(e,t,s,a),this.playAutomatedJBA2(e,t,s),await this.renderOpposedResult(s,a),await this.hideReactionButton(a.startMessageId),s}static async finishOpposedTestHookAsync(e,t,a,s){}static async evaluateOpposedTest(e,t,a={}){let s={};if(s.other=[],a.additionalInfo&&s.other.push(a.additionalInfo),s.winner="attacker",["weapon","spell","liturgy","ceremony","ritual","combatskill"].includes(e.rollType)&&t.successLevel==null&&(t.successLevel=-5),e.rollType=="damage"&&(t.successLevel=-5,e.successLevel=1),t.successLevel!=null)switch(e.rollType){case"combatskill":case"talent":this._evaluateTalentOpposedRoll(e,t,s,a);break;case"ceremony":case"ritual":case"spell":case"liturgy":case"weapon":case"damage":this._evaluateWeaponOpposedRoll(e,t,s,a);break;default:ui.notifications.error("Can not oppose "+e.rollType),console.warn("Can not oppose "+e.rollType)}return s}static _evaluateWeaponOpposedRoll(e,t,a,s={}){if(e.successLevel>0&&t.successLevel<0){let i=this._calculateOpposedDamage(e,t,s);if(i.armorDamaged.damaged&&i.armorDamaged.ids.length){let c=i.armorDamaged.ids.join(";");a.other.push(`
`)}t.counterAttack&&(i.damage+=2,i.sum=i.damage-i.armor,i.tooltip=game.i18n.localize("LocalizedIDs.counterAttack")+" 2"),i.messages.length&&(i.tooltip||(i.tooltip=""),i.tooltip+=` ${i.messages.join("
")}`),a.winner="attacker";let n=[i.armorMod!=0?`${i.armorMod} ${game.i18n.localize("Modifier")}`:"",i.armorMultiplier!=1?`*${i.armorMultiplier} ${game.i18n.localize("Modifier")}`:"",i.spellArmor!=0?`${i.spellArmor} ${game.i18n.localize("spellArmor")}`:"",i.liturgyArmor!=0?`${i.liturgyArmor} ${game.i18n.localize("liturgyArmor")}`:""].join(""),l=`${game.combat?.isBrawling?game.i18n.localize("BRAWLING.temporary"):game.i18n.localize("damage")}: ${i.damage} - ${i.armor} = ${i.sum}`;a.damage={description:l,value:i.sum,sp:i.damage,armorMod:i.armorMod,armorMultiplier:i.armorMultiplier,spellArmor:i.spellArmor,liturgyArmor:i.liturgyArmor}}else a.winner="defender"}static _calculateOpposedDamage(e,t,a={}){let s=g.getSpeaker(t.speaker),i=[],n=e.damage,r=game.i18n.localize("LocalizedIDs.immuneToCrit");e.doubleDamage&&s.items.find(S=>S.name==r&&S.type=="trait")&&(n=Math.floor(n/e.doubleDamage),i.push(r)),a.origin=e.source,a.defender=s,a.damage=n,a.defenderTest=t,a.attackerTest=e;let{wornArmor:l,armor:c}=O.armorValue(s,a);a.armor=c;let d=Z.applyRollTransformation(s,a,pe.EVENTS.DAMAGE_TRANSFORMATION).options;c=d.armor;let m=d.damage,p=[],f=0,h=e.armorPen||[];for(let S of h)/^\*/.test(S)?p.push(Number(S.replace("*",""))):f+=Number(S);let y=0,k=0;["spell","ritual"].includes(e.source.type)?y+=s.system.spellArmor||0:["liturgy","ceremony"].includes(e.source.type)&&(y+=s.system.liturgyArmor||0),c+=f;let C=p.reduce((S,j)=>S*j,1);c=Math.max(Math.round(c*C),0),c+=y+k;let v=W.armorGetsDamage(m,e),I=l.map(S=>s.items.get(S._id).uuid);return{damage:m,armor:c,armorDamaged:{damaged:v,ids:I},armorMod:f,spellArmor:y,liturgyArmor:k,armorMultiplier:C,messages:i,sum:m-c}}static _evaluateTalentOpposedRoll(e,t,a,s={}){e.successLevel>0&&e.successLevel>t.successLevel?a.winner="attacker":e.qualityStep>t.qualityStep||e.result>=0&&t.result<0?(a.winner="attacker",a.differenceSL=e.qualityStep-t.qualityStep):(a.winner="defender",a.differenceSL=t.qualityStep-e.qualityStep)}static formatOpposedResult(e,t,a){let s=e.differenceSL?"winsFP":"wins";return e.winner=="attacker"?(e.result=game.i18n.format("OPPOSED."+s,{winner:t.alias,loser:a.alias,SL:e.differenceSL}),e.img=t.img):e.winner=="defender"&&(e.result=game.i18n.format("OPPOSED."+s,{winner:a.alias,loser:t.alias,SL:e.differenceSL}),e.img=a.img),e.speakerAttack=t,e.speakerDefend=a,e}static rerenderMessagesWithModifiers(e,t,a){let s=game.messages.get(t.messageId);this.showDamage(s,e.winner!="attacker")}static async renderOpposedResult(e,t={}){let a=game.settings.get("dsa5","hideOpposedDamageSelect");e.hideData=[1,2].includes(a),e.applyDamageInChat=game.settings.get("dsa5","applyDamageInChat"),e.isBrawling=game.combat?.isBrawling;let s=await renderTemplate("systems/dsa5/templates/chat/roll/opposed-result.html",e),i={user:game.user.id,content:s,flags:{opposeData:e,hideData:e.hideData},whisper:a>1?[]:t.whisper,blind:t.blind};t.target&&(i["flags.startMessageId"]=t.startMessageId),await ChatMessage.create(i)}static async resolveUndefended(e,t=""){let a=e.flags.unopposeData,s=game.messages.get(a.attackMessageId),i={speaker:s.speaker,testResult:s.flags.data.postData,messageId:a.attackMessageId};i.testResult.source=s.flags.data.preData.source,i.testResult.ammo&&i.testResult.source.effects.push(...i.testResult.ammo.effects);let n=canvas.tokens.get(a.targetSpeaker.token),r={speaker:a.targetSpeaker,testResult:{actor:n.actor,speaker:{token:a.targetSpeaker.token}}};await this.clearOpposed(n.actor),await this.completeOpposedProcess(i,r,{target:!0,startMessageId:e.id,additionalInfo:t}),game.user.isGM?await s.update({"flags.data.unopposedStartMessage":e.id}):await game.socket.emit("system.dsa5",{type:"updateAttackMessage",payload:{messageId:s.id,startMessageId:e.id}})}};var zt=class o extends foundry.applications.api.HandlebarsApplicationMixin(foundry.applications.api.ApplicationV2){static{u(this,"EquipmentDamageDialog")}static DEFAULT_OPTIONS={window:{title:"WEAR.checkShort"}};static PARTS={main:{template:"systems/dsa5/templates/dialog/dialog-reaction-attack.html"}};constructor(e){super(),this.items=e}async _prepareContext(e){let t=await super._prepareContext(e);return t.items=this.items.map(a=>({name:a.name,id:a.id,img:a.img})),t.title="WEAR.checkShort",t}_onRender(e,t){super._onRender(t),$(this.element).find(".reactClick").on("click",s=>{this.callbackResult(s),this.close()})}static async showDialog(e){new o(e).render(!0)}callbackResult(e){W.breakingTest(this.items.find(t=>t.id==e.currentTarget.dataset.value))}};var{getProperty:Ir,mergeObject:En}=foundry.utils,B=class o{static{u(this,"DSATables")}static async showBotchCard(e,t={}){t.speaker={token:e.token,actor:e.actor,scene:e.scene},t.source=e.source;let a=b.systemTables.find(i=>i.name==e.table),s=await o.getRollTable(a.pack[game.i18n.lang],game.i18n.localize(`TABLENAMES.${e.table}`),e);for(let i of s){let n=t.speaker?await o.hasEffect(i):!1,r=g.replaceDies(g.replaceConditions(i.results[0].text)),l=`${game.i18n.localize("TABLENAMES."+e.table)}`,c=await renderTemplate("systems/dsa5/templates/tables/tableCard.html",{result:r,title:l,hasEffect:n}),d=await this.buildEffects(i,n);ChatMessage.create({user:game.user.id,content:c,whisper:t.whisper,blind:t.blind,flags:{data:{preData:{source:{effects:d},extra:{actor:{id:t.speaker.actor},speaker:t.speaker},situationalModifiers:[]},postData:{}},dsa5:{hasEffect:n,options:t}}})}}static async hasEffect(e){return Ir(e.results[0],"flags.dsa5")||!1}static async buildEffects(e,t){let a=[];if(t&&t.resistEffect){let s=Array.isArray(t.resistEffect.fail)?t.resistEffect.fail:[t.resistEffect.fail];for(let i of s){let n=J.effectBaseDummy(i.description,t.resistEffect.changes||[],t.resistEffect.duration||{});i.systemEffect?En(n,{_id:"botchEffect",flags:{dsa5:{hideOnToken:!1,hidePlayers:!1,advancedFunction:2,args3:`await actor.addCondition("${i.systemEffect}", ${i.level||1});`}}}):i.command&&En(n,{_id:"botchEffect",flags:{dsa5:{hideOnToken:!1,hidePlayers:!1,advancedFunction:2,args3:i.command}}}),a.push(n)}}return a}static async getRollTable(e,t,a={}){let i=(await game.packs.get(e).getDocuments({name__in:[t]}))[0],n=await i.draw({displayChat:!1});return a.weaponless=="true"&&n.roll.total<7&&(n.roll.editRollAtIndex([{index:0,val:n.roll.total+5}]),n=await i.draw({displayChat:!1,roll:n.roll})),[n]}static async tableEnabledFor(e){let t=b.systemTables.find(a=>a.name==e);return t?game.settings.get(t.setting.module,t.setting.key):!1}static rollCritBotchButton(e,t,a){let s=game.i18n.localize(`TABLENAMES.${e}`),i=a.extra.speaker,n=a.source._id;return`,
${s}`}static async defaultBotch(){return", "+game.i18n.localize("selfDamage")+(await new Roll("1d6+2").evaluate()).total}static defaultAttackCrit(e){let t=", "+game.i18n.localize("halfDefense");return e&&(t+=", "+game.i18n.format("doubleDamage",{x:2})),t}static defaultParryCrit(){return", "+game.i18n.localize("attackOfOpportunity")}};var re=class o{static{u(this,"DSA5ChatAutoCompletion")}static skills=[];static cmds=["sk","at","pa","sp","li","rq","gc","w","ch"];constructor(){o.skills.length==0&&g.allSkills().then(e=>{o.skills=e.map(t=>({name:t.name,type:"skill"})).concat(Object.values(game.dsa5.config.characteristics).map(t=>({name:game.i18n.localize(t),type:"attribute"})).concat([{name:game.i18n.localize("regenerate"),type:"regeneration"},{name:game.i18n.localize("fallingDamage"),type:"fallingDamage"}]))}),this.filtering=!1,this.combatConstants={dodge:game.i18n.localize("dodge"),parryWeaponless:game.i18n.localize("parryWeaponless"),attackWeaponless:game.i18n.localize("attackWeaponless")}}get regex(){return new RegExp(`^/(${o.cmds.join(" |")})`)}async chatListeners(e){let t=this,a=e.find("#chat-message");e.on("keyup","#chat-message",async function(i){t._parseInput(i)}),e.on("click",".quick-item",async function(i){t._quickSelect($(i.currentTarget))}),a.on("keydown",function(i){t._navigateQuickFind(i)});let s=jQuery._data(a[0]).events.keydown;s.unshift(s.pop())}_parseInput(e){let t=e.target.value;if(this.regex.test(t)){if([38,40,13,9].includes(e.which))return!1;if(e.which==27)return this._closeQuickfind(e),!1;let a=this._getCmd(t),s=t.substring(1+a.length).toLowerCase().trim();this[`_filter${a}`](s,e),this.filtering=!0}else this._closeQuickfind(e)}_getCmd(e){return e.substring(1,3).toUpperCase().trim()}_completeCurrentEntry(e){$("#chat-message").val($("#chat-message").val().split(" ")[0]+" "+e.text())+""}_closeQuickfind(e){this.filtering=!1,$(e.currentTarget).closest("#chat-form").find(".quickfind").remove()}_filterW(e,t){let a=game.users.contents.filter(s=>s.active&&s.name.toLowerCase().trim().indexOf(e)!=-1).map(s=>({name:s.name,type:"user"}));this._checkEmpty(a),this._setList(a,"W",t)}_filterAT(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"],r=a.items.filter(l=>(i.includes(l.type)&&l.system.worn.value==!0||l.type=="trait"&&n.includes(l.system.traitType.value))&&l.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(l=>({name:l.name,type:"item"})).concat([{name:this.combatConstants.attackWeaponless,type:"item"}].filter(l=>l.name.toLowerCase().trim().indexOf(e)!=-1));this._checkEmpty(r),this._setList(r,"AT",t)}}_filterPA(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["meleeweapon"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1&&r.system.worn.value==!0).slice(0,5).map(r=>({name:r.name,type:"item"})).concat([{name:this.combatConstants.dodge,type:"item"},{name:this.combatConstants.parryWeaponless,type:"item"}].filter(r=>r.name.toLowerCase().trim().indexOf(e)!=-1));this._checkEmpty(n),this._setList(n,"PA",t)}}_filterSP(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["spell","ritual"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(r=>({name:r.name,type:"item"}));this._checkEmpty(n),this._setList(n,"SP",t)}}_checkEmpty(e){e.length||e.push({name:game.i18n.localize("DSAError.noMatch"),type:"none"})}_filterLI(e,t){let{actor:a,tokenId:s}=o._getActor();if(a){let i=["liturgy","ceremony"],n=a.items.filter(r=>i.includes(r.type)&&r.name.toLowerCase().trim().indexOf(e)!=-1).slice(0,5).map(r=>({name:r.name,type:"item"}));this._checkEmpty(n),this._setList(n,"LI",t)}}_getSkills(e,t=void 0){e=e.replace(/(-|\+)?\d+/g,"").trim();let a=o.skills.filter(s=>s.name.toLowerCase().trim().indexOf(e)!=-1&&(t==null||t==s.type)).slice(0,5);return this._checkEmpty(a),a}_filterCH(e,t){this._setList(this._getSkills(e),"CH",t)}_filterSK(e,t){this._setList(this._getSkills(e),"SK",t)}_filterRQ(e,t){this._setList(this._getSkills(e),"RQ",t)}_filterGC(e,t){this._setList(this._getSkills(e,"skill"),"GC",t)}_setList(e,t,a){let s=$(`
    ${e.map(r=>`
  • ${r.name}
  • `).join("")}
`);s.find(".quick-item:first").addClass("focus");let i=$(a.currentTarget).closest("#chat-form"),n=i.find(".quickfind");n.length?n.replaceWith(s):i.append(s)}_navigateQuickFind(e){if(this.filtering){let t=$(e.currentTarget).closest("#chat-form").find(".focus");switch(e.which){case 38:return t.prev(".quick-item").length&&t.removeClass("focus").prev(".quick-item").addClass("focus"),!1;case 40:return t.next(".quick-item").length&&t.removeClass("focus").next(".quick-item").addClass("focus"),!1;case 13:if(t.attr("data-category")=="W")break;return e.stopPropagation(),e.preventDefault(),this._quickSelect(t),!1;case 9:return e.stopPropagation(),e.preventDefault(),this._completeCurrentEntry(t),!1}}return!0}static _getActor(){let e=ChatMessage.getSpeaker(),t;return e.token&&(t=game.actors.tokens[e.token]),t||(t=game.actors.get(e.actor)),t?{actor:t,tokenId:e.token}:(ui.notifications.error("DSAError.noProperActor",{localize:!0}),{})}_quickSelect(e){let t=e.attr("data-category");switch(t){case"NM":case"GC":case"RQ":case"CH":this[`_quick${t}`](e);break;case"W":this._completeCurrentEntry(e);break;default:let{actor:a,tokenId:s}=o._getActor();a&&(this._resetChatAutoCompletion(e),this[`_quick${t}`](e,a,s))}}_quickW(e,t,a){}_quickCH(e){le.check3D20(e),this._resetChatAutoCompletion(e)}_quickSK(e,t,a){switch(e.attr("data-type")){case"skill":let s=t.items.find(n=>n.name==e.text()&&n.type=="skill");s&&t.setupSkill(s,{},a).then(n=>{t.basicTest(n)});break;case"attribute":let i=Object.keys(game.dsa5.config.characteristics).find(n=>game.i18n.localize(game.dsa5.config.characteristics[n])==e.text());t.setupCharacteristic(i,{},a).then(n=>{t.basicTest(n)});break;case"regeneration":t.setupRegeneration("regenerate",{},a).then(n=>{t.basicTest(n)});break}}_resetChatAutoCompletion(e){let t=e.closest("#chat-form");t.find("#chat-message").val(""),t.find(".quickfind").remove()}_quickGC(e){let t=Number($("#chat-message").val().match(/(-|\+)?\d+/g))||0;this._resetChatAutoCompletion(e),ie.showGCMessage(e.text(),t)}_quickRQ(e){let t=Number($("#chat-message").val().match(/(-|\+)?\d+/g))||0;this._resetChatAutoCompletion(e),ie.showRQMessage(e.text(),t)}_quickPA(e,t,a){let s=e.text();if(this.combatConstants.dodge==s)t.setupDodge({},a).then(i=>{t.basicTest(i)});else if(this.combatConstants.parryWeaponless==s)t.setupWeaponless("parry",{},a).then(i=>{t.basicTest(i)});else{let i=["meleeweapon"],n=t.items.find(r=>i.includes(r.type)&&r.name==e.text());n&&t.setupWeapon(n,"parry",{},a).then(r=>{t.basicTest(r)})}}_quickAT(e,t,a){let s=e.text();if(this.combatConstants.attackWeaponless==s)t.setupWeaponless("attack",{},a).then(i=>{t.basicTest(i)});else{let i=["meleeweapon","rangeweapon"],n=["meleeAttack","rangeAttack"],r=t.items.find(l=>i.includes(l.type)&&l.name==e.text());r||(r=t.items.find(l=>l.type=="trait"&&l.name==e.text()&&n.includes(l.system.traitType.value))),r&&t.setupWeapon(r,"attack",{},a).then(l=>{t.basicTest(l)})}}_quickSP(e,t,a){let s=["ritual","spell"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.text());i&&t.setupSpell(i,{},a).then(n=>{t.basicTest(n)})}_quickLI(e,t,a){let s=["liturgy","ceremony"],i=t.items.find(n=>s.includes(n.type)&&n.name==e.text());i&&t.setupSpell(i,{},a).then(n=>{t.basicTest(n)})}static async infoItemAsync(e){(await fromUuid(e)).postItem()}static bindRollCommands(e){e.on("click",".request-roll",s=>{let i=s.currentTarget.dataset;return ie.showRQMessage(i.name,Number(i.modifier)||0,i.label),s.stopPropagation(),!1}),e.on("click",".postInfo",s=>{let i=fromUuidSync(s.currentTarget.dataset.uuid);return i&&(typeof i.postItem=="function"?i.postItem():this.infoItemAsync(s.currentTarget.dataset.uuid)),s.stopPropagation(),!1}),e.on("click",".postContentChat",async s=>{let i=$(s.currentTarget).closest(".postChatSection").find(".postChatContent").html();ft.getDialog(i)}),e.on("click",".request-GC",s=>(ie.showGCMessage(s.currentTarget.dataset.name,Number(s.currentTarget.dataset.modifier)||0),s.stopPropagation(),!1)),e.on("click",".request-CH",s=>(le.check3D20($(s.currentTarget),s.currentTarget.dataset.name,{modifier:Number(s.currentTarget.dataset.modifier)||0}),s.stopPropagation(),!1)),e.on("click",".request-Pay",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.doPayment(i.selectedIDs(),!0,s.currentTarget.dataset.modifier)}),e.on("click",".request-GetPaid",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.doPayment(i.selectedIDs(),!1,s.currentTarget.dataset.modifier)}),e.on("click",".request-AP",s=>{if(!game.user.isGM)return;let i=game.dsa5.apps.gameMasterMenu;i.getExp(i.selectedIDs(),s.currentTarget.dataset.modifier)});let t=u(s=>{s.stopPropagation();let i=s.currentTarget.dataset.type,n=s.currentTarget.dataset.uuid;!n||!i||s.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:i,uuid:n}))},"itemDragStart"),a=e.find(".show-item");a.click(async s=>{let i=s.currentTarget.dataset.uuid;(await fromUuid(i)).sheet.render(!0)}),a.attr("draggable",!0).on("dragstart",s=>t(s)),e.on("click",".actorEmbeddedAbility",async s=>{let n=(await fromUuid(s.currentTarget.dataset.actor)).items.get(s.currentTarget.dataset.id);n&&n.sheet.render(!0)})}};var{mergeObject:Er}=foundry.utils,ie=class o{static{u(this,"RequestRoll")}static async requestGC(e,t,a,s=0){let{actor:i,tokenId:n}=re._getActor();if(!i)return;game.user.updateTokenTargets([]);let r={modifier:s,postFunction:{cummulative:a,functionName:"game.dsa5.apps.RequestRoll.autoEditGroupCheckRoll"}};switch(e){case"attribute":break;default:let l=i.items.find(c=>c.name==t&&c.type==e);i.setupSkill(l,r,n).then(async c=>{let d=await i.basicTest(c);await o.editGroupCheckRoll(a,d,t,e)})}}static async autoEditGroupCheckRoll(e,t,a){await o.editGroupCheckRoll(e.cummulative,t,a.name,a.type)}static async editGroupCheckRoll(e,t,a,s){let i=await game.messages.get(e),n=i.flags,l=t.result.successLevel>1?2:1;n.botched=n.botched||t.result.successLevel<-1;let c=g.getSpeaker(t.result.speaker),d={messageId:t.result.messageId,actor:c.name,qs:(t.result.qualityStep||0)*l,success:t.result.successLevel,target:a,type:s},m=n.results.findIndex(p=>p.messageId==d.messageId);m>=0?n.results[m]=d:n.results.push(d),o.rerenderGC(i,n)}static async requestRoll(e,t,a=0,s={}){let{actor:i,tokenId:n}=re._getActor();if(i)switch(game.user.updateTokenTargets([]),s.modifier=a,e){case"attribute":let r=Object.keys(game.dsa5.config.characteristics).find(c=>game.i18n.localize(game.dsa5.config.characteristics[c])==t);i.setupCharacteristic(r,s,n).then(c=>{i.basicTest(c)});break;case"regeneration":i.setupRegeneration("regenerate",s,n).then(c=>{i.basicTest(c)});break;case"fallingDamage":i.setupFallingDamage(s,n);break;default:let l=i.items.find(c=>c.name==t&&c.type==e);i.setupSkill(l,s,n).then(c=>{i.basicTest(c)})}}static async rerenderGC(e,t){if(game.user.isGM){let a=0;t.qs=t.results.reduce((i,n)=>(a+=n.success<0?1:0,n.success>1&&(a=0),i+n.qs),0),t.failed=a;for(let i of t.rollOptions)i.calculatedModifier=i.modifier-a;t.openRolls=t.maxRolls-t.results.length,t.doneRolls=t.results.length;let s=await renderTemplate("systems/dsa5/templates/chat/roll/groupcheck.html",t);e.update({content:s,flags:t})}else game.socket.emit("system.dsa5",{type:"updateGroupCheck",payload:{messageId:e.id,data:t}});$("#chat-log").find(`[data-message-id="${e.id}"`).appendTo("#chat-log")}static showRQMessage(e,t=0,a=void 0){let s=t<0?` ${t}`:t>0?` +${t}`:"",i=re.skills.find(r=>r.name==e).type,n=game.i18n.format("CHATNOTIFICATION.requestRoll",{user:game.user.name,item:` ${a||e}${s}`});ChatMessage.create(g.chatDataSetup(n))}static async showGCMessage(e,t=0,a={}){let s=re.skills.find(l=>l.name==e).type,i={results:[],qs:0,failed:0,modifier:t,name:game.user.name,maxRolls:7,openRolls:7,doneRolls:0,targetQs:10,rollOptions:[{type:s,modifier:t,calculatedModifier:t,target:e}]};Er(i,a);let n=await renderTemplate("systems/dsa5/templates/chat/roll/groupcheck.html",i),r=g.chatDataSetup(n);r.flags=i,ChatMessage.create(r)}static async addSkillToGC(e){let t=$(e.currentTarget).parents(".message").attr("data-message-id"),a=await renderTemplate("systems/dsa5/templates/dialog/addgroupcheckskill.html",{skills:re.skills.filter(i=>i.type=="skill").sort((i,n)=>i.name.localeCompare(n.name))}),s={title:game.i18n.localize("HELP.groupcheck"),content:a,buttons:{ok:{icon:'',label:game.i18n.localize("ok"),callback:u(async i=>{let n=game.messages.get(t),r=n.flags;r.rollOptions.push({type:"skill",modifier:i.find('[name="modifier"]').val(),target:i.find('[name="skill"]').val()}),o.rerenderGC(n,r)},"callback")},cancel:{icon:'',label:game.i18n.localize("cancel")}}};new ae(s).render(!0)}static async removeGCEntry(e){let t=$(e.currentTarget),a=Number(e.currentTarget.dataset.index),s=game.messages.get(t.parents(".message").attr("data-message-id")),i=s.flags;i.results.splice(a,1),o.rerenderGC(s,i)}static removeSkillFromGC(e){let t=$(e.currentTarget),a=game.messages.get(t.parents(".message").attr("data-message-id")),s=a.flags;s.rollOptions=s.rollOptions.filter(i=>!(i.type==e.currentTarget.dataset.type&&i.target==e.currentTarget.dataset.name)),s.results=s.results.filter(i=>!(i.type==e.currentTarget.dataset.type&&i.target==e.currentTarget.dataset.name)),o.rerenderGC(a,s)}static async editGC(e){let t=$(e.currentTarget),a=Number(e.currentTarget.dataset.index),s=game.messages.get(t.parents(".message").attr("data-message-id")),i=s.flags;if(a)i.results[a].qs=Number(t.val());else if(e.currentTarget.dataset.name){let n=i.rollOptions.find(r=>r.target==e.currentTarget.dataset.name&&e.currentTarget.dataset.type==r.type);n[e.currentTarget.dataset.field]=Number(t.val())}else i[e.currentTarget.dataset.field]=Number(t.val());o.rerenderGC(s,i)}static async updateInformationRoll(e,t,a){let s=[],i=await fromUuid(e.uuid),n=t.result.qualityStep||0;for(let r=1;r<=n;r++){let l=`qs${r}`;i.system[l]&&s.push(i.system[l])}if(t.result.successLevel>1&&i.system.crit?s.push(i.system.crit):t.result.successLevel<-1&&i.system.botch?s.push(i.system.botch):i.system.fail&&!n&&s.push(i.system.fail),s.length>0){await Promise.all(s.map(async l=>await TextEditor.enrichHTML(l,{async:!0}))),s.unshift(`

${i.name}

`);let r=g.chatDataSetup(s.join(""));e.recipients.length&&(r.whisper=e.recipients),ChatMessage.create(r)}}static async informationRequestRoll(e){let t=e.currentTarget.dataset.mod,a=e.currentTarget.dataset.uuid,{actor:s,tokenId:i}=re._getActor();if(!s)return;let n=game.settings.get("dsa5","informationDistribution"),r=[];n==1?(r=game.users.filter(d=>d.isGM).map(d=>d.id),r.push(game.user.id)):n==2&&(r=game.users.filter(d=>d.isGM).map(d=>d.id));let l={modifier:t,postFunction:{functionName:"game.dsa5.apps.RequestRoll.updateInformationRoll",uuid:a,recipients:r}},c=s.items.find(d=>d.name==e.currentTarget.dataset.skill&&d.type=="skill");s.setupSkill(c,l,i).then(async d=>{d.testData.opposable=!1;let m=await s.basicTest(d);this.updateInformationRoll(l.postFunction,m)})}static chatListeners(e){e.on("change",".editGC",t=>o.editGC(t)),e.on("mousedown",".request-roll",t=>{let a=t.currentTarget.dataset,s={};if(t.button==2){let i=0,n=$(t.currentTarget).closest(".chat-message"),r=setInterval(function(){i++;let l=n.find("nav");l.length>0&&(l.remove(),clearInterval(r)),i>=20&&clearInterval(r)},10);s.rollMode="blindroll"}o.requestRoll(a.type,a.name,Number(a.modifier)||0,s)}),e.on("click",".request-gc",t=>{let a=t.currentTarget.dataset;o.requestGC(a.type,a.name,$(t.currentTarget).parents(".message").attr("data-message-id"),Number(a.modifier)||0)}),e.on("click",".removeGC",t=>o.removeGCEntry(t)),e.on("click",".removeSkillFromGC",t=>o.removeSkillFromGC(t)),e.on("click",".addSkillToGC",t=>o.addSkillToGC(t)),e.on("click",".informationRequestRoll",t=>o.informationRequestRoll(t))}};var{getProperty:da,duplicate:$r,mergeObject:Or}=foundry.utils,Nt=class o{static{u(this,"TableEffects")}static async applyEffect(e,t){let a=game.messages.get(e),s=da(a,"flags.dsa5.hasEffect"),i=da(a,"flags.dsa5.options")||{};if(s){let n=["damageModifier","gearDamaged","gearLost","resistEffect","malus","selfDamage","nextAction"],r=[],l;if(t=="self"){let d=g.getSpeaker(i.speaker);r.push(d),l=i.source?d.items.get(i.source):void 0}else r=Array.from(game.user.targets).map(d=>d.actor);for(let d of n){let m=da(s,d);m&&(await o[d](m,t,r,l,e,a)||console.warn(`Table effect for <${d} not working yet`,m,t,r,l))}let c=game.i18n.format("ActiveEffects.appliedEffect",{source:game.i18n.localize("table"),target:r.map(d=>d.name).join(", ")});await a.update({content:a.content.replace(/hideAnchor">/,`hideAnchor">`)})}}static async damageModifier(e,t,a,s){}static async nextAction(e,t,a,s){}static async opportunityAttack(e,t,a,s){}static async gearDamaged(e,t,a,s){if(s&&["meleeweapon","rangeweapon"].includes(s.type)){let i=da(s,"system.effect.attributes")||"";return new RegExp(`(${x.magical}|${x.clerical})`,"i").test(i)?await s.update({"system.worn.value":!1}):await W.absoluteDamageLevelToItem(s,e),!0}}static async gearLost(e,t,a,s){if(s&&["meleeweapon","rangeweapon"].includes(s.type)){if(await s.update({"system.worn.value":!1}),e.distance){let i=await new Roll(e.distance).evaluate(),n=await i.render(),r=game.i18n.format("WEAPON.dropped",{distance:i.total});ChatMessage.create(g.chatDataSetup(`

${r}

${n}`))}return!0}}static async resistEffect(e,t,a,s,i){for(let n of a){let r=[{skill:e.roll,mod:e.modifier||0,effect:{_id:"botchEffect",name:e.fail.description},target:n,token:n.token?n.token.id:void 0}];Z.createResistRollMessage(r,i,t)}return!0}static evaluateTargetArg(e,t){let a=t,s=!0;if(e.target=="victim"){let i=Array.from(game.user.targets).map(n=>n.actor);i.length?a=i:(s=!1,ui.notifications.warn("DSAError.noVictim",{localize:!0}))}return{hasTargets:s,finalTargets:a}}static async malus(e,t,a,s){for(let i of e){let{hasTargets:n,finalTargets:r}=this.evaluateTargetArg(i,a),l=!n&&i.noTarget,c=l?i.noTarget.systemEffect:i.systemEffect,d=l?i.noTarget.level:i.level||1,m=l?i.noTarget.changes:i.changes,p=l?i.noTarget.duration:i.duration;if(c){let f=CONFIG.statusEffects.find(y=>y.id==c);if(!m){m=$r(f.changes||[]);let y=m.find(k=>k.key==`system.condition.${c}`);y&&(y.value=d)}let h;if(m){let y=game.i18n.localize(`CONDITION.${c}`)+" - "+game.i18n.localize("botchCritEffect");h=J.effectBaseDummy(y,m,p||{}),h.icon=f.icon}else h=c;for(let y of r)await y.addCondition(h);return!0}else if(m){let f=J.effectBaseDummy(game.i18n.localize("botchCritEffect"),m||[],p||{});Or(f,{flags:{dsa5:{hideOnToken:!1,hidePlayers:!1}}});for(let h of r)await h.addCondition(f);return!0}}}static async selfAttack(e,t,a,s){let{hasTargets:i,finalTargets:n}=this.evaluateTargetArg(e,a)}static async selfDamage(e,t,a,s){let{hasTargets:i,finalTargets:n}=this.evaluateTargetArg(e,a);if(s){let r=g.toObjectIfPossible(s);for(let l of n){let c=l.items.filter(f=>f.type=="combatskill").map(f=>O._calculateCombatSkillValues(f.toObject(),l.system)),d;e.damage?d={damagedie:e.damage,damageAdd:""}:s.type=="rangeweapon"?d=O._prepareRangeWeapon(r,[],c,l):s.type=="meleeweapon"?d=O._prepareMeleeWeapon(r,c,l):d=s.system.traitType.value=="meleeAttack"?O._prepareRangeTrait(r,l.system):O._prepareMeleetrait(r,l.system);let m=(d.damagedie+d.damageAdd).replace(/wWD/g,"d"),p=await new Roll(`(${m})*${e.multiplier||1}${e.modifier||""}`).evaluate();await l.applyDamage(Math.round(p.total)),ChatMessage.create(g.chatDataSetup(await p.render()))}return!0}else{for(let r of n){let l=await new Roll("1d6").evaluate();await r.applyDamage(Math.round(l.total)),ChatMessage.create(g.chatDataSetup(await l.render()))}return!0}}};var{getProperty:ma}=foundry.utils,wt=u(async(o,e,t=1)=>{let a=game.messages.get(o[0].dataset.messageId),s=a.flags.opposeData,i=s?.speakerDefend,n=g.getSpeaker(i);if(!n.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});await n.applyDamage(s.damage[e]*t);let r={"flags.data.damageApplied":!0,content:a.content.replace(/hideAnchor">/,`hideAnchor">`)};game.user.isGM?await a.update(r):game.socket.emit("system.dsa5",{type:"updateMsg",payload:{id:o[0].dataset.messageId,updateData:r}})},"applyDamage");function $n(){let o=u((A,M)=>g.fateAvailable(A,M),"fateAvailable"),e=u(function(A,M="damage.value"){let T=game.messages.get(A[0].dataset.messageId).flags.opposeData,L=T?g.getSpeaker(T.speakerDefend)?.isOwner:!1;return((game.user.isGM||L)&&A.find(".opposed-card").length||A.find(".dice-roll").length)&&(ma(T,M)||0)>0},"canHurt"),t=u(function(A){return e(A,"damage.sp")},"canHurtSP"),a=u(function(A){let M=game.messages.get(A[0].dataset.messageId);return M.speaker.actor&&M.flags.data&&(game.actors.get(M.speaker.actor).isOwner||game.user.isGM)?["liturgy","ceremony","spell","ritual","magicalsign"].includes(M.flags.data.preData.source.type)||ma(M.flags.data.preData,"calculatedSpellModifiers.costsMana"):!1},"canCostMana"),s=u(function(A){if(!(game.user.isGM&&game.settings.get("dsa5","hideOpposedDamageSelect")))return!1;let M=game.messages.get(A[0].dataset.messageId);return"hideData"in M.flags&&M.flags.hideData},"canUnhideData"),i=u(function(A){if(!(game.user.isGM&&game.settings.get("dsa5","hideOpposedDamageSelect")))return!1;let M=game.messages.get(A[0].dataset.messageId);return"hideData"in M.flags&&!M.flags.hideData},"canHideData"),n=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data&&T.flags.data.postData.successLevel>-2){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M)){let q=T.flags.data.preData.source.type,ve=T.flags.data.preData.mode||"";["skill","spell","liturgy","ritual","ceremony"].includes(q)&&(q="char");let Te=game.i18n.localize(`SCHIPSKILLS.${q}${ve}`);return!T.flags.data.fateImproved&&L.items.getName(Te)}}return!1},"canImproveRoll"),r=u(function(A){return n(A,!0)},"canImproveRollGroup"),l=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M)&&!T.flags.data.fatePointAddQSUsed)return T.flags.data.postData.successLevel>0&&T.flags.data.postData.qualityStep!=null}return!1},"canIncreaseQS"),c=u(function(A){return l(A,!0)},"canIncreaseQSGroup"),d=u(function(A){let M=game.messages.get(A[0].dataset.messageId);if(M.speaker.actor&&M.flags.data){let T=game.actors.get(M.speaker.actor);if(T.isOwner)return T.items.find(L=>L.name==`${game.i18n.localize("LocalizedIDs.aptitude")} (${M.flags.data.preData.source.name})`)!=null&&!M.flags.data.talentedRerollUsed}return!1},"isTalented"),m=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M))return T.flags.data.postData.damageRoll!=null&&!T.flags.data.fatePointDamageRerollUsed}return!1},"canRerollDamage"),p=u(function(A){return m(A,!0)},"canRerollDamageGroup"),f=u(function(A,M=!1){let T=game.messages.get(A[0].dataset.messageId);if(T.speaker.actor&&T.flags.data){let L=game.actors.get(T.speaker.actor);if(L.isOwner&&o(L,M))return!T.flags.data.fatePointRerollUsed&&T.flags.data.postData.rollType!="regenerate"}return!1},"canReroll"),h=u(function(A){return f(A,!0)},"canRerollGroup"),y=u(function(A){let M=game.messages.get(A[0].dataset.messageId);return M.speaker.actor&&M.flags.data&&game.actors.get(M.speaker.actor).isOwner&&["LeP","KaP","AsP"].some(L=>ma(M.flags,`data.postData.${L}`)!=null)?!M.flags.data.healApplied:!1},"canHeal"),k=u(function(A){if(game.user.isGM){let M=game.messages.get(A[0].dataset.messageId);if("hideData"in M.flags){let T=!M.flags.hideData,L=$(M.content);L.find(".hideAnchor")[T?"addClass":"removeClass"]("hideData"),L=$("
").append(L),M.update({content:L.html(),"flags.hideData":T})}}},"showHideData"),C=u(A=>{let M=game.messages.get(A.data("messageId"));return!M||!canvas.tokens?!1:M.isRoll&&M.isContentVisible&&canvas.tokens.controlled.length&&A.find(".dice-roll").length},"canApplyDefaultRolls"),v=u((A,M,T=0)=>{let L=game.messages.get(A[0].dataset.messageId);game.actors.get(L.speaker.actor).useFateOnRoll(L,M,T)},"useFate"),I=u((A,M,T=1)=>{let q=game.messages.get(A.data("messageId")).rolls[0];return Promise.all(canvas.tokens.controlled.map(ve=>{let Te=ve.actor,qe=Math.round((M!="sp"?q.total-O.armorValue(Te).armor:q.total)*T);return Te.applyDamage(Math.max(0,qe))}))},"applyChatCardDamage"),S=u(async A=>{let M=game.messages.get(A[0].dataset.messageId),T=M.flags.data,L=g.getSpeaker(M.speaker);if(!L.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});let q=T.preData.calculatedSpellModifiers.maintainCost.trim(),ve=["ritual","spell"].includes(T.preData.source.type)||ma(T.preData.calculatedSpellModifiers,"costsMana")?"AsP":"KaP",Te=await L.applyMana(T.preData.calculatedSpellModifiers.finalcost,ve);if(q&&q!=0&&Te&&T.postData.successLevel>0){let qe=T.preData.source.name;try{let St=q.match(/^\d{1,3}/)[0],lt=q.replace(/^\d{1,3}/,"").match(/\d{1,3}/);lt=lt&&Number(lt[0])||1;let ct={name:`${qe} (${game.i18n.localize("maintainCost")})`,img:"icons/svg/daze.svg",flags:{dsa5:{description:q,maintain:St,payType:ve}},changes:[],duration:{}},Zt=[{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.combatRounds"),"gi"),seconds:5},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.minutes"),"gi"),seconds:60},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.hours"),"gi"),seconds:3600},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.days"),"gi"),seconds:3600*24},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.seconds"),"gi"),seconds:1},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.weeks"),"gi"),seconds:3600*24*7},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.months"),"gi"),seconds:3600*24*30},{regEx:new RegExp(game.i18n.localize("DSAREGEXmaintain.years"),"gi"),seconds:3600*24*350}];for(let At of Zt)if(At.regEx.test(q)){let w=Number(lt)*At.seconds;ct.duration.seconds=w,ct.duration.rounds=ct.duration.seconds/5;break}await L.addCondition(ct)}catch{console.error(`Could not parse duration '${q}' of '${qe}'`)}}await M.update({"flags.data.manaApplied":!0,content:M.content.replace(//,'')})},"payMana"),j=u(()=>game.i18n.localize(game.combat?.isBrawling?"CHATCONTEXT.ApplyDamagePP":"CHATCONTEXT.ApplyDamage"),"applyDamageLabel");Hooks.on("getChatLogEntryContext",(A,M)=>{M.push({name:"CHATCONTEXT.hideData",icon:'',condition:i,callback:u(T=>{k(T)},"callback")},{name:"CHATCONTEXT.showData",icon:'',condition:s,callback:u(T=>{k(T)},"callback")},{name:"regenerate",icon:'',condition:y,callback:u(async T=>{let L=await game.messages.get(T[0].dataset.messageId),q=g.getSpeaker(L.speaker);if(!q.isOwner)return ui.notifications.error("DSAError.DamagePermission",{localize:!0});await L.update({"flags.data.healApplied":!0,content:L.content.replace(/<\/div>$/,'
')}),await q.applyRegeneration(L.flags.data.postData.LeP,L.flags.data.postData.AsP,L.flags.data.postData.KaP)},"callback")},{name:"CHATCONTEXT.ApplyMana",icon:'',condition:a,callback:u(async T=>{S(T)},"callback")},{name:j(),icon:'',condition:e,callback:u(T=>{wt(T,"value")},"callback")},{name:"CHATCONTEXT.ApplyDamageSP",icon:'',condition:t,callback:u(T=>{wt(T,"sp")},"callback")},{name:j(),icon:'',condition:C,callback:u(T=>{I(T,"value")},"callback")},{name:"CHATCONTEXT.ApplyDamageSP",icon:'',condition:C,callback:u(T=>{I(T,"sp")},"callback")},{name:"CHATCONTEXT.Reroll",icon:'',condition:f,callback:u(T=>{v(T,"reroll")},"callback")},{name:"CHATCONTEXT.RerollGroup",icon:'',condition:h,callback:u(T=>{v(T,"reroll",1)},"callback")},{name:"CHATCONTEXT.talentedReroll",icon:'',condition:d,callback:u(T=>{v(T,"isTalented")},"callback")},{name:"CHATCONTEXT.AddQS",icon:'',condition:l,callback:u(T=>{v(T,"addQS")},"callback")},{name:"CHATCONTEXT.AddQSGroup",icon:'',condition:c,callback:u(T=>{v(T,"addQS",1)},"callback")},{name:"CHATCONTEXT.rerollDamage",icon:'',condition:m,callback:u(T=>{v(T,"rerollDamage")},"callback")},{name:"CHATCONTEXT.rerollDamageGroup",icon:'',condition:p,callback:u(T=>{v(T,"rerollDamage",1)},"callback")},{name:"CHATCONTEXT.improveFate",icon:'',condition:n,callback:u(T=>{v(T,"Improve")},"callback")},{name:"CHATCONTEXT.improveFateGroup",icon:'',condition:r,callback:u(T=>{v(T,"Improve",1)},"callback")}),game.settings.get("dsa5","doubleDamageOptions")&&M.push({name:j()+" x2",icon:'',condition:e,callback:u(T=>{wt(T,"value",2)},"callback")},{name:game.i18n.localize("CHATCONTEXT.ApplyDamageSP")+" x2",icon:'',condition:t,callback:u(T=>{wt(T,"sp",2)},"callback")},{name:j()+" x2",icon:'',condition:C,callback:u(T=>{I(T,"value",2)},"callback")},{name:game.i18n.localize("CHATCONTEXT.ApplyDamageSP")+" x2",icon:'',condition:C,callback:u(T=>{I(T,"sp",2)},"callback")})})}u($n,"chatContext");var{mergeObject:oe,deepClone:On,duplicate:xr,getProperty:$e}=foundry.utils,R=class _DiceDSA5{static{u(this,"DiceDSA5")}static async rollTest(o){let e;switch(o.source.type){case"ceremony":case"ritual":case"liturgy":case"spell":e=await this.rollSpell(o);break;case"skill":e=await this.rollTalent(o);break;case"combatskill":e=await this.rollCombatskill(o);break;case"trait":o.mode=="parry"&&await this.updateDefenseCount(o),e=o.mode=="damage"?await this.rollDamage(o):await this.rollCombatTrait(o);break;case"regenerate":e=await this.rollRegeneration(o);break;case"meleeweapon":case"rangeweapon":o.mode=="parry"&&await this.updateDefenseCount(o),e=o.mode=="damage"?await this.rollDamage(o):await this.rollWeapon(o);break;case"dodge":await this.updateDefenseCount(o),e=await this.rollStatus(o);break;case"poison":case"disease":e=await this.rollItem(o);break;case"fallingDamage":e=await this.rollFallingDamage(o);break;default:e=await this.rollAttribute(o)}return oe(e,On(o.extra)),e}static async rollDices(o,e){if(!o.roll){let t=game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration,a;switch(o.source.type){case"liturgy":case"spell":case"ceremony":case"ritual":case"skill":a=await new Roll("1d20+1d20+1d20").evaluate(),oe(a.dice[0].options,t(o.source.system.characteristic1.value)),oe(a.dice[1].options,t(o.source.system.characteristic2.value)),oe(a.dice[2].options,t(o.source.system.characteristic3.value));break;case"regenerate":let s=[];o.regenerateLeP&&s.push([game.settings.get("dsa5","lessRegeneration")?"1d3":"1d6"]),o.extra.actor.isMage&&o.regenerateAsP&&s.push("1d6"),o.extra.actor.isPriest&&o.regenerateKaP&&s.push("1d6"),a=await new Roll(s.join("+")).evaluate(),o.regenerateLeP&&oe(a.dice[0].options,t("mu")),o.extra.actor.isMage&&o.regenerateAsP&&oe(a.dice[s.length-1].options,t("ge")),o.extra.actor.isPriest&&o.regenerateKaP&&oe(a.dice[s.length-1].options,t("in")),o.extra.actor.isMage&&o.regenerateAsP&&o.extra.actor.isPriest&&o.regenerateKaP&&oe(a.dice[s.length-2].options,t("ge"));break;case"meleeweapon":case"rangeweapon":case"weaponless":case"combatskill":case"trait":if(o.mode=="damage"){let l=await this.damageFormula(o);a=await new Roll(l,o.extra.actor.system).evaluate();for(let c=0;c{r.actor&&n.push({name:r.actor.name,id:r.id,img:r.actor.img})}),oe(o.data,{hasSituationalModifiers:i.length>0,situationalModifiers:i,attributesList:["mu","kl","in","ch","ff","ge","ko","kk"].reduce((r,l)=>(r[l]=game.i18n.localize(`CHARAbbrev.${l.toUpperCase()}`),r),{}),rollMode:o.data.rollMode||a,defenseCount:await this.getDefenseCount(e),targets:n}),t.user=game.user.id,e.extra.options.bypass)return t.rollMode=e.extra.options.rollMode||a,e.situationalModifiers||(e.situationalModifiers=[]),{testData:e,cardOptions:t,dialogOptions:o};{let r=ae.getDialogForItem(e,o.data),l=await renderTemplate(o.template,o.data);return new Promise((c,d)=>{new r({title:o.title,content:l,buttons:r.getRollButtons(e,o,c,d),default:"rollButton"}).recallSettings(e.extra.speaker,e.source,e.mode,o.data).render(!0)})}}static async getDefenseCount(o){return game.combat?await game.combat.getDefenseCount(o.extra.speaker):0}static async getDuplicatusRoll(o,e){let t=e.situationalModifiers.find(a=>a.name.includes("Duplicatus")&&a.value>0&&a.value<5);if(t){let a=Math.round(1/(t.value+1)*20),s=await _DiceDSA5.manualRolls(await new Roll("1d20").evaluate());this._addRollDiceSoNice(e,s,game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("ch"));let i=a>=s._total,n=`
Duplicatus-${game.i18n.localize("Roll")}: ${s._total}0&&(o.description=`${game.i18n.localize("Failure")}, ${game.i18n.localize("CHATNOTIFICATION.duplicatus")}`,o.successLevel=0)}}static async _rollConfirm(){return await new Roll("1d20").evaluate()}static async _rollSingleD20(o,e,t,a,s,i="",n=1){let r="";e=Math.round((e+a)*n);let l=o.total??o._total,c=game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration(t),d=e-l>=0,m=[{char:t,res:l,suc:d,tar:e}],p=d?1:-1,f=20,h=1,y={meleeweapon:"meleeStats",rangeweapon:"rangeStats"}[s.source.type];y&&(f=Math.min(s.extra.actor.system[y].botch,s.source.system.botch),h=Math.max(s.extra.actor.system[y].crit,s.source.system.crit)),N.improvisedWeapon.test(s.source.name)&&(F.hasAbility(s.extra.actor,game.i18n.localize("LocalizedIDs.improvisedWeaponMaster"))||(f=Math.min(19,f)),this._appendSituationalModifiers(s,`${game.i18n.localize("CHAR.ATTACK")} - ${game.i18n.localize("WEAPON.improvised")}`,2,"defenseMalus")),s.situationalModifiers.find(v=>v.name==game.i18n.localize("MODS.opportunityAttack")&&v.value!=0)&&(f=50,h=-50);let k=l<=h,C=l>=f;if(k||C){if(r=game.i18n.localize(k?"CriticalSuccess":"CriticalFailure"),p=k?3:-3,!game.settings.get("dsa5","noConfirmationRoll")){let v=await _DiceDSA5.manualRolls(await _DiceDSA5._rollConfirm(),"confirmationRoll",s.extra.options),I=$e(s.source,`system.${k?"critConfirm":"botchConfirm"}`)||0,S=e-Math.clamp(v.total+I,1,20);if(P.hasVantage(s.extra.actor,`${game.i18n.localize("LocalizedIDs.weaponAptitude")} (${i})`)&&!(S>=0)){let A=v.total;v=await _DiceDSA5.manualRolls(await _DiceDSA5._rollConfirm(),"LocalizedIDs.weaponAptitude",s.extra.options),S=e-Math.clamp(v.total+I,1,20),r+=`, ${game.i18n.format("usedWeaponExpertise",{a:A,b:v.total})}`}this._addRollDiceSoNice(s,v,c);let j=S>=0;C&&(j=!j),m.push({char:t,res:Math.clamp(v.total+I,1,20),suc:j,tar:e}),r=`${game.i18n.localize(j?"confirmed":"unconfirmed")} ${r}`,j?p=k?3:-3:p=k?2:-2}}else r=game.i18n.localize(d?"Success":"Failure");return{successLevel:p,characteristics:m,description:r,preData:s,modifiers:a,extra:{attackFromBehind:s.extra.attackFromBehind}}}static async rollFallingDamage(o){let e=o.roll,t=[];for(let s of e.terms[0].results)t.push({char:"damage",res:s.result,suc:!1});return{rollType:"fallingDamage",preData:o,modifiers:await this._situationalModifiers(o),extra:{},damage:Math.max(0,e.total),formula:e.formula,characteristics:t}}static async rollRegeneration(o){let e=await this._situationalModifiers(o),t=o.roll,a=[],s={rollType:"regenerate",preData:o,modifiers:e,extra:{}},i=[];o.regenerateLeP&&i.push("LeP"),o.extra.actor.system.isMage&&o.regenerateAsP&&i.push("AsP"),o.extra.actor.system.isPriest&&o.regenerateKaP&&i.push("KaP");let n=0;if(o.extra.actor.effects.some(l=>l.statuses.includes("sick"))){this._appendSituationalModifiers(o,game.i18n.localize("CONDITION.sick"),"*0");for(let l of i)a.push({char:l,res:0,die:"d6"}),s[l]=0,n+=2}else for(let l of i)this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.regeneration${l}`),P.vantageStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.regeneration${l}`)),l),this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.weakRegeneration${l}`),P.vantageStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.weakRegeneration${l}`))*-1,l),this._appendSituationalModifiers(o,game.i18n.localize(`LocalizedIDs.advancedRegeneration${l}`),F.abilityStep(o.extra.actor,game.i18n.localize(`LocalizedIDs.advancedRegeneration${l}`)),l),this._appendSituationalModifiers(o,`${game.i18n.localize(`CHARAbbrev.${l}`)} ${game.i18n.localize("Modifier")}`,o[`${l}Modifier`],l),this._appendSituationalModifiers(o,`${game.i18n.localize(`CHARAbbrev.${l}`)} ${game.i18n.localize("regenerate")}`,o[`regeneration${l}`],l),a.push({char:l,res:t.terms[n].results[0].result,die:"d6"}),s[l]=Math.round(Math.max(0,Number(t.terms[n].results[0].result)+Number(e)+await this._situationalModifiers(o,l))*Number(o.regenerationFactor)),n+=2;return s.characteristics=a,s}static async rollStatus(o){let e=o.roll||await new Roll("1d20").evaluate(),t=await this._rollSingleD20(e,o.source.system.max,o.extra.statusId,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));t.rollType="dodge";let a=o.extra.statusId=="dodge";return a&&t.successLevel==3?await B.tableEnabledFor("criticalMeleeDefense")?t.description+=B.rollCritBotchButton("criticalMeleeDefense",!1,o,o):t.description+=B.defaultParryCrit():a&&t.successLevel==-3&&(await B.tableEnabledFor("Defense")?t.description+=B.rollCritBotchButton("Defense",!0,o,o):t.description+=await B.defaultBotch()),t}static async rollAttribute(o){let e=o.roll?o.roll:await new Roll("1d20").evaluate();this._appendSituationalModifiers(o,game.i18n.localize("Difficulty"),o.testDifficulty);let t=await this._rollSingleD20(e,o.source.system.value,o.extra.characteristicId,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));return t.rollType="attribute",t}static async damageFormula(o){let e;if(o.source.type=="meleeweapon"){let t=O._calculateCombatSkillValues(o.extra.actor.items.find(a=>a.type=="combatskill"&&a.name==o.source.system.combatskill.value),o.extra.actor.system);e=O._prepareMeleeWeapon(o.source,[t],o.extra.actor)}else if(o.source.type=="rangeweapon"){let t=O._calculateCombatSkillValues(o.extra.actor.items.find(a=>a.type=="combatskill"&&a.name==o.source.system.combatskill.value),o.extra.actor.system);e=O._prepareRangeWeapon(o.source,[],[t],o.extra.actor)}else e=o.source.system;return this.replaceDieLocalization(o.source.system.damage.value)+`+${e.extraDamage||0}`}static async rollDamage(o){let e=await this._situationalModifiers(o),t=[],a=o.roll,s=a.total+e;for(let i of a.terms)if(i instanceof foundry.dice.terms.Die||i.class=="Die")for(let n of i.results)t.push({char:o.mode,res:n.result,die:"d"+i.faces});return{rollType:"damage",damage:s,characteristics:t,preData:o,modifiers:e,extra:{}}}static async _situationalModifiers(o,e=""){let t=0;for(let a of o.situationalModifiers){if(a.value==null)continue;let s=Number(a.value)||await this._stringToRoll(a.value);t+=a.type==e||e==""&&a.type==null?s:0}return t}static _situationalPartCheckModifiers(o){return o.situationalModifiers.reduce(function(e,t){if(t.type=="TPM"){let a=t.value.split("|");return a.length!=3||(e[0]=e[0]+Number(a[0]),e[1]=e[1]+Number(a[1]),e[2]=e[2]+Number(a[2])),e}else return e},[0,0,0])}static _situationalMultipliers(o){return o.situationalModifiers.reduce(function(e,t){return e*(t.type=="*"&&Number(`${t.value}`.replace(/,/,"."))||1)},1)}static _appendSituationalModifiers(o,e,t,a=""){let s=o.situationalModifiers.find(i=>i.name==e);s?s.value=t:o.situationalModifiers.push({name:e,value:t,type:a})}static async rollCombatTrait(o){let e=o.roll||await new Roll("1d20").evaluate(),t=o.source,a=t.system.traitType.value=="meleeAttack",s=o.mode=="attack";if(a){let l={system:{combatskill:{value:"-"},reach:{value:t.system.reach.value}}};this._appendSituationalModifiers(o,game.i18n.localize("opposingWeaponSize"),this._compareWeaponReach(l,o))}let i=await this._rollSingleD20(e,Number(s?t.system.at.value:t.system.pa),o.mode,await this._situationalModifiers(o),o,"",this._situationalMultipliers(o));await this.getDuplicatusRoll(i,o);let n=i.successLevel>0;await this.detailedWeaponResult(i,o,t),s&&n&&await _DiceDSA5.evaluateDamage(o,i,t,!a,i.doubleDamage),i.rollType="weapon";let r=_DiceDSA5.parseEffect(t);return r&&(i.parsedEffect=r),i}static async _stringToRoll(o,e){let t=[],a=/\d{1}[dDwW]\d/g,s=`${o}`;s.replace(a,function(r){t.push(new Roll(_DiceDSA5.replaceDieLocalization(r),e.extra.actor.system).evaluate())});let i=await Promise.all(t),n=s.replace(a,()=>{let r=i.shift();return e&&_DiceDSA5._addRollDiceSoNice(e,r,game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("ch")),r.total});return await Roll.safeEval(n)}static replaceDieLocalization(o){return o.replace(/[Ww](?=\d)/g,"d")}static async evaluateDamage(o,e,t,a,s){let i=this.replaceDieLocalization(t.system.damage.value),n=[],r=t.dmgMultipliers||[],l=r.map(y=>`${y.name} *${y.val}`),c=[],d=0;for(let y of o.situationalModifiers){let k=0;if(y.armorPen&&c.push(y.armorPen),y.damageBonus){if(/^\*/.test(y.damageBonus)){g.pushOnlyIfUnique(r,{name:y.name,val:Number(y.damageBonus.replace("*",""))});continue}let C=/^=/.test(y.damageBonus),v=`${y.damageBonus}`.replace(/^=/,""),I=await _DiceDSA5._stringToRoll(v,o);if(k=I*(y.step||1),C){i=this.replaceDieLocalization(v),n.push({name:y.name,roll:I});continue}else y.damageBonus=I,d+=k}}let m=o.damageRoll||await _DiceDSA5.manualRolls(await new Roll(i,o.extra.actor.system).evaluate(),"CHAR.DAMAGE",o.extra.options),p=m.total,f=0;for(let y of m.terms)if(y instanceof foundry.dice.terms.Die||y.class=="Die")for(let k of y.results)f+=Number(k.result),e.characteristics.push({char:"damage",res:k.result,die:"d"+y.faces});let h=p-f;if(n.length>0)l.push(n[0].name+" "+p);else{p+=d,l.push(game.i18n.localize("Roll")+" "+f),h!=0&&l.push(game.i18n.localize("weaponModifier")+" "+h),o.situationalModifiers.reduce((I,S)=>{if(S.damageBonus){let j=/^\*/.test(S.damageBonus)?S.damageBonus:Number(S.damageBonus)*(S.step||1);l.push(`${S.name} ${j}`)}},l),o.situationalModifiers.find(I=>I.name.indexOf(game.i18n.localize("CONDITION.bloodrush"))>-1)&&(p+=2,l.push(game.i18n.localize("CONDITION.bloodrush")+" 2")),t.extraDamage&&(p=Number(t.extraDamage)+Number(p),l.push(game.i18n.localize("damageThreshold")+" "+t.extraDamage));let y=o.extra.actor.system[a?"rangeStats":"meleeStats"].damage,k=await _DiceDSA5._stringToRoll(y,o);k!=0&&(p+=k,l.push(game.i18n.localize("statuseffects")+" "+k));let C=$e(t,"system.combatskill.value"),v=o.extra.actor.system.skillModifiers.combat.damage.reduce((I,S)=>(S.target==C&&(I+=Number(S.value)),I),0);v&&(p=p+v,l.push(`${game.i18n.localize("TYPES.Item.combatskill")} (${game.i18n.localize("CHARAbbrev.damage")}) ${v}`))}s&&(p=p*s,l.push(game.i18n.format("doubleDamage",{x:s})));for(let y of r)p=p*y.val;e.armorPen=c,e.damagedescription=l.join(", "),e.damage=Math.round(p),e.damageRoll=xr(m)}static async rollWeapon(o){let e=o.roll||await new Roll("1d20").evaluate(),t,a=o.source,s=a.system.combatskill.value,i=O._calculateCombatSkillValues(o.extra.actor.items.find(c=>c.type=="combatskill"&&c.name==s),o.extra.actor.system,{step:await this._situationalModifiers(o,"step"),[o.mode]:await this._situationalModifiers(o,o.mode)}),n=a.type=="meleeweapon";n?(t=O._prepareMeleeWeapon(a,[i],o.extra.actor),o.mode=="attack"&&this._appendSituationalModifiers(o,game.i18n.localize("opposingWeaponSize"),this._compareWeaponReach(t,o))):t=O._prepareRangeWeapon(a,[],[i],o.extra.actor);let r=await this._rollSingleD20(e,t[o.mode],o.mode,await this._situationalModifiers(o),o,s,this._situationalMultipliers(o));await this.getDuplicatusRoll(r,o),await this.detailedWeaponResult(r,o,a),o.mode=="attack"&&r.successLevel>0&&!o.extra.counterAttack&&await _DiceDSA5.evaluateDamage(o,r,t,!n,r.doubleDamage),o.extra.counterAttack&&(g.getSpeaker(o.extra.speaker).addCondition("stunned"),r.description+=", "+g.replaceConditions(game.i18n.localize("stunnedByCounterAttack"))),r.rollType="weapon";let l=_DiceDSA5.parseEffect(t);return l&&(r.parsedEffect=l),r}static _weaponBotchCritEffect(o,e,t){let a=[];for(let s of o.effects)for(let i of s.changes)if(i.key==e){if(i.value=="description")a.push(s.description);else if(/^condition /.test(i.value)){let n=i.value.replace(/^condition /,"").split(" "),r=Number(n[1])||1,l=game.i18n.localize(`CONDITION.${n[0]}`),c=g.replaceConditions(game.i18n.format("CHATNOTIFICATION.suffersCondition",{actor:t.name,condition:l,count:r}));a.push(`

${c}

`)}}return a.join("
")}static async detailedWeaponResult(o,e,t){let a=e.mode=="attack"&&!e.extra.counterAttack,s=t.type=="meleeweapon"||$e(t,"system.traitType.value")=="meleeAttack";switch(o.successLevel){case 3:a?(await B.tableEnabledFor("criticalAttack")?o.description+=B.rollCritBotchButton("criticalAttack",!1,e):(o.description+=B.defaultAttackCrit(!0),o.doubleDamage=2),o.halfDefense=!0):e.isRangeDefense&&await B.tableEnabledFor("criticalRangeDefense")?o.description+=B.rollCritBotchButton("criticalRangeDefense",!1,e):await B.tableEnabledFor("criticalMeleeDefense")?o.description+=B.rollCritBotchButton("criticalMeleeDefense",!1,e):o.description+=B.defaultParryCrit(),o.description+=this._weaponBotchCritEffect(t,"self.criteffect",e.extra.actor);break;case-3:let i=$e(t,"system.combatskill.value")==game.i18n.localize("LocalizedIDs.wrestle")||t.type=="trait";a&&s&&await B.tableEnabledFor("Melee")?o.description+=B.rollCritBotchButton("Melee",i,e):a&&await B.tableEnabledFor("Range")?o.description+=B.rollCritBotchButton("Range",!1,e):!a&&await B.tableEnabledFor("Defense")?o.description+=B.rollCritBotchButton("Defense",i,e):o.description+=await B.defaultBotch(),o.description+=this._weaponBotchCritEffect(t,"self.botcheffect",e.extra.actor);break;case 2:a&&(o.description+=B.defaultAttackCrit(!1),o.halfDefense=!0);break;case-2:break}}static async _addRollDiceSoNice(o,e,t){if(o.rollMode){for(let a=0;a{new ae({title:game.i18n.localize(t.cheat?"DIALOG.cheat":"DSASETTINGS.allowPhysicalDice"),content:r,default:"ok",buttons:{ok:{icon:'',label:game.i18n.localize("yes"),callback:u(d=>l([!0,d]),"callback")},cancel:{icon:'',label:game.i18n.localize("cancel"),callback:u(()=>l([!1,0]),"callback")}}}).render(!0)}),s){let l=[];i.find(".dieInput").each(function(c){let d=Number($(this).val());d>0&&l.push({val:d,index:c}),c++}),o.editRollAtIndex(l)}}return o}static parseEffect(o){let e=o.system.effect?o.system.effect.value:void 0,t=[];if(e){let s=/^[a-z]+\|[öäüÖÄÜa-zA-z ]+$/;for(let i of e.split(";"))if(s.test(i.trim())){let n=i.split("|").map(r=>r.trim());if(n[0]=="condition"){let r=CONFIG.statusEffects.find(l=>l.id==n[1]);t.push(` ${game.i18n.localize(r.name)} `)}else t.push(`${game.i18n.localize(n[0])}: ${n[1]}`)}}let a=$e(o,"flags.dsa5.poison");return a&&t.push(`${game.i18n.localize("TYPES.Item.poison")}: ${a.name}`),t.join(", ")}static async calculateEnergyCost(o,e,t){let a=[],s,i,n,r;if(e.successLevel<0){let l=["traditionWitch","traditionFjarning","braniborian"].map(d=>game.i18n.localize(`LocalizedIDs.${d}`)),c=t.extra.actor.items.some(d=>d.type=="specialability"&&l.includes(d.name))?3:2;e.preData.calculatedSpellModifiers.finalcost=Math.round(e.preData.calculatedSpellModifiers.finalcost/c)}if(o?(r="KaPCost",s=game.i18n.localize("LocalizedIDs.weakKarmicBody"),i=game.i18n.localize(`LocalizedIDs.${e.successLevel>0?"mightyKarmaControl":"karmaControl"}`),n={val:"kapModifier",name:"KaP"}):(r="AsPCost",s=game.i18n.localize("LocalizedIDs.weakAstralBody"),i=game.i18n.localize(`LocalizedIDs.${e.successLevel>0?"energyControl":"smallEnergyControl"}`),n={val:"aspModifier",name:"AsP"}),a.push({name:s,value:P.vantageStep(t.extra.actor,s)},{name:i,value:F.abilityStep(t.extra.actor,i)*-1},{name:`${game.i18n.localize("statuseffects")} (${game.i18n.localize("CHARAbbrev."+n.name)})`,value:t.extra.actor.system[n.val]+await this._situationalModifiers(t,r)}),a=a.filter(l=>l.value!=0),e.preData.calculatedSpellModifiers.description=a.map(l=>`${l.name} ${l.value}`).join(` `),e.preData.calculatedSpellModifiers.finalcost=Math.max(1,Number(e.preData.calculatedSpellModifiers.finalcost)+a.reduce((l,c)=>l+c.value,0)),e.successLevel>0&&e.preData.calculatedSpellModifiers.maintainCost!=0){let l=e.preData.calculatedSpellModifiers.maintainCost.split(" ");l[0]=Math.round(Number(l[0])),e.preData.calculatedSpellModifiers.finalcost+=l[0],e.preData.calculatedSpellModifiers.maintainCost=l.join(" ")}}static async rollSpell(o){let e=await this._rollThreeD20(o),t=["ceremony","liturgy"].includes(o.source.type);if(e.rollType=o.source.type,e.preData.calculatedSpellModifiers.finalcost=e.preData.calculatedSpellModifiers.cost,e.successLevel>=2){let a=(await new Roll("1d6").evaluate()).total;e.description=e.description+", "+game.i18n.localize("additionalFPs")+" "+a,e.result+=a,e.qualityStep=Math.min(game.settings.get("dsa5","capQSat"),Math.ceil(e.result/3)),e.preData.calculatedSpellModifiers.finalcost=Math.round(e.preData.calculatedSpellModifiers.cost/2)}else e.successLevel<=-2&&(e.description+=B.rollCritBotchButton(t?"Liturgy":"Spell",!1,o));if(e.successLevel>0&&o.source.system.effectFormula.value!=""){let a=_DiceDSA5.replaceDieLocalization(o.source.system.effectFormula.value.replaceAll(game.i18n.localize("CHARAbbrev.QS"),e.qualityStep)),s=[];for(let l of o.situationalModifiers)l.armorPen&&s.push(l.armorPen);/(,|;)/.test(a)&&(a=a.split(/[,;]/)[e.qualityStep-1]);let i=o.damageRoll?o.damageRoll:await _DiceDSA5.manualRolls(await new Roll(a,o.extra.actor.system).evaluate(),"CHAR.DAMAGE",o.extra.options);this._addRollDiceSoNice(o,i,game.dsa5.apps.DiceSoNiceCustomization.getAttributeConfiguration("damage")),e.calculatedEffectFormula=a;for(let l of i.terms)if(l instanceof foundry.dice.terms.Die||l.class=="Die")for(let c of l.results)e.characteristics.push({char:"effect",res:c.result,die:"d"+l.faces});let n=[],r=await _DiceDSA5._stringToRoll(o.extra.actor.system[t?"liturgyStats":"spellStats"].damage,o);r!=0&&n.push(game.i18n.localize("statuseffects")+" "+r),e.armorPen=s,e.damageRoll=i,e.damage=i.total+r,e.damagedescription=n.join(` @@ -95,4 +95,4 @@ var tr=Object.defineProperty;var u=(o,e)=>tr(o,"name",{value:e,configurable:!0}) ${i.join("")} -
`,r={ammunition:[{label:"ammunitiongroup",attr:"ammunitiongroup.value",type:"select",options:b.ammunitiongroups}],equipment:[{label:"equipmentType",attr:"equipmentType.value",type:"select",options:b.equipmentTypes},{label:"PLANT.region",attr:"region",type:"text"}],book:[{label:"BOOKITEM.format",attr:"format",type:"select",options:b.bookFormats},{label:"BOOKITEM.quality",attr:"quality",type:"select",options:b.bookQualities},{label:"BOOKITEM.exemplarType",attr:"exemplarType",type:"select",options:b.exemplarTypes},{label:"BOOKITEM.availability",attr:"availability",type:"range"}],trap:[],rangeweapon:[{label:"TYPES.Item.combatskill",attr:"combatskill.value",type:"select",options:t},{label:"ammunitiongroup",attr:"ammunitiongroup.value",type:"select",options:b.ammunitiongroups},{label:"PLANT.region",attr:"region",type:"text"}],meleeweapon:[{label:"TYPES.Item.combatskill",attr:"combatskill.value",type:"select",options:a},{label:"guidevalue",attr:"guidevalue.value",type:"select",options:b.combatskillsGuidevalues},{label:"reach",attr:"reach.value",type:"select",options:b.meleeRanges},{label:"PLANT.region",attr:"region",type:"text"}],poison:[{label:"resistanceModifier",attr:"resistance.value",type:"select",options:b.magicResistanceModifiers},{label:"COMBATSKILLCATEGORY.subcategory",attr:"subcategory",type:"select",options:b.poisonSubTypes},{label:"poisonType",attr:"poisonType.value",type:"text"},{label:"PLANT.region",attr:"region",type:"text"}],disease:[{label:"resistanceModifier",attr:"resistance.value",type:"select",options:b.magicResistanceModifiers}],consumable:[{label:"equipmentType",attr:"equipmentType.value",type:"select",options:b.equipmentTypes}],application:[{label:"TYPES.Item.skill",attr:"skill",type:"select",options:e}],trait:[{label:"traitType",attr:"traitType.value",type:"select",options:b.traitCategories}],career:[{label:"mageLevel",attr:"mageLevel.value",type:"select",options:b.mageLevels}],specialability:[{type:"prerendered",attr:"category.value",content:n},{label:"TYPES.Item.combatskill",attr:"list.value",type:"select",options:s,notStrict:!0},{label:"distribution",attr:"distribution",type:"text"}],liturgy:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"}],spell:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"},{label:"feature",attr:"feature",type:"text"}],ritual:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"},{label:"feature",attr:"feature",type:"text"}],ceremony:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"}],spellextension:[{label:"Category",attr:"category",type:"select",options:{spell:"spell",liturgy:"liturgy",ritual:"ritual",ceremony:"ceremony"}}],magictrick:[{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"feature",attr:"feature.value",type:"text"},{label:"distribution",attr:"distribution",type:"text"}],blessing:[{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"feature",attr:"feature.value",type:"text"}],npc:[{label:"TYPES.Item.species",attr:"details.species.value",type:"text"},{label:"TYPES.Item.career",attr:"details.career.value",type:"text"},{label:"TYPES.Item.culture",attr:"details.culture.value",type:"text"}],character:[{label:"TYPES.Item.species",attr:"details.species.value",type:"text"},{label:"TYPES.Item.career",attr:"details.career.value",type:"text"},{label:"TYPES.Item.culture",attr:"details.culture.value",type:"text"}],creature:[{label:"creatureClass",attr:"creatureClass.value",type:"text"},{label:"sizeCategory",attr:"status.size.value",type:"select",options:b.sizeCategories}],armor:[{label:"protection",attr:"protection.value",type:"select",options:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"}},{label:"encumbrance",attr:"encumbrance.value",type:"select",options:{0:"0",1:"1",2:"2",3:"3",4:"4"}},{label:"PLANT.region",attr:"region",type:"text"}],plant:[{label:"PLANT.landscape",attr:"location.landscape",type:"text"},{label:"PLANT.region",attr:"location.region",type:"text"},{label:"PLANT.healing",attr:"planttype.healing",type:"checkbox"},{label:"PLANT.poison",attr:"planttype.poison",type:"checkbox"},{label:"PLANT.physical",attr:"planttype.physical",type:"checkbox"},{label:"PLANT.psychic",attr:"planttype.psychic",type:"checkbox"},{label:"PLANT.crop",attr:"planttype.crop",type:"checkbox"},{label:"PLANT.defensive",attr:"planttype.defensive",type:"checkbox"},{label:"PLANT.supernatural",attr:"planttype.supernatural",type:"checkbox"},{label:"PLANT.highNorth",attr:"availability.highNorth",type:"range"},{label:"PLANT.grasLands",attr:"availability.grasLands",type:"range"},{label:"PLANT.swamps",attr:"availability.swamps",type:"range"},{label:"PLANT.woods",attr:"availability.woods",type:"range"},{label:"PLANT.jungle",attr:"availability.jungle",type:"range"},{label:"PLANT.mountains",attr:"availability.mountains",type:"range"},{label:"PLANT.desert",attr:"availability.desert",type:"range"},{label:"PLANT.maraskan",attr:"availability.maraskan",type:"range"}],magicalsign:[],patron:[],demonmark:[],essence:[],imprint:[{label:"Category",attr:"category",type:"text"}]};for(let[l,c]of Object.entries(r))for(let d of c)d.type=="text"&&(d.placeholder=`Library.advancedSearchPlaceholders.${l}.${d.attr}`);Wo(nn,r),game.dsa5.advancedFilters=nn})});var Ca=nn;var{getProperty:rn,duplicate:Uo,debounce:Vo,mergeObject:Ko}=foundry.utils,Kt=class{static{u(this,"SearchDocument")}constructor(e,t={}){let a=e.documentName||e.type;switch(e.documentName){case"Actor":case"Item":a=e.type;break}let s="";if(game.settings.get("dsa5","indexDescription"))switch(a){case"creature":case"npc":case"character":s=rn(e,"system.description.value");break;case"JournalEntry":s=rn(e,"system.content");break;default:s=rn(e,"description.value")}this.document={name:e.name,filterType:a,data:$("
").html(s).text(),id:e.id||e._id,visible:e.visible?e.visible:!0,compendium:e.compendium?e.compendium.metadata.packageName:t.packageName||"",pack:e.pack||(t.packageName?t.id:void 0),img:e.img,price:e.system?.price?.value}}get uuid(){if(this.document.compendium)return`Compendium.${this.document.pack}.${this.document.id}`;switch(this.itemType){case"character":case"creature":case"npc":return`Actor.${this.id}`;case"JournalEntry":return`JournalEntry.${this.id}`;default:return`Item.${this.id}`}}get name(){return this.document.name}get data(){return this.document.data}get id(){return this.document.id}get itemType(){return this.document.filterType}get hasPrice(){return b.equipmentCategories.has(this.document.filterType)}async getItem(){return await fromUuid(this.uuid)}hasPermission(){return this.document.visible}async render(){(await this.getItem()).sheet.render(!0)}get compendium(){return this.document.compendium}get img(){return this.itemType=="JournalEntry"?"systems/dsa5/icons/categories/DSA-Auge.webp":this.document.img}},Da=class extends Kt{static{u(this,"AdvancedSearchDocument")}constructor(e,t){super(e);let a=Ca[t]||[];for(let s of a)this[s.attr]=s.attr.split(".").reduce((i,n)=>i[n]===void 0?{}:i[n],e.system)}},Tt=class o extends Application{static{u(this,"DSA5ItemLibrary")}constructor(e){super(e),this.advancedFiltering=!1,this.journalBuild=!1,this.journalWorldBuild=!1,this.equipmentBuild=!1,this.equipmentWorldBuild,this.zooBuild=!1,this.zooWorldBuild=!1,this.currentDetailFilter={equipment:[],character:[],spell:[],journal:[],zoo:[]},this.journalIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data"]}}),this.equipmentIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data","itemType"],tag:["itemType"]}}),this.zooIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data","itemType"],tag:["itemType"]}}),this.detailFilter={},this.pages={equipment:{},character:{},spell:{},journal:{},zoo:{}},this.filters={equipment:{categories:{armor:!1,ammunition:!1,equipment:!1,meleeweapon:!1,rangeweapon:!1,poison:!1,disease:!1,consumable:!1,plant:!1,book:!1,trap:!1},filterBy:{search:""}},character:{categories:{career:!1,advantage:!1,combatskill:!1,culture:!1,disadvantage:!1,trait:!1,skill:!1,specialability:!1,species:!1,application:!1,demonmark:!1,patron:!1,essence:!1,imprint:!1},filterBy:{search:""}},spell:{categories:{blessing:!1,ceremony:!1,liturgy:!1,magictrick:!1,ritual:!1,spell:!1,spellextension:!1,magicalsign:!1},filterBy:{search:""}},journal:{categories:{},filterBy:{search:""}},zoo:{categories:{npc:!1,character:!1,creature:!1},filterBy:{search:""}}}}async getData(e){let t=await super.getData(e);return t.categories=this.translateFilters(),t.isGM=game.user.isGM,t.advancedMode=this.advancedFiltering?"on":"",t.worldIndexed=game.settings.get("dsa5","indexWorldItems")?"on":"",t.fullTextEnabled=game.settings.get("dsa5","indexDescription")?"on":"",t.filterDuplicateItems=game.settings.get("dsa5","filterDuplicateItems")?"on":"",t.browseEnabled=this.browseEnabled?"on":"",this.advancedFiltering&&(t.advancedFilter=await this.buildDetailFilter("tbd",this.subcategory)),t}translateFilters(){return{equipment:this.buildFilter(this.filters.equipment),character:this.buildFilter(this.filters.character),spell:this.buildFilter(this.filters.spell),zoo:this.buildFilter(this.filters.zoo,"Actor"),journal:this.buildFilter(this.filters.journal)}}purgeAdvancedFilters(){for(let e in this.filters)for(let t in this.filters[e].categories)this.filters[e].categories[t]=!1;$(this._element).find('.filter[type="checkbox"]').prop("checked",!1),this.buildDetailFilter("none","none").then(e=>{$(this._element).find(".advancedSearch .groupbox").html(e)})}buildFilter(e,t="Item"){let a=[];return Object.keys(e.categories).forEach(function(s){a.push({label:game.i18n.localize(`TYPES.${t}.${s}`),selected:e.categories[s],key:s})}),a=a.sort(function(s,i){return s.label.localeCompare(i.label)}),a}static get defaultOptions(){let e=super.defaultOptions;return e.id="DSA5ItemLibrary",e.classes.push("dsa5","itemlibrary"),e.height=800,e.width=800,e.resizable=!0,e.title=game.i18n.localize("ItemLibrary"),e.template="systems/dsa5/templates/system/itemlibrary.html",e.tabs=[{navSelector:".tabs",contentSelector:".content",initial:"equipment"}],e}async getRandomItems(e,t){let a=[],s=this.equipmentIndex;return a.push(...await s.search(e,{field:["itemType"]})),(await Promise.all(this.shuffle(a.filter(i=>i.hasPermission)).slice(0,t+5).map(i=>i.getItem()))).filter(i=>{let n=i.getFlag("dsa5","enchantments");return!n||!n.find(r=>r.talisman)}).slice(0,t)}shuffle(e){let t=e.length,a,s;for(;t!==0;)s=Math.floor(Math.random()*t),t-=1,a=e[t],e[t]=e[s],e[s]=a;return e}async findCompendiumItem(e,t,a=!0){await this.buildEquipmentIndex();let s={field:["name"],where:{itemType:t}},i=await this.equipmentIndex.search(e,s);return a&&(i=i.filter(n=>n.compendium!="")),i=i.sort((n,r)=>{let l=n.compendium.startsWith("dsa5-core"),c=r.compendium.startsWith("dsa5-core");return l&&c?0:l?1:c?-1:0}),await Promise.all(i.map(n=>n.getItem()))}async getCategoryItems(e,t=!1,a=!1){await this.buildEquipmentIndex();let s=this.equipmentIndex.search(e,{field:["itemType"]});return t?(await Promise.all(s.map(i=>i.getItem()))).map(i=>i.toObject()):a?await Promise.all(s.map(i=>i.getItem())):s}async executeAdvancedFilter(e,t,a,s,i,n=[]){let r=u(f=>{for(let h of a)if(h[2]?f[h[0]]!=h[1]:f[h[0]].indexOf(h[1])==-1)return!1;return!0},"selFnct"),l=u(f=>{for(let h of s)if(f[h[0]].toLowerCase().indexOf(h[1])==-1)return!1;return!0},"txtFnct"),c=u(f=>{for(let h of i)if(f[h[0]]!=h[1])return!1;return!0},"cbFnct"),d=u(f=>{for(let h of n)if(f[h[0]]h[2])return!1;return!0},"rangeFct"),p=t.where(f=>(e==""||f.name.toLowerCase().indexOf(e)!=-1)&&r(f)&&l(f)&&c(f)&&d(f));return p=p.filter(f=>f.hasPermission).sort((f,h)=>f.name.toLowerCase()>h.name.toLowerCase()?1:-1),p}collectDetailSearch(e){let t=[],a=[],s=[];for(let i of e.find("select")){let n=$(i).val();n!=""&&t.push([$(i).attr("name"),n,i.dataset.notstrict!="true"])}for(let i of e.find('input[type="text"]:not(.manualFilter)')){let n=$(i).val();n!=""&&a.push([$(i).attr("name"),n.toLowerCase()])}for(let i of e.find('input[type="checkbox"]:checked:not(.manualFilter)')){let n=$(i).val();n!=""&&s.push([$(i).attr("name"),n.toLowerCase()])}return{sels:t,inps:a,checkboxes:s}}async advancedFilterStuff(e,t){let a=$(this._element).find(".detailFilters"),s=a.attr("data-subc"),i=this.detailFilter[s],n=this.filters[e].filterBy.search.toLowerCase(),{sels:r,inps:l,checkboxes:c}=this.collectDetailSearch(a),d=await this.executeAdvancedFilter(n,i,r,l,c);return this.setBGImage(d,e),d=this.filterDuplications(d),d}async findEquipmentItemDetailed(e,t,a=!0){await this.buildDetailFilter("Item",t);let s=this.detailFilter[t],i=await this.executeAdvancedFilter(e.search||"",s,e.selects||[],e.inputs||[],e.booleans||[],e.rangeSearches||[]);return a&&(i=i.filter(n=>n.compendium!="")),await Promise.all(i.map(n=>n.getItem()))}filterDuplications(e){return game.settings.get("dsa5","filterDuplicateItems")&&(e=[...new Map(e.map(t=>[`${t.name}_${t.type}`,t])).values()]),e}async filterStuff(e,t,a){let s=this.filters[e].filterBy.search,i={field:["name","data"]},n=[],r=!1;for(let l in this.filters[e].categories){if(this.filters[e].categories[l]){let c,d=null;s==""?c=t.search(l,{field:["itemType"],sort:"name",where:{itemType:l}}):c=t.search(s,{...i,sort:"name",where:{itemType:l}});let m=Number(a)||0;c=c.slice(m,Math.min(m+60,c.length)),c.length==60&&(d=`${m+60}`),this.pages[e].next=d,n.push(...c)}r=this.filters[e].categories[l]||r}return r||(n=t.search(s,{...i,limit:60,page:a||!0,sort:"name"}),this.pages[e].next=n.next),n=n.result?n.result:n,n=n.filter(l=>l.hasPermission),this.setBGImage(n,e),n}setBGImage(e,t){$(this._element).find(`.${t} .libcontainer`)[`${e.length>0?"remove":"add"}Class`]("libraryImg")}async getItemTemplate(e,t){return this.browseEnabled&&["Item","Actor"].includes(t)?e.map(a=>`
`).join(""):await renderTemplate("systems/dsa5/templates/system/libraryItem.html",{items:e})}async renderBrowseItem(e){let t=await fromUuid(e),a=`systems/dsa5/templates/items/browse/${t.type}.html`,s=await renderTemplate(a,{document:t,isGM:game.user.isGM,...await t.sheet.getData()});return`
${s}
`}intersectionObserved(e,t){for(let a of e)if(a.isIntersecting){let s=a.target.dataset.uuid;this.renderBrowseItem(s).then(i=>{a.target.outerHTML=i}),t.unobserve(a.target)}}async renderResult(e,t,{index:a,itemType:s},i){let n=e.find(".searchResult .item-list"),r=await this.getItemTemplate(t,s);i||n.empty(),r=$(r);let l=u((d,m,p,f=!1)=>{d.stopPropagation();let h=m.find(d.currentTarget.dataset.itemId);d.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:p,uuid:h.uuid,pay:f}))},"itemDragStart");r.each(function(){let d=$(this);d.attr("draggable",!0).on("dragstart",m=>l(m,a,s)),d.find(".priceDrag").attr("draggable",!0).on("dragstart",m=>l(m,a,s,!0))}),n.append(r);let c=n.find(".loader");if(c.length>0){let d=new IntersectionObserver(this.intersectionObserved.bind(this),{root:e.find(".window-content")[0]});for(let m of c)d.observe(m)}}async filterItems(e,t,a){let s=this.selectIndex(t),i=this.advancedFiltering&&t!="journal"?await this.advancedFilterStuff(t,a):await this.filterStuff(t,s.index,a);return await this.renderResult(e,i,s,a),i}selectIndex(e){let t="Item",a=this.equipmentIndex;switch(e){case"zoo":t="Actor",a=this.zooIndex;break;case"journal":t="JournalEntry",a=this.journalIndex;break}return{index:a,itemType:t}}async _render(e=!1,t={}){await super._render(e,t),this.buildEquipmentIndex()}_getHeaderButtons(){let e=super._getHeaderButtons();return e.unshift({class:"libraryModulsFilter",tooltip:"DSASETTINGS.libraryModulsFilter",icon:"fas fa-filter",onclick:u(async()=>new on().render(!0),"onclick")}),e}async buildEquipmentIndex(){await this._createIndex("equipment","Item",game.items)}async _createIndex(e,t,a){if(this[`${e}Build`])return;let s=game.settings.get("dsa5","libraryModulsFilter");SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:""}),pct:0});let i=$(this._element).find(`*[data-tab="${e}"]`);this.showLoading(i,e);let n=game.packs.filter(f=>f.documentName==t&&(game.user.isGM||f.visible)&&!f.metadata.label.startsWith("WZ-")&&!s[f.metadata.packageName]),r=100/(n.length+1),l=r,c=["name","system.type","system.description.value","img"],d;t=="Actor"?d=u(f=>f.getIndex({actorFields:c}),"func"):t=="JournalEntry"?d=u(f=>f.getDocuments(),"func"):d=u(f=>f.getDocuments({type__in:Object.keys(game.system.documentTypes.Item)}),"func");let m=this.indexWorldItems(a,e);SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:"world items"}),pct:Math.round(r)});let p=n.map(async f=>{let h=await d(f);l+=r,SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:`${f.metadata.label} (${f.metadata.id})`}),pct:Math.round(l)}),m.push(...h.map(y=>new Kt(y,f.metadata)))});return Promise.all(p).then(f=>{this[`${e}Index`].add(m),this[`${e}Build`]=!0,SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:""}),pct:100}),this.hideLoading(i,e)})}subcategoryFields(e){let t=["name","itemType"],a=Ca[e]||[];for(let s of a)t.push(s.attr);return t}indexWorldItems(e,t){let a=[];return game.settings.get("dsa5","indexWorldItems")&&(a.push(...e.filter(s=>s.visible).map(s=>new Kt(s))),this[`${t}WorldBuild`]=!0),a}async createDetailIndex(e,t){if(!this.detailFilter[t]){let a=game.i18n.localize(`TYPES.Item.${t}`);SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:0});let s=this.subcategoryFields(t),i=$(this._element).find(`*[data-tab="${e}"]`);i.find(".searchResult ul").html(""),this.showLoading(i,e),this.detailFilter[t]=new FlexSearch({encode:"simple",tokenize:"full",cache:!0,doc:{id:"id",field:s}});let{index:n,itemType:r}=this.selectIndex(e),l=r=="Item"?game.items:game.actors,c=[];game.settings.get("dsa5","indexWorldItems")&&c.push(...l.filter(k=>k.visible&&k.type==t).map(k=>new Da(k,t)));let d=n.search(t,{field:["itemType"]}),m={};SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:10});for(let k of d)k.document.pack&&(m[k.document.pack]||(m[k.document.pack]=[]),m[k.document.pack].push(k.document.id));let p=[],f=60/Object.keys(m).length,h=0;for(let k of Object.entries(m))h+=1,p.push(game.packs.get(k[0]).getDocuments({_id__in:k[1],type:t})),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:Math.round(10+h*f)});SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:70});let y=await Promise.all(p);f=30/y.length,h=0;for(let k of y)h+=1,c.push(...k.map(C=>new Da(C,t))),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:Math.round(70+h*f)});this.detailFilter[t].add(c),this.hideLoading(i,e),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:100})}}async buildDetailFilter(e,t,a=void 0){let s=Uo(Ca[t]||[]),i=!1;if(s){if(a){for(let c of s)switch(c.type){case"select":let d=a.selects.find(f=>f[0]==c.attr);d&&(c.value=d[1]);break;case"text":let m=a.inputs.find(f=>f[0]==c.attr);m&&(c.value=m[1]);break;case"checkbox":let p=a.booleans.find(f=>f[0]==c.attr);p&&(c.value=p[1]);break}i=a.selects.find(c=>c[0]=="compendium")?.[1]}let n=this.createDetailIndex(e,t),r=o.collectModulOptions(),l=await renderTemplate("systems/dsa5/templates/system/detailFilter.html",{fields:s,subcategory:t,moduleOptions:r,moduleSelected:i});return await n,l}else return`

${game.i18n.localize("Library.selectAdvanced")}

`}static collectModulOptions(){return game.packs.filter(e=>e.metadata.type=="Item").reduce((e,t)=>{if(!e[t.metadata.packageName]){let a=game.i18n.has(`${t.metadata.packageName}.name`)?game.i18n.localize(`${t.metadata.packageName}.name`):game.modules.get(t.metadata.packageName)?.title.replace(/The Dark Eye 5th Ed. - /i,"")||game.system.title;e[t.metadata.packageName]=a}return e},{})}checkWorldStuffIndex(){game.settings.get("dsa5","indexWorldItems")&&(!this.journalWorldBuild&&this.journalBuild&&this.journalIndex.add(this.indexWorldItems(game.journal,"journal")),!this.equipmentWorldBuild&&this.equipmentBuild&&this.equipmentIndex.add(this.indexWorldItems(game.items,"equipment")),!this.zooWorldBuild&&this.zooBuild&&this.zooIndex.add(this.indexWorldItems(game.actors,"zoo")))}activateListeners(e){super.activateListeners(e),me(e),e.on("click",".searchableAbility a",s=>mt(s)),e.on("click",".toggleAdvancedMode",()=>{this.advancedFiltering=!this.advancedFiltering,this.advancedFiltering?($(this._element).find(".toggleAdvancedMode").addClass("on"),$(this._element).find(".advancedSearch").fadeIn(),this.purgeAdvancedFilters()):($(this._element).find(".toggleAdvancedMode").removeClass("on"),$(this._element).find(".advancedSearch").fadeOut())}),e.on("change",".detailFilters input, .detailFilters select",()=>{let s=$(this._element).find(".tab.active"),i=s.attr("data-tab");this.filterItems(s,i)}),e.on("click",".filter",async s=>{let i=$(s.currentTarget).closest(".tab"),n=i.attr("data-tab"),r=s.currentTarget.dataset.category,l=$(s.currentTarget).is(":checked");this.advancedFiltering&&l&&(this.purgeAdvancedFilters(),this.subcategory=r,$(s.currentTarget).prop("checked",l),$(this._element).find(".advancedSearch .groupbox").html(await this.buildDetailFilter(n,r))),this.filters[n].categories[r]=l,this.filterItems(i,n)}),e.on("click",".item-name",s=>{this.getItemFromHTML(s).render()}),e.on("mousedown",".item-name",s=>{s.button==2&&g.showArtwork(this.getItemFromHTML(s))}),e.on("keyup",".filterBy-search",s=>{let i=$(s.currentTarget).closest(".tab"),n=i.attr("data-tab");this.filters[n].filterBy.search=$(s.currentTarget).val(),this.filterItems(i,n)});let t=u(s=>{s.stopPropagation();let i=s.currentTarget.dataset.type,n=s.currentTarget.dataset.uuid;!n||!i||s.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:i,uuid:n}))},"itemDragStart");e.on("click",".show-item",async s=>{let i=s.currentTarget.dataset.uuid;(await fromUuid(i)).sheet.render(!0)}),e.find(".show-item").attr("draggable",!0).on("dragstart",s=>t(s)),e.find('*[data-tab="journal"]').click(s=>{this._createIndex("journal","JournalEntry",game.journal)}),e.find('*[data-tab="zoo"]').click(s=>{this._createIndex("zoo","Actor",game.actors)}),e.find(".showDetails").click(s=>{let i=s.currentTarget.dataset.btn;$(s.currentTarget).find("i").toggleClass("fa-caret-left fa-caret-right"),e.find(`.${i} .detailBox`).toggleClass("dsahidden")}),e.find(".toggleWorldIndex").click(s=>{game.settings.set("dsa5","indexWorldItems",!game.settings.get("dsa5","indexWorldItems")),this.checkWorldStuffIndex(),$(s.currentTarget).toggleClass("on")}),e.find(".fulltextsearch").click(s=>{game.settings.set("dsa5","indexDescription",!game.settings.get("dsa5","indexDescription")),$(s.currentTarget).toggleClass("on")}),e.find(".browseEnabled").click(s=>{this.browseEnabled=!this.browseEnabled,$(s.currentTarget).toggleClass("on")}),e.find(".filterDuplicateItems").click(s=>{game.settings.set("dsa5","filterDuplicateItems",!game.settings.get("dsa5","filterDuplicateItems")),$(s.currentTarget).toggleClass("on")});let a=this;$(this._element).find(".window-content").on("scroll.infinit",Vo(function(s){if(a.advancedFiltering)return;let i=$(s.target),n=i.scrollTop()+i.innerHeight()>=i[0].scrollHeight-100,r=e.find(".tabs .item.active").attr("data-tab");if(n&&a.pages[r].next){let l=e.find(".tab.active");a.filterItems.call(a,l,r,a.pages[r].next)}},100))}getItemFromHTML(e){let t=$(e.currentTarget).parents(".browser-item").attr("data-item-id");switch($(e.currentTarget).closest(".tab").attr("data-tab")){case"zoo":return this.zooIndex.find(t);case"journal":return this.journalIndex.find(t);default:return this.equipmentIndex.find(t)}}showLoading(e,t){this.setBGImage([1],t),$(`
${game.i18n.localize("Library.buildingIndex")}
`).appendTo(e.find(".searchResult"))}hideLoading(e,t){this.setBGImage([],t),e.find(".loader").remove()}},on=class extends Application{static{u(this,"LibraryModulsFilter")}static get defaultOptions(){let e=super.defaultOptions;return e.classes.push("dsa5"),e.resizable=!0,e.width=600,e.title=game.i18n.localize("DSASETTINGS.libraryModulsFilter"),e.template="systems/dsa5/templates/system/librarymodulesfilter.html",e}async getData(e){let t=await super.getData(e);return Ko(t,{moduleOptions:Tt.collectModulOptions(),rejectedModules:game.settings.get("dsa5","libraryModulsFilter")}),t}activateListeners(e){super.activateListeners(e),e.find(".moduleSelector").change(t=>this.moduleFilterChanged(t))}async moduleFilterChanged(e){let t=e.currentTarget.id,a=e.currentTarget.checked,s=game.settings.get("dsa5","libraryModulsFilter");a?delete s[t]:s[t]=!0,game.settings.set("dsa5","libraryModulsFilter",s)}};var{getProperty:ln}=foundry.utils,Yt=class extends foundry.applications.api.DialogV2{static{u(this,"DSA5Initializer")}constructor(e,t,a,s="",i={}){let n={window:{title:e},position:{width:500},content:t,buttons:[{action:"initialize",label:"initialize",callback:u(()=>{this.lock||this.initialize()},"callback")},{action:"cancel",label:"cancel",callback:u(()=>{this.lock||this.dontInitialize()},"callback")}]};super(n),this.module=a,this.lang=s,this.folders={},this.journals={},this.scenes={},this.actors={},this.lock=!1,this.scopeOptions=i}async initNotes(e,t,a){let s=await this.getFolderForType("JournalEntry");for(let i of e.notes)try{let n=t.find(r=>r.flags.dsa5.initId==i.entryId);if(!a.has(n._id)){let r=ln(n,"flags.dsa5.parent"),l=s;this.folders[r]?l=this.folders[r]:r&&(l=await this.getFolderForType("JournalEntry",s.id,r,0,ln(n,"flags.dsa5.foldercolor")||"")),n.folder=l.id;let c=game.journal.find(d=>d.name==n.name&&d.folder?.id==l.id&&d.flags.dsa5.initId==i.entryId);if(c)await c.update(n),a.set(n._id,c.id);else{let d=await JournalEntry.create(n);a.set(n._id,d.id)}}i.entryId=a.get(n._id)}catch(n){console.warn(`Could not initialize Scene Notes for scene :${e.name}`+n)}}async initScenes(e,t=void 0){let a=await this.getFolderForType("Scene"),i=(await game.packs.get(e.scenes).getDocuments()).map(f=>f.toObject()),r=(await game.packs.get(e.journal).getDocuments()).map(f=>f.toObject()),l=[],c=[],d=new Map,m=!1;t&&(i=i.filter(f=>t.includes(f.name)));for(let f of i){let h=m,y=game.scenes.find(k=>k.name==f.name&&k.folder?.id==a.id);if(!m&&y)try{[h,m]=await foundry.applications.api.DialogV2.wait({window:{title:"Book.sceneReset"},content:`

${game.i18n.format("Book.sceneResetDescription",{name:f.name})}

`,buttons:[{action:"yes",icon:"fa fa-check",label:"yes",callback:u(()=>[!0,!1],"callback")},{action:"all",icon:"fa fa-check",label:"LocalizedIDs.all",callback:u(()=>[!0,!0],"callback")},{action:"no",icon:"fas fa-times",label:"cancel",default:!0,callback:u(()=>[!1,!1],"callback")}]})}catch{h=!1,m=!1}if(y&&!h){this.scenes[y.name]=y;continue}f.folder=a.id,await this.initNotes(f,r,d),y?(f._id=y.id,c.push(f)):l.push(f)}let p=await Scene.create(l,{dsaInit:!0,keepId:!0});for(let f of p){this.scenes[f.name]=f;let h=await f.createThumbnail();await f.update({thumb:h.thumb})}for(let f of c)await game.scenes.get(f._id).update(f),this.scenes[f.name]=game.scenes.get(f._id);if(e.initialScene){let f=this.scenes[e.initialScene];f&&(await game.settings.set("core",NotesLayer.TOGGLE_SETTING,!0),await f.activate(),await f.update({navigation:!0}))}}async loadJson(){let e=this.scopeOptions.initializer||`initialization${this.lang}`;return await(await fetch(`modules/${this.module}/${e}.json`)).json()}async initialize(){this.lock=!0;let e=$(this.element).find('[data-action="initialize"]');e.prepend('');let t={};try{game.settings.settings.has(`${this.moduleScope}.initialized`)&&await game.settings.set(this.moduleScope,"initialized",!0)}catch{}if(this.scopeOptions.scope)await fetch(`modules/${this.module}/${this.scopeOptions.scope}.json`).then(async i=>i.json()).then(async i=>{t=i});else try{await fetch(`modules/${this.module}/adventure${this.lang}.json`).then(async i=>i.json()).then(async i=>{t=i})}catch{try{await fetch(`modules/${this.module}/adventure.json`).then(async i=>i.json()).then(async i=>{t=i})}catch{console.warn(`Could not find book data for ${this.moduleScope} import.`)}}let a=await this.loadJson(),s=a.folders;if(s){let i=await this.getFolderForType("JournalEntry"),n=a.folders[0].name;i&&(this.folders[i.name]=i,a.folders.shift());let r=await Folder.create(s);Array.isArray(r)||(r=[r]);for(let c of r)this.folders[c.name]=c;let l=[];for(let c in this.folders){let d=this.folders[c].getFlag("dsa5","parent"),m=d==n?game.i18n.localize(`${this.moduleScope}.name`):d;m&&l.push({_id:this.folders[c].id,parent:this.folders[m].id})}await Folder.updateDocuments(l)}if(a.items&&a.items.length>0){let i=await this.getFolderForType("Item"),n=[],r=[];for(let l of a.items){l.folder=i.id;let c=game.items.find(d=>d.name==l.name&&d.folder?.id==i.id);c?(l._id=c.id,r.push(l)):n.push(l)}await D.create(n),await D.updateDocuments(r)}if(a.playlists){let i=await this.getFolderForType("Playlist"),n=[],r=[],c=(await game.packs.get(a.playlists).getDocuments()).map(d=>d.toObject());for(let d of c){d.folder=i.id;let m=game.playlists.find(p=>p.name==d.name&&p.folder?.id==i.id);m?(d._id=m._id,r.push(d)):n.push(d)}await Playlist.create(n,{keepId:!0}),await Playlist.updateDocuments(r)}if(a.scenes&&await this.initScenes(a),a.actors){let i=await this.getFolderForType("Actor"),r=(await game.packs.get(a.actors).getDocuments()).map(f=>f.toObject()),l=[],c=[],d=new Map,m=0;if(ln(t,"chapters")){for(let f of t.chapters)for(let h of f.content)if(h.actors){let y=!1;for(let k of h.actors)d.has(k)||(d.set(k,h.name),y=!0);y&&(await this.getFolderForType("Actor",i.id,h.name,m),m+=1)}}for(let f of r){let h=d.has(f.name)?await this.getFolderForType("Actor",i.id,d.get(f.name)):i;f.folder=h.id,f._id&&delete f._id;let y=game.actors.find(k=>k.name==f.name&&[i.id,h.id].includes(k.folder?.id));y?(f._id=y.id,await y.deleteEmbeddedDocuments("Item",y.items.map(k=>k.id)),c.push(f)):l.push(f)}let p=await Actor.create(l);await Actor.updateDocuments(c);for(let f of p)this.actors[f.name]=f}a.macro&&(Hooks.once("renderCompendium",(i,n,r)=>{n.find(`[data-pack="${a.macro}"] header`).append($(`

${game.i18n.localize("Book.macroHint")}

`))}),await game.packs.get(a.macro).render(!0)),this.lock=!1,e.find("i").remove(),ui.notifications.info("initComplete",{localize:!0}),await this.close()}async dontInitialize(){game.settings.settings.has(`${this.moduleScope}.initialized`)&&await game.settings.set(this.moduleScope,"initialized",!0),ui.notifications.info("initSkipped",{localize:!0}),await this.close()}submit(e){try{e.callback&&e.callback(this.options.jQuery?this.element:this.element[0])}catch(t){throw ui.notifications.error(t),new Error(t)}}get moduleScope(){return this.scopeOptions.scope||this.module}async getFolderForType(e,t=null,a=null,s=0,i=""){return a||(a=game.i18n.localize(`${this.moduleScope}.name`)),g.getFolderForType(e,t,a,s,i)}};var Jt=class extends ChatMessage{static{u(this,"ChatMessageDSA5Roll")}get isRoll(){return this.isDSARoll||super.isRoll}get roll(){return this.isDSARoll?new cn(""):super.roll}get isDSARoll(){return this.flags.data?this.flags.data.isDSARoll:!1}},cn=class extends Roll{static{u(this,"EmptyRoll")}render(){return""}};var{getProperty:Yo,mergeObject:Jo}=foundry.utils,Qt=class extends Hotbar{static{u(this,"DSA5Hotbar")}async _render(e=!1,t={}){await super._render(e,t),this.addContextColor()}async collapse(){return this._collapsed?!0:($(this.element).addClass("collapsedHotbar"),super.collapse())}async expand(){return this._collapsed?($(this.element).removeClass("collapsedHotbar"),super.expand()):!0}async updateDSA5Hotbar(){if(!game.settings.get("dsa5","hotbarv3"))return;let e=canvas.tokens.controlled;if(this.token=void 0,this.showEffects=!1,e.length===1){let t=e[0].actor;t&&t.isOwner&&(this.token=e[0])}e.length>=1&&(this.showEffects=!0),await this.render(!0,{focus:!1})}addContextColor(){let e=new RegExp(` ${game.i18n.localize("CHAR.PARRY")}$`),t=new RegExp(` ${game.i18n.localize("CHAR.ATTACK")}$`),a=$(this._element).find("#macro-list");for(let s of this.macros)s.macro&&(e.test(s.macro.name)?a.find(`[data-macro-id="${s.macro.id}"]`).addClass("parry"):t.test(s.macro.name)&&a.find(`[data-macro-id="${s.macro.id}"]`).addClass("attack"))}_contextMenu(e){game.settings.get("dsa5","hotbarv3")?dn.create(this,e,".macro",this._getEntryContextOptions()):ContextMenu.create(this,e,".macro",this._getEntryContextOptions())}get template(){return game.settings.get("dsa5","hotbarv3")?"systems/dsa5/templates/system/hud/hotbar.html":super.template}activateListeners(e){if(super.activateListeners(e),game.settings.get("dsa5","hotbarv3")){e.find(".quantity-click").mousedown(i=>N.quantityClick(i)),e.on("mousedown","li.primary",async i=>(game.tooltip.deactivate(),i.currentTarget.classList.contains("macro")||(i.stopPropagation(),await this.tokenHotbar.executeQuickButton(i)),!1)),e.find(".categoryFilter").click(i=>{this.filterCategory(i,e)});let t=this,a=u(function(i){if(e.find(".sections").is(":hover"))return t.filterSections(i,e),!1},"fn"),s=u(function(){$(document).off("keydown.sectionFilter",a),t.searching="",e.find(".macro,.primary,.sections .skillItems").removeClass("dsahidden"),e.find(".longLayout").removeClass("longLayout")},"filterOff");e.find(".sections").hover(function(){$(document).off("keydown.sectionFilter",a).on("keydown.sectionFilter",a)},s),e.find(".primary").hover(i=>this._betterTooltip(i)),e.find(".itdarkness input").change(i=>this.tokenHotbar.changeDarkness(i))}}static get defaultOptions(){let e=super.defaultOptions;return e.scrollY=e.scrollY||[],e.scrollY.push("#macro-list"),e}async _betterTooltip(e){let t=e.currentTarget,a=t.dataset;if("tooltipClass"in t.dataset)return;let s,i,n;switch(a.category?.split(" ")[0]){case"skillgm":s=game.i18n.format("TT.skillgm",{name:a.name});break;case"effect":let l=this.token.actor?.effects.get(a.id);l&&(n=game.i18n.has(l.description)?game.i18n.localize(l.description):l.description);break;case"onUse":switch(i=this.token.actor?.items.get(a.id),i.type){case"specialability":n=i.system.rule?.value;break;case"advantage":case"disadvantage":break;default:n=i.system.description?.value}break;case"unequipped":case"consumable":case"weapon":case"spell":i=this.token.actor?.items.get(a.id);let c=await i.sheet.getData();!game.user.isGM&&c.item.system.obfuscation?.details?n=await renderTemplate("systems/dsa5/templates/items/obfuscatedItem.html",c):n=$(await renderTemplate(`systems/dsa5/templates/items/browse/${i.type}.html`,{isGM:game.user.isGM,...c,document:i,skipHeader:!0,hint:!0})).find(".groupbox").html();break;case"enchantment":let d=a.id.split("_");if(i=this.token.actor?.items.get(d[0]),i.system.obfuscation?.enchantment)n=await renderTemplate("systems/dsa5/templates/items/obfuscatedItem.html",i),a.name=`${game.i18n.localize("enchantment")} (${i.name})`;else{let m=i.getFlag("dsa5","enchantments").find(p=>p.id==d[1]);a.name=`${m.name} (${i.name})`,n=await renderTemplate("systems/dsa5/templates/items/enchantment-preview.html",{enchantment:m,document:i})}break;default:return}n&&(s=`

${a.name}

${n}
`),s&&($("#tooltip").addClass("dsatooltip").html(s),t.dataset.tooltip=s,t.dataset.tooltipClass="dsatooltip")}filterCategory(e,t){let a=e.currentTarget.dataset.filter;a?(t.find(".skillItems").addClass("collapsed"),t.find(`.skillItems[data-category="${a}"]`).removeClass("collapsed"),t.find(".categoryFilter").removeClass("active"),t.find(`.categoryFilter[data-filter="${a}"]`).addClass("active"),this.token?.actor?this.activeFilters=[a]:this.gmFilters=[a]):(t.find(".skillItems").removeClass("collapsed"),t.find(".categoryFilter").removeClass("active"),this.token?.actor?this.activeFilters=[]:this.gmFilters=[])}filterSections(e,t){switch(this.searching=this.searching||"",e.which){case 8:this.searching=this.searching.slice(0,-1);break;default:if(!e.key.match(/^[a-zA-Z0-9öäüÖÄÜ]$/))return;this.searching+=e.key}e.preventDefault(),e.stopPropagation();let a=this.searching.toLowerCase();ge(a);let s=t.find(".sections");a?s.addClass("longLayout"):s.removeClass("longLayout");let i=t.find(".primary");i.removeClass("dsahidden"),i.filter(function(){let n=this.dataset?.name?.toLowerCase().trim();return n?n.indexOf(a)==-1:!0}).addClass("dsahidden");for(let n of s.find(".skillItems")){let r=n.dataset.category,l=$(n);l.toggleClass("dsahidden",l.find(`li.${r}.dsahidden`).length==l.find(`li.${r}`).length)}return!1}async getData(e){let t=await super.getData(e);return game.settings.get("dsa5","hotbarv3")&&await this._h3Data(t),t}get tokenHotbar(){return game.dsa5.apps.tokenHotbar}async _h3Data(e){let t={skills:{},attacks:[]},a=[],s=[],i=!1,n=[],r=this.token?.actor;if(r){if(!["epic","loot"].includes(Yo(r,"system.merchant.merchantType"))){n=(this.activeFilters||[]).filter(k=>k!="gm");let f=r.items.filter(k=>k.type=="combatskill").map(k=>O._calculateCombatSkillValues(k.toObject(),r.system));s=await this.tokenHotbar._effectEntries(r);let h=this.tokenHotbar._brawlEntry(f);if(H.isRiding(r)){let k=this.tokenHotbar._ridingEntry(r);k&&(t.skills.skill=[k])}h&&t.attacks.push(h),t.functions=this.tokenHotbar?._functionEntries()||[];for(let k of r.items)switch(k.type){case"skill":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._skillEntry(k,"skill"));break;case"spell":case"liturgy":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._skillEntry(k,"spell"));break;case"trait":Xe.traitTypes.has(k.system.traitType.value)&&t.attacks.push(this.tokenHotbar._traitEntry(k,r.system));break;case"consumable":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._actionEntry(k,"consumable",{abbrev:k.system.quantity.value}));break;case"meleeweapon":case"rangeweapon":let C=this.tokenHotbar._combatEntry(k,f,r);for(let v of C)k.system.worn.value||(v.cssClass="unequipped"),t.attacks.push(v);default:if(k.getFlag("dsa5","onUseEffect")&&(t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._actionEntry(k,"onUse",{subfunction:"onUse"}))),k.getFlag("dsa5","enchantments")){t.skills.enchantment||(t.skills.enchantment=[]);for(let v of k.getFlag("dsa5","enchantments"))t.skills.enchantment.push(this.tokenHotbar._enchantmentEntry(v,"enchantment",k,{subfunction:"enchantment"}))}break}}}else if(game.user.isGM&&!game.settings.get("dsa5","disableTokenhotbarMaster")){n=this.gmFilters||[],t.skills.gm=this.tokenHotbar?._gmEntries()||[];let f=this.tokenHotbar?.skills||await this.tokenHotbar?.prepareSkills()||[];t.skills.skillgm=f,i=!0}let l=45,c=2,d={gm:"systems/dsa5/icons/categories/DSA-Auge.webp",skillgm:"systems/dsa5/icons/categories/Skill.webp",enchantment:"systems/dsa5/icons/categories/enchantment.webp"},m={gm:"gmMenu",skillgm:"TYPES.Item.skill",enchantment:"enchantment"};for(let f of Object.keys(t.skills)){let h=`TYPES.Item.${f}`;a.push({key:f,tooltip:game.i18n.has(h)?game.i18n.localize(h):game.i18n.localize(m[f]),img:D.defaultImages[f]||d[f]})}let p=["body","social","nature","knowledge","trade"];if(t.skills.skill?.sort((f,h)=>p.indexOf(f.addClass)-p.indexOf(h.addClass)||f.name.localeCompare(h.name)),t.skills.skillgm?.sort((f,h)=>p.indexOf(f.addClass)-p.indexOf(h.addClass)||f.name.localeCompare(h.name)),t.attacks.length>0&&(t.attacks.sort((f,h)=>(h.cssClass||"").localeCompare(f.cssClass||"")||f.name.localeCompare(h.name)),a.unshift({key:"attacks",tooltip:game.i18n.localize("Combat"),img:"systems/dsa5/icons/categories/Meleeweapon.webp"})),this.showEffects){if(canvas.tokens.controlled.length>1){let y=await this.tokenHotbar._effectEntries(canvas.tokens.controlled[0].actor,{subfunction:"sharedEffect"});for(let k of canvas.tokens.controlled){let C=(await k.actor.actorEffects()).map(v=>v.name);y=y.filter(v=>C.includes(v.name))}s=y}let h={name:"CONDITION.add",id:"",icon:"icons/svg/aura.svg",cssClass:"effect",abbrev:game.i18n.localize("CONDITION.add")[0],subfunction:"addEffect",indicator:"+"};s.unshift(h)}n.length>0&&(n=Object.keys(t.skills).concat(["macro","attacks"]).filter(f=>!n.includes(f))),Jo(e,{token:{groups:t,effects:s},darkness:canvas?.scene?.environment.darknessLevel||0,hotBarcssClass:"hotbarV3",barWidth:"527px",baseBarHeight:`${l}px`,barHeight:`${(l+7)*c+30}px`,filterCategories:a,selectedCategories:(r?this.activeFilters:this.gmFilters)||[],showEffects:this.showEffects,activeFilters:n,gmMode:i,macros:this._getAllMacros()})}_getAllMacros(){let e=Array.from({length:50},()=>"");for(let[t,a]of Object.entries(game.user.hotbar))e[parseInt(t)-1]=a;return e.map((t,a)=>{let s=t?game.macros.get(t):null;return{slot:a+1,key:a+1,icon:s?.img||null,cssClass:s?"active":"inactive",tooltip:s?s.name:null,macro:s}})}},dn=class o extends ContextMenu{static{u(this,"HotbarV3ContextMenu")}_setPosition(e,t){t=t.closest(".flexrow"),super._setPosition(e,t)}static create(e,t,a,s,{hookName:i="EntryContext",...n}={}){for(let r of e.constructor._getInheritanceChain())Hooks.call(`get${r.name}${i}`,t,s);if(s)return new o(t,a,s,n)}};var{setProperty:Qo,getProperty:Xo}=foundry.utils,Xt=class o{static{u(this,"RollMemory")}constructor(){this.tokens={},this.actors={}}static get wantedKeys(){let e=["vision","targetMovement","shooterMovement","quickChange","mountOptions","narrowSpace","advantageousPosition","doubleAttack","reduceCostSpell","forceSpell","increaseCastingTime","decreaseCastingTime","removeGesture","removeFormula"];return ne.isEnabled||e.push("distance"),e}getPath(e,t,a){let s=a||"",i=t._id||t.type;return e.token?`tokens.${e.token||e.actor}.${i}${s}`:`actors.${e.actor}.${i}${s}`}remember(e,t,a,s){let i=this.formDataSerialize(s);Object.entries(i).length>0&&Qo(this,this.getPath(e,t,a),i)}recall(e,t,a){return Xo(this,this.getPath(e,t,a))}formDataSerialize(e){let t=e.find("form"),a={};return t.find("select").each(function(){let s=$(this).attr("name");o.wantedKeys.includes(s)&&(a[s]=$(this).val())}),t.find('input[type="checkbox"]').each(function(){let s=$(this).attr("name");o.wantedKeys.includes(s)&&(a[s]=this.checked)}),t.find(".specAbs.active").each(function(){a.specAbs||(a.specAbs=[]),a.specAbs.push({id:$(this).attr("data-id"),step:$(this).attr("data-step")})}),e.find('[name="situationalModifiers"] option').each(function(){a.situationalModifiers||(a.situationalModifiers=[]),a.situationalModifiers.push({name:$(this).text().trim(),selected:this.selected})}),a}};Hooks.once("init",()=>{console.log("Initializing DSA5 system"),CONFIG.statusEffects=b.statusEffects,game.dsa5={apps:{DSA5_Utility:g,DSA5Initializer:Yt,DSA5ChatListeners:le,DSA5Payment:Q,SpecialabilityRulesDSA5:F,AdvantageRulesDSA5:P,Migrakel:Je,DSA5Dialog:ae,DSA5StatusEffects:z,DPS:ne,DSATables:B,DSA5SoundEffect:K,RequestRoll:ie,DiceDSA5:R,DSATour:rt,OpposeDSA:ee,EquipmentDamage:W,APTracker:_,DidYouKnow:it,MeasuredTemplateDSA:Le,Riding:H,RuleChaos:N,Trade:xe,DSAActiveEffectConfig:Z},entities:{Actordsa5:O,Itemdsa5:D},sheets:{ActorSheetdsa5:ze,ActorSheetdsa5Character:Ce,ActorSheetdsa5Creature:Ne,ActorSheetdsa5NPC:Re,MerchantSheetMixin:Be,MerchantSheetDSA5:Ie,ItemSheetdsa5:Y},wizards:{CareerWizard:tt,CultureWizard:et,SpeciesWizard:at},view:{tinyNotification:ge,tabSlider:me,clickableAbility:mt},dialogs:{DialogReactDSA5:ke,ReactToSkillDialog:yt,ActAttackDialog:bt,ReactToAttackDialog:kt,RandomGoodsAddition:Ta},macro:Vt,config:b,memory:new Xt,itemLibrary:new Tt},CONFIG.Actor.documentClass=O,CONFIG.Item.documentClass=D,CONFIG.ChatMessage.template="systems/dsa5/templates/chat/chat-message.html",CONFIG.ChatMessage.documentClass=Jt,CONFIG.ui.combat=Ge,CONFIG.ui.hotbar=Qt,CONFIG.Combat.documentClass=vt,CONFIG.Combatant.documentClass=wa,CONFIG.ActiveEffect.documentClass=Me,CONFIG.ActiveEffect.legacyTransferral=!1});sn(); +
`,r={ammunition:[{label:"ammunitiongroup",attr:"ammunitiongroup.value",type:"select",options:b.ammunitiongroups}],equipment:[{label:"equipmentType",attr:"equipmentType.value",type:"select",options:b.equipmentTypes},{label:"PLANT.region",attr:"region",type:"text"}],book:[{label:"BOOKITEM.format",attr:"format",type:"select",options:b.bookFormats},{label:"BOOKITEM.quality",attr:"quality",type:"select",options:b.bookQualities},{label:"BOOKITEM.exemplarType",attr:"exemplarType",type:"select",options:b.exemplarTypes},{label:"BOOKITEM.availability",attr:"availability",type:"range"}],trap:[],rangeweapon:[{label:"TYPES.Item.combatskill",attr:"combatskill.value",type:"select",options:t},{label:"ammunitiongroup",attr:"ammunitiongroup.value",type:"select",options:b.ammunitiongroups},{label:"PLANT.region",attr:"region",type:"text"}],meleeweapon:[{label:"TYPES.Item.combatskill",attr:"combatskill.value",type:"select",options:a},{label:"guidevalue",attr:"guidevalue.value",type:"select",options:b.combatskillsGuidevalues},{label:"reach",attr:"reach.value",type:"select",options:b.meleeRanges},{label:"PLANT.region",attr:"region",type:"text"}],poison:[{label:"resistanceModifier",attr:"resistance.value",type:"select",options:b.magicResistanceModifiers},{label:"COMBATSKILLCATEGORY.subcategory",attr:"subcategory",type:"select",options:b.poisonSubTypes},{label:"poisonType",attr:"poisonType.value",type:"text"},{label:"PLANT.region",attr:"region",type:"text"}],disease:[{label:"resistanceModifier",attr:"resistance.value",type:"select",options:b.magicResistanceModifiers}],consumable:[{label:"equipmentType",attr:"equipmentType.value",type:"select",options:b.equipmentTypes}],application:[{label:"TYPES.Item.skill",attr:"skill",type:"select",options:e}],trait:[{label:"traitType",attr:"traitType.value",type:"select",options:b.traitCategories}],career:[{label:"mageLevel",attr:"mageLevel.value",type:"select",options:b.mageLevels}],specialability:[{type:"prerendered",attr:"category.value",content:n},{label:"TYPES.Item.combatskill",attr:"list.value",type:"select",options:s,notStrict:!0},{label:"distribution",attr:"distribution",type:"text"}],liturgy:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"}],spell:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"},{label:"feature",attr:"feature",type:"text"}],ritual:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"},{label:"feature",attr:"feature",type:"text"}],ceremony:[{label:"resistanceModifier",attr:"resistanceModifier.value",type:"select",options:b.magicResistanceModifiers},{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"distribution",attr:"distribution.value",type:"text"}],spellextension:[{label:"Category",attr:"category",type:"select",options:{spell:"spell",liturgy:"liturgy",ritual:"ritual",ceremony:"ceremony"}}],magictrick:[{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"feature",attr:"feature.value",type:"text"},{label:"distribution",attr:"distribution",type:"text"}],blessing:[{label:"targetCategory",attr:"targetCategory.value",type:"text"},{label:"feature",attr:"feature.value",type:"text"}],npc:[{label:"TYPES.Item.species",attr:"details.species.value",type:"text"},{label:"TYPES.Item.career",attr:"details.career.value",type:"text"},{label:"TYPES.Item.culture",attr:"details.culture.value",type:"text"}],character:[{label:"TYPES.Item.species",attr:"details.species.value",type:"text"},{label:"TYPES.Item.career",attr:"details.career.value",type:"text"},{label:"TYPES.Item.culture",attr:"details.culture.value",type:"text"}],creature:[{label:"creatureClass",attr:"creatureClass.value",type:"text"},{label:"sizeCategory",attr:"status.size.value",type:"select",options:b.sizeCategories}],armor:[{label:"protection",attr:"protection.value",type:"select",options:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"}},{label:"encumbrance",attr:"encumbrance.value",type:"select",options:{0:"0",1:"1",2:"2",3:"3",4:"4"}},{label:"PLANT.region",attr:"region",type:"text"}],plant:[{label:"PLANT.landscape",attr:"location.landscape",type:"text"},{label:"PLANT.region",attr:"location.region",type:"text"},{label:"PLANT.healing",attr:"planttype.healing",type:"checkbox"},{label:"PLANT.poison",attr:"planttype.poison",type:"checkbox"},{label:"PLANT.physical",attr:"planttype.physical",type:"checkbox"},{label:"PLANT.psychic",attr:"planttype.psychic",type:"checkbox"},{label:"PLANT.crop",attr:"planttype.crop",type:"checkbox"},{label:"PLANT.defensive",attr:"planttype.defensive",type:"checkbox"},{label:"PLANT.supernatural",attr:"planttype.supernatural",type:"checkbox"},{label:"PLANT.highNorth",attr:"availability.highNorth",type:"range"},{label:"PLANT.grasLands",attr:"availability.grasLands",type:"range"},{label:"PLANT.swamps",attr:"availability.swamps",type:"range"},{label:"PLANT.woods",attr:"availability.woods",type:"range"},{label:"PLANT.jungle",attr:"availability.jungle",type:"range"},{label:"PLANT.mountains",attr:"availability.mountains",type:"range"},{label:"PLANT.desert",attr:"availability.desert",type:"range"},{label:"PLANT.maraskan",attr:"availability.maraskan",type:"range"}],magicalsign:[],patron:[],demonmark:[],essence:[],imprint:[{label:"Category",attr:"category",type:"text"}]};for(let[l,c]of Object.entries(r))for(let d of c)d.type=="text"&&(d.placeholder=`Library.advancedSearchPlaceholders.${l}.${d.attr}`);Wo(nn,r),game.dsa5.advancedFilters=nn})});var Ca=nn;var{getProperty:rn,duplicate:Uo,debounce:Vo,mergeObject:Ko}=foundry.utils,Kt=class{static{u(this,"SearchDocument")}constructor(e,t={}){let a=e.documentName||e.type;switch(e.documentName){case"Actor":case"Item":a=e.type;break}let s="";if(game.settings.get("dsa5","indexDescription"))switch(a){case"creature":case"npc":case"character":s=rn(e,"system.description.value");break;case"JournalEntry":s=rn(e,"system.content");break;default:s=rn(e,"description.value")}this.document={name:e.name,filterType:a,data:$("
").html(s).text(),id:e.id||e._id,visible:e.visible?e.visible:!0,compendium:e.compendium?e.compendium.metadata.packageName:t.packageName||"",pack:e.pack||(t.packageName?t.id:void 0),img:e.img,price:e.system?.price?.value}}get uuid(){if(this.document.compendium)return`Compendium.${this.document.pack}.${this.document.id}`;switch(this.itemType){case"character":case"creature":case"npc":return`Actor.${this.id}`;case"JournalEntry":return`JournalEntry.${this.id}`;default:return`Item.${this.id}`}}get name(){return this.document.name}get data(){return this.document.data}get id(){return this.document.id}get itemType(){return this.document.filterType}get hasPrice(){return b.equipmentCategories.has(this.document.filterType)}async getItem(){return await fromUuid(this.uuid)}hasPermission(){return this.document.visible}async render(){(await this.getItem()).sheet.render(!0)}get compendium(){return this.document.compendium}get img(){return this.itemType=="JournalEntry"?"systems/dsa5/icons/categories/DSA-Auge.webp":this.document.img}},Da=class extends Kt{static{u(this,"AdvancedSearchDocument")}constructor(e,t){super(e);let a=Ca[t]||[];for(let s of a)this[s.attr]=s.attr.split(".").reduce((i,n)=>i[n]===void 0?{}:i[n],e.system)}},Tt=class o extends Application{static{u(this,"DSA5ItemLibrary")}constructor(e){super(e),this.advancedFiltering=!1,this.journalBuild=!1,this.journalWorldBuild=!1,this.equipmentBuild=!1,this.equipmentWorldBuild,this.zooBuild=!1,this.zooWorldBuild=!1,this.currentDetailFilter={equipment:[],character:[],spell:[],journal:[],zoo:[]},this.journalIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data"]}}),this.equipmentIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data","itemType"],tag:["itemType"]}}),this.zooIndex=new FlexSearch({encode:"simple",tokenize:"reverse",cache:!0,doc:{id:"id",field:["name","data","itemType"],tag:["itemType"]}}),this.detailFilter={},this.pages={equipment:{},character:{},spell:{},journal:{},zoo:{}},this.filters={equipment:{categories:{armor:!1,ammunition:!1,equipment:!1,meleeweapon:!1,rangeweapon:!1,poison:!1,disease:!1,consumable:!1,plant:!1,book:!1,trap:!1},filterBy:{search:""}},character:{categories:{career:!1,advantage:!1,combatskill:!1,culture:!1,disadvantage:!1,trait:!1,skill:!1,specialability:!1,species:!1,application:!1,demonmark:!1,patron:!1,essence:!1,imprint:!1},filterBy:{search:""}},spell:{categories:{blessing:!1,ceremony:!1,liturgy:!1,magictrick:!1,ritual:!1,spell:!1,spellextension:!1,magicalsign:!1},filterBy:{search:""}},journal:{categories:{},filterBy:{search:""}},zoo:{categories:{npc:!1,character:!1,creature:!1},filterBy:{search:""}}}}async getData(e){let t=await super.getData(e);return t.categories=this.translateFilters(),t.isGM=game.user.isGM,t.advancedMode=this.advancedFiltering?"on":"",t.worldIndexed=game.settings.get("dsa5","indexWorldItems")?"on":"",t.fullTextEnabled=game.settings.get("dsa5","indexDescription")?"on":"",t.filterDuplicateItems=game.settings.get("dsa5","filterDuplicateItems")?"on":"",t.browseEnabled=this.browseEnabled?"on":"",this.advancedFiltering&&(t.advancedFilter=await this.buildDetailFilter("tbd",this.subcategory)),t}translateFilters(){return{equipment:this.buildFilter(this.filters.equipment),character:this.buildFilter(this.filters.character),spell:this.buildFilter(this.filters.spell),zoo:this.buildFilter(this.filters.zoo,"Actor"),journal:this.buildFilter(this.filters.journal)}}purgeAdvancedFilters(){for(let e in this.filters)for(let t in this.filters[e].categories)this.filters[e].categories[t]=!1;$(this._element).find('.filter[type="checkbox"]').prop("checked",!1),this.buildDetailFilter("none","none").then(e=>{$(this._element).find(".advancedSearch .groupbox").html(e)})}buildFilter(e,t="Item"){let a=[];return Object.keys(e.categories).forEach(function(s){a.push({label:game.i18n.localize(`TYPES.${t}.${s}`),selected:e.categories[s],key:s})}),a=a.sort(function(s,i){return s.label.localeCompare(i.label)}),a}static get defaultOptions(){let e=super.defaultOptions;return e.id="DSA5ItemLibrary",e.classes.push("dsa5","itemlibrary"),e.height=800,e.width=800,e.resizable=!0,e.title=game.i18n.localize("ItemLibrary"),e.template="systems/dsa5/templates/system/itemlibrary.html",e.tabs=[{navSelector:".tabs",contentSelector:".content",initial:"equipment"}],e}async getRandomItems(e,t){let a=[],s=this.equipmentIndex;return a.push(...await s.search(e,{field:["itemType"]})),(await Promise.all(this.shuffle(a.filter(i=>i.hasPermission)).slice(0,t+5).map(i=>i.getItem()))).filter(i=>{let n=i.getFlag("dsa5","enchantments");return!n||!n.find(r=>r.talisman)}).slice(0,t)}shuffle(e){let t=e.length,a,s;for(;t!==0;)s=Math.floor(Math.random()*t),t-=1,a=e[t],e[t]=e[s],e[s]=a;return e}async findCompendiumItem(e,t,a=!0){await this.buildEquipmentIndex();let s={field:["name"],where:{itemType:t}},i=await this.equipmentIndex.search(e,s);return a&&(i=i.filter(n=>n.compendium!="")),i=i.sort((n,r)=>{let l=n.compendium.startsWith("dsa5-core"),c=r.compendium.startsWith("dsa5-core");return l&&c?0:l?1:c?-1:0}),await Promise.all(i.map(n=>n.getItem()))}async getCategoryItems(e,t=!1,a=!1){await this.buildEquipmentIndex();let s=this.equipmentIndex.search(e,{field:["itemType"]});return t?(await Promise.all(s.map(i=>i.getItem()))).map(i=>i.toObject()):a?await Promise.all(s.map(i=>i.getItem())):s}async executeAdvancedFilter(e,t,a,s,i,n=[]){let r=u(f=>{for(let h of a)if(h[2]?f[h[0]]!=h[1]:f[h[0]].indexOf(h[1])==-1)return!1;return!0},"selFnct"),l=u(f=>{for(let h of s)if(f[h[0]].toLowerCase().indexOf(h[1])==-1)return!1;return!0},"txtFnct"),c=u(f=>{for(let h of i)if(f[h[0]]!=h[1])return!1;return!0},"cbFnct"),d=u(f=>{for(let h of n)if(f[h[0]]h[2])return!1;return!0},"rangeFct"),p=t.where(f=>(e==""||f.name.toLowerCase().indexOf(e)!=-1)&&r(f)&&l(f)&&c(f)&&d(f));return p=p.filter(f=>f.hasPermission).sort((f,h)=>f.name.toLowerCase()>h.name.toLowerCase()?1:-1),p}collectDetailSearch(e){let t=[],a=[],s=[];for(let i of e.find("select")){let n=$(i).val();n!=""&&t.push([$(i).attr("name"),n,i.dataset.notstrict!="true"])}for(let i of e.find('input[type="text"]:not(.manualFilter)')){let n=$(i).val();n!=""&&a.push([$(i).attr("name"),n.toLowerCase()])}for(let i of e.find('input[type="checkbox"]:checked:not(.manualFilter)')){let n=$(i).val();n!=""&&s.push([$(i).attr("name"),n.toLowerCase()])}return{sels:t,inps:a,checkboxes:s}}async advancedFilterStuff(e,t){let a=$(this._element).find(".detailFilters"),s=a.attr("data-subc"),i=this.detailFilter[s],n=this.filters[e].filterBy.search.toLowerCase(),{sels:r,inps:l,checkboxes:c}=this.collectDetailSearch(a),d=await this.executeAdvancedFilter(n,i,r,l,c);return this.setBGImage(d,e),d=this.filterDuplications(d),d}async findEquipmentItemDetailed(e,t,a=!0){await this.buildDetailFilter("Item",t);let s=this.detailFilter[t],i=await this.executeAdvancedFilter(e.search||"",s,e.selects||[],e.inputs||[],e.booleans||[],e.rangeSearches||[]);return a&&(i=i.filter(n=>n.compendium!="")),await Promise.all(i.map(n=>n.getItem()))}filterDuplications(e){return game.settings.get("dsa5","filterDuplicateItems")&&(e=[...new Map(e.map(t=>[`${t.name}_${t.type}`,t])).values()]),e}async filterStuff(e,t,a){let s=this.filters[e].filterBy.search,i={field:["name","data"]},n=[],r=!1;for(let l in this.filters[e].categories){if(this.filters[e].categories[l]){let c,d=null;s==""?c=t.search(l,{field:["itemType"],sort:"name",where:{itemType:l}}):c=t.search(s,{...i,sort:"name",where:{itemType:l}});let m=Number(a)||0;c=c.slice(m,Math.min(m+60,c.length)),c.length==60&&(d=`${m+60}`),this.pages[e].next=d,n.push(...c)}r=this.filters[e].categories[l]||r}return r||(n=t.search(s,{...i,limit:60,page:a||!0,sort:"name"}),this.pages[e].next=n.next),n=n.result?n.result:n,n=n.filter(l=>l.hasPermission),this.setBGImage(n,e),n}setBGImage(e,t){$(this._element).find(`.${t} .libcontainer`)[`${e.length>0?"remove":"add"}Class`]("libraryImg")}async getItemTemplate(e,t){return this.browseEnabled&&["Item","Actor"].includes(t)?e.map(a=>`
`).join(""):await renderTemplate("systems/dsa5/templates/system/libraryItem.html",{items:e})}async renderBrowseItem(e){let t=await fromUuid(e),a=`systems/dsa5/templates/items/browse/${t.type}.html`,s=await renderTemplate(a,{document:t,isGM:game.user.isGM,...await t.sheet.getData()});return`
${s}
`}intersectionObserved(e,t){for(let a of e)if(a.isIntersecting){let s=a.target.dataset.uuid;this.renderBrowseItem(s).then(i=>{a.target.outerHTML=i}),t.unobserve(a.target)}}async renderResult(e,t,{index:a,itemType:s},i){let n=e.find(".searchResult .item-list"),r=await this.getItemTemplate(t,s);i||n.empty(),r=$(r);let l=u((d,m,p,f=!1)=>{d.stopPropagation();let h=m.find(d.currentTarget.dataset.itemId);d.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:p,uuid:h.uuid,pay:f}))},"itemDragStart");r.each(function(){let d=$(this);d.attr("draggable",!0).on("dragstart",m=>l(m,a,s)),d.find(".priceDrag").attr("draggable",!0).on("dragstart",m=>l(m,a,s,!0))}),n.append(r);let c=n.find(".loader");if(c.length>0){let d=new IntersectionObserver(this.intersectionObserved.bind(this),{root:e.find(".window-content")[0]});for(let m of c)d.observe(m)}}async filterItems(e,t,a){let s=this.selectIndex(t),i=this.advancedFiltering&&t!="journal"?await this.advancedFilterStuff(t,a):await this.filterStuff(t,s.index,a);return await this.renderResult(e,i,s,a),i}selectIndex(e){let t="Item",a=this.equipmentIndex;switch(e){case"zoo":t="Actor",a=this.zooIndex;break;case"journal":t="JournalEntry",a=this.journalIndex;break}return{index:a,itemType:t}}async _render(e=!1,t={}){await super._render(e,t),this.buildEquipmentIndex()}_getHeaderButtons(){let e=super._getHeaderButtons();return e.unshift({class:"libraryModulsFilter",tooltip:"DSASETTINGS.libraryModulsFilter",icon:"fas fa-filter",onclick:u(async()=>new on().render(!0),"onclick")}),e}async buildEquipmentIndex(){await this._createIndex("equipment","Item",game.items)}async _createIndex(e,t,a){if(this[`${e}Build`])return;let s=game.settings.get("dsa5","libraryModulsFilter");SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:""}),pct:0});let i=$(this._element).find(`*[data-tab="${e}"]`);this.showLoading(i,e);let n=game.packs.filter(f=>f.documentName==t&&(game.user.isGM||f.visible)&&!f.metadata.label.startsWith("WZ-")&&!s[f.metadata.packageName]),r=100/(n.length+1),l=r,c=["name","system.type","system.description.value","img"],d;t=="Actor"?d=u(f=>f.getIndex({actorFields:c}),"func"):t=="JournalEntry"?d=u(f=>f.getDocuments(),"func"):d=u(f=>f.getDocuments({type__in:Object.keys(game.system.documentTypes.Item)}),"func");let m=this.indexWorldItems(a,e);SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:"world items"}),pct:Math.round(r)});let p=n.map(async f=>{let h=await d(f);l+=r,SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:`${f.metadata.label} (${f.metadata.id})`}),pct:Math.round(l)}),m.push(...h.map(y=>new Kt(y,f.metadata)))});return Promise.all(p).then(f=>{this[`${e}Index`].add(m),this[`${e}Build`]=!0,SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:""}),pct:100}),this.hideLoading(i,e)})}subcategoryFields(e){let t=["name","itemType"],a=Ca[e]||[];for(let s of a)t.push(s.attr);return t}indexWorldItems(e,t){let a=[];return game.settings.get("dsa5","indexWorldItems")&&(a.push(...e.filter(s=>s.visible).map(s=>new Kt(s))),this[`${t}WorldBuild`]=!0),a}async createDetailIndex(e,t){if(!this.detailFilter[t]){let a=game.i18n.localize(`TYPES.Item.${t}`);SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:0});let s=this.subcategoryFields(t),i=$(this._element).find(`*[data-tab="${e}"]`);i.find(".searchResult ul").html(""),this.showLoading(i,e),this.detailFilter[t]=new FlexSearch({encode:"simple",tokenize:"full",cache:!0,doc:{id:"id",field:s}});let{index:n,itemType:r}=this.selectIndex(e),l=r=="Item"?game.items:game.actors,c=[];game.settings.get("dsa5","indexWorldItems")&&c.push(...l.filter(k=>k.visible&&k.type==t).map(k=>new Da(k,t)));let d=n.search(t,{field:["itemType"]}),m={};SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:10});for(let k of d)k.document.pack&&(m[k.document.pack]||(m[k.document.pack]=[]),m[k.document.pack].push(k.document.id));let p=[],f=60/Object.keys(m).length,h=0;for(let k of Object.entries(m))h+=1,p.push(game.packs.get(k[0]).getDocuments({_id__in:k[1],type:t})),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:Math.round(10+h*f)});SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:70});let y=await Promise.all(p);f=30/y.length,h=0;for(let k of y)h+=1,c.push(...k.map(C=>new Da(C,t))),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:Math.round(70+h*f)});this.detailFilter[t].add(c),this.hideLoading(i,e),SceneNavigation.displayProgressBar({label:game.i18n.format("Library.loading",{item:a}),pct:100})}}async buildDetailFilter(e,t,a=void 0){let s=Uo(Ca[t]||[]),i=!1;if(s){if(a){for(let c of s)switch(c.type){case"select":let d=a.selects.find(f=>f[0]==c.attr);d&&(c.value=d[1]);break;case"text":let m=a.inputs.find(f=>f[0]==c.attr);m&&(c.value=m[1]);break;case"checkbox":let p=a.booleans.find(f=>f[0]==c.attr);p&&(c.value=p[1]);break}i=a.selects.find(c=>c[0]=="compendium")?.[1]}let n=this.createDetailIndex(e,t),r=o.collectModulOptions(),l=await renderTemplate("systems/dsa5/templates/system/detailFilter.html",{fields:s,subcategory:t,moduleOptions:r,moduleSelected:i});return await n,l}else return`

${game.i18n.localize("Library.selectAdvanced")}

`}static collectModulOptions(){return game.packs.filter(e=>e.metadata.type=="Item").reduce((e,t)=>{if(!e[t.metadata.packageName]){let a=game.i18n.has(`${t.metadata.packageName}.name`)?game.i18n.localize(`${t.metadata.packageName}.name`):game.modules.get(t.metadata.packageName)?.title.replace(/The Dark Eye 5th Ed. - /i,"")||game.system.title;e[t.metadata.packageName]=a}return e},{})}checkWorldStuffIndex(){game.settings.get("dsa5","indexWorldItems")&&(!this.journalWorldBuild&&this.journalBuild&&this.journalIndex.add(this.indexWorldItems(game.journal,"journal")),!this.equipmentWorldBuild&&this.equipmentBuild&&this.equipmentIndex.add(this.indexWorldItems(game.items,"equipment")),!this.zooWorldBuild&&this.zooBuild&&this.zooIndex.add(this.indexWorldItems(game.actors,"zoo")))}activateListeners(e){super.activateListeners(e),me(e),e.on("click",".searchableAbility a",s=>mt(s)),e.on("click",".toggleAdvancedMode",()=>{this.advancedFiltering=!this.advancedFiltering,this.advancedFiltering?($(this._element).find(".toggleAdvancedMode").addClass("on"),$(this._element).find(".advancedSearch").fadeIn(),this.purgeAdvancedFilters()):($(this._element).find(".toggleAdvancedMode").removeClass("on"),$(this._element).find(".advancedSearch").fadeOut())}),e.on("change",".detailFilters input, .detailFilters select",()=>{let s=$(this._element).find(".tab.active"),i=s.attr("data-tab");this.filterItems(s,i)}),e.on("click",".filter",async s=>{let i=$(s.currentTarget).closest(".tab"),n=i.attr("data-tab"),r=s.currentTarget.dataset.category,l=$(s.currentTarget).is(":checked");this.advancedFiltering&&l&&(this.purgeAdvancedFilters(),this.subcategory=r,$(s.currentTarget).prop("checked",l),$(this._element).find(".advancedSearch .groupbox").html(await this.buildDetailFilter(n,r))),this.filters[n].categories[r]=l,this.filterItems(i,n)}),e.on("click",".item-name",s=>{this.getItemFromHTML(s).render()}),e.on("mousedown",".item-name",s=>{s.button==2&&g.showArtwork(this.getItemFromHTML(s))}),e.on("keyup",".filterBy-search",s=>{let i=$(s.currentTarget).closest(".tab"),n=i.attr("data-tab");this.filters[n].filterBy.search=$(s.currentTarget).val(),this.filterItems(i,n)});let t=u(s=>{s.stopPropagation();let i=s.currentTarget.dataset.type,n=s.currentTarget.dataset.uuid;!n||!i||s.originalEvent.dataTransfer.setData("text/plain",JSON.stringify({type:i,uuid:n}))},"itemDragStart");e.on("click",".show-item",async s=>{let i=s.currentTarget.dataset.uuid;(await fromUuid(i)).sheet.render(!0)}),e.find(".show-item").attr("draggable",!0).on("dragstart",s=>t(s)),e.find('*[data-tab="journal"]').click(s=>{this._createIndex("journal","JournalEntry",game.journal)}),e.find('*[data-tab="zoo"]').click(s=>{this._createIndex("zoo","Actor",game.actors)}),e.find(".showDetails").click(s=>{let i=s.currentTarget.dataset.btn;$(s.currentTarget).find("i").toggleClass("fa-caret-left fa-caret-right"),e.find(`.${i} .detailBox`).toggleClass("dsahidden")}),e.find(".toggleWorldIndex").click(s=>{game.settings.set("dsa5","indexWorldItems",!game.settings.get("dsa5","indexWorldItems")),this.checkWorldStuffIndex(),$(s.currentTarget).toggleClass("on")}),e.find(".fulltextsearch").click(s=>{game.settings.set("dsa5","indexDescription",!game.settings.get("dsa5","indexDescription")),$(s.currentTarget).toggleClass("on")}),e.find(".browseEnabled").click(s=>{this.browseEnabled=!this.browseEnabled,$(s.currentTarget).toggleClass("on")}),e.find(".filterDuplicateItems").click(s=>{game.settings.set("dsa5","filterDuplicateItems",!game.settings.get("dsa5","filterDuplicateItems")),$(s.currentTarget).toggleClass("on")});let a=this;$(this._element).find(".window-content").on("scroll.infinit",Vo(function(s){if(a.advancedFiltering)return;let i=$(s.target),n=i.scrollTop()+i.innerHeight()>=i[0].scrollHeight-100,r=e.find(".tabs .item.active").attr("data-tab");if(n&&a.pages[r].next){let l=e.find(".tab.active");a.filterItems.call(a,l,r,a.pages[r].next)}},100))}getItemFromHTML(e){let t=$(e.currentTarget).parents(".browser-item").attr("data-item-id");switch($(e.currentTarget).closest(".tab").attr("data-tab")){case"zoo":return this.zooIndex.find(t);case"journal":return this.journalIndex.find(t);default:return this.equipmentIndex.find(t)}}showLoading(e,t){this.setBGImage([1],t),$(`
${game.i18n.localize("Library.buildingIndex")}
`).appendTo(e.find(".searchResult"))}hideLoading(e,t){this.setBGImage([],t),e.find(".loader").remove()}},on=class extends Application{static{u(this,"LibraryModulsFilter")}static get defaultOptions(){let e=super.defaultOptions;return e.classes.push("dsa5"),e.resizable=!0,e.width=600,e.title=game.i18n.localize("DSASETTINGS.libraryModulsFilter"),e.template="systems/dsa5/templates/system/librarymodulesfilter.html",e}async getData(e){let t=await super.getData(e);return Ko(t,{moduleOptions:Tt.collectModulOptions(),rejectedModules:game.settings.get("dsa5","libraryModulsFilter")}),t}activateListeners(e){super.activateListeners(e),e.find(".moduleSelector").change(t=>this.moduleFilterChanged(t))}async moduleFilterChanged(e){let t=e.currentTarget.id,a=e.currentTarget.checked,s=game.settings.get("dsa5","libraryModulsFilter");a?delete s[t]:s[t]=!0,game.settings.set("dsa5","libraryModulsFilter",s)}};var{getProperty:ln}=foundry.utils,Yt=class extends foundry.applications.api.DialogV2{static{u(this,"DSA5Initializer")}constructor(e,t,a,s="",i={}){let n={window:{title:e},position:{width:500},content:t,buttons:[{action:"initialize",label:"initialize",callback:u(()=>{this.lock||this.initialize()},"callback")},{action:"cancel",label:"cancel",callback:u(()=>{this.lock||this.dontInitialize()},"callback")}]};super(n),this.module=a,this.lang=s,this.folders={},this.journals={},this.scenes={},this.actors={},this.lock=!1,this.scopeOptions=i}async initNotes(e,t,a){let s=await this.getFolderForType("JournalEntry");for(let i of e.notes)try{let n=t.find(r=>r.flags.dsa5.initId==i.entryId);if(!a.has(n._id)){let r=ln(n,"flags.dsa5.parent"),l=s;this.folders[r]?l=this.folders[r]:r&&(l=await this.getFolderForType("JournalEntry",s.id,r,0,ln(n,"flags.dsa5.foldercolor")||"")),n.folder=l.id;let c=game.journal.find(d=>d.name==n.name&&d.folder?.id==l.id&&d.flags.dsa5.initId==i.entryId);if(c)await c.update(n),a.set(n._id,c.id);else{let d=await JournalEntry.create(n);a.set(n._id,d.id)}}i.entryId=a.get(n._id)}catch(n){console.warn(`Could not initialize Scene Notes for scene :${e.name}`+n)}}async initScenes(e,t=void 0){let a=await this.getFolderForType("Scene"),i=(await game.packs.get(e.scenes).getDocuments()).map(f=>f.toObject()),r=(await game.packs.get(e.journal).getDocuments()).map(f=>f.toObject()),l=[],c=[],d=new Map,m=!1;t&&(i=i.filter(f=>t.includes(f.name)));for(let f of i){let h=m,y=game.scenes.find(k=>k.name==f.name&&k.folder?.id==a.id);if(!m&&y)try{[h,m]=await foundry.applications.api.DialogV2.wait({window:{title:"Book.sceneReset"},content:`

${game.i18n.format("Book.sceneResetDescription",{name:f.name})}

`,buttons:[{action:"yes",icon:"fa fa-check",label:"yes",callback:u(()=>[!0,!1],"callback")},{action:"all",icon:"fa fa-check",label:"LocalizedIDs.all",callback:u(()=>[!0,!0],"callback")},{action:"no",icon:"fas fa-times",label:"cancel",default:!0,callback:u(()=>[!1,!1],"callback")}]})}catch{h=!1,m=!1}if(y&&!h){this.scenes[y.name]=y;continue}f.folder=a.id,await this.initNotes(f,r,d),y?(f._id=y.id,c.push(f)):l.push(f)}let p=await Scene.create(l,{dsaInit:!0,keepId:!0});for(let f of p){this.scenes[f.name]=f;let h=await f.createThumbnail();await f.update({thumb:h.thumb})}for(let f of c)await game.scenes.get(f._id).update(f),this.scenes[f.name]=game.scenes.get(f._id);if(e.initialScene){let f=this.scenes[e.initialScene];f&&(await game.settings.set("core",NotesLayer.TOGGLE_SETTING,!0),await f.activate(),await f.update({navigation:!0}))}}async loadJson(){let e=this.scopeOptions.initializer||`initialization${this.lang}`;return await(await fetch(`modules/${this.module}/${e}.json`)).json()}async initialize(){this.lock=!0;let e=$(this.element).find('[data-action="initialize"]');e.prepend('');let t={};try{game.settings.settings.has(`${this.moduleScope}.initialized`)&&await game.settings.set(this.moduleScope,"initialized",!0)}catch{}if(this.scopeOptions.scope)await fetch(`modules/${this.module}/${this.scopeOptions.scope}.json`).then(async i=>i.json()).then(async i=>{t=i});else try{await fetch(`modules/${this.module}/adventure${this.lang}.json`).then(async i=>i.json()).then(async i=>{t=i})}catch{try{await fetch(`modules/${this.module}/adventure.json`).then(async i=>i.json()).then(async i=>{t=i})}catch{console.warn(`Could not find book data for ${this.moduleScope} import.`)}}let a=await this.loadJson(),s=a.folders;if(s){let i=await this.getFolderForType("JournalEntry"),n=a.folders[0].name;i&&(this.folders[i.name]=i,a.folders.shift());let r=await Folder.create(s);Array.isArray(r)||(r=[r]);for(let c of r)this.folders[c.name]=c;let l=[];for(let c in this.folders){let d=this.folders[c].getFlag("dsa5","parent"),m=d==n?game.i18n.localize(`${this.moduleScope}.name`):d;m&&l.push({_id:this.folders[c].id,folder:this.folders[m].id})}await Folder.updateDocuments(l)}if(a.items&&a.items.length>0){let i=await this.getFolderForType("Item"),n=[],r=[];for(let l of a.items){l.folder=i.id;let c=game.items.find(d=>d.name==l.name&&d.folder?.id==i.id);c?(l._id=c.id,r.push(l)):n.push(l)}await D.create(n),await D.updateDocuments(r)}if(a.playlists){let i=await this.getFolderForType("Playlist"),n=[],r=[],c=(await game.packs.get(a.playlists).getDocuments()).map(d=>d.toObject());for(let d of c){d.folder=i.id;let m=game.playlists.find(p=>p.name==d.name&&p.folder?.id==i.id);m?(d._id=m._id,r.push(d)):n.push(d)}await Playlist.create(n,{keepId:!0}),await Playlist.updateDocuments(r)}if(a.scenes&&await this.initScenes(a),a.actors){let i=await this.getFolderForType("Actor"),r=(await game.packs.get(a.actors).getDocuments()).map(f=>f.toObject()),l=[],c=[],d=new Map,m=0;if(ln(t,"chapters")){for(let f of t.chapters)for(let h of f.content)if(h.actors){let y=!1;for(let k of h.actors)d.has(k)||(d.set(k,h.name),y=!0);y&&(await this.getFolderForType("Actor",i.id,h.name,m),m+=1)}}for(let f of r){let h=d.has(f.name)?await this.getFolderForType("Actor",i.id,d.get(f.name)):i;f.folder=h.id,f._id&&delete f._id;let y=game.actors.find(k=>k.name==f.name&&[i.id,h.id].includes(k.folder?.id));y?(f._id=y.id,await y.deleteEmbeddedDocuments("Item",y.items.map(k=>k.id)),c.push(f)):l.push(f)}let p=await Actor.create(l);await Actor.updateDocuments(c);for(let f of p)this.actors[f.name]=f}a.macro&&(Hooks.once("renderCompendium",(i,n,r)=>{n.find(`[data-pack="${a.macro}"] header`).append($(`

${game.i18n.localize("Book.macroHint")}

`))}),await game.packs.get(a.macro).render(!0)),this.lock=!1,e.find("i").remove(),ui.notifications.info("initComplete",{localize:!0}),await this.close()}async dontInitialize(){game.settings.settings.has(`${this.moduleScope}.initialized`)&&await game.settings.set(this.moduleScope,"initialized",!0),ui.notifications.info("initSkipped",{localize:!0}),await this.close()}submit(e){try{e.callback&&e.callback(this.options.jQuery?this.element:this.element[0])}catch(t){throw ui.notifications.error(t),new Error(t)}}get moduleScope(){return this.scopeOptions.scope||this.module}async getFolderForType(e,t=null,a=null,s=0,i=""){return a||(a=game.i18n.localize(`${this.moduleScope}.name`)),g.getFolderForType(e,t,a,s,i)}};var Jt=class extends ChatMessage{static{u(this,"ChatMessageDSA5Roll")}get isRoll(){return this.isDSARoll||super.isRoll}get roll(){return this.isDSARoll?new cn(""):super.roll}get isDSARoll(){return this.flags.data?this.flags.data.isDSARoll:!1}},cn=class extends Roll{static{u(this,"EmptyRoll")}render(){return""}};var{getProperty:Yo,mergeObject:Jo}=foundry.utils,Qt=class extends Hotbar{static{u(this,"DSA5Hotbar")}async _render(e=!1,t={}){await super._render(e,t),this.addContextColor()}async collapse(){return this._collapsed?!0:($(this.element).addClass("collapsedHotbar"),super.collapse())}async expand(){return this._collapsed?($(this.element).removeClass("collapsedHotbar"),super.expand()):!0}async updateDSA5Hotbar(){if(!game.settings.get("dsa5","hotbarv3"))return;let e=canvas.tokens.controlled;if(this.token=void 0,this.showEffects=!1,e.length===1){let t=e[0].actor;t&&t.isOwner&&(this.token=e[0])}e.length>=1&&(this.showEffects=!0),await this.render(!0,{focus:!1})}addContextColor(){let e=new RegExp(` ${game.i18n.localize("CHAR.PARRY")}$`),t=new RegExp(` ${game.i18n.localize("CHAR.ATTACK")}$`),a=$(this._element).find("#macro-list");for(let s of this.macros)s.macro&&(e.test(s.macro.name)?a.find(`[data-macro-id="${s.macro.id}"]`).addClass("parry"):t.test(s.macro.name)&&a.find(`[data-macro-id="${s.macro.id}"]`).addClass("attack"))}_contextMenu(e){game.settings.get("dsa5","hotbarv3")?dn.create(this,e,".macro",this._getEntryContextOptions()):ContextMenu.create(this,e,".macro",this._getEntryContextOptions())}get template(){return game.settings.get("dsa5","hotbarv3")?"systems/dsa5/templates/system/hud/hotbar.html":super.template}activateListeners(e){if(super.activateListeners(e),game.settings.get("dsa5","hotbarv3")){e.find(".quantity-click").mousedown(i=>N.quantityClick(i)),e.on("mousedown","li.primary",async i=>(game.tooltip.deactivate(),i.currentTarget.classList.contains("macro")||(i.stopPropagation(),await this.tokenHotbar.executeQuickButton(i)),!1)),e.find(".categoryFilter").click(i=>{this.filterCategory(i,e)});let t=this,a=u(function(i){if(e.find(".sections").is(":hover"))return t.filterSections(i,e),!1},"fn"),s=u(function(){$(document).off("keydown.sectionFilter",a),t.searching="",e.find(".macro,.primary,.sections .skillItems").removeClass("dsahidden"),e.find(".longLayout").removeClass("longLayout")},"filterOff");e.find(".sections").hover(function(){$(document).off("keydown.sectionFilter",a).on("keydown.sectionFilter",a)},s),e.find(".primary").hover(i=>this._betterTooltip(i)),e.find(".itdarkness input").change(i=>this.tokenHotbar.changeDarkness(i))}}static get defaultOptions(){let e=super.defaultOptions;return e.scrollY=e.scrollY||[],e.scrollY.push("#macro-list"),e}async _betterTooltip(e){let t=e.currentTarget,a=t.dataset;if("tooltipClass"in t.dataset)return;let s,i,n;switch(a.category?.split(" ")[0]){case"skillgm":s=game.i18n.format("TT.skillgm",{name:a.name});break;case"effect":let l=this.token.actor?.effects.get(a.id);l&&(n=game.i18n.has(l.description)?game.i18n.localize(l.description):l.description);break;case"onUse":switch(i=this.token.actor?.items.get(a.id),i.type){case"specialability":n=i.system.rule?.value;break;case"advantage":case"disadvantage":break;default:n=i.system.description?.value}break;case"unequipped":case"consumable":case"weapon":case"spell":i=this.token.actor?.items.get(a.id);let c=await i.sheet.getData();!game.user.isGM&&c.item.system.obfuscation?.details?n=await renderTemplate("systems/dsa5/templates/items/obfuscatedItem.html",c):n=$(await renderTemplate(`systems/dsa5/templates/items/browse/${i.type}.html`,{isGM:game.user.isGM,...c,document:i,skipHeader:!0,hint:!0})).find(".groupbox").html();break;case"enchantment":let d=a.id.split("_");if(i=this.token.actor?.items.get(d[0]),i.system.obfuscation?.enchantment)n=await renderTemplate("systems/dsa5/templates/items/obfuscatedItem.html",i),a.name=`${game.i18n.localize("enchantment")} (${i.name})`;else{let m=i.getFlag("dsa5","enchantments").find(p=>p.id==d[1]);a.name=`${m.name} (${i.name})`,n=await renderTemplate("systems/dsa5/templates/items/enchantment-preview.html",{enchantment:m,document:i})}break;default:return}n&&(s=`

${a.name}

${n}
`),s&&($("#tooltip").addClass("dsatooltip").html(s),t.dataset.tooltip=s,t.dataset.tooltipClass="dsatooltip")}filterCategory(e,t){let a=e.currentTarget.dataset.filter;a?(t.find(".skillItems").addClass("collapsed"),t.find(`.skillItems[data-category="${a}"]`).removeClass("collapsed"),t.find(".categoryFilter").removeClass("active"),t.find(`.categoryFilter[data-filter="${a}"]`).addClass("active"),this.token?.actor?this.activeFilters=[a]:this.gmFilters=[a]):(t.find(".skillItems").removeClass("collapsed"),t.find(".categoryFilter").removeClass("active"),this.token?.actor?this.activeFilters=[]:this.gmFilters=[])}filterSections(e,t){switch(this.searching=this.searching||"",e.which){case 8:this.searching=this.searching.slice(0,-1);break;default:if(!e.key.match(/^[a-zA-Z0-9öäüÖÄÜ]$/))return;this.searching+=e.key}e.preventDefault(),e.stopPropagation();let a=this.searching.toLowerCase();ge(a);let s=t.find(".sections");a?s.addClass("longLayout"):s.removeClass("longLayout"),t.find(".primary").removeClass("dsahidden").filter(function(){let i=this.dataset?.name?.toLowerCase().trim();return i?i.indexOf(a)==-1:!0}).addClass("dsahidden");for(let i of s.find(".skillItems")){let n=i.dataset.category,r=$(i);r.toggleClass("dsahidden",r.find(`li.${n}.dsahidden`).length==r.find(`li.${n}`).length)}return!1}async getData(e){let t=await super.getData(e);return game.settings.get("dsa5","hotbarv3")&&await this._h3Data(t),t}get tokenHotbar(){return game.dsa5.apps.tokenHotbar}async _h3Data(e){let t={skills:{},attacks:[]},a=[],s=[],i=!1,n=[],r=this.token?.actor;if(r){if(!["epic","loot"].includes(Yo(r,"system.merchant.merchantType"))){n=(this.activeFilters||[]).filter(k=>k!="gm");let f=r.items.filter(k=>k.type=="combatskill").map(k=>O._calculateCombatSkillValues(k.toObject(),r.system));s=await this.tokenHotbar._effectEntries(r);let h=this.tokenHotbar._brawlEntry(f);if(H.isRiding(r)){let k=this.tokenHotbar._ridingEntry(r);k&&(t.skills.skill=[k])}h&&t.attacks.push(h),t.functions=this.tokenHotbar?._functionEntries()||[];for(let k of r.items)switch(k.type){case"skill":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._skillEntry(k,"skill"));break;case"spell":case"liturgy":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._skillEntry(k,"spell"));break;case"trait":Xe.traitTypes.has(k.system.traitType.value)&&t.attacks.push(this.tokenHotbar._traitEntry(k,r.system));break;case"consumable":t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._actionEntry(k,"consumable",{abbrev:k.system.quantity.value}));break;case"meleeweapon":case"rangeweapon":let C=this.tokenHotbar._combatEntry(k,f,r);for(let v of C)k.system.worn.value||(v.cssClass="unequipped"),t.attacks.push(v);default:if(k.getFlag("dsa5","onUseEffect")&&(t.skills[k.type]||(t.skills[k.type]=[]),t.skills[k.type].push(this.tokenHotbar._actionEntry(k,"onUse",{subfunction:"onUse"}))),k.getFlag("dsa5","enchantments")){t.skills.enchantment||(t.skills.enchantment=[]);for(let v of k.getFlag("dsa5","enchantments"))t.skills.enchantment.push(this.tokenHotbar._enchantmentEntry(v,"enchantment",k,{subfunction:"enchantment"}))}break}}}else if(game.user.isGM&&!game.settings.get("dsa5","disableTokenhotbarMaster")){n=this.gmFilters||[],t.skills.gm=this.tokenHotbar?._gmEntries()||[];let f=this.tokenHotbar?.skills||await this.tokenHotbar?.prepareSkills()||[];t.skills.skillgm=f,i=!0}let l=45,c=2,d={gm:"systems/dsa5/icons/categories/DSA-Auge.webp",skillgm:"systems/dsa5/icons/categories/Skill.webp",enchantment:"systems/dsa5/icons/categories/enchantment.webp"},m={gm:"gmMenu",skillgm:"TYPES.Item.skill",enchantment:"enchantment"};for(let f of Object.keys(t.skills)){let h=`TYPES.Item.${f}`;a.push({key:f,tooltip:game.i18n.has(h)?game.i18n.localize(h):game.i18n.localize(m[f]),img:D.defaultImages[f]||d[f]})}let p=["body","social","nature","knowledge","trade"];if(t.skills.skill?.sort((f,h)=>p.indexOf(f.addClass)-p.indexOf(h.addClass)||f.name.localeCompare(h.name)),t.skills.skillgm?.sort((f,h)=>p.indexOf(f.addClass)-p.indexOf(h.addClass)||f.name.localeCompare(h.name)),t.attacks.length>0&&(t.attacks.sort((f,h)=>(h.cssClass||"").localeCompare(f.cssClass||"")||f.name.localeCompare(h.name)),a.unshift({key:"attacks",tooltip:game.i18n.localize("Combat"),img:"systems/dsa5/icons/categories/Meleeweapon.webp"})),this.showEffects){if(canvas.tokens.controlled.length>1){let y=await this.tokenHotbar._effectEntries(canvas.tokens.controlled[0].actor,{subfunction:"sharedEffect"});for(let k of canvas.tokens.controlled){let C=(await k.actor.actorEffects()).map(v=>v.name);y=y.filter(v=>C.includes(v.name))}s=y}let h={name:"CONDITION.add",id:"",icon:"icons/svg/aura.svg",cssClass:"effect",abbrev:game.i18n.localize("CONDITION.add")[0],subfunction:"addEffect",indicator:"+"};s.unshift(h)}n.length>0&&(n=Object.keys(t.skills).concat(["macro","attacks"]).filter(f=>!n.includes(f))),Jo(e,{token:{groups:t,effects:s},darkness:canvas?.scene?.environment.darknessLevel||0,hotBarcssClass:"hotbarV3",barWidth:"527px",baseBarHeight:`${l}px`,barHeight:`${(l+7)*c+30}px`,filterCategories:a,selectedCategories:(r?this.activeFilters:this.gmFilters)||[],showEffects:this.showEffects,activeFilters:n,gmMode:i,macros:this._getAllMacros()})}_getAllMacros(){let e=Array.from({length:50},()=>"");for(let[t,a]of Object.entries(game.user.hotbar))e[parseInt(t)-1]=a;return e.map((t,a)=>{let s=t?game.macros.get(t):null;return{slot:a+1,key:a+1,icon:s?.img||null,cssClass:s?"active":"inactive",tooltip:s?s.name:null,macro:s}})}},dn=class o extends ContextMenu{static{u(this,"HotbarV3ContextMenu")}_setPosition(e,t){t=t.closest(".flexrow"),super._setPosition(e,t)}static create(e,t,a,s,{hookName:i="EntryContext",...n}={}){for(let r of e.constructor._getInheritanceChain())Hooks.call(`get${r.name}${i}`,t,s);if(s)return new o(t,a,s,n)}};var{setProperty:Qo,getProperty:Xo}=foundry.utils,Xt=class o{static{u(this,"RollMemory")}constructor(){this.tokens={},this.actors={}}static get wantedKeys(){let e=["vision","targetMovement","shooterMovement","quickChange","mountOptions","narrowSpace","advantageousPosition","doubleAttack","reduceCostSpell","forceSpell","increaseCastingTime","decreaseCastingTime","removeGesture","removeFormula"];return ne.isEnabled||e.push("distance"),e}getPath(e,t,a){let s=a||"",i=t._id||t.type;return e.token?`tokens.${e.token||e.actor}.${i}${s}`:`actors.${e.actor}.${i}${s}`}remember(e,t,a,s){let i=this.formDataSerialize(s);Object.entries(i).length>0&&Qo(this,this.getPath(e,t,a),i)}recall(e,t,a){return Xo(this,this.getPath(e,t,a))}formDataSerialize(e){let t=e.find("form"),a={};return t.find("select").each(function(){let s=$(this).attr("name");o.wantedKeys.includes(s)&&(a[s]=$(this).val())}),t.find('input[type="checkbox"]').each(function(){let s=$(this).attr("name");o.wantedKeys.includes(s)&&(a[s]=this.checked)}),t.find(".specAbs.active").each(function(){a.specAbs||(a.specAbs=[]),a.specAbs.push({id:$(this).attr("data-id"),step:$(this).attr("data-step")})}),e.find('[name="situationalModifiers"] option').each(function(){a.situationalModifiers||(a.situationalModifiers=[]),a.situationalModifiers.push({name:$(this).text().trim(),selected:this.selected})}),a}};Hooks.once("init",()=>{console.log("Initializing DSA5 system"),CONFIG.statusEffects=b.statusEffects,game.dsa5={apps:{DSA5_Utility:g,DSA5Initializer:Yt,DSA5ChatListeners:le,DSA5Payment:Q,SpecialabilityRulesDSA5:F,AdvantageRulesDSA5:P,Migrakel:Je,DSA5Dialog:ae,DSA5StatusEffects:z,DPS:ne,DSATables:B,DSA5SoundEffect:K,RequestRoll:ie,DiceDSA5:R,DSATour:rt,OpposeDSA:ee,EquipmentDamage:W,APTracker:_,DidYouKnow:it,MeasuredTemplateDSA:Le,Riding:H,RuleChaos:N,Trade:xe,DSAActiveEffectConfig:Z},entities:{Actordsa5:O,Itemdsa5:D},sheets:{ActorSheetdsa5:ze,ActorSheetdsa5Character:Ce,ActorSheetdsa5Creature:Ne,ActorSheetdsa5NPC:Re,MerchantSheetMixin:Be,MerchantSheetDSA5:Ie,ItemSheetdsa5:Y},wizards:{CareerWizard:tt,CultureWizard:et,SpeciesWizard:at},view:{tinyNotification:ge,tabSlider:me,clickableAbility:mt},dialogs:{DialogReactDSA5:ke,ReactToSkillDialog:yt,ActAttackDialog:bt,ReactToAttackDialog:kt,RandomGoodsAddition:Ta},macro:Vt,config:b,memory:new Xt,itemLibrary:new Tt},CONFIG.Actor.documentClass=O,CONFIG.Item.documentClass=D,CONFIG.ChatMessage.template="systems/dsa5/templates/chat/chat-message.html",CONFIG.ChatMessage.documentClass=Jt,CONFIG.ui.combat=Ge,CONFIG.ui.hotbar=Qt,CONFIG.Combat.documentClass=vt,CONFIG.Combatant.documentClass=wa,CONFIG.ActiveEffect.documentClass=Me,CONFIG.ActiveEffect.legacyTransferral=!1});sn(); diff --git a/modules/system/equipment-damage.js b/modules/system/equipment-damage.js index 663adb7b..0f353bfc 100644 --- a/modules/system/equipment-damage.js +++ b/modules/system/equipment-damage.js @@ -54,9 +54,9 @@ export default class EquipmentDamage { static breakingTest(item) { if (!item) return ui.notifications.warn( - game.i18n.format('DSAError.notfound', { + game.i18n.format('DSAError.notFound', { category: '', - name: game.i18n.localize('equipment'), + name: game.i18n.localize('TYPES.Item.equipment'), }), ); if (item.system.structure.max <= 0) return ui.notifications.warn(game.i18n.format('DSAError.noBreakingStructure', { name: item.name })); diff --git a/modules/system/hotbar.js b/modules/system/hotbar.js index ab4552d0..b7e156f8 100644 --- a/modules/system/hotbar.js +++ b/modules/system/hotbar.js @@ -159,10 +159,10 @@ export default class DSA5Hotbar extends Hotbar { case 'weapon': case 'spell': item = this.token.actor?.items.get(data.id); - const itemData = await item.sheet.getData() + const itemData = await item.sheet.getData(); - if(!game.user.isGM && itemData.item.system.obfuscation?.details) { - description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', itemData) + if (!game.user.isGM && itemData.item.system.obfuscation?.details) { + description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', itemData); } else { description = $( await renderTemplate(`systems/dsa5/templates/items/browse/${item.type}.html`, { @@ -172,20 +172,22 @@ export default class DSA5Hotbar extends Hotbar { skipHeader: true, hint: true, }), - ).find('.groupbox').html(); + ) + .find('.groupbox') + .html(); } break; case 'enchantment': const ids = data.id.split('_'); item = this.token.actor?.items.get(ids[0]); - if(item.system.obfuscation?.enchantment) { - description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', item) - data.name = `${game.i18n.localize('enchantment')} (${item.name})` + if (item.system.obfuscation?.enchantment) { + description = await renderTemplate('systems/dsa5/templates/items/obfuscatedItem.html', item); + data.name = `${game.i18n.localize('enchantment')} (${item.name})`; } else { const enchantment = item.getFlag('dsa5', 'enchantments').find((x) => x.id == ids[1]); data.name = `${enchantment.name} (${item.name})`; description = await renderTemplate('systems/dsa5/templates/items/enchantment-preview.html', { enchantment, document: item }); - } + } break; default: return; @@ -245,9 +247,9 @@ export default class DSA5Hotbar extends Hotbar { } else { sections.removeClass('longLayout'); } - let btns = html.find('.primary'); - btns.removeClass('dsahidden'); - btns + html + .find('.primary') + .removeClass('dsahidden') .filter(function () { const find = this.dataset?.name?.toLowerCase().trim(); if (find) return find.indexOf(search) == -1; @@ -379,7 +381,7 @@ export default class DSA5Hotbar extends Hotbar { const fallbackNames = { gm: 'gmMenu', skillgm: 'TYPES.Item.skill', - enchantment: 'enchantment' + enchantment: 'enchantment', }; for (let key of Object.keys(groups.skills)) { diff --git a/modules/system/initializer.js b/modules/system/initializer.js index ce6a0ba3..b730a42c 100644 --- a/modules/system/initializer.js +++ b/modules/system/initializer.js @@ -232,7 +232,7 @@ export default class DSA5Initializer extends foundry.applications.api.DialogV2 { if (parent) { updates.push({ _id: this.folders[folder].id, - parent: this.folders[parent].id, + folder: this.folders[parent].id, }); } } diff --git a/modules/system/opposed-dsa5.js b/modules/system/opposed-dsa5.js index a7f3d298..7856390d 100644 --- a/modules/system/opposed-dsa5.js +++ b/modules/system/opposed-dsa5.js @@ -531,7 +531,7 @@ export default class OpposedDsa5 { armor = Math.max(Math.round(armor * armorMultiplier), 0); armor += spellArmor + liturgyArmor; const armorDamaged = EquipmentDamage.armorGetsDamage(damage, attackerTest); - const ids = wornArmor.map((x) => x.uuid); + const ids = wornArmor.map((x) => actor.items.get(x._id).uuid); return { damage, diff --git a/styles/css/dsa5.css b/styles/css/dsa5.css index cc459640..cab6ef3b 100644 --- a/styles/css/dsa5.css +++ b/styles/css/dsa5.css @@ -1 +1 @@ -:root{--border-color:#736953a6;--bg-color:#e1d3c6;--button-color:#532902e7;--sheet-bg:#2e2c2a15;--sheet-border:#968678;--boldFont:"Signika";--normalFont:"Signika";--minColumnWidth: 330px;--minColumnWidth40: 264px;--minColumnWidth60: 396px}@font-face{font-family:"GentiumBasic";src:url("../../fonts/GenBasR.eot");src:url("../../fonts/GenBasR.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasR.otf") format("opentype"),url("../../fonts/GenBasR.svg") format("svg"),url("../../fonts/GenBasR.ttf") format("truetype"),url("../../fonts/GenBasR.woff") format("woff"),url("../../fonts/GenBasR.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"GentiumBasic-BoldItalic";src:url("../../fonts/GenBasBI.eot");src:url("../../fonts/GenBasBI.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasBI.otf") format("opentype"),url("../../fonts/GenBasBI.svg") format("svg"),url("../../fonts/GenBasBI.ttf") format("truetype"),url("../../fonts/GenBasBI.woff") format("woff"),url("../../fonts/GenBasBI.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"GentiumBasic-Bold";src:url("../../fonts/GenBasB.eot");src:url("../../fonts/GenBasB.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasB.otf") format("opentype"),url("../../fonts/GenBasB.svg") format("svg"),url("../../fonts/GenBasB.ttf") format("truetype"),url("../../fonts/GenBasB.woff") format("woff"),url("../../fonts/GenBasB.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"Andalus";src:url("../../fonts/andlso.eot");src:url("../../fonts/andlso.eot?#iefix") format("embedded-opentype"),url("../../fonts/andlso.otf") format("opentype"),url("../../fonts/andlso.svg") format("svg"),url("../../fonts/andlso.ttf") format("truetype"),url("../../fonts/andlso.woff") format("woff"),url("../../fonts/andlso.woff2") format("woff2");font-weight:normal;font-style:normal}#tinymce{overflow-y:hidden;overflow-x:hidden}.tox-tinymce{width:100%}.editor-content ul{margin:0px 0px}.overflowhidden{overflow:hidden}.scrollY{overflow-y:auto;overflow-x:hidden}body{padding:0px;overflow:hidden;font-size:14px;font-family:var(--normalFont)}textarea{font-family:var(--normalFont)}b{font-family:var(--boldFont);font-weight:bold}h1,h2,h3,h4,h5,h6,h7{overflow:hidden}h1 a.content-link,h2 a.content-link,h3 a.content-link,h4 a.content-link,h5 a.content-link,h6 a.content-link,h7 a.content-link{background:none;padding:0;border:none}.dsa5 h1,.dsa5 h2,.dsa5 h3,.dsa5 h4,.dsa5 h5,.dsa5 h6,.dsa5 h7{font-family:"Andalus"}.schwierig,.einfach{margin-left:40px;position:relative}.schwierig:before,.einfach:before{content:"";background:url("../../icons/einfach.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:-40px;top:0;height:30px;width:30px;margin-right:5px}.schwierig:before{background-image:url("../../icons/schwierig.webp")}.tabs>[data-tab]>.obfuscateSection{pointer-events:all}.obfuscateSection.pale{opacity:.3}.dsa5 .tab.description.active{display:flex;flex-flow:column;height:calc(100% - 129px);overflow-y:hidden}.dsa5 .tab.description.active .editor{height:100%}.dsa5.item-sheet img{max-height:50px;max-width:50px;margin-top:5px;border-color:rgba(0,0,0,0)}.dsa5.item-sheet img.fullImg{width:100%;max-width:initial;max-height:initial}.dsa5.item textarea{padding:1px 3px}.dsa5 .editor{border:none;overflow:auto;flex-grow:1;display:flex;padding:3px;margin-top:0px;margin-bottom:7px;height:100%;width:100%}.hovermenu{display:inline-block;position:absolute;top:2px;right:3px;z-index:1;cursor:pointer}.hovermenu i{color:var(--border-color);padding:2px}.hovermenu i:hover{color:#3f3636}.notes-box{min-height:70px}.item-box{min-height:30px}.character-sheet nav.sheet-tabs,.creature-sheet nav.sheet-tabs,.npc-sheet nav.sheet-tabs{margin-bottom:20px}.character-sheet .general,.npc-sheet .general,.creature-sheet .general{display:flex;flex-direction:row;width:100%;margin:0}#field-distinguishingmark{width:calc(50% - 15px)}.sheet-header{margin-bottom:10px}.actor .sheet-header .content-link{padding:0;border:none;background:none}table.infoTable{width:100%}table.infoTable tr td:first-child{width:15%}.creature-sheet .headerInput,.sheet-header .headerInput,.npc-sheet .general .headerInput,.sheet-header .headerInput,.character-sheet .general .headerInput,.character-sheet .sheet-header .headerInput{box-sizing:border-box;margin:5px}.npc-sheet .general .headerInput input,.sheet-header .headerInput input,.creature-sheet .headerInput input,.sheet-header .headerInput input,.character-sheet .general .headerInput input,.sheet-header .headerInput input{border:none;border-bottom:1px solid var(--border-color);box-shadow:none;background-color:rgba(0,0,0,0);border-radius:0px;height:auto}.creature-sheet .headerInput span,.sheet-header .headerInput span,.npc-sheet .general .headerInput span,.sheet-header .headerInput span,.character-sheet .general .headerInput span,.sheet-header .headerInput span{color:#333;margin-left:4px;margin-bottom:2px;font-size:12px}.item form .form-group input[type=checkbox]{flex:3}.form-group.full-height .editor,.form-group.full-height .tox{min-height:100px;flex-grow:3;border:1px solid var(--border-color);background-color:rgba(0,0,0,.05);margin:0}.dsa5.item form .form-group.autoHeight div{height:auto}.centerCell{display:flex;align-self:center}form .form-group.autoHeight label{align-self:stretch;vertical-align:middle}form .form-group.full-height label,form .form-group.full-height input{align-self:stretch;vertical-align:middle}form .form-group.full-height textarea{min-height:140px;font-size:14px}form .career .form-group.full-height textarea{min-height:80px}form .form-group.double span{flex:.9;display:inline;text-align:center}form .form-group.double .input-text{flex:1;display:inline;text-align:center}form .form-group.tripple .input-text{flex:2}form .form-group.doubleInput .input-text{flex:1.45}form .form-group div.input-text{padding:0 3px}form .form-group div.input-text ul{padding:0;margin:0}form .form-group.tripple select{flex:1;padding:0}.emphasize{color:#fff;background-color:darkred}.emphasize input::placeholder{color:#fff}input[type=text].emphasize{border-color:darkred}.emphasize2{color:#fff;background-color:#0a59c2}.maxMods{transition:background-color .3s linear}.charimg{width:115px;height:115px;object-fit:contain}.minimumColumnLayout .characteristics-table{min-width:unset}.characteristics-table{flex:6;display:block;min-width:var(--minColumnWidth60)}.characteristics-table.ctab2{flex:4;min-width:var(--minColumnWidth40)}.characteristics-table .table-data,.characteristics-table .table-header{flex:1}.characteristics-table .table-data:first-child,.characteristics-table .table-header:first-child{flex:2}.character-sheet .window-content{padding:0}.window-app .window-content select:not([multiple]) option{color:#fff;background:#1d1c1c}select[multiple] option{background-color:rgba(0,0,0,0)}select[multiple] option:checked{background-color:#12496c;color:#fff}.characteristics-table .table-row{text-align:center;width:100%;border-bottom:none;border-right:none;display:flex}.skills.body{background:#4f6d65;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgba(255, 255, 255, 0) 100%)}.skills.social{background:#85302e;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgba(255, 255, 255, 0) 100%)}.skills.knowledge{background:#4b6585;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgba(255, 255, 255, 0) 100%)}.skills.trade{background:#cda25e;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgba(255, 255, 255, 0) 100%)}.skills.nature{background:#535829;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgba(255, 255, 255, 0) 100%)}.table-title,.label-text{font-weight:bold;font-family:var(--boldFont);background:#bc886f;background:linear-gradient(90deg, rgba(188, 136, 111, 0.8) 0%, rgba(255, 255, 255, 0) 100%)}.bookWizardsheet .window-content .table-title,.dsajournal .window-content .label-text,.bookWizardsheet .window-content table tr:first-child,.dsajournal .window-content table tr:first-child{font-weight:bold;font-family:var(--boldFont);border-bottom-style:double;text-align:center;background:rgba(188,136,111,.3)}.bookWizardsheet .window-content table,.dsajournal .window-content table,.bookWizardsheet .window-content table tr,.dsajournal .window-content table tr,.bookWizardsheet .window-content table td,.dsajournal .window-content table td{border-color:var(--border-color)}.table-title{background:#bc886f;background:linear-gradient(90deg, rgb(188, 136, 111) 0%, rgba(255, 255, 255, 0) 100%);box-shadow:none}.table-title .item-create{display:block;line-height:30px}.table-header{font-weight:bold;font-family:var(--boldFont)}.skill-section{display:flex}.skill-select{display:inline-block}.skill-section .flexcolumn{flex:50%}#combat #combat-round .encounters{color:#444}#combat #combat-round .encounters h4,#combat #combat-round .encounters a{color:#444}#combat-tracker .token-effect{box-shadow:0px 0px 10px #000 inset}.tour .step-title{overflow:initial}.directory .directory-list .directory-item.folder .context{color:#000}.chat-buttons{float:right}.die-attack,.die-mu,.diet-mu:after{background-image:url("../../icons/dice/d20mu.svg");color:#fff}.die-kl,.diet-kl:after{background-image:url("../../icons/dice/d20kl.svg");color:#fff}.die-dodge,.die-parry,.die-in,.die-poison,.die-disease,.diet-in:after{background-image:url("../../icons/dice/d20in.svg");color:#fff}.die-ch,.diet-ch:after{background-image:url("../../icons/dice/d20ch.svg");color:#fff}.die-ff,.diet-ff:after{background-image:url("../../icons/dice/d20ff.svg")}.die-ge,.diet-ge:after{background-image:url("../../icons/dice/d20ge.svg")}.die-ko,.diet-ko:after{background-image:url("../../icons/dice/d20ko.svg")}.die-kk,.diet-kk:after{background-image:url("../../icons/dice/d20kk.svg")}.d20height{line-height:35px}.skills .d20:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;opacity:.35;background-size:contain;background-position:center;background-repeat:no-repeat}.d6.die-AsP{background-position:center 2.5px;background-image:url("../../icons/dice/d6blue.svg")}.d6.die-LeP{color:#fff;background-position:center 2.5px;background-image:url("../../icons/dice/d6red.svg")}.d6.die-KaP{color:#fff;background-position:center 2.5px;background-image:url("../../icons/dice/d6green.svg")}.d6.die-effect,.d6.die-damage{background-image:url("../../icons/dice/d6white.svg");background-position:center 2.5px;color:#fff}.d2.die-damage,.d3.die-damage{background-image:url("../../icons/dice/d6white.svg");background-position:center 2.5px;color:#fff}.dice-tooltip .dice-rolls .roll.die{line-height:35px}.d20,.d6,.d2,.d3{font-family:"GentiumBasic-Bold";width:35px;height:35px;display:inline-block;background-size:contain;line-height:35px;text-align:center;background-position:calc(50% + 1px);background-repeat:no-repeat}.skills .d20{width:22px;height:22px;line-height:22px;font-size:10px;position:relative;display:inline-block}.rollButton .d20,.reactClick .d20{width:30px;height:30px;line-height:30px;font-size:12px;float:right}.rollButton .d20{float:left}.chatmoney{width:15px;height:15px;display:inline-block;background-repeat:no-repeat;background-size:contain}input[type=text].col-Money-D{color:#927c01}input[type=text].col-Money-S{color:#474444}input[type=text].col-Money-K{color:#9c5e5e}input[type=text].col-Money-H{color:#944b32}.Money-D,.money-D{background:url("../../icons/money-D.webp")}.Money-K,.money-K{background:url("../../icons/money-K.webp")}.Money-S,.money-S{background:url("../../icons/money-S.webp")}.Money-H,.money-H{background:url("../../icons/money-H.webp")}.chatLineHeight{line-height:15px;display:inline-block}.cards{padding:3px}.cards>div{margin:1px;flex-grow:1;position:relative}.cards .item{box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset}.cards a{padding:4px;border-radius:2px;width:100%;display:inline-block;text-align:center}.cards a.onUseItem,.cards a.traditionPayCost{width:28px;box-shadow:none}.cards a.onUseItem+a,.cards a.traditionPayCost+a{width:calc(100% - 28px)}.main-row{display:flex;width:100%;flex:1}.row-section{display:flex}.row-section.wrap{flex-wrap:wrap}.row-section .col{flex:100%}.row-section .col.libItem{margin-top:30px;padding:10px;border-radius:10px;background-color:rgba(0,0,0,.05);border:1px solid var(--border-color)}.row-section .col.morph{flex:50%;min-width:var(--minColumnWidth)}.row-section .col.morph40{flex:40%;min-width:var(--minColumnWidth40)}.row-section .col.morph60{flex:60%}.row-section.filterfull .col.morph{flex:100%}.row-section.skills{border:.5px solid var(--border-color);margin:0;padding:2px}.reverseFlex{flex-flow:row-reverse}.reverseColumnFlex{flex-flow:column-reverse}.thinscroll::-webkit-scrollbar{width:6px}.thinscroll{scrollbar-width:thin}.columnFlex{flex-flow:column;align-items:stretch}.skills span{margin:0}.lineheight{line-height:26px}.item .image{height:30px;background-size:contain;background-repeat:no-repeat;background-position:4px 0px}.inventory{line-height:30px}.row-section .col.three{flex:30%}.row-section .col.four{flex:25%}.row-section .col.thirtyfive{flex:35%}.row-section .col.fourtyfive{flex:45%}.row-section .col.five{flex:20%}.row-section .col.eight{flex:12.5%}.row-section .col.ten{flex:10%}.row-section .col.zerofive{flex:5%}.row-section .col.col95{flex:95%}.row-section .col.fourty{flex:40%}.row-section .col.third{flex:30%}.row-section .col.ninety{flex:90%}.row-section .col.eighty{flex:80%}.row-section .col.eighty.fixed{position:relative;max-width:80%;overflow:hidden}.row-section .col.eighty.fixed:hover{overflow:visible;z-index:50}.row-section .col.seventy{flex:70%}.row-section .col.fifteen{flex:15%}.row-section .col.sixty{flex:60%}.row-section .col.seventeen{flex:17.5%}.row-section .col.two{flex:50%;max-width:50%}.max20{max-width:20%}.groupbox{border:1px solid var(--border-color);border-radius:3px;margin:10px 2px;min-height:50px}.groupbox.paddingBox{padding:5px}.header-label{text-align:center;height:100%}.center{text-align:center}.right{text-align:right}.very-small{font-size:10px}.inventory .very-small{line-height:14px}.small{font-size:12px}.selectableRow{border:1px solid #000;cursor:pointer}.row-section.selectableRow.tableOdd:hover{background-color:#fff}.selectableRow:hover{background-color:#fff}.selectableRow.selected{box-shadow:inset 0px 0px 10px 5px rgba(188,136,111,.8)}a.img-entity-link{border:none;background:none;display:block}a.img-entity-link:hover{background:#fff}.row-section .twoColors:nth-child(4n-1),.row-section .twoColors:nth-child(4n){background-color:rgba(0,0,0,.1)}.row-section.rowColors:nth-child(odd),.row-section.tableOdd:nth-child(even){background-color:rgba(0,0,0,.1)}.col.morph .tableOdd:nth-child(even){background-color:rgba(0,0,0,.1)}.row-section.inverseRowtable>.col:nth-child(odd),.row-section.rowtable>.col:nth-child(even){background-color:rgba(0,0,0,.1)}.advance{color:rgba(51,48,41,.6509803922);margin-left:4px;font-size:8px;line-height:8px}.combat-actions{display:flex;gap:5px;flex-wrap:wrap}.combat-actions .combat-action{display:block;color:rgba(51,48,41,0.6509803922);padding:1px 5px;border:1px solid rgba(51,48,41,0.6509803922);border-radius:5px}.row-section .col.combat-item-name{flex-grow:0}.buttons a .fas,.buttons a .fa{border-radius:100%;border:1px solid var(--border-color);padding:2px;color:rgba(51,48,41,.6509803922)}.lighticon{color:rgba(68,68,68,.65)}.button.green{background:#006f3d;background:linear-gradient(90deg, rgb(0, 38, 13) 0%, rgb(0, 111, 61) 100%);position:relative;color:#fff}.grayIcon,.condition-toggle,.condition-edit,.ench,.spells .very-small a .fas,.inventory .very-small a .fas{padding:1px;border:none;color:var(--border-color)}::-webkit-scrollbar{width:14px}::-webkit-scrollbar-track{background:#111}::-webkit-scrollbar-thumb{background:#782e22;border:1px solid #111}.sidebar-tab ::-webkit-scrollbar-thumb{background:#782e22;border:1px solid #111}.sidebar-tab ::-webkit-scrollbar{width:8px}.sheet.journal-entry:not(.dsajournal) .sidebar.directory{background:rgba(0,0,0,.6)}.window-app.dsajournal .editor-content p{margin-right:10px}form.dsa5.item-sheet{padding-left:10px;padding-right:10px}.qOverlay{position:relative}.qOverlay .img{position:absolute;left:0;right:0;top:0;bottom:0;background-repeat:no-repeat;background-position:center;background-size:contain}.qOverlay .overlay{height:100%;width:100%;min-height:200px;line-height:200px;font-size:200px;opacity:.2}.dsalist li{width:100%}.statusEffectMenu,.dsalist li,#chat-form,.browser-item,.effect-change .key,.inputTooltipAvailable,.journalHeader,.tokenQuickHot>ul>li,.bags,.hero,.window-app .window-content{position:relative}#dice-config .window-content{position:unset}#client-settings section.content .settings-list{overflow-y:hidden;max-height:max-content}.form-group.full-height .editor.prosemirror,.editor.prosemirror{min-height:300px}.dsa5.item .item-header{background-size:100% 50px;background-repeat:no-repeat;height:50px}.dsa5.item .item-header h1{margin:0 10%;cursor:pointer}.dsa5.item div.item-header,.dsa5.item .item-header input{text-align:center;padding:8px;background:none;border:none}.item-main .row-section{margin-left:10px;font-size:12px}.item-main .col label,.item-main .col input{border:1px solid var(--border-color)}.item-main label{padding:6px;display:inline-block;width:100%;text-align:center}.item-main.noequipment{margin-top:15px}.dsa5.item .item-main input{margin:0;border-radius:0%;height:29px;margin:0;width:100%;text-align:center}.label-text{border:1px solid var(--border-color);padding:0px 6px;text-align:center}.form-group .label-text i{font-size:10px}.dsa5.item .input-text,.creature-sheet .input-text{border:1px solid var(--border-color);border-radius:0px;height:28px;text-align:center}.dsa5.item select,.creature-sheet select{height:28px;font-family:var(--normalFont);border-radius:0;text-align:center}.dsa5.item section.content{height:calc(100% - 140px)}.dsa5.item section.content .tab.active{height:100%}.directory .directory-list .directory-item.active{border-color:#000}.popoutImage{cursor:pointer}#combat li.combatant .token-initiative .initiative,#combat li.combatant .token-name{text-shadow:none}#combat li.combatant .roll{background-image:url("../../icons/dice/d6white.svg");position:relative}#combat li.combatant .roll:before{position:absolute;content:"6";color:#fff;left:0;right:0;top:-2px;bottom:0}#combat li.combatant .roll:hover{background-image:url("../../icons/dice/d6green.svg")}.app .window-content>section,.app .window-content>form{padding:12px}.app .window-content .dialog-content,.app .window-content .dialog-buttons{padding:12px}.imagebox{position:relative;height:95px;background-size:cover;display:inline-block}.itemLibrary .detailBox span,.itemLibrary .detailBox input{margin:1px 2px;width:calc(100% - 4px)}.cards-notification .icon,.didYouKnow img,.app.sidebar-popout,.dsa5.item h1,.dsajournal img,.itemLibrary img,.charimg,.dsa5.post-item img{border:none}.dsajournal .heading.h3 a:before{content:"";font-family:"Font Awesome 6 Pro";font-weight:900;color:darkred;position:relative;left:-5px}.defender video{margin:5px 25%;border:none}.attacker video,.attacker img{margin:5px 25%;border:none}.defender img{margin:5px 25%;border:none}.sender-image{max-width:30px;height:30px;border:none}.message-sender.with-image{line-height:30px}#scenes .scene h3{text-shadow:none}#scenes .scene h3 a{border:1px solid #403d3d;background-color:rgba(0,0,0,.6);color:#fff;border-radius:10px;padding:0px 10px}#combat li.combatant.active{background:rgba(0,0,0,.1)}li.folder{margin-left:8px}.chatModifiers .expand-mods{float:right;font-size:10px}.expandDetails.shown{display:block}.expandDetails.shown .filterHide{display:block}.expandDetails ul{margin:0 0 .5em 0;list-style-type:none}.expandDetails li{display:inline-block;font-size:12px;margin-right:5px}.mayorAttributeBox{margin-top:10px;max-width:150px}.mayorAttributeBox input,.mayorAttributeBox span{width:35px;display:inline-block}.showAll .notLearned{display:flex}.setCustomPrice.edit .priceTag,.setCustomPrice .customPriceTag{display:none}.minimumColumnLayout .notOnMinimum,.onlySingleColumn,.singleColumnLayout .onlyMultiColumn,.tokenQuickHot .subbuttons .secondary.shown.dsahidden,.domainToggle,.locktrue .advance,.privateMessageIndicator .fas,.chatIndicator .fas,.combatant:not(.active) .aggroButton,.tocCollapsing.expanded .col.three *,.tokenQuickHot .subbuttons .secondary:not(.shown),.hero .details{display:none}[data-hide-damage=true] .damageSecret,[data-hide-damage=true] .die-damage{display:none}.dsahidden,.roll-dialog-tag,.expandDetails{display:none}.chatModifiers ul,.chatModifiers div{display:none}.generationWizard [data-tab=description] h2,.notLearned,.showAll .filterHide,.statusEffectMenu .filterHide,.filterHide{display:none}.singleColumnLayout .onlySingleColumn,.setCustomPrice.edit .customPriceTag{display:block}.row-section.skills.searchbox{margin-bottom:10px;font-weight:normal;color:#0e0c0c}.row-section.skills.searchbox input{display:inline-block;width:calc(100% - 20px)}input[type=search]{width:calc(100% - 2px);min-width:20px;height:26px;background:rgba(0,0,0,.05);padding:1px 3px;margin:0;color:#191813;font-family:inherit;font-size:inherit;text-align:inherit;line-height:inherit;border:1px solid #7a7971;border-radius:3px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.healthbar{height:24px;border:1px solid #615757;box-sizing:border-box;overflow:hidden;box-shadow:inset 0 0 10px #fff;position:relative;background:rgba(78,70,70,.5411764706)}.barLeft{border-top-left-radius:10px;border-bottom-left-radius:10px;border-right-width:0px}.barRight{border-top-right-radius:10px;border-bottom-right-radius:10px}.barRight.middle{border-radius:0px;border-right:none}.barRight .bar{width:calc(100%*var(--a)/var(--b))}.barLeft .bar{left:calc(100%*(1 - var(--a)/var(--b)));width:calc(100%*var(--a)/var(--b))}.barLeft.soloBar .bar{left:0;width:calc(100%*var(--a)/var(--b))}.bar{height:24px;width:100%;box-shadow:inset 0 0 10px #fff;position:absolute;z-index:0;top:0px;left:0px;transition:width .1s ease-in-out}.soloBar{border-top-right-radius:10px;border-bottom-right-radius:10px;border-right-width:1px}.barLabel{height:22px;padding:1px;text-align:center;box-sizing:border-box;color:#fff;position:relative;z-index:1;text-shadow:0px 0px 3px #000}.barLabel input{height:22px;line-height:22px;width:30px;display:inline-block;border:none;padding:0;margin:0;color:#fff;box-shadow:none;background:none;text-shadow:0px 0px 3px #000}.barLabel input:focus{box-shadow:none}.barLabel input:hover{background-color:rgba(0,0,0,.3)}.barLabel span{width:30px;display:inline-block}.soloBar .LeP{background:linear-gradient(90deg, rgb(101, 7, 7) 0%, rgb(207, 14, 14) 100%)}.LeP{background:#cf0e0e;background:linear-gradient(90deg, rgb(207, 14, 14) 0%, rgb(101, 7, 7) 100%)}.tempLeP{background:#fc8f2a;background:linear-gradient(90deg, rgb(252, 143, 42) 0%, rgb(182, 97, 1) 100%)}.AsP{background:#0e90cf;background:linear-gradient(90deg, rgb(11, 11, 217) 0%, rgb(14, 144, 207) 100%)}.KaP{background:#93cf0e;background:linear-gradient(90deg, rgb(4, 162, 54) 0%, rgb(147, 207, 14) 100%)}.schip{width:25px;height:25px;background-size:contain;background-repeat:no-repeat;display:inline-block}.schip.tiny{width:15px;height:15px}.schip:active,.schip:focus{box-shadow:none;border:none}.emptySchip{background-image:url("../../icons/gray_schip.webp")}.fullSchip{background-image:url("../../icons/schip.webp")}.sheet nav.sheet-tabs .item.active,.tabs .item.active{text-shadow:0 0 10px #bc886f,0 0 10px #bc886f;border-bottom:3px solid var(--border-color)}.sheet nav.sheet-tabs .item{padding:8px 12px 5px 12px;border-bottom:3px solid rgba(0,0,0,0)}.dieButton span{border:1px solid rgba(0,0,0,0)}.dieButton.dieSelected span{border:1px solid #000}.dsa5.item-sheet .statusEffect img,.statusEffect img{border:none;background:rgba(0,0,0,.3);height:28px;width:28px;margin:0}.diseases .statusEffect img{height:20px;width:20px;border:1px solid rgba(0,0,0,0)}.diseases .statusEffect img:hover{border-color:#000}.statusEffect{height:34px;line-height:34px}.statusEffectMenu .status-create{line-height:26px;display:block}.statusEffectMenu ul{display:none;position:absolute;right:-10px;top:-10px;width:224px;border:1px solid #000;background:rgba(0,0,0,.7);padding:8px;margin:0;min-height:90px}.statusEffectMenu li.search{display:block;width:100%;margin-bottom:10px}.statusEffectMenu li.search input{color:#fff;width:80%}.statusEffectMenu li.search a{color:#fff;border:1px solid #fff;padding:4px 8px;border-radius:2px}.form-group input::placeholder{color:#adaaaa}.statusEffectMenu li.search input::placeholder{color:#adaaaa}.statusEffectMenu li.search:hover{border-color:rgba(0,0,0,0)}.opposed-message{text-align:center}.statusEffectMenu li{display:inline-block;width:30px;height:30px;border:1px solid rgba(0,0,0,0)}.statusEffectMenu li:hover{border:1px solid #000}.statusEffectMenu img{width:30px;height:30px;border:none}.itemLibrary{padding:10px}.itemLibrary nav{line-height:20px;margin-bottom:10px}.itemLibrary nav img{position:relative;top:3px;margin-right:3px;min-width:20px}.itemLibrary ul{display:flex;flex-wrap:wrap;width:100%}.itemLibrary ul li.browser-item{list-style-type:none;flex:24%;display:inline-block;display:flex;line-height:26px;min-width:120px}.itemLibrary ul li.browser-item .priceDrag{padding-top:2px;min-width:30px;line-height:10px;font-size:10px;cursor:grab;text-overflow:ellipsis;overflow:hidden}.itemLibrary .item-list li.browser-item{flex:49%;border:1px solid #ddd;min-width:240px}.itemLibrary .item-list li.browser-item a{display:inline-block;padding:2px;width:calc(100% - 44px);height:40px;line-height:36px}.itemLibrary .item-list li.browser-item .image{height:40px;width:40px;display:inline-block;background-size:contain}.itemLibrary .categories li label{text-overflow:ellipsis;overflow:hidden;min-width:80px}.lineheight2{line-height:26px}.lineheight2 span{display:inline-block;vertical-align:middle;line-height:12px}.itemLibrary .item-list li a span{display:inline-block;vertical-align:middle;line-height:12px}.dsalist{list-style-type:none}.sheet.journal-entry.dsajournal .pages-list .directory-item .page-heading .page-heading{margin-left:10px}.dsajournal .heading.h2 a:before,.dsalist li::before{content:"";display:inline-block;height:10px;width:20px;position:absolute;left:-20px;top:2px;background-image:url("../../icons/dsalist.webp");background-size:contain;background-repeat:no-repeat}.chatImgPreview .image{width:60px;height:60px;background-size:contain;background-repeat:no-repeat;background-position:center;margin:0 auto}.dsajournal .heading.h2 a:before{position:relative;width:15px;left:-5px}.item .image.extension{height:auto;background-position:center;margin:4px}.extension{background-image:url("../../icons/categories/Spellextension.webp")}.extensions p{line-height:15px}.card-content input{width:30px;display:inline-block}.window-app.largeDialog .window-content .dialog-buttons{flex-grow:0;display:flex}.largeDialog button.default{background:rgba(0,0,0,.05);border:2px groove #c9c7b8}.largeDialog .row-section label{flex:1}.largeDialog h2{margin-top:20px}.largeDialog h3{margin-top:10px}.largeDialog .sheet-tabs{height:32px;flex:0 0 32px;margin:4px 0;border-top:1px solid #b5b3a4;border-bottom:1px solid #b5b3a4}.largeDialog .sheet-tabs .item{padding:8px 12px 5px 12px;border-bottom:2px solid rgba(0,0,0,0)}.largeDialog .show-item{display:inline-block;font-size:10px;border:1px solid #a09494;border-radius:100%;width:20px;height:20px;line-height:18px;color:#5a5a5a;text-align:center}.largeDialog img{border:none;margin-bottom:10px}.largeDialog .error{width:100%}.largeDialog .error p{background:#970808;color:#fff}.chatButton,.roll-button{border:1px solid var(--border-color);padding:2px;border-radius:3px;box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset;display:inline-block}.chatButton img{display:inline-block;margin:0;margin-right:4px;width:15px;height:15px;background:#000;position:relative;top:2px}h2 .chatButton img{width:30px;height:30px;top:5px}h2 .chat-condition,h2 .chatButton{width:100%;border:none;box-shadow:none;background:none}.chatButton i,.roll-button i{margin-right:1px}.botch-roll{color:darkred}.detailbox{border:1px solid var(--border-color);padding:5px}.quickfind{position:absolute;background-image:url("../../icons/backgrounds/quickfind.webp");background-size:100%;background-repeat:no-repeat;background-position:top;padding:15px;padding-top:74px;bottom:100%;width:100%;color:#000;line-height:26px}.quickfind ul{list-style-type:none;margin:0}.quickfind li{padding:0px 4px;display:inline-block;border:2px solid rgba(0,0,0,0);width:100%}.quickfind li:hover{background-color:rgba(0,0,0,.2);text-shadow:none}.quickfind li:before{height:22px;background-position:center}.quickfind li.focus{border:2px solid #946603;border-radius:2px}.fokusregel{width:100px;float:right;background-image:url("../../icons/fokus.webp");background-size:100%;background-repeat:no-repeat;height:72px;text-align:center;line-height:72px;font-family:"Andalus";color:darkred;position:relative;margin-bottom:10px;font-weight:bold}.fokusregel:after{position:absolute;font-size:28px;bottom:0;left:0;right:0}.fokusregel.f1:after{content:"I"}.fokusregel.f2:after{content:"II"}.magazinContainer{display:inline-block;width:3px}.initTracker .item-structure{top:-102%;border-color:#0e0c0c}.item-structure{border:.5px solid var(--bg-color);height:100%;width:4px;position:relative}.item-structure .inner{position:absolute;left:0;right:0;bottom:0;height:calc(100%*var(--b)/var(--a));background-color:#20ca02}a.documentName-link,a.inline-roll{background:var(--bg-color)}.whisper .privateMessageIndicator .fas{display:inline-block;color:#730707}.blind .chatIndicator .fa-eye-slash{display:inline-block;color:#2248a2}#token-hud .attribute.bar1 input{border:1px solid #e60c0c}#token-hud .attribute.bar2 input{border:1px solid #659db5}#token-hud .attribute.bar3{position:absolute;top:-45px}#token-hud .attribute.bar3 input{border:1px solid #7cd000}.specAbsContainer{margin-left:20px;padding:10px}.specAbs{border:1px solid var(--border-color);box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset;border-radius:2px;line-height:20px;color:#888;position:relative}.specAbs>div{padding:3px}.specAbs.active{color:inherit}.specAbs .variantChange{text-align:center;border:1px solid var(--border-color);border-radius:50%;background-color:#5b260c;position:absolute;left:-16px;top:calc(50% - 10px);width:20px;height:20px;line-height:20px;color:#fff;padding:0;transition:all ease-in-out .3s}.specAbs .variantChange:hover{background-color:#000}.noBorder,.bookWizardsheet .window-content .table-title.noBorder,.dialog-buttons img,.result-image{border:none}.bookWizardsheet .sheet.journal-entry .pages-list .heading-link{line-height:inherit;font-size:unset}.bookWizardsheet .sheet.journal-entry .pages-list .headings{display:block;font-family:var(--normalFont);margin:6px 0 0 3px;--level-indent: 8px}.bookWizardsheet .sheet.journal-entry .pages-list .headings li{line-height:inherit;height:auto}.bookWizardsheet .sheet.journal-entry .pages-list .headings li:last-child{margin-bottom:.1rem}.libraryImg,.extImg{background-image:url("../../icons/categories/ability_combat.webp");background-size:contain;background-repeat:no-repeat;background-position:center}input[type=checkbox].smallBox{width:15px;height:15px}.specImg{background-image:url("../../icons/categories/ability_combat.webp");background-size:contain;background-repeat:no-repeat;background-position:center}.specImg.ab_1{background-image:url("../../icons/categories/Combat_Skill.webp")}.specImg.ab_2{background-image:url("../../icons/categories/Skill.webp")}.specImg.ab_3{background-image:url("../../icons/categories/Armor.webp")}.specImg.ab_4{background-image:url("../../icons/categories/ability_general.webp")}.libraryImg{background-image:url("../../icons/backgrounds/library.webp");margin-top:50px;height:300px}.extImg{background-image:url("../../icons/categories/Spellextension.webp")}.embeddedItemDrag,.rollTarget{cursor:pointer}.specAbs:hover{cursor:pointer}.specAbs.active{border-color:#cf1e1e}#chat-controls .control-buttons{flex:0 0 72px}.centerMargin,.loader{margin:0 auto}.libItem .compendium{font-size:10px;color:#696767;line-height:10px;text-align:center;pointer-events:none}.browser-item:hover{box-shadow:inset 0px 0px 5px #000}.browser-item a:hover{text-shadow:none}.browser-item .compendium{position:absolute;bottom:2px;right:2px;font-size:10px;color:#696767;line-height:10px}.chat-condition,.item-sheet .chatButton,.dsajournal .chatButton{padding:0px 4px;border:1px solid #4b4a44;border-radius:2px;white-space:nowrap;word-break:break-all;box-shadow:none;background:var(--bg-color);display:inline}.chat-condition img,.item-sheet .chatButton img,.dsajournal .chatButton img{top:3px}.obfuscationBtn:nth-of-type(2){display:none}.chatpaperfield{border-image:url("../../icons/backgrounds/chatpaper_v45.webp");clear:both;border-image-width:24px;border-image-slice:70 70 70 fill;margin:25px 0px;padding:20px 20px 20px 30px}.maskfield{position:relative;clear:both;padding:70px 30px 30px 30px;margin:34px 0px;border-image:url("../../icons/backgrounds/maskfield_v45.webp");border-image-width:60px 20px 60px 20px;border-image-slice:90 30 90 30 fill}.citefield{position:relative;clear:both;padding:30px;margin:25px 0px;border-image:url("../../icons/backgrounds/cite_v45.webp");border-image-width:60px 20px 60px 20px;border-image-slice:90 30 90 30 fill}.dsajournal .window-content .maskfield tr:first-child{background:none}.nobr{white-space:nowrap}select.noAppearance{-webkit-appearance:none;appearance:none;height:auto;text-align:center;width:100%}.aggroButton{border-radius:100%;padding:3px;display:block;width:24px;position:absolute;left:-20px;height:24px;margin-top:12px;border:1px solid darkred;background-color:#fff;cursor:pointer;box-shadow:2px 2px 6px #000;z-index:1}.aggroButton:hover{background-color:#d1d1ca}#combat-popout.combat-sidebar li.combatant .token-initiative .initiative,#combat-popout.combat-sidebar li.combatant .token-name{text-shadow:none}#combat-popout .aggroButton{left:-1px}.subweapon{margin-left:15px}.adventurePoints .row-section:hover{background-color:rgba(0,0,0,.2)}.adventurePoints .fa-plus,.adventurePoints .fa-angles-up{color:green}.adventurePoints .fa-minus,.adventurePoints .fa-angles-down{color:darkred}.effect-change .key input{width:90%}.effect-change .selMenu+.select2{width:8%;background:#efe4e4;position:absolute}.effect-change .selMenu+.select2 .select2-selection__rendered{width:0px;padding:0}.effect-change .selMenu+.select2.select2-container--open{width:100%;left:0}.effect-change .selMenu+.select2.select2-container--open .select2-selection__rendered{width:100%;padding:0}.gearDamaged,.resistEffect,.applyEffect,.applyTableEffect,.placeTemplate,.smallChatButton{width:100%;padding:4px;height:100%;line-height:unset;font-size:11px}.adventureWizard .fa-toggle-on,.adventureWizard .fa-check{color:green}.adventureWizard .fa-toggle-off,.adventureWizard .fa-times{color:darkred}.adventureWizard .toc{list-style-type:none;padding-left:4px}.adventureWizard .toc ul{list-style-type:none;padding-left:0px}.tocCollapsing.expanded .col.three{flex:20px}.tocCollapsing.expanded .col.seventy{flex:calc(100% - 20px)}.tocCollapserBox{position:relative;height:0}.tocCollapser{position:absolute;top:30px;left:-5px;font-size:10px}.getChapter.selected,.subChapter.selected{font-weight:bold}.inputTooltipAvailable:after{content:"*";position:absolute;right:3px;top:3px;font-size:10px;color:#82817d}.subChapter{font-weight:normal;font-family:var(--normalFont)}.toc ul li{display:block;padding:4px}.toc ul li:before{color:darkred;margin-right:5px}.adventureWizard .cover{width:98%;position:relative}.scrollable{overflow-y:auto;max-height:100%}.adventureWizard{max-height:100%}.adventureWizard>div{max-height:100%}.adventureWizard .chapter{padding:8px}.adventureWizard .chapter *{user-select:text}.adventureWizard .toc{scrollbar-width:6px}.adventureWizard .toc::-webkit-scrollbar{width:6px}.adventureWizard .picto{height:40px;line-height:40px}.adventureWizard .breadcrumbs{display:flex;background-color:rgba(202,183,180,.3803921569);border-radius:5px;border-bottom:1px solid #b5b3a4;border-top:1px solid #b5b3a4}.adventureWizard .breadcrumbs>div{flex:1;max-width:150px;min-width:150px;border-radius:5px;padding:3px;margin:1px;box-shadow:inset 0px 0px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .3s ease-in-out;text-align:center}.adventureWizard .breadcrumbs>div:hover{cursor:pointer;background-color:rgba(14,12,12,.3);color:#fff}.picto.ten{max-width:10%}.picto.fourty{max-width:40%}.journalHeader .jrnIcons{color:#5c5c5c;float:right}.journalHeader .jrnIcons a{display:inline-block;margin-right:10px}.position-relative{position:relative}.combatant-advanced{flex:0 0 48px;position:relative;height:50px}.combatant-advanced i{position:absolute;bottom:0;right:0;color:#000;width:14px}.combatant-advanced .actions,.combatant-advanced .ongoing{font-size:10px;background:#6f3900;width:14px;height:15px;padding:0;margin:0;line-height:15px;text-align:center;color:#fff;border-radius:50px;position:absolute;right:0;top:0}.combatant-advanced .actions{left:0;right:auto;background:#6d0400}.initTracker .combatant-advanced .actions{right:0;left:unset}.initTracker .combatant-advanced .ongoing{bottom:4px;top:unset}.combatant-advanced i.reversed{transform:scaleX(-1)}.combatant-advanced i.def:after{content:attr(data-defenseCount);position:absolute;left:0;right:0;text-align:center;z-index:1;color:#fff;font-size:10px;line-height:12px}.initTracker .combatant-advanced{height:var(--iniTrackerSize)}.initTracker .combatant-advanced i{left:4px;bottom:4px;right:unset}.tinyEntityLink a{width:22px;overflow:hidden;font-size:12px;float:right;overflow:hidden;border:1px solid #000}.tokenQuickHot{position:absolute;top:0;height:var(--tokenQuickhotsize);left:5px;right:7px;z-index:-2;transition:transform .3s ease-in-out}.tokenQuickHot ul{font-size:0;display:inline-block}.tokenQuickHot.expanded{transform:translateY(-45px)}.tokenQuickHot .subbuttons{position:absolute;z-index:2}#controls ol li.control-tool[data-tool=targetUser]{color:#609ec6}.tokenQuickHot .direction0 .subbuttons{bottom:var(--tokenQuickhotdistance)}.tokenQuickHot .direction1 .subbuttons{right:var(--tokenQuickhotdistance)}.tokenQuickHot .direction2 .subbuttons{top:var(--tokenQuickhotdistance)}.tokenQuickHot .direction3 .subbuttons{left:var(--tokenQuickhotdistance)}.tokenQuickHot .direction1 .dragHandler,.tokenQuickHot .direction3 .dragHandler{height:14px;width:var(--tokenQuickhotsize);line-height:14px}.initTracker .dragHandler,.tokenQuickHot .dragHandler{width:14px;height:var(--tokenQuickhotsize);background:rgba(0,0,0,.2);text-align:center;line-height:var(--tokenQuickhotsize);float:right}.initTracker .dragHandler:hover{color:#fff}.tokenQuickHot .dragHandler:hover{color:#fff}.tokenQuickHot a{box-shadow:inset 0px 0px 10px #403014;color:#fff;padding:2px;margin-bottom:2px}.tokenQuickHot .effect>div{background-color:rgba(0,0,0,.3)}.initTracker li,.tokenQuickHot li{background-color:rgba(0,0,0,.5);display:inline-block;font-size:14px;width:var(--tokenQuickhotsize);height:var(--tokenQuickhotsize);border:1px solid #000;border-radius:3px;pointer-events:all;background-size:cover;box-shadow:inset 0px 0px 5px #636363;background-repeat:no-repeat;position:relative;box-sizing:border-box}.tokenQuickHot li input{color:#fff}.tokenQuickHot li .subbuttons li{width:200px;height:28px;line-height:28px}.initTracker .waitingTackerList li{width:calc(var(--iniTrackerSize)*.5);height:calc(var(--iniTrackerSize)*.5)}.waitingTackerList{position:absolute;top:calc(var(--iniTrackerSize)*-0.5);left:30px;z-index:-1}.initTracker .iniItem.newRound,.initTracker .newRound{border-color:#496fd7;background-color:rgba(73,111,215,.1764705882);box-shadow:inset 0px 0px 10px #496fd7;border-top-left-radius:0px;border-bottom-left-radius:0px}.initTracker .iniItem.newRound .iniNumber,.initTracker .newRound .iniNumber{border-top-left-radius:0px;border-bottom-left-radius:0px}.initTracker .turnRound{padding:2px;border-radius:100%;width:21px;display:inline-block}.initTracker .newRound .turnRound{background-color:#496fd7}.initTracker .waitTitle{background-image:none}.initTracker .waitTitle i{float:left;width:100%;line-height:calc(var(--iniTrackerSize)*.5);text-align:center;color:#fff}.initTracker li{box-shadow:none;border:1px solid rgba(0,0,0,0);background-color:rgba(0,0,0,0);cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:10px}.initTracker li .roll:before{position:absolute;content:"6";color:#fff;left:0;right:0;top:5px;bottom:0;text-align:center}.initTracker .token-initiative{position:absolute;bottom:-20px;left:0;right:0}.initTracker .aggroButton{left:0;right:0;margin:0 auto 0;bottom:0}.initTracker li .roll{position:relative;display:block;width:30px;height:30px;background:url("../../icons/dice/d6white.svg") no-repeat 50% 50%;background-size:auto;background-size:35px;margin:0 auto}.initTracker li.active{border-color:#fff;box-shadow:inset 0px 0px 10px #fff}.initTracker li.defeated,.initTracker li.hidden{opacity:.5}.initTracker li.defeated{background-size:75% 75%;background-position:center}.iniTrackerList{margin:0;padding:0;display:inline-block}.initTracker .dragHandler{width:15px;background:none;border:none;line-height:var(--iniTrackerSize)}.initTracker li{width:var(--iniTrackerSize);height:var(--iniTrackerSize)}#hotbar .skillItems li:hover,.tokenQuickHot li:hover{border:1px solid red;cursor:pointer}.tokenStatusEffects .dialog-content{height:100%;min-height:calc(100% - 24px)}.tokenQuickHot .tokenHotbarInner{opacity:var(--tokenHotbarOpacity);transition:opacity .3s ease-in-out}.tokenQuickHot .tokenHotbarInner:hover{opacity:1}.tokenQuickHot .tokenHotbarInner .skillgm.body,.tokenQuickHot .tokenHotbarInner .skill.body{background:#4f6d65;box-shadow:none;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.social,.tokenQuickHot .tokenHotbarInner .skill.social{background:#85302e;box-shadow:none;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.knowledge,.tokenQuickHot .tokenHotbarInner .skill.knowledge{background:#4b6585;box-shadow:none;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.trade,.tokenQuickHot .tokenHotbarInner .skill.trade{background:#cda25e;box-shadow:none;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.nature,.tokenQuickHot .tokenHotbarInner .skill.nature{background:#535829;box-shadow:none;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner div{background-size:cover;height:100%;width:100%;position:absolute;color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}.tokenQuickHot .tokenHotbarInner input{height:var(--tokenQuickhotsize);display:block;width:100%;margin:0;float:left;text-align:center;font-size:20px;border:none}.tokenQuickHot .tokenHotbarInner .itdarkness{width:calc(var(--tokenQuickhotsize)*2);position:relative}.tokenQuickHot .tokenHotbarInner .itdarkness input{height:auto;position:absolute;bottom:0}.tokenQuickHot .tokenHotbarInner .itdarkness i{position:absolute;top:4px;left:6px;color:#8a6100}.tokenQuickHot .tokenHotbarInner .itdarkness i.fa-moon{color:#05235b;right:6px;left:unset}.tokenQuickHot .tokenHotbarInner .subbuttons .combatTooltip{height:35px;line-height:35px;text-align:center;width:100px}.tokenQuickHot .tokenHotbarInner .subbuttons div{background-size:contain;background-repeat:no-repeat;background-position:center;width:30px;position:inherit;float:left}.tokenQuickHot .tokenHotbarInner .subbuttons label{display:inline-block;cursor:pointer;overflow:hidden;max-width:155px;text-overflow:ellipsis;white-space:nowrap}.tokenQuickHot li span{position:absolute;top:-25px;left:-73px;background:#1d1c1c;width:180px;display:inline-block;color:#fff;padding:5px;text-align:center;border-radius:4px}.tokenQuickHot li .fa{font-size:calc(var(--tokenQuickhotsize) - 15px);line-height:var(--tokenQuickhotsize);text-align:center}.tokenQuickHot li.spell{box-shadow:inset 0px 0px 10px #121092}.tokenQuickHot li.skill{box-shadow:inset 0px 0px 10px #0d813e}.window-app.initTracker .window-header,.window-app.tokenQuickHot .window-header{display:none}.window-app.initTracker,.window-app.tokenQuickHot{padding:0}.initTracker .controls{display:inline-block;width:29px}.initTracker:hover .iniDetailsList{display:block}.iniDetailsList{margin:10px 29px 0 29px;padding:0;display:none}.iniDetailsList li{text-align:center;color:#fff;background:none}.iniDetailsList li .iniNumber{background:rgba(0,0,0,.5);border-radius:5px}.iniDetailsList .token-effects{display:flex;flex-wrap:wrap;padding:5px 0;min-height:30px}.iniDetailsList .token-effects img{width:20px;border:none;box-shadow:0px 0px 10px #000 inset}.initTracker .hoverbuttons{color:#fff;position:absolute;right:0;top:25%;opacity:0;transform:opacity .3s}.initTracker .combat-control{min-width:20px;display:inline-block}.initTracker li:hover .hoverbuttons{opacity:1}.initTracker .controls i{color:#fff;background:rgba(0,0,0,.7);border-radius:5px}.initTracker .controls.right{text-align:right}.initTracker button{line-height:21px}.tokenHotbarInner>ul>li.effect>div:before{font-family:"Font Awesome 5 Free";font-weight:900;content:""}.window-app.initTracker::after,.window-app.initTracker .window-content{background:none;margin:0;padding:0;overflow:visible}.window-app.tokenQuickHot::after,.window-app.tokenQuickHot .window-content{background:none;margin:0;padding:0;overflow:visible}.window-app.initTracker::after,.window-app.tokenQuickHot::after{content:none}.ench-fw{position:relative;top:-3px}.bags .slot{width:50px;height:50px;background-size:contain;border:1px solid var(--border-color);background-color:#faebd7;background-repeat:no-repeat;background-position:center;border-radius:5px;cursor:pointer}.bags .slot.deactivated{opacity:.5}.bags .slot:hover{border-color:#0a59c2}.dsajournal h4{color:#853c26;font-weight:bold;font-size:1.1em}.itemInfo{position:absolute;display:none;width:200px;border:1px solid var(--border-color);padding:5px;background-color:rgba(0,0,0,.8);color:#fff;border-radius:5px}.bagUsage{position:relative;border:1px solid var(--border-color);margin:5px;background-color:rgba(14,12,12,.1)}.bagUsage .fillage{position:absolute;top:0;left:0;bottom:0;background-color:#40a9dd}.bagUsage .fillage.exceeded{background-color:#d42d2d}.bagUsage .fillText{position:relative;z-index:1}.fa-dsa5-player,.fa-dsa5{position:relative;width:25px;height:25px}.fa-dsa5-player:before,.fa-dsa5:before{content:"";background-image:url("../../icons/categories/DSA-Auge.webp");background-size:contain;background-repeat:no-repeat;background-position:center;position:absolute;left:0;right:0;top:0;bottom:0}.fa-dsa5-lighthelper:before{background-image:url("../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp")}.fa-dsa5-foodsearch:before{background-image:url("../../icons/talents/Lebensmittelbearbeitung.webp")}.fa-dsa5-adci:before{background-image:url("../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp")}.fa-dsa5-plantHelper:before{background-image:url("../../../../modules/dsa5-herbarium/icons/plant/Alraune.webp")}.fa-dsa5-player:before{background-image:url("../../icons/categories/DSA-Auge-Spieler.webp")}.columnFlex{display:flex;flex-direction:column}.verticalFlex{display:flex;flex-direction:row;position:relative}.verticalFlex .bar{flex:1;height:30%}.verticalFlex .bar.AsP{top:30%}.verticalFlex .bar.KaP{top:60%}.bar-wounds.swarmcount:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 98%, rgba(0, 0, 0, 0.3) 100%);background-size:calc(100%/var(--swarm) + .1%) 100%;background-repeat:repeat-x}.hero.victim{box-shadow:inset 0px 0px 10px #8a0202}.smallBoxItem,.hero .actorItem{display:inline-block;padding:2px;border:1px solid var(--border-color);line-height:12px;border-radius:2px}.domainsPretty li{display:inline-block;border:ridge 2px #daa520;line-height:18px;border-radius:2px;margin:3px;padding:0px 8px;box-shadow:1px 1px 3px #000;background-color:#f4da99}.domainsPretty li.magical{border-color:#0a59c2;background-color:#c0dbff}.domainsPretty li.blessed{border-color:#006f3d;background-color:#bae1b1}#combat li.combatant .token-resource{color:#777171}.progress{width:27px;height:27px;line-height:27px;background:none;margin:0 auto;box-shadow:none;position:relative;float:right}.progress>span{width:50%;height:100%;overflow:hidden;position:absolute;top:0;z-index:1}.progress .progress-left{left:0}.progress .progress-bar{width:100%;height:100%;background:none;border-width:2px;border-style:solid;position:absolute;top:0}.progress .progress-left .progress-bar{left:100%;border-top-right-radius:13.5px;border-bottom-right-radius:13.5px;border-left:0;-webkit-transform-origin:center left;transform-origin:center left;transform:rotate(var(--transformLeft))}.progress .progress-right{right:0}.progress .progress-right .progress-bar{left:-100%;border-top-left-radius:13.5px;border-bottom-left-radius:13.5px;border-right:0;-webkit-transform-origin:center right;transform-origin:center right;transform:rotate(var(--transformRight))}.progress .progress-value{width:90%;height:90%;border-radius:50%;color:#44484b;font-size:8px;line-height:27px;text-align:center;position:absolute;top:5%;left:5%}.progress.blue .progress-bar{border-color:#0e4f79}.patchviewer h1{margin:0}.patchviewer h1 a{display:block;float:left;color:#000}.patchviewer h1 img{width:50px;margin:0;margin-right:15px;float:left}.patchviewer .table-title{border:1px solid var(--border-color);border-radius:10px}.noscrollWizard .content{overflow-y:hidden}.skill-test .targets{align-items:center;justify-content:center;margin-bottom:20px}.skill-test .targets .image{width:40px;height:40px;position:relative}.multipleTarget{margin-left:25px}.missingTarget{margin-left:25px}.missingTarget div i{color:darkred}.skill-test .targets div i{color:darkred}.targets .addTarget{margin-left:20px}.targetChoser .combatant{border:1px solid rgba(0,0,0,0)}.targetChoser .combatant.hidden{opacity:.5}.targetChoser .combatant:hover{background:rgba(0,0,0,.1)}.targetChoser .combatant.selectedTarget{border-color:#000}.multipleTarget i{color:#e68044}.skill-test .targets .image i{position:absolute;z-index:1;bottom:0;left:0;top:0;right:0}.libButton .label-text i{font-size:12px}.libButton .fa-toggle-off{color:darkred;margin-right:6px}.libButton .on .fa-toggle-off{color:green}.libButton .on .fa-toggle-off:before{content:""}.searchMatch{background-color:#ff0}.searchLines{position:absolute;top:0px;right:0;width:16px;bottom:0;pointer-events:none}.searchLines .marker{position:absolute;width:100%;height:2px;background-color:#fff;pointer-events:none}.tinyHudIcons{border:1px solid #000;margin-left:1px;width:40px;border-radius:5px;height:40px;background-image:url("../../icons/backgrounds/macrobg.webp");background-repeat:no-repeat}.advancedSearch .groupbox{margin:0;margin-right:10px;padding:3px}.advancedSearch .groupbox select{width:100%}.advancedSearch .groupbox .form-group{margin-top:4px}.advancedSearch .cbParent{line-height:24px}.advancedSearch .cbParent label{text-overflow:ellipsis}.advancedSearch input[type=checkbox]{float:right}input[type=checkbox].autoCheckbox{width:auto;height:auto}.slot,.gearD{z-index:0;position:relative}.item .image{position:relative}.item .image.rar,.item .image.common{z-index:0}.item .image .overlayicon{position:absolute;top:0;left:0;color:#7d5900;text-shadow:0 0 1px #fff}.gearD:before{content:"";background-size:contain;background-repeat:no-repeat;position:absolute;width:12px;height:12px;left:25px;bottom:0;z-index:1}.damaged1:before{background-image:url("../../icons/damaged1.webp")}.damaged2:before{background-image:url("../../icons/damaged2.webp")}.damaged3:before,.damaged4:before{background-image:url("../../icons/damaged3.webp")}.slot div{height:100%;background-size:contain}.damaged1 .slot.rar:after,.slot.common:after{content:"";background-image:url("../../icons/backgrounds/common.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:0;right:0;bottom:0;top:0;z-index:-1;opacity:.4}.image.rar:after,.image.common:after{content:"";background-image:url("../../icons/backgrounds/common.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:0;right:0;bottom:0;top:0;z-index:-1;opacity:.4}.image.rar:after,.image.common:after{background-position:4px 0px}.image.rar:after{background-image:url("../../icons/backgrounds/rar.webp");opacity:.7}.defenseToggle .off{color:#d3d3d3}.garadanborder{max-width:80%;border-image-source:url("../../icons/backgrounds/garadanborder.webp");clear:both;border-image-width:16px;border-image-slice:16 5 33 5 fill;margin:0 auto}.garadanborder .innersection{padding-bottom:20px}.garadanb.garadanborder,.garadanb{max-width:100%;border-image-width:16px;border-image-slice:30 5 50 5 fill;text-align:center;font-weight:bold;letter-spacing:1px}.garadanb.garadanborder *,.garadanb *{border:none}.garadanb.garadanborder small,.garadanb small{font-size:smaller;line-height:auto;font-weight:normal;letter-spacing:0px;margin:0;padding:0}.garadanb{padding-bottom:30px;padding-left:20px;padding-right:20px;border-image-source:url("../../icons/backgrounds/garadanb.webp")}.garadanb.garadanborder{position:initial;border-image-slice:16 5 33 5 fill;padding-bottom:0px;border-image-source:url("../../icons/backgrounds/garadanborder.webp")}.garadanicon{background-repeat:no-repeat;background-size:contain;height:55px;margin-left:55%;margin-top:12px;background-position:center;width:55px}.garjourn{display:inline-block;width:15px;height:15px;background-size:contain;background-repeat:no-repeat;margin-left:3px;margin-right:3px}.garjourn.boronsrad{background-image:url("../../icons/Garadan6.webp")}.garjourn.koenig{background-image:url("../../icons/KoenigIcon.webp")}.garjourn.springer{background-image:url("../../icons/SpringerIcon.webp")}.garjourn.turm{background-image:url("../../icons/TurmIcon.webp")}.garjourn.bauer{background-image:url("../../icons/BauerIcon.webp")}.journal-picto{display:inline-block;position:relative;min-width:20px;margin-left:5px}.journal-picto:before{content:"";position:absolute;bottom:0;top:0;left:0;right:0;background-repeat:no-repeat;background-position:center;background-size:contain}.garadanborder h2{text-decoration:none;border:none;margin:0;margin-top:0px;margin-top:20px;font-size:24px;line-height:24px}.garadanborder h3{margin:0;border:none;font-size:14px}.reactClick{margin:2px}.reactClick img{width:26px;float:left;border:none}.didYouKnow,.tinyNotifications li{background-color:rgba(0,0,0,.548);color:#fff;border-radius:10px;padding:10px}.bumFight,.didYouKnow{position:fixed;top:40%;left:calc(50% - 200px);z-index:1002;width:400px;display:none}.bumFight .col.five,.didYouKnow .col.five{display:flex;justify-content:center;align-items:center}.bumFight{display:block;transition:all 2s ease;width:500px;left:calc(50% - 250px);top:20%}.bumFight .intererior{position:absolute;top:calc(50% - 175px);left:0;bottom:0;right:0}.bumFight .fist{border:none;width:250px;height:250px;margin-left:110px;margin-top:80px;position:relative;z-index:-1;animation:bumAnimation .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards,bumAnimation2 .7s cubic-bezier(0.64, 0, 0.78, 0) .5s 1 normal forwards}.bumFight .title{border-bottom:none;text-align:center;font-size:40px;position:relative;z-index:1;background:url("../../../../ui/pausebg.png") no-repeat 50% 50%;color:#fff;border-radius:10px;padding:10px;text-shadow:#000;animation:bumAnimation .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards,bumAnimation2 .7s cubic-bezier(0.64, 0, 0.78, 0) .5s 1 normal forwards}.bumFight .glass{border:none;width:500px;height:500px;opacity:0;animation:windowAnim .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards}@keyframes bumAnimation{0%{transform:scale(0);opacity:0}50%{opacity:1}100%{transform:scale(1)}}@keyframes windowAnim{0%{opacity:0}99%{opacity:0}100%{opacity:1}}@keyframes bumAnimation2{0%{animation-timing-function:ease-out;transform:scale(1);transform-origin:center center}10%{animation-timing-function:ease-in;transform:scale(0.91)}17%{animation-timing-function:ease-out;transform:scale(0.98)}33%{animation-timing-function:ease-in;transform:scale(0.87)}45%{animation-timing-function:ease-out;transform:scale(1)}}.flexAlignCenter{justify-content:center;align-items:center}.settings-sidebar button{margin:3px 0}#sidebar{overflow:visible}.plantContainer{display:inline-block;position:relative;cursor:pointer;height:45px;width:45px}.plantContainer input{position:absolute;opacity:0;height:45px;width:45px}.plantContainer span{position:absolute;top:0;left:0;height:45px;width:45px;background:url("../../icons/categories/planthealing.webp");background-position:center;background-size:contain;background-repeat:no-repeat;opacity:.45;transition:all .3s ease-in-out}.plantContainer.defensive span{background-image:url("../../icons/categories/plantdefensive.webp")}.plantContainer.psychic span{background-image:url("../../icons/categories/plantpsychic.webp")}.plantContainer.physical span{background-image:url("../../icons/categories/plantphysical.webp")}.plantContainer.crop span{background-image:url("../../icons/categories/plantcrop.webp")}.plantContainer.poison span{background-image:url("../../icons/categories/plantpoison.webp")}.plantContainer.supernatural span{background-image:url("../../icons/categories/plantsupernatural.webp")}.plantContainer:hover input~span,.plantContainer input:checked~span{opacity:1}.tinyNotifications{position:fixed;top:calc(100% - 250px);left:50px;list-style:none;margin:0;padding:0;z-index:160}.fxmaster .window-content .directory-item .config input[type=text]{color:#000}.ammo-selector{width:calc(100% - 31px);padding:0px;margin:0px 1px}.window-app .condition-show{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.panToToken{cursor:pointer}.panToToken:hover{box-shadow:inset 0px 0px 5px #000}.rowHover:hover{box-shadow:inset 0px 0px 5px #000}#sidebar,#players,#hotbar{position:relative}.effect-change input::placeholder{color:#a9a7a0}.select2-results__option[role=group]:hover{background-color:rgba(0,0,0,0)}.theme-dark .application .select2-container--default .select2-selection--single .select2-selection__rendered{color:#fff}.postChatSection.maskfield:after{background-image:url("../../icons/backgrounds/blackbook.webp");background-size:250px 30px;background-position:center calc(100% - 8px)}.postChatSection .postContentChat{cursor:pointer}.postChatSection .postContentChat em{padding:5px;border-radius:50%;transition:.3s ease-in-out all}.postChatSection .postContentChat:hover em{background-color:#fff;color:#000}.navWrapper{position:relative}.navWrapper .sheet-tabs{white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:none;user-select:none;scroll-behavior:smooth}.navWrapper .sheet-tabs::-webkit-scrollbar{display:none}.navWrapper .sheet-tabs.dragging{scroll-behavior:unset;cursor:grab}.navWrapper .sheet-tabs.dragging.left-btn,.navWrapper .sheet-tabs.dragging.right-btn{pointer-events:none}.navWrapper .tabs{justify-content:initial}.navWrapper .tabs .item{flex:1}.navWrapper .right-btn,.navWrapper .left-btn{position:absolute;font-size:1.4em;cursor:pointer;padding:8px;color:#756c6c;display:none;backdrop-filter:blur(10px)}.navWrapper .right-btn{right:0}.navWrapper .left-btn{left:0}#tooltip.dsatooltip{padding:1px;background:#000}.itemTooltip{max-height:500px;border:none;text-overflow:ellipsis;overflow:hidden;font-size:14px}.itemTooltip .groupbox{border:none}.itemTooltip p{text-overflow:ellipsis;overflow:hidden}.itemTooltip h1{border:none;font-size:22px;line-height:26px}.itemTooltip .col{flex:50%;max-width:50%}.itemTooltip .table-title .col{flex:100%;max-width:100%}.itemTooltip .table-title .col:nth-child(2){display:none}.itemTooltip .show-item{display:none}#hotbar.hotbarV3{margin-bottom:0;--hotbar-width: 530px}#hotbar.hotbarV3 .sections{max-height:90px;height:90px;background-color:rgba(0,0,0,.5)}#hotbar.hotbarV3 .categoryFilters{height:30px}#hotbar.hotbarV3 .actorEffects{align-items:flex-end}#hotbar.hotbarV3 .function{color:#fff;right:0}#hotbar.hotbarV3 li,#hotbar.hotbarV3 ul{margin:0;padding:0;list-style:none}#hotbar.hotbarV3 li .fa{font-size:30px;line-height:45px;text-align:center}#hotbar.hotbarV3 .actorEffect:first-child{margin-left:auto}#hotbar.hotbarV3 .actorEffect div{width:28px;height:28px;background-size:contain}#hotbar.hotbarV3 .categoryFilter{overflow:hidden}#hotbar.hotbarV3 .categoryFilter:first-child{border-top-left-radius:10px}#hotbar.hotbarV3 .categoryFilter:last-child{border-top-right-radius:10px}#hotbar.hotbarV3 .actorEffect,#hotbar.hotbarV3 .categoryFilter{flex:0 0 30px;border:1px solid #000;box-shadow:inset 0px 0px 5px #636363;height:30px;width:30px;cursor:pointer;background-size:cover;line-height:30px;text-align:center;background-color:rgba(0,0,0,.5);color:var(--color-text-light-heading)}#hotbar.hotbarV3 .actorEffect.active,#hotbar.hotbarV3 .categoryFilter.active{border-color:#006400}#hotbar.hotbarV3 .actorEffect:hover,#hotbar.hotbarV3 .categoryFilter:hover{border-color:#ff4500}#hotbar.hotbarV3 .actorEffect div,#hotbar.hotbarV3 .categoryFilter div{background-size:cover;height:100%;width:100%}#hotbar.hotbarV3 .actorEffect{align-self:flex-end}#hotbar.hotbarV3 #hotbar-directory-controls{margin-top:30px;height:90px}#hotbar.hotbarV3 .quickFunctions{display:flex;flex-wrap:wrap;justify-content:center;flex-direction:column}#hotbar.hotbarV3 .quickFunctions li{flex:0 0 20px;margin-left:5px;height:20px;width:20px;cursor:pointer;pointer-events:all;background-size:cover;background-repeat:no-repeat;position:relative;box-sizing:border-box}#hotbar.hotbarV3 .quickFunctions li.itdarkness{height:90px}#hotbar.hotbarV3 .quickFunctions li div{height:100%;width:100%;position:absolute}#hotbar.hotbarV3 .effect div{color:#000;font-size:24px;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}#hotbar.hotbarV3 .itdarkness{line-height:0}#hotbar.hotbarV3 .itdarkness .rangeContainer{height:55px}#hotbar.hotbarV3 .updateDarkness{width:50px;height:100%;transform:rotate(-90deg);margin-top:16px;margin-left:-15.5px}#hotbar.hotbarV3 .longLayout #macro-list li,#hotbar.hotbarV3 .longLayout .skillItems li{flex:0 0 90px;text-align:center;max-width:90px}#hotbar.hotbarV3 .longLayout #macro-list li div,#hotbar.hotbarV3 .longLayout .skillItems li div{display:none}#hotbar.hotbarV3 .longLayout #macro-list li .nameContent,#hotbar.hotbarV3 .longLayout .skillItems li .nameContent{line-height:45px;display:block;overflow:hidden;text-overflow:ellipsis;color:#000}#hotbar.hotbarV3 #macro-list,#hotbar.hotbarV3 .skillItems{margin:0;padding:0;white-space:nowrap;overflow-y:auto;display:flex;flex-wrap:wrap;height:100%;transition:all .15s ease-in-out;overflow-x:hidden;scroll-snap-type:y mandatory}#hotbar.hotbarV3 #macro-list.dsahidden,#hotbar.hotbarV3 .skillItems.dsahidden{display:none}#hotbar.hotbarV3 #macro-list input,#hotbar.hotbarV3 .skillItems input{height:100%;display:block;width:100%;margin:0;float:left;text-align:center;font-size:20px;color:#fff}#hotbar.hotbarV3 #macro-list.collapsedKeydown,#hotbar.hotbarV3 #macro-list.collapsed,#hotbar.hotbarV3 .skillItems.collapsedKeydown,#hotbar.hotbarV3 .skillItems.collapsed{width:0px;flex:0}#hotbar.hotbarV3 #macro-list .nameContent,#hotbar.hotbarV3 .skillItems .nameContent{display:none;color:#fff}#hotbar.hotbarV3 #macro-list .skillgm .nameContent,#hotbar.hotbarV3 #macro-list .skill .nameContent,#hotbar.hotbarV3 .skillItems .skillgm .nameContent,#hotbar.hotbarV3 .skillItems .skill .nameContent{color:#000}#hotbar.hotbarV3 #macro-list .skillgm.body,#hotbar.hotbarV3 #macro-list .skill.body,#hotbar.hotbarV3 .skillItems .skillgm.body,#hotbar.hotbarV3 .skillItems .skill.body{background:#4f6d65;box-shadow:none;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.social,#hotbar.hotbarV3 #macro-list .skill.social,#hotbar.hotbarV3 .skillItems .skillgm.social,#hotbar.hotbarV3 .skillItems .skill.social{background:#85302e;box-shadow:none;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.knowledge,#hotbar.hotbarV3 #macro-list .skill.knowledge,#hotbar.hotbarV3 .skillItems .skillgm.knowledge,#hotbar.hotbarV3 .skillItems .skill.knowledge{background:#4b6585;box-shadow:none;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.trade,#hotbar.hotbarV3 #macro-list .skill.trade,#hotbar.hotbarV3 .skillItems .skillgm.trade,#hotbar.hotbarV3 .skillItems .skill.trade{background:#cda25e;box-shadow:none;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.nature,#hotbar.hotbarV3 #macro-list .skill.nature,#hotbar.hotbarV3 .skillItems .skillgm.nature,#hotbar.hotbarV3 .skillItems .skill.nature{background:#535829;box-shadow:none;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list>li,#hotbar.hotbarV3 .skillItems>li{flex:0 0 var(--base-bar-height);height:var(--base-bar-height);border:1px solid #000;background-color:rgba(0,0,0,.5);pointer-events:all;background-size:cover;box-shadow:inset 0px 0px 5px #636363;background-repeat:no-repeat;position:relative;box-sizing:border-box;scroll-snap-align:start}#hotbar.hotbarV3 #macro-list>li.unequipped,#hotbar.hotbarV3 .skillItems>li.unequipped{background:#006400;box-shadow:inset 0px 0px 25px #000;filter:grayscale(100%)}#hotbar.hotbarV3 #macro-list>li:hover,#hotbar.hotbarV3 .skillItems>li:hover{border-color:#ff4500}#hotbar.hotbarV3 #macro-list>li div,#hotbar.hotbarV3 .skillItems>li div{background-size:cover;height:100%;width:100%;position:absolute;color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;transition:all .15s ease-in-out}#hotbar.hotbarV3 #macro-list>li div:hover,#hotbar.hotbarV3 .skillItems>li div:hover{transform:scale(1.1)}#hotbar.hotbarV3 #macro-list{border:none}@media(max-width: 1120px){#hotbar.hotbarV3{height:var(--hotbar-height)}}.coinIcon:before{content:"";mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-position:center;position:absolute;top:0;left:0;right:0;bottom:0;mask-image:url("../../../../icons/svg/coins.svg");-webkit-mask-image:url("../../../../icons/svg/coins.svg");background-color:#fff}.dsaRollMode .checkbox input[type=radio]{display:none}.dsaRollMode .checkbox{margin-right:4px;text-align:center}.dsaRollMode .checkbox>i{cursor:pointer;display:inline-block;padding:0px 10px;border-radius:5px;width:100%;background:rgba(0,0,0,.1);border:1px solid var(--color-border-light-tertiary);line-height:22px}.dsaRollMode .checkbox>i i{margin:0px 2px;padding:0}.dsaRollMode .checkbox input[type=radio]:checked+i{background:rgba(0,0,0,.7);color:#fff}.dsa5-immersive .tokenQuickHot li{box-shadow:inset 0px 0px 5px #403014;background-image:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive .tokenQuickHot li input{color:#000}.dsa5-immersive .sidebar-tab .directory-list .directory-item.collapsed{color:#fff}.dsa5-immersive .sidebar-tab .directory-list .directory-item.collapsed h3{color:#fff;text-shadow:0px 0px 3px var(--color-shadow-dark)}.dsa5-immersive .sidebar-tab .directory-list .directory-item h3{color:#000;text-shadow:none}.dsa5-immersive #sidebar-tabs{border-bottom:1px solid #000;box-shadow:0 0 10px #000;background-color:rgba(16,13,8,.4784313725)}.dsa5-immersive .chat-message{background:none}.dsa5-immersive .chat-message .message-header{padding:10px 5px;background-image:url("../../icons/backgrounds/kapitelstart.webp");background-size:112% 110%;background-repeat:no-repeat;background-position:67% -5px;color:#191815}.dsa5-immersive .sidebar-popout .chat-message,.dsa5-immersive #sidebar .chat-message{padding:8px 15px 15px 15px;padding-left:18px;margin-bottom:8px;border-image:url("../../icons/backgrounds/chatpaper.webp");border-image-width:30px;border-image-slice:50 50 fill;border-image-repeat:round}.dsa5-immersive .app.sidebar-popout .window-content{color:#333}.dsa5-immersive .sidebar-popout .dice-tray input[type=text],.dsa5-immersive #sidebar .dice-tray input[type=text]{color:#000}.dsa5-immersive .compendium-footer .source{color:#fff}.dsa5-immersive .window-app{background:none;box-shadow:none}.dsa5-immersive .window-app.actor .window-content{box-shadow:0 0 20px #000}.dsa5-immersive .window-app.image-popout .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .window-app .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .window-app.dsajournal .window-content,.dsa5-immersive .window-app.bookWizardsheet .window-content{background-image:url("../../icons/backgrounds/journalentry_v45.webp");background-size:97% 1000px;background-position:center;background-repeat:repeat-y}.dsa5-immersive .window-app.dsajournal .window-content a.content-link,.dsa5-immersive .window-app.dsajournal .window-content a.inline-roll,.dsa5-immersive .window-app.bookWizardsheet .window-content a.content-link,.dsa5-immersive .window-app.bookWizardsheet .window-content a.inline-roll{border:none;color:#b93d00;font-weight:bold;background:none}.dsa5-immersive .window-app.dsajournal .window-content a.content-link i,.dsa5-immersive .window-app.dsajournal .window-content a.inline-roll i,.dsa5-immersive .window-app.bookWizardsheet .window-content a.content-link i,.dsa5-immersive .window-app.bookWizardsheet .window-content a.inline-roll i{color:#b93d00}.dsa5-immersive .window-app.dsajournal .window-content{padding:0 40px}.dsa5-immersive .window-app.bookWizardsheet .video-container,.dsa5-immersive .window-app.dsajournal .window-content .video-container{position:relative;width:100%;padding-bottom:56.25%}.dsa5-immersive .window-app.bookWizardsheet .video-container iframe,.dsa5-immersive .window-app.dsajournal .window-content .video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.dsa5-immersive .window-app.dialog .window-content{padding-top:14px;padding-bottom:14px}.dsa5-immersive .window-app.npc-sheet .window-header,.dsa5-immersive .window-app.character-sheet .window-header,.dsa5-immersive .window-app.item .window-header{background-image:url("../../icons/backgrounds/sidebar-top.webp");border:none;top:2px}.dsa5-immersive .window-app.npc-sheet:not(.monarch):after,.dsa5-immersive .window-app.character-sheet:not(.monarch):after,.dsa5-immersive .window-app.item:not(.monarch):after{background-image:url("../../icons/backgrounds/sidebar-bot.webp");bottom:2px;content:""}.dsa5-immersive .window-app:not(.monarch) .window-header,.dsa5-immersive .window-app:after{background-repeat:no-repeat;position:relative;min-height:40px;z-index:1;height:40px;width:100%;background-size:100% 40px}.dsa5-immersive .window-app.creature-sheet .window-content{box-shadow:none}.dsa5-immersive .window-app.monarch .window-header,.dsa5-immersive .window-app.monarch:after{background-image:none}.dsa5-immersive .window-app .window-header{background-image:url("../../icons/backgrounds/blackhat.webp");top:7px;border:none}.dsa5-immersive .window-app:not(.monarch):after{background-image:url("../../icons/backgrounds/blackbook.webp");bottom:12px;content:""}.dsa5-immersive .window-app.creature-sheet:after{background-image:url("../../icons/backgrounds/blackcreaturebot.webp")}.dsa5-immersive .window-app.masterMenu:after{background-image:url("../../icons/backgrounds/masterborder.webp")}.dsa5-immersive .window-app.creature-sheet .window-resizable-handle{bottom:18px}.dsa5-immersive .window-app .window-header .aa-item-settings,.dsa5-immersive .window-app .window-header [id^=popout_]{width:15px;height:15px;margin-top:10px}.dsa5-immersive .window-app:not(.monarch) .window-header>a{width:15px;height:15px;margin-top:10px}.dsa5-immersive .window-app:not(.monarch) .window-header>a i{width:22px;border:1px solid #111;padding:3px;background-color:#444;text-align:center;border-radius:100%;color:#fff}.dsa5-immersive .window-app .aa-item-settings i,.dsa5-immersive .window-app .window-header [id^=popout_] i{width:22px;border:1px solid #111;padding:3px;background-color:#444;text-align:center;border-radius:100%;color:#fff}.dsa5-immersive .window-app .window-resizable-handle{z-index:2;bottom:11px;right:25px}.dsa5-immersive .window-app .window-header .window-title{text-align:center;margin-left:15%;margin-top:5px;color:#fff;font-family:var(--boldFont);font-weight:bold;font-family:"GentiumBasic-Bold";text-shadow:0px 0px 2px rgba(0,0,0,.75)}.dsa5-immersive .window-app.npc-sheet .window-header .window-title,.dsa5-immersive .window-app.character-sheet .window-header .window-title{margin-top:10px;color:#000;text-shadow:1px 1px #fff}.dsa5-immersive .window-app .header-button.close{margin-right:25px}.dsa5-immersive .window-app.actor .window-content,.dsa5-immersive .window-app.item .window-content{margin-left:15px;margin-right:15px}.dsa5-immersive .window-app.dsa5Decent:after{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.initTracker::after,.dsa5-immersive .window-app.initTracker .window-content{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.tokenQuickHot::after,.dsa5-immersive .window-app.tokenQuickHot .window-content{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.initTracker::after,.dsa5-immersive .window-app.tokenQuickHot::after{content:none}.dsa5-immersive .window-app.dsa5Decent .window-content,.dsa5-immersive .window-app.dsa5Decent .window-header{background:rgba(0,0,0,.5);padding:0;position:unset;color:#fff}.dsa5-immersive .window-app.dsa5Decent .window-content li{background:hsla(0,0%,100%,.2)}.dsa5-immersive .window-app.dsa5Decent .window-content li:hover{background:hsla(0,0%,100%,.5)}.dsa5-immersive .window-app.dsa5Decent:after{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .app.sidebar-popout .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .character-sheet form{border-color:#000;border-style:double;border-width:10px;border-image:url("../../icons/backgrounds/actor.webp") 27 28 28 28;padding:4px;margin:0px}.dsa5-immersive #settings .fshopButton div{display:inline-block;background-image:url("../../lazy/patchimages/UlissesDigital.png");background-size:contain;width:20px;height:19px;margin:0;background-repeat:no-repeat;background-position:center;position:relative;top:5px}.dsa5-immersive #sidebar{border:none;margin:0px;height:100vh}.dsa5-immersive #sidebar .sidebar-tab .folder.collapsed .folder-header a i{color:#d8d4d4}.dsa5-immersive #sidebar .playlists-sidebar .sound-control{color:#3b3b3b}.dsa5-immersive #sidebar .playlists-sidebar .sound-control.inactive i{color:#797373}.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar a.sound-control[data-action=sound-stop],.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar .folder a.sound-control[data-action=playlist-stop] i,.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar .folder .folder-header a.sound-control[data-action=playlist-stop] i{color:var(--color-text-hyperlink)}.dsa5-immersive #sidebar button.fshopButton{background:#006f3d;background:linear-gradient(90deg, rgb(0, 38, 13) 0%, rgb(0, 111, 61) 100%);position:relative}.dsa5-immersive #sidebar.collapsed:before{content:none}.dsa5-immersive #sidebar .directory-list .documentName,.dsa5-immersive #sidebar .playlist.now-playing,.dsa5-immersive #sidebar .directory-list .directory-item.compendium,.dsa5-immersive #sidebar .directory-list .directory-item.document{background-color:var(--sheet-bg);margin:3px;border:1px solid var(--sheet-border);border-radius:5px;color:#000;margin-left:10px}.dsa5-immersive #sidebar .sidebar-tab{color:#555}.dsa5-immersive #sidebar .sidebar-tab a.inactive i{color:#acacac}.dsa5-immersive #sidebar .sidebar-tab .jump-to-bottom{color:#fff}.dsa5-immersive #sidebar .sidebar-tab .jump-to-bottom i{color:#fff}.dsa5-immersive #sidebar .global-control{margin-left:10px}.dsa5-immersive #sidebar .global-control .playlist-header{color:#fff}.dsa5-immersive #sidebar:before{position:absolute;top:0;bottom:0;left:-13px;right:0;content:"";background-image:url("../../icons/backgrounds/menu.webp");background-repeat:repeat-y;background-size:100%;z-index:-1}.dsa5-immersive .dsa5.item .item-header{background-image:url("../../icons/backgrounds/kapitelstart.webp")}.dsa5-immersive .dsa5.item.minimized .window-header .window-title{color:#000}.dsa5-immersive .dsa5.item .window-header .window-title{color:rgba(0,0,0,0);text-shadow:none}.dsa5-immersive .sidebar-popout{color:#555}.dsa5-immersive .sidebar-popout a i{color:#555}.dsa5-immersive .sidebar-popout a.inactive i{color:#acacac}.dsa5-immersive .sidebar-popout .jump-to-bottom{color:#fff}.dsa5-immersive .sidebar-popout .jump-to-bottom i{color:#fff}.dsa5-immersive #chat a.content-link,.dsa5-immersive #chat .chat-condition,.dsa5-immersive #chat a.inline-roll{border:none;color:#b93d00;font-weight:bold;background:none}.dsa5-immersive #chat a.content-link i,.dsa5-immersive #chat .chat-condition i,.dsa5-immersive #chat a.inline-roll i{color:#b93d00}.dsa5-immersive .itemTooltip{background-image:url("../../icons/backgrounds/macrobg.webp");background-size:cover;color:#000;padding:1px;border:2px solid #000;border-radius:5px}.dsa5-immersive #hotbar:before{background-image:url("../../icons/backgrounds/hotbarpart.webp"),url("../../icons/backgrounds/hotbarpart.webp"),url("../../icons/backgrounds/hotbar4.webp");background-size:30px 48px,66px 48px,100% 100%;background-repeat:no-repeat;content:"";position:absolute;left:0px;right:-32px;bottom:-10px;top:-10px;z-index:-1;background-position:8px 11px,calc(100% - 8px) 11px,center}.dsa5-immersive #hotbar.hotbarV3{margin-bottom:10px;--hotbar-width: 527px}.dsa5-immersive #hotbar.hotbarV3:before{background-size:30px 91px,34px 91px,calc(100% - 26px) calc(100% - 20px);background-position:8px 39px,calc(100% - 33px) 39px,0px 18px}.dsa5-immersive #hotbar.hotbarV3 .function{color:#000}.dsa5-immersive #hotbar.hotbarV3 .sections{background:none}.dsa5-immersive #hotbar.hotbarV3 .nameContent{color:#000}.dsa5-immersive #hotbar.hotbarV3 .actorEffect,.dsa5-immersive #hotbar.hotbarV3 .categoryFilter{background-image:url("../../icons/backgrounds/macrobg.webp");background-size:cover;color:#000}.dsa5-immersive #hotbar.hotbarV3 .actorEffect{box-shadow:inset 0px 0px 25px #403014}.dsa5-immersive #hotbar.hotbarV3 #macro-list>li,.dsa5-immersive #hotbar.hotbarV3 .skillItems>li{box-shadow:inset 0px 0px 25px #403014;background-image:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive #hotbar.hotbarV3 #macro-list>li.unequipped,.dsa5-immersive #hotbar.hotbarV3 .skillItems>li.unequipped{box-shadow:inset 0px 0px 25px #000}.dsa5-immersive #hotbar.hotbarV3 #macro-list input,.dsa5-immersive #hotbar.hotbarV3 .skillItems input{color:#000}.dsa5-immersive #hotbar.collapsedHotbar:before{background-image:url("../../icons/backgrounds/hotbarpart.webp")}.dsa5-immersive #hotbar .macro{background:none;border:1px solid rgba(0,0,0,.5)}.dsa5-immersive #hotbar .macro.active{box-shadow:inset 0px 0px 25px #403014;background:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive #hotbar .macro.active.parry{box-shadow:inset 0px 0px 15px #016e0a}.dsa5-immersive #hotbar .macro.active.attack{box-shadow:inset 0px 0px 15px #7e0202}.dsa5-immersive #hotbar #macro-list{border:none;margin:0}.dsa5-immersive #hotbar .bar-controls{margin:0;background:none;color:#000;border:none;box-shadow:none}.dsa5-immersive #hotbar .bar-controls:first-child{margin-left:5px}@media(max-width: 1120px){.dsa5-immersive #hotbar:before{background-size:36px 88px,66px 88px,190% 100%;background-position:-3px 18px,calc(100% + 3px) 18px,center;right:-58px;left:6px}.dsa5-immersive #hotbar.hotbarV3:before{background-size:36px 105px,66px 105px,190% 100%;background-position:-1px 24px,calc(100% + 30px) 24px,center;left:0px;right:0px}.dsa5-immersive #hotbar #hotbar-page-controls a,.dsa5-immersive #hotbar #hotbar-directory-controls a{margin:6px 0}}.dsa5-immersive .window-app.npc-sheet.app .window-content{box-shadow:none}.dsa5-immersive #players{background:none;border:none;box-shadow:none}.dsa5-immersive #players:before{background-image:url("../../icons/backgrounds/dsabot.webp");background-size:100% 15px;background-repeat:no-repeat;content:"";position:absolute;left:-2px;right:-2px;bottom:-5px;top:-20px;z-index:-1;background-position:center 100%}.dsa5-immersive #players h3{border:none;position:relative;overflow:visible}.dsa5-immersive #players h3:before{background-image:url("../../icons/backgrounds/dsahead.webp"),url("../../icons/backgrounds/dsamid.webp");background-size:100% 30px,100% calc(100% - 30px);background-repeat:no-repeat;content:"";position:absolute;left:-5px;right:-5px;bottom:0px;top:-20px;z-index:-1;background-position:center 0px,center 30px}.dsa5-immersive #players #player-list{border:none;position:relative;overflow:visible}.dsa5-immersive #players #player-list:before{background-image:url("../../icons/backgrounds/dsamid.webp");background-size:100% 50px;background-repeat:repeat-y;content:"";position:absolute;left:-2px;right:-2px;bottom:5px;top:-3px;z-index:-1;background-position:center 0px}.dsa5-immersive #sidebar button,.dsa5-immersive .initTracker button,.dsa5-immersive .masterMenu button,.dsa5-immersive .sheetButton,.dsa5-immersive .sidebar-popout button,.dsa5-immersive .sidebar-popout .dice-tray button{background-image:linear-gradient(to right top, #be2020, #af1622, #9f0d22, #8f0522, #7f0021);color:#fff;border:1px solid #000}.dsa5-immersive #sidebar button:active,.dsa5-immersive .initTracker button:active,.dsa5-immersive .masterMenu button:active,.dsa5-immersive .sheetButton:active,.dsa5-immersive .sidebar-popout button:active,.dsa5-immersive .sidebar-popout .dice-tray button:active{box-shadow:inset 0 0 5px #000}.dsa5-immersive #sidebar button:hover,.dsa5-immersive .initTracker button:hover,.dsa5-immersive .masterMenu button:hover,.dsa5-immersive .sheetButton:hover,.dsa5-immersive .sidebar-popout button:hover,.dsa5-immersive .sidebar-popout .dice-tray button:hover{box-shadow:inset 0 0 3px #fff}.dsa5-immersive #sidebar button.lastRound,.dsa5-immersive .initTracker button.lastRound,.dsa5-immersive .masterMenu button.lastRound,.dsa5-immersive .sheetButton.lastRound,.dsa5-immersive .sidebar-popout button.lastRound,.dsa5-immersive .sidebar-popout .dice-tray button.lastRound{background-color:#02234d;background-image:none}.dsa5-immersive .dsajournal.sheet.journal-entry .journal-entry-content{background:none;border:none}.dsa5-immersive .dsajournal .header-search,.dsa5-immersive .dsajournal.sheet.journal-entry .pages-list .directory-item .page-number,.dsa5-immersive .dsajournal .directory-item{color:#000}.dsa5-immersive #compendium li.compendium-pack{background-color:var(--sheet-bg);margin:3px;border:1px solid var(--sheet-border);border-radius:5px;color:#000;margin-left:10px;padding:5px}.dsa5-immersive #compendium.sidebar-tab .entry-name i{color:#fff}.dsa5-immersive #compendium .compendium h3{color:#fff;margin-left:3px}.dsa5-immersive .compendium.directory .directory-header .compendium-name{color:#fff}.dsa5-immersive #compendium li.compendium-pack .compendium-footer,.dsa5-immersive #playlists li.sound .sound-playback .sound-timer{color:#0e0c0c}.dsa5-immersive #playlists.sidebar-tab .directory-list .directory-item.playlist.collapsed{color:#555}.dsa5-immersive .sound-name{color:#5c5c5c}.dsa5-immersive .app.sidebar-popout{backdrop-filter:none}.dsa5-immersive .coinIcon:before{content:"";mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-position:center;position:absolute;top:0;left:0;right:0;bottom:0;mask-image:url("../../../../icons/svg/coins.svg");-webkit-mask-image:url("../../../../icons/svg/coins.svg");background-color:#000}.dsa5-immersive .searchLines .marker{background-color:#000}.dsa5-legacy .window-app.dsajournal .window-content{background-image:url("../../icons/backgrounds/journalentry.webp");background-size:97% 1000px;padding:0 50px}.dsa5-legacy .chatpaperfield{border-image:url("../../icons/backgrounds/chatpaper.webp");border-image-width:30px;border-image-slice:80 50 40 fill;border-image-repeat:round;padding:10px 20px 10px 30px}.dsa5-legacy .maskfield{position:relative;padding:10px 20px 30px 20px;color:#fff;border-image:url("../../icons/backgrounds/maskfield.webp");border-image-width:15px;border-image-slice:20 20 fill;border-image-repeat:round}.dsa5-legacy .maskfield:after{content:"";pointer-events:none;position:absolute;bottom:-23px;left:0;right:0;height:50px;z-index:1;background:url("../../icons/backgrounds/mask.webp");background-repeat:no-repeat;background-size:150px 50px;background-position:bottom center}.dsa5-legacy .maskfield .editor .mce-content-body{color:#fff}.dsa5-legacy .maskfield .editor.prosemirror .editor-menu{background-color:#fff}.dsa5-legacy .maskfield .editor.prosemirror.editing-source textarea{color:#fff}.dsa5-legacy .maskfield .documentName-link,.dsa5-legacy .maskfield a.content-link{color:#000}.dsa5-legacy .bookWizardsheet .window-content .table-title,.dsa5-legacy .dsajournal .window-content .label-text,.dsa5-legacy .bookWizardsheet .window-content table tr:first-child,.dsa5-legacy .dsajournal .window-content table tr:first-child{background:#bc886f;background:linear-gradient(90deg, rgba(188, 136, 111, 0.8) 0%, rgba(255, 255, 255, 0) 100%);border-bottom-style:solid;text-align:left}.dsa5-legacy .window-app.bookWizardsheet .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.content-link,.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.inline-roll,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.content-link,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.inline-roll{border:none;color:#ee770e;font-weight:bold;background:none}.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.content-link i,.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.inline-roll i,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.content-link i,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.inline-roll i{color:#ee770e}:root{--app-height: 100vh}body{height:var(--app-height)}/*# sourceMappingURL=dsa5.css.map */ +:root{--border-color:#736953a6;--bg-color:#e1d3c6;--button-color:#532902e7;--sheet-bg:#2e2c2a15;--sheet-border:#968678;--boldFont:"Signika";--normalFont:"Signika";--minColumnWidth: 330px;--minColumnWidth40: 264px;--minColumnWidth60: 396px}@font-face{font-family:"GentiumBasic";src:url("../../fonts/GenBasR.eot");src:url("../../fonts/GenBasR.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasR.otf") format("opentype"),url("../../fonts/GenBasR.svg") format("svg"),url("../../fonts/GenBasR.ttf") format("truetype"),url("../../fonts/GenBasR.woff") format("woff"),url("../../fonts/GenBasR.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"GentiumBasic-BoldItalic";src:url("../../fonts/GenBasBI.eot");src:url("../../fonts/GenBasBI.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasBI.otf") format("opentype"),url("../../fonts/GenBasBI.svg") format("svg"),url("../../fonts/GenBasBI.ttf") format("truetype"),url("../../fonts/GenBasBI.woff") format("woff"),url("../../fonts/GenBasBI.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"GentiumBasic-Bold";src:url("../../fonts/GenBasB.eot");src:url("../../fonts/GenBasB.eot?#iefix") format("embedded-opentype"),url("../../fonts/GenBasB.otf") format("opentype"),url("../../fonts/GenBasB.svg") format("svg"),url("../../fonts/GenBasB.ttf") format("truetype"),url("../../fonts/GenBasB.woff") format("woff"),url("../../fonts/GenBasB.woff2") format("woff2");font-weight:normal;font-style:normal}@font-face{font-family:"Andalus";src:url("../../fonts/andlso.eot");src:url("../../fonts/andlso.eot?#iefix") format("embedded-opentype"),url("../../fonts/andlso.otf") format("opentype"),url("../../fonts/andlso.svg") format("svg"),url("../../fonts/andlso.ttf") format("truetype"),url("../../fonts/andlso.woff") format("woff"),url("../../fonts/andlso.woff2") format("woff2");font-weight:normal;font-style:normal}#tinymce{overflow-y:hidden;overflow-x:hidden}.tox-tinymce{width:100%}.editor-content ul{margin:0px 0px}.overflowhidden{overflow:hidden}.scrollY{overflow-y:auto;overflow-x:hidden}body{padding:0px;overflow:hidden;font-size:14px;font-family:var(--normalFont)}textarea{font-family:var(--normalFont)}b{font-family:var(--boldFont);font-weight:bold}h1,h2,h3,h4,h5,h6,h7{overflow:hidden}h1 a.content-link,h2 a.content-link,h3 a.content-link,h4 a.content-link,h5 a.content-link,h6 a.content-link,h7 a.content-link{background:none;padding:0;border:none}.dsa5 h1,.dsa5 h2,.dsa5 h3,.dsa5 h4,.dsa5 h5,.dsa5 h6,.dsa5 h7{font-family:"Andalus"}.schwierig,.einfach{margin-left:40px;position:relative}.schwierig:before,.einfach:before{content:"";background:url("../../icons/einfach.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:-40px;top:0;height:30px;width:30px;margin-right:5px}.schwierig:before{background-image:url("../../icons/schwierig.webp")}.tabs>[data-tab]>.obfuscateSection{pointer-events:all}.obfuscateSection.pale{opacity:.3}.dsa5 .tab.description.active{display:flex;flex-flow:column;height:calc(100% - 129px);overflow-y:hidden}.dsa5 .tab.description.active .editor{height:100%}.dsa5.item-sheet img{max-height:50px;max-width:50px;margin-top:5px;border-color:rgba(0,0,0,0)}.dsa5.item-sheet img.fullImg{width:100%;max-width:initial;max-height:initial}.dsa5.item textarea{padding:1px 3px}.dsa5 .editor{border:none;overflow:auto;flex-grow:1;display:flex;padding:3px;margin-top:0px;margin-bottom:7px;height:100%;width:100%}.hovermenu{display:inline-block;position:absolute;top:2px;right:3px;z-index:1;cursor:pointer}.hovermenu i{color:var(--border-color);padding:2px}.hovermenu i:hover{color:#3f3636}.notes-box{min-height:70px}.item-box{min-height:30px}.character-sheet nav.sheet-tabs,.creature-sheet nav.sheet-tabs,.npc-sheet nav.sheet-tabs{margin-bottom:20px}.character-sheet .general,.npc-sheet .general,.creature-sheet .general{display:flex;flex-direction:row;width:100%;margin:0}#field-distinguishingmark{width:calc(50% - 15px)}.sheet-header{margin-bottom:10px}.actor .sheet-header .content-link{padding:0;border:none;background:none}table.infoTable{width:100%}table.infoTable tr td:first-child{width:15%}.creature-sheet .headerInput,.sheet-header .headerInput,.npc-sheet .general .headerInput,.sheet-header .headerInput,.character-sheet .general .headerInput,.character-sheet .sheet-header .headerInput{box-sizing:border-box;margin:5px}.npc-sheet .general .headerInput input,.sheet-header .headerInput input,.creature-sheet .headerInput input,.sheet-header .headerInput input,.character-sheet .general .headerInput input,.sheet-header .headerInput input{border:none;border-bottom:1px solid var(--border-color);box-shadow:none;background-color:rgba(0,0,0,0);border-radius:0px;height:auto}.creature-sheet .headerInput span,.sheet-header .headerInput span,.npc-sheet .general .headerInput span,.sheet-header .headerInput span,.character-sheet .general .headerInput span,.sheet-header .headerInput span{color:#333;margin-left:4px;margin-bottom:2px;font-size:12px}.item form .form-group input[type=checkbox]{flex:3}.form-group.full-height .editor,.form-group.full-height .tox{min-height:100px;flex-grow:3;border:1px solid var(--border-color);background-color:rgba(0,0,0,.05);margin:0}.dsa5.item form .form-group.autoHeight div{height:auto}.centerCell{display:flex;align-self:center}form .form-group.autoHeight label{align-self:stretch;vertical-align:middle}form .form-group.full-height label,form .form-group.full-height input{align-self:stretch;vertical-align:middle}form .form-group.full-height textarea{min-height:140px;font-size:14px}form .career .form-group.full-height textarea{min-height:80px}form .form-group.double span{flex:.9;display:inline;text-align:center}form .form-group.double .input-text{flex:1;display:inline;text-align:center}form .form-group.tripple .input-text{flex:2}form .form-group.doubleInput .input-text{flex:1.45}form .form-group div.input-text{padding:0 3px}form .form-group div.input-text ul{padding:0;margin:0}form .form-group.tripple select{flex:1;padding:0}.emphasize{color:#fff;background-color:darkred}.emphasize input::placeholder{color:#fff}input[type=text].emphasize{border-color:darkred}.emphasize2{color:#fff;background-color:#0a59c2}.maxMods{transition:background-color .3s linear}.charimg{width:115px;height:115px;object-fit:contain}.minimumColumnLayout .characteristics-table{min-width:unset}.characteristics-table{flex:6;display:block;min-width:var(--minColumnWidth60)}.characteristics-table.ctab2{flex:4;min-width:var(--minColumnWidth40)}.characteristics-table .table-data,.characteristics-table .table-header{flex:1}.characteristics-table .table-data:first-child,.characteristics-table .table-header:first-child{flex:2}.character-sheet .window-content{padding:0}.window-app .window-content select:not([multiple]) option{color:#fff;background:#1d1c1c}select[multiple] option{background-color:rgba(0,0,0,0)}select[multiple] option:checked{background-color:#12496c;color:#fff}.characteristics-table .table-row{text-align:center;width:100%;border-bottom:none;border-right:none;display:flex}.skills.body{background:#4f6d65;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgba(255, 255, 255, 0) 100%)}.skills.social{background:#85302e;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgba(255, 255, 255, 0) 100%)}.skills.knowledge{background:#4b6585;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgba(255, 255, 255, 0) 100%)}.skills.trade{background:#cda25e;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgba(255, 255, 255, 0) 100%)}.skills.nature{background:#535829;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgba(255, 255, 255, 0) 100%)}.table-title,.label-text{font-weight:bold;font-family:var(--boldFont);background:#bc886f;background:linear-gradient(90deg, rgba(188, 136, 111, 0.8) 0%, rgba(255, 255, 255, 0) 100%)}.bookWizardsheet .window-content .table-title,.dsajournal .window-content .label-text,.bookWizardsheet .window-content table tr:first-child,.dsajournal .window-content table tr:first-child{font-weight:bold;font-family:var(--boldFont);border-bottom-style:double;text-align:center;background:rgba(188,136,111,.3)}.bookWizardsheet .window-content table,.dsajournal .window-content table,.bookWizardsheet .window-content table tr,.dsajournal .window-content table tr,.bookWizardsheet .window-content table td,.dsajournal .window-content table td{border-color:var(--border-color)}.table-title{background:#bc886f;background:linear-gradient(90deg, rgb(188, 136, 111) 0%, rgba(255, 255, 255, 0) 100%);box-shadow:none}.table-title .item-create{display:block;line-height:30px}.table-header{font-weight:bold;font-family:var(--boldFont)}.skill-section{display:flex}.skill-select{display:inline-block}.skill-section .flexcolumn{flex:50%}#combat #combat-round .encounters{color:#444}#combat #combat-round .encounters h4,#combat #combat-round .encounters a{color:#444}#combat-tracker .token-effect{box-shadow:0px 0px 10px #000 inset}.tour .step-title{overflow:initial}.directory .directory-list .directory-item.folder .context{color:#000}.chat-buttons{float:right}.die-attack,.die-mu,.diet-mu:after{background-image:url("../../icons/dice/d20mu.svg");color:#fff}.die-kl,.diet-kl:after{background-image:url("../../icons/dice/d20kl.svg");color:#fff}.die-dodge,.die-parry,.die-in,.die-poison,.die-disease,.diet-in:after{background-image:url("../../icons/dice/d20in.svg");color:#fff}.die-ch,.diet-ch:after{background-image:url("../../icons/dice/d20ch.svg");color:#fff}.die-ff,.diet-ff:after{background-image:url("../../icons/dice/d20ff.svg")}.die-ge,.diet-ge:after{background-image:url("../../icons/dice/d20ge.svg")}.die-ko,.diet-ko:after{background-image:url("../../icons/dice/d20ko.svg")}.die-kk,.diet-kk:after{background-image:url("../../icons/dice/d20kk.svg")}.d20height{line-height:35px}.skills .d20:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;opacity:.35;background-size:contain;background-position:center;background-repeat:no-repeat}.d6.die-AsP{background-position:center 2.5px;background-image:url("../../icons/dice/d6blue.svg")}.d6.die-LeP{color:#fff;background-position:center 2.5px;background-image:url("../../icons/dice/d6red.svg")}.d6.die-KaP{color:#fff;background-position:center 2.5px;background-image:url("../../icons/dice/d6green.svg")}.d6.die-effect,.d6.die-damage{background-image:url("../../icons/dice/d6white.svg");background-position:center 2.5px;color:#fff}.d2.die-damage,.d3.die-damage{background-image:url("../../icons/dice/d6white.svg");background-position:center 2.5px;color:#fff}.dice-tooltip .dice-rolls .roll.die{line-height:35px}.d20,.d6,.d2,.d3{font-family:"GentiumBasic-Bold";width:35px;height:35px;display:inline-block;background-size:contain;line-height:35px;text-align:center;background-position:calc(50% + 1px);background-repeat:no-repeat}.skills .d20{width:22px;height:22px;line-height:22px;font-size:10px;position:relative;display:inline-block}.rollButton .d20,.reactClick .d20{width:30px;height:30px;line-height:30px;font-size:12px;float:right}.rollButton .d20{float:left}.chatmoney{width:15px;height:15px;display:inline-block;background-repeat:no-repeat;background-size:contain}input[type=text].col-Money-D{color:#927c01}input[type=text].col-Money-S{color:#474444}input[type=text].col-Money-K{color:#9c5e5e}input[type=text].col-Money-H{color:#944b32}.Money-D,.money-D{background:url("../../icons/money-D.webp")}.Money-K,.money-K{background:url("../../icons/money-K.webp")}.Money-S,.money-S{background:url("../../icons/money-S.webp")}.Money-H,.money-H{background:url("../../icons/money-H.webp")}.chatLineHeight{line-height:15px;display:inline-block}.cards{padding:3px}.cards>div{margin:1px;flex-grow:1;position:relative}.cards .item{box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset}.cards a{padding:4px;border-radius:2px;width:100%;display:inline-block;text-align:center}.cards a.onUseItem,.cards a.traditionPayCost{width:28px;box-shadow:none}.cards a.onUseItem+a,.cards a.traditionPayCost+a{width:calc(100% - 28px)}.main-row{display:flex;width:100%;flex:1}.row-section{display:flex}.row-section.wrap{flex-wrap:wrap}.row-section .col{flex:100%}.row-section .col.libItem{margin-top:30px;padding:10px;border-radius:10px;background-color:rgba(0,0,0,.05);border:1px solid var(--border-color)}.row-section .col.morph{flex:50%;min-width:var(--minColumnWidth)}.row-section .col.morph40{flex:40%;min-width:var(--minColumnWidth40)}.row-section .col.morph60{flex:60%}.row-section.filterfull .col.morph{flex:100%}.row-section.skills{border:.5px solid var(--border-color);margin:0;padding:2px}.reverseFlex{flex-flow:row-reverse}.reverseColumnFlex{flex-flow:column-reverse}.thinscroll::-webkit-scrollbar{width:6px}.thinscroll{scrollbar-width:thin}.columnFlex{flex-flow:column;align-items:stretch}.skills span{margin:0}.lineheight{line-height:26px}.item .image{height:30px;background-size:contain;background-repeat:no-repeat;background-position:4px 0px}.inventory{line-height:30px}.row-section .col.three{flex:30%}.row-section .col.four{flex:25%}.row-section .col.thirtyfive{flex:35%}.row-section .col.fourtyfive{flex:45%}.row-section .col.five{flex:20%}.row-section .col.eight{flex:12.5%}.row-section .col.ten{flex:10%}.row-section .col.zerofive{flex:5%}.row-section .col.col95{flex:95%}.row-section .col.fourty{flex:40%}.row-section .col.third{flex:30%}.row-section .col.ninety{flex:90%}.row-section .col.eighty{flex:80%}.row-section .col.eighty.fixed{position:relative;max-width:80%;overflow:hidden}.row-section .col.eighty.fixed:hover{overflow:visible;z-index:50}.row-section .col.seventy{flex:70%}.row-section .col.fifteen{flex:15%}.row-section .col.sixty{flex:60%}.row-section .col.seventeen{flex:17.5%}.row-section .col.two{flex:50%;max-width:50%}.max20{max-width:20%}.groupbox{border:1px solid var(--border-color);border-radius:3px;margin:10px 2px;min-height:50px}.groupbox.paddingBox{padding:5px}.header-label{text-align:center;height:100%}.center{text-align:center}.right{text-align:right}.very-small{font-size:10px}.inventory .very-small{line-height:14px}.small{font-size:12px}.selectableRow{border:1px solid #000;cursor:pointer}.row-section.selectableRow.tableOdd:hover{background-color:#fff}.selectableRow:hover{background-color:#fff}.selectableRow.selected{box-shadow:inset 0px 0px 10px 5px rgba(188,136,111,.8)}a.img-entity-link{border:none;background:none;display:block}a.img-entity-link:hover{background:#fff}.row-section .twoColors:nth-child(4n-1),.row-section .twoColors:nth-child(4n){background-color:rgba(0,0,0,.1)}.row-section.rowColors:nth-child(odd),.row-section.tableOdd:nth-child(even){background-color:rgba(0,0,0,.1)}.col.morph .tableOdd:nth-child(even){background-color:rgba(0,0,0,.1)}.row-section.inverseRowtable>.col:nth-child(odd),.row-section.rowtable>.col:nth-child(even){background-color:rgba(0,0,0,.1)}.advance{color:rgba(51,48,41,.6509803922);margin-left:4px;font-size:8px;line-height:8px}.combat-actions{display:flex;gap:5px;flex-wrap:wrap}.combat-actions .combat-action{display:block;color:rgba(51,48,41,0.6509803922);padding:1px 5px;border:1px solid rgba(51,48,41,0.6509803922);border-radius:5px}.row-section .col.combat-item-name{flex-grow:0}.buttons a .fas,.buttons a .fa{border-radius:100%;border:1px solid var(--border-color);padding:2px;color:rgba(51,48,41,.6509803922)}.lighticon{color:rgba(68,68,68,.65)}.button.green{background:#006f3d;background:linear-gradient(90deg, rgb(0, 38, 13) 0%, rgb(0, 111, 61) 100%);position:relative;color:#fff}.grayIcon,.condition-toggle,.condition-edit,.ench,.spells .very-small a .fas,.inventory .very-small a .fas{padding:1px;border:none;color:var(--border-color)}::-webkit-scrollbar{width:14px}::-webkit-scrollbar-track{background:#111}::-webkit-scrollbar-thumb{background:#782e22;border:1px solid #111}.sidebar-tab ::-webkit-scrollbar-thumb{background:#782e22;border:1px solid #111}.sidebar-tab ::-webkit-scrollbar{width:8px}.sheet.journal-entry:not(.dsajournal) .sidebar.directory{background:rgba(0,0,0,.6)}.window-app.dsajournal .editor-content p{margin-right:10px}form.dsa5.item-sheet{padding-left:10px;padding-right:10px}.qOverlay{position:relative}.qOverlay .img{position:absolute;left:0;right:0;top:0;bottom:0;background-repeat:no-repeat;background-position:center;background-size:contain}.qOverlay .overlay{height:100%;width:100%;min-height:200px;line-height:200px;font-size:200px;opacity:.2}.dsalist li{width:100%}.statusEffectMenu,.dsalist li,#chat-form,.browser-item,.effect-change .key,.inputTooltipAvailable,.journalHeader,.tokenQuickHot>ul>li,.bags,.hero,.window-app .window-content{position:relative}#dice-config .window-content{position:unset}#client-settings section.content .settings-list{overflow-y:hidden;max-height:max-content}.form-group.full-height .editor.prosemirror,.editor.prosemirror{min-height:300px}.dsa5.item .item-header{background-size:100% 50px;background-repeat:no-repeat;height:50px}.dsa5.item .item-header h1{margin:0 10%;cursor:pointer}.dsa5.item div.item-header,.dsa5.item .item-header input{text-align:center;padding:8px;background:none;border:none}.item-main .row-section{margin-left:10px;font-size:12px}.item-main .col label,.item-main .col input{border:1px solid var(--border-color)}.item-main label{padding:6px;display:inline-block;width:100%;text-align:center}.item-main.noequipment{margin-top:15px}.dsa5.item .item-main input{margin:0;border-radius:0%;height:29px;margin:0;width:100%;text-align:center}.label-text{border:1px solid var(--border-color);padding:0px 6px;text-align:center}.form-group .label-text i{font-size:10px}.dsa5.item .input-text,.creature-sheet .input-text{border:1px solid var(--border-color);border-radius:0px;height:28px;text-align:center}.dsa5.item select,.creature-sheet select{height:28px;font-family:var(--normalFont);border-radius:0;text-align:center}.dsa5.item section.content{height:calc(100% - 140px)}.dsa5.item section.content .tab.active{height:100%}.directory .directory-list .directory-item.active{border-color:#000}.popoutImage{cursor:pointer}#combat li.combatant .token-initiative .initiative,#combat li.combatant .token-name{text-shadow:none}#combat li.combatant .roll{background-image:url("../../icons/dice/d6white.svg");position:relative}#combat li.combatant .roll:before{position:absolute;content:"6";color:#fff;left:0;right:0;top:-2px;bottom:0}#combat li.combatant .roll:hover{background-image:url("../../icons/dice/d6green.svg")}.app .window-content>section,.app .window-content>form{padding:12px}.app .window-content .dialog-content,.app .window-content .dialog-buttons{padding:12px}.imagebox{position:relative;height:95px;background-size:cover;display:inline-block}.itemLibrary .detailBox span,.itemLibrary .detailBox input{margin:1px 2px;width:calc(100% - 4px)}.cards-notification .icon,.didYouKnow img,.app.sidebar-popout,.dsa5.item h1,.dsajournal img,.itemLibrary img,.charimg,.dsa5.post-item img{border:none}.dsajournal .heading.h3 a:before{content:"";font-family:"Font Awesome 6 Pro";font-weight:900;color:darkred;position:relative;left:-5px}.defender video{margin:5px 25%;border:none}.attacker video,.attacker img{margin:5px 25%;border:none}.defender img{margin:5px 25%;border:none}.sender-image{max-width:30px;height:30px;border:none}.message-sender.with-image{line-height:30px}#scenes .scene h3{text-shadow:none}#scenes .scene h3 a{border:1px solid #403d3d;background-color:rgba(0,0,0,.6);color:#fff;border-radius:10px;padding:0px 10px}#combat li.combatant.active{background:rgba(0,0,0,.1)}li.folder{margin-left:8px}.chatModifiers .expand-mods{float:right;font-size:10px}.expandDetails.shown{display:block}.expandDetails.shown .filterHide{display:block}.expandDetails ul{margin:0 0 .5em 0;list-style-type:none}.expandDetails li{display:inline-block;font-size:12px;margin-right:5px}.mayorAttributeBox{margin-top:10px;max-width:150px}.mayorAttributeBox input,.mayorAttributeBox span{width:35px;display:inline-block}.showAll .notLearned{display:flex}.setCustomPrice.edit .priceTag,.setCustomPrice .customPriceTag{display:none}.minimumColumnLayout .notOnMinimum,.onlySingleColumn,.singleColumnLayout .onlyMultiColumn,.tokenQuickHot .subbuttons .secondary.shown.dsahidden,.domainToggle,.locktrue .advance,.privateMessageIndicator .fas,.chatIndicator .fas,.combatant:not(.active) .aggroButton,.tocCollapsing.expanded .col.three *,.tokenQuickHot .subbuttons .secondary:not(.shown),.hero .details{display:none}[data-hide-damage=true] .damageSecret,[data-hide-damage=true] .die-damage{display:none}.dsahidden,.roll-dialog-tag,.expandDetails{display:none}.chatModifiers ul,.chatModifiers div{display:none}.generationWizard [data-tab=description] h2,.notLearned,.showAll .filterHide,.statusEffectMenu .filterHide,.filterHide{display:none}.singleColumnLayout .onlySingleColumn,.setCustomPrice.edit .customPriceTag{display:block}.row-section.skills.searchbox{margin-bottom:10px;font-weight:normal;color:#0e0c0c}.row-section.skills.searchbox input{display:inline-block;width:calc(100% - 20px)}input[type=search]{width:calc(100% - 2px);min-width:20px;height:26px;background:rgba(0,0,0,.05);padding:1px 3px;margin:0;color:#191813;font-family:inherit;font-size:inherit;text-align:inherit;line-height:inherit;border:1px solid #7a7971;border-radius:3px;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.healthbar{height:24px;border:1px solid #615757;box-sizing:border-box;overflow:hidden;box-shadow:inset 0 0 10px #fff;position:relative;background:rgba(78,70,70,.5411764706)}.barLeft{border-top-left-radius:10px;border-bottom-left-radius:10px;border-right-width:0px}.barRight{border-top-right-radius:10px;border-bottom-right-radius:10px}.barRight.middle{border-radius:0px;border-right:none}.barRight .bar{width:calc(100%*var(--a)/var(--b))}.barLeft .bar{left:calc(100%*(1 - var(--a)/var(--b)));width:calc(100%*var(--a)/var(--b))}.barLeft.soloBar .bar{left:0;width:calc(100%*var(--a)/var(--b))}.bar{height:24px;width:100%;box-shadow:inset 0 0 10px #fff;position:absolute;z-index:0;top:0px;left:0px;transition:width .1s ease-in-out}.soloBar{border-top-right-radius:10px;border-bottom-right-radius:10px;border-right-width:1px}.barLabel{height:22px;padding:1px;text-align:center;box-sizing:border-box;color:#fff;position:relative;z-index:1;text-shadow:0px 0px 3px #000}.barLabel input{height:22px;line-height:22px;width:30px;display:inline-block;border:none;padding:0;margin:0;color:#fff;box-shadow:none;background:none;text-shadow:0px 0px 3px #000}.barLabel input:focus{box-shadow:none}.barLabel input:hover{background-color:rgba(0,0,0,.3)}.barLabel span{width:30px;display:inline-block}.soloBar .LeP{background:linear-gradient(90deg, rgb(101, 7, 7) 0%, rgb(207, 14, 14) 100%)}.LeP{background:#cf0e0e;background:linear-gradient(90deg, rgb(207, 14, 14) 0%, rgb(101, 7, 7) 100%)}.tempLeP{background:#fc8f2a;background:linear-gradient(90deg, rgb(252, 143, 42) 0%, rgb(182, 97, 1) 100%)}.AsP{background:#0e90cf;background:linear-gradient(90deg, rgb(11, 11, 217) 0%, rgb(14, 144, 207) 100%)}.KaP{background:#93cf0e;background:linear-gradient(90deg, rgb(4, 162, 54) 0%, rgb(147, 207, 14) 100%)}.schip{width:25px;height:25px;background-size:contain;background-repeat:no-repeat;display:inline-block}.schip.tiny{width:15px;height:15px}.schip:active,.schip:focus{box-shadow:none;border:none}.emptySchip{background-image:url("../../icons/gray_schip.webp")}.fullSchip{background-image:url("../../icons/schip.webp")}.sheet nav.sheet-tabs .item.active,.tabs .item.active{text-shadow:0 0 10px #bc886f,0 0 10px #bc886f;border-bottom:3px solid var(--border-color)}.sheet nav.sheet-tabs .item{padding:8px 12px 5px 12px;border-bottom:3px solid rgba(0,0,0,0)}.dieButton span{border:1px solid rgba(0,0,0,0)}.dieButton.dieSelected span{border:1px solid #000}.dsa5.item-sheet .statusEffect img,.statusEffect img{border:none;background:rgba(0,0,0,.3);height:28px;width:28px;margin:0}.diseases .statusEffect img{height:20px;width:20px;border:1px solid rgba(0,0,0,0)}.diseases .statusEffect img:hover{border-color:#000}.statusEffect{height:34px;line-height:34px}.statusEffectMenu .status-create{line-height:26px;display:block}.statusEffectMenu ul{display:none;position:absolute;right:-10px;top:-10px;width:224px;border:1px solid #000;background:rgba(0,0,0,.7);padding:8px;margin:0;min-height:90px}.statusEffectMenu li.search{display:block;width:100%;margin-bottom:10px}.statusEffectMenu li.search input{color:#fff;width:80%}.statusEffectMenu li.search a{color:#fff;border:1px solid #fff;padding:4px 8px;border-radius:2px}.form-group input::placeholder{color:#adaaaa}.statusEffectMenu li.search input::placeholder{color:#adaaaa}.statusEffectMenu li.search:hover{border-color:rgba(0,0,0,0)}.opposed-message{text-align:center}.statusEffectMenu li{display:inline-block;width:30px;height:30px;border:1px solid rgba(0,0,0,0)}.statusEffectMenu li:hover{border:1px solid #000}.statusEffectMenu img{width:30px;height:30px;border:none}.itemLibrary{padding:10px}.itemLibrary nav{line-height:20px;margin-bottom:10px}.itemLibrary nav img{position:relative;top:3px;margin-right:3px;min-width:20px}.itemLibrary ul{display:flex;flex-wrap:wrap;width:100%}.itemLibrary ul li.browser-item{list-style-type:none;flex:24%;display:inline-block;display:flex;line-height:26px;min-width:120px}.itemLibrary ul li.browser-item .priceDrag{padding-top:2px;min-width:30px;line-height:10px;font-size:10px;cursor:grab;text-overflow:ellipsis;overflow:hidden}.itemLibrary .item-list li.browser-item{flex:49%;border:1px solid #ddd;min-width:240px}.itemLibrary .item-list li.browser-item a{display:inline-block;padding:2px;width:calc(100% - 44px);height:40px;line-height:36px}.itemLibrary .item-list li.browser-item .image{height:40px;width:40px;display:inline-block;background-size:contain}.itemLibrary .categories li label{text-overflow:ellipsis;overflow:hidden;min-width:80px}.lineheight2{line-height:26px}.lineheight2 span{display:inline-block;vertical-align:middle;line-height:12px}.itemLibrary .item-list li a span{display:inline-block;vertical-align:middle;line-height:12px}.dsalist{list-style-type:none}.sheet.journal-entry.dsajournal .pages-list .directory-item .page-heading .page-heading{margin-left:10px}.dsajournal .heading.h2 a:before,.dsalist li::before{content:"";display:inline-block;height:10px;width:20px;position:absolute;left:-20px;top:2px;background-image:url("../../icons/dsalist.webp");background-size:contain;background-repeat:no-repeat}.chatImgPreview .image{width:60px;height:60px;background-size:contain;background-repeat:no-repeat;background-position:center;margin:0 auto}.dsajournal .heading.h2 a:before{position:relative;width:15px;left:-5px}.item .image.extension{height:auto;background-position:center;margin:4px}.extension{background-image:url("../../icons/categories/Spellextension.webp")}.extensions p{line-height:15px}.card-content input{width:30px;display:inline-block}.window-app.largeDialog .window-content .dialog-buttons{flex-grow:0;display:flex}.largeDialog button.default{background:rgba(0,0,0,.05);border:2px groove #c9c7b8}.largeDialog .row-section label{flex:1}.largeDialog h2{margin-top:20px}.largeDialog h3{margin-top:10px}.largeDialog .sheet-tabs{height:32px;flex:0 0 32px;margin:4px 0;border-top:1px solid #b5b3a4;border-bottom:1px solid #b5b3a4}.largeDialog .sheet-tabs .item{padding:8px 12px 5px 12px;border-bottom:2px solid rgba(0,0,0,0)}.largeDialog .show-item{display:inline-block;font-size:10px;border:1px solid #a09494;border-radius:100%;width:20px;height:20px;line-height:18px;color:#5a5a5a;text-align:center}.largeDialog img{border:none;margin-bottom:10px}.largeDialog .error{width:100%}.largeDialog .error p{background:#970808;color:#fff}.chatButton,.roll-button{border:1px solid var(--border-color);padding:2px;border-radius:3px;box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset;display:inline-block}.chatButton img{display:inline-block;margin:0;margin-right:4px;width:15px;height:15px;background:#000;position:relative;top:2px}h2 .chatButton img{width:30px;height:30px;top:5px}h2 .chat-condition,h2 .chatButton{width:100%;border:none;box-shadow:none;background:none}.chatButton i,.roll-button i{margin-right:1px}.botch-roll{color:darkred}.detailbox{border:1px solid var(--border-color);padding:5px}.quickfind{position:absolute;background-image:url("../../icons/backgrounds/quickfind.webp");background-size:100%;background-repeat:no-repeat;background-position:top;padding:15px;padding-top:74px;bottom:100%;width:100%;color:#000;line-height:26px}.quickfind ul{list-style-type:none;margin:0}.quickfind li{padding:0px 4px;display:inline-block;border:2px solid rgba(0,0,0,0);width:100%}.quickfind li:hover{background-color:rgba(0,0,0,.2);text-shadow:none}.quickfind li:before{height:22px;background-position:center}.quickfind li.focus{border:2px solid #946603;border-radius:2px}.fokusregel{width:100px;float:right;background-image:url("../../icons/fokus.webp");background-size:100%;background-repeat:no-repeat;height:72px;text-align:center;line-height:72px;font-family:"Andalus";color:darkred;position:relative;margin-bottom:10px;font-weight:bold}.fokusregel:after{position:absolute;font-size:28px;bottom:0;left:0;right:0}.fokusregel.f1:after{content:"I"}.fokusregel.f2:after{content:"II"}.magazinContainer{display:inline-block;width:3px}.initTracker .item-structure{top:-102%;border-color:#0e0c0c}.item-structure{border:.5px solid var(--bg-color);height:100%;width:4px;position:relative}.item-structure .inner{position:absolute;left:0;right:0;bottom:0;height:calc(100%*var(--b)/var(--a));background-color:#20ca02}a.documentName-link,a.inline-roll{background:var(--bg-color)}.whisper .privateMessageIndicator .fas{display:inline-block;color:#730707}.blind .chatIndicator .fa-eye-slash{display:inline-block;color:#2248a2}#token-hud .attribute.bar1 input{border:1px solid #e60c0c}#token-hud .attribute.bar2 input{border:1px solid #659db5}#token-hud .attribute.bar3{position:absolute;top:-45px}#token-hud .attribute.bar3 input{border:1px solid #7cd000}.specAbsContainer{margin-left:20px;padding:10px}.specAbs{border:1px solid var(--border-color);box-shadow:0 0 12px rgba(110,59,1,.5607843137) inset;border-radius:2px;line-height:20px;color:#888;position:relative}.specAbs>div{padding:3px}.specAbs.active{color:inherit}.specAbs .variantChange{text-align:center;border:1px solid var(--border-color);border-radius:50%;background-color:#5b260c;position:absolute;left:-16px;top:calc(50% - 10px);width:20px;height:20px;line-height:20px;color:#fff;padding:0;transition:all ease-in-out .3s}.specAbs .variantChange:hover{background-color:#000}.noBorder,.bookWizardsheet .window-content .table-title.noBorder,.dialog-buttons img,.result-image{border:none}.bookWizardsheet .sheet.journal-entry .pages-list .heading-link{line-height:inherit;font-size:unset}.bookWizardsheet .sheet.journal-entry .pages-list .headings{display:block;font-family:var(--normalFont);margin:6px 0 0 3px;--level-indent: 8px}.bookWizardsheet .sheet.journal-entry .pages-list .headings li{line-height:inherit;height:auto}.bookWizardsheet .sheet.journal-entry .pages-list .headings li:last-child{margin-bottom:.1rem}.libraryImg,.extImg{background-image:url("../../icons/categories/ability_combat.webp");background-size:contain;background-repeat:no-repeat;background-position:center}input[type=checkbox].smallBox{width:15px;height:15px}.specImg{background-image:url("../../icons/categories/ability_combat.webp");background-size:contain;background-repeat:no-repeat;background-position:center}.specImg.ab_1{background-image:url("../../icons/categories/Combat_Skill.webp")}.specImg.ab_2{background-image:url("../../icons/categories/Skill.webp")}.specImg.ab_3{background-image:url("../../icons/categories/Armor.webp")}.specImg.ab_4{background-image:url("../../icons/categories/ability_general.webp")}.libraryImg{background-image:url("../../icons/backgrounds/library.webp");margin-top:50px;height:300px}.extImg{background-image:url("../../icons/categories/Spellextension.webp")}.embeddedItemDrag,.rollTarget{cursor:pointer}.specAbs:hover{cursor:pointer}.specAbs.active{border-color:#cf1e1e}#chat-controls .control-buttons{flex:0 0 72px}.centerMargin,.loader{margin:0 auto}.libItem .compendium{font-size:10px;color:#696767;line-height:10px;text-align:center;pointer-events:none}.browser-item:hover{box-shadow:inset 0px 0px 5px #000}.browser-item a:hover{text-shadow:none}.browser-item .compendium{position:absolute;bottom:2px;right:2px;font-size:10px;color:#696767;line-height:10px}.chat-condition,.item-sheet .chatButton,.dsajournal .chatButton{padding:0px 4px;border:1px solid #4b4a44;border-radius:2px;white-space:nowrap;word-break:break-all;box-shadow:none;background:var(--bg-color);display:inline}.chat-condition img,.item-sheet .chatButton img,.dsajournal .chatButton img{top:3px}.obfuscationBtn:nth-of-type(2){display:none}.chatpaperfield{border-image:url("../../icons/backgrounds/chatpaper_v45.webp");clear:both;border-image-width:24px;border-image-slice:70 70 70 fill;margin:25px 0px;padding:20px 20px 20px 30px}.maskfield{position:relative;clear:both;padding:70px 30px 30px 30px;margin:34px 0px;border-image:url("../../icons/backgrounds/maskfield_v45.webp");border-image-width:60px 20px 60px 20px;border-image-slice:90 30 90 30 fill}.citefield{position:relative;clear:both;padding:30px;margin:25px 0px;border-image:url("../../icons/backgrounds/cite_v45.webp");border-image-width:60px 20px 60px 20px;border-image-slice:90 30 90 30 fill}.dsajournal .window-content .maskfield tr:first-child{background:none}.nobr{white-space:nowrap}select.noAppearance{-webkit-appearance:none;appearance:none;height:auto;text-align:center;width:100%}.aggroButton{border-radius:100%;padding:3px;display:block;width:24px;position:absolute;left:-20px;height:24px;margin-top:12px;border:1px solid darkred;background-color:#fff;cursor:pointer;box-shadow:2px 2px 6px #000;z-index:1}.aggroButton:hover{background-color:#d1d1ca}#combat-popout.combat-sidebar li.combatant .token-initiative .initiative,#combat-popout.combat-sidebar li.combatant .token-name{text-shadow:none}#combat-popout .aggroButton{left:-1px}.subweapon{margin-left:15px}.adventurePoints .row-section:hover{background-color:rgba(0,0,0,.2)}.adventurePoints .fa-plus,.adventurePoints .fa-angles-up{color:green}.adventurePoints .fa-minus,.adventurePoints .fa-angles-down{color:darkred}.effect-change .key input{width:90%}.effect-change .selMenu+.select2{width:8%;background:#efe4e4;position:absolute}.effect-change .selMenu+.select2 .select2-selection__rendered{width:0px;padding:0}.effect-change .selMenu+.select2.select2-container--open{width:100%;left:0}.effect-change .selMenu+.select2.select2-container--open .select2-selection__rendered{width:100%;padding:0}.gearDamaged,.resistEffect,.applyEffect,.applyTableEffect,.placeTemplate,.smallChatButton{width:100%;padding:4px;height:100%;line-height:unset;font-size:11px}.adventureWizard .fa-toggle-on,.adventureWizard .fa-check{color:green}.adventureWizard .fa-toggle-off,.adventureWizard .fa-times{color:darkred}.adventureWizard .toc{list-style-type:none;padding-left:4px}.adventureWizard .toc ul{list-style-type:none;padding-left:0px}.tocCollapsing.expanded .col.three{flex:20px}.tocCollapsing.expanded .col.seventy{flex:calc(100% - 20px)}.tocCollapserBox{position:relative;height:0}.tocCollapser{position:absolute;top:30px;left:-5px;font-size:10px}.getChapter.selected,.subChapter.selected{font-weight:bold}.inputTooltipAvailable:after{content:"*";position:absolute;right:3px;top:3px;font-size:10px;color:#82817d}.subChapter{font-weight:normal;font-family:var(--normalFont)}.toc ul li{display:block;padding:4px}.toc ul li:before{color:darkred;margin-right:5px}.adventureWizard .cover{width:98%;position:relative}.scrollable{overflow-y:auto;max-height:100%}.adventureWizard{max-height:100%}.adventureWizard>div{max-height:100%}.adventureWizard .chapter{padding:8px}.adventureWizard .chapter *{user-select:text}.adventureWizard .toc{scrollbar-width:6px}.adventureWizard .toc::-webkit-scrollbar{width:6px}.adventureWizard .picto{height:40px;line-height:40px}.adventureWizard .breadcrumbs{display:flex;background-color:rgba(202,183,180,.3803921569);border-radius:5px;border-bottom:1px solid #b5b3a4;border-top:1px solid #b5b3a4}.adventureWizard .breadcrumbs>div{flex:1;max-width:150px;min-width:150px;border-radius:5px;padding:3px;margin:1px;box-shadow:inset 0px 0px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .3s ease-in-out;text-align:center}.adventureWizard .breadcrumbs>div:hover{cursor:pointer;background-color:rgba(14,12,12,.3);color:#fff}.picto.ten{max-width:10%}.picto.fourty{max-width:40%}.journalHeader .jrnIcons{color:#5c5c5c;float:right}.journalHeader .jrnIcons a{display:inline-block;margin-right:10px}.position-relative{position:relative}.combatant-advanced{flex:0 0 48px;position:relative;height:50px}.combatant-advanced i{position:absolute;bottom:0;right:0;color:#000;width:14px}.combatant-advanced .actions,.combatant-advanced .ongoing{font-size:10px;background:#6f3900;width:14px;height:15px;padding:0;margin:0;line-height:15px;text-align:center;color:#fff;border-radius:50px;position:absolute;right:0;top:0}.combatant-advanced .actions{left:0;right:auto;background:#6d0400}.initTracker .combatant-advanced .actions{right:0;left:unset}.initTracker .combatant-advanced .ongoing{bottom:4px;top:unset}.combatant-advanced i.reversed{transform:scaleX(-1)}.combatant-advanced i.def:after{content:attr(data-defenseCount);position:absolute;left:0;right:0;text-align:center;z-index:1;color:#fff;font-size:10px;line-height:12px}.initTracker .combatant-advanced{height:var(--iniTrackerSize)}.initTracker .combatant-advanced i{left:4px;bottom:4px;right:unset}.tinyEntityLink a{width:22px;overflow:hidden;font-size:12px;float:right;overflow:hidden;border:1px solid #000}.tokenQuickHot{position:absolute;top:0;height:var(--tokenQuickhotsize);left:5px;right:7px;z-index:-2;transition:transform .3s ease-in-out}.tokenQuickHot ul{font-size:0;display:inline-block}.tokenQuickHot.expanded{transform:translateY(-45px)}.tokenQuickHot .subbuttons{position:absolute;z-index:2}#controls ol li.control-tool[data-tool=targetUser]{color:#609ec6}.tokenQuickHot .direction0 .subbuttons{bottom:var(--tokenQuickhotdistance)}.tokenQuickHot .direction1 .subbuttons{right:var(--tokenQuickhotdistance)}.tokenQuickHot .direction2 .subbuttons{top:var(--tokenQuickhotdistance)}.tokenQuickHot .direction3 .subbuttons{left:var(--tokenQuickhotdistance)}.tokenQuickHot .direction1 .dragHandler,.tokenQuickHot .direction3 .dragHandler{height:14px;width:var(--tokenQuickhotsize);line-height:14px}.initTracker .dragHandler,.tokenQuickHot .dragHandler{width:14px;height:var(--tokenQuickhotsize);background:rgba(0,0,0,.2);text-align:center;line-height:var(--tokenQuickhotsize);float:right}.initTracker .dragHandler:hover{color:#fff}.tokenQuickHot .dragHandler:hover{color:#fff}.tokenQuickHot a{box-shadow:inset 0px 0px 10px #403014;color:#fff;padding:2px;margin-bottom:2px}.tokenQuickHot .effect>div{background-color:rgba(0,0,0,.3)}.initTracker li,.tokenQuickHot li{background-color:rgba(0,0,0,.5);display:inline-block;font-size:14px;width:var(--tokenQuickhotsize);height:var(--tokenQuickhotsize);border:1px solid #000;border-radius:3px;pointer-events:all;background-size:cover;box-shadow:inset 0px 0px 5px #636363;background-repeat:no-repeat;position:relative;box-sizing:border-box}.tokenQuickHot li input{color:#fff}.tokenQuickHot li .subbuttons li{width:200px;height:28px;line-height:28px}.initTracker .waitingTackerList li{width:calc(var(--iniTrackerSize)*.5);height:calc(var(--iniTrackerSize)*.5)}.waitingTackerList{position:absolute;top:calc(var(--iniTrackerSize)*-0.5);left:30px;z-index:-1}.initTracker .iniItem.newRound,.initTracker .newRound{border-color:#496fd7;background-color:rgba(73,111,215,.1764705882);box-shadow:inset 0px 0px 10px #496fd7;border-top-left-radius:0px;border-bottom-left-radius:0px}.initTracker .iniItem.newRound .iniNumber,.initTracker .newRound .iniNumber{border-top-left-radius:0px;border-bottom-left-radius:0px}.initTracker .turnRound{padding:2px;border-radius:100%;width:21px;display:inline-block}.initTracker .newRound .turnRound{background-color:#496fd7}.initTracker .waitTitle{background-image:none}.initTracker .waitTitle i{float:left;width:100%;line-height:calc(var(--iniTrackerSize)*.5);text-align:center;color:#fff}.initTracker li{box-shadow:none;border:1px solid rgba(0,0,0,0);background-color:rgba(0,0,0,0);cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:10px}.initTracker li .roll:before{position:absolute;content:"6";color:#fff;left:0;right:0;top:5px;bottom:0;text-align:center}.initTracker .token-initiative{position:absolute;bottom:-20px;left:0;right:0}.initTracker .aggroButton{left:0;right:0;margin:0 auto 0;bottom:0}.initTracker li .roll{position:relative;display:block;width:30px;height:30px;background:url("../../icons/dice/d6white.svg") no-repeat 50% 50%;background-size:auto;background-size:35px;margin:0 auto}.initTracker li.active{border-color:#fff;box-shadow:inset 0px 0px 10px #fff}.initTracker li.defeated,.initTracker li.hidden{opacity:.5}.initTracker li.defeated{background-size:75% 75%;background-position:center}.iniTrackerList{margin:0;padding:0;display:inline-block}.initTracker .dragHandler{width:15px;background:none;border:none;line-height:var(--iniTrackerSize)}.initTracker li{width:var(--iniTrackerSize);height:var(--iniTrackerSize)}#hotbar .skillItems li:hover,.tokenQuickHot li:hover{border:1px solid red;cursor:pointer}.tokenStatusEffects .dialog-content{height:100%;min-height:calc(100% - 24px)}.tokenQuickHot .tokenHotbarInner{opacity:var(--tokenHotbarOpacity);transition:opacity .3s ease-in-out}.tokenQuickHot .tokenHotbarInner:hover{opacity:1}.tokenQuickHot .tokenHotbarInner .skillgm.body,.tokenQuickHot .tokenHotbarInner .skill.body{background:#4f6d65;box-shadow:none;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.social,.tokenQuickHot .tokenHotbarInner .skill.social{background:#85302e;box-shadow:none;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.knowledge,.tokenQuickHot .tokenHotbarInner .skill.knowledge{background:#4b6585;box-shadow:none;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.trade,.tokenQuickHot .tokenHotbarInner .skill.trade{background:#cda25e;box-shadow:none;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner .skillgm.nature,.tokenQuickHot .tokenHotbarInner .skill.nature{background:#535829;box-shadow:none;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgb(255, 255, 255) 100%)}.tokenQuickHot .tokenHotbarInner div{background-size:cover;height:100%;width:100%;position:absolute;color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}.tokenQuickHot .tokenHotbarInner input{height:var(--tokenQuickhotsize);display:block;width:100%;margin:0;float:left;text-align:center;font-size:20px;border:none}.tokenQuickHot .tokenHotbarInner .itdarkness{width:calc(var(--tokenQuickhotsize)*2);position:relative}.tokenQuickHot .tokenHotbarInner .itdarkness input{height:auto;position:absolute;bottom:0}.tokenQuickHot .tokenHotbarInner .itdarkness i{position:absolute;top:4px;left:6px;color:#8a6100}.tokenQuickHot .tokenHotbarInner .itdarkness i.fa-moon{color:#05235b;right:6px;left:unset}.tokenQuickHot .tokenHotbarInner .subbuttons .combatTooltip{height:35px;line-height:35px;text-align:center;width:100px}.tokenQuickHot .tokenHotbarInner .subbuttons div{background-size:contain;background-repeat:no-repeat;background-position:center;width:30px;position:inherit;float:left}.tokenQuickHot .tokenHotbarInner .subbuttons label{display:inline-block;cursor:pointer;overflow:hidden;max-width:155px;text-overflow:ellipsis;white-space:nowrap}.tokenQuickHot li span{position:absolute;top:-25px;left:-73px;background:#1d1c1c;width:180px;display:inline-block;color:#fff;padding:5px;text-align:center;border-radius:4px}.tokenQuickHot li .fa{font-size:calc(var(--tokenQuickhotsize) - 15px);line-height:var(--tokenQuickhotsize);text-align:center}.tokenQuickHot li.spell{box-shadow:inset 0px 0px 10px #121092}.tokenQuickHot li.skill{box-shadow:inset 0px 0px 10px #0d813e}.window-app.initTracker .window-header,.window-app.tokenQuickHot .window-header{display:none}.window-app.initTracker,.window-app.tokenQuickHot{padding:0}.initTracker .controls{display:inline-block;width:29px}.initTracker:hover .iniDetailsList{display:block}.iniDetailsList{margin:10px 29px 0 29px;padding:0;display:none}.iniDetailsList li{text-align:center;color:#fff;background:none}.iniDetailsList li .iniNumber{background:rgba(0,0,0,.5);border-radius:5px}.iniDetailsList .token-effects{display:flex;flex-wrap:wrap;padding:5px 0;min-height:30px}.iniDetailsList .token-effects img{width:20px;border:none;box-shadow:0px 0px 10px #000 inset}.initTracker .hoverbuttons{color:#fff;position:absolute;right:0;top:25%;opacity:0;transform:opacity .3s}.initTracker .combat-control{min-width:20px;display:inline-block}.initTracker li:hover .hoverbuttons{opacity:1}.initTracker .controls i{color:#fff;background:rgba(0,0,0,.7);border-radius:5px}.initTracker .controls.right{text-align:right}.initTracker button{line-height:21px}.tokenHotbarInner>ul>li.effect>div:before{font-family:"Font Awesome 5 Free";font-weight:900;content:""}.window-app.initTracker::after,.window-app.initTracker .window-content{background:none;margin:0;padding:0;overflow:visible}.window-app.tokenQuickHot::after,.window-app.tokenQuickHot .window-content{background:none;margin:0;padding:0;overflow:visible}.window-app.initTracker::after,.window-app.tokenQuickHot::after{content:none}.ench-fw{position:relative;top:-3px}.bags .slot{width:50px;height:50px;background-size:contain;border:1px solid var(--border-color);background-color:#faebd7;background-repeat:no-repeat;background-position:center;border-radius:5px;cursor:pointer}.bags .slot.deactivated{opacity:.5}.bags .slot:hover{border-color:#0a59c2}.dsajournal h4{color:#853c26;font-weight:bold;font-size:1.1em}.itemInfo{position:absolute;display:none;width:200px;border:1px solid var(--border-color);padding:5px;background-color:rgba(0,0,0,.8);color:#fff;border-radius:5px}.bagUsage{position:relative;border:1px solid var(--border-color);margin:5px;background-color:rgba(14,12,12,.1)}.bagUsage .fillage{position:absolute;top:0;left:0;bottom:0;background-color:#40a9dd}.bagUsage .fillage.exceeded{background-color:#d42d2d}.bagUsage .fillText{position:relative;z-index:1}.fa-dsa5-player,.fa-dsa5{position:relative;width:25px;height:25px}.fa-dsa5-player:before,.fa-dsa5:before{content:"";background-image:url("../../icons/categories/DSA-Auge.webp");background-size:contain;background-repeat:no-repeat;background-position:center;position:absolute;left:0;right:0;top:0;bottom:0}.fa-dsa5-lighthelper:before{background-image:url("../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp")}.fa-dsa5-foodsearch:before{background-image:url("../../icons/talents/Lebensmittelbearbeitung.webp")}.fa-dsa5-adci:before{background-image:url("../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp")}.fa-dsa5-plantHelper:before{background-image:url("../../../../modules/dsa5-herbarium/icons/plant/Alraune.webp")}.fa-dsa5-player:before{background-image:url("../../icons/categories/DSA-Auge-Spieler.webp")}.columnFlex{display:flex;flex-direction:column}.verticalFlex{display:flex;flex-direction:row;position:relative}.verticalFlex .bar{flex:1;height:30%}.verticalFlex .bar.AsP{top:30%}.verticalFlex .bar.KaP{top:60%}.bar-wounds.swarmcount:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 98%, rgba(0, 0, 0, 0.3) 100%);background-size:calc(100%/var(--swarm) + .1%) 100%;background-repeat:repeat-x}.hero.victim{box-shadow:inset 0px 0px 10px #8a0202}.smallBoxItem,.hero .actorItem{display:inline-block;padding:2px;border:1px solid var(--border-color);line-height:12px;border-radius:2px}.domainsPretty li{display:inline-block;border:ridge 2px #daa520;line-height:18px;border-radius:2px;margin:3px;padding:0px 8px;box-shadow:1px 1px 3px #000;background-color:#f4da99}.domainsPretty li.magical{border-color:#0a59c2;background-color:#c0dbff}.domainsPretty li.blessed{border-color:#006f3d;background-color:#bae1b1}#combat li.combatant .token-resource{color:#777171}.progress{width:27px;height:27px;line-height:27px;background:none;margin:0 auto;box-shadow:none;position:relative;float:right}.progress>span{width:50%;height:100%;overflow:hidden;position:absolute;top:0;z-index:1}.progress .progress-left{left:0}.progress .progress-bar{width:100%;height:100%;background:none;border-width:2px;border-style:solid;position:absolute;top:0}.progress .progress-left .progress-bar{left:100%;border-top-right-radius:13.5px;border-bottom-right-radius:13.5px;border-left:0;-webkit-transform-origin:center left;transform-origin:center left;transform:rotate(var(--transformLeft))}.progress .progress-right{right:0}.progress .progress-right .progress-bar{left:-100%;border-top-left-radius:13.5px;border-bottom-left-radius:13.5px;border-right:0;-webkit-transform-origin:center right;transform-origin:center right;transform:rotate(var(--transformRight))}.progress .progress-value{width:90%;height:90%;border-radius:50%;color:#44484b;font-size:8px;line-height:27px;text-align:center;position:absolute;top:5%;left:5%}.progress.blue .progress-bar{border-color:#0e4f79}.patchviewer h1{margin:0}.patchviewer h1 a{display:block;float:left;color:#000}.patchviewer h1 img{width:50px;margin:0;margin-right:15px;float:left}.patchviewer .table-title{border:1px solid var(--border-color);border-radius:10px}.noscrollWizard .content{overflow-y:hidden}.skill-test .targets{align-items:center;justify-content:center;margin-bottom:20px}.skill-test .targets .image{width:40px;height:40px;position:relative}.multipleTarget{margin-left:25px}.missingTarget{margin-left:25px}.missingTarget div i{color:darkred}.skill-test .targets div i{color:darkred}.targets .addTarget{margin-left:20px}.targetChoser .combatant{border:1px solid rgba(0,0,0,0)}.targetChoser .combatant.hidden{opacity:.5}.targetChoser .combatant:hover{background:rgba(0,0,0,.1)}.targetChoser .combatant.selectedTarget{border-color:#000}.multipleTarget i{color:#e68044}.skill-test .targets .image i{position:absolute;z-index:1;bottom:0;left:0;top:0;right:0}.libButton .label-text i{font-size:12px}.libButton .fa-toggle-off{color:darkred;margin-right:6px}.libButton .on .fa-toggle-off{color:green}.libButton .on .fa-toggle-off:before{content:""}.searchMatch{background-color:#ff0}.searchLines{position:absolute;top:0px;right:0;width:16px;bottom:0;pointer-events:none}.searchLines .marker{position:absolute;width:100%;height:2px;background-color:#fff;pointer-events:none}.tinyHudIcons{border:1px solid #000;margin-left:1px;width:40px;border-radius:5px;height:40px;background-image:url("../../icons/backgrounds/macrobg.webp");background-repeat:no-repeat}.advancedSearch .groupbox{margin:0;margin-right:10px;padding:3px}.advancedSearch .groupbox select{width:100%}.advancedSearch .groupbox .form-group{margin-top:4px}.advancedSearch .cbParent{line-height:24px}.advancedSearch .cbParent label{text-overflow:ellipsis}.advancedSearch input[type=checkbox]{float:right}input[type=checkbox].autoCheckbox{width:auto;height:auto}.slot,.gearD{z-index:0;position:relative}.item .image{position:relative}.item .image.rar,.item .image.common{z-index:0}.item .image .overlayicon{position:absolute;top:0;left:0;color:#7d5900;text-shadow:0 0 1px #fff}.gearD:before{content:"";background-size:contain;background-repeat:no-repeat;position:absolute;width:12px;height:12px;left:25px;bottom:0;z-index:1}.damaged1:before{background-image:url("../../icons/damaged1.webp")}.damaged2:before{background-image:url("../../icons/damaged2.webp")}.damaged3:before,.damaged4:before{background-image:url("../../icons/damaged3.webp")}.slot div{height:100%;background-size:contain}.damaged1 .slot.rar:after,.slot.common:after{content:"";background-image:url("../../icons/backgrounds/common.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:0;right:0;bottom:0;top:0;z-index:-1;opacity:.4}.image.rar:after,.image.common:after{content:"";background-image:url("../../icons/backgrounds/common.webp");background-size:contain;background-repeat:no-repeat;position:absolute;left:0;right:0;bottom:0;top:0;z-index:-1;opacity:.4}.image.rar:after,.image.common:after{background-position:4px 0px}.image.rar:after{background-image:url("../../icons/backgrounds/rar.webp");opacity:.7}.defenseToggle .off{color:#d3d3d3}.garadanborder{max-width:80%;border-image-source:url("../../icons/backgrounds/garadanborder.webp");clear:both;border-image-width:16px;border-image-slice:16 5 33 5 fill;margin:0 auto}.garadanborder .innersection{padding-bottom:20px}.garadanb.garadanborder,.garadanb{max-width:100%;border-image-width:16px;border-image-slice:30 5 50 5 fill;text-align:center;font-weight:bold;letter-spacing:1px}.garadanb.garadanborder *,.garadanb *{border:none}.garadanb.garadanborder small,.garadanb small{font-size:smaller;line-height:auto;font-weight:normal;letter-spacing:0px;margin:0;padding:0}.garadanb{padding-bottom:30px;padding-left:20px;padding-right:20px;border-image-source:url("../../icons/backgrounds/garadanb.webp")}.garadanb.garadanborder{position:initial;border-image-slice:16 5 33 5 fill;padding-bottom:0px;border-image-source:url("../../icons/backgrounds/garadanborder.webp")}.garadanicon{background-repeat:no-repeat;background-size:contain;height:55px;margin-left:55%;margin-top:12px;background-position:center;width:55px}.garjourn{display:inline-block;width:15px;height:15px;background-size:contain;background-repeat:no-repeat;margin-left:3px;margin-right:3px}.garjourn.boronsrad{background-image:url("../../icons/Garadan6.webp")}.garjourn.koenig{background-image:url("../../icons/KoenigIcon.webp")}.garjourn.springer{background-image:url("../../icons/SpringerIcon.webp")}.garjourn.turm{background-image:url("../../icons/TurmIcon.webp")}.garjourn.bauer{background-image:url("../../icons/BauerIcon.webp")}.journal-picto{display:inline-block;position:relative;min-width:20px;margin-left:5px}.journal-picto:before{content:"";position:absolute;bottom:0;top:0;left:0;right:0;background-repeat:no-repeat;background-position:center;background-size:contain}.garadanborder h2{text-decoration:none;border:none;margin:0;margin-top:0px;margin-top:20px;font-size:24px;line-height:24px}.garadanborder h3{margin:0;border:none;font-size:14px}.reactClick{margin:2px}.reactClick img{width:26px;float:left;border:none}.didYouKnow,.tinyNotifications li{background-color:rgba(0,0,0,.548);color:#fff;border-radius:10px;padding:10px}.bumFight,.didYouKnow{position:fixed;top:40%;left:calc(50% - 200px);z-index:1002;width:400px;display:none}.bumFight .col.five,.didYouKnow .col.five{display:flex;justify-content:center;align-items:center}.bumFight{display:block;transition:all 2s ease;width:500px;left:calc(50% - 250px);top:20%}.bumFight .intererior{position:absolute;top:calc(50% - 175px);left:0;bottom:0;right:0}.bumFight .fist{border:none;width:250px;height:250px;margin-left:110px;margin-top:80px;position:relative;z-index:-1;animation:bumAnimation .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards,bumAnimation2 .7s cubic-bezier(0.64, 0, 0.78, 0) .5s 1 normal forwards}.bumFight .title{border-bottom:none;text-align:center;font-size:40px;position:relative;z-index:1;background:url("../../../../ui/pausebg.png") no-repeat 50% 50%;color:#fff;border-radius:10px;padding:10px;text-shadow:#000;animation:bumAnimation .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards,bumAnimation2 .7s cubic-bezier(0.64, 0, 0.78, 0) .5s 1 normal forwards}.bumFight .glass{border:none;width:500px;height:500px;opacity:0;animation:windowAnim .5s cubic-bezier(0.64, 0, 0.78, 0) 0s 1 normal forwards}@keyframes bumAnimation{0%{transform:scale(0);opacity:0}50%{opacity:1}100%{transform:scale(1)}}@keyframes windowAnim{0%{opacity:0}99%{opacity:0}100%{opacity:1}}@keyframes bumAnimation2{0%{animation-timing-function:ease-out;transform:scale(1);transform-origin:center center}10%{animation-timing-function:ease-in;transform:scale(0.91)}17%{animation-timing-function:ease-out;transform:scale(0.98)}33%{animation-timing-function:ease-in;transform:scale(0.87)}45%{animation-timing-function:ease-out;transform:scale(1)}}.flexAlignCenter{justify-content:center;align-items:center}.settings-sidebar button{margin:3px 0}#sidebar{overflow:visible}.plantContainer{display:inline-block;position:relative;cursor:pointer;height:45px;width:45px}.plantContainer input{position:absolute;opacity:0;height:45px;width:45px}.plantContainer span{position:absolute;top:0;left:0;height:45px;width:45px;background:url("../../icons/categories/planthealing.webp");background-position:center;background-size:contain;background-repeat:no-repeat;opacity:.45;transition:all .3s ease-in-out}.plantContainer.defensive span{background-image:url("../../icons/categories/plantdefensive.webp")}.plantContainer.psychic span{background-image:url("../../icons/categories/plantpsychic.webp")}.plantContainer.physical span{background-image:url("../../icons/categories/plantphysical.webp")}.plantContainer.crop span{background-image:url("../../icons/categories/plantcrop.webp")}.plantContainer.poison span{background-image:url("../../icons/categories/plantpoison.webp")}.plantContainer.supernatural span{background-image:url("../../icons/categories/plantsupernatural.webp")}.plantContainer:hover input~span,.plantContainer input:checked~span{opacity:1}.tinyNotifications{position:fixed;top:calc(100% - 250px);left:50px;list-style:none;margin:0;padding:0;z-index:160}.fxmaster .window-content .directory-item .config input[type=text]{color:#000}.ammo-selector{width:calc(100% - 31px);padding:0px;margin:0px 1px}.window-app .condition-show{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.panToToken{cursor:pointer}.panToToken:hover{box-shadow:inset 0px 0px 5px #000}.rowHover:hover{box-shadow:inset 0px 0px 5px #000}#sidebar,#players,#hotbar{position:relative}.effect-change input::placeholder{color:#a9a7a0}.select2-results__option[role=group]:hover{background-color:rgba(0,0,0,0)}.theme-dark .application .select2-container--default .select2-selection--single .select2-selection__rendered{color:#fff}.postChatSection.maskfield:after{background-image:url("../../icons/backgrounds/blackbook.webp");background-size:250px 30px;background-position:center calc(100% - 8px)}.postChatSection .postContentChat{cursor:pointer}.postChatSection .postContentChat em{padding:5px;border-radius:50%;transition:.3s ease-in-out all}.postChatSection .postContentChat:hover em{background-color:#fff;color:#000}.navWrapper{position:relative}.navWrapper .sheet-tabs{white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;scrollbar-width:none;user-select:none;scroll-behavior:smooth}.navWrapper .sheet-tabs::-webkit-scrollbar{display:none}.navWrapper .sheet-tabs.dragging{scroll-behavior:unset;cursor:grab}.navWrapper .sheet-tabs.dragging.left-btn,.navWrapper .sheet-tabs.dragging.right-btn{pointer-events:none}.navWrapper .tabs{justify-content:initial}.navWrapper .tabs .item{flex:1}.navWrapper .right-btn,.navWrapper .left-btn{position:absolute;font-size:1.4em;cursor:pointer;padding:8px;color:#756c6c;display:none;backdrop-filter:blur(10px)}.navWrapper .right-btn{right:0}.navWrapper .left-btn{left:0}#tooltip.dsatooltip{padding:1px;background:#000}.itemTooltip{max-height:500px;border:none;text-overflow:ellipsis;overflow:hidden;font-size:14px}.itemTooltip .groupbox{border:none}.itemTooltip p{text-overflow:ellipsis;overflow:hidden}.itemTooltip h1{border:none;font-size:22px;line-height:26px}.itemTooltip .col{flex:50%;max-width:50%}.itemTooltip .table-title .col{flex:100%;max-width:100%}.itemTooltip .table-title .col:nth-child(2){display:none}.itemTooltip .show-item{display:none}#hotbar.hotbarV3{margin-bottom:0;--hotbar-width: 530px}#hotbar.hotbarV3 .sections{max-height:90px;height:90px;background-color:rgba(0,0,0,.5)}#hotbar.hotbarV3 .categoryFilters{height:30px}#hotbar.hotbarV3 .actorEffects{align-items:flex-end}#hotbar.hotbarV3 .function{color:#fff;right:0}#hotbar.hotbarV3 li,#hotbar.hotbarV3 ul{margin:0;padding:0;list-style:none}#hotbar.hotbarV3 li .fa{font-size:30px;line-height:45px;text-align:center}#hotbar.hotbarV3 .actorEffect:first-child{margin-left:auto}#hotbar.hotbarV3 .actorEffect div{width:28px;height:28px;background-size:contain}#hotbar.hotbarV3 .categoryFilter{overflow:hidden}#hotbar.hotbarV3 .categoryFilter:first-child{border-top-left-radius:10px}#hotbar.hotbarV3 .categoryFilter:last-child{border-top-right-radius:10px}#hotbar.hotbarV3 .actorEffect,#hotbar.hotbarV3 .categoryFilter{flex:0 0 30px;border:1px solid #000;box-shadow:inset 0px 0px 5px #636363;height:30px;width:30px;cursor:pointer;background-size:cover;line-height:30px;text-align:center;background-color:rgba(0,0,0,.5);color:var(--color-text-light-heading)}#hotbar.hotbarV3 .actorEffect.active,#hotbar.hotbarV3 .categoryFilter.active{border-color:#006400}#hotbar.hotbarV3 .actorEffect:hover,#hotbar.hotbarV3 .categoryFilter:hover{border-color:#ff4500}#hotbar.hotbarV3 .actorEffect div,#hotbar.hotbarV3 .categoryFilter div{background-size:cover;height:100%;width:100%}#hotbar.hotbarV3 .actorEffect{align-self:flex-end}#hotbar.hotbarV3 #hotbar-directory-controls{margin-top:30px;height:90px}#hotbar.hotbarV3 .quickFunctions{display:flex;flex-wrap:wrap;justify-content:center;flex-direction:column}#hotbar.hotbarV3 .quickFunctions li{flex:0 0 20px;margin-left:5px;height:20px;width:20px;cursor:pointer;pointer-events:all;background-size:cover;background-repeat:no-repeat;position:relative;box-sizing:border-box}#hotbar.hotbarV3 .quickFunctions li.itdarkness{height:90px}#hotbar.hotbarV3 .quickFunctions li div{height:100%;width:100%;position:absolute}#hotbar.hotbarV3 .effect div{color:#000;font-size:24px;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}#hotbar.hotbarV3 .itdarkness{line-height:0}#hotbar.hotbarV3 .itdarkness .rangeContainer{height:55px}#hotbar.hotbarV3 .updateDarkness{width:50px;height:100%;transform:rotate(-90deg);margin-top:16px;margin-left:-15.5px}#hotbar.hotbarV3 .longLayout #macro-list li,#hotbar.hotbarV3 .longLayout .skillItems li{flex:0 0 90px;text-align:center;max-width:90px}#hotbar.hotbarV3 .longLayout #macro-list li div,#hotbar.hotbarV3 .longLayout .skillItems li div{display:none}#hotbar.hotbarV3 .longLayout #macro-list li .nameContent,#hotbar.hotbarV3 .longLayout .skillItems li .nameContent{line-height:45px;display:block;overflow:hidden;text-overflow:ellipsis;color:#000}#hotbar.hotbarV3 #macro-list,#hotbar.hotbarV3 .skillItems{margin:0;padding:0;white-space:nowrap;overflow-y:auto;display:flex;flex-wrap:wrap;height:100%;transition:all .15s ease-in-out;overflow-x:hidden;scroll-snap-type:y mandatory}#hotbar.hotbarV3 #macro-list.dsahidden,#hotbar.hotbarV3 .skillItems.dsahidden{display:none}#hotbar.hotbarV3 #macro-list input,#hotbar.hotbarV3 .skillItems input{height:100%;display:block;width:100%;margin:0;float:left;text-align:center;font-size:20px;color:#fff}#hotbar.hotbarV3 #macro-list.collapsedKeydown,#hotbar.hotbarV3 #macro-list.collapsed,#hotbar.hotbarV3 .skillItems.collapsedKeydown,#hotbar.hotbarV3 .skillItems.collapsed{width:0px;flex:0}#hotbar.hotbarV3 #macro-list .nameContent,#hotbar.hotbarV3 .skillItems .nameContent{display:none;color:#fff}#hotbar.hotbarV3 #macro-list .skillgm .nameContent,#hotbar.hotbarV3 #macro-list .skill .nameContent,#hotbar.hotbarV3 .skillItems .skillgm .nameContent,#hotbar.hotbarV3 .skillItems .skill .nameContent{color:#000}#hotbar.hotbarV3 #macro-list .skillgm.body,#hotbar.hotbarV3 #macro-list .skill.body,#hotbar.hotbarV3 .skillItems .skillgm.body,#hotbar.hotbarV3 .skillItems .skill.body{background:#4f6d65;box-shadow:none;background:linear-gradient(90deg, rgb(79, 109, 101) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.social,#hotbar.hotbarV3 #macro-list .skill.social,#hotbar.hotbarV3 .skillItems .skillgm.social,#hotbar.hotbarV3 .skillItems .skill.social{background:#85302e;box-shadow:none;background:linear-gradient(90deg, rgb(133, 48, 46) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.knowledge,#hotbar.hotbarV3 #macro-list .skill.knowledge,#hotbar.hotbarV3 .skillItems .skillgm.knowledge,#hotbar.hotbarV3 .skillItems .skill.knowledge{background:#4b6585;box-shadow:none;background:linear-gradient(90deg, rgb(75, 101, 133) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.trade,#hotbar.hotbarV3 #macro-list .skill.trade,#hotbar.hotbarV3 .skillItems .skillgm.trade,#hotbar.hotbarV3 .skillItems .skill.trade{background:#cda25e;box-shadow:none;background:linear-gradient(90deg, rgb(205, 162, 94) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list .skillgm.nature,#hotbar.hotbarV3 #macro-list .skill.nature,#hotbar.hotbarV3 .skillItems .skillgm.nature,#hotbar.hotbarV3 .skillItems .skill.nature{background:#535829;box-shadow:none;background:linear-gradient(90deg, rgb(83, 88, 41) 0%, rgb(255, 255, 255) 100%)}#hotbar.hotbarV3 #macro-list>li,#hotbar.hotbarV3 .skillItems>li{flex:0 0 var(--base-bar-height);height:var(--base-bar-height);border:1px solid #000;background-color:rgba(0,0,0,.5);pointer-events:all;background-size:cover;box-shadow:inset 0px 0px 5px #636363;background-repeat:no-repeat;position:relative;box-sizing:border-box;scroll-snap-align:start}#hotbar.hotbarV3 #macro-list>li.unequipped,#hotbar.hotbarV3 .skillItems>li.unequipped{background:#006400;box-shadow:inset 0px 0px 25px #000;filter:grayscale(100%)}#hotbar.hotbarV3 #macro-list>li:hover,#hotbar.hotbarV3 .skillItems>li:hover{border-color:#ff4500}#hotbar.hotbarV3 #macro-list>li div,#hotbar.hotbarV3 .skillItems>li div{background-size:cover;height:100%;width:100%;position:absolute;color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000;transition:all .15s ease-in-out}#hotbar.hotbarV3 #macro-list>li div:hover,#hotbar.hotbarV3 .skillItems>li div:hover{transform:scale(1.1)}#hotbar.hotbarV3 #macro-list{border:none}@media(max-width: 1120px){#hotbar.hotbarV3{height:var(--hotbar-height)}}.coinIcon:before{content:"";mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-position:center;position:absolute;top:0;left:0;right:0;bottom:0;mask-image:url("../../../../icons/svg/coins.svg");-webkit-mask-image:url("../../../../icons/svg/coins.svg");background-color:#fff}.dsaRollMode .checkbox input[type=radio]{display:none}.dsaRollMode .checkbox{margin-right:4px;text-align:center}.dsaRollMode .checkbox>i{cursor:pointer;display:inline-block;padding:0px 10px;border-radius:5px;width:100%;background:rgba(0,0,0,.1);border:1px solid var(--color-border-light-tertiary);line-height:22px}.dsaRollMode .checkbox>i i{margin:0px 2px;padding:0}.dsaRollMode .checkbox input[type=radio]:checked+i{background:rgba(0,0,0,.7);color:#fff}.dsa5-immersive .tokenQuickHot li{box-shadow:inset 0px 0px 5px #403014;background-image:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive .tokenQuickHot li input{color:#000}.dsa5-immersive .sidebar-tab .directory-list .directory-item.collapsed{color:#fff}.dsa5-immersive .sidebar-tab .directory-list .directory-item.collapsed h3{color:#fff;text-shadow:0px 0px 3px var(--color-shadow-dark)}.dsa5-immersive .sidebar-tab .directory-list .directory-item h3{color:#000;text-shadow:none}.dsa5-immersive #sidebar-tabs{border-bottom:1px solid #000;box-shadow:0 0 10px #000;background-color:rgba(16,13,8,.4784313725)}.dsa5-immersive .chat-message{background:none}.dsa5-immersive .chat-message .message-header{padding:10px 5px;background-image:url("../../icons/backgrounds/kapitelstart.webp");background-size:112% 110%;background-repeat:no-repeat;background-position:67% -5px;color:#191815}.dsa5-immersive .sidebar-popout .chat-message,.dsa5-immersive #sidebar .chat-message{padding:8px 15px 15px 15px;padding-left:18px;margin-bottom:8px;border-image:url("../../icons/backgrounds/chatpaper.webp");border-image-width:30px;border-image-slice:50 50 fill;border-image-repeat:round}.dsa5-immersive .app.sidebar-popout .window-content{color:#333}.dsa5-immersive .sidebar-popout .dice-tray input[type=text],.dsa5-immersive #sidebar .dice-tray input[type=text]{color:#000}.dsa5-immersive .compendium-footer .source{color:#fff}.dsa5-immersive .window-app{background:none;box-shadow:none}.dsa5-immersive .window-app.actor .window-content{box-shadow:0 0 20px #000}.dsa5-immersive .window-app.image-popout .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .window-app .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .window-app.dsajournal .window-content,.dsa5-immersive .window-app.bookWizardsheet .window-content{background-image:url("../../icons/backgrounds/journalentry_v45.webp");background-size:97% 1000px;background-position:center;background-repeat:repeat-y}.dsa5-immersive .window-app.dsajournal .window-content a.content-link,.dsa5-immersive .window-app.dsajournal .window-content a.inline-roll,.dsa5-immersive .window-app.bookWizardsheet .window-content a.content-link,.dsa5-immersive .window-app.bookWizardsheet .window-content a.inline-roll{border:none;color:#b93d00;font-weight:bold;background:none}.dsa5-immersive .window-app.dsajournal .window-content a.content-link i,.dsa5-immersive .window-app.dsajournal .window-content a.inline-roll i,.dsa5-immersive .window-app.bookWizardsheet .window-content a.content-link i,.dsa5-immersive .window-app.bookWizardsheet .window-content a.inline-roll i{color:#b93d00}.dsa5-immersive .window-app.dsajournal .window-content{padding:0 40px}.dsa5-immersive .window-app.bookWizardsheet .video-container,.dsa5-immersive .window-app.dsajournal .window-content .video-container{position:relative;width:100%;padding-bottom:56.25%}.dsa5-immersive .window-app.bookWizardsheet .video-container iframe,.dsa5-immersive .window-app.dsajournal .window-content .video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.dsa5-immersive .window-app.dialog .window-content{padding-top:14px;padding-bottom:14px}.dsa5-immersive .window-app.npc-sheet .window-header,.dsa5-immersive .window-app.character-sheet .window-header,.dsa5-immersive .window-app.item .window-header{background-image:url("../../icons/backgrounds/sidebar-top.webp");border:none;top:2px}.dsa5-immersive .window-app.npc-sheet:not(.monarch):after,.dsa5-immersive .window-app.character-sheet:not(.monarch):after,.dsa5-immersive .window-app.item:not(.monarch):after{background-image:url("../../icons/backgrounds/sidebar-bot.webp");bottom:2px;content:""}.dsa5-immersive .window-app:not(.monarch) .window-header,.dsa5-immersive .window-app:after{background-repeat:no-repeat;position:relative;min-height:40px;z-index:1;height:40px;width:100%;background-size:100% 40px}.dsa5-immersive .window-app.creature-sheet .window-content{box-shadow:none}.dsa5-immersive .window-app.monarch .window-header,.dsa5-immersive .window-app.monarch:after{background-image:none}.dsa5-immersive .window-app .window-header{background-image:url("../../icons/backgrounds/blackhat.webp");top:7px;border:none}.dsa5-immersive .window-app:not(.monarch):after{background-image:url("../../icons/backgrounds/blackbook.webp");bottom:12px;content:""}.dsa5-immersive .window-app.creature-sheet:after{background-image:url("../../icons/backgrounds/blackcreaturebot.webp")}.dsa5-immersive .window-app.masterMenu:after{background-image:url("../../icons/backgrounds/masterborder.webp")}.dsa5-immersive .window-app.creature-sheet .window-resizable-handle{bottom:18px}.dsa5-immersive .window-app .window-header .aa-item-settings,.dsa5-immersive .window-app .window-header [id^=popout_]{width:15px;height:15px;margin-top:10px}.dsa5-immersive .window-app:not(.monarch) .window-header>a{width:15px;height:15px;margin-top:10px}.dsa5-immersive .window-app:not(.monarch) .window-header>a i{width:22px;border:1px solid #111;padding:3px;background-color:#444;text-align:center;border-radius:100%;color:#fff}.dsa5-immersive .window-app .aa-item-settings i,.dsa5-immersive .window-app .window-header [id^=popout_] i{width:22px;border:1px solid #111;padding:3px;background-color:#444;text-align:center;border-radius:100%;color:#fff}.dsa5-immersive .window-app .window-resizable-handle{z-index:2;bottom:11px;right:25px}.dsa5-immersive .window-app .window-header .window-title{text-align:center;margin-left:15%;margin-top:5px;color:#fff;font-family:var(--boldFont);font-weight:bold;font-family:"GentiumBasic-Bold";text-shadow:0px 0px 2px rgba(0,0,0,.75)}.dsa5-immersive .window-app.npc-sheet .window-header .window-title,.dsa5-immersive .window-app.character-sheet .window-header .window-title{margin-top:10px;color:#000;text-shadow:1px 1px #fff}.dsa5-immersive .window-app .header-button.close{margin-right:25px}.dsa5-immersive .window-app.actor .window-content,.dsa5-immersive .window-app.item .window-content{margin-left:15px;margin-right:15px}.dsa5-immersive .window-app.dsa5Decent:after{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.initTracker::after,.dsa5-immersive .window-app.initTracker .window-content{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.tokenQuickHot::after,.dsa5-immersive .window-app.tokenQuickHot .window-content{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .window-app.initTracker::after,.dsa5-immersive .window-app.tokenQuickHot::after{content:none}.dsa5-immersive .window-app.dsa5Decent .window-content,.dsa5-immersive .window-app.dsa5Decent .window-header{background:rgba(0,0,0,.5);padding:0;position:unset;color:#fff}.dsa5-immersive .window-app.dsa5Decent .window-content li{background:hsla(0,0%,100%,.2)}.dsa5-immersive .window-app.dsa5Decent .window-content li:hover{background:hsla(0,0%,100%,.5)}.dsa5-immersive .window-app.dsa5Decent:after{background:none;margin:0;padding:0;overflow:visible}.dsa5-immersive .app.sidebar-popout .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-immersive .character-sheet form{border-color:#000;border-style:double;border-width:10px;border-image:url("../../icons/backgrounds/actor.webp") 27 28 28 28;padding:4px;margin:0px}.dsa5-immersive #settings .fshopButton div{display:inline-block;background-image:url("../../lazy/patchimages/UlissesDigital.png");background-size:contain;width:20px;height:19px;margin:0;background-repeat:no-repeat;background-position:center;position:relative;top:5px}.dsa5-immersive #sidebar{border:none;margin:0px;height:100vh}.dsa5-immersive #sidebar .sidebar-tab .folder.collapsed .folder-header a i{color:#d8d4d4}.dsa5-immersive #sidebar .playlists-sidebar .sound-control{color:#3b3b3b}.dsa5-immersive #sidebar .playlists-sidebar .sound-control.inactive i{color:#797373}.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar a.sound-control[data-action=sound-stop],.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar .folder a.sound-control[data-action=playlist-stop] i,.dsa5-immersive #sidebar .sidebar-tab.playlists-sidebar .folder .folder-header a.sound-control[data-action=playlist-stop] i{color:var(--color-text-hyperlink)}.dsa5-immersive #sidebar button.fshopButton{background:#006f3d;background:linear-gradient(90deg, rgb(0, 38, 13) 0%, rgb(0, 111, 61) 100%);position:relative}.dsa5-immersive #sidebar.collapsed:before{content:none}.dsa5-immersive #sidebar .directory-list .documentName,.dsa5-immersive #sidebar .playlist.now-playing,.dsa5-immersive #sidebar .directory-list .directory-item.compendium,.dsa5-immersive #sidebar .directory-list .directory-item.document{background-color:var(--sheet-bg);margin:3px;border:1px solid var(--sheet-border);border-radius:5px;color:#000;margin-left:10px}.dsa5-immersive #sidebar .sidebar-tab{color:#555}.dsa5-immersive #sidebar .sidebar-tab a.inactive i{color:#acacac}.dsa5-immersive #sidebar .sidebar-tab .jump-to-bottom{color:#fff}.dsa5-immersive #sidebar .sidebar-tab .jump-to-bottom i{color:#fff}.dsa5-immersive #sidebar .global-control{margin-left:10px}.dsa5-immersive #sidebar .global-control .playlist-header{color:#fff}.dsa5-immersive #sidebar:before{position:absolute;top:0;bottom:0;left:-13px;right:0;content:"";background-image:url("../../icons/backgrounds/menu.webp");background-repeat:repeat-y;background-size:100%;z-index:-1}.dsa5-immersive .dsa5.item .item-header{background-image:url("../../icons/backgrounds/kapitelstart.webp")}.dsa5-immersive .dsa5.item.minimized .window-header .window-title{color:#000}.dsa5-immersive .dsa5.item .window-header .window-title{color:rgba(0,0,0,0);text-shadow:none}.dsa5-immersive .sidebar-popout{color:#555}.dsa5-immersive .sidebar-popout a i{color:#555}.dsa5-immersive .sidebar-popout a.inactive i{color:#acacac}.dsa5-immersive .sidebar-popout .jump-to-bottom{color:#fff}.dsa5-immersive .sidebar-popout .jump-to-bottom i{color:#fff}.dsa5-immersive #chat a.content-link,.dsa5-immersive #chat .chat-condition,.dsa5-immersive #chat a.inline-roll{border:none;color:#b93d00;font-weight:bold;background:none}.dsa5-immersive #chat a.content-link i,.dsa5-immersive #chat .chat-condition i,.dsa5-immersive #chat a.inline-roll i{color:#b93d00}.dsa5-immersive .itemTooltip{background-image:url("../../icons/backgrounds/macrobg.webp");background-size:cover;color:#000;padding:1px;border:2px solid #000;border-radius:5px}.dsa5-immersive #hotbar:before{background-image:url("../../icons/backgrounds/hotbarpart.webp"),url("../../icons/backgrounds/hotbarpart.webp"),url("../../icons/backgrounds/hotbar4.webp");background-size:30px 48px,66px 48px,100% 100%;background-repeat:no-repeat;content:"";position:absolute;left:0px;right:-32px;bottom:-10px;top:-10px;z-index:-1;background-position:8px 11px,calc(100% - 8px) 11px,center}.dsa5-immersive #hotbar.hotbarV3{margin-bottom:10px;--hotbar-width: 527px}.dsa5-immersive #hotbar.hotbarV3:before{background-size:30px 91px,34px 91px,calc(100% - 26px) calc(100% - 20px);background-position:8px 39px,calc(100% - 33px) 39px,0px 18px}.dsa5-immersive #hotbar.hotbarV3 .function{color:#000}.dsa5-immersive #hotbar.hotbarV3 .sections{background:none}.dsa5-immersive #hotbar.hotbarV3 .nameContent{color:#000}.dsa5-immersive #hotbar.hotbarV3 .actorEffect,.dsa5-immersive #hotbar.hotbarV3 .categoryFilter{background-image:url("../../icons/backgrounds/macrobg.webp");background-size:cover;color:#000}.dsa5-immersive #hotbar.hotbarV3 .actorEffect{box-shadow:inset 0px 0px 25px #403014}.dsa5-immersive #hotbar.hotbarV3 #macro-list>li,.dsa5-immersive #hotbar.hotbarV3 .skillItems>li{box-shadow:inset 0px 0px 25px #403014;background-image:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive #hotbar.hotbarV3 #macro-list>li.unequipped,.dsa5-immersive #hotbar.hotbarV3 .skillItems>li.unequipped{box-shadow:inset 0px 0px 25px #000}.dsa5-immersive #hotbar.hotbarV3 #macro-list input,.dsa5-immersive #hotbar.hotbarV3 .skillItems input{color:#000}.dsa5-immersive #hotbar.collapsedHotbar:before{background-image:url("../../icons/backgrounds/hotbarpart.webp")}.dsa5-immersive #hotbar .macro{background:none;border:1px solid rgba(0,0,0,.5)}.dsa5-immersive #hotbar .macro.active{box-shadow:inset 0px 0px 25px #403014;background:url("../../icons/backgrounds/macrobg.webp")}.dsa5-immersive #hotbar .macro.active.parry{box-shadow:inset 0px 0px 15px #016e0a}.dsa5-immersive #hotbar .macro.active.attack{box-shadow:inset 0px 0px 15px #7e0202}.dsa5-immersive #hotbar #macro-list{border:none;margin:0}.dsa5-immersive #hotbar .bar-controls{margin:0;background:none;color:#000;border:none;box-shadow:none}.dsa5-immersive #hotbar .bar-controls:first-child{margin-left:5px}@media(max-width: 1120px){.dsa5-immersive #hotbar:before{background-size:36px 88px,66px 88px,190% 100%;background-position:-3px 18px,calc(100% + 3px) 18px,center;right:-58px;left:6px}.dsa5-immersive #hotbar.hotbarV3:before{background-size:36px 105px,66px 105px,190% 100%;background-position:-1px 24px,calc(100% + 30px) 24px,center;left:0px;right:0px}.dsa5-immersive #hotbar #hotbar-page-controls a,.dsa5-immersive #hotbar #hotbar-directory-controls a{margin:6px 0}}.dsa5-immersive .window-app.npc-sheet.app .window-content{box-shadow:none}.dsa5-immersive #players{background:none;border:none;box-shadow:none}.dsa5-immersive #players:before{background-image:url("../../icons/backgrounds/dsabot.webp");background-size:100% 15px;background-repeat:no-repeat;content:"";position:absolute;left:-2px;right:-2px;bottom:-5px;top:-20px;z-index:-1;background-position:center 100%}.dsa5-immersive #players h3{border:none;position:relative;overflow:visible}.dsa5-immersive #players h3:before{background-image:url("../../icons/backgrounds/dsahead.webp"),url("../../icons/backgrounds/dsamid.webp");background-size:100% 30px,100% calc(100% - 30px);background-repeat:no-repeat;content:"";position:absolute;left:-5px;right:-5px;bottom:0px;top:-20px;z-index:-1;background-position:center 0px,center 30px}.dsa5-immersive #players #player-list{border:none;position:relative;overflow:visible}.dsa5-immersive #players #player-list:before{background-image:url("../../icons/backgrounds/dsamid.webp");background-size:100% 50px;background-repeat:repeat-y;content:"";position:absolute;left:-2px;right:-2px;bottom:5px;top:-3px;z-index:-1;background-position:center 0px}.dsa5-immersive #sidebar button,.dsa5-immersive .initTracker button,.dsa5-immersive .masterMenu button,.dsa5-immersive .sheetButton,.dsa5-immersive .sidebar-popout button,.dsa5-immersive .sidebar-popout .dice-tray button{background-image:linear-gradient(to right top, #be2020, #af1622, #9f0d22, #8f0522, #7f0021);color:#fff;border:1px solid #000}.dsa5-immersive #sidebar button:active,.dsa5-immersive .initTracker button:active,.dsa5-immersive .masterMenu button:active,.dsa5-immersive .sheetButton:active,.dsa5-immersive .sidebar-popout button:active,.dsa5-immersive .sidebar-popout .dice-tray button:active{box-shadow:inset 0 0 5px #000}.dsa5-immersive #sidebar button:hover,.dsa5-immersive .initTracker button:hover,.dsa5-immersive .masterMenu button:hover,.dsa5-immersive .sheetButton:hover,.dsa5-immersive .sidebar-popout button:hover,.dsa5-immersive .sidebar-popout .dice-tray button:hover{box-shadow:inset 0 0 3px #fff}.dsa5-immersive #sidebar button.lastRound,.dsa5-immersive .initTracker button.lastRound,.dsa5-immersive .masterMenu button.lastRound,.dsa5-immersive .sheetButton.lastRound,.dsa5-immersive .sidebar-popout button.lastRound,.dsa5-immersive .sidebar-popout .dice-tray button.lastRound{background-color:#02234d;background-image:none}.dsa5-immersive .dsajournal.sheet.journal-entry .journal-entry-content{background:none;border:none}.dsa5-immersive .dsajournal .header-search,.dsa5-immersive .dsajournal.sheet.journal-entry .pages-list .directory-item .page-number,.dsa5-immersive .dsajournal .directory-item{color:#000}.dsa5-immersive #compendium li.compendium-pack{background-color:var(--sheet-bg);margin:3px;border:1px solid var(--sheet-border);border-radius:5px;color:#000;margin-left:10px;padding:5px}.dsa5-immersive #compendium.sidebar-tab .entry-name i{color:#fff}.dsa5-immersive #compendium .compendium h3{color:#fff;margin-left:3px}.dsa5-immersive .compendium.directory .directory-header .compendium-name{color:#fff}.dsa5-immersive #compendium li.compendium-pack .compendium-footer,.dsa5-immersive #playlists li.sound .sound-playback .sound-timer{color:#0e0c0c}.dsa5-immersive #playlists.sidebar-tab .directory-list .directory-item.playlist.collapsed{color:#555}.dsa5-immersive .sound-name{color:#5c5c5c}.dsa5-immersive .app.sidebar-popout{backdrop-filter:none}.dsa5-immersive .coinIcon:before{content:"";mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;mask-position:center;position:absolute;top:0;left:0;right:0;bottom:0;mask-image:url("../../../../icons/svg/coins.svg");-webkit-mask-image:url("../../../../icons/svg/coins.svg");background-color:#000}.dsa5-immersive .searchLines .marker{background-color:#000}.dsa5-legacy .window-app.dsajournal .window-content{background-image:url("../../icons/backgrounds/journalentry.webp");background-size:97% 1000px;padding:0 50px}.dsa5-legacy .chatpaperfield{border-image:url("../../icons/backgrounds/chatpaper.webp");border-image-width:30px;border-image-slice:80 50 40 fill;border-image-repeat:round;padding:10px 20px 10px 30px}.dsa5-legacy .maskfield{position:relative;padding:10px 20px 30px 20px;color:#fff;border-image:url("../../icons/backgrounds/maskfield.webp");border-image-width:15px;border-image-slice:20 20 fill;border-image-repeat:round}.dsa5-legacy .maskfield:after{content:"";pointer-events:none;position:absolute;bottom:-23px;left:0;right:0;height:50px;z-index:1;background:url("../../icons/backgrounds/mask.webp");background-repeat:no-repeat;background-size:150px 50px;background-position:bottom center}.dsa5-legacy .maskfield .editor .mce-content-body{color:#fff}.dsa5-legacy .maskfield .editor.prosemirror .editor-menu{background-color:#fff}.dsa5-legacy .maskfield .editor.prosemirror.editing-source textarea{color:#fff}.dsa5-legacy .maskfield .documentName-link,.dsa5-legacy .maskfield a.content-link{color:#000}.dsa5-legacy .bookWizardsheet .window-content .table-title,.dsa5-legacy .dsajournal .window-content .label-text,.dsa5-legacy .bookWizardsheet .window-content table tr:first-child,.dsa5-legacy .dsajournal .window-content table tr:first-child{background:#bc886f;background:linear-gradient(90deg, rgba(188, 136, 111, 0.8) 0%, rgba(255, 255, 255, 0) 100%);border-bottom-style:solid;text-align:left}.dsa5-legacy .window-app.bookWizardsheet .window-content{background:url("../../icons/backgrounds/sheet2.webp") no-repeat;background-position:center;background-repeat:repeat-y;background-size:101% 1400px}.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.content-link,.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.inline-roll,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.content-link,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.inline-roll{border:none;color:#ee770e;font-weight:bold;background:none}.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.content-link i,.dsa5-legacy .window-app.dsajournal .window-content .maskfield a.inline-roll i,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.content-link i,.dsa5-legacy .window-app.bookWizardsheet .window-content .maskfield a.inline-roll i{color:#ee770e}:root{--app-height: 100vh}body{height:var(--app-height)}/*# sourceMappingURL=dsa5.css.map */ diff --git a/styles/css/dsa5.css.map b/styles/css/dsa5.css.map index 91ea264d..bbd776c7 100644 --- a/styles/css/dsa5.css.map +++ b/styles/css/dsa5.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../scss/dsa5.scss","../scss/immersive.scss","../scss/legacy.scss","../scss/applefix.scss"],"names":[],"mappings":"CAEA,MACI,yBACA,mBACA,yBACA,qBACA,uBACA,qBACA,uBACA,wBACA,0BACA,0BAGF,WACE,2BACA,mCAGA,uTAGA,mBACA,kBAGF,WACE,sCACA,oCAGA,6TAGA,mBACA,kBAGF,WACE,gCACA,mCAGA,uTAGA,mBACA,kBAGF,WACE,sBACA,kCAGA,iTAGA,mBACA,kBAGF,SACE,kBACA,kBAGF,aACE,WAGF,mBACE,eAGF,gBACE,gBAGF,SACE,gBACA,kBAGF,KAEE,YACA,gBAGA,eACA,8BAGF,SACE,8BAGF,EACE,4BACA,iBAGF,qBACE,gBAEA,8HACE,gBACA,UACA,YAKF,+DACE,sBAIJ,oBAEE,iBACA,kBACA,kCACE,WACA,2CACA,wBACA,4BACA,kBACA,WACA,MACA,YACA,WACA,iBAIJ,kBACE,mDAGF,mCACE,mBAIA,uBACE,WAKF,8BACE,aACA,iBACA,0BACA,kBAEA,sCACE,YAIJ,qBACE,gBACA,eACA,eACA,2BAEA,6BACE,WACA,kBACA,mBAIJ,oBACE,gBAGF,cACE,YACA,cACA,YACA,aACA,YACA,eACA,kBACA,YACA,WAIJ,WACE,qBACA,kBACA,QACA,UACA,UACA,eAEA,aACE,0BACA,YAEA,mBACE,cAKN,WACE,gBAGF,UACE,gBAGF,yFACE,mBAGF,uEACE,aACA,mBACA,WACA,SAGF,0BACE,uBAGF,cACE,mBAGF,mCACE,UACA,YACA,gBAGF,gBACE,WACA,kCACE,UAIJ,uMAIE,sBACA,WAGF,0NAGI,YACA,4CACA,gBACA,+BACA,kBACA,YAGJ,oNAGI,WACA,gBACA,kBACA,eAIJ,4CACE,OAIA,6DACE,iBACA,YACA,qCACA,iCACA,SAIJ,2CACE,YAGF,YACE,aACA,kBAKE,kCACE,mBACA,sBAIA,sEACE,mBACA,sBAGF,sCACE,iBACA,eAKN,8CACE,gBAKE,6BACE,QACA,eACA,kBAGF,oCACE,OACA,eACA,kBAIJ,qCACE,OAGF,yCACE,UAGF,gCACE,cAEA,mCACE,UACA,SAIJ,gCACE,OACA,UAKN,WACE,WACA,yBACA,8BACE,WAIJ,2BACE,qBAGF,YACE,WACA,yBAGF,SACE,uCAGF,SACE,YACA,aACA,mBAGF,4CACE,gBAGF,uBACE,OACA,cACA,kCAEA,6BACE,OACA,kCAGF,wEACE,OAGF,gGACE,OAIJ,iCACE,UAGF,0DACE,WACA,mBAGF,wBACE,+BAEA,gCACE,yBACA,WAIJ,kCACE,kBACA,WACA,mBACA,kBACA,aAIA,aACE,mBACA,qFAGF,eACE,mBACA,oFAGF,kBACE,mBACA,qFAGF,cACE,mBACA,qFAGF,eACE,mBACA,mFAIJ,yBACE,iBACA,4BAGA,mBACA,4FAGF,6LAEI,iBACA,4BACA,2BACA,kBACA,gCAGJ,uOAGE,iCAGF,aACE,mBACA,sFACA,gBAEA,0BACE,cACA,iBAIJ,cACE,iBACA,4BAGF,eACE,aAGF,cACE,qBAGF,2BACE,SAGF,kCAKE,WAJA,yEACE,WAMJ,8BACE,mCAGJ,kBACE,iBAGA,2DACE,WAGF,cACE,YAGF,mCACE,mDACA,WAGF,uBACE,mDACA,WAGF,sEACE,mDACA,WAGF,uBACE,mDACA,WAGF,uBACE,mDAGF,uBACE,mDAGF,uBACE,mDAGF,uBACE,mDAGF,WACE,iBAGF,mBACE,WACA,kBACA,MACA,OACA,QACA,SACA,YACA,wBACA,2BACA,4BAIA,YACE,iCACA,oDAGF,YACE,WACA,iCACA,mDAGF,YACE,WACA,iCACA,qDAGF,8BAEE,qDACA,iCACA,WAIJ,8BAEE,qDACA,iCACA,WAGF,oCACE,iBAGF,iBACE,gCACA,WACA,YACA,qBACA,wBACA,iBACA,kBACA,oCACA,4BAGF,aACE,WACA,YACA,iBACA,eACA,kBACA,qBAGF,kCACE,WACA,YACA,iBACA,eACA,YAGF,iBACE,WAGF,WACE,WACA,YACA,qBACA,4BACA,wBAIA,6BACE,cAGF,6BACE,cAGF,6BACE,cAGF,6BACE,cAIJ,kBACE,2CAGF,kBACE,2CAGF,kBACE,2CAGF,kBACE,2CAGF,gBACE,iBACA,qBAGF,OACE,YAEA,WACE,WACA,YACA,kBAGF,aACE,qDAGF,SACE,YACA,kBACA,WACA,qBACA,kBAEA,6CACE,WACA,gBAEA,iDACE,wBAMR,UACE,aACA,WACA,OAGF,aACE,aAEA,kBACE,eAGF,kBACE,UAEA,0BACE,gBACA,aACA,mBACA,iCACA,qCAGF,wBACE,SACA,gCAGF,0BACE,SACA,kCAGF,0BACE,SAIJ,mCACE,UAGF,oBACE,sCACA,SACA,YAIJ,aACE,sBAGF,mBACE,yBAEF,+BACE,UAEF,YACE,qBAGF,YACE,iBACA,oBAGF,aACE,SAGF,YACE,iBAGF,aACE,YACA,wBACA,4BACA,4BAGF,WACE,iBAMA,wBACE,SAGF,uBACE,SAGF,6BACE,SAGF,6BACE,SAGF,uBACE,SAGF,wBACE,WAGF,sBACE,SAGF,2BACE,QAGF,wBACE,SAGF,yBACE,SAGF,wBACE,SAGF,yBACE,SAGF,yBACE,SACA,+BACE,kBACA,cACA,gBACA,qCACE,iBACA,WAMN,0BACE,SAGF,0BACE,SAGF,wBACE,SAGF,4BACE,WAGF,sBACE,SACA,cAIJ,OACE,cAGF,UACE,qCACA,kBACA,gBACA,gBAEA,qBACE,YAIJ,cACE,kBACA,YAGF,QACE,kBAGF,OACE,iBAGF,YACE,eAGF,uBACE,iBAGF,OACE,eAGF,eACE,sBACA,eAGF,0CACE,sBAIA,qBACE,sBAGF,wBACE,uDAIJ,kBACE,YACA,gBACA,cAEA,wBACE,gBAMA,8EACE,gCAIJ,4EACE,gCAIJ,qCACE,gCAIA,4FACE,gCAIJ,SACE,iCACA,gBACA,cACA,gBAGF,gBAEE,aACA,QACA,eAEA,+BACE,cACA,kCACA,gBACA,6CACA,kBAKF,mCACE,YAKF,+BACE,mBACA,qCACA,YACA,iCAIJ,WACE,yBAGF,cACE,mBACA,2EACA,kBACA,WAGF,2GACE,YACA,YACA,0BAGF,oBACE,WAGF,0BACE,gBAGF,0BACE,mBACA,sBAIA,uCACE,mBACA,sBAGF,iCACE,UAIJ,yDACE,0BAIA,yCACE,kBAIJ,qBACE,kBACA,mBAGF,UACE,kBACA,eACE,kBACA,OACA,QACA,MACA,SAEA,4BACA,2BACA,wBAEF,mBACE,YACA,WACA,iBACA,kBACA,gBACA,WAIJ,YACE,WAGF,8KACE,kBAGF,6BACE,eAGF,gDACE,kBACA,uBAGF,gEAEE,iBAIA,wBACE,0BACA,4BACA,YAEA,2BACE,aACA,eAIJ,yDACE,kBACA,YACA,gBACA,YAKF,wBACE,iBACA,eAIA,4CACE,qCAIJ,iBACE,YACA,qBACA,WACA,kBAGF,uBACE,gBAIJ,4BACE,SACA,iBACA,YACA,SACA,WACA,kBAGF,YACE,qCACA,gBAGA,kBAGF,0BACE,eAGF,mDACE,qCACA,kBACA,YAGA,kBAGF,yCAEE,YACA,8BACA,gBACA,kBAGF,2BACE,0BAEA,uCACE,YAIJ,kDACE,kBAGF,aACE,eAIA,oFACE,iBAKJ,2BACE,qDACA,kBAEA,kCACE,kBACA,YACA,WACA,OACA,QACA,SACA,SAGF,iCACE,qDAMA,uDACE,aAIJ,0EACE,aAIJ,UACE,kBACA,YACA,sBACA,qBAIA,2DACE,eACA,uBAIJ,0IACE,YAGF,iCACE,YACA,iCACA,gBACA,cACA,kBACA,UAGF,gBACE,eACA,YAIA,8BACE,eACA,YAIJ,cACE,eACA,YAGF,cACE,eACA,YACA,YAGF,2BACE,iBAGF,kBACE,iBACA,oBACE,yBACA,gCACA,WACA,mBACA,iBAIJ,4BACE,0BAGF,UACE,gBAGF,4BACE,YACA,eAIA,qBAKE,cAJA,iCACE,cAMJ,kBACE,kBACA,qBAGF,kBACE,qBACA,eACA,iBAIJ,mBACE,gBACA,gBAEA,iDACE,WACA,qBAIJ,qBACE,aAIA,+DACE,aAIJ,8WAKE,aAIA,0EACE,aAIJ,2CACE,aAIA,qCACE,aAIJ,uHAEE,aAGF,2EAEE,cAGF,8BAME,mBACA,mBACA,cAPA,oCACE,qBACA,wBAQJ,mBACE,uBACA,eACA,YACA,2BACA,gBACA,SACA,cACA,oBACA,kBACA,mBACA,oBACA,yBACA,kBACA,yBACA,sBACA,qBACA,iBAGF,WACE,YACA,yBACA,sBACA,gBACA,+BACA,kBACA,sCAGF,SACE,4BACA,+BACA,uBAGF,UACE,6BACA,gCAEA,iBACE,kBACA,kBAGF,eACE,mCAKF,cACE,wCACA,mCAGF,sBACE,OACA,mCAIJ,KACE,YACA,WACA,+BACA,kBACA,UACA,QACA,SACA,iCAGF,SACE,6BACA,gCACA,uBAGF,UACE,YACA,YACA,kBACA,sBACA,WACA,kBACA,UACA,6BAEA,gBACE,YACA,iBACA,WACA,qBACA,YACA,UACA,SACA,WACA,gBACA,gBACA,6BAEA,sBACE,gBAEF,sBACE,gCAIJ,eACE,WACA,qBAIJ,cACE,4EAGF,KACE,mBACA,4EAGF,SACE,mBACA,8EAGF,KACE,mBACA,+EAGF,KACE,mBACA,8EAGF,OACE,WACA,YACA,wBACA,4BACA,qBAEA,YACE,WACA,YAGF,2BACE,gBACA,YAIJ,YACE,oDAGF,WACE,+CAGF,sDAEE,8CACA,4CAGF,4BACE,0BACA,sCAIA,gBACE,+BAGF,4BACE,sBAIJ,qDACE,YACA,0BACA,YACA,WACA,SAGF,4BACE,YACA,WACA,+BAEA,kCACE,kBAIJ,cACE,YACA,iBAIA,iCACE,iBACA,cAEF,qBACE,aACA,kBACA,YACA,UACA,YACA,sBACA,0BACA,YACA,SACA,gBAGF,4BACE,cACA,WACA,mBAEA,kCACE,WACA,UAGF,8BACE,WACA,sBACA,gBACA,kBAKN,+BACE,cAIA,+CACE,cAGF,kCACE,2BAIJ,iBACE,kBAIA,qBACE,qBACA,WACA,YACA,+BAEA,2BACE,sBAIJ,sBACE,WACA,YACA,YAIJ,aACE,aAEA,iBACE,iBACA,mBAEA,qBACE,kBACA,QACA,iBACA,eAIJ,gBACE,aACA,eACA,WAEA,gCACE,qBACA,SACA,qBACA,aACA,iBACA,gBAEA,2CACE,gBACA,eACA,iBACA,eACA,YACA,uBACA,gBAKN,wCACE,SACA,sBACA,gBAEA,0CACE,qBACA,YACA,wBACA,YACA,iBAGF,+CACE,YACA,WACA,qBACA,wBAIJ,kCACE,uBACA,gBACA,eAIJ,aACE,iBAEA,kBACE,qBACA,sBACA,iBAIJ,kCACE,qBACA,sBACA,iBAGF,SACE,qBAGF,wFACE,iBAGF,qDACE,WACA,qBACA,YACA,WACA,kBACA,WACA,QACA,iDACA,wBACA,4BAGF,uBACE,WACA,YACA,wBACA,4BACA,2BACA,cAGF,iCACE,kBACA,WACA,UAGF,uBACE,YACA,2BACA,WAGF,WACE,mEAGF,cACE,iBAIF,oBACE,WACA,qBAGF,wDACE,YACA,aAIA,4BACE,2BACA,0BAGF,gCACE,OAGF,gBACE,gBAGF,gBACE,gBAGF,yBACE,YACA,cACA,aACA,6BACA,gCAEA,+BACE,0BACA,sCAIJ,wBACE,qBACA,eACA,yBACA,mBACA,WACA,YACA,iBACA,cACA,kBAGF,iBACE,YACA,mBAGF,oBACE,WAEA,sBACE,mBACA,WAKN,yBACE,qCACA,YACA,kBACA,qDACA,qBAGF,gBACE,qBACA,SACA,iBACA,WACA,YACA,gBACA,kBACA,QAIA,mBACE,WACA,YACA,QAGF,kCACE,WACA,YACA,gBACA,gBAIJ,6BACE,iBAGF,YACE,cAGF,WACE,qCACA,YAGF,WACE,kBACA,+DACA,qBACA,4BACA,wBACA,aACA,iBACA,YACA,WACA,WACA,iBAEA,cACE,qBACA,SAGF,cAME,gBACA,qBACA,+BACA,WARA,oBACE,gCACA,iBAQF,qBACE,YACA,2BAGF,oBACE,yBACA,kBAKN,YACE,YACA,YACA,+CACA,qBACA,4BACA,YACA,kBACA,iBACA,sBACA,cACA,kBACA,mBACA,iBAEA,kBACE,kBACA,eACA,SACA,OACA,QAGF,qBACE,YAGF,qBACE,aAIJ,kBACE,qBACA,UAGF,6BACE,UACA,qBAGF,gBACE,kCACA,YACA,UACA,kBAEA,uBACE,kBACA,OACA,QACA,SACA,oCACA,yBAKF,kCACE,2BAIJ,uCACE,qBACA,cAGF,oCACE,qBACA,cAIA,iCACE,yBAGF,iCACE,yBAGF,2BAKE,kBACA,UALA,iCACE,yBAQN,kBACE,iBACA,aAGF,SACE,qCACA,qDACA,kBACA,iBAEA,WACA,kBACA,aACE,YAEF,gBACE,cAGF,wBACE,kBACA,qCACA,kBACA,yBACA,kBACA,WACA,qBACA,WACA,YACA,iBACA,WACA,UACA,+BAEA,8BACE,sBAKN,mGAGE,YAKE,gEACE,oBACA,gBAEF,4DACE,cACA,8BACA,mBACA,oBAEA,+DACE,oBACA,YAEA,0EACE,oBAOV,oBACE,mEACA,wBACA,4BACA,2BAGF,8BACE,WACA,YAGF,SACE,mEACA,wBACA,4BACA,2BAEA,cACE,iEAGF,cACE,0DAGF,cACE,0DAGF,cACE,oEAIJ,YACE,6DACA,gBACA,aAGF,QACE,mEAGF,8BAEE,eAIA,eACE,eAGF,gBACE,qBAIJ,gCACE,cAGF,sBAEE,cAGF,qBACE,eACA,cACA,iBACA,kBACA,oBAIA,oBACE,kCAGF,sBACE,iBAGF,0BACE,kBACA,WACA,UACA,eACA,cACA,iBAIJ,gEACE,gBACA,yBACA,kBACA,mBACA,qBACA,gBACA,2BACA,eAGF,4EACE,QAIF,+BACE,aAGF,gBACE,+DACA,WACA,wBACA,iCAEA,gBACA,4BAGF,WACE,kBACA,WACA,4BACA,gBACA,+DACA,uCACA,oCAIF,WACE,kBACA,WACA,aACA,gBACA,0DACA,uCACA,oCAIF,sDACE,gBAGF,MACE,mBAGF,oBACE,wBACA,gBACA,YACA,kBACA,WAGF,aACE,mBACA,YACA,cACA,WACA,kBACA,WACA,YACA,gBACA,yBACA,sBACA,eACA,4BACA,UAEA,mBACE,yBAMA,gIACE,iBAIJ,4BACE,UAIJ,WACE,iBAIA,oCACE,gCAGF,yDAEE,YAGF,4DAEE,cAKF,0BACE,UAQA,iCACE,SACA,mBACA,kBACA,8DACE,UACA,UAEF,yDACE,WACA,OACA,sFACE,WACA,UAWV,0FACE,WACA,YACA,YACA,kBACA,eAIA,0DACE,YAGF,2DACE,cAGF,sBAME,qBACA,iBANA,yBACE,qBACA,iBASJ,mCACE,UAGF,qCACE,uBAIJ,iBACE,kBACA,SAGF,cACE,kBACA,SACA,UACA,eAGF,0CACE,iBAGF,6BACE,YACA,kBACA,UACA,QACA,eACA,cAGF,YACE,mBACA,8BAGF,WACE,cACA,YAEA,kBACE,cACA,iBAIJ,wBACE,UACA,kBAGF,YACE,gBACA,gBAGF,iBACE,gBAEA,qBACE,gBAGF,0BACE,YACA,4BACG,iBAIL,sBAKE,oBAJA,yCACE,UAMJ,wBACE,YACA,iBAGF,8BACE,aACA,+CACA,kBACA,gCACA,6BAEA,kCACE,OACA,gBACA,gBACA,kBACA,YACA,WACA,kCACA,mBACA,gBACA,uBACA,+BACA,kBAEA,wCACE,eACA,mCACA,WAON,WACE,cAGF,cACE,cAIJ,yBACE,cACA,YAEA,2BACE,qBACA,kBAIJ,mBACE,kBAGF,oBACE,cACA,kBACA,YAEA,sBACE,kBACA,SACA,QACA,WACA,WAGF,0DAEE,eACA,mBACA,WACA,YACA,UACA,SACA,iBACA,kBACA,WACA,mBACA,kBACA,QACA,MAGF,6BACE,OACA,WACA,mBAKF,0CACE,QACA,WAEF,0CACE,WACA,UAKF,+BACE,qBAGF,gCACE,gCACA,kBACA,OACA,QACA,kBACA,UACA,WACA,eACA,iBAIJ,iCAOE,6BANA,mCACE,SACA,WACA,YAMJ,kBACE,WACA,gBACA,eACA,YACA,gBACA,sBAGF,eACE,kBACA,MACA,gCACA,SACA,UACA,WACA,qCAEA,kBACE,YACA,qBAGF,wBACE,4BAGF,2BACE,kBACA,UAIJ,mDACE,cAIA,uCACE,oCAGF,uCACE,mCAGF,uCACE,iCAGF,uCACE,kCAGF,gFACE,YACA,+BACA,iBAIJ,sDACE,WACA,gCACA,0BACA,kBACA,qCACA,YAGF,gCACE,WAIA,kCACE,WAGF,iBACE,sCACA,WACA,YACA,kBAGF,2BACE,gCAIJ,kCACE,gCACA,qBACA,eACA,+BACA,gCACA,sBACA,kBACA,mBACA,sBACA,qCACA,4BACA,kBACA,sBAGF,wBACE,WAGF,iCACE,YACA,YACA,iBAGF,mCACE,qCACA,sCAGF,mBACE,kBACA,qCACA,UACA,WAIA,sDACE,qBACA,8CACA,sCACA,2BACA,8BAEA,4EACE,2BACA,8BAIJ,wBACE,YACA,mBACA,WACA,qBAGF,kCACE,yBAGF,wBACE,sBAEA,0BACE,WACA,WACA,2CACA,kBACA,WAIJ,gBACE,gBACA,+BACA,+BACA,eACA,gCACA,mBAEA,6BACE,kBACA,YACA,WACA,OACA,QACA,QACA,SACA,kBAIJ,+BACE,kBACA,aACA,OACA,QAGF,0BACE,OACA,QACA,gBACA,SAIA,sBACE,kBACA,cACA,WACA,YACA,iEACA,qBACA,qBACA,cAGF,uBACE,kBACA,mCAGF,gDACE,WAGF,yBACE,wBACA,2BAKN,gBACE,SACA,UACA,qBAIA,0BACE,WACA,gBACA,YACA,kCAGF,gBACE,4BACA,6BAIJ,qDAEE,qBACA,eAGF,oCACE,YACA,6BAIA,iCACE,kCACA,mCACA,uCACE,UAIA,4FACE,mBACA,gBACA,iFAGF,gGACE,mBACA,gBACA,gFAGF,sGACE,mBACA,gBACA,iFAGF,8FACE,mBACA,gBACA,iFAGF,gGACE,mBACA,gBACA,+EAGJ,qCACE,sBACA,YACA,WACA,kBACA,WACA,4EAEF,uCACE,gCACA,cACA,WACA,SACA,WACA,kBACA,eACA,YAEF,6CACE,uCACA,kBACA,mDACE,YACA,kBACA,SAEF,+CACE,kBACA,QACA,SACA,cACA,uDACE,cACA,UACA,WAKJ,4DACE,YACA,iBACA,kBACA,YAEF,iDACE,wBACA,4BACA,2BACA,WACA,iBACA,WAEF,mDACE,qBACA,eACA,gBACA,gBACA,uBACA,mBAMJ,uBACE,kBACA,UACA,WACA,mBACA,YACA,qBACA,WACA,YACA,kBACA,kBAGF,sBACE,gDACA,qCACA,kBAGF,wBACE,sCAGF,wBACE,sCAMJ,gFACE,aAGF,kDACE,UAKF,uBACE,qBACA,WAGF,mCACE,cAIJ,gBACE,wBACA,UACA,aAEA,mBACE,kBACA,WACA,gBAEA,8BACE,0BACA,kBAGJ,+BACE,aACA,eACA,cACA,gBACA,mCACE,WACA,YACA,mCAMJ,2BACE,WACA,kBACA,QACA,QACA,UACA,sBAGF,6BACE,eACA,qBAGF,oCACE,UAIA,yBACE,WACA,0BACA,kBAGF,6BACE,iBAIJ,oBACE,iBAIJ,0CACE,kCACA,gBACA,YAKE,uEACE,gBACA,SACA,UACA,iBAKF,2EACE,gBACA,SACA,UACA,iBAIJ,gEACE,aAIJ,SACE,kBACA,SAGF,YACE,WACA,YACA,wBACA,qCACA,yBACA,4BACA,2BACA,kBACA,eACA,wBACE,WAEF,kBACE,qBAIJ,eACI,cACA,iBACA,gBAGJ,UACE,kBACA,aACA,YACA,qCACA,YACA,gCACA,WACA,kBAGF,UACE,kBACA,qCACA,WACA,mCAEA,mBACE,kBACA,MACA,OACA,SACA,yBAEA,4BACE,yBAIJ,oBACE,kBACA,UAIJ,yBACE,kBACA,WACA,YAGF,uCACE,WACA,6DACA,wBACA,4BACA,2BACA,kBACA,OACA,QACA,MACA,SAGF,4BACE,uFAGF,2BACE,yEAGF,qBACE,0FAGF,4BACE,oFAGF,uBACE,qEAGF,YACE,aACA,sBAGF,cACE,aACA,mBACA,kBAEA,mBACE,OACA,WAEA,uBACE,QAGF,uBACE,QAKN,6BACE,WACA,kBACA,MACA,OACA,QACA,SACA,4GACA,mDACA,2BAIA,aACE,sCAGJ,+BAEI,qBACA,YACA,qCACA,iBACA,kBAGJ,kBACE,qBACA,yBACA,iBACA,kBACA,WACA,gBACA,4BACA,yBAEA,0BACE,qBACA,yBAGF,0BACE,qBACA,yBAIJ,qCACE,cAGF,UACE,WACA,YACA,iBACA,gBACA,cACA,gBACA,kBACA,YAEA,eACE,UACA,YACA,gBACA,kBACA,MACA,UAGF,yBACE,OAGF,wBACE,WACA,YACA,gBACA,iBACA,mBACA,kBACA,MAGF,uCACE,UACA,+BACA,kCACA,cACA,qCACA,6BACA,uCAGF,0BACE,QAEA,wCACE,WACA,8BACA,iCACA,eACA,sCACA,8BACA,wCAIJ,0BACE,UACA,WACA,kBACA,cACA,cACA,iBACA,kBACA,kBACA,OACA,QAGF,6BACE,qBAKF,gBAcE,SAbA,kBACE,cACA,WACA,WAGF,oBACE,WACA,SACA,kBACA,WAMJ,0BACE,qCACA,mBAIJ,yBACE,kBAGF,qBACE,mBACA,uBACA,mBAEA,4BACE,WACA,YACA,kBAIJ,gBACE,iBAGF,eACE,iBAEA,qBACE,cAIJ,2BACE,cAGF,oBACE,iBAGF,yBACE,+BAEA,gCACE,WAGF,+BACE,0BAGF,wCACE,kBAIJ,kBACE,cAGF,8BACE,kBACA,UACA,SACA,OACA,MACA,QAIA,yBACE,eAEF,0BACE,cACA,iBAEF,8BACE,YAEA,qCACE,YAKN,aACE,sBAGF,aACE,kBACA,QACA,QACA,WACA,SACA,oBAEA,qBACE,kBACA,WACA,WACA,sBACA,oBAIJ,cACE,sBACA,gBACA,WACA,kBACA,YACA,6DACA,4BAIA,0BACE,SACA,kBACA,YAEA,iCACE,WAGF,sCACE,eAIJ,0BACE,iBAEA,gCACE,uBAIJ,qCACE,YAIJ,kCACE,WACA,YAGF,aACE,UACA,kBAGF,aACE,kBAEA,qCACE,UAGF,0BACE,kBACA,MACA,OACA,cACA,yBAIJ,cACE,WACA,wBACA,4BACA,kBACA,WACA,YACA,UACA,SACA,UAGF,iBACE,kDAGF,iBACE,kDAGF,kCACE,kDAGF,UACE,YACA,wBAGF,6CACE,WACA,4DACA,wBACA,4BACA,kBACA,OACA,QACA,SACA,MACA,WACA,WAIA,qCACE,WACA,4DACA,wBACA,4BACA,kBACA,OACA,QACA,SACA,MACA,WACA,WAGF,qCACE,4BAGF,iBACE,yDACA,WAIJ,oBACE,cAGF,eACE,cACA,sEACA,WACA,wBACA,kCACA,cACA,6BACE,oBAIJ,kCAEE,eACA,wBACA,kCACA,kBACA,iBACA,mBACA,sCACE,YAEF,8CACE,kBACA,iBACA,mBACA,mBACA,SACA,UAIJ,UACE,oBACA,kBACA,mBACA,iEAGF,wBACE,iBACA,kCACA,mBACA,sEAGF,aACE,4BACA,wBACA,YACA,gBACA,gBACA,2BACA,WAGF,UACE,qBACA,WACA,YACA,wBACA,4BACA,gBACA,iBAEA,oBACE,kDAGF,iBACE,oDAGF,mBACE,sDAGF,eACE,kDAGF,gBACE,mDAIJ,eACE,qBACA,kBACA,eACA,gBAGF,sBACI,WACA,kBACA,SACA,MACA,OACA,QACA,4BACA,2BACA,wBAKF,kBACE,qBACA,YACA,SACA,eACA,gBACA,eACA,iBAGF,kBACE,SACA,YACA,eAIJ,YACE,WAEA,gBACE,WACA,WACA,YAIJ,kCACE,kCACA,WACA,mBACA,aAGF,sBAEE,eACA,QACA,uBACA,aACA,YACA,aAEA,0CACE,aACA,uBACA,mBAIJ,UACE,cACA,uBACA,YACA,uBACA,QAEA,sBACG,kBACA,sBACA,OACA,SACA,QAEH,gBACE,YACA,YACA,aACA,kBACA,gBACA,kBACA,WACA,sJAGF,iBACE,mBACA,kBACA,eACA,kBACA,UACA,+DACA,WACA,mBACA,aACA,iBACA,sJAGF,iBACE,YACA,YACA,aACA,UACA,6EAIJ,wBACE,GACE,mBACA,UAGF,IACE,UAGF,KACE,oBAIJ,sBACE,GACE,UAGF,IACE,UAGF,KACE,WAIJ,yBACE,GACE,mCACA,mBACA,+BAGF,IACE,kCACA,sBAGF,IACE,mCACA,sBAGF,IACE,kCACA,sBAGF,IACE,mCACA,oBAIJ,iBACE,uBACA,mBAGF,yBACE,aAGF,SACE,iBAGF,gBACE,qBACA,kBACA,eACA,YACA,WAEA,sBACE,kBACA,UACA,YACA,WAGF,qBACE,kBACA,MACA,OACA,YACA,WACA,2DACA,2BACA,wBACA,4BACA,YACA,+BAGF,+BACE,mEAGF,6BACE,iEAGF,8BACE,kEAGF,0BACE,8DAGF,4BACE,gEAGF,kCACE,sEAGF,oEACE,UAIJ,mBACE,eACA,uBACA,UACA,gBACA,SACA,UACA,YAGF,mEACE,WAGF,eACE,wBACA,YACA,eAGF,4BACE,uBACA,gBACA,mBAGF,YACE,eAEA,kBACE,kCAIJ,gBACE,kCAKF,0BACE,kBAGF,kCACE,cAKF,2CACE,+BAKE,6GACE,WAOJ,iCACE,+DACA,2BACA,4CAGF,kCACE,eACA,qCACE,YACA,kBACA,+BAEF,2CACE,sBACA,WAKN,YACE,kBAEA,wBACE,mBACA,gBACA,iCACA,4CACA,qBACA,iBACA,uBACA,2CACE,aAGF,iCACE,sBACA,YAEA,qFACE,oBAKN,kBACE,wBACA,wBACE,OAIJ,6CACE,kBACA,gBACA,eACA,YACA,cACA,aACA,2BAGF,uBACE,QAGF,sBACE,OAKJ,oBACE,YACA,gBAEF,aACE,iBACA,YAQA,uBACA,gBACA,eATA,uBACE,YAEF,eACE,uBACA,gBAKF,gBACE,YACA,eACA,iBAEF,kBACE,SACA,cAEF,+BACE,UACA,eAEA,4CACE,aAIJ,wBACE,aAIJ,iBACE,gBAEA,sBAEA,2BACE,gBACA,YACA,gCAEF,kCACE,YAEF,+BACE,qBAEF,2BACE,WACA,QAEF,wCACE,SACA,UACA,gBAGA,wBACE,eACA,iBACA,kBAKF,0CACE,iBAEF,kCACE,WACA,YACA,wBAGJ,iCACE,gBACA,6CACE,4BAEF,4CACE,6BAGJ,+DAEE,cACA,sBACA,qCACA,YACA,WACA,eACA,sBACA,iBACA,kBACA,gCACA,sCAEA,6EACE,qBAEF,2EACE,qBAEF,uEACE,sBACE,YACA,WAGN,8BACE,oBAGF,4CACE,gBACA,YAIF,iCACE,aACA,eACA,uBACA,sBACA,oCACE,cACA,gBACA,YACA,WACA,eACA,mBACA,sBACA,4BACA,kBACA,sBAIA,+CACE,YAGF,wCACE,YACA,WACA,kBAKN,6BACE,WACA,eACA,4EAEF,6BACE,cAEA,6CACE,YAGJ,iCACE,WACA,YACA,yBACA,gBACA,oBAOE,wFACE,cACA,kBAEA,eACA,gGACE,aAEF,kHACE,iBACA,cACA,gBACA,uBACA,WAMR,0DAEE,SACA,UACA,mBACA,gBACA,aACA,eACA,YACA,gCACA,kBACA,6BAEA,8EACE,aAGF,sEACE,YACA,cACA,WACA,SACA,WACA,kBACA,eACA,WAGF,0KAEE,UACA,OAEF,oFACE,aACA,WAKA,wMACE,WAEF,wKACE,mBACA,gBACA,iFAGF,gLACE,mBACA,gBACA,gFAGF,4LACE,mBACA,gBACA,iFAGF,4KACE,mBACA,gBACA,iFAGF,gLACE,mBACA,gBACA,+EAIJ,gEACE,gCACA,8BAEA,sBACA,gCACA,mBACA,sBACA,qCACA,4BACA,kBACA,sBACA,wBAEA,sFACE,mBACA,mCACA,uBAGF,4EACE,qBAGF,wEACE,sBACA,YACA,WACA,kBACA,WACA,4EACA,gCACA,oFACE,qBAMR,6BACE,YAGJ,0BACE,iBACI,6BAIR,iBACE,WACA,eACA,8BACA,sBACA,qBACA,kBACA,MACA,OACA,QACA,SACA,kDACA,0DACA,sBAIA,yCACE,aAEF,uBACE,iBACA,kBAEF,yBACI,eACA,qBACA,iBACA,kBACA,WACA,0BACA,oDACA,iBAEA,oDAGJ,mDACI,0BACA,WC57IF,kCACI,qCACA,6DAEA,wCACI,WAKJ,uEACI,WAEA,0EACI,WACA,iDAIR,gEACI,WACA,iBAIR,8BACI,6BACA,yBACA,2CAGJ,8BACI,gBAGJ,8CACI,iBACA,kEACA,0BACA,4BAGA,6BACA,cAGJ,qFAEI,2BACA,kBACA,kBAEA,2DACA,wBACA,8BACA,0BAGJ,oDACI,WAGJ,iHAEI,WAGJ,2CACI,WAGJ,4BAkFI,gBACA,gBAlFA,kDACI,yBAGJ,yDACI,gEACA,2BACA,2BACA,4BAGJ,4CACI,gEACA,2BACA,2BACA,4BAGJ,mHAEI,sEACA,2BACA,2BACA,2BAEA,gSAEI,YACA,cACA,iBACA,gBAEA,wSACI,cAKZ,uDACI,eAKA,qIACI,kBACA,WACA,sBAEA,mJACI,kBACA,MACA,OACA,WACA,YACA,SAKZ,mDACI,iBACA,oBAGJ,gKAGI,iEACA,YACA,QAGJ,+KAGI,iEACA,WACA,WAMJ,2FAEI,4BACA,kBACA,gBACA,UACA,YACA,WACA,0BAGJ,2DACI,gBAKA,6FAEI,sBAIR,2CACI,8DACA,QACA,YAGJ,gDACI,+DACA,YACA,WAGJ,iDACI,sEAGJ,6CACI,kEAGJ,oEACI,YAKA,sHAEI,WACA,YACA,gBAIR,2DACI,WACA,YACA,gBAEA,6DACI,WACA,sBACA,YACA,sBACA,kBACA,mBACA,WAIR,2GAEI,WACA,sBACA,YACA,sBACA,kBACA,mBACA,WAGJ,qDACI,UACA,YACA,WAGJ,yDACI,kBACA,gBACA,eACA,WACA,4BACA,iBACA,gCACA,wCAGJ,4IAEI,gBACA,WACA,yBAGJ,iDACI,kBAGJ,mGAEI,iBACA,kBAGJ,6CACI,gBACA,SACA,UACA,iBAKA,uGAEI,gBACA,SACA,UACA,iBAMJ,2GAEI,gBACA,SACA,UACA,iBAIR,gGAEI,aAKA,6GAEI,0BACA,UACA,eACA,WAGJ,0DACI,8BAEA,gEACI,8BAIR,6CACI,gBACA,SACA,UACA,iBAKZ,oDACI,gEACA,2BACA,2BACA,4BAGJ,sCACI,kBACA,oBACA,kBACA,mEACA,YACA,WAGJ,2CACI,qBACA,kEACA,wBACA,WACA,YACA,SACA,4BACA,2BACA,kBACA,QAGJ,yBACI,YACA,WACA,aAEA,2EACI,cAGJ,2DACI,cAGJ,sEACI,cAGJ,yUAGI,kCAGJ,4CACI,mBACA,2EACA,kBAGJ,0CACI,aAGJ,4OAII,iCACA,WACA,qCACA,kBACA,WACA,iBAGJ,sCACI,WAII,mDACI,cAIR,sDACI,WAEA,wDACI,WAKZ,yCACI,iBAEA,0DACI,WAIR,gCACI,kBACA,MACA,SACA,WACA,QACA,WACA,0DACA,2BACA,qBACA,WAKJ,wCACI,kEAGJ,kEACI,WAGJ,wDACI,oBACA,iBAIR,gCACI,WAGI,oCACI,WAGJ,6CACI,cAIR,gDACI,WAEA,kDACI,WAMR,+GAGI,YACA,cACA,iBACA,gBAEA,qHACI,cAKZ,6BACI,6DACA,sBACA,WACA,YACA,sBACA,kBAIA,+BACI,2JACA,8CACA,4BACA,WACA,kBACA,SACA,YACA,aACA,UACA,WACA,0DAGJ,iCACI,mBACA,sBAEA,wCACI,wEACA,6DAGJ,2CACI,WAGJ,2CACI,gBAGJ,8CACI,WAGJ,+FAEI,6DACA,sBACA,WAGJ,8CACI,sCAKA,gGACI,sCACA,6DAEA,sHACI,mCAIR,sGACI,WAKZ,+CACI,gEAGJ,+BACI,gBACA,gCAEA,sCACI,sCACA,uDAEA,4CACI,sCAGJ,6CACI,sCAKZ,oCACI,YACA,SAGJ,sCACI,SACA,gBAGA,WACA,YAGA,gBAEA,kDACI,gBAKZ,0BAEQ,+BACI,8CACA,2DACA,YACA,SAGJ,wCACI,gDACA,4DACA,SACA,UAKA,qGACI,cAMhB,0DACI,gBAGJ,yBACI,gBACA,YACA,gBAEA,gCACI,4DACA,0BACA,4BACA,WACA,kBACA,UACA,WACA,YACA,UACA,WACA,gCAGJ,4BAeI,YACA,kBACA,iBAhBA,mCACI,wGACA,iDACA,4BACA,WACA,kBACA,UACA,WACA,WACA,UACA,WACA,2CAQR,sCACI,YACA,kBACA,iBAEA,6CACI,4DACA,0BACA,2BACA,WACA,kBACA,UACA,WACA,WACA,SACA,WACA,+BAKZ,6NAMI,4FACA,WACA,sBAEA,uQACI,8BAGJ,iQACI,8BAGJ,yRACI,yBACA,sBAKJ,uEACI,gBACA,YAGJ,gLAGI,WAKJ,+CACI,iCACA,WACA,qCACA,kBACA,WACA,iBACA,YAGJ,sDACI,WAGJ,2CACI,WACA,gBAIR,yEACI,WAGJ,mIAEI,cAGJ,0FACI,WAGJ,4BACI,cAGJ,oCACI,qBAGJ,iCACI,WACA,eACA,8BACA,sBACA,qBACA,kBACA,MACA,OACA,QACA,SACA,kDACA,0DACA,sBAIA,qCACI,sBCpyBJ,oDACI,kEACA,2BACA,eAIR,6BACI,2DACA,wBACA,iCACA,0BACA,4BAGJ,wBACI,kBAeA,4BACA,WACA,2DACA,wBACA,8BACA,0BAnBA,8BACE,WACA,oBACA,kBACA,aACA,OACA,QACA,YACA,UACA,oDACA,4BACA,2BACA,kCASF,kDACE,WAIA,yDACE,sBAEF,oEACE,WAIJ,kFAEE,WAIN,iPAGI,mBACA,4FACA,0BACA,gBAIA,yDACI,gEACA,2BACA,2BACA,4BAOI,gUAEI,YACA,cACA,iBACA,gBAEA,wUACI,cCxFxB,MACI,oBAGJ,KACI","file":"dsa5.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../scss/dsa5.scss","../scss/immersive.scss","../scss/legacy.scss","../scss/applefix.scss"],"names":[],"mappings":"CAEA,MACI,yBACA,mBACA,yBACA,qBACA,uBACA,qBACA,uBACA,wBACA,0BACA,0BAGF,WACE,2BACA,mCAGA,uTAGA,mBACA,kBAGF,WACE,sCACA,oCAGA,6TAGA,mBACA,kBAGF,WACE,gCACA,mCAGA,uTAGA,mBACA,kBAGF,WACE,sBACA,kCAGA,iTAGA,mBACA,kBAGF,SACE,kBACA,kBAGF,aACE,WAGF,mBACE,eAGF,gBACE,gBAGF,SACE,gBACA,kBAGF,KAEE,YACA,gBAGA,eACA,8BAGF,SACE,8BAGF,EACE,4BACA,iBAGF,qBACE,gBAEA,8HACE,gBACA,UACA,YAKF,+DACE,sBAIJ,oBAEE,iBACA,kBACA,kCACE,WACA,2CACA,wBACA,4BACA,kBACA,WACA,MACA,YACA,WACA,iBAIJ,kBACE,mDAGF,mCACE,mBAIA,uBACE,WAKF,8BACE,aACA,iBACA,0BACA,kBAEA,sCACE,YAIJ,qBACE,gBACA,eACA,eACA,2BAEA,6BACE,WACA,kBACA,mBAIJ,oBACE,gBAGF,cACE,YACA,cACA,YACA,aACA,YACA,eACA,kBACA,YACA,WAIJ,WACE,qBACA,kBACA,QACA,UACA,UACA,eAEA,aACE,0BACA,YAEA,mBACE,cAKN,WACE,gBAGF,UACE,gBAGF,yFACE,mBAGF,uEACE,aACA,mBACA,WACA,SAGF,0BACE,uBAGF,cACE,mBAGF,mCACE,UACA,YACA,gBAGF,gBACE,WACA,kCACE,UAIJ,uMAIE,sBACA,WAGF,0NAGI,YACA,4CACA,gBACA,+BACA,kBACA,YAGJ,oNAGI,WACA,gBACA,kBACA,eAIJ,4CACE,OAIA,6DACE,iBACA,YACA,qCACA,iCACA,SAIJ,2CACE,YAGF,YACE,aACA,kBAKE,kCACE,mBACA,sBAIA,sEACE,mBACA,sBAGF,sCACE,iBACA,eAKN,8CACE,gBAKE,6BACE,QACA,eACA,kBAGF,oCACE,OACA,eACA,kBAIJ,qCACE,OAGF,yCACE,UAGF,gCACE,cAEA,mCACE,UACA,SAIJ,gCACE,OACA,UAKN,WACE,WACA,yBACA,8BACE,WAIJ,2BACE,qBAGF,YACE,WACA,yBAGF,SACE,uCAGF,SACE,YACA,aACA,mBAGF,4CACE,gBAGF,uBACE,OACA,cACA,kCAEA,6BACE,OACA,kCAGF,wEACE,OAGF,gGACE,OAIJ,iCACE,UAGF,0DACE,WACA,mBAGF,wBACE,+BAEA,gCACE,yBACA,WAIJ,kCACE,kBACA,WACA,mBACA,kBACA,aAIA,aACE,mBACA,qFAGF,eACE,mBACA,oFAGF,kBACE,mBACA,qFAGF,cACE,mBACA,qFAGF,eACE,mBACA,mFAIJ,yBACE,iBACA,4BAGA,mBACA,4FAGF,6LAEI,iBACA,4BACA,2BACA,kBACA,gCAGJ,uOAGE,iCAGF,aACE,mBACA,sFACA,gBAEA,0BACE,cACA,iBAIJ,cACE,iBACA,4BAGF,eACE,aAGF,cACE,qBAGF,2BACE,SAGF,kCAKE,WAJA,yEACE,WAMJ,8BACE,mCAGJ,kBACE,iBAGA,2DACE,WAGF,cACE,YAGF,mCACE,mDACA,WAGF,uBACE,mDACA,WAGF,sEACE,mDACA,WAGF,uBACE,mDACA,WAGF,uBACE,mDAGF,uBACE,mDAGF,uBACE,mDAGF,uBACE,mDAGF,WACE,iBAGF,mBACE,WACA,kBACA,MACA,OACA,QACA,SACA,YACA,wBACA,2BACA,4BAIA,YACE,iCACA,oDAGF,YACE,WACA,iCACA,mDAGF,YACE,WACA,iCACA,qDAGF,8BAEE,qDACA,iCACA,WAIJ,8BAEE,qDACA,iCACA,WAGF,oCACE,iBAGF,iBACE,gCACA,WACA,YACA,qBACA,wBACA,iBACA,kBACA,oCACA,4BAGF,aACE,WACA,YACA,iBACA,eACA,kBACA,qBAGF,kCACE,WACA,YACA,iBACA,eACA,YAGF,iBACE,WAGF,WACE,WACA,YACA,qBACA,4BACA,wBAIA,6BACE,cAGF,6BACE,cAGF,6BACE,cAGF,6BACE,cAIJ,kBACE,2CAGF,kBACE,2CAGF,kBACE,2CAGF,kBACE,2CAGF,gBACE,iBACA,qBAGF,OACE,YAEA,WACE,WACA,YACA,kBAGF,aACE,qDAGF,SACE,YACA,kBACA,WACA,qBACA,kBAEA,6CACE,WACA,gBAEA,iDACE,wBAMR,UACE,aACA,WACA,OAGF,aACE,aAEA,kBACE,eAGF,kBACE,UAEA,0BACE,gBACA,aACA,mBACA,iCACA,qCAGF,wBACE,SACA,gCAGF,0BACE,SACA,kCAGF,0BACE,SAIJ,mCACE,UAGF,oBACE,sCACA,SACA,YAIJ,aACE,sBAGF,mBACE,yBAEF,+BACE,UAEF,YACE,qBAGF,YACE,iBACA,oBAGF,aACE,SAGF,YACE,iBAGF,aACE,YACA,wBACA,4BACA,4BAGF,WACE,iBAMA,wBACE,SAGF,uBACE,SAGF,6BACE,SAGF,6BACE,SAGF,uBACE,SAGF,wBACE,WAGF,sBACE,SAGF,2BACE,QAGF,wBACE,SAGF,yBACE,SAGF,wBACE,SAGF,yBACE,SAGF,yBACE,SACA,+BACE,kBACA,cACA,gBACA,qCACE,iBACA,WAMN,0BACE,SAGF,0BACE,SAGF,wBACE,SAGF,4BACE,WAGF,sBACE,SACA,cAIJ,OACE,cAGF,UACE,qCACA,kBACA,gBACA,gBAEA,qBACE,YAIJ,cACE,kBACA,YAGF,QACE,kBAGF,OACE,iBAGF,YACE,eAGF,uBACE,iBAGF,OACE,eAGF,eACE,sBACA,eAGF,0CACE,sBAIA,qBACE,sBAGF,wBACE,uDAIJ,kBACE,YACA,gBACA,cAEA,wBACE,gBAMA,8EACE,gCAIJ,4EACE,gCAIJ,qCACE,gCAIA,4FACE,gCAIJ,SACE,iCACA,gBACA,cACA,gBAGF,gBAEE,aACA,QACA,eAEA,+BACE,cACA,kCACA,gBACA,6CACA,kBAKF,mCACE,YAKF,+BACE,mBACA,qCACA,YACA,iCAIJ,WACE,yBAGF,cACE,mBACA,2EACA,kBACA,WAGF,2GACE,YACA,YACA,0BAGF,oBACE,WAGF,0BACE,gBAGF,0BACE,mBACA,sBAIA,uCACE,mBACA,sBAGF,iCACE,UAIJ,yDACE,0BAIA,yCACE,kBAIJ,qBACE,kBACA,mBAGF,UACE,kBACA,eACE,kBACA,OACA,QACA,MACA,SAEA,4BACA,2BACA,wBAEF,mBACE,YACA,WACA,iBACA,kBACA,gBACA,WAIJ,YACE,WAGF,8KACE,kBAGF,6BACE,eAGF,gDACE,kBACA,uBAGF,gEAEE,iBAIA,wBACE,0BACA,4BACA,YAEA,2BACE,aACA,eAIJ,yDACE,kBACA,YACA,gBACA,YAKF,wBACE,iBACA,eAIA,4CACE,qCAIJ,iBACE,YACA,qBACA,WACA,kBAGF,uBACE,gBAIJ,4BACE,SACA,iBACA,YACA,SACA,WACA,kBAGF,YACE,qCACA,gBAGA,kBAGF,0BACE,eAGF,mDACE,qCACA,kBACA,YAGA,kBAGF,yCAEE,YACA,8BACA,gBACA,kBAGF,2BACE,0BAEA,uCACE,YAIJ,kDACE,kBAGF,aACE,eAIA,oFACE,iBAKJ,2BACE,qDACA,kBAEA,kCACE,kBACA,YACA,WACA,OACA,QACA,SACA,SAGF,iCACE,qDAMA,uDACE,aAIJ,0EACE,aAIJ,UACE,kBACA,YACA,sBACA,qBAIA,2DACE,eACA,uBAIJ,0IACE,YAGF,iCACE,YACA,iCACA,gBACA,cACA,kBACA,UAGF,gBACE,eACA,YAIA,8BACE,eACA,YAIJ,cACE,eACA,YAGF,cACE,eACA,YACA,YAGF,2BACE,iBAGF,kBACE,iBACA,oBACE,yBACA,gCACA,WACA,mBACA,iBAIJ,4BACE,0BAGF,UACE,gBAGF,4BACE,YACA,eAIA,qBAKE,cAJA,iCACE,cAMJ,kBACE,kBACA,qBAGF,kBACE,qBACA,eACA,iBAIJ,mBACE,gBACA,gBAEA,iDACE,WACA,qBAIJ,qBACE,aAIA,+DACE,aAIJ,8WAKE,aAIA,0EACE,aAIJ,2CACE,aAIA,qCACE,aAIJ,uHAEE,aAGF,2EAEE,cAGF,8BAME,mBACA,mBACA,cAPA,oCACE,qBACA,wBAQJ,mBACE,uBACA,eACA,YACA,2BACA,gBACA,SACA,cACA,oBACA,kBACA,mBACA,oBACA,yBACA,kBACA,yBACA,sBACA,qBACA,iBAGF,WACE,YACA,yBACA,sBACA,gBACA,+BACA,kBACA,sCAGF,SACE,4BACA,+BACA,uBAGF,UACE,6BACA,gCAEA,iBACE,kBACA,kBAGF,eACE,mCAKF,cACE,wCACA,mCAGF,sBACE,OACA,mCAIJ,KACE,YACA,WACA,+BACA,kBACA,UACA,QACA,SACA,iCAGF,SACE,6BACA,gCACA,uBAGF,UACE,YACA,YACA,kBACA,sBACA,WACA,kBACA,UACA,6BAEA,gBACE,YACA,iBACA,WACA,qBACA,YACA,UACA,SACA,WACA,gBACA,gBACA,6BAEA,sBACE,gBAEF,sBACE,gCAIJ,eACE,WACA,qBAIJ,cACE,4EAGF,KACE,mBACA,4EAGF,SACE,mBACA,8EAGF,KACE,mBACA,+EAGF,KACE,mBACA,8EAGF,OACE,WACA,YACA,wBACA,4BACA,qBAEA,YACE,WACA,YAGF,2BACE,gBACA,YAIJ,YACE,oDAGF,WACE,+CAGF,sDAEE,8CACA,4CAGF,4BACE,0BACA,sCAIA,gBACE,+BAGF,4BACE,sBAIJ,qDACE,YACA,0BACA,YACA,WACA,SAGF,4BACE,YACA,WACA,+BAEA,kCACE,kBAIJ,cACE,YACA,iBAIA,iCACE,iBACA,cAEF,qBACE,aACA,kBACA,YACA,UACA,YACA,sBACA,0BACA,YACA,SACA,gBAGF,4BACE,cACA,WACA,mBAEA,kCACE,WACA,UAGF,8BACE,WACA,sBACA,gBACA,kBAKN,+BACE,cAIA,+CACE,cAGF,kCACE,2BAIJ,iBACE,kBAIA,qBACE,qBACA,WACA,YACA,+BAEA,2BACE,sBAIJ,sBACE,WACA,YACA,YAIJ,aACE,aAEA,iBACE,iBACA,mBAEA,qBACE,kBACA,QACA,iBACA,eAIJ,gBACE,aACA,eACA,WAEA,gCACE,qBACA,SACA,qBACA,aACA,iBACA,gBAEA,2CACE,gBACA,eACA,iBACA,eACA,YACA,uBACA,gBAKN,wCACE,SACA,sBACA,gBAEA,0CACE,qBACA,YACA,wBACA,YACA,iBAGF,+CACE,YACA,WACA,qBACA,wBAIJ,kCACE,uBACA,gBACA,eAIJ,aACE,iBAEA,kBACE,qBACA,sBACA,iBAIJ,kCACE,qBACA,sBACA,iBAGF,SACE,qBAGF,wFACE,iBAGF,qDACE,WACA,qBACA,YACA,WACA,kBACA,WACA,QACA,iDACA,wBACA,4BAGF,uBACE,WACA,YACA,wBACA,4BACA,2BACA,cAGF,iCACE,kBACA,WACA,UAGF,uBACE,YACA,2BACA,WAGF,WACE,mEAGF,cACE,iBAIF,oBACE,WACA,qBAGF,wDACE,YACA,aAIA,4BACE,2BACA,0BAGF,gCACE,OAGF,gBACE,gBAGF,gBACE,gBAGF,yBACE,YACA,cACA,aACA,6BACA,gCAEA,+BACE,0BACA,sCAIJ,wBACE,qBACA,eACA,yBACA,mBACA,WACA,YACA,iBACA,cACA,kBAGF,iBACE,YACA,mBAGF,oBACE,WAEA,sBACE,mBACA,WAKN,yBACE,qCACA,YACA,kBACA,qDACA,qBAGF,gBACE,qBACA,SACA,iBACA,WACA,YACA,gBACA,kBACA,QAIA,mBACE,WACA,YACA,QAGF,kCACE,WACA,YACA,gBACA,gBAIJ,6BACE,iBAGF,YACE,cAGF,WACE,qCACA,YAGF,WACE,kBACA,+DACA,qBACA,4BACA,wBACA,aACA,iBACA,YACA,WACA,WACA,iBAEA,cACE,qBACA,SAGF,cAME,gBACA,qBACA,+BACA,WARA,oBACE,gCACA,iBAQF,qBACE,YACA,2BAGF,oBACE,yBACA,kBAKN,YACE,YACA,YACA,+CACA,qBACA,4BACA,YACA,kBACA,iBACA,sBACA,cACA,kBACA,mBACA,iBAEA,kBACE,kBACA,eACA,SACA,OACA,QAGF,qBACE,YAGF,qBACE,aAIJ,kBACE,qBACA,UAGF,6BACE,UACA,qBAGF,gBACE,kCACA,YACA,UACA,kBAEA,uBACE,kBACA,OACA,QACA,SACA,oCACA,yBAKF,kCACE,2BAIJ,uCACE,qBACA,cAGF,oCACE,qBACA,cAIA,iCACE,yBAGF,iCACE,yBAGF,2BAKE,kBACA,UALA,iCACE,yBAQN,kBACE,iBACA,aAGF,SACE,qCACA,qDACA,kBACA,iBAEA,WACA,kBACA,aACE,YAEF,gBACE,cAGF,wBACE,kBACA,qCACA,kBACA,yBACA,kBACA,WACA,qBACA,WACA,YACA,iBACA,WACA,UACA,+BAEA,8BACE,sBAKN,mGAGE,YAKE,gEACE,oBACA,gBAEF,4DACE,cACA,8BACA,mBACA,oBAEA,+DACE,oBACA,YAEA,0EACE,oBAOV,oBACE,mEACA,wBACA,4BACA,2BAGF,8BACE,WACA,YAGF,SACE,mEACA,wBACA,4BACA,2BAEA,cACE,iEAGF,cACE,0DAGF,cACE,0DAGF,cACE,oEAIJ,YACE,6DACA,gBACA,aAGF,QACE,mEAGF,8BAEE,eAIA,eACE,eAGF,gBACE,qBAIJ,gCACE,cAGF,sBAEE,cAGF,qBACE,eACA,cACA,iBACA,kBACA,oBAIA,oBACE,kCAGF,sBACE,iBAGF,0BACE,kBACA,WACA,UACA,eACA,cACA,iBAIJ,gEACE,gBACA,yBACA,kBACA,mBACA,qBACA,gBACA,2BACA,eAGF,4EACE,QAIF,+BACE,aAGF,gBACE,+DACA,WACA,wBACA,iCAEA,gBACA,4BAGF,WACE,kBACA,WACA,4BACA,gBACA,+DACA,uCACA,oCAIF,WACE,kBACA,WACA,aACA,gBACA,0DACA,uCACA,oCAIF,sDACE,gBAGF,MACE,mBAGF,oBACE,wBACA,gBACA,YACA,kBACA,WAGF,aACE,mBACA,YACA,cACA,WACA,kBACA,WACA,YACA,gBACA,yBACA,sBACA,eACA,4BACA,UAEA,mBACE,yBAMA,gIACE,iBAIJ,4BACE,UAIJ,WACE,iBAIA,oCACE,gCAGF,yDAEE,YAGF,4DAEE,cAKF,0BACE,UAQA,iCACE,SACA,mBACA,kBACA,8DACE,UACA,UAEF,yDACE,WACA,OACA,sFACE,WACA,UAWV,0FACE,WACA,YACA,YACA,kBACA,eAIA,0DACE,YAGF,2DACE,cAGF,sBAME,qBACA,iBANA,yBACE,qBACA,iBASJ,mCACE,UAGF,qCACE,uBAIJ,iBACE,kBACA,SAGF,cACE,kBACA,SACA,UACA,eAGF,0CACE,iBAGF,6BACE,YACA,kBACA,UACA,QACA,eACA,cAGF,YACE,mBACA,8BAGF,WACE,cACA,YAEA,kBACE,cACA,iBAIJ,wBACE,UACA,kBAGF,YACE,gBACA,gBAGF,iBACE,gBAEA,qBACE,gBAGF,0BACE,YACA,4BACG,iBAIL,sBAKE,oBAJA,yCACE,UAMJ,wBACE,YACA,iBAGF,8BACE,aACA,+CACA,kBACA,gCACA,6BAEA,kCACE,OACA,gBACA,gBACA,kBACA,YACA,WACA,kCACA,mBACA,gBACA,uBACA,+BACA,kBAEA,wCACE,eACA,mCACA,WAON,WACE,cAGF,cACE,cAIJ,yBACE,cACA,YAEA,2BACE,qBACA,kBAIJ,mBACE,kBAGF,oBACE,cACA,kBACA,YAEA,sBACE,kBACA,SACA,QACA,WACA,WAGF,0DAEE,eACA,mBACA,WACA,YACA,UACA,SACA,iBACA,kBACA,WACA,mBACA,kBACA,QACA,MAGF,6BACE,OACA,WACA,mBAKF,0CACE,QACA,WAEF,0CACE,WACA,UAKF,+BACE,qBAGF,gCACE,gCACA,kBACA,OACA,QACA,kBACA,UACA,WACA,eACA,iBAIJ,iCAOE,6BANA,mCACE,SACA,WACA,YAMJ,kBACE,WACA,gBACA,eACA,YACA,gBACA,sBAGF,eACE,kBACA,MACA,gCACA,SACA,UACA,WACA,qCAEA,kBACE,YACA,qBAGF,wBACE,4BAGF,2BACE,kBACA,UAIJ,mDACE,cAIA,uCACE,oCAGF,uCACE,mCAGF,uCACE,iCAGF,uCACE,kCAGF,gFACE,YACA,+BACA,iBAIJ,sDACE,WACA,gCACA,0BACA,kBACA,qCACA,YAGF,gCACE,WAIA,kCACE,WAGF,iBACE,sCACA,WACA,YACA,kBAGF,2BACE,gCAIJ,kCACE,gCACA,qBACA,eACA,+BACA,gCACA,sBACA,kBACA,mBACA,sBACA,qCACA,4BACA,kBACA,sBAGF,wBACE,WAGF,iCACE,YACA,YACA,iBAGF,mCACE,qCACA,sCAGF,mBACE,kBACA,qCACA,UACA,WAIA,sDACE,qBACA,8CACA,sCACA,2BACA,8BAEA,4EACE,2BACA,8BAIJ,wBACE,YACA,mBACA,WACA,qBAGF,kCACE,yBAGF,wBACE,sBAEA,0BACE,WACA,WACA,2CACA,kBACA,WAIJ,gBACE,gBACA,+BACA,+BACA,eACA,gCACA,mBAEA,6BACE,kBACA,YACA,WACA,OACA,QACA,QACA,SACA,kBAIJ,+BACE,kBACA,aACA,OACA,QAGF,0BACE,OACA,QACA,gBACA,SAIA,sBACE,kBACA,cACA,WACA,YACA,iEACA,qBACA,qBACA,cAGF,uBACE,kBACA,mCAGF,gDACE,WAGF,yBACE,wBACA,2BAKN,gBACE,SACA,UACA,qBAIA,0BACE,WACA,gBACA,YACA,kCAGF,gBACE,4BACA,6BAIJ,qDAEE,qBACA,eAGF,oCACE,YACA,6BAIA,iCACE,kCACA,mCACA,uCACE,UAIA,4FACE,mBACA,gBACA,iFAGF,gGACE,mBACA,gBACA,gFAGF,sGACE,mBACA,gBACA,iFAGF,8FACE,mBACA,gBACA,iFAGF,gGACE,mBACA,gBACA,+EAGJ,qCACE,sBACA,YACA,WACA,kBACA,WACA,4EAEF,uCACE,gCACA,cACA,WACA,SACA,WACA,kBACA,eACA,YAEF,6CACE,uCACA,kBACA,mDACE,YACA,kBACA,SAEF,+CACE,kBACA,QACA,SACA,cACA,uDACE,cACA,UACA,WAKJ,4DACE,YACA,iBACA,kBACA,YAEF,iDACE,wBACA,4BACA,2BACA,WACA,iBACA,WAEF,mDACE,qBACA,eACA,gBACA,gBACA,uBACA,mBAMJ,uBACE,kBACA,UACA,WACA,mBACA,YACA,qBACA,WACA,YACA,kBACA,kBAGF,sBACE,gDACA,qCACA,kBAGF,wBACE,sCAGF,wBACE,sCAMJ,gFACE,aAGF,kDACE,UAKF,uBACE,qBACA,WAGF,mCACE,cAIJ,gBACE,wBACA,UACA,aAEA,mBACE,kBACA,WACA,gBAEA,8BACE,0BACA,kBAGJ,+BACE,aACA,eACA,cACA,gBACA,mCACE,WACA,YACA,mCAMJ,2BACE,WACA,kBACA,QACA,QACA,UACA,sBAGF,6BACE,eACA,qBAGF,oCACE,UAIA,yBACE,WACA,0BACA,kBAGF,6BACE,iBAIJ,oBACE,iBAIJ,0CACE,kCACA,gBACA,YAKE,uEACE,gBACA,SACA,UACA,iBAKF,2EACE,gBACA,SACA,UACA,iBAIJ,gEACE,aAIJ,SACE,kBACA,SAGF,YACE,WACA,YACA,wBACA,qCACA,yBACA,4BACA,2BACA,kBACA,eACA,wBACE,WAEF,kBACE,qBAIJ,eACI,cACA,iBACA,gBAGJ,UACE,kBACA,aACA,YACA,qCACA,YACA,gCACA,WACA,kBAGF,UACE,kBACA,qCACA,WACA,mCAEA,mBACE,kBACA,MACA,OACA,SACA,yBAEA,4BACE,yBAIJ,oBACE,kBACA,UAIJ,yBACE,kBACA,WACA,YAGF,uCACE,WACA,6DACA,wBACA,4BACA,2BACA,kBACA,OACA,QACA,MACA,SAGF,4BACE,0FAGF,2BACE,yEAGF,qBACE,uFAGF,4BACE,oFAGF,uBACE,qEAGF,YACE,aACA,sBAGF,cACE,aACA,mBACA,kBAEA,mBACE,OACA,WAEA,uBACE,QAGF,uBACE,QAKN,6BACE,WACA,kBACA,MACA,OACA,QACA,SACA,4GACA,mDACA,2BAIA,aACE,sCAGJ,+BAEI,qBACA,YACA,qCACA,iBACA,kBAGJ,kBACE,qBACA,yBACA,iBACA,kBACA,WACA,gBACA,4BACA,yBAEA,0BACE,qBACA,yBAGF,0BACE,qBACA,yBAIJ,qCACE,cAGF,UACE,WACA,YACA,iBACA,gBACA,cACA,gBACA,kBACA,YAEA,eACE,UACA,YACA,gBACA,kBACA,MACA,UAGF,yBACE,OAGF,wBACE,WACA,YACA,gBACA,iBACA,mBACA,kBACA,MAGF,uCACE,UACA,+BACA,kCACA,cACA,qCACA,6BACA,uCAGF,0BACE,QAEA,wCACE,WACA,8BACA,iCACA,eACA,sCACA,8BACA,wCAIJ,0BACE,UACA,WACA,kBACA,cACA,cACA,iBACA,kBACA,kBACA,OACA,QAGF,6BACE,qBAKF,gBAcE,SAbA,kBACE,cACA,WACA,WAGF,oBACE,WACA,SACA,kBACA,WAMJ,0BACE,qCACA,mBAIJ,yBACE,kBAGF,qBACE,mBACA,uBACA,mBAEA,4BACE,WACA,YACA,kBAIJ,gBACE,iBAGF,eACE,iBAEA,qBACE,cAIJ,2BACE,cAGF,oBACE,iBAGF,yBACE,+BAEA,gCACE,WAGF,+BACE,0BAGF,wCACE,kBAIJ,kBACE,cAGF,8BACE,kBACA,UACA,SACA,OACA,MACA,QAIA,yBACE,eAEF,0BACE,cACA,iBAEF,8BACE,YAEA,qCACE,YAKN,aACE,sBAGF,aACE,kBACA,QACA,QACA,WACA,SACA,oBAEA,qBACE,kBACA,WACA,WACA,sBACA,oBAIJ,cACE,sBACA,gBACA,WACA,kBACA,YACA,6DACA,4BAIA,0BACE,SACA,kBACA,YAEA,iCACE,WAGF,sCACE,eAIJ,0BACE,iBAEA,gCACE,uBAIJ,qCACE,YAIJ,kCACE,WACA,YAGF,aACE,UACA,kBAGF,aACE,kBAEA,qCACE,UAGF,0BACE,kBACA,MACA,OACA,cACA,yBAIJ,cACE,WACA,wBACA,4BACA,kBACA,WACA,YACA,UACA,SACA,UAGF,iBACE,kDAGF,iBACE,kDAGF,kCACE,kDAGF,UACE,YACA,wBAGF,6CACE,WACA,4DACA,wBACA,4BACA,kBACA,OACA,QACA,SACA,MACA,WACA,WAIA,qCACE,WACA,4DACA,wBACA,4BACA,kBACA,OACA,QACA,SACA,MACA,WACA,WAGF,qCACE,4BAGF,iBACE,yDACA,WAIJ,oBACE,cAGF,eACE,cACA,sEACA,WACA,wBACA,kCACA,cACA,6BACE,oBAIJ,kCAEE,eACA,wBACA,kCACA,kBACA,iBACA,mBACA,sCACE,YAEF,8CACE,kBACA,iBACA,mBACA,mBACA,SACA,UAIJ,UACE,oBACA,kBACA,mBACA,iEAGF,wBACE,iBACA,kCACA,mBACA,sEAGF,aACE,4BACA,wBACA,YACA,gBACA,gBACA,2BACA,WAGF,UACE,qBACA,WACA,YACA,wBACA,4BACA,gBACA,iBAEA,oBACE,kDAGF,iBACE,oDAGF,mBACE,sDAGF,eACE,kDAGF,gBACE,mDAIJ,eACE,qBACA,kBACA,eACA,gBAGF,sBACI,WACA,kBACA,SACA,MACA,OACA,QACA,4BACA,2BACA,wBAKF,kBACE,qBACA,YACA,SACA,eACA,gBACA,eACA,iBAGF,kBACE,SACA,YACA,eAIJ,YACE,WAEA,gBACE,WACA,WACA,YAIJ,kCACE,kCACA,WACA,mBACA,aAGF,sBAEE,eACA,QACA,uBACA,aACA,YACA,aAEA,0CACE,aACA,uBACA,mBAIJ,UACE,cACA,uBACA,YACA,uBACA,QAEA,sBACG,kBACA,sBACA,OACA,SACA,QAEH,gBACE,YACA,YACA,aACA,kBACA,gBACA,kBACA,WACA,sJAGF,iBACE,mBACA,kBACA,eACA,kBACA,UACA,+DACA,WACA,mBACA,aACA,iBACA,sJAGF,iBACE,YACA,YACA,aACA,UACA,6EAIJ,wBACE,GACE,mBACA,UAGF,IACE,UAGF,KACE,oBAIJ,sBACE,GACE,UAGF,IACE,UAGF,KACE,WAIJ,yBACE,GACE,mCACA,mBACA,+BAGF,IACE,kCACA,sBAGF,IACE,mCACA,sBAGF,IACE,kCACA,sBAGF,IACE,mCACA,oBAIJ,iBACE,uBACA,mBAGF,yBACE,aAGF,SACE,iBAGF,gBACE,qBACA,kBACA,eACA,YACA,WAEA,sBACE,kBACA,UACA,YACA,WAGF,qBACE,kBACA,MACA,OACA,YACA,WACA,2DACA,2BACA,wBACA,4BACA,YACA,+BAGF,+BACE,mEAGF,6BACE,iEAGF,8BACE,kEAGF,0BACE,8DAGF,4BACE,gEAGF,kCACE,sEAGF,oEACE,UAIJ,mBACE,eACA,uBACA,UACA,gBACA,SACA,UACA,YAGF,mEACE,WAGF,eACE,wBACA,YACA,eAGF,4BACE,uBACA,gBACA,mBAGF,YACE,eAEA,kBACE,kCAIJ,gBACE,kCAKF,0BACE,kBAGF,kCACE,cAKF,2CACE,+BAKE,6GACE,WAOJ,iCACE,+DACA,2BACA,4CAGF,kCACE,eACA,qCACE,YACA,kBACA,+BAEF,2CACE,sBACA,WAKN,YACE,kBAEA,wBACE,mBACA,gBACA,iCACA,4CACA,qBACA,iBACA,uBACA,2CACE,aAGF,iCACE,sBACA,YAEA,qFACE,oBAKN,kBACE,wBACA,wBACE,OAIJ,6CACE,kBACA,gBACA,eACA,YACA,cACA,aACA,2BAGF,uBACE,QAGF,sBACE,OAKJ,oBACE,YACA,gBAEF,aACE,iBACA,YAQA,uBACA,gBACA,eATA,uBACE,YAEF,eACE,uBACA,gBAKF,gBACE,YACA,eACA,iBAEF,kBACE,SACA,cAEF,+BACE,UACA,eAEA,4CACE,aAIJ,wBACE,aAIJ,iBACE,gBAEA,sBAEA,2BACE,gBACA,YACA,gCAEF,kCACE,YAEF,+BACE,qBAEF,2BACE,WACA,QAEF,wCACE,SACA,UACA,gBAGA,wBACE,eACA,iBACA,kBAKF,0CACE,iBAEF,kCACE,WACA,YACA,wBAGJ,iCACE,gBACA,6CACE,4BAEF,4CACE,6BAGJ,+DAEE,cACA,sBACA,qCACA,YACA,WACA,eACA,sBACA,iBACA,kBACA,gCACA,sCAEA,6EACE,qBAEF,2EACE,qBAEF,uEACE,sBACE,YACA,WAGN,8BACE,oBAGF,4CACE,gBACA,YAIF,iCACE,aACA,eACA,uBACA,sBACA,oCACE,cACA,gBACA,YACA,WACA,eACA,mBACA,sBACA,4BACA,kBACA,sBAIA,+CACE,YAGF,wCACE,YACA,WACA,kBAKN,6BACE,WACA,eACA,4EAEF,6BACE,cAEA,6CACE,YAGJ,iCACE,WACA,YACA,yBACA,gBACA,oBAOE,wFACE,cACA,kBAEA,eACA,gGACE,aAEF,kHACE,iBACA,cACA,gBACA,uBACA,WAMR,0DAEE,SACA,UACA,mBACA,gBACA,aACA,eACA,YACA,gCACA,kBACA,6BAEA,8EACE,aAGF,sEACE,YACA,cACA,WACA,SACA,WACA,kBACA,eACA,WAGF,0KAEE,UACA,OAEF,oFACE,aACA,WAKA,wMACE,WAEF,wKACE,mBACA,gBACA,iFAGF,gLACE,mBACA,gBACA,gFAGF,4LACE,mBACA,gBACA,iFAGF,4KACE,mBACA,gBACA,iFAGF,gLACE,mBACA,gBACA,+EAIJ,gEACE,gCACA,8BAEA,sBACA,gCACA,mBACA,sBACA,qCACA,4BACA,kBACA,sBACA,wBAEA,sFACE,mBACA,mCACA,uBAGF,4EACE,qBAGF,wEACE,sBACA,YACA,WACA,kBACA,WACA,4EACA,gCACA,oFACE,qBAMR,6BACE,YAGJ,0BACE,iBACI,6BAIR,iBACE,WACA,eACA,8BACA,sBACA,qBACA,kBACA,MACA,OACA,QACA,SACA,kDACA,0DACA,sBAIA,yCACE,aAEF,uBACE,iBACA,kBAEF,yBACI,eACA,qBACA,iBACA,kBACA,WACA,0BACA,oDACA,iBAEA,oDAGJ,mDACI,0BACA,WC57IF,kCACI,qCACA,6DAEA,wCACI,WAKJ,uEACI,WAEA,0EACI,WACA,iDAIR,gEACI,WACA,iBAIR,8BACI,6BACA,yBACA,2CAGJ,8BACI,gBAGJ,8CACI,iBACA,kEACA,0BACA,4BAGA,6BACA,cAGJ,qFAEI,2BACA,kBACA,kBAEA,2DACA,wBACA,8BACA,0BAGJ,oDACI,WAGJ,iHAEI,WAGJ,2CACI,WAGJ,4BAkFI,gBACA,gBAlFA,kDACI,yBAGJ,yDACI,gEACA,2BACA,2BACA,4BAGJ,4CACI,gEACA,2BACA,2BACA,4BAGJ,mHAEI,sEACA,2BACA,2BACA,2BAEA,gSAEI,YACA,cACA,iBACA,gBAEA,wSACI,cAKZ,uDACI,eAKA,qIACI,kBACA,WACA,sBAEA,mJACI,kBACA,MACA,OACA,WACA,YACA,SAKZ,mDACI,iBACA,oBAGJ,gKAGI,iEACA,YACA,QAGJ,+KAGI,iEACA,WACA,WAMJ,2FAEI,4BACA,kBACA,gBACA,UACA,YACA,WACA,0BAGJ,2DACI,gBAKA,6FAEI,sBAIR,2CACI,8DACA,QACA,YAGJ,gDACI,+DACA,YACA,WAGJ,iDACI,sEAGJ,6CACI,kEAGJ,oEACI,YAKA,sHAEI,WACA,YACA,gBAIR,2DACI,WACA,YACA,gBAEA,6DACI,WACA,sBACA,YACA,sBACA,kBACA,mBACA,WAIR,2GAEI,WACA,sBACA,YACA,sBACA,kBACA,mBACA,WAGJ,qDACI,UACA,YACA,WAGJ,yDACI,kBACA,gBACA,eACA,WACA,4BACA,iBACA,gCACA,wCAGJ,4IAEI,gBACA,WACA,yBAGJ,iDACI,kBAGJ,mGAEI,iBACA,kBAGJ,6CACI,gBACA,SACA,UACA,iBAKA,uGAEI,gBACA,SACA,UACA,iBAMJ,2GAEI,gBACA,SACA,UACA,iBAIR,gGAEI,aAKA,6GAEI,0BACA,UACA,eACA,WAGJ,0DACI,8BAEA,gEACI,8BAIR,6CACI,gBACA,SACA,UACA,iBAKZ,oDACI,gEACA,2BACA,2BACA,4BAGJ,sCACI,kBACA,oBACA,kBACA,mEACA,YACA,WAGJ,2CACI,qBACA,kEACA,wBACA,WACA,YACA,SACA,4BACA,2BACA,kBACA,QAGJ,yBACI,YACA,WACA,aAEA,2EACI,cAGJ,2DACI,cAGJ,sEACI,cAGJ,yUAGI,kCAGJ,4CACI,mBACA,2EACA,kBAGJ,0CACI,aAGJ,4OAII,iCACA,WACA,qCACA,kBACA,WACA,iBAGJ,sCACI,WAII,mDACI,cAIR,sDACI,WAEA,wDACI,WAKZ,yCACI,iBAEA,0DACI,WAIR,gCACI,kBACA,MACA,SACA,WACA,QACA,WACA,0DACA,2BACA,qBACA,WAKJ,wCACI,kEAGJ,kEACI,WAGJ,wDACI,oBACA,iBAIR,gCACI,WAGI,oCACI,WAGJ,6CACI,cAIR,gDACI,WAEA,kDACI,WAMR,+GAGI,YACA,cACA,iBACA,gBAEA,qHACI,cAKZ,6BACI,6DACA,sBACA,WACA,YACA,sBACA,kBAIA,+BACI,2JACA,8CACA,4BACA,WACA,kBACA,SACA,YACA,aACA,UACA,WACA,0DAGJ,iCACI,mBACA,sBAEA,wCACI,wEACA,6DAGJ,2CACI,WAGJ,2CACI,gBAGJ,8CACI,WAGJ,+FAEI,6DACA,sBACA,WAGJ,8CACI,sCAKA,gGACI,sCACA,6DAEA,sHACI,mCAIR,sGACI,WAKZ,+CACI,gEAGJ,+BACI,gBACA,gCAEA,sCACI,sCACA,uDAEA,4CACI,sCAGJ,6CACI,sCAKZ,oCACI,YACA,SAGJ,sCACI,SACA,gBAGA,WACA,YAGA,gBAEA,kDACI,gBAKZ,0BAEQ,+BACI,8CACA,2DACA,YACA,SAGJ,wCACI,gDACA,4DACA,SACA,UAKA,qGACI,cAMhB,0DACI,gBAGJ,yBACI,gBACA,YACA,gBAEA,gCACI,4DACA,0BACA,4BACA,WACA,kBACA,UACA,WACA,YACA,UACA,WACA,gCAGJ,4BAeI,YACA,kBACA,iBAhBA,mCACI,wGACA,iDACA,4BACA,WACA,kBACA,UACA,WACA,WACA,UACA,WACA,2CAQR,sCACI,YACA,kBACA,iBAEA,6CACI,4DACA,0BACA,2BACA,WACA,kBACA,UACA,WACA,WACA,SACA,WACA,+BAKZ,6NAMI,4FACA,WACA,sBAEA,uQACI,8BAGJ,iQACI,8BAGJ,yRACI,yBACA,sBAKJ,uEACI,gBACA,YAGJ,gLAGI,WAKJ,+CACI,iCACA,WACA,qCACA,kBACA,WACA,iBACA,YAGJ,sDACI,WAGJ,2CACI,WACA,gBAIR,yEACI,WAGJ,mIAEI,cAGJ,0FACI,WAGJ,4BACI,cAGJ,oCACI,qBAGJ,iCACI,WACA,eACA,8BACA,sBACA,qBACA,kBACA,MACA,OACA,QACA,SACA,kDACA,0DACA,sBAIA,qCACI,sBCpyBJ,oDACI,kEACA,2BACA,eAIR,6BACI,2DACA,wBACA,iCACA,0BACA,4BAGJ,wBACI,kBAeA,4BACA,WACA,2DACA,wBACA,8BACA,0BAnBA,8BACE,WACA,oBACA,kBACA,aACA,OACA,QACA,YACA,UACA,oDACA,4BACA,2BACA,kCASF,kDACE,WAIA,yDACE,sBAEF,oEACE,WAIJ,kFAEE,WAIN,iPAGI,mBACA,4FACA,0BACA,gBAIA,yDACI,gEACA,2BACA,2BACA,4BAOI,gUAEI,YACA,cACA,iBACA,gBAEA,wUACI,cCxFxB,MACI,oBAGJ,KACI","file":"dsa5.css"} \ No newline at end of file diff --git a/styles/scss/dsa5.scss b/styles/scss/dsa5.scss index 13074888..1157b806 100644 --- a/styles/scss/dsa5.scss +++ b/styles/scss/dsa5.scss @@ -1,4 +1,4 @@ -@use "sass:meta"; +@use "sass:meta"; :root { --border-color:#736953a6; @@ -3274,7 +3274,7 @@ } .fa-dsa5-lighthelper:before{ - background-image: url('../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp'); + background-image: url('../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp'); } .fa-dsa5-foodsearch:before{ @@ -3282,7 +3282,7 @@ } .fa-dsa5-adci:before{ - background-image: url('../../../../modules/dsa5-core/icons/equipment/Abblendlaterne.webp'); + background-image: url('../../../../modules/dsa5-core/icons/equipment/Feldflasche.webp'); } .fa-dsa5-plantHelper:before{ diff --git a/system.json b/system.json index 72f26f3d..fa55382b 100644 --- a/system.json +++ b/system.json @@ -2,8 +2,8 @@ "id": "dsa5", "title": "Das Schwarze Auge/The Dark Eye (5th Edition)", "description": "The \"Das Schwarze Auge\" system for Foundry VTT. Includes all relevant mechanisms to play in the wonderous world of Aventuria and Das Schwarze Auge/The Dark Eye.", - "version": "6.1.5", - "download": "https://github.com/Plushtoast/dsa5-foundryVTT/releases/download/6.1.5/dsa5-foundryVTT-6.1.5.zip", + "version": "6.1.6", + "download": "https://github.com/Plushtoast/dsa5-foundryVTT/releases/download/6.1.6/dsa5-foundryVTT-6.1.6.zip", "authors": [ { "name": "Plushtoast" diff --git a/templates/chat/roll/test-card.html b/templates/chat/roll/test-card.html index d0b54402..125427ed 100644 --- a/templates/chat/roll/test-card.html +++ b/templates/chat/roll/test-card.html @@ -47,11 +47,13 @@
{{localize "effect"}}: {{{testData.parsedEffect}}}
-{{/if}} {{#if showDamageToGear}} +{{/if}} +{{#if showDamageToGear}}
-{{/if}} {{#each testData.other as |string index|}} +{{/if}} +{{#each testData.other as |string index|}}
{{{string}}}