diff --git a/index.js b/index.js index 56b898b..8345a28 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,3 @@ /*! For license information please see index.js.LICENSE.txt */ -(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function r(){return r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},r.apply(this,arguments)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,n){for(var r=0;rw});var g={};function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1||n.details.cr<=0?n.details.cr:"1/".concat(1/n.details.cr);return"CR ".concat(s," ").concat(o)}if(i){var u=Object.values(r.classes).map((function(e){return e.name})).join(" / ");return"Level ".concat(n.details.level," ").concat(u," (").concat(n.details.race,")")}return""}},{key:"isDead",get:function(){return this.isDying&&"character"!==this.actor.type}},{key:"isDying",get:function(){return this.actor.system.attributes.hp.value<=0}},{key:"successes",get:function(){var e,t;return null!==(e=null===(t=this.actor.system.attributes)||void 0===t||null===(t=t.death)||void 0===t?void 0:t.success)&&void 0!==e?e:0}},{key:"failures",get:function(){var e,t;return null!==(e=null===(t=this.actor.system.attributes)||void 0===t||null===(t=t.death)||void 0===t?void 0:t.failure)&&void 0!==e?e:0}},{key:"configurationTemplate",get:function(){return"modules/enhancedcombathud-dnd5e/templates/argon-actor-config.hbs"}},{key:"_onDeathSave",value:(n=y(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.actor.rollDeathSave({});case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"getStatBlocks",value:(t=y(u().mark((function e(){var t,n,r,i,a,o,s,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=game.i18n.localize("DND5E.HitPoints").split(" ").map((function(e){return e.charAt(0).toUpperCase()})).join(""),i=game.i18n.localize("DND5E.ArmorClass").split(" ").map((function(e){return e.charAt(0).toUpperCase()})).join(""),a=game.i18n.localize("DND5E.SaveDC").replace("{ability}","").replace("{dc}","").trim(),o=this.actor.system.attributes.hp.temp?"#6698f3":"rgb(0 255 170)",s=this.actor.system.attributes.hp.tempmax,l=s?s>0?"rgb(222 91 255)":"#ffb000":"rgb(255 255 255)",e.abrupt("return",[[{text:"".concat(this.actor.system.attributes.hp.value+(null!==(t=this.actor.system.attributes.hp.temp)&&void 0!==t?t:0)),color:o},{text:"/"},{text:"".concat(this.actor.system.attributes.hp.max+(null!==(n=this.actor.system.attributes.hp.tempmax)&&void 0!==n?n:0)),color:l},{text:r}],[{text:i},{text:this.actor.system.attributes.ac.value,color:"var(--ech-movement-baseMovement-background)"}],[{text:a},{text:this.actor.system.attributes.spelldc,color:"var(--ech-movement-baseMovement-background)"}]]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),i}(o.PORTRAIT.PortraitPanel),A=function(e){f(r,e);var t,n=m(r);function r(e,t,i){var a;return l(this,r),(a=n.call(this,e)).item=t,a.type=i,a}return d(r,[{key:"hasTooltip",get:function(){return!0}},{key:"tooltipOrientation",get:function(){return TooltipManager.TOOLTIP_DIRECTIONS.RIGHT}},{key:"getTooltipData",value:(t=y(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,_(this.item,this.type);case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(o.DRAWER.DrawerButton),N=function(e){f(n,e);var t=m(n);function n(){l(this,n);for(var e=arguments.length,r=new Array(e),i=0;i=0?"+".concat(e):e};return[{gridCols:"5fr 2fr 2fr",captions:[{label:"Abilities",align:"left"},{label:"Check",align:"center"},{label:"Save",align:"center"}],align:["left","center","center"],buttons:Object.keys(t).map((function(n){var r=t[n];return new A([{label:CONFIG.DND5E.abilities[n].label,onClick:function(t){return e.actor.rollAbility(n,{event:t})}},{label:i(r.mod),onClick:function(t){return e.actor.rollAbilityTest(n,{event:t})}},{label:i(r.save),onClick:function(t){return e.actor.rollAbilitySave(n,{event:t})}}],n,"save")}))},{gridCols:"7fr 2fr",captions:[{label:"Skills"},{label:""}],buttons:Object.keys(n).map((function(t){var r=n[t];return new A([{label:F(r.proficient)+CONFIG.DND5E.skills[t].label,onClick:function(n){return e.actor.rollSkill(t,{event:n})}},{label:"".concat(i(r.mod),'(').concat(r.passive,")"),style:"display: flex; justify-content: flex-end;"}],t,"skill")}))},{gridCols:"7fr 2fr",captions:[{label:"Tools"},{label:""}],buttons:r.map((function(n){return new A([{label:F(n.system.proficient)+n.name,onClick:function(e){return n.rollToolCheck({event:e})}},{label:i(t[n.abilityMod].mod+n.system.proficiencyMultiplier*e.actor.system.attributes.prof)}],n)}))}]}},{key:"title",get:function(){return"".concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.saves.name")," / ").concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.skills.name")," / ").concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.tools.name"))}}]),n}(o.DRAWER.DrawerPanel),x=function(t){f(i,t);var n,r=m(i);function i(){l(this,i);for(var e=arguments.length,t=new Array(e),n=0;n';case"bludgeoning":return'';case"cold":return'';case"fire":return'';case"force":return'';case"lightning":return'';case"necrotic":return'';case"piercing":return'';case"poison":return'';case"psychic":return'';case"radiant":return'';case"slashing":return'';case"thunder":return'';case"healing":return'';default:return""}}function F(e){return 0==e?' ':1==e?' ':2==e?' ':.5==e?' ':' '}function L(e){if(!game.settings.get(w,"condenseClassActions"))return e.map((function(e){return new C({item:e,inActionPanel:!0})}));for(var t=[],n=e.length,r=n-n%2,i=null,a=0;a{"use strict";var t={d:(r,a)=>{for(var i in a)t.o(a,i)&&!t.o(r,i)&&Object.defineProperty(r,i,{enumerable:!0,get:a[i]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r)};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _createForOfIteratorHelper(t,r){var a="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){a&&(t=a);var i=0,o=function F(){};return{s:o,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,c=!0,u=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return c=t.done,t},e:function e(t){u=!0,l=t},f:function f(){try{c||null==a.return||a.return()}finally{if(u)throw l}}}}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,r,a){var i=function _superPropBase(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&null!==(t=_getPrototypeOf(t)););return t}(t,r);if(i){var o=Object.getOwnPropertyDescriptor(i,r);return o.get?o.get.call(arguments.length<3?t:a):o.value}},_get.apply(this,arguments)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var i,o,l,c,u=[],d=!0,p=!1;try{if(l=(a=a.call(t)).next,0===r){if(Object(a)!==a)return;d=!1}else for(;!(d=(i=l.call(a)).done)&&(u.push(i.value),u.length!==r);d=!0);}catch(t){p=!0,o=t}finally{try{if(!d&&null!=a.return&&(c=a.return(),Object(c)!==c))return}finally{if(p)throw o}}return u}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var a=0,i=new Array(r);a=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--i){var o=this.tryEntries[i];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--r){var a=this.tryEntries[r];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),resetTryEntry(a),d}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc===t){var i=a.completion;if("throw"===i.type){var o=i.arg;resetTryEntry(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,r,a){return this.delegate={iterator:values(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=void 0),d}},t}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var a=0;aa});var r={};function initConfig(){Hooks.on("argonInit",(function(t){var i;if("dnd5e"===game.system.id){!function registerItems(){if(r[game.i18n.localize("enhancedcombathud-dnd5e.items.disengage.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.disengage.name"),type:"feat",img:"modules/enhancedcombathud/icons/journey.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.disengage.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:1,units:"turn"},target:{value:null,width:null,units:"",type:"self"},range:{value:null,long:null,units:""},consume:{type:"",target:"",amount:null},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"}},effects:[{_id:"8FtZnIC1vbyKZ6xF",changes:[],disabled:!1,duration:{startTime:null,turns:1},icon:"modules/enhancedcombathud/icons/journey.webp",label:"Disengage",origin:"Item.wyQkeuZkttllAFB1",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{core:{sourceId:"Item.wyQkeuZkttllAFB1"},"midi-qol":{onUseMacroName:""}}},r[game.i18n.localize("enhancedcombathud-dnd5e.items.dodge.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.dodge.name"),type:"feat",img:"modules/enhancedcombathud/icons/armor-upgrade.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.dodge.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:1,units:"round"},target:{value:null,width:null,units:"",type:"self"},range:{value:null,long:null,units:""},consume:{type:"",target:"",amount:null},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"},consumableType:"trinket"},effects:[{_id:"2xH2YQ6pm430O0Aq",changes:[],disabled:!1,duration:{startTime:null,rounds:1},icon:"modules/enhancedcombathud/icons/armor-upgrade.webp",label:"Dodge",origin:"Item.pakEYcgLYxtKGv7J",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},r[game.i18n.localize("enhancedcombathud-dnd5e.items.ready.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.ready.name"),type:"feat",img:"modules/enhancedcombathud/icons/clockwork.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.ready.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:null,units:""},target:{value:null,width:null,units:"",type:"self"},range:{value:null,long:null,units:""},consume:{type:"",target:"",amount:null},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"},consumableType:"trinket"},effects:[{_id:"BevDb0J80M9BdoEl",changes:[],disabled:!1,duration:{startTime:null,turns:1},icon:"modules/enhancedcombathud/icons/clockwork.webp",label:"Ready",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},r[game.i18n.localize("enhancedcombathud-dnd5e.items.hide.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.hide.name"),type:"feat",img:"modules/enhancedcombathud/icons/cloak-dagger.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.hide.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:null,units:""},target:{value:null,width:null,units:"",type:"self"},range:{value:null,long:null,units:""},consume:{type:"",target:"",amount:null},recharge:{value:null,charged:!1},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"},consumableType:"trinket"},effects:[{_id:"SZkbtgGCICrpH0GJ",changes:[],disabled:!1,duration:{startTime:null,turns:10},icon:"modules/enhancedcombathud/icons/cloak-dagger.webp",label:"Hide",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},r[game.i18n.localize("enhancedcombathud-dnd5e.items.dash.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.dash.name"),type:"feat",img:"modules/enhancedcombathud/icons/walking-boot.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.dash.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:null,units:""},target:{value:null,width:null,units:"",type:"self"},range:{value:null,long:null,units:""},consume:{type:"",target:"",amount:null},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"},consumableType:"trinket"},effects:[{_id:"PPMPZY1t3AUB7UGA",changes:[],disabled:!1,duration:{startTime:null,rounds:1},icon:"modules/enhancedcombathud/icons/walking-boot.webp",label:"Dash",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},r[game.i18n.localize("enhancedcombathud-dnd5e.items.shove.name")]={name:game.i18n.localize("enhancedcombathud-dnd5e.items.shove.name"),type:"feat",img:"modules/enhancedcombathud/icons/shield-bash.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-dnd5e.items.shove.desc"),chat:"",unidentified:""},source:"",quantity:1,weight:0,price:0,attuned:!1,attunement:0,equipped:!1,rarity:"",identified:!0,activation:{type:"action",cost:1,condition:""},duration:{value:null,units:""},target:{value:1,width:null,units:"",type:"creature"},range:{value:null,long:null,units:"touch"},consume:{type:"",target:"",amount:null},ability:"",actionType:"util",attackBonus:0,chatFlavor:"",critical:null,damage:{parts:[],versatile:""},formula:"",save:{ability:"",dc:null,scaling:"spell"},consumableType:"trinket"},effects:[],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},game.settings.get("enhancedcombathud-dnd5e","noAA"))for(var t=0,a=Object.keys(r);t=1||a.details.cr<=0?a.details.cr:"1/".concat(1/a.details.cr);return"CR ".concat(u," ").concat(c)}if(o){var d=Object.values(i.classes).map((function(t){return t.name})).join(" / ");return"Level ".concat(a.details.level," ").concat(d," (").concat(a.details.race,")")}return""}},{key:"isDead",get:function get(){return this.isDying&&"character"!==this.actor.type}},{key:"isDying",get:function get(){return this.actor.system.attributes.hp.value<=0}},{key:"successes",get:function get(){var t,r;return null!==(t=null===(r=this.actor.system.attributes)||void 0===r||null===(r=r.death)||void 0===r?void 0:r.success)&&void 0!==t?t:0}},{key:"failures",get:function get(){var t,r;return null!==(t=null===(r=this.actor.system.attributes)||void 0===r||null===(r=r.death)||void 0===r?void 0:r.failure)&&void 0!==t?t:0}},{key:"configurationTemplate",get:function get(){return"modules/enhancedcombathud-dnd5e/templates/argon-actor-config.hbs"}},{key:"_onDeathSave",value:(a=_asyncToGenerator(_regeneratorRuntime().mark((function _callee(t){return _regeneratorRuntime().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:this.actor.rollDeathSave({});case 1:case"end":return t.stop()}}),_callee,this)}))),function _onDeathSave(t){return a.apply(this,arguments)})},{key:"getStatBlocks",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee2(){var t,r,a,i,o,l,c,u;return _regeneratorRuntime().wrap((function _callee2$(d){for(;;)switch(d.prev=d.next){case 0:return a=game.i18n.localize("DND5E.HitPoints").split(" ").map((function(t){return t.charAt(0).toUpperCase()})).join(""),i=game.i18n.localize("DND5E.ArmorClass").split(" ").map((function(t){return t.charAt(0).toUpperCase()})).join(""),o=game.i18n.localize("DND5E.SaveDC").replace("{ability}","").replace("{dc}","").trim(),l=this.actor.system.attributes.hp.temp?"#6698f3":"rgb(0 255 170)",c=this.actor.system.attributes.hp.tempmax,u=c?c>0?"rgb(222 91 255)":"#ffb000":"rgb(255 255 255)",d.abrupt("return",[[{text:"".concat(this.actor.system.attributes.hp.value+(null!==(t=this.actor.system.attributes.hp.temp)&&void 0!==t?t:0)),color:l},{text:"/"},{text:"".concat(this.actor.system.attributes.hp.max+(null!==(r=this.actor.system.attributes.hp.tempmax)&&void 0!==r?r:0)),color:u},{text:a}],[{text:i},{text:this.actor.system.attributes.ac.value,color:"var(--ech-movement-baseMovement-background)"}],[{text:o},{text:this.actor.system.attributes.spelldc,color:"var(--ech-movement-baseMovement-background)"}]]);case 7:case"end":return d.stop()}}),_callee2,this)}))),function getStatBlocks(){return r.apply(this,arguments)})}]),DND5ePortraitPanel}(o.PORTRAIT.PortraitPanel),h=function(t){_inherits(DND5eDrawerButton,t);var r,a=_createSuper(DND5eDrawerButton);function DND5eDrawerButton(t,r,i){var o;return _classCallCheck(this,DND5eDrawerButton),(o=a.call(this,t)).item=r,o.type=i,o}return _createClass(DND5eDrawerButton,[{key:"hasTooltip",get:function get(){return!0}},{key:"tooltipOrientation",get:function get(){return TooltipManager.TOOLTIP_DIRECTIONS.RIGHT}},{key:"getTooltipData",value:(r=_asyncToGenerator(_regeneratorRuntime().mark((function _callee3(){var t;return _regeneratorRuntime().wrap((function _callee3$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,getTooltipDetails(this.item,this.type);case 2:return t=r.sent,r.abrupt("return",t);case 4:case"end":return r.stop()}}),_callee3,this)}))),function getTooltipData(){return r.apply(this,arguments)})}]),DND5eDrawerButton}(o.DRAWER.DrawerButton),y=function(t){_inherits(DND5eDrawerPanel,t);var r=_createSuper(DND5eDrawerPanel);function DND5eDrawerPanel(){_classCallCheck(this,DND5eDrawerPanel);for(var t=arguments.length,a=new Array(t),i=0;i=0?"+".concat(t):t};return[{gridCols:"5fr 2fr 2fr",captions:[{label:"Abilities",align:"left"},{label:"Check",align:"center"},{label:"Save",align:"center"}],align:["left","center","center"],buttons:Object.keys(r).map((function(a){var i=r[a];return new h([{label:CONFIG.DND5E.abilities[a].label,onClick:function onClick(r){return t.actor.rollAbility(a,{event:r})}},{label:o(i.mod),onClick:function onClick(r){return t.actor.rollAbilityTest(a,{event:r})}},{label:o(i.save),onClick:function onClick(r){return t.actor.rollAbilitySave(a,{event:r})}}],a,"save")}))},{gridCols:"7fr 2fr",captions:[{label:"Skills"},{label:""}],buttons:Object.keys(a).map((function(r){var i=a[r];return new h([{label:getProficiencyIcon(i.proficient)+CONFIG.DND5E.skills[r].label,onClick:function onClick(a){return t.actor.rollSkill(r,{event:a})}},{label:"".concat(o(i.mod),'(').concat(i.passive,")"),style:"display: flex; justify-content: flex-end;"}],r,"skill")}))},{gridCols:"7fr 2fr",captions:[{label:"Tools"},{label:""}],buttons:i.map((function(a){return new h([{label:getProficiencyIcon(a.system.proficient)+a.name,onClick:function onClick(t){return a.rollToolCheck({event:t})}},{label:o(r[a.abilityMod].mod+a.system.proficiencyMultiplier*t.actor.system.attributes.prof)}],a)}))}]}},{key:"title",get:function get(){return"".concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.saves.name")," / ").concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.skills.name")," / ").concat(game.i18n.localize("enhancedcombathud-dnd5e.hud.tools.name"))}}]),DND5eDrawerPanel}(o.DRAWER.DrawerPanel),v=function(i){_inherits(DND5eActionActionPanel,i);var l,p=_createSuper(DND5eActionActionPanel);function DND5eActionActionPanel(){_classCallCheck(this,DND5eActionActionPanel);for(var t=arguments.length,r=new Array(t),a=0;a';case"bludgeoning":return'';case"cold":return'';case"fire":return'';case"force":return'';case"lightning":return'';case"necrotic":return'';case"piercing":return'';case"poison":return'';case"psychic":return'';case"radiant":return'';case"slashing":return'';case"thunder":return'';case"healing":return'';default:return""}}function getProficiencyIcon(t){return 0==t?' ':1==t?' ':2==t?' ':.5==t?' ':' '}function condenseItemButtons(t){if(!game.settings.get(a,"condenseClassActions"))return t.map((function(t){return new A({item:t,inActionPanel:!0})}));for(var r=[],i=t.length,l=i-i%2,c=null,u=0;ut.length)&&(r=t.length);for(var a=0,i=new Array(r);a {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { MODULE_ID } from \"./main.js\";\r\n\r\nconst ECHItems = {};\r\n\r\nexport function initConfig() {\r\n\r\n Hooks.on(\"argonInit\", (CoreHUD) => {\r\n if (game.system.id !== \"dnd5e\") return;\r\n registerItems();\r\n const ARGON = CoreHUD.ARGON;\r\n\r\n const isMIDI = game.modules.get(\"midi-qol\")?.active;\r\n const getMidiFlag = (actionType) => {\r\n if (!isMIDI || !ui.ARGON._actor) return null;\r\n const flag = ui.ARGON._actor.getFlag(\"midi-qol\", \"actions\") ?? {};\r\n const value = flag[actionType] ?? false;\r\n const midiAction = value ? 0 : 1;\r\n return midiAction;\r\n };\r\n\r\n const actionTypes = {\r\n action: [\"action\"],\r\n bonus: [\"bonus\"],\r\n reaction: [\"reaction\", \"reactiondamage\", \"reactionmanual\"],\r\n free: [\"special\"],\r\n };\r\n\r\n const itemTypes = {\r\n spell: [\"spell\"],\r\n feat: [\"feat\"],\r\n consumable: [\"consumable\", \"equipment\", \"loot\"],\r\n };\r\n\r\n const mainBarFeatures = [];\r\n\r\n if (game.settings.get(MODULE_ID, \"showWeaponsItems\")) itemTypes.consumable.push(\"weapon\");\r\n if (game.settings.get(MODULE_ID, \"showClassActions\")) mainBarFeatures.push(\"class\");\r\n\r\n CoreHUD.DND5E = {\r\n actionTypes,\r\n itemTypes,\r\n mainBarFeatures,\r\n ECHItems,\r\n };\r\n\r\n Hooks.callAll(\"enhanced-combat-hud.dnd5e.initConfig\", { actionTypes, itemTypes, ECHItems });\r\n\r\n async function getTooltipDetails(item, type) {\r\n let title, description, itemType, subtitle, target, range, dt;\r\n let damageTypes = [];\r\n let properties = [];\r\n let materialComponents = \"\";\r\n\r\n if (type == \"skill\") {\r\n title = CONFIG.DND5E.skills[item].label;\r\n description = game.i18n.localize(`enhancedcombathud-dnd5e.skills.${item}.tooltip`);\r\n } else if (type == \"save\") {\r\n title = CONFIG.DND5E.abilities[item].label;\r\n description = game.i18n.localize(`enhancedcombathud-dnd5e.abilities.${item}.tooltip`);\r\n } else {\r\n if (!item || !item.system) return;\r\n\r\n title = item.name;\r\n description = item.system.description.value;\r\n itemType = item.type;\r\n target = item.labels?.target || \"-\";\r\n range = item.labels?.range || \"-\";\r\n properties = [];\r\n dt = item.labels?.damageTypes?.split(\", \");\r\n damageTypes = dt && dt.length ? dt : [];\r\n materialComponents = \"\";\r\n\r\n switch (itemType) {\r\n case \"weapon\":\r\n subtitle = CONFIG.DND5E.weaponTypes[item.system.weaponType];\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n for (let [key, value] of Object.entries(item.system.properties)) {\r\n let prop = value && CONFIG.DND5E.weaponProperties[key] ? CONFIG.DND5E.weaponProperties[key] : undefined;\r\n if (prop) properties.push(prop);\r\n }\r\n break;\r\n case \"spell\":\r\n subtitle = `${item.labels.level} ${item.labels.school}`;\r\n properties.push(CONFIG.DND5E.spellSchools[item.system.school]);\r\n properties.push(item.labels.duration);\r\n properties.push(item.labels.save);\r\n for (let comp of item.labels.components.all) {\r\n properties.push(comp.abbr);\r\n }\r\n if (item.labels.materials) materialComponents = item.labels.materials;\r\n break;\r\n case \"consumable\":\r\n subtitle = CONFIG.DND5E.consumableTypes[item.system.consumableType];\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n break;\r\n case \"feat\":\r\n subtitle = item.system.requirements;\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n break;\r\n }\r\n }\r\n\r\n if (description) description = await TextEditor.enrichHTML(description);\r\n let details = [];\r\n if (target || range) {\r\n details = [\r\n {\r\n label: \"enhancedcombathud-dnd5e.tooltip.target.name\",\r\n value: target,\r\n },\r\n {\r\n label: \"enhancedcombathud-dnd5e.tooltip.range.name\",\r\n value: range,\r\n },\r\n ];\r\n }\r\n if (item?.labels?.toHit) {\r\n details.push({\r\n label: \"enhancedcombathud-dnd5e.tooltip.toHit.name\",\r\n value: item.labels.toHit,\r\n });\r\n }\r\n if (item?.labels?.derivedDamage?.length) {\r\n let dmgString = \"\";\r\n item.labels.derivedDamage.forEach((dDmg) => {\r\n dmgString += dDmg.formula + \" \" + getDamageTypeIcon(dDmg.damageType) + \" \";\r\n });\r\n details.push({\r\n label: \"enhancedcombathud-dnd5e.tooltip.damage.name\",\r\n value: dmgString,\r\n });\r\n }\r\n\r\n const tooltipProperties = [];\r\n if (damageTypes?.length) damageTypes.forEach((d) => tooltipProperties.push({ label: d, primary: true }));\r\n if (properties?.length) properties.forEach((p) => tooltipProperties.push({ label: p, secondary: true }));\r\n\r\n return { title, description, subtitle, details, properties: tooltipProperties, footerText: materialComponents };\r\n }\r\n\r\n function getDamageTypeIcon(damageType) {\r\n switch (damageType.toLowerCase()) {\r\n case \"acid\":\r\n return '';\r\n case \"bludgeoning\":\r\n return '';\r\n case \"cold\":\r\n return '';\r\n case \"fire\":\r\n return '';\r\n case \"force\":\r\n return '';\r\n case \"lightning\":\r\n return '';\r\n case \"necrotic\":\r\n return '';\r\n case \"piercing\":\r\n return '';\r\n case \"poison\":\r\n return '';\r\n case \"psychic\":\r\n return '';\r\n case \"radiant\":\r\n return '';\r\n case \"slashing\":\r\n return '';\r\n case \"thunder\":\r\n return '';\r\n case \"healing\":\r\n return '';\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n function getProficiencyIcon(proficiency) {\r\n if (proficiency == 0) return ' ';\r\n else if (proficiency == 1) return ' ';\r\n else if (proficiency == 2) return ' ';\r\n else if (proficiency == 0.5) return ' ';\r\n else return ' ';\r\n }\r\n\r\n function condenseItemButtons(items) {\r\n const condenseClassActions = game.settings.get(MODULE_ID, \"condenseClassActions\");\r\n if (!condenseClassActions) return items.map((item) => new DND5eItemButton({item, inActionPanel: true}));\r\n const condensedItems = [];\r\n const barItemsLength = items.length;\r\n const barItemsMultipleOfTwo = barItemsLength - (barItemsLength % 2);\r\n let currentSplitButtonItemButton = null;\r\n for (let i = 0; i < barItemsLength; i++) {\r\n const isCondensedButton = i < barItemsMultipleOfTwo;\r\n const item = items[i];\r\n if (isCondensedButton) {\r\n if (currentSplitButtonItemButton) {\r\n const button = new DND5eItemButton({item, inActionPanel: false});\r\n condensedItems.push(new ARGON.MAIN.BUTTONS.SplitButton(currentSplitButtonItemButton, button));\r\n currentSplitButtonItemButton = null;\r\n } else {\r\n currentSplitButtonItemButton = new DND5eItemButton({item, inActionPanel: false});\r\n }\r\n } else {\r\n condensedItems.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n }\r\n }\r\n return condensedItems;\r\n }\r\n\r\n class DND5ePortraitPanel extends ARGON.PORTRAIT.PortraitPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get description() {\r\n const { type, system } = this.actor;\r\n const actor = this.actor;\r\n const isNPC = type === \"npc\";\r\n const isPC = type === \"character\";\r\n if (isNPC) {\r\n const creatureType = game.i18n.localize(CONFIG.DND5E.creatureTypes[actor.system.details.type.value] ?? actor.system.details.type.custom);\r\n const cr = system.details.cr >= 1 || system.details.cr <= 0 ? system.details.cr : `1/${1 / system.details.cr}`;\r\n return `CR ${cr} ${creatureType}`;\r\n } else if (isPC) {\r\n const classes = Object.values(actor.classes)\r\n .map((c) => c.name)\r\n .join(\" / \");\r\n return `Level ${system.details.level} ${classes} (${system.details.race})`;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n get isDead() {\r\n return this.isDying && this.actor.type !== \"character\";\r\n }\r\n\r\n get isDying() {\r\n return this.actor.system.attributes.hp.value <= 0;\r\n }\r\n\r\n get successes() {\r\n return this.actor.system.attributes?.death?.success ?? 0;\r\n }\r\n\r\n get failures() {\r\n return this.actor.system.attributes?.death?.failure ?? 0;\r\n }\r\n\r\n get configurationTemplate() {\r\n return \"modules/enhancedcombathud-dnd5e/templates/argon-actor-config.hbs\";\r\n }\r\n\r\n async _onDeathSave(event) {\r\n this.actor.rollDeathSave({});\r\n }\r\n\r\n async getStatBlocks() {\r\n const HPText = game.i18n\r\n .localize(\"DND5E.HitPoints\")\r\n .split(\" \")\r\n .map((word) => word.charAt(0).toUpperCase())\r\n .join(\"\");\r\n const ACText = game.i18n\r\n .localize(\"DND5E.ArmorClass\")\r\n .split(\" \")\r\n .map((word) => word.charAt(0).toUpperCase())\r\n .join(\"\");\r\n const SpellDC = game.i18n.localize(\"DND5E.SaveDC\").replace(\"{ability}\", \"\").replace(\"{dc}\", \"\").trim();\r\n\r\n const hpColor = this.actor.system.attributes.hp.temp ? \"#6698f3\" : \"rgb(0 255 170)\";\r\n const tempMax = this.actor.system.attributes.hp.tempmax;\r\n const hpMaxColor = tempMax ? (tempMax > 0 ? \"rgb(222 91 255)\" : \"#ffb000\") : \"rgb(255 255 255)\";\r\n\r\n return [\r\n [\r\n {\r\n text: `${this.actor.system.attributes.hp.value + (this.actor.system.attributes.hp.temp ?? 0)}`,\r\n color: hpColor,\r\n },\r\n {\r\n text: `/`,\r\n },\r\n {\r\n text: `${this.actor.system.attributes.hp.max + (this.actor.system.attributes.hp.tempmax ?? 0)}`,\r\n color: hpMaxColor,\r\n },\r\n {\r\n text: HPText,\r\n },\r\n ],\r\n [\r\n {\r\n text: ACText,\r\n },\r\n {\r\n text: this.actor.system.attributes.ac.value,\r\n color: \"var(--ech-movement-baseMovement-background)\",\r\n },\r\n ],\r\n [\r\n {\r\n text: SpellDC,\r\n },\r\n {\r\n text: this.actor.system.attributes.spelldc,\r\n color: \"var(--ech-movement-baseMovement-background)\",\r\n },\r\n ],\r\n ];\r\n }\r\n }\r\n\r\n class DND5eDrawerButton extends ARGON.DRAWER.DrawerButton {\r\n constructor(buttons, item, type) {\r\n super(buttons);\r\n this.item = item;\r\n this.type = type;\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n get tooltipOrientation() {\r\n return TooltipManager.TOOLTIP_DIRECTIONS.RIGHT;\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item, this.type);\r\n return tooltipData;\r\n }\r\n }\r\n\r\n class DND5eDrawerPanel extends ARGON.DRAWER.DrawerPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get categories() {\r\n const abilities = this.actor.system.abilities;\r\n const skills = this.actor.system.skills;\r\n const tools = this.actor.itemTypes.tool;\r\n\r\n const addSign = (value) => {\r\n if (value >= 0) return `+${value}`;\r\n return value;\r\n };\r\n\r\n const abilitiesButtons = Object.keys(abilities).map((ability) => {\r\n const abilityData = abilities[ability];\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: CONFIG.DND5E.abilities[ability].label,\r\n onClick: (event) => this.actor.rollAbility(ability, { event }),\r\n },\r\n {\r\n label: addSign(abilityData.mod),\r\n onClick: (event) => this.actor.rollAbilityTest(ability, { event }),\r\n },\r\n {\r\n label: addSign(abilityData.save),\r\n onClick: (event) => this.actor.rollAbilitySave(ability, { event }),\r\n },\r\n ],\r\n ability,\r\n \"save\",\r\n );\r\n });\r\n\r\n const skillsButtons = Object.keys(skills).map((skill) => {\r\n const skillData = skills[skill];\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: getProficiencyIcon(skillData.proficient) + CONFIG.DND5E.skills[skill].label,\r\n onClick: (event) => this.actor.rollSkill(skill, { event }),\r\n },\r\n {\r\n label: `${addSign(skillData.mod)}(${skillData.passive})`,\r\n style: \"display: flex; justify-content: flex-end;\",\r\n },\r\n ],\r\n skill,\r\n \"skill\",\r\n );\r\n });\r\n\r\n const toolButtons = tools.map((tool) => {\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: getProficiencyIcon(tool.system.proficient) + tool.name,\r\n onClick: (event) => tool.rollToolCheck({ event }),\r\n },\r\n {\r\n label: addSign(abilities[tool.abilityMod].mod + tool.system.proficiencyMultiplier * this.actor.system.attributes.prof),\r\n },\r\n ],\r\n tool,\r\n );\r\n });\r\n\r\n return [\r\n {\r\n gridCols: \"5fr 2fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Abilities\",\r\n align: \"left\",\r\n },\r\n {\r\n label: \"Check\",\r\n align: \"center\",\r\n },\r\n {\r\n label: \"Save\",\r\n align: \"center\",\r\n },\r\n ],\r\n align: [\"left\", \"center\", \"center\"],\r\n buttons: abilitiesButtons,\r\n },\r\n {\r\n gridCols: \"7fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Skills\",\r\n },\r\n {\r\n label: \"\",\r\n },\r\n ],\r\n buttons: skillsButtons,\r\n },\r\n {\r\n gridCols: \"7fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Tools\",\r\n },\r\n {\r\n label: \"\",\r\n },\r\n ],\r\n buttons: toolButtons,\r\n },\r\n ];\r\n }\r\n\r\n get title() {\r\n return `${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.saves.name\")} / ${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.skills.name\")} / ${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.tools.name\")}`;\r\n }\r\n }\r\n\r\n class DND5eActionActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Action\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"action\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const spellItems = this.actor.items.filter((item) => itemTypes.spell.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n const featItems = this.actor.items.filter((item) => itemTypes.feat.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n const consumableItems = this.actor.items.filter((item) => itemTypes.consumable.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n\r\n const spellButton = !spellItems.length ? [] : [new DND5eButtonPanelButton({ type: \"spell\", items: spellItems, color: 0 })].filter((button) => button.hasContents);\r\n\r\n const specialActions = Object.values(ECHItems);\r\n\r\n const showSpecialActions = game.settings.get(MODULE_ID, \"showSpecialActions\");\r\n const buttons = [];\r\n if (showSpecialActions) {\r\n buttons.push(...[new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true }), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[0]), new DND5eSpecialActionButton(specialActions[1])), ...spellButton, new DND5eButtonPanelButton({ type: \"feat\", items: featItems, color: 0 }), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[2]), new DND5eSpecialActionButton(specialActions[3])), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[4]), new DND5eSpecialActionButton(specialActions[5])), new DND5eButtonPanelButton({ type: \"consumable\", items: consumableItems, color: 0 })]);\r\n } else {\r\n buttons.push(...[new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true }), ...spellButton, new DND5eButtonPanelButton({ type: \"feat\", items: featItems, color: 0 }), new DND5eButtonPanelButton({ type: \"consumable\", items: consumableItems, color: 0 })]); \r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.action.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n \r\n return buttons.filter((button) => button.hasContents || button.items == undefined || button.items.length);\r\n }\r\n }\r\n\r\n class DND5eBonusActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.BonusAction\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"bonus\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: false })];\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.bonus.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 1 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.bonus.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eReactionActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Reaction\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"reaction\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true })];\r\n //buttons.push(new DND5eEquipmentButton({slot: 1}));\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.reaction.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 3 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.reaction.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eFreeActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Special\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.isActionUsed ? 0 : 1;\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.free.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 2 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.free.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eLegActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.LegendaryActionLabel\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? this.actor.system.resources?.legact?.max ?? null : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.actor.system.resources?.legact?.value ?? null;\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n const legendary = this.actor.items.filter((item) => item.system.activation?.type === \"legendary\");\r\n legendary.forEach((item) => {\r\n buttons.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n });\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eLairActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.LairActionLabel\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.actor.system.resources.lair?.value * 1;\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n const lair = this.actor.items.filter((item) => item.system.activation?.type === \"lair\");\r\n lair.forEach((item) => {\r\n buttons.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n });\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eItemButton extends ARGON.MAIN.BUTTONS.ItemButton {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n get ranges() {\r\n const item = this.item;\r\n const touchRange = item.system.range.units == \"touch\" ? canvas?.scene?.grid?.distance : null;\r\n return {\r\n normal: item.system?.range?.value ?? touchRange,\r\n long: item.system?.range?.long ?? null,\r\n };\r\n }\r\n\r\n get targets() {\r\n const item = this.item;\r\n const validTargets = [\"creature\", \"ally\", \"enemy\"];\r\n const actionType = item.system.actionType;\r\n const targetType = item.system.target?.type;\r\n if (!item.system.target?.units && validTargets.includes(targetType)) {\r\n return item.system.target?.value;\r\n } else if (actionType === \"mwak\" || actionType === \"rwak\"){\r\n return 1;\r\n }\r\n return null;\r\n }\r\n\r\n get visible() {\r\n if(!this._isWeaponSet || this._isPrimary) return super.visible;\r\n return super.visible && this.item?.system?.armor?.type !== \"shield\";\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item);\r\n tooltipData.propertiesLabel = \"enhancedcombathud-dnd5e.tooltip.properties.name\";\r\n return tooltipData;\r\n }\r\n\r\n async _onLeftClick(event) {\r\n ui.ARGON.interceptNextDialog(event.currentTarget);\r\n const used = await this.item.use({ event }, { event });\r\n if (used) {\r\n DND5eItemButton.consumeActionEconomy(this.item);\r\n }\r\n }\r\n\r\n async _onRightClick(event) {\r\n this.item?.sheet?.render(true);\r\n }\r\n\r\n static consumeActionEconomy(item) {\r\n const activationType = item.system.activation?.type;\r\n let actionType = null;\r\n for (const [type, types] of Object.entries(actionTypes)) {\r\n if (types.includes(activationType)) actionType = type;\r\n }\r\n if (!actionType) return;\r\n if (game.combat?.combatant?.actor !== item.parent) actionType = \"reaction\";\r\n if (actionType === \"action\") {\r\n ui.ARGON.components.main[0].isActionUsed = true;\r\n ui.ARGON.components.main[0].updateActionUse();\r\n } else if (actionType === \"bonus\") {\r\n ui.ARGON.components.main[1].isActionUsed = true;\r\n ui.ARGON.components.main[1].updateActionUse();\r\n } else if (actionType === \"reaction\") {\r\n ui.ARGON.components.main[2].isActionUsed = true;\r\n ui.ARGON.components.main[2].updateActionUse();\r\n } else if (actionType === \"free\") {\r\n ui.ARGON.components.main[3].isActionUsed = true;\r\n ui.ARGON.components.main[3].updateActionUse();\r\n } else if (actionType === \"legendary\") {\r\n ui.ARGON.components.main[4].isActionUsed = true;\r\n }\r\n }\r\n\r\n async render(...args) {\r\n await super.render(...args);\r\n if (this.item) {\r\n const weapons = this.actor.items.filter((item) => item.system.consume?.target === this.item.id);\r\n ui.ARGON.updateItemButtons(weapons);\r\n }\r\n }\r\n\r\n get quantity() {\r\n if (!this.item?.system) return null;\r\n const showQuantityItemTypes = [\"consumable\"];\r\n const consumeType = this.item.system.consume?.type;\r\n if (consumeType === \"ammo\") {\r\n const ammoItem = this.actor.items.get(this.item.system.consume.target);\r\n if (!ammoItem) return null;\r\n return Math.floor((ammoItem.system.quantity ?? 0) / this.item.system.consume.amount);\r\n } else if (consumeType === \"attribute\") {\r\n return Math.floor(getProperty(this.actor.system, this.item.system.consume.target) / this.item.system.consume.amount);\r\n } else if (consumeType === \"charges\") {\r\n const chargesItem = this.actor.items.get(this.item.system.consume.target);\r\n if (!chargesItem) return null;\r\n return Math.floor((chargesItem.system.uses?.value ?? 0) / this.item.system.consume.amount);\r\n } else if (showQuantityItemTypes.includes(this.item.type)) {\r\n return this.item.system.uses?.value ?? this.item.system.quantity;\r\n } else if (this.item.system.uses.value !== null && this.item.system.uses.per !== null) {\r\n return this.item.system.uses.value;\r\n }\r\n return null;\r\n }\r\n }\r\n\r\n class DND5eButtonPanelButton extends ARGON.MAIN.BUTTONS.ButtonPanelButton {\r\n constructor({ type, items, color }) {\r\n super();\r\n this.type = type;\r\n this.items = items;\r\n this.color = color;\r\n this.itemsWithSpells = [];\r\n this._spells = this.prePrepareSpells();\r\n }\r\n\r\n get hasContents() {\r\n return this._spells ? !!this._spells.length || !!this.itemsWithSpells.length : !!this.items.length;\r\n }\r\n\r\n get colorScheme() {\r\n return this.color;\r\n }\r\n\r\n get id() {\r\n return `${this.type}-${this.color}`\r\n }\r\n\r\n get label() {\r\n switch (this.type) {\r\n case \"spell\":\r\n return \"enhancedcombathud-dnd5e.hud.castspell.name\";\r\n case \"feat\":\r\n return \"enhancedcombathud-dnd5e.hud.usepower.name\";\r\n case \"consumable\":\r\n return \"enhancedcombathud-dnd5e.hud.useitem.name\";\r\n }\r\n }\r\n\r\n get icon() {\r\n switch (this.type) {\r\n case \"spell\":\r\n return \"modules/enhancedcombathud/icons/spell-book.webp\";\r\n case \"feat\":\r\n return \"modules/enhancedcombathud/icons/mighty-force.webp\";\r\n case \"consumable\":\r\n return \"modules/enhancedcombathud/icons/drink-me.webp\";\r\n }\r\n }\r\n\r\n get showPreparedOnly() {\r\n if (this.actor.type !== \"character\") return false;\r\n const preparedFlag = this.actor.getFlag(MODULE_ID, \"showPrepared\");\r\n if (preparedFlag === \"all\") return false;\r\n if (preparedFlag === \"preparedOnly\") return true;\r\n const classes = Object.keys(this.actor.classes);\r\n const requiresPreparation = [\"cleric\", \"druid\", \"paladin\", \"wizard\", \"artificer\", \"ranger\"].some((className) => classes.includes(className));\r\n return requiresPreparation;\r\n }\r\n\r\n prePrepareSpells() {\r\n if (this.type !== \"spell\") return;\r\n \r\n const spellLevels = CONFIG.DND5E.spellLevels;\r\n const itemsToIgnore = [];\r\n if (game.modules.get(\"items-with-spells-5e\")?.active) {\r\n const actionType = this.items[0].system.activation?.type;\r\n const spellItems = this.actor.items.filter((item) => item.flags[\"items-with-spells-5e\"]?.[\"item-spells\"]?.length);\r\n for (const item of spellItems) {\r\n const spellData = item.flags[\"items-with-spells-5e\"][\"item-spells\"];\r\n const itemsInSpell = spellData.map((spell) => this.actor.items.get(spell.id)).filter((item) => item && item.system.activation?.type === actionType);\r\n if(!itemsInSpell.length) continue;\r\n itemsToIgnore.push(...itemsInSpell);\r\n if(item.system.attunement === 1) continue;\r\n this.itemsWithSpells.push({\r\n label: item.name,\r\n buttons: itemsInSpell.map((item) => new DND5eItemButton({ item })),\r\n uses: () => {return { max: item.system.uses?.max, value: item.system.uses?.value }},\r\n });\r\n }\r\n this.items = this.items.filter((item) => !itemsToIgnore.includes(item));\r\n }\r\n if (this.showPreparedOnly) {\r\n const allowIfNotPrepared = [\"atwill\", \"innate\", \"pact\", \"always\"];\r\n this.items = this.items.filter((item) => {\r\n if (allowIfNotPrepared.includes(item.system.preparation.mode)) return true;\r\n if (item.system.level == 0) return true;\r\n return item.system.preparation.prepared;\r\n });\r\n }\r\n\r\n const spells = [\r\n ...this.itemsWithSpells,\r\n {\r\n label: \"DND5E.SpellPrepAtWill\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"atwill\").map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: \"DND5E.SpellPrepInnate\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"innate\").map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: Object.values(spellLevels)[0],\r\n buttons: this.items.filter((item) => item.system.level == 0).map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: \"DND5E.PactMagic\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"pact\").map((item) => new DND5eItemButton({ item })),\r\n uses: () => { return this.actor.system.spells.pact }\r\n },\r\n ];\r\n for (const [level, label] of Object.entries(spellLevels)) {\r\n const levelSpells = this.items.filter((item) => item.system.level == level && (item.system.preparation.mode === \"prepared\" || item.system.preparation.mode === \"always\"));\r\n if (!levelSpells.length || level == 0) continue;\r\n spells.push({\r\n label,\r\n buttons: levelSpells.map((item) => new DND5eItemButton({ item })),\r\n uses: () => { return this.actor.system.spells[`spell${level}`] },\r\n });\r\n }\r\n return spells.filter((spell) => spell.buttons.length);\r\n }\r\n\r\n async _getPanel() {\r\n if (this.type === \"spell\") {\r\n return new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanel({ id: this.id, accordionPanelCategories: this._spells.map(({ label, buttons, uses }) => new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanelCategory({ label, buttons, uses })) });\r\n } else {\r\n return new ARGON.MAIN.BUTTON_PANELS.ButtonPanel({ id: this.id, buttons: this.items.map((item) => new DND5eItemButton({ item })) });\r\n }\r\n }\r\n }\r\n\r\n class DND5eSpecialActionButton extends ARGON.MAIN.BUTTONS.ActionButton {\r\n constructor(specialItem) {\r\n super();\r\n const actorItem = this.actor.items.getName(specialItem.name);\r\n this.item =\r\n actorItem ??\r\n new CONFIG.Item.documentClass(specialItem, {\r\n parent: this.actor,\r\n });\r\n }\r\n\r\n get label() {\r\n return this.item.name;\r\n }\r\n\r\n get icon() {\r\n return this.item.img;\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item);\r\n tooltipData.propertiesLabel = \"enhancedcombathud-dnd5e.tooltip.properties.name\";\r\n return tooltipData;\r\n }\r\n\r\n async _onLeftClick(event) {\r\n const useCE = game.modules.get(\"dfreds-convenient-effects\")?.active && game.dfreds.effectInterface.findEffectByName(this.label);\r\n let success = false;\r\n if (useCE) {\r\n success = true;\r\n await game.dfreds.effectInterface.toggleEffect(this.label, { overlay: false, uuids: [this.actor.uuid] });\r\n } else {\r\n success = await this.item.use({ event }, { event });\r\n }\r\n if (success) {\r\n DND5eItemButton.consumeActionEconomy(this.item);\r\n }\r\n }\r\n }\r\n\r\n class DND5eMovementHud extends ARGON.MovementHud {\r\n\r\n constructor (...args) {\r\n super(...args);\r\n this.getMovementMode = game.modules.get('elevation-drag-ruler')?.api?.getMovementMode;\r\n }\r\n\r\n get visible() {\r\n return game.combat?.started;\r\n }\r\n\r\n get movementMode() {\r\n return this.getMovementMode ? this.getMovementMode(this.token) : 'walk';\r\n }\r\n\r\n get movementMax() {\r\n return this.actor.system.attributes.movement[this.movementMode] / canvas.scene.dimensions.distance;\r\n }\r\n }\r\n\r\n class DND5eButtonHud extends ARGON.ButtonHud {\r\n\r\n constructor (...args) {\r\n super(...args);\r\n }\r\n\r\n get visible() {\r\n return !game.combat?.started;\r\n }\r\n\r\n async _getButtons() {\r\n return [\r\n {\r\n label: \"DND5E.LongRest\",\r\n onClick: (event) => this.actor.longRest(),\r\n icon: \"fas fa-bed\",\r\n },\r\n {\r\n label: \"DND5E.ShortRest\",\r\n onClick: (event) => this.actor.shortRest(),\r\n icon: \"fas fa-coffee\",\r\n }\r\n ]\r\n }\r\n }\r\n\r\n class DND5eWeaponSets extends ARGON.WeaponSets {\r\n async getDefaultSets() {\r\n const sets = await super.getDefaultSets();\r\n const isTransformed = this.actor.flags?.dnd5e?.isPolymorphed;\r\n if (this.actor.type !== \"npc\" && !isTransformed) return sets;\r\n const actions = this.actor.items.filter((item) => item.type === \"weapon\" && item.system.activation?.type === \"action\");\r\n const bonus = this.actor.items.filter((item) => item.type === \"weapon\" && item.system.activation?.type === \"bonus\");\r\n return {\r\n 1: {\r\n primary: actions[0]?.uuid ?? null,\r\n secondary: bonus[0]?.uuid ?? null,\r\n },\r\n 2: {\r\n primary: actions[1]?.uuid ?? null,\r\n secondary: bonus[1]?.uuid ?? null,\r\n },\r\n 3: {\r\n primary: actions[2]?.uuid ?? null,\r\n secondary: bonus[2]?.uuid ?? null,\r\n },\r\n };\r\n }\r\n\r\n async _getSets() {\r\n const isTransformed = this.actor.flags?.dnd5e?.isPolymorphed;\r\n\r\n const sets = isTransformed ? await this.getDefaultSets() : mergeObject(await this.getDefaultSets(), deepClone(this.actor.getFlag(\"enhancedcombathud\", \"weaponSets\") || {}));\r\n \r\n for (const [set, slots] of Object.entries(sets)) {\r\n slots.primary = slots.primary ? await fromUuid(slots.primary) : null;\r\n slots.secondary = slots.secondary ? await fromUuid(slots.secondary) : null;\r\n }\r\n return sets;\r\n }\r\n\r\n async _onSetChange({ sets, active }) {\r\n const switchEquip = game.settings.get(\"enhancedcombathud-dnd5e\", \"switchEquip\");\r\n if (!switchEquip) return;\r\n const updates = [];\r\n const activeSet = sets[active];\r\n const activeItems = Object.values(activeSet).filter((item) => item);\r\n const inactiveSets = Object.values(sets).filter((set) => set !== activeSet);\r\n const inactiveItems = inactiveSets.flatMap((set) => Object.values(set)).filter((item) => item).filter((item) => !activeItems.includes(item));\r\n activeItems.forEach((item) => {\r\n if (!item.system?.equipped) updates.push({ _id: item.id, \"system.equipped\": true });\r\n });\r\n inactiveItems.forEach((item) => {\r\n if (item.system?.equipped) updates.push({ _id: item.id, \"system.equipped\": false });\r\n });\r\n return await this.actor.updateEmbeddedDocuments(\"Item\", updates);\r\n }\r\n }\r\n\r\n CoreHUD.definePortraitPanel(DND5ePortraitPanel);\r\n CoreHUD.defineDrawerPanel(DND5eDrawerPanel);\r\n CoreHUD.defineMainPanels([DND5eActionActionPanel, DND5eBonusActionPanel, DND5eReactionActionPanel, DND5eFreeActionPanel, DND5eLegActionPanel, DND5eLairActionPanel, ARGON.PREFAB.PassTurnPanel]);\r\n CoreHUD.defineMovementHud(DND5eMovementHud);\r\n CoreHUD.defineButtonHud(DND5eButtonHud);\r\n CoreHUD.defineWeaponSets(DND5eWeaponSets);\r\n CoreHUD.defineSupportedActorTypes([\"character\", \"npc\"]);\r\n });\r\n}\r\n\r\nfunction registerItems() {\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/journey.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: 1,\r\n units: \"turn\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n },\r\n effects: [\r\n {\r\n _id: \"8FtZnIC1vbyKZ6xF\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/journey.webp\",\r\n label: \"Disengage\",\r\n origin: \"Item.wyQkeuZkttllAFB1\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n core: {\r\n sourceId: \"Item.wyQkeuZkttllAFB1\",\r\n },\r\n\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/armor-upgrade.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: 1,\r\n units: \"round\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"2xH2YQ6pm430O0Aq\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n rounds: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/armor-upgrade.webp\",\r\n label: \"Dodge\",\r\n origin: \"Item.pakEYcgLYxtKGv7J\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/clockwork.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"BevDb0J80M9BdoEl\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/clockwork.webp\",\r\n label: \"Ready\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/cloak-dagger.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n recharge: {\r\n value: null,\r\n charged: false,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"SZkbtgGCICrpH0GJ\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 10,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/cloak-dagger.webp\",\r\n label: \"Hide\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/walking-boot.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"PPMPZY1t3AUB7UGA\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n rounds: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/walking-boot.webp\",\r\n label: \"Dash\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/shield-bash.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: 1,\r\n width: null,\r\n units: \"\",\r\n type: \"creature\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"touch\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n\r\n if (game.settings.get(\"enhancedcombathud-dnd5e\", \"noAA\")) {\r\n for (let key of Object.keys(ECHItems)) {\r\n delete ECHItems[key].effects;\r\n }\r\n }\r\n}","import { MODULE_ID } from \"./main.js\";\r\n\r\nexport function registerSettings() {\r\n const settings = {\r\n showWeaponsItems: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showWeaponsItems.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showWeaponsItems.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (sett) => {\r\n ui.ARGON.constructor.DND5E.itemTypes.consumable = ui.ARGON.constructor.DND5E.itemTypes.consumable.filter(i => i !== \"weapon\");\r\n if(sett) ui.ARGON.constructor.DND5E.itemTypes.consumable.push(\"weapon\");\r\n ui.ARGON.refresh()\r\n },\r\n },\r\n showClassActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showClassActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showClassActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: (sett) => {\r\n ui.ARGON.constructor.DND5E.mainBarFeatures = ui.ARGON.constructor.DND5E.mainBarFeatures.filter(i => i !== \"class\");\r\n if(sett) ui.ARGON.constructor.DND5E.mainBarFeatures.push(\"class\");\r\n ui.ARGON.refresh()\r\n },\r\n },\r\n condenseClassActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.condenseClassActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.condenseClassActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n switchEquip: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.switchEquip.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.switchEquip.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n showSpecialActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showSpecialActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showSpecialActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n noAA: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.noAA.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.noAA.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n };\r\n\r\n registerSettingsArray(settings);\r\n}\r\n\r\nexport function getSetting(key) {\r\n return game.settings.get(MODULE_ID, key);\r\n}\r\n\r\nexport async function setSetting(key, value) {\r\n return await game.settings.set(MODULE_ID, key, value);\r\n}\r\n\r\nfunction registerSettingsArray(settings) {\r\n for(const [key, value] of Object.entries(settings)) {\r\n game.settings.register(MODULE_ID, key, value);\r\n }\r\n}","import {initConfig} from \"./config.js\";\r\nimport { registerSettings } from \"./settings.js\";\r\n\r\nexport const MODULE_ID = \"enhancedcombathud-dnd5e\";\r\n\r\nHooks.on(\"setup\", () => {\r\n registerSettings();\r\n initConfig();\r\n});"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","_regeneratorRuntime","Op","hasOwn","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","_typeof","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","input","hint","prim","toPrimitive","res","String","_toPrimitive","_createClass","protoProps","staticProps","_inherits","subClass","superClass","_setPrototypeOf","p","bind","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_isNativeReflectConstruct","Super","_getPrototypeOf","NewTarget","arguments","apply","ReferenceError","_assertThisInitialized","_possibleConstructorReturn","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","ECHItems","_arrayLikeToArray","arr","len","arr2","Array","MODULE_ID","Hooks","on","settings","_i","_Object$entries","entries","_Object$entries$_i","isArray","_arrayWithHoles","_s","_e","_x","_r","_arr","_n","_d","_iterableToArrayLimit","minLen","n","toString","from","test","_unsupportedIterableToArray","_nonIterableRest","game","register","registerSettingsArray","showWeaponsItems","i18n","localize","scope","config","default","onChange","sett","ui","ARGON","DND5E","itemTypes","consumable","filter","refresh","showClassActions","mainBarFeatures","condenseClassActions","switchEquip","showSpecialActions","noAA","CoreHUD","_game$modules$get","system","id","img","description","chat","unidentified","source","quantity","weight","price","attuned","attunement","equipped","rarity","identified","activation","cost","condition","duration","units","width","range","long","consume","amount","ability","actionType","attackBonus","chatFlavor","critical","damage","parts","versatile","formula","save","dc","scaling","effects","_id","changes","disabled","startTime","turns","icon","label","origin","transfer","flags","dae","stackable","macroRepeat","specialDuration","tint","sort","core","sourceId","onUseMacroName","consumableType","rounds","recharge","charged","_i8","_Object$keys","registerItems","isMIDI","modules","active","getMidiFlag","_ui$ARGON$_actor$getF","_flag$actionType","_actor","getFlag","actionTypes","action","bonus","reaction","free","spell","feat","callAll","DND5ePortraitPanel","_ARGON$PORTRAIT$Portr","_getStatBlocks","_onDeathSave2","_super","_len","_key","concat","_this$actor","this","actor","isPC","_CONFIG$DND5E$creatur","creatureType","CONFIG","creatureTypes","details","custom","cr","classes","map","c","join","level","race","isDying","attributes","hp","_this$actor$system$at","_this$actor$system$at2","death","success","_this$actor$system$at3","_this$actor$system$at4","failure","_callee","event","_context","rollDeathSave","_x3","_callee2","_this$actor$system$at5","_this$actor$system$at6","HPText","ACText","SpellDC","hpColor","tempMax","hpMaxColor","_context2","split","word","toUpperCase","replace","trim","temp","tempmax","text","color","max","ac","spelldc","PORTRAIT","PortraitPanel","DND5eDrawerButton","_ARGON$DRAWER$DrawerB","_getTooltipData","_super2","buttons","item","_this","TooltipManager","TOOLTIP_DIRECTIONS","RIGHT","_callee3","tooltipData","_context3","getTooltipDetails","DRAWER","DrawerButton","DND5eDrawerPanel","_ARGON$DRAWER$DrawerP","_super3","_len2","_key2","_this2","abilities","skills","tools","tool","addSign","gridCols","captions","align","abilityData","onClick","rollAbility","mod","rollAbilityTest","rollAbilitySave","skill","skillData","getProficiencyIcon","proficient","rollSkill","passive","style","rollToolCheck","abilityMod","proficiencyMultiplier","prof","DrawerPanel","DND5eActionActionPanel","_ARGON$MAIN$ActionPan","_getButtons2","_super4","_len3","_key3","inCombat","_getMidiFlag","isActionUsed","combat","updateActionUse","_callee4","spellItems","featItems","consumableItems","spellButton","specialActions","barItems","_context4","items","_item$system$activati","_item$system$type","includes","_item$system$activati2","_item$system$type2","_item$system$activati3","_item$system$type3","DND5eButtonPanelButton","button","hasContents","DND5eItemButton","isWeaponSet","isPrimary","MAIN","BUTTONS","SplitButton","DND5eSpecialActionButton","_toConsumableArray","_item$system$type4","_item$system$activati4","condenseItemButtons","ActionPanel","DND5eBonusActionPanel","_ARGON$MAIN$ActionPan2","_getButtons3","_super5","_len4","_key4","_getMidiFlag2","_callee5","_loop","_this3","_context6","types","_context5","_slicedToArray","_item$system$activati5","_item$system$type5","t0","_item$system$type6","_item$system$activati6","DND5eReactionActionPanel","_ARGON$MAIN$ActionPan3","_getButtons4","_super6","_len5","_key5","_getMidiFlag3","_callee6","_loop2","_i2","_Object$entries2","_this4","_context8","_Object$entries2$_i","_context7","_item$system$activati7","_item$system$type7","_item$system$type8","_item$system$activati8","DND5eFreeActionPanel","_ARGON$MAIN$ActionPan4","_getButtons5","_super7","_len6","_key6","_callee7","_loop3","_i3","_Object$entries3","_this5","_context10","_Object$entries3$_i","_context9","_item$system$activati9","_item$system$type9","_item$system$type10","_item$system$activati10","DND5eLegActionPanel","_ARGON$MAIN$ActionPan5","_getButtons6","_super8","_len7","_key7","_this$actor$system$re","_this$actor$system$re2","resources","legact","_this$actor$system$re3","_this$actor$system$re4","_callee8","_context11","_item$system$activati11","inActionPanel","DND5eLairActionPanel","_ARGON$MAIN$ActionPan6","_getButtons7","_super9","_len8","_key8","_this$actor$system$re5","lair","_callee9","_context12","_item$system$activati12","_ARGON$MAIN$BUTTONS$I","_render","_onRightClick2","_onLeftClick2","_getTooltipData2","_super10","_len9","_key9","_canvas","_item$system$range$va","_item$system","_item$system$range$lo","_item$system2","touchRange","canvas","scene","grid","distance","normal","_item$system$target","_item$system$target2","_item$system$target3","targetType","_this$item","_isWeaponSet","_isPrimary","_get","armor","_callee10","_context13","propertiesLabel","_callee11","_context14","interceptNextDialog","currentTarget","use","consumeActionEconomy","_x4","_callee12","_this$item2","_context15","sheet","render","_x5","_callee13","_get2","_len10","_key10","weapons","_this6","_args16","_context16","_item$system$consume","updateItemButtons","_this$item3","_this$item$system$con","_this$item$system$use","_this$item$system$use2","consumeType","_ammoItem$system$quan","ammoItem","Math","floor","getProperty","_chargesItem$system$u","_chargesItem$system$u2","chargesItem","uses","per","_item$system$activati13","_game$combat","activationType","_i4","_Object$entries4","_Object$entries4$_i","combatant","parent","components","main","ItemButton","_ARGON$MAIN$BUTTONS$B","_getPanel2","_super11","_ref","_this7","itemsWithSpells","_spells","prePrepareSpells","preparedFlag","some","className","_game$modules$get2","_this8","spellLevels","itemsToIgnore","_this$items$0$system$","_step","_iterator","_createForOfIteratorHelper","_item$flags$itemsWit","_loop4","itemsInSpell","_item$system$activati14","_item$system$uses","_item$system$uses2","s","f","showPreparedOnly","allowIfNotPrepared","preparation","mode","prepared","spells","Infinity","pact","_loop5","_Object$entries5$_i","_Object$entries5","_i5","levelSpells","_callee14","_context17","BUTTON_PANELS","ACCORDION","AccordionPanel","accordionPanelCategories","_ref2","AccordionPanelCategory","ButtonPanel","ButtonPanelButton","_ARGON$MAIN$BUTTONS$A","_onLeftClick3","_getTooltipData3","_super12","specialItem","_this9","actorItem","getName","Item","documentClass","_callee15","_context18","_callee16","_game$modules$get3","useCE","_context19","dfreds","effectInterface","findEffectByName","toggleEffect","overlay","uuids","uuid","_x6","ActionButton","DND5eMovementHud","_ARGON$MovementHud","_super13","_game$modules$get4","_this10","_len11","_key11","getMovementMode","api","_game$combat2","started","token","movement","movementMode","dimensions","MovementHud","DND5eButtonHud","_ARGON$ButtonHud","_getButtons8","_super14","_len12","_key12","_game$combat3","_callee17","_this11","_context20","longRest","shortRest","ButtonHud","DND5eWeaponSets","_ARGON$WeaponSets","_onSetChange2","_getSets2","_getDefaultSets","_super15","_callee18","_this$actor$flags","_actions$0$uuid","_actions$","_bonus$0$uuid","_bonus$","_actions$1$uuid","_actions$2","_bonus$1$uuid","_bonus$2","_actions$2$uuid","_actions$3","_bonus$2$uuid","_bonus$3","sets","isTransformed","actions","_context21","dnd5e","isPolymorphed","_item$system$activati15","_item$system$activati16","primary","secondary","_callee19","_this$actor$flags2","_i6","_Object$entries6","_Object$entries6$_i","slots","_context22","getDefaultSets","t1","mergeObject","t2","t3","deepClone","fromUuid","t4","t5","_callee20","_ref3","updates","activeSet","activeItems","inactiveSets","inactiveItems","_context23","set","flatMap","_item$system3","_item$system4","updateEmbeddedDocuments","_x7","WeaponSets","definePortraitPanel","defineDrawerPanel","defineMainPanels","PREFAB","PassTurnPanel","defineMovementHud","defineButtonHud","defineWeaponSets","defineSupportedActorTypes","_x2","_getTooltipDetails","_callee21","_item$labels4","_item$labels5","_damageTypes","_properties","title","itemType","subtitle","dt","damageTypes","properties","materialComponents","_item$labels","_item$labels2","_item$labels3","_i7","_Object$entries7","_Object$entries7$_i","_iterator2","_step2","comp","dmgString","tooltipProperties","_context24","labels","weaponTypes","weaponType","itemActionTypes","weaponProperties","school","spellSchools","all","abbr","materials","consumableTypes","requirements","TextEditor","enrichHTML","toHit","derivedDamage","dDmg","getDamageTypeIcon","damageType","d","footerText","toLowerCase","proficiency","condensedItems","barItemsLength","barItemsMultipleOfTwo","currentSplitButtonItemButton","isCondensedButton"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"./index.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,8+FCClFI,oBAAA,SAAAA,sBAAA,OAAAb,CAAA,MAAAA,EAAA,GAAAc,EAAAV,OAAAM,UAAAK,EAAAD,EAAAH,eAAAN,EAAAD,OAAAC,gBAAA,SAAAG,EAAAN,EAAAc,GAAAR,EAAAN,GAAAc,EAAAC,KAAA,EAAAC,EAAA,mBAAAC,OAAAA,OAAA,GAAAC,EAAAF,EAAAG,UAAA,aAAAC,EAAAJ,EAAAK,eAAA,kBAAAC,EAAAN,EAAAO,aAAA,yBAAAC,OAAAlB,EAAAN,EAAAe,GAAA,OAAAb,OAAAC,eAAAG,EAAAN,EAAA,CAAAe,MAAAA,EAAAX,YAAA,EAAAqB,cAAA,EAAAC,UAAA,IAAApB,EAAAN,EAAA,KAAAwB,OAAA,aAAAG,GAAAH,OAAA,SAAAA,OAAAlB,EAAAN,EAAAe,GAAA,OAAAT,EAAAN,GAAAe,CAAA,WAAAa,KAAAC,EAAAC,EAAAC,EAAAC,GAAA,IAAAC,EAAAH,GAAAA,EAAAtB,qBAAA0B,UAAAJ,EAAAI,UAAAC,EAAAjC,OAAAkC,OAAAH,EAAAzB,WAAA6B,EAAA,IAAA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AAU,UAANA,CAAa,IAC9GgyB,GAAMvnB,GAAGP,MAAM7J,YAAYkL,MAAMF,gBAAgB7L,KAAK,SACzDiL,GAAGP,MAAM+nB,SACb,GAEJE,qBAAsB,CAClB7xB,KAAMwF,KAAKI,KAAKC,SAAS,8DACzBpD,KAAM+C,KAAKI,KAAKC,SAAS,8DACzByrB,MAAO,QACPC,QAAQ,EACR31B,KAAMoI,QACNwtB,SAAS,EACTC,SAAU,SAAAA,WAAA,OAAMtnB,GAAGP,MAAM+nB,SAAS,GAEtCG,YAAa,CACT9xB,KAAMwF,KAAKI,KAAKC,SAAS,qDACzBpD,KAAM+C,KAAKI,KAAKC,SAAS,qDACzByrB,MAAO,QACPC,QAAQ,EACR31B,KAAMoI,QACNwtB,SAAS,EACTC,SAAU,SAAAA,WAAA,OAAMtnB,GAAGP,MAAM+nB,SAAS,GAEtC/d,mBAAoB,CAChB5T,KAAMwF,KAAKI,KAAKC,SAAS,4DACzBpD,KAAM+C,KAAKI,KAAKC,SAAS,4DACzByrB,MAAO,QACPC,QAAQ,EACR31B,KAAMoI,QACNwtB,SAAS,EACTC,SAAU,SAAAA,WAAA,OAAMtnB,GAAGP,MAAM+nB,SAAS,GAEtCI,KAAM,CACF/xB,KAAMwF,KAAKI,KAAKC,SAAS,8CACzBpD,KAAM+C,KAAKI,KAAKC,SAAS,8CACzByrB,MAAO,QACPC,QAAQ,EACR31B,KAAMoI,QACNwtB,SAAS,EACTC,SAAU,SAAAA,WAAA,OAAMtnB,GAAGP,MAAM+nB,SAAS,IAK9C,CClEO,IAAM3mB,EAAY,0BAEzB5F,MAAMC,GAAG,SAAS,WACd6rB,mBACA/rB,YACJ","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./scripts/config.js","webpack:///./scripts/settings.js","webpack:///./scripts/main.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import { MODULE_ID } from \"./main.js\";\r\n\r\nconst ECHItems = {};\r\n\r\nexport function initConfig() {\r\n\r\n Hooks.on(\"argonInit\", (CoreHUD) => {\r\n if (game.system.id !== \"dnd5e\") return;\r\n registerItems();\r\n const ARGON = CoreHUD.ARGON;\r\n\r\n const isMIDI = game.modules.get(\"midi-qol\")?.active;\r\n const getMidiFlag = (actionType) => {\r\n if (!isMIDI || !ui.ARGON._actor) return null;\r\n const flag = ui.ARGON._actor.getFlag(\"midi-qol\", \"actions\") ?? {};\r\n const value = flag[actionType] ?? false;\r\n const midiAction = value ? 0 : 1;\r\n return midiAction;\r\n };\r\n\r\n const actionTypes = {\r\n action: [\"action\"],\r\n bonus: [\"bonus\"],\r\n reaction: [\"reaction\", \"reactiondamage\", \"reactionmanual\"],\r\n free: [\"special\"],\r\n };\r\n\r\n const itemTypes = {\r\n spell: [\"spell\"],\r\n feat: [\"feat\"],\r\n consumable: [\"consumable\", \"equipment\", \"loot\"],\r\n };\r\n\r\n const mainBarFeatures = [];\r\n\r\n if (game.settings.get(MODULE_ID, \"showWeaponsItems\")) itemTypes.consumable.push(\"weapon\");\r\n if (game.settings.get(MODULE_ID, \"showClassActions\")) mainBarFeatures.push(\"class\");\r\n\r\n CoreHUD.DND5E = {\r\n actionTypes,\r\n itemTypes,\r\n mainBarFeatures,\r\n ECHItems,\r\n };\r\n\r\n Hooks.callAll(\"enhanced-combat-hud.dnd5e.initConfig\", { actionTypes, itemTypes, ECHItems });\r\n\r\n async function getTooltipDetails(item, type) {\r\n let title, description, itemType, subtitle, target, range, dt;\r\n let damageTypes = [];\r\n let properties = [];\r\n let materialComponents = \"\";\r\n\r\n if (type == \"skill\") {\r\n title = CONFIG.DND5E.skills[item].label;\r\n description = game.i18n.localize(`enhancedcombathud-dnd5e.skills.${item}.tooltip`);\r\n } else if (type == \"save\") {\r\n title = CONFIG.DND5E.abilities[item].label;\r\n description = game.i18n.localize(`enhancedcombathud-dnd5e.abilities.${item}.tooltip`);\r\n } else {\r\n if (!item || !item.system) return;\r\n\r\n title = item.name;\r\n description = item.system.description.value;\r\n itemType = item.type;\r\n target = item.labels?.target || \"-\";\r\n range = item.labels?.range || \"-\";\r\n properties = [];\r\n dt = item.labels?.damageTypes?.split(\", \");\r\n damageTypes = dt && dt.length ? dt : [];\r\n materialComponents = \"\";\r\n\r\n switch (itemType) {\r\n case \"weapon\":\r\n subtitle = CONFIG.DND5E.weaponTypes[item.system.weaponType];\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n for (let [key, value] of Object.entries(item.system.properties)) {\r\n let prop = value && CONFIG.DND5E.weaponProperties[key] ? CONFIG.DND5E.weaponProperties[key] : undefined;\r\n if (prop) properties.push(prop);\r\n }\r\n break;\r\n case \"spell\":\r\n subtitle = `${item.labels.level} ${item.labels.school}`;\r\n properties.push(CONFIG.DND5E.spellSchools[item.system.school]);\r\n properties.push(item.labels.duration);\r\n properties.push(item.labels.save);\r\n for (let comp of item.labels.components.all) {\r\n properties.push(comp.abbr);\r\n }\r\n if (item.labels.materials) materialComponents = item.labels.materials;\r\n break;\r\n case \"consumable\":\r\n subtitle = CONFIG.DND5E.consumableTypes[item.system.consumableType];\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n break;\r\n case \"feat\":\r\n subtitle = item.system.requirements;\r\n properties.push(CONFIG.DND5E.itemActionTypes[item.system.actionType]);\r\n break;\r\n }\r\n }\r\n\r\n if (description) description = await TextEditor.enrichHTML(description);\r\n let details = [];\r\n if (target || range) {\r\n details = [\r\n {\r\n label: \"enhancedcombathud-dnd5e.tooltip.target.name\",\r\n value: target,\r\n },\r\n {\r\n label: \"enhancedcombathud-dnd5e.tooltip.range.name\",\r\n value: range,\r\n },\r\n ];\r\n }\r\n if (item?.labels?.toHit) {\r\n details.push({\r\n label: \"enhancedcombathud-dnd5e.tooltip.toHit.name\",\r\n value: item.labels.toHit,\r\n });\r\n }\r\n if (item?.labels?.derivedDamage?.length) {\r\n let dmgString = \"\";\r\n item.labels.derivedDamage.forEach((dDmg) => {\r\n dmgString += dDmg.formula + \" \" + getDamageTypeIcon(dDmg.damageType) + \" \";\r\n });\r\n details.push({\r\n label: \"enhancedcombathud-dnd5e.tooltip.damage.name\",\r\n value: dmgString,\r\n });\r\n }\r\n\r\n const tooltipProperties = [];\r\n if (damageTypes?.length) damageTypes.forEach((d) => tooltipProperties.push({ label: d, primary: true }));\r\n if (properties?.length) properties.forEach((p) => tooltipProperties.push({ label: p, secondary: true }));\r\n\r\n return { title, description, subtitle, details, properties: tooltipProperties, footerText: materialComponents };\r\n }\r\n\r\n function getDamageTypeIcon(damageType) {\r\n switch (damageType.toLowerCase()) {\r\n case \"acid\":\r\n return '';\r\n case \"bludgeoning\":\r\n return '';\r\n case \"cold\":\r\n return '';\r\n case \"fire\":\r\n return '';\r\n case \"force\":\r\n return '';\r\n case \"lightning\":\r\n return '';\r\n case \"necrotic\":\r\n return '';\r\n case \"piercing\":\r\n return '';\r\n case \"poison\":\r\n return '';\r\n case \"psychic\":\r\n return '';\r\n case \"radiant\":\r\n return '';\r\n case \"slashing\":\r\n return '';\r\n case \"thunder\":\r\n return '';\r\n case \"healing\":\r\n return '';\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n function getProficiencyIcon(proficiency) {\r\n if (proficiency == 0) return ' ';\r\n else if (proficiency == 1) return ' ';\r\n else if (proficiency == 2) return ' ';\r\n else if (proficiency == 0.5) return ' ';\r\n else return ' ';\r\n }\r\n\r\n function condenseItemButtons(items) {\r\n const condenseClassActions = game.settings.get(MODULE_ID, \"condenseClassActions\");\r\n if (!condenseClassActions) return items.map((item) => new DND5eItemButton({item, inActionPanel: true}));\r\n const condensedItems = [];\r\n const barItemsLength = items.length;\r\n const barItemsMultipleOfTwo = barItemsLength - (barItemsLength % 2);\r\n let currentSplitButtonItemButton = null;\r\n for (let i = 0; i < barItemsLength; i++) {\r\n const isCondensedButton = i < barItemsMultipleOfTwo;\r\n const item = items[i];\r\n if (isCondensedButton) {\r\n if (currentSplitButtonItemButton) {\r\n const button = new DND5eItemButton({item, inActionPanel: false});\r\n condensedItems.push(new ARGON.MAIN.BUTTONS.SplitButton(currentSplitButtonItemButton, button));\r\n currentSplitButtonItemButton = null;\r\n } else {\r\n currentSplitButtonItemButton = new DND5eItemButton({item, inActionPanel: false});\r\n }\r\n } else {\r\n condensedItems.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n }\r\n }\r\n return condensedItems;\r\n }\r\n\r\n class DND5ePortraitPanel extends ARGON.PORTRAIT.PortraitPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get description() {\r\n const { type, system } = this.actor;\r\n const actor = this.actor;\r\n const isNPC = type === \"npc\";\r\n const isPC = type === \"character\";\r\n if (isNPC) {\r\n const creatureType = game.i18n.localize(CONFIG.DND5E.creatureTypes[actor.system.details.type.value] ?? actor.system.details.type.custom);\r\n const cr = system.details.cr >= 1 || system.details.cr <= 0 ? system.details.cr : `1/${1 / system.details.cr}`;\r\n return `CR ${cr} ${creatureType}`;\r\n } else if (isPC) {\r\n const classes = Object.values(actor.classes)\r\n .map((c) => c.name)\r\n .join(\" / \");\r\n return `Level ${system.details.level} ${classes} (${system.details.race})`;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n get isDead() {\r\n return this.isDying && this.actor.type !== \"character\";\r\n }\r\n\r\n get isDying() {\r\n return this.actor.system.attributes.hp.value <= 0;\r\n }\r\n\r\n get successes() {\r\n return this.actor.system.attributes?.death?.success ?? 0;\r\n }\r\n\r\n get failures() {\r\n return this.actor.system.attributes?.death?.failure ?? 0;\r\n }\r\n\r\n get configurationTemplate() {\r\n return \"modules/enhancedcombathud-dnd5e/templates/argon-actor-config.hbs\";\r\n }\r\n\r\n async _onDeathSave(event) {\r\n this.actor.rollDeathSave({});\r\n }\r\n\r\n async getStatBlocks() {\r\n const HPText = game.i18n\r\n .localize(\"DND5E.HitPoints\")\r\n .split(\" \")\r\n .map((word) => word.charAt(0).toUpperCase())\r\n .join(\"\");\r\n const ACText = game.i18n\r\n .localize(\"DND5E.ArmorClass\")\r\n .split(\" \")\r\n .map((word) => word.charAt(0).toUpperCase())\r\n .join(\"\");\r\n const SpellDC = game.i18n.localize(\"DND5E.SaveDC\").replace(\"{ability}\", \"\").replace(\"{dc}\", \"\").trim();\r\n\r\n const hpColor = this.actor.system.attributes.hp.temp ? \"#6698f3\" : \"rgb(0 255 170)\";\r\n const tempMax = this.actor.system.attributes.hp.tempmax;\r\n const hpMaxColor = tempMax ? (tempMax > 0 ? \"rgb(222 91 255)\" : \"#ffb000\") : \"rgb(255 255 255)\";\r\n\r\n return [\r\n [\r\n {\r\n text: `${this.actor.system.attributes.hp.value + (this.actor.system.attributes.hp.temp ?? 0)}`,\r\n color: hpColor,\r\n },\r\n {\r\n text: `/`,\r\n },\r\n {\r\n text: `${this.actor.system.attributes.hp.max + (this.actor.system.attributes.hp.tempmax ?? 0)}`,\r\n color: hpMaxColor,\r\n },\r\n {\r\n text: HPText,\r\n },\r\n ],\r\n [\r\n {\r\n text: ACText,\r\n },\r\n {\r\n text: this.actor.system.attributes.ac.value,\r\n color: \"var(--ech-movement-baseMovement-background)\",\r\n },\r\n ],\r\n [\r\n {\r\n text: SpellDC,\r\n },\r\n {\r\n text: this.actor.system.attributes.spelldc,\r\n color: \"var(--ech-movement-baseMovement-background)\",\r\n },\r\n ],\r\n ];\r\n }\r\n }\r\n\r\n class DND5eDrawerButton extends ARGON.DRAWER.DrawerButton {\r\n constructor(buttons, item, type) {\r\n super(buttons);\r\n this.item = item;\r\n this.type = type;\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n get tooltipOrientation() {\r\n return TooltipManager.TOOLTIP_DIRECTIONS.RIGHT;\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item, this.type);\r\n return tooltipData;\r\n }\r\n }\r\n\r\n class DND5eDrawerPanel extends ARGON.DRAWER.DrawerPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get categories() {\r\n const abilities = this.actor.system.abilities;\r\n const skills = this.actor.system.skills;\r\n const tools = this.actor.itemTypes.tool;\r\n\r\n const addSign = (value) => {\r\n if (value >= 0) return `+${value}`;\r\n return value;\r\n };\r\n\r\n const abilitiesButtons = Object.keys(abilities).map((ability) => {\r\n const abilityData = abilities[ability];\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: CONFIG.DND5E.abilities[ability].label,\r\n onClick: (event) => this.actor.rollAbility(ability, { event }),\r\n },\r\n {\r\n label: addSign(abilityData.mod),\r\n onClick: (event) => this.actor.rollAbilityTest(ability, { event }),\r\n },\r\n {\r\n label: addSign(abilityData.save),\r\n onClick: (event) => this.actor.rollAbilitySave(ability, { event }),\r\n },\r\n ],\r\n ability,\r\n \"save\",\r\n );\r\n });\r\n\r\n const skillsButtons = Object.keys(skills).map((skill) => {\r\n const skillData = skills[skill];\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: getProficiencyIcon(skillData.proficient) + CONFIG.DND5E.skills[skill].label,\r\n onClick: (event) => this.actor.rollSkill(skill, { event }),\r\n },\r\n {\r\n label: `${addSign(skillData.mod)}(${skillData.passive})`,\r\n style: \"display: flex; justify-content: flex-end;\",\r\n },\r\n ],\r\n skill,\r\n \"skill\",\r\n );\r\n });\r\n\r\n const toolButtons = tools.map((tool) => {\r\n return new DND5eDrawerButton(\r\n [\r\n {\r\n label: getProficiencyIcon(tool.system.proficient) + tool.name,\r\n onClick: (event) => tool.rollToolCheck({ event }),\r\n },\r\n {\r\n label: addSign(abilities[tool.abilityMod].mod + tool.system.proficiencyMultiplier * this.actor.system.attributes.prof),\r\n },\r\n ],\r\n tool,\r\n );\r\n });\r\n\r\n return [\r\n {\r\n gridCols: \"5fr 2fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Abilities\",\r\n align: \"left\",\r\n },\r\n {\r\n label: \"Check\",\r\n align: \"center\",\r\n },\r\n {\r\n label: \"Save\",\r\n align: \"center\",\r\n },\r\n ],\r\n align: [\"left\", \"center\", \"center\"],\r\n buttons: abilitiesButtons,\r\n },\r\n {\r\n gridCols: \"7fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Skills\",\r\n },\r\n {\r\n label: \"\",\r\n },\r\n ],\r\n buttons: skillsButtons,\r\n },\r\n {\r\n gridCols: \"7fr 2fr\",\r\n captions: [\r\n {\r\n label: \"Tools\",\r\n },\r\n {\r\n label: \"\",\r\n },\r\n ],\r\n buttons: toolButtons,\r\n },\r\n ];\r\n }\r\n\r\n get title() {\r\n return `${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.saves.name\")} / ${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.skills.name\")} / ${game.i18n.localize(\"enhancedcombathud-dnd5e.hud.tools.name\")}`;\r\n }\r\n }\r\n\r\n class DND5eActionActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Action\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"action\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const spellItems = this.actor.items.filter((item) => itemTypes.spell.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n const featItems = this.actor.items.filter((item) => itemTypes.feat.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n const consumableItems = this.actor.items.filter((item) => itemTypes.consumable.includes(item.type) && actionTypes.action.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n\r\n const spellButton = !spellItems.length ? [] : [new DND5eButtonPanelButton({ type: \"spell\", items: spellItems, color: 0 })].filter((button) => button.hasContents);\r\n\r\n const specialActions = Object.values(ECHItems);\r\n\r\n const showSpecialActions = game.settings.get(MODULE_ID, \"showSpecialActions\");\r\n const buttons = [];\r\n if (showSpecialActions) {\r\n buttons.push(...[new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true }), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[0]), new DND5eSpecialActionButton(specialActions[1])), ...spellButton, new DND5eButtonPanelButton({ type: \"feat\", items: featItems, color: 0 }), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[2]), new DND5eSpecialActionButton(specialActions[3])), new ARGON.MAIN.BUTTONS.SplitButton(new DND5eSpecialActionButton(specialActions[4]), new DND5eSpecialActionButton(specialActions[5])), new DND5eButtonPanelButton({ type: \"consumable\", items: consumableItems, color: 0 })]);\r\n } else {\r\n buttons.push(...[new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true }), ...spellButton, new DND5eButtonPanelButton({ type: \"feat\", items: featItems, color: 0 }), new DND5eButtonPanelButton({ type: \"consumable\", items: consumableItems, color: 0 })]); \r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.action.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n \r\n return buttons.filter((button) => button.hasContents || button.items == undefined || button.items.length);\r\n }\r\n }\r\n\r\n class DND5eBonusActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.BonusAction\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"bonus\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: false })];\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.bonus.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 1 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.bonus.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eReactionActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Reaction\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return getMidiFlag(\"reaction\") ?? (this.isActionUsed ? 0 : 1);\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [new DND5eItemButton({ item: null, isWeaponSet: true, isPrimary: true })];\r\n //buttons.push(new DND5eEquipmentButton({slot: 1}));\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.reaction.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 3 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.reaction.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eFreeActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.Special\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.isActionUsed ? 0 : 1;\r\n }\r\n\r\n _onNewRound(combat) {\r\n this.isActionUsed = false;\r\n this.updateActionUse();\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n\r\n for (const [type, types] of Object.entries(itemTypes)) {\r\n const items = this.actor.items.filter((item) => types.includes(item.type) && actionTypes.free.includes(item.system.activation?.type) && !CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value));\r\n if (!items.length) continue;\r\n const button = new DND5eButtonPanelButton({ type, items, color: 2 })\r\n if(button.hasContents) buttons.push(button);\r\n }\r\n\r\n const barItems = this.actor.items.filter((item) => CoreHUD.DND5E.mainBarFeatures.includes(item.system.type?.value) && actionTypes.free.includes(item.system.activation?.type));\r\n buttons.push(...condenseItemButtons(barItems));\r\n\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eLegActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.LegendaryActionLabel\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? this.actor.system.resources?.legact?.max ?? null : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.actor.system.resources?.legact?.value ?? null;\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n const legendary = this.actor.items.filter((item) => item.system.activation?.type === \"legendary\");\r\n legendary.forEach((item) => {\r\n buttons.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n });\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eLairActionPanel extends ARGON.MAIN.ActionPanel {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get label() {\r\n return \"DND5E.LairActionLabel\";\r\n }\r\n\r\n get maxActions() {\r\n return this.actor.inCombat ? 1 : null;\r\n }\r\n\r\n get currentActions() {\r\n return this.actor.system.resources.lair?.value * 1;\r\n }\r\n\r\n async _getButtons() {\r\n const buttons = [];\r\n const lair = this.actor.items.filter((item) => item.system.activation?.type === \"lair\");\r\n lair.forEach((item) => {\r\n buttons.push(new DND5eItemButton({ item, inActionPanel: true }));\r\n });\r\n return buttons;\r\n }\r\n }\r\n\r\n class DND5eItemButton extends ARGON.MAIN.BUTTONS.ItemButton {\r\n constructor(...args) {\r\n super(...args);\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n get ranges() {\r\n const item = this.item;\r\n const touchRange = item.system.range.units == \"touch\" ? canvas?.scene?.grid?.distance : null;\r\n return {\r\n normal: item.system?.range?.value ?? touchRange,\r\n long: item.system?.range?.long ?? null,\r\n };\r\n }\r\n\r\n get targets() {\r\n const item = this.item;\r\n const validTargets = [\"creature\", \"ally\", \"enemy\"];\r\n const actionType = item.system.actionType;\r\n const targetType = item.system.target?.type;\r\n if (!item.system.target?.units && validTargets.includes(targetType)) {\r\n return item.system.target?.value;\r\n } else if (actionType === \"mwak\" || actionType === \"rwak\"){\r\n return 1;\r\n }\r\n return null;\r\n }\r\n\r\n get visible() {\r\n if(!this._isWeaponSet || this._isPrimary) return super.visible;\r\n return super.visible && this.item?.system?.armor?.type !== \"shield\";\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item);\r\n tooltipData.propertiesLabel = \"enhancedcombathud-dnd5e.tooltip.properties.name\";\r\n return tooltipData;\r\n }\r\n\r\n async _onLeftClick(event) {\r\n ui.ARGON.interceptNextDialog(event.currentTarget);\r\n const used = await this.item.use({ event }, { event });\r\n if (used) {\r\n DND5eItemButton.consumeActionEconomy(this.item);\r\n }\r\n }\r\n\r\n async _onRightClick(event) {\r\n this.item?.sheet?.render(true);\r\n }\r\n\r\n static consumeActionEconomy(item) {\r\n const activationType = item.system.activation?.type;\r\n let actionType = null;\r\n for (const [type, types] of Object.entries(actionTypes)) {\r\n if (types.includes(activationType)) actionType = type;\r\n }\r\n if (!actionType) return;\r\n if (game.combat?.combatant?.actor !== item.parent) actionType = \"reaction\";\r\n if (actionType === \"action\") {\r\n ui.ARGON.components.main[0].isActionUsed = true;\r\n ui.ARGON.components.main[0].updateActionUse();\r\n } else if (actionType === \"bonus\") {\r\n ui.ARGON.components.main[1].isActionUsed = true;\r\n ui.ARGON.components.main[1].updateActionUse();\r\n } else if (actionType === \"reaction\") {\r\n ui.ARGON.components.main[2].isActionUsed = true;\r\n ui.ARGON.components.main[2].updateActionUse();\r\n } else if (actionType === \"free\") {\r\n ui.ARGON.components.main[3].isActionUsed = true;\r\n ui.ARGON.components.main[3].updateActionUse();\r\n } else if (actionType === \"legendary\") {\r\n ui.ARGON.components.main[4].isActionUsed = true;\r\n }\r\n }\r\n\r\n async render(...args) {\r\n await super.render(...args);\r\n if (this.item) {\r\n const weapons = this.actor.items.filter((item) => item.system.consume?.target === this.item.id);\r\n ui.ARGON.updateItemButtons(weapons);\r\n }\r\n }\r\n\r\n get quantity() {\r\n if (!this.item?.system) return null;\r\n const showQuantityItemTypes = [\"consumable\"];\r\n const consumeType = this.item.system.consume?.type;\r\n if (consumeType === \"ammo\") {\r\n const ammoItem = this.actor.items.get(this.item.system.consume.target);\r\n if (!ammoItem) return null;\r\n return Math.floor((ammoItem.system.quantity ?? 0) / this.item.system.consume.amount);\r\n } else if (consumeType === \"attribute\") {\r\n return Math.floor(getProperty(this.actor.system, this.item.system.consume.target) / this.item.system.consume.amount);\r\n } else if (consumeType === \"charges\") {\r\n const chargesItem = this.actor.items.get(this.item.system.consume.target);\r\n if (!chargesItem) return null;\r\n return Math.floor((chargesItem.system.uses?.value ?? 0) / this.item.system.consume.amount);\r\n } else if (showQuantityItemTypes.includes(this.item.type)) {\r\n return this.item.system.uses?.value ?? this.item.system.quantity;\r\n } else if (this.item.system.uses.value !== null && this.item.system.uses.per !== null) {\r\n return this.item.system.uses.value;\r\n }\r\n return null;\r\n }\r\n }\r\n\r\n class DND5eButtonPanelButton extends ARGON.MAIN.BUTTONS.ButtonPanelButton {\r\n constructor({ type, items, color }) {\r\n super();\r\n this.type = type;\r\n this.items = items;\r\n this.color = color;\r\n this.itemsWithSpells = [];\r\n this._spells = this.prePrepareSpells();\r\n }\r\n\r\n get hasContents() {\r\n return this._spells ? !!this._spells.length || !!this.itemsWithSpells.length : !!this.items.length;\r\n }\r\n\r\n get colorScheme() {\r\n return this.color;\r\n }\r\n\r\n get id() {\r\n return `${this.type}-${this.color}`\r\n }\r\n\r\n get label() {\r\n switch (this.type) {\r\n case \"spell\":\r\n return \"enhancedcombathud-dnd5e.hud.castspell.name\";\r\n case \"feat\":\r\n return \"enhancedcombathud-dnd5e.hud.usepower.name\";\r\n case \"consumable\":\r\n return \"enhancedcombathud-dnd5e.hud.useitem.name\";\r\n }\r\n }\r\n\r\n get icon() {\r\n switch (this.type) {\r\n case \"spell\":\r\n return \"modules/enhancedcombathud/icons/spell-book.webp\";\r\n case \"feat\":\r\n return \"modules/enhancedcombathud/icons/mighty-force.webp\";\r\n case \"consumable\":\r\n return \"modules/enhancedcombathud/icons/drink-me.webp\";\r\n }\r\n }\r\n\r\n get showPreparedOnly() {\r\n if (this.actor.type !== \"character\") return false;\r\n const preparedFlag = this.actor.getFlag(MODULE_ID, \"showPrepared\");\r\n if (preparedFlag === \"all\") return false;\r\n if (preparedFlag === \"preparedOnly\") return true;\r\n const classes = Object.keys(this.actor.classes);\r\n const requiresPreparation = [\"cleric\", \"druid\", \"paladin\", \"wizard\", \"artificer\", \"ranger\"].some((className) => classes.includes(className));\r\n return requiresPreparation;\r\n }\r\n\r\n prePrepareSpells() {\r\n if (this.type !== \"spell\") return;\r\n \r\n const spellLevels = CONFIG.DND5E.spellLevels;\r\n const itemsToIgnore = [];\r\n if (game.modules.get(\"items-with-spells-5e\")?.active) {\r\n const actionType = this.items[0].system.activation?.type;\r\n const spellItems = this.actor.items.filter((item) => item.flags[\"items-with-spells-5e\"]?.[\"item-spells\"]?.length);\r\n for (const item of spellItems) {\r\n const spellData = item.flags[\"items-with-spells-5e\"][\"item-spells\"];\r\n const itemsInSpell = spellData.map((spell) => this.actor.items.get(spell.id)).filter((item) => item && item.system.activation?.type === actionType);\r\n if(!itemsInSpell.length) continue;\r\n itemsToIgnore.push(...itemsInSpell);\r\n if(item.system.attunement === 1) continue;\r\n this.itemsWithSpells.push({\r\n label: item.name,\r\n buttons: itemsInSpell.map((item) => new DND5eItemButton({ item })),\r\n uses: () => {return { max: item.system.uses?.max, value: item.system.uses?.value }},\r\n });\r\n }\r\n this.items = this.items.filter((item) => !itemsToIgnore.includes(item));\r\n }\r\n if (this.showPreparedOnly) {\r\n const allowIfNotPrepared = [\"atwill\", \"innate\", \"pact\", \"always\"];\r\n this.items = this.items.filter((item) => {\r\n if (allowIfNotPrepared.includes(item.system.preparation.mode)) return true;\r\n if (item.system.level == 0) return true;\r\n return item.system.preparation.prepared;\r\n });\r\n }\r\n\r\n const spells = [\r\n ...this.itemsWithSpells,\r\n {\r\n label: \"DND5E.SpellPrepAtWill\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"atwill\").map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: \"DND5E.SpellPrepInnate\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"innate\").map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: Object.values(spellLevels)[0],\r\n buttons: this.items.filter((item) => item.system.level == 0).map((item) => new DND5eItemButton({ item })),\r\n uses: { max: Infinity, value: Infinity },\r\n },\r\n {\r\n label: \"DND5E.PactMagic\",\r\n buttons: this.items.filter((item) => item.system.preparation.mode === \"pact\").map((item) => new DND5eItemButton({ item })),\r\n uses: () => { return this.actor.system.spells.pact }\r\n },\r\n ];\r\n for (const [level, label] of Object.entries(spellLevels)) {\r\n const levelSpells = this.items.filter((item) => item.system.level == level && (item.system.preparation.mode === \"prepared\" || item.system.preparation.mode === \"always\"));\r\n if (!levelSpells.length || level == 0) continue;\r\n spells.push({\r\n label,\r\n buttons: levelSpells.map((item) => new DND5eItemButton({ item })),\r\n uses: () => { return this.actor.system.spells[`spell${level}`] },\r\n });\r\n }\r\n return spells.filter((spell) => spell.buttons.length);\r\n }\r\n\r\n async _getPanel() {\r\n if (this.type === \"spell\") {\r\n return new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanel({ id: this.id, accordionPanelCategories: this._spells.map(({ label, buttons, uses }) => new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanelCategory({ label, buttons, uses })) });\r\n } else {\r\n return new ARGON.MAIN.BUTTON_PANELS.ButtonPanel({ id: this.id, buttons: this.items.map((item) => new DND5eItemButton({ item })) });\r\n }\r\n }\r\n }\r\n\r\n class DND5eSpecialActionButton extends ARGON.MAIN.BUTTONS.ActionButton {\r\n constructor(specialItem) {\r\n super();\r\n const actorItem = this.actor.items.getName(specialItem.name);\r\n this.item =\r\n actorItem ??\r\n new CONFIG.Item.documentClass(specialItem, {\r\n parent: this.actor,\r\n });\r\n }\r\n\r\n get label() {\r\n return this.item.name;\r\n }\r\n\r\n get icon() {\r\n return this.item.img;\r\n }\r\n\r\n get hasTooltip() {\r\n return true;\r\n }\r\n\r\n async getTooltipData() {\r\n const tooltipData = await getTooltipDetails(this.item);\r\n tooltipData.propertiesLabel = \"enhancedcombathud-dnd5e.tooltip.properties.name\";\r\n return tooltipData;\r\n }\r\n\r\n async _onLeftClick(event) {\r\n const useCE = game.modules.get(\"dfreds-convenient-effects\")?.active && game.dfreds.effectInterface.findEffectByName(this.label);\r\n let success = false;\r\n if (useCE) {\r\n success = true;\r\n await game.dfreds.effectInterface.toggleEffect(this.label, { overlay: false, uuids: [this.actor.uuid] });\r\n } else {\r\n success = await this.item.use({ event }, { event });\r\n }\r\n if (success) {\r\n DND5eItemButton.consumeActionEconomy(this.item);\r\n }\r\n }\r\n }\r\n\r\n class DND5eMovementHud extends ARGON.MovementHud {\r\n\r\n constructor (...args) {\r\n super(...args);\r\n this.getMovementMode = game.modules.get('elevation-drag-ruler')?.api?.getMovementMode;\r\n }\r\n\r\n get visible() {\r\n return game.combat?.started;\r\n }\r\n\r\n get movementMode() {\r\n return this.getMovementMode ? this.getMovementMode(this.token) : 'walk';\r\n }\r\n\r\n get movementMax() {\r\n return this.actor.system.attributes.movement[this.movementMode] / canvas.scene.dimensions.distance;\r\n }\r\n }\r\n\r\n class DND5eButtonHud extends ARGON.ButtonHud {\r\n\r\n constructor (...args) {\r\n super(...args);\r\n }\r\n\r\n get visible() {\r\n return !game.combat?.started;\r\n }\r\n\r\n async _getButtons() {\r\n return [\r\n {\r\n label: \"DND5E.LongRest\",\r\n onClick: (event) => this.actor.longRest(),\r\n icon: \"fas fa-bed\",\r\n },\r\n {\r\n label: \"DND5E.ShortRest\",\r\n onClick: (event) => this.actor.shortRest(),\r\n icon: \"fas fa-coffee\",\r\n }\r\n ]\r\n }\r\n }\r\n\r\n class DND5eWeaponSets extends ARGON.WeaponSets {\r\n async getDefaultSets() {\r\n const sets = await super.getDefaultSets();\r\n const isTransformed = this.actor.flags?.dnd5e?.isPolymorphed;\r\n if (this.actor.type !== \"npc\" && !isTransformed) return sets;\r\n const actions = this.actor.items.filter((item) => item.type === \"weapon\" && item.system.activation?.type === \"action\");\r\n const bonus = this.actor.items.filter((item) => item.type === \"weapon\" && item.system.activation?.type === \"bonus\");\r\n return {\r\n 1: {\r\n primary: actions[0]?.uuid ?? null,\r\n secondary: bonus[0]?.uuid ?? null,\r\n },\r\n 2: {\r\n primary: actions[1]?.uuid ?? null,\r\n secondary: bonus[1]?.uuid ?? null,\r\n },\r\n 3: {\r\n primary: actions[2]?.uuid ?? null,\r\n secondary: bonus[2]?.uuid ?? null,\r\n },\r\n };\r\n }\r\n\r\n async _getSets() {\r\n const isTransformed = this.actor.flags?.dnd5e?.isPolymorphed;\r\n\r\n const sets = isTransformed ? await this.getDefaultSets() : mergeObject(await this.getDefaultSets(), deepClone(this.actor.getFlag(\"enhancedcombathud\", \"weaponSets\") || {}));\r\n \r\n for (const [set, slots] of Object.entries(sets)) {\r\n slots.primary = slots.primary ? await fromUuid(slots.primary) : null;\r\n slots.secondary = slots.secondary ? await fromUuid(slots.secondary) : null;\r\n }\r\n return sets;\r\n }\r\n\r\n async _onSetChange({ sets, active }) {\r\n const switchEquip = game.settings.get(\"enhancedcombathud-dnd5e\", \"switchEquip\");\r\n if (!switchEquip) return;\r\n const updates = [];\r\n const activeSet = sets[active];\r\n const activeItems = Object.values(activeSet).filter((item) => item);\r\n const inactiveSets = Object.values(sets).filter((set) => set !== activeSet);\r\n const inactiveItems = inactiveSets.flatMap((set) => Object.values(set)).filter((item) => item).filter((item) => !activeItems.includes(item));\r\n activeItems.forEach((item) => {\r\n if (!item.system?.equipped) updates.push({ _id: item.id, \"system.equipped\": true });\r\n });\r\n inactiveItems.forEach((item) => {\r\n if (item.system?.equipped) updates.push({ _id: item.id, \"system.equipped\": false });\r\n });\r\n return await this.actor.updateEmbeddedDocuments(\"Item\", updates);\r\n }\r\n }\r\n\r\n CoreHUD.definePortraitPanel(DND5ePortraitPanel);\r\n CoreHUD.defineDrawerPanel(DND5eDrawerPanel);\r\n CoreHUD.defineMainPanels([DND5eActionActionPanel, DND5eBonusActionPanel, DND5eReactionActionPanel, DND5eFreeActionPanel, DND5eLegActionPanel, DND5eLairActionPanel, ARGON.PREFAB.PassTurnPanel]);\r\n CoreHUD.defineMovementHud(DND5eMovementHud);\r\n CoreHUD.defineButtonHud(DND5eButtonHud);\r\n CoreHUD.defineWeaponSets(DND5eWeaponSets);\r\n CoreHUD.defineSupportedActorTypes([\"character\", \"npc\"]);\r\n });\r\n}\r\n\r\nfunction registerItems() {\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/journey.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.disengage.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: 1,\r\n units: \"turn\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n },\r\n effects: [\r\n {\r\n _id: \"8FtZnIC1vbyKZ6xF\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/journey.webp\",\r\n label: \"Disengage\",\r\n origin: \"Item.wyQkeuZkttllAFB1\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n core: {\r\n sourceId: \"Item.wyQkeuZkttllAFB1\",\r\n },\r\n\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/armor-upgrade.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dodge.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: 1,\r\n units: \"round\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"2xH2YQ6pm430O0Aq\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n rounds: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/armor-upgrade.webp\",\r\n label: \"Dodge\",\r\n origin: \"Item.pakEYcgLYxtKGv7J\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/clockwork.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.ready.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"BevDb0J80M9BdoEl\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/clockwork.webp\",\r\n label: \"Ready\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/cloak-dagger.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.hide.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n recharge: {\r\n value: null,\r\n charged: false,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"SZkbtgGCICrpH0GJ\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n turns: 10,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/cloak-dagger.webp\",\r\n label: \"Hide\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/walking-boot.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.dash.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: null,\r\n width: null,\r\n units: \"\",\r\n type: \"self\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [\r\n {\r\n _id: \"PPMPZY1t3AUB7UGA\",\r\n changes: [],\r\n disabled: false,\r\n duration: {\r\n startTime: null,\r\n rounds: 1,\r\n },\r\n icon: \"modules/enhancedcombathud/icons/walking-boot.webp\",\r\n label: \"Dash\",\r\n transfer: false,\r\n flags: {\r\n dae: {\r\n stackable: \"none\",\r\n macroRepeat: \"none\",\r\n specialDuration: [],\r\n transfer: false,\r\n },\r\n },\r\n tint: \"\",\r\n },\r\n ],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n ECHItems[game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.name\")] = {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.name\"),\r\n type: \"feat\",\r\n img: \"modules/enhancedcombathud/icons/shield-bash.webp\",\r\n system: {\r\n description: {\r\n value: game.i18n.localize(\"enhancedcombathud-dnd5e.items.shove.desc\"),\r\n chat: \"\",\r\n unidentified: \"\",\r\n },\r\n source: \"\",\r\n quantity: 1,\r\n weight: 0,\r\n price: 0,\r\n attuned: false,\r\n attunement: 0,\r\n equipped: false,\r\n rarity: \"\",\r\n identified: true,\r\n activation: {\r\n type: \"action\",\r\n cost: 1,\r\n condition: \"\",\r\n },\r\n duration: {\r\n value: null,\r\n units: \"\",\r\n },\r\n target: {\r\n value: 1,\r\n width: null,\r\n units: \"\",\r\n type: \"creature\",\r\n },\r\n range: {\r\n value: null,\r\n long: null,\r\n units: \"touch\",\r\n },\r\n\r\n consume: {\r\n type: \"\",\r\n target: \"\",\r\n amount: null,\r\n },\r\n ability: \"\",\r\n actionType: \"util\",\r\n attackBonus: 0,\r\n chatFlavor: \"\",\r\n critical: null,\r\n damage: {\r\n parts: [],\r\n versatile: \"\",\r\n },\r\n formula: \"\",\r\n save: {\r\n ability: \"\",\r\n dc: null,\r\n scaling: \"spell\",\r\n },\r\n consumableType: \"trinket\",\r\n },\r\n effects: [],\r\n sort: 0,\r\n flags: {\r\n \"midi-qol\": {\r\n onUseMacroName: \"\",\r\n },\r\n },\r\n };\r\n\r\n if (game.settings.get(\"enhancedcombathud-dnd5e\", \"noAA\")) {\r\n for (let key of Object.keys(ECHItems)) {\r\n delete ECHItems[key].effects;\r\n }\r\n }\r\n}","import { MODULE_ID } from \"./main.js\";\r\n\r\nexport function registerSettings() {\r\n const settings = {\r\n showWeaponsItems: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showWeaponsItems.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showWeaponsItems.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: (sett) => {\r\n ui.ARGON.constructor.DND5E.itemTypes.consumable = ui.ARGON.constructor.DND5E.itemTypes.consumable.filter(i => i !== \"weapon\");\r\n if(sett) ui.ARGON.constructor.DND5E.itemTypes.consumable.push(\"weapon\");\r\n ui.ARGON.refresh()\r\n },\r\n },\r\n showClassActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showClassActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showClassActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: (sett) => {\r\n ui.ARGON.constructor.DND5E.mainBarFeatures = ui.ARGON.constructor.DND5E.mainBarFeatures.filter(i => i !== \"class\");\r\n if(sett) ui.ARGON.constructor.DND5E.mainBarFeatures.push(\"class\");\r\n ui.ARGON.refresh()\r\n },\r\n },\r\n condenseClassActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.condenseClassActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.condenseClassActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n switchEquip: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.switchEquip.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.switchEquip.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n showSpecialActions: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showSpecialActions.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.showSpecialActions.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: true,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n noAA: {\r\n name: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.noAA.name\"),\r\n hint: game.i18n.localize(\"enhancedcombathud-dnd5e.settings.noAA.hint\"),\r\n scope: \"world\",\r\n config: true,\r\n type: Boolean,\r\n default: false,\r\n onChange: () => ui.ARGON.refresh(),\r\n },\r\n };\r\n\r\n registerSettingsArray(settings);\r\n}\r\n\r\nexport function getSetting(key) {\r\n return game.settings.get(MODULE_ID, key);\r\n}\r\n\r\nexport async function setSetting(key, value) {\r\n return await game.settings.set(MODULE_ID, key, value);\r\n}\r\n\r\nfunction registerSettingsArray(settings) {\r\n for(const [key, value] of Object.entries(settings)) {\r\n game.settings.register(MODULE_ID, key, value);\r\n }\r\n}","import {initConfig} from \"./config.js\";\r\nimport { registerSettings } from \"./settings.js\";\r\n\r\nexport const MODULE_ID = \"enhancedcombathud-dnd5e\";\r\n\r\nHooks.on(\"setup\", () => {\r\n registerSettings();\r\n initConfig();\r\n});"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","_regeneratorRuntime","Op","hasOwn","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","_typeof","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","done","methodName","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","_catch","thrown","delegateYield","_classCallCheck","instance","Constructor","_defineProperties","target","props","descriptor","_toPrimitive","input","hint","prim","toPrimitive","res","String","Number","_createClass","protoProps","staticProps","_inherits","subClass","superClass","_setPrototypeOf","p","bind","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_createSuperInternal","Super","_getPrototypeOf","NewTarget","arguments","apply","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","ECHItems","initConfig","Hooks","on","CoreHUD","_game$modules$get","game","system","id","registerItems","i18n","localize","img","description","chat","unidentified","source","quantity","weight","price","attuned","attunement","equipped","rarity","identified","activation","cost","condition","duration","units","width","range","long","consume","amount","ability","actionType","attackBonus","chatFlavor","critical","damage","parts","versatile","formula","save","dc","scaling","effects","_id","changes","disabled","startTime","turns","icon","label","origin","transfer","flags","dae","stackable","macroRepeat","specialDuration","tint","sort","core","sourceId","onUseMacroName","consumableType","rounds","recharge","charged","settings","_i8","_Object$keys","ARGON","isMIDI","modules","active","getMidiFlag","_ui$ARGON$_actor$getF","_flag$actionType","ui","_actor","getFlag","actionTypes","action","bonus","reaction","free","itemTypes","spell","feat","consumable","mainBarFeatures","MODULE_ID","DND5E","callAll","DND5ePortraitPanel","_ARGON$PORTRAIT$Portr","_getStatBlocks","_onDeathSave2","_super","_len","Array","_key","concat","_this$actor","this","actor","isPC","_CONFIG$DND5E$creatur","creatureType","CONFIG","creatureTypes","details","custom","cr","classes","map","c","join","level","race","isDying","attributes","hp","_this$actor$system$at","_this$actor$system$at2","death","success","_this$actor$system$at3","_this$actor$system$at4","failure","_callee","event","_callee$","_context","rollDeathSave","_onDeathSave","_x3","_callee2","_this$actor$system$at5","_this$actor$system$at6","HPText","ACText","SpellDC","hpColor","tempMax","hpMaxColor","_callee2$","_context2","split","word","toUpperCase","replace","trim","temp","tempmax","text","color","max","ac","spelldc","getStatBlocks","PORTRAIT","PortraitPanel","DND5eDrawerButton","_ARGON$DRAWER$DrawerB","_getTooltipData","_super2","buttons","item","_this","TooltipManager","TOOLTIP_DIRECTIONS","RIGHT","_callee3","tooltipData","_callee3$","_context3","getTooltipDetails","getTooltipData","DRAWER","DrawerButton","DND5eDrawerPanel","_ARGON$DRAWER$DrawerP","_super3","_len2","_key2","_this2","abilities","skills","tools","tool","addSign","gridCols","captions","align","abilityData","onClick","rollAbility","mod","rollAbilityTest","rollAbilitySave","skill","skillData","getProficiencyIcon","proficient","rollSkill","passive","style","rollToolCheck","abilityMod","proficiencyMultiplier","prof","DrawerPanel","DND5eActionActionPanel","_ARGON$MAIN$ActionPan","_getButtons2","_super4","_len3","_key3","inCombat","_getMidiFlag","isActionUsed","_onNewRound","combat","updateActionUse","_callee4","spellItems","featItems","consumableItems","spellButton","specialActions","showSpecialActions","barItems","_callee4$","_context4","items","filter","_item$system$activati","_item$system$type","includes","_item$system$activati2","_item$system$type2","_item$system$activati3","_item$system$type3","DND5eButtonPanelButton","button","hasContents","DND5eItemButton","isWeaponSet","isPrimary","MAIN","BUTTONS","SplitButton","DND5eSpecialActionButton","_toConsumableArray","_item$system$type4","_item$system$activati4","condenseItemButtons","_getButtons","ActionPanel","DND5eBonusActionPanel","_ARGON$MAIN$ActionPan2","_getButtons3","_super5","_len4","_key4","_getMidiFlag2","_callee5","_loop","_i","_Object$entries","_this3","_callee5$","_context6","_Object$entries$_i","types","_loop$","_context5","_slicedToArray","_item$system$activati5","_item$system$type5","entries","t0","_item$system$type6","_item$system$activati6","DND5eReactionActionPanel","_ARGON$MAIN$ActionPan3","_getButtons4","_super6","_len5","_key5","_getMidiFlag3","_callee6","_loop2","_i2","_Object$entries2","_this4","_callee6$","_context8","_Object$entries2$_i","_loop2$","_context7","_item$system$activati7","_item$system$type7","_item$system$type8","_item$system$activati8","DND5eFreeActionPanel","_ARGON$MAIN$ActionPan4","_getButtons5","_super7","_len6","_key6","_callee7","_loop3","_i3","_Object$entries3","_this5","_callee7$","_context10","_Object$entries3$_i","_loop3$","_context9","_item$system$activati9","_item$system$type9","_item$system$type10","_item$system$activati10","DND5eLegActionPanel","_ARGON$MAIN$ActionPan5","_getButtons6","_super8","_len7","_key7","_this$actor$system$re","_this$actor$system$re2","resources","legact","_this$actor$system$re3","_this$actor$system$re4","_callee8","_callee8$","_context11","_item$system$activati11","inActionPanel","DND5eLairActionPanel","_ARGON$MAIN$ActionPan6","_getButtons7","_super9","_len8","_key8","_this$actor$system$re5","lair","_callee9","_callee9$","_context12","_item$system$activati12","_ARGON$MAIN$BUTTONS$I","_render","_onRightClick2","_onLeftClick2","_getTooltipData2","_super10","_len9","_key9","_canvas","_item$system$range$va","_item$system","_item$system$range$lo","_item$system2","touchRange","canvas","scene","grid","distance","normal","_item$system$target","_item$system$target2","_item$system$target3","targetType","_this$item","_isWeaponSet","_isPrimary","_get","armor","_callee10","_callee10$","_context13","propertiesLabel","_callee11","_callee11$","_context14","interceptNextDialog","currentTarget","use","consumeActionEconomy","_onLeftClick","_x4","_callee12","_this$item2","_callee12$","_context15","sheet","render","_onRightClick","_x5","_callee13","_get2","_len10","_key10","weapons","_this6","_args16","_callee13$","_context16","_item$system$consume","updateItemButtons","_this$item3","_this$item$system$con","_this$item$system$use","_this$item$system$use2","consumeType","_ammoItem$system$quan","ammoItem","Math","floor","getProperty","_chargesItem$system$u","_chargesItem$system$u2","chargesItem","uses","per","_item$system$activati13","_game$combat","activationType","_i4","_Object$entries4","_Object$entries4$_i","combatant","parent","components","main","ItemButton","_ARGON$MAIN$BUTTONS$B","_getPanel2","_super11","_ref","_this7","itemsWithSpells","_spells","prePrepareSpells","preparedFlag","some","className","_game$modules$get2","_this8","spellLevels","itemsToIgnore","_this$items$0$system$","_step","_iterator","_createForOfIteratorHelper","_item$flags$itemsWit","_loop4","itemsInSpell","_item$system$activati14","_item$system$uses","_item$system$uses2","s","n","f","showPreparedOnly","allowIfNotPrepared","preparation","mode","prepared","spells","Infinity","pact","_loop5","_Object$entries5$_i","_Object$entries5","_i5","levelSpells","_callee14","_callee14$","_context17","BUTTON_PANELS","ACCORDION","AccordionPanel","accordionPanelCategories","_ref2","AccordionPanelCategory","ButtonPanel","_getPanel","ButtonPanelButton","_ARGON$MAIN$BUTTONS$A","_onLeftClick3","_getTooltipData3","_super12","specialItem","_this9","actorItem","getName","Item","documentClass","_callee15","_callee15$","_context18","_callee16","_game$modules$get3","useCE","_callee16$","_context19","dfreds","effectInterface","findEffectByName","toggleEffect","overlay","uuids","uuid","_x6","ActionButton","DND5eMovementHud","_ARGON$MovementHud","_super13","_game$modules$get4","_this10","_len11","_key11","getMovementMode","api","_game$combat2","started","token","movement","movementMode","dimensions","MovementHud","DND5eButtonHud","_ARGON$ButtonHud","_getButtons8","_super14","_len12","_key12","_game$combat3","_callee17","_this11","_callee17$","_context20","longRest","shortRest","ButtonHud","DND5eWeaponSets","_ARGON$WeaponSets","_onSetChange2","_getSets2","_getDefaultSets","_super15","_callee18","_this$actor$flags","_actions$0$uuid","_actions$","_bonus$0$uuid","_bonus$","_actions$1$uuid","_actions$2","_bonus$1$uuid","_bonus$2","_actions$2$uuid","_actions$3","_bonus$2$uuid","_bonus$3","sets","isTransformed","actions","_callee18$","_context21","dnd5e","isPolymorphed","_item$system$activati15","_item$system$activati16","primary","secondary","getDefaultSets","_callee19","_this$actor$flags2","_i6","_Object$entries6","_Object$entries6$_i","slots","_callee19$","_context22","t1","mergeObject","t2","t3","deepClone","fromUuid","t4","t5","_getSets","_callee20","_ref3","updates","activeSet","activeItems","inactiveSets","inactiveItems","_callee20$","_context23","set","flatMap","_item$system3","_item$system4","updateEmbeddedDocuments","_onSetChange","_x7","WeaponSets","definePortraitPanel","defineDrawerPanel","defineMainPanels","PREFAB","PassTurnPanel","defineMovementHud","defineButtonHud","defineWeaponSets","defineSupportedActorTypes","_x","_x2","_getTooltipDetails","_callee21","_item$labels4","_item$labels5","_damageTypes","_properties","title","itemType","subtitle","dt","damageTypes","properties","materialComponents","_item$labels","_item$labels2","_item$labels3","_i7","_Object$entries7","_Object$entries7$_i","_iterator2","_step2","comp","dmgString","tooltipProperties","_callee21$","_context24","labels","weaponTypes","weaponType","itemActionTypes","weaponProperties","school","spellSchools","all","abbr","materials","consumableTypes","requirements","TextEditor","enrichHTML","toHit","derivedDamage","dDmg","getDamageTypeIcon","damageType","d","footerText","toLowerCase","proficiency","condensedItems","barItemsLength","barItemsMultipleOfTwo","currentSplitButtonItemButton","isCondensedButton","arr","_arrayWithHoles","isArray","_iterableToArrayLimit","_s","_e","_r","_arr","_n","_d","_unsupportedIterableToArray","minLen","_arrayLikeToArray","toString","from","test","_nonIterableRest","len","arr2","registerSettings","registerSettingsArray","register","showWeaponsItems","scope","config","default","onChange","sett","refresh","showClassActions","condenseClassActions","switchEquip","noAA"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 88dc1d5..bbfe913 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@babel/core": "^7.22.9", "@babel/preset-env": "^7.22.9", "babel-loader": "^9.1.3", + "terser-webpack-plugin": "^5.3.10", "webpack": "^5.88.2", "webpack-cli": "^5.1.4" } @@ -1747,13 +1748,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", + "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@types/eslint": { @@ -3425,9 +3426,9 @@ } }, "node_modules/terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz", + "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -3443,16 +3444,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -4958,13 +4959,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", + "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@types/eslint": { @@ -6251,9 +6252,9 @@ "dev": true }, "terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.27.0.tgz", + "integrity": "sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.3", @@ -6263,16 +6264,16 @@ } }, "terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" } }, "to-fast-properties": { diff --git a/package.json b/package.json index de98f2f..efa278f 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,11 @@ "@babel/core": "^7.22.9", "@babel/preset-env": "^7.22.9", "babel-loader": "^9.1.3", + "terser-webpack-plugin": "^5.3.10", "webpack": "^5.88.2", "webpack-cli": "^5.1.4" }, "scripts": { "create-release": "node create-release.js" } -} \ No newline at end of file +} diff --git a/webpack.config.js b/webpack.config.js index d1ed518..2f1ccbc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ const path = require("path"); +const TerserPlugin = require("terser-webpack-plugin"); module.exports = { entry: "./scripts/main.js", @@ -7,7 +8,17 @@ module.exports = { path: path.resolve(__dirname), }, mode: "production", - devtool: 'source-map', + devtool: "source-map", + optimization: { + minimizer: [ + new TerserPlugin({ + terserOptions: { + keep_classnames: true, + keep_fnames: true, + }, + }), + ], + }, module: { rules: [ { @@ -19,4 +30,4 @@ module.exports = { }, ], }, -}; +}; \ No newline at end of file