1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1357],{27213:function(t,e){!function(t){"function"!==typeof Array.isArray&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0,n=this.length;e<n;e++)if(this[e]===t)return e;return-1});var e=t.EventEmitter=function(){},n=Array.isArray;e.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||n(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);e.apply(this,r)}return!0}if(n(e)){r=Array.prototype.slice.call(arguments,1);for(var i=e.slice(),o=0,s=i.length;o<s;o++)i[o].apply(this,r);return!0}return!1},e.prototype.addListener=function(t,e){if("function"!==typeof e)throw new Error("addListener only takes instances of Function");return this._events||(this._events={}),this.emit("newListener",t,e),this._events[t]?n(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(t,e){var n=this;n.on(t,(function r(){n.removeListener(t,r),e.apply(this,arguments)}))},e.prototype.removeListener=function(t,e){if("function"!==typeof e)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var r=this._events[t];if(n(r)){var i=r.indexOf(e);if(i<0)return this;r.splice(i,1),0==r.length&&delete this._events[t]}else this._events[t]===e&&delete this._events[t];return this},e.prototype.removeAllListeners=function(t){return t&&this._events&&this._events[t]&&(this._events[t]=null),this},e.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),n(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}}(e)},99559:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/wap/stock/hisPrice",function(){return n(5725)}])},18875:function(t,e,n){"use strict";n(85893)},63795:function(t,e,n){"use strict";var r=n(7297),i=n(85893),o=(n(67294),n(58202));function s(){var t=(0,r.Z)(["\n.ant-table {\n max-width: 100% !important;\n margin: 0 auto;\n font-size: 0.33rem\n}\n.ant-table-thead > tr > th {\n background-color: #CA1211 !important; /* \u8bbe\u7f6e\u8868\u5934\u80cc\u666f\u8272 */\n color: white !important; /* \u8bbe\u7f6e\u8868\u5934\u6587\u5b57\u989c\u8272 */\n}\n.odd-row {\n background-color: #FFF; /* \u5947\u6570\u884c\u80cc\u666f\u989c\u8272 */\n}\n.even-row {\n background-color: #F8F9FB; /* \u5076\u6570\u884c\u80cc\u666f\u989c\u8272 */\n}\n.ant-pagination {\n width: 100%;\n margin: 0.66rem auto;\n}\n.red-row{\n color: #CA1211;\n font-family: PingFangSC, PingFang SC;\n font-weight: 600;\n font-size: 14px;\n}\n\n"]);return s=function(){return t},t}var a=(0,n(47411).ZP)(o.Z)(s());e.Z=function(t){var e=t.dataSource,n=t.columns,r=t.pagination,o=t.onChange,s=t.highlightedColumn;return(0,i.jsx)("div",{style:{padding:"20px 0px"},children:(0,i.jsx)(a,{dataSource:e,columns:n,pagination:r,rowClassName:function(t,e){return function(t,e,n){var r=e%2===0?"even-row":"odd-row";return n==e?r+" red-row":r}(0,e,s)},onChange:o})})}},5725:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return _},default:function(){return w}});var r=n(47568),i=n(29815),o=n(70655),s=n(85893),a=n(87244),c=n.n(a),u=(n(18875),n(33424)),l=n(29806),f=n(63795),h=n(67421),d=n(67294),p=n(89812),v=n(12608),y=n(15304),g=n(96486),m=n(86867),_=(("function"===typeof window.WebSocket?n(27568):{}).ws,!0);function w(){var t=(0,d.useState)({}),e=t[0],n=t[1],a=(0,h.$G)("common").i18n,_=(0,d.useState)({}),w=_[0],S=_[1],x=(0,d.useState)([]),b=(x[0],x[1],(0,d.useState)(null)),F=b[0],k=b[1],P=(0,d.useState)(null),E=P[0],C=P[1],j=(0,d.useState)(1),A=j[0],O=j[1],Z=(0,d.useState)(0),L=Z[0],I=Z[1],N=(0,d.useState)([{title:"",dataIndex:"date",key:"date"},{title:"",dataIndex:"open",key:"open"},{title:"",dataIndex:"close",key:"close"},{title:"",dataIndex:"high",key:"high"},{title:"",dataIndex:"low",key:"low"}
1]),H=N[0],T=N[1],D=(0,d.useRef)(null),B=[{code:"Stock Quote and Chart",name:"",url:"/stock/quoteChart.html",id:0},{code:"Historical Stock Price",name:"",url:"/stock/hisPrice.html",id:1}];(0,d.useEffect)((function(){1!=window.sessionStorage.getItem("toTrack")&&(0,m.kt)("enter_ir_wap",{page_title:"Historical Stock Price"}),window.sessionStorage.setItem("toTrack",0)}),[]),(0,d.useEffect)((function(){n(a.getResourceBundle(a.language,"common")),S((0,p.Fg)("Stock Information",B,null===e||void 0===e?void 0:e.nav));var t=(0,p.VQ)(H,"Historical Stock Price",e);t.map((function(t){"date"==t.key&&(t.render=function(t){return(0,s.jsx)("div",{children:(0,p.ir)(1e3*t)})}),"amount"==t.key&&(t.render=function(t){return(0,s.jsx)("div",{children:(0,p.Ac)(Math.round(t),null,!0,2,!1)})})})),console.log("\u6253\u5370\u6570\u636e====temp",t),T(t),R()}),[e]),(0,d.useEffect)((function(){var t=[];null===F||void 0===F||F.map((function(e){t.push([(0,p.ir)(1e3*e.date),e.close,(0,p.Ac)(Math.round(e.volume),null,!0,2,!1)])})),F&&C((0,i.Z)(F).reverse()),console.log("\u6253\u5370\u6570\u636e===",t);var n=y.S1(D.current),r={tooltip:{trigger:"axis",axisPointer:{type:"line",lineStyle:{type:"dashed",color:"#B2B2B2",width:1}},formatter:function(t){var n=t[0].data[0],r=t[0].data[1],i=t[0].data[2];return o(n),"\n <div style='color:#666;'>".concat(n,"<div>\n <div style='color: #1F1F1F'>\n <div style='margin: 0.26rem 0; color:#666;width:120px;text-align:left;font-weight: 400;font-family: PingFangSC, PingFang SC;'>").concat(e&&e["Historical Stock Price"].price,"</span>\n <div style='margin: 0.1rem 0; color: #1F1F1F; width:120px;text-align:left;font-weight: 400;font-family: PingFangSC, PingFang SC;'>").concat(r," HKD</span>\n </div>\n <div style='color: #1F1F1F'>\n <div style='margin: 0.1rem 0; color:#666;display:inline-block;width:120px;text-align:left;font-weight: 400;font-family: PingFangSC, PingFang SC;'>").concat(e&&e["Historical Stock Price"].volume,"</div>\n <div style='margin: 0.1rem 0; color: #1F1F1F;width:80px;text-align:left;font-weight: 400;font-family: PingFangSC, PingFang SC;'>").concat(i,"</div>\n </div>\n ")}},xAxis:{type:"time",axisLine:{show:!0,lineStyle:{color:"#D8D8D8",width:1}},axisLabel:{color:"#666666",fontSize:12,formatter:function(t){return(0,p.ir)(t,!0)},rotate:45,interval:1}},yAxis:{type:"value",splitLine:{show:!0,lineStyle:{color:"#E6E6E6",width:1,type:"dashed"}},axisLabel:{color:"#666666",fontSize:12,formatter:function(t){return t.toFixed(2)},interval:1}},grid:{top:30,left:60,right:20,height:240},series:[{type:"line",symbol:"none",itemStyle:{color:"#FF5E5C"},areaStyle:{color:new y.Q.o(0,0,0,1,[{offset:0,color:"#FF5E5C"},{offset:.3,color:"#FEE8E8"},{offset:1,color:"#FEFDFD"}])},data:t}]},o=(0,g.debounce)((function(t){var e=null===E||void 0===E?void 0:E.findIndex((function(e){return(0,p.ir)(1e3*e.date)===t}));if(-1!==e){var n=Math.floor(e/10)+1;I(e%10),O(n)}}),100);return n.setOption(r),function(){n.dispose()}}),[F]);var R=function(){var t=(0,r.Z)((function(){var t,e,n,r;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return t={endtime:2524579200,inst:"09636",limit:-1200,market:"HKSE",servicetype:"KLINEB",starttime:0,resptype:"JSON",period:"DAY"},[4,(0,v.p)(t)];case 1:return e=i.sent(),n=e.KlineData[e.KlineData.length-1],(0,p.zk)(n.Time)&&e.KlineData.pop(),r=[],e.KlineData.map((function(t){r.push({date:t.Time,open:t.Open.toFixed(3),close:t.Close.toFixed(3),high:t.High.toFixed(3),low:t.Low.toFixed(3),amount:t.Volume,volume:t.Volume})})),console.log("\u6253\u5370\u6570\u636e====res",e),k(r),[2]}}))}));return function(){return t.apply(this,arguments)}}();return(0,s.jsxs)("div",{className:c()["hisPrice-wrap"],children:[(0,s.jsx)(u.Z,{navId:"5",subId:"5-1",switchHeight:300,curTitle:w.curTitle,curCode:"Historical Stock Price",btnList:w.btnList,active:1,lan:null===e||void 0===e?void 0:e.lan}
1),(0,s.jsxs)("div",{className:c()["qt-box"],children:[(0,s.jsx)("div",{className:c().chart,ref:D}),(0,s.jsxs)("div",{className:c()["qt-c"],children:[(0,s.jsx)("div",{className:c().desc,children:e&&e["Historical Stock Price"]&&e["Historical Stock Price"].desc}),(0,s.jsx)(f.Z,{columns:H,dataSource:E,pagination:{pageSize:10,showSizeChanger:!1,current:A,position:["bottomLeft"],onChange:function(t){O(t)}},highlightedColumn:L})]})]}),(0,s.jsx)(l.Z,{})]})}},87244:function(t){t.exports={"hisPrice-wrap":"hisPrice_hisPrice-wrap__43B6t","qt-box":"hisPrice_qt-box__9PvLo",chart:"hisPrice_chart__5rTps","qt-c":"hisPrice_qt-c__SNS4w",desc:"hisPrice_desc__IxebZ"}},4111:function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:function(){return r}})},51438:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{Z:function(){return r}})},52951:function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,{Z:function(){return i}})},60460:function(t,e,n){"use strict";function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}function i(t){return r(t)}n.d(e,{Z:function(){return a}});var o=n(4111);function s(t,e){return!e||"object"!==((n=e)&&n.constructor===Symbol?"symbol":typeof n)&&"function"!==typeof e?(0,o.Z)(t):e;var n}function a(t){var e=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(t){return!1}}();return function(){var n,r=i(t);if(e){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}},88029:function(t,e,n){"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function i(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}n.d(e,{Z:function(){return i}})},29815:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(20943);var i=n(13375);var o=n(91566);function s(t){return function(t){if(Array.isArray(t))return(0,r.Z)(t)}(t)||(0,i.Z)(t)||(0,o.Z)(t)||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(t){t.O(0,[3662,2532,5936,1033,8861,6713,8045,3095,8202,4037,4381,3526,165,9774,2888,179],(function(){return e=99559,t(t.s=e);var e}));var e=t.O();_N_E=e}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.