1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8378],{28378:function(t,n,o){o.r(n),o.d(n,{default:function(){return j}});var e=o(16835),a=o(92777),r=o(82262),i=o(10748),l=o(45959),s=o(63553),c=o(37247),d=o(59499),u=o(67294),f=o(73935),p=o(26113),h=o(74806),g=o(23493),b=o.n(g),m=o(4726),v=o(28390),x=o(68250),C=o(59177),y=o(85893);function k(t){var n=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 o,e=(0,c.Z)(t);if(n){var a=(0,c.Z)(this).constructor;o=Reflect.construct(e,arguments,a)}else o=e.apply(this,arguments);return(0,s.Z)(this,o)}}var B=function(t){(0,l.Z)(o,t);var n=k(o);function o(){var t;(0,a.Z)(this,o);for(var e=arguments.length,r=new Array(e),l=0;l<e;l++)r[l]=arguments[l];return t=n.call.apply(n,[this].concat(r)),(0,d.Z)((0,i.Z)(t),"handleClickOutside",(function(n){t.containerRef&&!t.containerRef.contains(n.target)&&t.props.onClickOutside()})),(0,d.Z)((0,i.Z)(t),"setContainerRef",(function(n){t.containerRef=n})),t}return(0,r.Z)(o,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleClickOutside)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"render",value:function(){var t=this.props,n=t.value,o=void 0===n?"left":n,e=t.onChange,a=t.intl;return(0,y.jsxs)("div",{ref:this.setContainerRef,"data-is-style-toolbar-dropdown":!0,children:[(0,y.jsx)(m.Z,{id:"textAlign-btn-tooltip",effect:"solid",place:"bottom",className:"".concat((0,p.iv)(P))}),(0,y.jsx)("ul",{className:"font-loaded ".concat((0,p.iv)(R)),children:Z.map((function(t){return(0,y.jsx)("li",{children:(0,y.jsx)("button",{className:"fr-command fr-title ".concat((0,p.iv)({backgroundColor:o===t?x.H:"transparent"})),"data-for":"textAlign-btn-tooltip","data-tip":a.formatMessage({id:"froala.text_align_".concat(t),defaultMessage:"\u5c0d\u9f4a"}),onClick:function(){return e(t)},children:(0,y.jsx)("i",{className:"fa fa-align-".concat(t)})})},t)}))})]})}}]),o}(u.Component),w=(0,h.ZP)(B),Z=["left","center","right"],P={padding:"2px 10px",whiteSpace:"nowrap",backgroundColor:x.G,marginTop:"10px !important"},R={backgroundColor:x.E,listStyleType:"none",margin:0,padding:0,boxShadow:C.IQ,"& li":{margin:0,padding:0},"& li button":{fontSize:"15px",border:"none",padding:"0 24px",margin:0,lineHeight:"200%",display:"block",cursor:"pointer",whiteSpace:"nowrap",color:"inherit",textDecoration:"none",":focus":{outline:"none"},":hover":{backgroundColor:x.F}}};function N(t){var n=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 o,e=(0,c.Z)(t);if(n){var a=(0,c.Z)(this).constructor;o=Reflect.construct(e,arguments,a)}else o=e.apply(this,arguments);return(0,s.Z)(this,o)}}var S=function(t){(0,l.Z)(o,t);var n=N(o);function o(t){var r;return(0,a.Z)(this,o),r=n.call(this,t),(0,d.Z)((0,i.Z)(r),"collectBtnRefs",(function(t,n){return r.btnRefs[t]=n})),(0,d.Z)((0,i.Z)(r),"moveToolBarPopup",(function(){var t=r.state,n=t.showPopupContainer,o=t.editingProps;if(n){var a=r.popupContainerRef.current,i=r.btnRefs[o];a&&i&&function(t,n){var o=n.getBoundingClientRect(),a=o.top,r=o.left,i=o.width,l=o.height,s=t.getBoundingClientRect(),c=s.top,d=s.left,u=s.width,f=t.style.transform.match(/-?\d+(?:\.\d+)?(?=px)/g)||[],p=(0,e.default)(f,2),h=p[0],g=void 0===h?0:h,b=p[1],m=void 0===b?0:b,v=Number(g)+r-d-u/2+i/2,x=Number(m)+a-c+l;t.style.transform="translate(".concat(v,"px, ").concat(x,"px)")}(a,i)}})),(0,d.Z)((0,i.Z)(r),"debounceMoveToolBarPopup",b()(r.moveToolBarPopup,100)),(0,d.Z)((0,i.Z)(r),"openPopup",(function(t){return r.setState((function(n){return t!==n.editingProps?{editingProps:t,showPopupContainer:!0}:{editingProps:"",showPopupContainer:!1}}))})),(0,d.Z)((0,i.Z)(r),"handleClickOutside",(function(){r.state.showPopupContainer&&r.setState({showPopupContainer:!1,editingProps:""})})),(0,d.Z)((0,i.Z)(r),"handleStyleChange",(function(t){var n=r.props,o=n.onStyleChange,e=n.dataFieldName,a=r.
1state.editingProps;o((0,d.Z)({},e,t)),"color"!==a&&"backgroundColor"!==a&&r.handleClickOutside()})),(0,d.Z)((0,i.Z)(r),"handleEditingColorChange",(function(t){return r.handleStyleChange((0,d.Z)({},r.state.editingProps,t))})),r.popupContainerRef=u.createRef(),r.portal=document.getElementById("dialog_portal"),r.btnRefs={},r.state={showPopupContainer:!1,editingProps:""},r}return(0,r.Z)(o,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.debounceMoveToolBarPopup,{passive:!0})}},{key:"componentDidUpdate",value:function(t){this.moveToolBarPopup(),t.dataFieldName!==this.props.dataFieldName&&m.Z.rebuild()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("scroll",this.debounceMoveToolBarPopup,{passive:!0})}},{key:"render",value:function(){var t=this,n=this.props,o=n.styleValue,e=n.dataFieldName,a=n.isShow,r=n.intl,i=n.forwardRef,l=this.state,s=l.showPopupContainer,c=l.editingProps,u=this.handleStyleChange,h=this.handleClickOutside,g=this.collectBtnRefs,b=this.handleEditingColorChange,x=o.fontWeight,C=o.textAlign,k=void 0===C?"left":C,B=o.isYinCravedBtn,Z=void 0!==B&&B,P="bold"===x||500===x,R=M(e),N=R.boldBtn,S=void 0!==N&&N,j=R.c
1olorBtn,T=void 0!==j&&j,F=R.yinBtn,I=void 0!==F&&F,L=R.backgroundColorBtn,W=void 0!==L&&L,D=R.textAlignBtn,Y=void 0!==D&&D;return(0,y.jsxs)("div",{ref:i,className:(0,p.iv)(_,!a&&{display:"none"}),"data-is-style-toolbar":!0,children:[("color"===c||"backgroundColor"===c)&&(0,y.jsx)(v.Z,{open:s,anchorEl:this.btnRefs[c],onClose:h,color:o[c],handleChange:b}),f.createPortal((0,y.jsx)("div",{className:(0,p.iv)({position:"fixed"},{width:"63px"},!(s&&"textAlign"===c)&&{display:"none"}),ref:this.popupContainerRef,children:"textAlign"===c&&(0,y.jsx)(w,{value:o[c],onChange:function(t){return u((0,d.Z)({},c,t))},onClickOutside:h})}),this.portal),(0,y.jsx)(m.Z,{id:"toolbar-btn-tooltip",effect:"solid",place:"bottom",className:"".concat((0,p.iv)(A))}),(0,y.jsxs)("div",{className:"fr-toolbar fr-ltr fr-desktop fr-top fr-basic ".concat((0,p.iv)(E)),children:[S&&(0,y.jsx)("button",{type:"button",className:"fr-command fr-btn fr-btn-font_awesome ".concat(P?"fr-active":""),onClick:function(){return u({fontWeight:P?300:500})},"data-for":"toolbar-btn-tooltip","data-tip":r.formatMessage({id:"froala.bold",defaultMessage:"\u7c97\u9ad4"}),children:(0,y.jsx)("i",{className:"fa fa-bold"})}),I&&(0,y.jsx)("button",{type:"button",className:"fr-command fr-btn fr-btn-font_awesome ".concat((0,p.iv)({display:"flex",justifyContent:"center",alignItems:"center"})),onClick:function(){return u({isYinCravedBtn:!Z})},"data-for":"toolbar-btn-tooltip","data-tip":r.formatMessage(Z?{id:"froala.yang_btn",defaultMessage:"Yang Button"}:{id:"froala.yin_btn",defaultMessage:"Yin Button"}),children:(0,y.jsx)("span",{className:"".concat(Z?"icon-button-solid":"icon-button-border"),style:{fontWeight:400,minWidth:"initial",fontSize:"24px",lineHeight:1,display:"flex",alignItems:"center"}})}),T&&(0,y.jsx)("button",{type:"button",className:"fr-command fr-btn fr-btn-font_awesome ".concat(Z?"fr-disabled":""),onClick:function(){Z||t.openPopup("color")},ref:function(t){return g("color",t)},"data-for":"toolbar-btn-tooltip","data-tip":r.formatMessage({id:"froala.colors",defaultMessage:"\u984f\u8272"}),children:(0,y.jsx)("i",{className:"fa fa-tint"})}),W&&(0,y.jsx)("button",{type:"button",className:"fr-command fr-btn fr-btn-font_awesome",onClick:function(){return t.openPopup("backgroundColor")},ref:function(t){return g("backgroundColor",t)},"data-for":"toolbar-btn-tooltip","data-tip":r.formatMessage(Z?{id:"infocard.btn.border_color",defaultMessage:"Border Color"}:{id:"froala.background_color",defaultMessage:"Background Color"}),children:(0,y.jsx)("img",{src:"https://assets.fevercdn.com/nc/icons/Background.svg",alt:"background",style:{width:"16px",height:"16px"}})}),Y&&(0,y.jsx)("button",{type:"button",className:"fr-command fr-btn fr-btn-font_awesome ".concat((0,p.iv)(O)),onClick:function(){return t.openPopup("textAlign")},ref:function(t){return g("textAlign",t)},"data-for":"toolbar-btn-tooltip","data-tip":r.formatMessage({id:"froala.text_align",defaultMessage:"\u5c0d\u9f4a"}),children:(0,y.jsx)("i",{className:"fa fa-align-".concat(k),style:{marginLeft:"4px"}})})]})]})}}],[{key:"getDerivedStateFromProps",value:function(t){return t.isShow?null:{showPopupContainer:!1,editingProps:""}}}]),o}(u.Component),j=(0,h.ZP)(S),M=function(t){switch(t){case"titleStyle":case"descriptionStyle":default:return{boldBtn:!0,colorBtn:!0,textAlignBtn:!0};case"subtitleStyle":case"authorStyle":case"discountPriceStyle":case"priceStyle":return{boldBtn:!0,colorBtn:!0};case"labelStyle":return{boldBtn:!0,colorBtn:!0,backgroundColorBtn:!0,textAlignBtn:!0};case"buttonStyle":return{boldBtn:!0,colorBtn:!0,yinBtn:!0,backgroundColorBtn:!0}}},_={position:"absolute",zIndex:45},E={display:"inline-flex",alignItem:"center",backgroundColor:x.E,boxShadow:C.xF,borderRadius:"8px",marginBottom:"1px",padding:0,minHeight:"44px"},A={padding:"2px 10px",whiteSpace:"nowrap",backgroundColor:"rgb(0, 0, 0)",marginTop:"10px !important"},O={":after":{position:"absolute",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderTop:"4px solid ".concat(x.P),right:"2px",top:"50%",transform:"translateY(-50%)",content:" "}}}}]);
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.