1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[959],{8878:(e,n,r)=>{Promise.resolve().then(r.t.bind(r,72988,23)),Promise.resolve().then(r.bind(r,2918)),Promise.resolve().then(r.bind(r,26629)),Promise.resolve().then(r.bind(r,34768)),Promise.resolve().then(r.bind(r,73082)),Promise.resolve().then(r.bind(r,26473)),Promise.resolve().then(r.bind(r,34962)),Promise.resolve().then(r.bind(r,57827)),Promise.resolve().then(r.bind(r,93801)),Promise.resolve().then(r.bind(r,96797)),Promise.resolve().then(r.bind(r,28528)),Promise.resolve().then(r.bind(r,32479)),Promise.resolve().then(r.bind(r,12778)),Promise.resolve().then(r.bind(r,58852)),Promise.resolve().then(r.bind(r,65359)),Promise.resolve().then(r.bind(r,85472)),Promise.resolve().then(r.bind(r,77301)),Promise.resolve().then(r.bind(r,11383)),Promise.resolve().then(r.bind(r,17679)),Promise.resolve().then(r.bind(r,39980)),Promise.resolve().then(r.bind(r,6443)),Promise.resolve().then(r.bind(r,32302)),Promise.resolve().then(r.bind(r,55096)),Promise.resolve().then(r.bind(r,50827)),Promise.resolve().then(r.bind(r,82348)),Promise.resolve().then(r.bind(r,46873)),Promise.resolve().then(r.bind(r,82987)),Promise.resolve().then(r.bind(r,45603)),Promise.resolve().then(r.bind(r,69636)),Promise.resolve().then(r.bind(r,93795)),Promise.resolve().then(r.bind(r,80526)),Promise.resolve().then(r.bind(r,35171)),Promise.resolve().then(r.bind(r,34425)),Promise.resolve().then(r.bind(r,79619)),Promise.resolve().then(r.bind(r,94894)),Promise.resolve().then(r.bind(r,22300)),Promise.resolve().then(r.bind(r,8723)),Promise.resolve().then(r.bind(r,55424)),Promise.resolve().then(r.bind(r,9738)),Promise.resolve().then(r.bind(r,92652)),Promise.resolve().then(r.bind(r,54153)),Promise.resolve().then(r.bind(r,89563)),Promise.resolve().then(r.bind(r,74043)),Promise.resolve().then(r.bind(r,77107)),Promise.resolve().then(r.bind(r,54620)),Promise.resolve().then(r.bind(r,80093)),Promise.resolve().then(r.bind(r,35782)),Promise.resolve().then(r.bind(r,93739)),Promise.resolve().then(r.bind(r,78302)),Promise.resolve().then(r.bind(r,82924)),Promise.resolve().then(r.bind(r,86683)),Promise.resolve().then(r.bind(r,37115)),Promise.resolve().then(r.bind(r,76243)),Promise.resolve().then(r.bind(r,73499)),Promise.resolve().then(r.bind(r,8910)),Promise.resolve().then(r.bind(r,91686)),Promise.resolve().then(r.bind(r,60616)),Promise.resolve().then(r.bind(r,10956)),Promise.resolve().then(r.bind(r,46325)),Promise.resolve().then(r.bind(r,2507)),Promise.resolve().then(r.bind(r,34981)),Promise.resolve().then(r.bind(r,24315)),Promise.resolve().then(r.bind(r,47361)),Promise.resolve().then(r.bind(r,67176)),Promise.resolve().then(r.bind(r,21447)),Promise.resolve().then(r.bind(r,81396)),Promise.resolve().then(r.bind(r,21167)),Promise.resolve().then(r.bind(r,62681)),Promise.resolve().then(r.bind(r,71286)),Promise.resolve().then(r.bind(r,9399)),Promise.resolve().then(r.bind(r,49407)),Promise.resolve().then(r.bind(r,93971)),Promise.resolve().then(r.bind(r,86225)),Promise.resolve().then(r.bind(r,52362)),Promise.resolve().then(r.bind(r,73961)),Promise.resolve().then(r.bind(r,82894)),Promise.resolve().then(r.bind(r,74447))},56356:e=>{e.exports={search:"search_search__3Eljg",input:"search_input__K0_ti","input-wrap":"search_input-wrap__hsY24","results-wrap":"search_results-wrap__s6YAZ",loading:"search_loading__AiYpv","loading-message":"search_loading-message__g8b0J","no-results":"search_no-results____gjX"}},72988:e=>{e.exports={search:"page_search___XhfF"}},73961:(e,n,r)=>{"use strict";r.d(n,{Search:()=>b});var t=r(50935),i=r(68183),o=r(33072),s=r(11936),l=r(50374),a=r(15930),d=r.n(a),h=r(64524),u=r(24831),c=r(64529),v=r(56356),m=r.n(v);let b=()=>{var e,n,r;let a=(0,l._)(),v=null!=(e=(0,h.useSearchParams)().get("query"))?e:void 0,b=(0,h.useRouter)(),[p,P]=(0,u.useState)(v),[f,g]=(0,u.useState)(!1),[_,y]=(0,u.useState)(),[x,j]=(0,u.useState)({page:1,publication:null!=(n=s._.publicationContext)?n:a.id,query:p,section:s._.publicationContext?s._.publicationIds.join(","):void 0}),[w,O]=(0,u.useState)(),A=(0,u.useCallback)(()=>{let e=null==p?void 0:p.trim();e&&b.push("/search/?query=".concat(encodeURIComponent(e)))},[p]),S=(0,u.useCallback)(e=>{""===e.currentTarget.value.trim()&&(b.push("/search/"),g(!1),y(void 0),j(void 0),O(void 0)),"Enter"===e.key&&A()},[A]);return(0,u.useEffect)(()=>
1{if(!(null==x?void 0:x.query))return;let e=!1;return(async()=>{g(!0),y(void 0);try{let{data:n,error:r}=await i.FH.articles.getAll({...x,excludeFields:["widgets","images","plain_text","blur"]});if(e)return;r?(O(void 0),y(r)):(O(n),y(void 0))}catch(n){e||(O(void 0),y({message:"Search failed",name:"RequestError"}))}finally{e||g(!1)}})(),()=>{e=!0}},[x]),(0,u.useEffect)(()=>{P(v),v?j(e=>{var n;return(null==e?void 0:e.query)===v?e:e?{...e,query:v}:{page:1,publication:null!=(n=s._.publicationContext)?n:a.id,query:v,section:s._.publicationContext?s._.publicationIds.join(","):void 0}}):(g(!1),y(void 0),j(void 0),O(void 0))},[v]),(0,t.jsxs)("div",{className:m().search,children:[(0,t.jsx)("div",{className:m().input,children:(0,t.jsxs)("div",{className:m()["input-wrap"],children:[(0,t.jsx)("input",{onChange:e=>{P(e.currentTarget.value)},onKeyUp:S,placeholder:"Search ".concat(null!=(r=a.name)?r:a.id),type:"text",value:null!=p?p:""}),(0,t.jsx)("a",{onClick:A,children:(0,t.jsx)(c.pn2,{})})]})}),(0,t.jsxs)("div",{className:d()(m()["results-wrap"],f?m().loading:void 0),children:[(0,t.jsx)("div",{className:m()["loading-message"],children:"Loading..."}),w&&!f?(0,t.jsx)(t.Fragment,{children:w.length>0?(0,t.jsx)(o.ArticleList,{articles:w,getArticlesArgs:x,includeAuthor:!0,includeSynopsis:!0}):(0,t.jsx)("div",{className:m()["no-results"],children:"no results"})}):void 0]})]})}},77496:(e,n,r)=>{"use strict";r.d(n,{A:()=>y});var t=r(24831),i=["second","minute","hour","day","week","month","year"],o=["ç§","åé","å°æ¶","天","å¨","个æ","å¹´"],s={},l=function(e,n){s[e]=n},a=function(e){return s[e]||s.en_US},d=[60,60,24,7,365/7/12,12];function h(e){return e instanceof Date?e:new Date(!isNaN(e)||/^\d+$/.test(e)?parseInt(e):e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"))}function u(e,n){for(var r=+(e<0),t=e=Math.abs(e),i=0;e>=d[i]&&i<d.length;i++)e/=d[i];return i*=2,(e=Math.floor(e))>(0===i?9:1)&&(i+=1),n(e,i,t)[r].replace("%s",e.toString())}function c(e,n){return((n?h(n):new Date)-h(e))/1e3}var v="timeago-id";function m(e){return parseInt(e.getAttribute(v))}var b={},p=function(e){clearTimeout(e),delete b[e]};function P(e){e?p(m(e)):Object.keys(b).forEach(p)}l("en_US",function(e,n){if(0===n)return["just now","right now"];var r=i[Math.floor(n/2)];return e>1&&(r+="s"),[e+" "+r+" ago","in "+e+" "+r]}),l("zh_CN",function(e,n){if(0===n)return["åå","çå»å"];var r=o[~~(n/2)];return[e+" "+r+"å",e+" "+r+"å"]});var f=function(){var e=function(n,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])})(n,r)};return function(n,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=n}e(n,r),n.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)}}(),g=function(){return(g=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)},_=function(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,t=Object.getOwnPropertySymbols(e);i<t.length;i++)0>n.indexOf(t[i])&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(r[t[i]]=e[t[i]]);return r};let y=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.dom=null,n}return f(n,e),n.prototype.componentDidMount=function(){this.renderTimeAgo()},n.prototype.componentDidUpdate=function(){this.renderTimeAgo()},n.prototype.renderTimeAgo=function(){var e,n=this.props,r=n.live,t=n.datetime,i=n.locale,o=n.opts;P(this.dom),!1!==r&&(this.dom.setAttribute("datetime",""+(t instanceof Date?t.getTime():t)),e=this.dom,(e.length?e:[e]).forEach(function(e){!function e(n,r,t,i){p(m(n));var o=i.relativeDate,s=i.minInterval,l=c(r,o);n.innerText=u(l,t);var a=setTimeout(function(){e(n,r,t,i)},Math.min(1e3*Math.max(function(e){for(var n=1,r=0,t=Math.abs(e);e>=d[r]&&r<d.length;r++)e/=d[r],n*=d[r];return t%=n,Math.ceil(t=t?n-t:n)}(l),s||1),0x7fffffff));b[a]=0,n.setAttribute(v,a)}(e,e.getAttribute("datetime"),a(i),o||{})}))},n.prototype.componentWillUnmount=function(){P(this.dom)},n.prototype.render=function(){var e=this,n=this.props,r=n.datetime,i=(n.live,n.locale),o=n.opts,s=_(n,["datetime","live","locale","opts"]);return t.createElement("time",g({ref:function(n){e.dom=n}},s),u(c(r,o&&o.relativeDate),a(i)))},n.defaultProps={live:!0,className:""},n}(t.PureComponent)},85845:e=>{!function(n,r){"use strict";var t=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function i(e,n,r){var i,o,s,l,a="",d=!0,h=n;if((r=r||{}).ellipsis=void 0===r.ellipsis?"â¦":r.ellipsis,!e||0===e.length)return"";for(d=!0;d;){if(t.lastIndex=a.length,!(d=t.exec(e))||d.index-a.length>=h||t.lastIndex>=n+3e3){a+=e.substring(a.length,n);break}if(s=d[0],l=d.index,a+=e.substring(a.length,l+s.length),h-=l+s.length,h<=0)break}return i=r,(o=a).length!==e.length&&i.ellipsis?o+=i.ellipsis:o}e.exports?e.exports=i:n.truncate=i}(String)}},e=>{e.O(0,[913,213,270,644,430,326,239,298,151,540,703,569,358],()=>e(e.s=8878)),_N_E=e.O()}]);
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.