forked from theripper93/enhancedcombathud-dnd5e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
3 lines (3 loc) · 60.7 KB
/
index.js
1
2
3
/*! For license information please see index.js.LICENSE.txt */
(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},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(){return n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},n.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 i,r,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=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}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 r(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 i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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 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,i=new Array(t);n<t;n++)i[n]=e[n];return i}function u(){u=function(){return e};var e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function d(e,t,n,i){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),s=new E(i||[]);return r(o,"_invoke",{value:x(e,n,s)}),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=d;var p={};function f(){}function h(){}function y(){}var v={};c(v,o,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(N([])));b&&b!==n&&i.call(b,o)&&(v=b);var w=y.prototype=f.prototype=Object.create(v);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,n){function a(r,o,s,u){var l=m(e[r],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==t(d)&&i.call(d,"__await")?n.resolve(d.__await).then((function(e){a("next",e,s,u)}),(function(e){a("throw",e,s,u)})):n.resolve(d).then((function(e){c.value=e,s(c)}),(function(e){return a("throw",e,s,u)}))}u(l.arg)}var o;r(this,"_invoke",{value:function(e,t){function i(){return new n((function(n,i){a(e,t,n,i)}))}return o=o?o.then(i,i):i()}})}function x(e,t,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return{value:void 0,done:!0}}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=O(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var u=m(e,t,n);if("normal"===u.type){if(i=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i="completed",n.method="throw",n.arg=u.arg)}}}function O(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,O(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var r=m(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,p;var a=r.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function N(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=y,r(w,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:h,configurable:!0}),h.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},e.awrap=function(e){return{__await:e}},k(A.prototype),c(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new A(d(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(w),c(w,l,"Generator"),c(w,o,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=N,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return o.type="throw",o.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(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 i=n.completion;if("throw"===i.type){var r=i.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(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 i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,a=function(e,n){if("object"!==t(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,"string");if("object"!==t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===t(a)?a:String(a)),r)}var a}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function f(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,r=y(e);if(n){var a=y(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return function(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,i)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t,n,i,r,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(i,r)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){v(a,i,r,o,s,"next",e)}function s(e){v(a,i,r,o,s,"throw",e)}o(void 0)}))}}e.d({},{c:()=>k});var b={};function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var k="enhancedcombathud-sw5e";Hooks.on("setup",(function(){!function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var i=(s=2,function(e){if(Array.isArray(e))return e}(o=n[t])||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,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=(i=a.call(n)).done)&&(s.push(i.value),s.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(o,s)||function(e,t){if(e){if("string"==typeof e)return w(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)?w(e,t):void 0}}(o,s)||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.")}()),r=i[0],a=i[1];game.settings.register(k,r,a)}var o,s}({showWeaponsItems:{name:game.i18n.localize("enhancedcombathud-sw5e.settings.showWeaponsItems.name"),hint:game.i18n.localize("enhancedcombathud-sw5e.settings.showWeaponsItems.hint"),scope:"world",config:!0,type:Boolean,default:!1,onChange:function(e){ui.ARGON.constructor.SW5E.itemTypes.consumable=ui.ARGON.constructor.SW5E.itemTypes.consumable.filter((function(e){return"weapon"!==e})),e&&ui.ARGON.constructor.SW5E.itemTypes.consumable.push("weapon"),ui.ARGON.refresh()}},showClassActions:{name:game.i18n.localize("enhancedcombathud-sw5e.settings.showClassActions.name"),hint:game.i18n.localize("enhancedcombathud-sw5e.settings.showClassActions.hint"),scope:"world",config:!0,type:Boolean,default:!1,onChange:function(e){ui.ARGON.constructor.SW5E.mainBarFeatures=ui.ARGON.constructor.SW5E.mainBarFeatures.filter((function(e){return"class"!==e})),e&&ui.ARGON.constructor.SW5E.mainBarFeatures.push("class"),ui.ARGON.refresh()}},switchEquip:{name:game.i18n.localize("enhancedcombathud-sw5e.settings.switchEquip.name"),hint:game.i18n.localize("enhancedcombathud-sw5e.settings.switchEquip.hint"),scope:"world",config:!0,type:Boolean,default:!0,onChange:function(){return ui.ARGON.refresh()}},showSpecialActions:{name:game.i18n.localize("enhancedcombathud-sw5e.settings.showSpecialActions.name"),hint:game.i18n.localize("enhancedcombathud-sw5e.settings.showSpecialActions.hint"),scope:"world",config:!0,type:Boolean,default:!0,onChange:function(){return ui.ARGON.refresh()}},noAA:{name:game.i18n.localize("enhancedcombathud-sw5e.settings.noAA.name"),hint:game.i18n.localize("enhancedcombathud-sw5e.settings.noAA.hint"),scope:"world",config:!0,type:Boolean,default:!1,onChange:function(){return ui.ARGON.refresh()}}}),Hooks.on("argonInit",(function(e){if("sw5e"===game.system.id){!function(){if(b[game.i18n.localize("enhancedcombathud-sw5e.items.dash.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.dash.name"),type:"feat",img:"modules/enhancedcombathud/icons/walking-boot.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"},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:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.disengage.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.disengage.name"),type:"feat",img:"modules/enhancedcombathud/icons/journey.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"}},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:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.dodge.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.dodge.name"),type:"feat",img:"modules/enhancedcombathud/icons/armor-upgrade.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"},consumableType:"trinket"},effects:[{_id:"2xH2YQ6pm430O0Aq",changes:[{key:"flags.sw5e.grants.disadvantage.attack.all",mode:5,value:"1"},{key:"flags.sw5e.advantage.ability.save.dex",mode:5,value:"1"}],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:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.hide.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.hide.name"),type:"feat",img:"modules/enhancedcombathud/icons/cloak-dagger.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"},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:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.grapple.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.grapple.name"),type:"feat",img:"modules/enhancedcombathud-sw5e/icons/grab.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.items.grapple.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:"power"},consumableType:"trinket"},effects:[],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.shove.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.shove.name"),type:"feat",img:"modules/enhancedcombathud/icons/shield-bash.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"},consumableType:"trinket"},effects:[],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.guard.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.guard.name"),type:"feat",img:"modules/enhancedcombathud-sw5e/icons/shield-reflect.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.items.guard.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:"ally"},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:"power"},consumableType:"trinket"},effects:[{_id:"Hl2vvhBqqpvmuont",changes:[{key:"flags.sw5e.grants.disadvantage.attack.all",mode:5,value:"1"}],disabled:!1,duration:{startTime:null,turns:1},icon:"modules/enhancedcombathud/icons/clockwork.webp",label:"Guarded",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.help.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.help.name"),type:"feat",img:"modules/enhancedcombathud-sw5e/icons/team-idea.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.items.help.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:"ally"},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:"power"},consumableType:"trinket"},effects:[{_id:"VQnlT5waDLtOPJLF",changes:[{key:"flags.sw5e.situational.advantage.all",mode:5,value:"1"}],disabled:!1,duration:{startTime:null,turns:1},icon:"modules/enhancedcombathud/icons/clockwork.webp",label:"Helped",transfer:!1,flags:{dae:{stackable:"none",macroRepeat:"none",specialDuration:[],transfer:!1}},tint:""}],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.ready.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.ready.name"),type:"feat",img:"modules/enhancedcombathud/icons/clockwork.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.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:"power"},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:""}}},b[game.i18n.localize("enhancedcombathud-sw5e.items.search.name")]={name:game.i18n.localize("enhancedcombathud-sw5e.items.search.name"),type:"feat",img:"modules/enhancedcombathud-sw5e/icons/magnifying-glass.webp",system:{description:{value:game.i18n.localize("enhancedcombathud-sw5e.items.search.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:"power"},consumableType:"trinket"},effects:[],sort:0,flags:{"midi-qol":{onUseMacroName:""}}},game.settings.get("enhancedcombathud-sw5e","noAA"))for(var e=0,t=Object.keys(b);e<t.length;e++){var n=t[e];delete b[n].effects}}();var t=e.ARGON,o={action:["action"],bonus:["bonus"],reaction:["reaction","reactiondamage","reactionmanual"],free:["special"]},s={power:["power"],maneuver:["maneuver"],feat:["feat"],consumable:["consumable","equipment","loot"]},c=[];game.settings.get(k,"showWeaponsItems")&&s.consumable.push("weapon"),game.settings.get(k,"showClassActions")&&c.push("class"),e.SW5E={actionTypes:o,itemTypes:s,mainBarFeatures:c,ECHItems:b},Hooks.callAll("enhanced-combat-hud.sw5e.initConfig",{actionTypes:o,itemTypes:s,ECHItems:b});var p=function(e){m(r,e);var t,n,i=f(r);function r(){l(this,r);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.call.apply(i,[this].concat(t))}return d(r,[{key:"description",get:function(){var e=this.actor,t=e.type,n=e.system,i=this.actor,r="character"===t;if("npc"===t){var a,o=game.i18n.localize(null!==(a=CONFIG.SW5E.creatureTypes[i.system.details.type.value])&&void 0!==a?a:i.system.details.type.custom),s=n.details.cr>=1||n.details.cr<=0?n.details.cr:"1/".concat(1/n.details.cr);return"CR ".concat(s," ").concat(o)}if(r){var u=Object.values(i.classes).map((function(e){return e.name})).join(" / ");return"Level ".concat(n.details.level," ").concat(u," (").concat(n.details.species,")")}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:"_onDeathSave",value:(n=g(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=g(u().mark((function e(){var t,n,i,r,a,o,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=game.i18n.localize("SW5E.HitPoints").split(" ").map((function(e){return e.charAt(0).toUpperCase()})).join(""),r=game.i18n.localize("SW5E.ArmorClass").split(" ").map((function(e){return e.charAt(0).toUpperCase()})).join(""),a=this.actor.system.attributes.hp.temp?"#6698f3":"rgb(0 255 170)",o=this.actor.system.attributes.hp.tempmax,s=o?o>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:a},{text:"/"},{text:"".concat(this.actor.system.attributes.hp.max+(null!==(n=this.actor.system.attributes.hp.tempmax)&&void 0!==n?n:0)),color:s},{text:i}],[{text:r},{text:this.actor.system.attributes.ac.value,color:"var(--ech-movement-baseMovement-background)"}]]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),r}(t.PORTRAIT.PortraitPanel),v=function(e){m(i,e);var t,n=f(i);function i(e,t,r){var a;return l(this,i),(a=n.call(this,e)).item=t,a.type=r,a}return d(i,[{key:"hasTooltip",get:function(){return!0}},{key:"tooltipOrientation",get:function(){return TooltipManager.TOOLTIP_DIRECTIONS.RIGHT}},{key:"getTooltipData",value:(t=g(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(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)})}]),i}(t.DRAWER.DrawerButton),w=function(e){m(n,e);var t=f(n);function n(){l(this,n);for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return t.call.apply(t,[this].concat(i))}return d(n,[{key:"categories",get:function(){var e=this,t=this.actor.system.abilities,n=this.actor.system.skills,i=this.actor.itemTypes.tool,r=function(e){return e>=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 i=t[n];return new v([{label:CONFIG.SW5E.abilities[n].label,onClick:function(t){return e.actor.rollAbility(n,{event:t})}},{label:r(i.mod),onClick:function(t){return e.actor.rollAbilityTest(n,{event:t})}},{label:r(i.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 i=n[t];return new v([{label:R(i.proficient)+CONFIG.SW5E.skills[t].label,onClick:function(n){return e.actor.rollSkill(t,{event:n})}},{label:"".concat(r(i.mod),'<span style="margin: 0 1rem; filter: brightness(0.8)">(').concat(i.passive,")</span>"),style:"display: flex; justify-content: flex-end;"}],t,"skill")}))},{gridCols:"7fr 2fr",captions:[{label:"Tools"},{label:""}],buttons:i.map((function(n){return new v([{label:R(n.system.proficient)+n.name,onClick:function(e){return n.rollToolCheck({event:e})}},{label:r(t[n.abilityMod].mod+n.system.proficiencyMultiplier*e.actor.system.attributes.prof)}],n)}))}]}},{key:"title",get:function(){return"".concat(game.i18n.localize("enhancedcombathud-sw5e.hud.saves.name")," / ").concat(game.i18n.localize("enhancedcombathud-sw5e.hud.skills.name")," / ").concat(game.i18n.localize("enhancedcombathud-sw5e.hud.tools.name"))}}]),n}(t.DRAWER.DrawerPanel),A=function(n){m(p,n);var i,c=f(p);function p(){l(this,p);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.call.apply(c,[this].concat(t))}return d(p,[{key:"label",get:function(){return"SW5E.Action"}},{key:"maxActions",get:function(){return this.actor.inCombat?1:null}},{key:"currentActions",get:function(){return this.isActionUsed?0:1}},{key:"_onNewRound",value:function(e){this.isActionUsed=!1,this.updateActionUse()}},{key:"_getButtons",value:(i=g(u().mark((function n(){var i,l,c,d,m,p,f,h,y,v,g,w;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=this.actor.items.filter((function(t){var n,i;return s.power.includes(t.type)&&o.action.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),l=this.actor.items.filter((function(t){var n,i;return s.maneuver.includes(t.type)&&o.action.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),c=this.actor.items.filter((function(t){var n,i;return s.feat.includes(t.type)&&o.action.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),d=this.actor.items.filter((function(t){var n,i;return s.consumable.includes(t.type)&&o.action.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),console.log("powerItems",i),m=i.length?[new P({type:"power",items:i,color:0})].filter((function(e){return e.hasContents})):[],p=Object.values(b),f=game.settings.get(k,"showSpecialActions"),h=[new N({item:null,isWeaponSet:!0,isPrimary:!0}),new t.MAIN.BUTTONS.SplitButton(new C(p[0]),new C(p[1]))].concat(a(m),[new t.MAIN.BUTTONS.SplitButton(new C(p[2]),new C(p[3])),new P({type:"maneuver",items:l,color:0}),new t.MAIN.BUTTONS.SplitButton(new C(p[4]),new C(p[5])),new P({type:"feat",items:c,color:0}),new t.MAIN.BUTTONS.SplitButton(new C(p[6]),new C(p[7])),new P({type:"consumable",items:d,color:0}),new t.MAIN.BUTTONS.SplitButton(new C(p[8]),new C(p[9]))]),y=this.actor.items.filter((function(t){var n,i;return e.SW5E.mainBarFeatures.includes(null===(n=t.system.type)||void 0===n?void 0:n.value)&&o.action.includes(null===(i=t.system.activation)||void 0===i?void 0:i.type)})),v=r(y);try{for(v.s();!(g=v.n()).done;)w=g.value,h.push(new N({item:w,inActionPanel:!0}))}catch(e){v.e(e)}finally{v.f()}return n.abrupt("return",h.filter((function(e){return e.hasContents||null==e.items||e.items.length})).filter((function(e){return f||!(e instanceof t.MAIN.BUTTONS.SplitButton)})));case 13:case"end":return n.stop()}}),n,this)}))),function(){return i.apply(this,arguments)})}]),p}(t.MAIN.ActionPanel),x=function(t){m(c,t);var n,a=f(c);function c(){l(this,c);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.call.apply(a,[this].concat(t))}return d(c,[{key:"label",get:function(){return"SW5E.BonusAction"}},{key:"maxActions",get:function(){return this.actor.inCombat?1:null}},{key:"currentActions",get:function(){return this.isActionUsed?0:1}},{key:"_onNewRound",value:function(e){this.isActionUsed=!1,this.updateActionUse()}},{key:"_getButtons",value:(n=g(u().mark((function t(){var n,a,l,c,d,m,p,f,h=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[new N({item:null,isWeaponSet:!0,isPrimary:!1})],a=u().mark((function t(){var r,a,s,d,m;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i(c[l],2),a=r[0],s=r[1],d=h.actor.items.filter((function(t){var n,i;return s.includes(t.type)&&o.bonus.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),d.length){t.next=4;break}return t.abrupt("return","continue");case 4:(m=new P({type:a,items:d,color:1})).hasContents&&n.push(m);case 6:case"end":return t.stop()}}),t)})),l=0,c=Object.entries(s);case 3:if(!(l<c.length)){t.next=11;break}return t.delegateYield(a(),"t0",5);case 5:if("continue"!==t.t0){t.next=8;break}return t.abrupt("continue",8);case 8:l++,t.next=3;break;case 11:d=this.actor.items.filter((function(t){var n,i;return e.SW5E.mainBarFeatures.includes(null===(n=t.system.type)||void 0===n?void 0:n.value)&&o.bonus.includes(null===(i=t.system.activation)||void 0===i?void 0:i.type)})),m=r(d);try{for(m.s();!(p=m.n()).done;)f=p.value,n.push(new N({item:f,inActionPanel:!0}))}catch(e){m.e(e)}finally{m.f()}return t.abrupt("return",n);case 15:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),c}(t.MAIN.ActionPanel),O=function(t){m(c,t);var n,a=f(c);function c(){l(this,c);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.call.apply(a,[this].concat(t))}return d(c,[{key:"label",get:function(){return"SW5E.Reaction"}},{key:"maxActions",get:function(){return this.actor.inCombat?1:null}},{key:"currentActions",get:function(){return this.isActionUsed?0:1}},{key:"_onNewRound",value:function(e){this.isActionUsed=!1,this.updateActionUse()}},{key:"_getButtons",value:(n=g(u().mark((function t(){var n,a,l,c,d,m,p,f,h=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[new N({item:null,isWeaponSet:!0,isPrimary:!0})],a=u().mark((function t(){var r,a,s,d,m;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i(c[l],2),a=r[0],s=r[1],d=h.actor.items.filter((function(t){var n,i;return s.includes(t.type)&&o.reaction.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),d.length){t.next=4;break}return t.abrupt("return","continue");case 4:(m=new P({type:a,items:d,color:3})).hasContents&&n.push(m);case 6:case"end":return t.stop()}}),t)})),l=0,c=Object.entries(s);case 3:if(!(l<c.length)){t.next=11;break}return t.delegateYield(a(),"t0",5);case 5:if("continue"!==t.t0){t.next=8;break}return t.abrupt("continue",8);case 8:l++,t.next=3;break;case 11:d=this.actor.items.filter((function(t){var n,i;return e.SW5E.mainBarFeatures.includes(null===(n=t.system.type)||void 0===n?void 0:n.value)&&o.reaction.includes(null===(i=t.system.activation)||void 0===i?void 0:i.type)})),m=r(d);try{for(m.s();!(p=m.n()).done;)f=p.value,n.push(new N({item:f,inActionPanel:!0}))}catch(e){m.e(e)}finally{m.f()}return t.abrupt("return",n);case 15:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),c}(t.MAIN.ActionPanel),S=function(t){m(c,t);var n,a=f(c);function c(){l(this,c);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.call.apply(a,[this].concat(t))}return d(c,[{key:"label",get:function(){return"SW5E.Special"}},{key:"maxActions",get:function(){return this.actor.inCombat?1:null}},{key:"currentActions",get:function(){return this.isActionUsed?0:1}},{key:"_onNewRound",value:function(e){this.isActionUsed=!1,this.updateActionUse()}},{key:"_getButtons",value:(n=g(u().mark((function t(){var n,a,l,c,d,m,p,f,h=this;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=[],a=u().mark((function t(){var r,a,s,d,m;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=i(c[l],2),a=r[0],s=r[1],d=h.actor.items.filter((function(t){var n,i;return s.includes(t.type)&&o.free.includes(null===(n=t.system.activation)||void 0===n?void 0:n.type)&&!e.SW5E.mainBarFeatures.includes(null===(i=t.system.type)||void 0===i?void 0:i.value)})),d.length){t.next=4;break}return t.abrupt("return","continue");case 4:(m=new P({type:a,items:d,color:2})).hasContents&&n.push(m);case 6:case"end":return t.stop()}}),t)})),l=0,c=Object.entries(s);case 3:if(!(l<c.length)){t.next=11;break}return t.delegateYield(a(),"t0",5);case 5:if("continue"!==t.t0){t.next=8;break}return t.abrupt("continue",8);case 8:l++,t.next=3;break;case 11:d=this.actor.items.filter((function(t){var n,i;return e.SW5E.mainBarFeatures.includes(null===(n=t.system.type)||void 0===n?void 0:n.value)&&o.free.includes(null===(i=t.system.activation)||void 0===i?void 0:i.type)})),m=r(d);try{for(m.s();!(p=m.n()).done;)f=p.value,n.push(new N({item:f,inActionPanel:!0}))}catch(e){m.e(e)}finally{m.f()}return t.abrupt("return",n);case 15:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}]),c}(t.MAIN.ActionPanel),T=function(e){m(i,e);var t,n=f(i);function i(){l(this,i);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.call.apply(n,[this].concat(t))}return d(i,[{key:"label",get:function(){return"SW5E.LegendaryActionLabel"}},{key:"maxActions",get:function(){var e,t;return this.actor.inCombat&&null!==(e=null===(t=this.actor.system.resources)||void 0===t||null===(t=t.legact)||void 0===t?void 0:t.max)&&void 0!==e?e:null}},{key:"currentActions",get:function(){var e,t;return null!==(e=null===(t=this.actor.system.resources)||void 0===t||null===(t=t.legact)||void 0===t?void 0:t.value)&&void 0!==e?e:null}},{key:"_getButtons",value:(t=g(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],this.actor.items.filter((function(e){var t;return"legendary"===(null===(t=e.system.activation)||void 0===t?void 0:t.type)})).forEach((function(e){t.push(new N({item:e,inActionPanel:!0}))})),e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),i}(t.MAIN.ActionPanel),E=function(e){m(i,e);var t,n=f(i);function i(){l(this,i);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.call.apply(n,[this].concat(t))}return d(i,[{key:"label",get:function(){return"SW5E.LairActionLabel"}},{key:"maxActions",get:function(){return this.actor.inCombat?1:null}},{key:"currentActions",get:function(){var e;return 1*(null===(e=this.actor.system.resources.lair)||void 0===e?void 0:e.value)}},{key:"_getButtons",value:(t=g(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],this.actor.items.filter((function(e){var t;return"lair"===(null===(t=e.system.activation)||void 0===t?void 0:t.type)})).forEach((function(e){t.push(new N({item:e,inActionPanel:!0}))})),e.abrupt("return",t);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),i}(t.MAIN.ActionPanel),N=function(e){m(b,e);var t,r,a,s,c,p,v=f(b);function b(){var e;l(this,b);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e=v.call.apply(v,[this].concat(n)),Hooks.on("updateItem",e._onUpdateItem.bind(h(e))),e}return d(b,[{key:"hasTooltip",get:function(){return!0}},{key:"ranges",get:function(){var e,t,n,i,r,a=this.item,o="touch"==a.system.range.units?null===(e=canvas)||void 0===e||null===(e=e.scene)||void 0===e||null===(e=e.grid)||void 0===e?void 0:e.distance:null;return{normal:null!==(t=null===(n=a.system)||void 0===n||null===(n=n.range)||void 0===n?void 0:n.value)&&void 0!==t?t:o,long:null!==(i=null===(r=a.system)||void 0===r||null===(r=r.range)||void 0===r?void 0:r.long)&&void 0!==i?i:null}}},{key:"targets",get:function(){var e,t=this.item,n=t.system.actionType,i=null===(e=t.system.target)||void 0===e?void 0:e.type;return["creature","ally","enemy"].includes(i)?t.system.target.value:"mwak"===n||"rwak"===n?1:null}},{key:"visible",get:function(){var e;return!this._isWeaponSet||this._isPrimary?n(y(b.prototype),"visible",this):n(y(b.prototype),"visible",this)&&"shield"===!(null!==(e=this.item)&&void 0!==e&&null!==(e=e.system)&&void 0!==e&&null!==(e=e.armor)&&void 0!==e&&e.type)}},{key:"getTooltipData",value:(p=g(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(this.item);case 2:return(t=e.sent).propertiesLabel="enhancedcombathud-sw5e.tooltip.properties.name",e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"_onMouseUp",value:(c=g(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n(y(b.prototype),"_onMouseUp",this).call(this,t),1===t.button&&this._onMiddleClick(t);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_onLeftClick",value:(s=g(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ui.ARGON.interceptNextDialog(t.currentTarget),e.next=3,this.item.use({event:t},{event:t});case 3:e.sent&&(b.consumeActionEconomy(this.item),"maneuver"===this.item.type&&(null===(n=this.parent)||void 0===n||null===(n=n.parent)||void 0===n||n.render()));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_onMiddleClick",value:(a=g(u().mark((function e(t){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.item.reloadWeapon();case 1:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_onRightClick",value:(r=g(u().mark((function e(t){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(n=this.item)||void 0===n||null===(n=n.sheet)||void 0===n||n.render(!0);case 1:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"_onUpdateItem",value:function(e){e===this._item&&this.render()}},{key:"render",value:(t=g(u().mark((function e(){var t,i,r,a,o,s=this,l=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(i=l.length,r=new Array(i),a=0;a<i;a++)r[a]=l[a];return e.next=3,(t=n(y(b.prototype),"render",this)).call.apply(t,[this].concat(r));case 3:this.item&&(o=this.actor.items.filter((function(e){var t;return(null===(t=e.system.consume)||void 0===t?void 0:t.target)===s.item.id})),ui.ARGON.updateItemButtons(o));case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"quantity",get:function(){var e,t;if(null===(e=this.item)||void 0===e||!e.system)return null;var n,i,r=null===(t=this.item.system.consume)||void 0===t?void 0:t.type;if(this.item.hasAmmo){var a=this.item.getAmmo;return a.item?Math.floor(a.quantity/a.consumeAmount):null}if("attribute"===r)return Math.floor(getProperty(this.actor.system,this.item.system.consume.target)/this.item.system.consume.amount);if("charges"===r){var o,s,u=this.actor.items.get(this.item.system.consume.target);return u?Math.floor((null!==(o=null===(s=u.system.uses)||void 0===s?void 0:s.value)&&void 0!==o?o:0)/this.item.system.consume.amount):null}return["consumable"].includes(this.item.type)?null!==(n=null===(i=this.item.system.uses)||void 0===i?void 0:i.value)&&void 0!==n?n:this.item.system.quantity:null!==this.item.system.uses.value&&null!==this.item.system.uses.per?this.item.system.uses.value:null}},{key:"quantitySecondary",get:function(){if(this.item.system.hasReload){var e,t=this.item.getAmmo.item;if(t)return null==t||null===(e=t.system)||void 0===e?void 0:e.quantity}return null}}],[{key:"consumeActionEconomy",value:function(e){for(var t,n,r=null===(t=e.system.activation)||void 0===t?void 0:t.type,a=null,s=0,u=Object.entries(o);s<u.length;s++){var l=i(u[s],2),c=l[0];l[1].includes(r)&&(a=c)}a&&((null===(n=game.combat)||void 0===n||null===(n=n.combatant)||void 0===n?void 0:n.actor)!==e.parent&&(a="reaction"),"action"===a?(ui.ARGON.components.main[0].isActionUsed=!0,ui.ARGON.components.main[0].updateActionUse()):"bonus"===a?(ui.ARGON.components.main[1].isActionUsed=!0,ui.ARGON.components.main[1].updateActionUse()):"reaction"===a?(ui.ARGON.components.main[2].isActionUsed=!0,ui.ARGON.components.main[2].updateActionUse()):"free"===a?(ui.ARGON.components.main[3].isActionUsed=!0,ui.ARGON.components.main[3].updateActionUse()):"legendary"===a&&(ui.ARGON.components.main[4].isActionUsed=!0))}}]),b}(t.MAIN.BUTTONS.ItemButton),P=function(e){m(p,e);var o,s,c=f(p);function p(e){var t,n=e.type,i=e.items,r=e.color;return l(this,p),(t=c.call(this)).type=n,t.items=i,t.color=r,t.itemsWithPowers=[],t._powers=t.prePreparePowers(),t}return d(p,[{key:"hasContents",get:function(){return this._powers?!!this._powers.length||!!this.itemsWithPowers.length:!!this.items.length}},{key:"colorScheme",get:function(){return this.color}},{key:"id",get:function(){return"".concat(this.type,"-").concat(this.color)}},{key:"label",get:function(){switch(this.type){case"power":return"enhancedcombathud-sw5e.hud.castpower.name";case"maneuver":return"enhancedcombathud-sw5e.hud.usemaneuver.name";case"feat":return"enhancedcombathud-sw5e.hud.usefeature.name";case"consumable":return"enhancedcombathud-sw5e.hud.useitem.name"}}},{key:"icon",get:function(){switch(this.type){case"power":return"modules/enhancedcombathud/icons/spell-book.webp";case"maneuver":return"modules/enhancedcombathud-sw5e/icons/acrobatic.webp";case"feat":return"modules/enhancedcombathud/icons/mighty-force.webp";case"consumable":return"modules/enhancedcombathud/icons/drink-me.webp"}}},{key:"showPreparedOnly",get:function(){if("character"!==this.actor.type)return!1;var e=Object.keys(this.actor.classes);return["cleric","druid","paladin","wizard","artificer","ranger"].some((function(t){return e.includes(t)}))}},{key:"prePreparePowers",value:function(){var e,t=this;if("power"===this.type){var n=CONFIG.SW5E.powerLevels,o=[];if(null!==(e=game.modules.get("items-with-powers-5e"))&&void 0!==e&&e.active){var s,u,l=null===(s=this.items[0].system.activation)||void 0===s?void 0:s.type,c=r(this.actor.items.filter((function(e){var t;return null===(t=e.flags["items-with-powers-5e"])||void 0===t||null===(t=t["item-powers"])||void 0===t?void 0:t.length})));try{var d=function(){var e=u.value,n=e.flags["items-with-powers-5e"]["item-powers"].map((function(e){return t.actor.items.get(e.id)})).filter((function(e){var t;return e&&(null===(t=e.system.activation)||void 0===t?void 0:t.type)===l}));return n.length?(o.push.apply(o,a(n)),1===e.system.attunement?"continue":void t.itemsWithPowers.push({label:e.name,buttons:n.map((function(e){return new N({item:e})})),uses:function(){var t,n;return{max:null===(t=e.system.uses)||void 0===t?void 0:t.max,value:null===(n=e.system.uses)||void 0===n?void 0:n.value}}})):"continue"};for(c.s();!(u=c.n()).done;)d()}catch(e){c.e(e)}finally{c.f()}this.items=this.items.filter((function(e){return!o.includes(e)}))}if(this.showPreparedOnly){var m=["atwill","innate","pact","always"];this.items=this.items.filter((function(e){return!!m.includes(e.system.preparation.mode)||0==e.system.level||e.system.preparation.prepared}))}if(this.showPreparedOnly){var p=["atwill","innate","pact","always"];this.items=this.items.filter((function(e){return!!p.includes(e.system.preparation.mode)||0==e.system.level||e.system.preparation.prepared}))}for(var f=[].concat(a(this.itemsWithPowers),[{label:"SW5E.PowerPrepAtWill",buttons:this.items.filter((function(e){return"atwill"===e.system.preparation.mode})).map((function(e){return new N({item:e})}))},{label:"SW5E.PowerPrepInnate",buttons:this.items.filter((function(e){return"innate"===e.system.preparation.mode})).map((function(e){return new N({item:e})}))},{label:Object.values(n)[0],buttons:this.items.filter((function(e){return 0==e.system.level})).map((function(e){return new N({item:e})}))},{label:"SW5E.PactMagic",buttons:this.items.filter((function(e){return"pact"===e.system.preparation.mode})).map((function(e){return new N({item:e})}))}]),h=function(){var e=i(v[y],2),n=e[0],r=e[1],a=t.items.filter((function(e){return e.system.level==n&&("prepared"===e.system.preparation.mode||"always"===e.system.preparation.mode)}));if(!a.length||0==n)return"continue";f.push({label:r,buttons:a.map((function(e){return new N({item:e})}))})},y=0,v=Object.entries(n);y<v.length;y++)h();return f.filter((function(e){return e.buttons.length}))}}},{key:"_getPanel",value:(s=g(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("power"!==this.type){e.next=4;break}return e.abrupt("return",new t.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanel({id:this.id,accordionPanelCategories:this._powers.map((function(e){var t=e.label,n=e.buttons,i=e.uses;return new I({label:t,buttons:n,uses:i})}))}));case 4:return e.abrupt("return",new t.MAIN.BUTTON_PANELS.ButtonPanel({id:this.id,buttons:this.items.map((function(e){return new N({item:e})}))}));case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"_renderInner",value:(o=g(u().mark((function e(){var t,i,r,a;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(y(p.prototype),"_renderInner",this).call(this);case 2:t=this.quantity,i=this.quantitySecondary,r=[t,i].reduce((function(e,t,n){return null!==t&&(e+='\n <div class="quantity-'.concat(n+1,' multiline">\n <div class="border-triangle"></div>\n <span>').concat(t,"</span>\n </div>")),e}),""),this.element.insertAdjacentHTML("afterbegin",r),null===t&&null===i||(a=(null!=t?t:0)+(null!=i?i:0)===0,this.element.style.filter=a?"grayscale(1)":null);case 7:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"quantity",get:function(){var e;if("maneuver"===this.type)return(null==this||null===(e=this.actor)||void 0===e||null===(e=e.system)||void 0===e||null===(e=e.scale)||void 0===e||null===(e=e.superiority)||void 0===e?void 0:e.dice).value;if("power"===this.type){var t,n=null==this||null===(t=this.actor)||void 0===t||null===(t=t.system)||void 0===t||null===(t=t.attributes)||void 0===t||null===(t=t.force)||void 0===t?void 0:t.points;if(null!=n&&n.max)return"".concat(n.value," FP")}return null}},{key:"quantitySecondary",get:function(){if("power"===this.type){var e,t=null==this||null===(e=this.actor)||void 0===e||null===(e=e.system)||void 0===e||null===(e=e.attributes)||void 0===e||null===(e=e.tech)||void 0===e?void 0:e.points;if(null!=t&&t.max)return"".concat(t.value," TP")}return null}}]),p}(t.MAIN.BUTTONS.ButtonPanelButton),I=function(e){m(i,e);var t=f(i);function i(){return l(this,i),t.apply(this,arguments)}return d(i,[{key:"_setUses",value:function(){var e;return void 0===this.uses.max&&(null===(e=this.buttonContainer.querySelector(".feature-spell-slots"))||void 0===e||e.remove(),this.buttonContainer.style["margin-bottom"]="0px"),n(y(i.prototype),"_setUses",this).call(this)}}]),i}(t.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanelCategory),C=function(e){m(r,e);var t,n,i=f(r);function r(e){var t;l(this,r);var n=(t=i.call(this)).actor.items.getName(e.name);return t.item=null!=n?n:new CONFIG.Item.documentClass(e,{parent:t.actor}),t}return d(r,[{key:"label",get:function(){return this.item.name}},{key:"icon",get:function(){return this.item.img}},{key:"hasTooltip",get:function(){return!0}},{key:"getTooltipData",value:(n=g(u().mark((function e(){var t;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(this.item);case 2:return(t=e.sent).propertiesLabel="enhancedcombathud-sw5e.tooltip.properties.name",e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"_onLeftClick",value:(t=g(u().mark((function e(t){var n,i,r;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(null===(n=game.modules.get("dfreds-convenient-effects"))||void 0===n?void 0:n.active)&&game.dfreds.effectInterface.findEffectByName(this.label),r=!1,!i){e.next=8;break}return r=!0,e.next=6,game.dfreds.effectInterface.toggleEffect(this.label,{overlay:!1,uuids:[this.actor.uuid]});case 6:e.next=11;break;case 8:return e.next=10,this.item.use({event:t},{event:t});case 10:r=e.sent;case 11:r&&N.consumeActionEconomy(this.item);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),r}(t.MAIN.BUTTONS.ActionButton),B=function(e){m(n,e);var t=f(n);function n(){var e,i;l(this,n);for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return(i=t.call.apply(t,[this].concat(a))).getMovementMode=null===(e=game.modules.get("elevation-drag-ruler"))||void 0===e||null===(e=e.api)||void 0===e?void 0:e.getMovementMode,i}return d(n,[{key:"movementMode",get:function(){return this.getMovementMode?this.getMovementMode(this.token):"walk"}},{key:"movementMax",get:function(){return this.actor.system.attributes.movement[this.movementMode]/canvas.scene.dimensions.distance}}]),n}(t.MovementHud),_=function(e){m(a,e);var t,i,r=f(a);function a(){return l(this,a),r.apply(this,arguments)}return d(a,[{key:"getDefaultSets",value:(i=g(u().mark((function e(){var t,i,r,o,s,l,c,d,m,p,f,h,v,g,b;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n(y(a.prototype),"getDefaultSets",this).call(this);case 2:if(v=e.sent,"npc"===this.actor.type){e.next=5;break}return e.abrupt("return",v);case 5:return g=this.actor.items.filter((function(e){var t;return"weapon"===e.type&&"action"===(null===(t=e.system.activation)||void 0===t?void 0:t.type)})),b=this.actor.items.filter((function(e){var t;return"weapon"===e.type&&"bonus"===(null===(t=e.system.activation)||void 0===t?void 0:t.type)})),e.abrupt("return",{1:{primary:null!==(t=null===(i=g[0])||void 0===i?void 0:i.uuid)&&void 0!==t?t:null,secondary:null!==(r=null===(o=b[0])||void 0===o?void 0:o.uuid)&&void 0!==r?r:null},2:{primary:null!==(s=null===(l=g[1])||void 0===l?void 0:l.uuid)&&void 0!==s?s:null,secondary:null!==(c=null===(d=b[1])||void 0===d?void 0:d.uuid)&&void 0!==c?c:null},3:{primary:null!==(m=null===(p=g[2])||void 0===p?void 0:p.uuid)&&void 0!==m?m:null,secondary:null!==(f=null===(h=b[2])||void 0===h?void 0:h.uuid)&&void 0!==f?f:null}});case 8:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_onSetChange",value:(t=g(u().mark((function e(t){var n,i,r,a,o,s,l;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.sets,i=t.active,game.settings.get("enhancedcombathud-sw5e","switchEquip")){e.next=4;break}return e.abrupt("return");case 4:return r=[],a=n[i],o=Object.values(a).filter((function(e){return e})),s=Object.values(n).filter((function(e){return e!==a})),l=s.flatMap((function(e){return Object.values(e)})).filter((function(e){return e})).filter((function(e){return!o.includes(e)})),o.forEach((function(e){var t;null!==(t=e.system)&&void 0!==t&&t.equipped||r.push({_id:e.id,"system.equipped":!0})})),l.forEach((function(e){var t;null!==(t=e.system)&&void 0!==t&&t.equipped&&r.push({_id:e.id,"system.equipped":!1})})),e.next=13,this.actor.updateEmbeddedDocuments("Item",r);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})}]),a}(t.WeaponSets);e.definePortraitPanel(p),e.defineDrawerPanel(w),e.defineMainPanels([A,x,O,S,T,E,t.PREFAB.PassTurnPanel]),e.defineMovementHud(B),e.defineWeaponSets(_),e.defineSupportedActorTypes(["character","npc"])}function j(e,t){return M.apply(this,arguments)}function M(){return(M=g(u().mark((function e(t,n){var a,o,s,l,c,d,m,p,f,h,y,v,g,b,w,k,A,x,O,S,T,E,N,P,I,C,B,_;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y=[],v=[],g="","skill"!=n){e.next=8;break}l=CONFIG.SW5E.skills[t].label,c=game.i18n.localize("enhancedcombathud-sw5e.skills.".concat(t,".tooltip")),e.next=45;break;case 8:if("save"!=n){e.next=13;break}l=CONFIG.SW5E.abilities[t].label,c=game.i18n.localize("enhancedcombathud-sw5e.abilities.".concat(t,".tooltip")),e.next=45;break;case 13:if(t&&t.system){e.next=15;break}return e.abrupt("return");case 15:l=t.name,c=t.system.description.value,d=t.type,p=(null===(b=t.labels)||void 0===b?void 0:b.target)||"-",f=(null===(w=t.labels)||void 0===w?void 0:w.range)||"-",v=[],h=null===(k=t.labels)||void 0===k||null===(k=k.damageTypes)||void 0===k?void 0:k.split(", "),y=h&&h.length?h:[],g="",e.t0=d,e.next="weapon"===e.t0?27:"power"===e.t0?31:"consumable"===e.t0?39:"feat"===e.t0?42:45;break;case 27:for(m=CONFIG.SW5E.weaponTypes[t.system.weaponType],v.push(CONFIG.SW5E.itemActionTypes[t.system.actionType]),A=0,x=Object.entries(t.system.properties);A<x.length;A++)O=i(x[A],2),S=O[0],T=O[1],(E=T&&CONFIG.SW5E.weaponProperties[S]?CONFIG.SW5E.weaponProperties[S]:void 0)&&v.push(E.name);return e.abrupt("break",45);case 31:m="".concat(t.labels.level," ").concat(t.labels.school),v.push(CONFIG.SW5E.powerSchools[t.system.school]),v.push(t.labels.duration),v.push(t.labels.save),N=r(t.labels.components.all);try{for(N.s();!(P=N.n()).done;)I=P.value,v.push(I.abbr)}catch(e){N.e(e)}finally{N.f()}return t.labels.materials&&(g=t.labels.materials),e.abrupt("break",45);case 39:return m=CONFIG.SW5E.consumableTypes[t.system.consumableType],v.push(CONFIG.SW5E.itemActionTypes[t.system.actionType]),e.abrupt("break",45);case 42:return m=t.system.requirements,v.push(CONFIG.SW5E.itemActionTypes[t.system.actionType]),e.abrupt("break",45);case 45:if(!c){e.next=49;break}return e.next=48,TextEditor.enrichHTML(c);case 48:c=e.sent;case 49:return C=[],(p||f)&&(C=[{label:"enhancedcombathud-sw5e.tooltip.target.name",value:p},{label:"enhancedcombathud-sw5e.tooltip.range.name",value:f}]),t.labels.toHit&&C.push({label:"enhancedcombathud-sw5e.tooltip.toHit.name",value:t.labels.toHit}),null!==(a=t.labels.derivedDamage)&&void 0!==a&&a.length&&(B="",t.labels.derivedDamage.forEach((function(e){B+=e.formula+" "+W(e.damageType)+" "})),C.push({label:"enhancedcombathud-sw5e.tooltip.damage.name",value:B})),_=[],null!==(o=y)&&void 0!==o&&o.length&&y.forEach((function(e){return _.push({label:e,primary:!0})})),null!==(s=v)&&void 0!==s&&s.length&&v.forEach((function(e){return _.push({label:e,secondary:!0})})),e.abrupt("return",{title:l,description:c,subtitle:m,details:C,properties:_,footerText:g});case 57:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function W(e){switch(e.toLowerCase()){case"kinetic":return'<i class="fas fa-sword"></i>';case"acid":return'<i class="fas fa-flask"></i>';case"cold":return'<i class="fas fa-snowflake"></i>';case"energy":return'<i class="fas fa-sword-laser"></i>';case"fire":return'<i class="fas fa-fire"></i>';case"force":return'<i class="fas fa-hand-sparkles"></i>';case"ion":return'<i class="fas fa-user-robot-xmarks"></i>';case"lightning":return'<i class="fas fa-bolt"></i>';case"necrotic":return'<i class="fas fa-skull"></i>';case"poison":return'<i class="fas fa-skull-crossbones"></i>';case"psychic":return'<i class="fas fa-brain"></i>';case"sonic":return'<i class="fas fa-bell"></i>';case"healing":case"temphp":return'<i class="fas fa-heart"></i>';default:return""}}function R(e){return 0==e?'<i style="margin-right: 1ch; pointer-events: none" class="far fa-circle"> </i>':1==e?'<i style="margin-right: 1ch; pointer-events: none" class="fas fa-check"> </i>':2==e?'<i style="margin-right: 1ch; pointer-events: none" class="fas fa-check-double"> </i>':.5==e?'<i style="margin-right: 1ch; pointer-events: none" class="fas fa-adjust"> </i>':'<i style="margin-right: 1ch; pointer-events: none" class="far fa-circle"> </i>'}}))}))})();
//# sourceMappingURL=index.js.map