Split 2020 and 2024 packages due to Avionics framework package

This commit is contained in:
Kilian committed 2025-02-22 02:49:51 +01:00
1 parent 7112433747
commit 2604fbb75d
113 files changed
+6147 -151

No files matched your search

@@ -0,0 +1,189 @@
const j6_0xca47fd = (function () {
let _0x29bb3f = !![];
return function (_0x1eef08, _0x3f53d2) {
const _0x1fc5ed = _0x29bb3f
? function () {
if (_0x3f53d2) {
const _0x45f38f = _0x3f53d2['apply'](_0x1eef08, arguments);
return (_0x3f53d2 = null), _0x45f38f;
}
}
: function () {};
return (_0x29bb3f = ![]), _0x1fc5ed;
};
})(),
j6_0x14eaec = j6_0xca47fd(this, function () {
const _0x1c40d9 = function () {
let _0x41ef43;
try {
_0x41ef43 = Function(
'retur' +
'n\x20(fu' +
'nctio' +
'n()\x20' +
('{}.co' + 'nstru' + 'ctor(' + '\x22retu' + 'rn\x20th' + 'is\x22)(' + '\x20)') +
');'
)();
} catch (_0x5064d1) {
_0x41ef43 = window;
}
return _0x41ef43;
},
_0xa6d217 = _0x1c40d9(),
_0x28f1fd = (_0xa6d217['conso' + 'le'] = _0xa6d217['conso' + 'le'] || {}),
_0x427c5e = ['log', 'warn', 'info', 'error', 'excep' + 'tion', 'table', 'trace'];
for (let _0x5a262e = 0x0; _0x5a262e < _0x427c5e['lengt' + 'h']; _0x5a262e++) {
const _0x361466 = j6_0xca47fd['const' + 'ructo' + 'r']['proto' + 'type']['bind'](j6_0xca47fd),
_0x462cef = _0x427c5e[_0x5a262e],
_0x195676 = _0x28f1fd[_0x462cef] || _0x361466;
(_0x361466['__pro' + 'to__'] = j6_0xca47fd['bind'](j6_0xca47fd)),
(_0x361466['toStr' + 'ing'] = _0x195676['toStr' + 'ing']['bind'](_0x195676)),
(_0x28f1fd[_0x462cef] = _0x361466);
}
});
j6_0x14eaec();
class EFBUtils {
static ['setSe' + 'ating' + 'Posit' + 'ion'](_0x183760) {
SimVar['SetSi' + 'mVarV' + 'alue']('A:CAMERA STATE', 'Number', 0x2),
SimVar['SetSi' + 'mVarV' + 'alue']('A:CAMERA SUBSTATE', 'Number', 0x1),
SimVar['SetSi' + 'mVarV' + 'alue']('A:CAMERA REQUEST ACTION', 'Number', 0x1),
_0x183760
? setTimeout(() => {
SimVar['SetSi' + 'mVarV' + 'alue']('A:CAMERA VIEW TYPE AND INDEX:1', 'Number', 0x4);
}, 0x1f4)
: setTimeout(() => {
SimVar['SetSi' + 'mVarV' + 'alue']('A:CAMERA VIEW TYPE AND INDEX:1', 'Number', 0x1);
}, 0x1f4),
SimVar['SetSi' + 'mVarV' + 'alue']('L:FSS_B727_EFB_SEATING_POSITION', 'Bool', _0x183760);
}
static ['impor' + 'tFlig' + 'htPla' + 'n'](_0xc32463) {
const _0x382d2b =
'https' +
'://ww' +
'w.sim' +
'brief' +
'.com/' +
'api/x' +
'ml.fe' +
'tcher' +
'.php?' +
'usern' +
'ame=' +
_0xc32463;
return fetch(_0x382d2b)
['then']((_0x2cc7e3) => {
return _0x2cc7e3['text']();
})
['then']((_0x26b60a) => {
const _0x58169d = new DOMParser(),
_0x7997e1 = _0x58169d['parse' + 'FromS' + 'tring'](_0x26b60a, 'text/xml');
let _0x21dfa5 = {};
const _0x300c26 = _0x7997e1['query' + 'Selec' + 'tor']('fetch > status');
_0x300c26 && (_0x21dfa5['statu' + 's'] = _0x300c26['inner' + 'HTML']);
const _0x202d4b = _0x7997e1['query' + 'Selec' + 'tor']('params > units');
_0x202d4b && (_0x21dfa5['units'] = _0x202d4b['inner' + 'HTML']);
const _0x2b5b6f = _0x7997e1['query' + 'Selec' + 'tor']('origin > icao_code');
_0x2b5b6f && (_0x21dfa5['origi' + 'n'] = _0x2b5b6f['inner' + 'HTML']);
const _0x37322c = _0x7997e1['query' + 'Selec' + 'tor']('destination > icao_code');
_0x37322c && (_0x21dfa5['desti' + 'natio' + 'n'] = _0x37322c['inner' + 'HTML']);
const _0x4f66aa = _0x7997e1['query' + 'Selec' + 'tor']('aircraft > icaocode');
_0x4f66aa && (_0x21dfa5['aircr' + 'aft'] = _0x4f66aa['inner' + 'HTML']);
const _0x3e15f6 = _0x7997e1['query' + 'Selec' + 'tor']('fuel > plan_ramp');
_0x3e15f6 && (_0x21dfa5['fuel'] = parseFloat(_0x3e15f6['inner' + 'HTML']));
const _0x53c20f = _0x7997e1['query' + 'Selec' + 'tor']('weights > payload');
/* KHOFMANN START */
// This is only to allow the new gauges to auto fetch the plan
SimVar.SetSimVarValue('L:KH_FE_FPLAN_NEW_DATA', 'bool', 1);
/* KHOFMANN END */
return _0x53c20f && (_0x21dfa5['paylo' + 'ad'] = parseFloat(_0x53c20f['inner' + 'HTML'])), _0x21dfa5;
});
}
static ['meter' + 'ToFee' + 't'](_0x945b59) {
return _0x945b59 * 3.28084;
}
static ['feetT' + 'oMete' + 'r'](_0x433b0d) {
return _0x433b0d * 0.3048;
}
static ['feetT' + 'oNaut' + 'icalM' + 'ile'](_0x51576c) {
return _0x51576c * 0.000164579;
}
static ['lbsTo' + 'Kg'](_0x2d9367) {
return _0x2d9367 * 0.453592;
}
static ['gtn75' + '0Inst' + 'alled']() {
return !!SimVar['GetSi' + 'mVarV' + 'alueF' + 'ast']('L:PMS50_GTN750_INSTALLED', 'Bool');
}
static ['gtnxi' + 'Insta' + 'lled']() {
return !!SimVar['GetSi' + 'mVarV' + 'alueF' + 'ast']('L:TDSGTNXI_INSTALLED', 'Bool');
}
static ['diffA' + 'ndSet' + 'Value'](_0x2e7fbe, _0xaeb6de) {
_0x2e7fbe['value'] != _0xaeb6de && (_0x2e7fbe['value'] = _0xaeb6de);
}
static ['diffA' + 'ndAdd' + 'Attri' + 'bute'](_0x2a092d, _0x29db47, _0x56d461) {
const _0x47c464 = !!_0x2a092d['getAt' + 'tribu' + 'te'](_0x29db47);
_0x56d461
? !_0x47c464 && _0x2a092d['setAt' + 'tribu' + 'te'](_0x29db47, !![])
: _0x47c464 && _0x2a092d['remov' + 'eAttr' + 'ibute'](_0x29db47);
}
static ['genSh' + 'uffle' + 'dArra' + 'y'](_0x493b5a) {
return Array['from'](Array(_0x493b5a)['keys']())['sort'](() => Math['rando' + 'm']() - 0.5);
}
static ['setIn' + 'putOn' + 'Chang' + 'e'](_0x344d78, _0x4988f3) {
(_0x344d78['onkey' + 'press'] = (_0xb39586) => {
const _0x252e2b = _0xb39586['which'];
_0x252e2b === 0xd && _0xb39586['srcEl' + 'ement']['blur']();
}),
(_0x344d78['onblu' + 'r'] = (_0x27045f) => {
_0x4988f3(_0x27045f['srcEl' + 'ement']);
});
}
static ['setWi' + 'ndInp' + 'ut'](_0x1d7d59, _0x3174de) {
EFBUtils['setIn' + 'putOn' + 'Chang' + 'e'](_0x1d7d59, (_0x2632cd) => {
let _0xe0907b = 0x0,
_0x46f45b = 0x0;
if (_0x2632cd['value']) {
const _0xc0d1bd = _0x2632cd['value']['split']('/');
if (_0xc0d1bd['lengt' + 'h'] > 0x1)
(_0xe0907b = parseInt(_0xc0d1bd[0x0])),
(_0x46f45b = parseInt(_0xc0d1bd[0x1])),
isNaN(_0xe0907b) && (_0xe0907b = 0x0),
isNaN(_0x46f45b) && (_0x46f45b = 0x0);
else
_0xc0d1bd['lengt' + 'h'] > 0x0 &&
((_0xe0907b = parseInt(_0xc0d1bd[0x0])), isNaN(_0xe0907b) && (_0xe0907b = 0x0));
}
(_0xe0907b = Math['max'](Math['min'](_0xe0907b, 0x168), 0x0)),
(_0x46f45b = Math['max'](Math['min'](_0x46f45b, 0x63), 0x0)),
(_0x2632cd['value'] =
_0xe0907b['toStr' + 'ing']()['padSt' + 'art'](0x3, '0') +
'/' +
_0x46f45b['toStr' + 'ing']()['padSt' + 'art'](0x2, '0')),
_0x3174de({ dir: _0xe0907b, speed: _0x46f45b });
});
}
static ['setQN' + 'HInpu' + 't'](_0x303325, _0x509c84) {
EFBUtils['setIn' + 'putOn' + 'Chang' + 'e'](_0x303325, (_0xc37bc3) => {
let _0x338a95 = 0x0;
_0xc37bc3['value'] && ((_0x338a95 = parseFloat(_0xc37bc3['value'])), isNaN(_0x338a95) && (_0x338a95 = 0x0)),
(_0xc37bc3['value'] = _0x338a95['toFix' + 'ed'](0x2)),
_0x509c84(_0x338a95);
});
}
static ['setTe' + 'mpInp' + 'ut'](_0x3f84c5, _0x5692e2) {
EFBUtils['setIn' + 'putOn' + 'Chang' + 'e'](_0x3f84c5, (_0x506059) => {
let _0x40003b = 0x0;
_0x506059['value'] && ((_0x40003b = parseInt(_0x506059['value'])), isNaN(_0x40003b) && (_0x40003b = 0x0)),
(_0x506059['value'] = _0x40003b),
_0x5692e2({ tempF: _0x40003b, tempC: EFBUtils['fahre' + 'nheit' + 'ToCel' + 'cius'](_0x40003b) });
});
}
static ['fahre' + 'nheit' + 'ToCel' + 'cius'](_0x5a890b) {
return (_0x5a890b - 0x20) * (0x5 / 0x9);
}
static ['isOSR']() {
const _0x4e6689 = SimVar['GetSi' + 'mVarV' + 'alue']('A:TITLE', 'String');
return _0x4e6689['toLow' + 'erCas' + 'e']()['inclu' + 'des']('oil spill response');
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

@@ -0,0 +1 @@
#KH_CTRL{align-items:center;display:flex;height:80px;justify-content:space-around}#KH_CTRL .button{border:1px solid #000;border-radius:5px;padding-left:7px;padding-right:7px}#KH_CTRL .button .icon{margin-top:6px;width:30px}#KH_CTRL .button:hover:not([disabled]){background-color:var(--buttonHoverColor)}#KH_CTRL .button.d180{transform:rotate(180deg)}#KH_CTRL .button.d90{transform:rotate(90deg)}@font-face{font-family:Consolas;font-style:normal;font-weight:100;src:url(assets/fonts/Consolas.ttf) format("truetype")}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#d3d3d3}::-webkit-scrollbar-thumb{background:gray;height:200px}::-webkit-scrollbar-thumb:hover{background:#a9a9a9}#root{--buttonHoverColor:#d3d3d3;--fss-select-hover:#d3d3d3;background-image:url(../EFB/Images/bg.png);background-size:100% 100%;color:#000;font-size:25px;height:100%;padding:3vw;width:594px}#root #KH_FE_FPLAN{height:calc(100vh - 6vw - 180px);margin-bottom:3vw;margin-top:100px;overflow-x:hidden;overflow-y:scroll;width:100%}#root #KH_FE_FPLAN #OFP div,#root #KH_FE_FPLAN #TLR div{font-size:unset!important;line-height:unset!important}#root #KH_FE_FPLAN #OFP pre,#root #KH_FE_FPLAN #TLR pre{font-family:Consolas!important;font-size:13px;line-height:14px;white-space:pre}#root #KH_FE_FPLAN #OFP img{width:100%}#root #KH_FE_FPLAN.p2{height:calc(100vh - 6vw - 240px);margin-top:160px}
@@ -0,0 +1,7 @@
<link rel="stylesheet" href="index.css" />
<script type="text/html" import-script="/Pages/VCockpit/Instruments/FSS_B727/KH_FE_FPLAN/index.js"></script>
<script type="text/html" import-script="/JS/dataStorage.js"></script>
<script type="text/html" id="kh-fe-fplan">
<div id="root"></div>
</script>
@@ -0,0 +1 @@
class t{get isAlive(){return this._isAlive}get isPaused(){return this._isPaused}constructor(t,e,s){this.handler=t,this.initialNotifyFunc=e,this.onDestroy=s,this._isAlive=!0,this._isPaused=!1,this.canInitialNotify=void 0!==e}initialNotify(){if(!this._isAlive)throw new Error("HandlerSubscription: cannot notify a dead Subscription.");this.initialNotifyFunc&&this.initialNotifyFunc(this)}pause(){if(!this._isAlive)throw new Error("Subscription: cannot pause a dead Subscription.");return this._isPaused=!0,this}resume(t=!1){if(!this._isAlive)throw new Error("Subscription: cannot resume a dead Subscription.");return this._isPaused?(this._isPaused=!1,t&&this.initialNotify(),this):this}destroy(){this._isAlive&&(this._isAlive=!1,this.onDestroy&&this.onDestroy(this))}}class e{constructor(t,e={},s){this.subscribe=t,this.state=e,this.currentHandler=s,this.isConsumer=!0,this.activeSubs=new Map}handle(t,e=!1){let i;i=void 0!==this.currentHandler?e=>{this.currentHandler(e,this.state,t)}:t;let n=this.activeSubs.get(t);n||(n=[],this.activeSubs.set(t,n));const r=new s(this.subscribe(i,e),(e=>{const s=this.activeSubs.get(t);s&&(s.splice(s.indexOf(e),1),0===s.length&&this.activeSubs.delete(t))}));return r.isAlive?n.push(r):0===n.length&&this.activeSubs.delete(t),r}off(t){var e;const s=this.activeSubs.get(t);s&&(null===(e=s.shift())||void 0===e||e.destroy(),0===s.length&&this.activeSubs.delete(t))}atFrequency(t,s=!0){const i={previousTime:Date.now(),firstRun:s};return new e(this.subscribe,i,this.getAtFrequencyHandler(t))}getAtFrequencyHandler(t){const e=1e3/t;return(t,s,i)=>{const n=Date.now(),r=n-s.previousTime;if(e<=r||s.firstRun){for(;s.previousTime+e<n;)s.previousTime+=e;s.firstRun&&(s.firstRun=!1),this.with(t,i)}}}withPrecision(t){return new e(this.subscribe,{lastValue:0,hasLastValue:!1},this.getWithPrecisionHandler(t))}getWithPrecisionHandler(t){return(e,s,i)=>{const n=e,r=Math.pow(10,t),a=Math.round(n*r)/r;s.hasLastValue&&a===s.lastValue||(s.hasLastValue=!0,s.lastValue=a,this.with(a,i))}}whenChangedBy(t){return new e(this.subscribe,{lastValue:0,hasLastValue:!1},this.getWhenChangedByHandler(t))}getWhenChangedByHandler(t){return(e,s,i)=>{const n=e,r=Math.abs(n-s.lastValue);(!s.hasLastValue||r>=t)&&(s.hasLastValue=!0,s.lastValue=n,this.with(e,i))}}whenChanged(){return new e(this.subscribe,{lastValue:"",hasLastValue:!1},this.getWhenChangedHandler())}getWhenChangedHandler(){return(t,e,s)=>{e.hasLastValue&&e.lastValue===t||(e.hasLastValue=!0,e.lastValue=t,this.with(t,s))}}onlyAfter(t){return new e(this.subscribe,{previousTime:Date.now()},this.getOnlyAfterHandler(t))}getOnlyAfterHandler(t){return(e,s,i)=>{Date.now()-s.previousTime>t&&(s.previousTime+=t,this.with(e,i))}}with(t,e){void 0!==this.currentHandler?this.currentHandler(t,this.state,e):e(t)}}class s{get isAlive(){return this.sub.isAlive}get isPaused(){return this.sub.isPaused}get canInitialNotify(){return this.sub.canInitialNotify}constructor(t,e){this.sub=t,this.onDestroy=e}pause(){return this.sub.pause(),this}resume(t=!1){return this.sub.resume(t),this}destroy(){this.sub.destroy(),this.onDestroy(this)}}class i{constructor(t){this.bus=t}on(t){return new e(((e,s)=>this.bus.on(t,e,s)))}}class n{constructor(t=!1,e=!0){this._topicSubsMap=new Map,this._wildcardSubs=new Array,this._notifyDepthMap=new Map,this._wildcardNotifyDepth=0,this._eventCache=new Map,this.onWildcardSubDestroyedFunc=this.onWildcardSubDestroyed.bind(this),this._busId=Math.floor(2147483647*Math.random());const s="undefined"==typeof RegisterGenericDataListener?o:c;this._busSync=new s(this.pub.bind(this),this._busId),!0===e&&(this.syncEvent("event_bus","resync_request",!1),this.on("event_bus",(t=>{"resync_request"==t&&this.resyncEvents()})))}on(e,s,i=!1){let n=this._topicSubsMap.get(e);void 0===n&&(this._topicSubsMap.set(e,n=[]),this.pub("event_bus_topic_first_sub",e,!1,!1));const r=new t(s,(t=>{const s=this._eventCache.get(e);void 0!==s&&t.handler(s.data)}),(t=>{var s;if(0===(null!==(s=this._notifyDepthMap.get(e))&&void 0!==s?s:0)){const s=this._topicSubsMap.get(e);s&&s.splice(s.indexOf(t),1)}}));return n.push(r),i?r.pause():r.initialNotify(),r}off(t,e){const s=this._topicSubsMap.get(t),i=null==s?void 0:s.find((t=>t.handler===e));null==i||i.destroy()}onAll(e){const s=new t(e,void 0,this.onWildcardSubDestroyedFunc);return this._wildcardSubs.push(s),s}offAll(t){const e=this._wildcardSubs.find((e=>e.handler===t));null==e||e.destroy()}pub(t,e,s=!1,i=!0){var n;i&&this._eventCache.set(t,{data:e,synced:s});const r=this._topicSubsMap.get(t);if(void 0!==r){let a=!1;const o=null!==(n=this._notifyDepthMap.get(t))&&void 0!==n?n:0;this._notifyDepthMap.set(t,o+1);const c=r.length;for(let n=0;n<c;n++)try{const t=r[n];t.isAlive&&!t.isPaused&&t.handler(e),a||(a=!t.isAlive)}catch(n){console.error(`EventBus: error in handler: ${n}. topic: ${t}. data: ${e}. sync: ${s}. isCached: ${i}`,{error:n,topic:t,data:e,sync:s,isCached:i,subs:r}),n instanceof Error&&console.error(n.stack)}if(this._notifyDepthMap.set(t,o),a&&0===o){const e=rLine truncated