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.
8 lines
233 KiB
8 lines
233 KiB
|
4 weeks ago
|
/**
|
||
|
|
* hirtc-web v1.0.4.2024042434
|
||
|
|
* build date: 2024/04/24
|
||
|
|
* @JuHaoKan Hisense
|
||
|
|
*/
|
||
|
|
|
||
|
|
function e(t,r){const o=P();return(e=function(e,t){return o[e-=172]})(t,r)}const t=e;!function(t,r){const o=e,n=P();for(;;)try{if(642255===parseInt(o(910))/1*(parseInt(o(273))/2)+-parseInt(o(779))/3*(parseInt(o(1364))/4)+parseInt(o(1428))/5+parseInt(o(196))/6+-parseInt(o(402))/7*(-parseInt(o(1733))/8)+-parseInt(o(1285))/9+-parseInt(o(1683))/10*(parseInt(o(1434))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}();const r=t(1309);function o({url:r="",method:o=t(1287),headers:n,params:i,data:s,timeout:a=5e3,withCredentials:c=!1,responseType:u=t(802),contentType:d,widthRequest:l}){return new Promise(((t,p)=>{const f=e,m={"Content-Type":f(1454),Accept:f(1375)};let b=s;const v={...m,...n||{}};d&&(v[f(1839)]=d),o=o.toUpperCase();let y=new XMLHttpRequest;function h(){const e=f;if(!y)return;const r=e(1416)in y?y.getAllResponseHeaders():{},o=u&&u!==e(1831)&&u!==e(802)?y.response:y[e(1315)];if(y[e(313)]>=200&&y[e(313)]<300||304===y[e(313)]){let r=u===e(802)&&o?JSON.parse(o):o;t(l?{request:y,data:r}:r)}else y.responseHeaders=r,y[e(649)]=o,p(y);y=null}if(i&&i instanceof Object&&(r=r+"?"+Object.keys(i)[f(893)]((e=>e+"="+i[e]))[f(656)]("&")),y.open(o,r,!0),y[f(972)]=a,f(237)in y?y[f(237)]=h:y[f(1405)]=function(){const e=f;y&&4===y[e(1168)]&&(0!==y[e(313)]||y[e(905)]&&0===y[e(905)][e(199)](e(1121)))&&setTimeout(h)},y[f(1187)]=function(){y&&(p(new Error("Request aborted",config)),y=null)},y.onerror=function(e){p(new Error(f(1606))),y=null},y[f(1156)]=function(){const e=f;let t=a?e(1821)+a+"ms exceeded":e(1798);p(new Error(t)),y=null},f(1005)in y&&Object[f(703)](v)[f(1505)]((e=>{y[f(1005)](e,v[e])})),c&&(y.withCredentials=!!c),u&&u!==f(802)&&(y[f(1635)]=u),!b&&!1!==b&&0!==b&&""!==b&&(b=null),[f(1261)].includes(o)&&v["Content-Type"]===m[f(1839)]&&"object"==typeof b){let e="";Object[f(703)](b)[f(1505)]((t=>{e+="&"+t+"="+b[t]})),b=e[f(1515)](1)}y.send(b)}))}const n={DOT:t(1680),COMMON:t(1302),ERR:"error"},i=t(1780);let s=!0,a=!1,c=[],u=null;const d=(m=t(1644),{setItem(t,r){const o=e;typeof r===o(1102)&&(r=JSON[o(1014)](r)),window[m][o(1263)](t,r)},getItem(t,r=!1){const o=e;let n=window[m][o(1247)](t);if(r)try{n=JSON.parse(n)}catch(e){console[o(605)](e),n=null}return n},removeItem(t){const r=e;window[m][r(965)](t)}}),l=(e,r,o=n[t(445)])=>{const i=t;return u&&u[i(781)]?e({url:f(o,u),method:i(1481),sign:!1,data:{json:JSON.stringify(r)},timeout:1e3}):Promise.reject(new Error("No log strategy"))},p=(e,r)=>{const o=t;e?a=!0:(a=!1,c.length>0&&(c[o(1505)]((e=>{e(r)})),c=[]))},f=(e,r)=>{const o=t;switch(e){case n.DOT:return r[o(1086)];case n.ERR:return r[o(423)];default:return r[o(781)]}};var m,b={init:e=>{const{publicCloud:t}=e;!u&&(u=d.getItem("HIRTC_WEB_STRATEGY",!0)||null),u&&u[i]!==t&&(d.removeItem("HIRTC_WEB_STRATEGY"),u=null),s=t},report:(r,o,n)=>new Promise((f=>{a?c.push((t=>{const i=e;t?f():l(r,o,n)[i(515)](f)[i(432)](f)})):u?l(r,o,n).then(f).catch(f):(p(!0),((e,r)=>{const o=t;e({url:s?"https://api-gps.hismarttv.com/log/get_js_strategy":"https://api-gps-julinker.hisense.com/log/get_js_strategy",method:"get",timeout:1e3,sign:!1,params:{policySeq:Math[o(1221)](Date[o(931)]()/1e3),appKey:1192554437,version:"1.0",reportTag:0,receiveTag:2}})[o(515)]((e=>{const t=o;e[t(781)]&&(u=e,u[i]=s,d[t(1263)]("HIRTC_WEB_STRATEGY",u)),p(!1),r()}))[o(432)]((e=>{p(!1,e),r(e)}))})(r,(t=>{const i=e;t?f():l(r,o,n)[i(515)](f).catch(f)})))})),LOG_TYPE:n};const v=function(){const e=t;let r=new Date;return r[e(1815)]()+"/"+(r[e(1200)]()+1)+"/"+r[e(258)]()+" "+r[e(1493)]()+":"+r.getMinutes()+":"+r[e(729)]()+"."+r[e(401)]()},y=function(e,r){const o=t;return Math[o(1221)](Math[o(1403)]()*(r-e+1))+e},h=function(e=10){const t=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];let r="";for(let o=0;o<e;o++)r+=t[y(0,61)];return r},g=function(e=0,r=0,o=0,n=1){return 0===o?0:Math[t(1221)](n*(e-r)/o)||0},w=function(e=""){const r=t;return e?e[0].toUpperCase()+e[r(759)](1):e},
|