Test Branch for this ACTWebSocket overlay updated for EW release. See below for the temporary link until the main project is updated:
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
SkillDisplay/static/js/main.ad1aebd8.chunk.js

2 lines
4.1 KiB

(window.webpackJsonpskilldisplay=window.webpackJsonpskilldisplay||[]).push([[0],[,,,,,,,function(n,t,e){n.exports=e(16)},,,,,function(n,t,e){},,function(n,t,e){},function(n,t,e){},function(n,t,e){"use strict";e.r(t);var a=e(0),o=e.n(a),r=e(2),c=e.n(r),i=e(1),u=e(4),s=function(){return/HOST_PORT=(wss?:\/\/.+)/.exec(window.location.search)};function l(n){return s()?function n(t){var e=new URLSearchParams(window.location.search);var a="".concat(e.get("HOST_PORT"),"BeforeLogLineRead")||!1;var o=new WebSocket(a);o.onerror=function(){return o.close()};o.onclose=function(){return setTimeout(function(){n(t)},1e3)};o.onmessage=function(n,e){if("."===n.data)return o.send(".");var a=JSON.parse(n.data);return"SendCharName"===a.msgtype?t(a.msg):"Chat"===a.msgtype?t.apply(void 0,Object(u.a)(a.msg.split("|"))):void 0};return function(){o.close()}}(n):function(n){var t=function(t){n.apply(void 0,Object(u.a)(t.detail))};return document.addEventListener("onLogLine",t),function(){document.removeEventListener("onLogLine",t)}}(n)}e(12);var d=e(3),f=e.n(d),m=e(6),v=(e(14),new Set([15997,15998,15999,16e3,16001,16002,16003,16004,16191,16192,16193,16194,16195,16196,7418,16483,2259,18805,2261,18806,2263,18807,2265,18873,18874,18875,2267,18877,2266,18876,2268,18878,16492,16471,2270,18880,2269,18879,2271,18881,2272])),p=new Set([3559,116,114]);function h(n){var t=n.actionId,e=n.additionalClasses,a=o.a.useState(),r=Object(i.a)(a,2),c=r[0],u=r[1];return o.a.useEffect(function(){var n=!0;return Object(m.a)(f.a.mark(function e(){var a;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://xivapi.com/Action/".concat(t),{mode:"cors"});case 2:return e.next=4,e.sent.json();case 4:a=e.sent,n&&u(a);case 6:case"end":return e.stop()}},e)}))(),function(){n=!1}},[t]),void 0!==c&&c.Icon?o.a.createElement("img",{className:v.has(t)||!p.has(t)&&4!==c.ActionCategory.ID?"gcd ".concat(e):"ogcd ".concat(e),src:"https://xivapi.com/".concat(c.Icon),alt:c.Name||""}):null}e(15);function w(n){var t=n.encounterId,e=n.name,a=n.actionList,r=o.a.useState(!1),c=Object(i.a)(r,2),u=c[0],s=c[1];return o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{className:u?"rotation-button expanded":"rotation-button",onClick:function(){s(function(n){return!n})}},0===t?"Current Rotation":e),o.a.createElement(g,{expanded:u,actionList:a}))}function g(n){var t=n.expanded,e=n.actionList;return t?o.a.createElement("div",{className:"rotation-list"},e.map(function(n,t){return o.a.createElement(h,{key:t,actionId:n,additionalClasses:"action-rotation"})})):null}var E=new Set(["00","01","02","21","22","33"]);c.a.render(o.a.createElement(function(){var n=o.a.useState([]),t=Object(i.a)(n,2),e=t[0],a=t[1],r=o.a.useState([]),u=Object(i.a)(r,2),s=u[0],d=u[1];return o.a.useEffect(function(){var n,t="",e=-1,o="Unknown",r=1,i=l(function(){for(var i=function(){d(function(n){return n[0]&&n[0].rotation&&n[0].rotation.length<=0&&n.shift(),n.unshift({name:o,rotation:[]}),n.slice(0,3)})},u=arguments.length,s=new Array(u),l=0;l<u;l++)s[l]=arguments[l];if(1===s.length&&s[0].charID)return n=s[0].charID,void i();var f=s[0],m=s[1],v=s[2],p=s[3],h=s[4];if(E.has(f)){switch(f){case"00":return void("0038"===v&&"end"===h&&i());case"01":return void(o=p);case"02":return n=parseInt(v,16),void i();case"33":return void("40000012"!==p&&"40000010"!==p||i())}if(void 0!==n&&parseInt(v,16)===n){var w=parseInt(h,16);if(!(w<=8||m===t&&w===e)){Date.now()-Date.parse(t)>12e4&&i(),t=m,e=w;var g=r%256+1;r=g,c.a.unstable_batchedUpdates(function(){a(function(n){return n.concat({action:w,key:g})}),d(function(n){return n[0]||(n[0]={name:o,rotation:[]}),n[0].rotation.push(w),n})}),setTimeout(function(){a(function(n){return n.slice(1)})},1e4)}}}});return function(){i()}},[]),o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"container"},o.a.createElement("div",{className:"actions"},e.map(function(n){var t=n.action,e=n.key;return o.a.createElement(h,{key:e,actionId:t,additionalClasses:"action-move"})})),s.map(function(n,t){return o.a.createElement(w,{key:t,encounterId:t,name:n.name,actionList:n.rotation})})))},null),document.getElementById("root"))}],[[7,1,2]]]);
//# sourceMappingURL=main.ad1aebd8.chunk.js.map