????

Your IP : 18.188.195.92


Current Path : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/
Upload File :
Current File : C:/inetpub/vhost/qlhncn.gdtsolutions.vn/www/assets/EditPDF-01a3c7db.js

import{au as w,R as N,P as m,r as v,ad as u,j as d,av as De,h as k,m as q,C as F}from"./index-63f91612.js";import{m as _e,F as Oe}from"./FullScreenDialog-6515b107.js";import{T as Ie}from"./TabsBasic-696a6c3d.js";import{_ as T,R as Ne,C as A,N as Se,y as ce,z as de,E as Le,G as He,d as K,h as ne,e as G,o as Be,J as Re,K as Pe,B as te}from"./reactstrap.modern-db56c8a4.js";import{v as Te}from"./DataTable-f53a5ff2.js";import"./InputNumber-bbb3e938.js";import"./InputTime-7fc0744c.js";import{T as Ve}from"./TextArea-ca01d8ce.js";import{F as _}from"./FormControl-1241e33f.js";class qe{constructor(n){this._undoStack=[],this._redoStack=[],this._redoStack.push(n)}insert(n){this._undoStack.push(this._redoStack.pop()),this._redoStack.length=0,this._redoStack.push(n)}getPrevState(){if(this._undoStack.length>=1){let n=this._undoStack.pop();return this._redoStack.push(n),n}}getNextState(){if(this._redoStack.length>=2){let n=this._redoStack.pop();return this._undoStack.push(n),this._redoStack[this._redoStack.length-1]}}clear(){if(this._redoStack.length>=1){let n=this._redoStack.pop();this._undoStack.length=0,this._redoStack.length=0,this._redoStack.push(n)}}}function E(o){for(var n=arguments.length,i=Array(n>1?n-1:0),e=1;e<n;e++)i[e-1]=arguments[e];return typeof o=="function"&&o.apply(void 0,i)}function H(o,n){return Object.prototype.hasOwnProperty.call(o,n)}function Fe(){return Math.random().toString(36).substring(7)}var y={menu:"react-contextmenu",menuVisible:"react-contextmenu--visible",menuWrapper:"react-contextmenu-wrapper",menuItem:"react-contextmenu-item",menuItemActive:"react-contextmenu-item--active",menuItemDisabled:"react-contextmenu-item--disabled",menuItemDivider:"react-contextmenu-item--divider",menuItemSelected:"react-contextmenu-item--selected",subMenu:"react-contextmenu-submenu"},S={},Ae=!!(typeof window<"u"&&window.document&&window.document.createElement),oe="REACT_CONTEXTMENU_SHOW",ie="REACT_CONTEXTMENU_HIDE";function Ee(o,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:window,e=void 0;typeof window.CustomEvent=="function"?e=new window.CustomEvent(o,{detail:n}):(e=document.createEvent("CustomEvent"),e.initCustomEvent(o,!1,!0,n)),i&&(i.dispatchEvent(e),w(S,n))}function he(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments[1];Ee(oe,w({},o,{type:oe}),n)}function B(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments[1];Ee(ie,w({},o,{type:ie}),n)}function Ke(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}var Ge=function o(){var n=this;Ke(this,o),this.handleShowEvent=function(i){for(var e in n.callbacks)H(n.callbacks,e)&&n.callbacks[e].show(i)},this.handleHideEvent=function(i){for(var e in n.callbacks)H(n.callbacks,e)&&n.callbacks[e].hide(i)},this.register=function(i,e){var t=Fe();return n.callbacks[t]={show:i,hide:e},t},this.unregister=function(i){i&&n.callbacks[i]&&delete n.callbacks[i]},this.callbacks={},Ae&&(window.addEventListener(oe,this.handleShowEvent),window.addEventListener(ie,this.handleHideEvent))};const U=new Ge;var Ue=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(o[e]=i[e])}return o},$e=function(){function o(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,e){return i&&o(n.prototype,i),e&&o(n,e),n}}();function W(o,n,i){return n in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,o}function ze(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function fe(o,n){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:o}function We(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(o,n):o.__proto__=n)}var $=function(o){We(n,o);function n(){var i,e,t,r;ze(this,n);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return r=(e=(t=fe(this,(i=n.__proto__||Object.getPrototypeOf(n)).call.apply(i,[this].concat(s))),t),t.handleClick=function(l){l.button!==0&&l.button!==1&&l.preventDefault(),!(t.props.disabled||t.props.divider)&&(E(t.props.onClick,l,w({},t.props.data,S.data),S.target),!t.props.preventClose&&B())},e),fe(t,r)}return $e(n,[{key:"render",value:function(){var e,t=this,r=this.props,a=r.attributes,s=r.children,c=r.className,l=r.disabled,h=r.divider,p=r.selected,f=T(c,y.menuItem,a.className,(e={},W(e,T(y.menuItemDisabled,a.disabledClassName),l),W(e,T(y.menuItemDivider,a.dividerClassName),h),W(e,T(y.menuItemSelected,a.selectedClassName),p),e));return N.createElement("div",Ue({},a,{className:f,role:"menuitem",tabIndex:"-1","aria-disabled":l?"true":"false","aria-orientation":h?"horizontal":null,ref:function(C){t.ref=C},onMouseMove:this.props.onMouseMove,onMouseLeave:this.props.onMouseLeave,onTouchEnd:this.handleClick,onClick:this.handleClick}),h?null:s)}}]),n}(v.Component);$.propTypes={attributes:m.object,children:m.node,className:m.string,data:m.object,disabled:m.bool,divider:m.bool,onClick:m.func,onMouseLeave:m.func,onMouseMove:m.func,preventClose:m.bool,selected:m.bool};$.defaultProps={attributes:{},children:null,className:"",data:{},disabled:!1,divider:!1,onClick:function(){return null},onMouseMove:function(){return null},onMouseLeave:function(){return null},preventClose:!1,selected:!1};function Xe(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function Ye(o,n){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:o}function Je(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(o,n):o.__proto__=n)}var se=function(o){Je(n,o);function n(i){Xe(this,n);var e=Ye(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i));return Qe.call(e),e.seletedItemRef=null,e.state={selectedItem:null,forceSubMenuOpen:!1},e}return n}(v.Component);se.propTypes={children:m.node.isRequired};var Qe=function(){var n=this;this.handleKeyNavigation=function(i){if(n.state.isVisible!==!1)switch(i.keyCode){case 37:case 27:i.preventDefault(),n.hideMenu(i);break;case 38:i.preventDefault(),n.selectChildren(!0);break;case 40:i.preventDefault(),n.selectChildren(!1);break;case 39:n.tryToOpenSubMenu(i);break;case 13:i.preventDefault(),n.tryToOpenSubMenu(i);{var e=n.seletedItemRef&&n.seletedItemRef.props&&n.seletedItemRef.props.disabled;n.seletedItemRef&&n.seletedItemRef.ref instanceof HTMLElement&&!e?n.seletedItemRef.ref.click():n.hideMenu(i)}break}},this.handleForceClose=function(){n.setState({forceSubMenuOpen:!1})},this.tryToOpenSubMenu=function(i){n.state.selectedItem&&n.state.selectedItem.type===n.getSubMenuType()&&(i.preventDefault(),n.setState({forceSubMenuOpen:!0}))},this.selectChildren=function(i){var e=n.state.selectedItem,t=[],r=0,a={},s=function p(f,b){f&&([$,n.getSubMenuType()].indexOf(f.type)<0?N.Children.forEach(f.props.children,p):f.props.divider||(f.props.disabled&&(++r,a[b]=!0),t.push(f)))};if(N.Children.forEach(n.props.children,s),r===t.length)return;function c(p){var f=p,b=function(){i?--f:++f,f<0?f=t.length-1:f>=t.length&&(f=0)};do b();while(f!==p&&a[f]);return f===p?null:f}var l=t.indexOf(e),h=c(l);h!==null&&n.setState({selectedItem:t[h],forceSubMenuOpen:!1})},this.onChildMouseMove=function(i){n.state.selectedItem!==i&&n.setState({selectedItem:i,forceSubMenuOpen:!1})},this.onChildMouseLeave=function(){n.setState({selectedItem:null,forceSubMenuOpen:!1})},this.renderChildren=function(i){return N.Children.map(i,function(e){var t={};return N.isValidElement(e)?[$,n.getSubMenuType()].indexOf(e.type)<0?(t.children=n.renderChildren(e.props.children),N.cloneElement(e,t)):(t.onMouseLeave=n.onChildMouseLeave.bind(n),e.type===n.getSubMenuType()&&(t.forceOpen=n.state.forceSubMenuOpen&&n.state.selectedItem===e,t.forceClose=n.handleForceClose,t.parentKeyNavigationHandler=n.handleKeyNavigation),!e.props.divider&&n.state.selectedItem===e?(t.selected=!0,t.ref=function(r){n.seletedItemRef=r},N.cloneElement(e,t)):(t.onMouseMove=function(){return n.onChildMouseMove(e)},N.cloneElement(e,t))):e})}},X=Object.assign||function(o){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(o[e]=i[e])}return o},Ze=function(){function o(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,e){return i&&o(n.prototype,i),e&&o(n,e),n}}();function Y(o,n,i){return n in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,o}function en(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function nn(o,n){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:o}function tn(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(o,n):o.__proto__=n)}var le=function(o){tn(n,o);function n(i){en(this,n);var e=nn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i));return e.getMenuPosition=function(){var t=window,r=t.innerWidth,a=t.innerHeight,s=e.subMenu.getBoundingClientRect(),c={};return s.bottom>a?c.bottom=0:c.top=0,s.right<r?c.left="100%":c.right="100%",c},e.getRTLMenuPosition=function(){var t=window,r=t.innerHeight,a=e.subMenu.getBoundingClientRect(),s={};return a.bottom>r?s.bottom=0:s.top=0,a.left<0?s.left="100%":s.right="100%",s},e.hideSubMenu=function(t){t.detail&&t.detail.id&&e.menu&&t.detail.id!==e.menu.id||(e.props.forceOpen&&e.props.forceClose(),e.setState({visible:!1,selectedItem:null}),e.unregisterHandlers())},e.handleClick=function(t){t.preventDefault(),!e.props.disabled&&(E(e.props.onClick,t,w({},e.props.data,S.data),S.target),!(!e.props.onClick||e.props.preventCloseOnClick)&&B())},e.handleMouseEnter=function(){e.closetimer&&clearTimeout(e.closetimer),!(e.props.disabled||e.state.visible)&&(e.opentimer=setTimeout(function(){return e.setState({visible:!0,selectedItem:null})},e.props.hoverDelay))},e.handleMouseLeave=function(){e.opentimer&&clearTimeout(e.opentimer),e.state.visible&&(e.closetimer=setTimeout(function(){return e.setState({visible:!1,selectedItem:null})},e.props.hoverDelay))},e.menuRef=function(t){e.menu=t},e.subMenuRef=function(t){e.subMenu=t},e.registerHandlers=function(){document.removeEventListener("keydown",e.props.parentKeyNavigationHandler),document.addEventListener("keydown",e.handleKeyNavigation)},e.unregisterHandlers=function(t){document.removeEventListener("keydown",e.handleKeyNavigation),t||document.addEventListener("keydown",e.props.parentKeyNavigationHandler)},e.state=w({},e.state,{visible:!1}),e}return Ze(n,[{key:"componentDidMount",value:function(){this.listenId=U.register(function(){},this.hideSubMenu)}},{key:"getSubMenuType",value:function(){return n}},{key:"shouldComponentUpdate",value:function(e,t){return this.isVisibilityChange=(this.state.visible!==t.visible||this.props.forceOpen!==e.forceOpen)&&!(this.state.visible&&e.forceOpen)&&!(this.props.forceOpen&&t.visible),!0}},{key:"componentDidUpdate",value:function(){var e=this;if(this.isVisibilityChange)if(this.props.forceOpen||this.state.visible){var t=window.requestAnimationFrame||setTimeout;t(function(){var a=e.props.rtl?e.getRTLMenuPosition():e.getMenuPosition();e.subMenu.style.removeProperty("top"),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("left"),e.subMenu.style.removeProperty("right"),H(a,"top")&&(e.subMenu.style.top=a.top),H(a,"left")&&(e.subMenu.style.left=a.left),H(a,"bottom")&&(e.subMenu.style.bottom=a.bottom),H(a,"right")&&(e.subMenu.style.right=a.right),e.subMenu.classList.add(y.menuVisible),e.registerHandlers(),e.setState({selectedItem:null})})}else{var r=function a(){e.subMenu.removeEventListener("transitionend",a),e.subMenu.style.removeProperty("bottom"),e.subMenu.style.removeProperty("right"),e.subMenu.style.top=0,e.subMenu.style.left="100%",e.unregisterHandlers()};this.subMenu.addEventListener("transitionend",r),this.subMenu.classList.remove(y.menuVisible)}}},{key:"componentWillUnmount",value:function(){this.listenId&&U.unregister(this.listenId),this.opentimer&&clearTimeout(this.opentimer),this.closetimer&&clearTimeout(this.closetimer),this.unregisterHandlers(!0)}},{key:"render",value:function(){var e,t=this.props,r=t.children,a=t.attributes,s=t.disabled,c=t.title,l=t.selected,h=this.state.visible,p={ref:this.menuRef,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,className:T(y.menuItem,y.subMenu,a.listClassName),style:{position:"relative"}},f={className:T(y.menuItem,a.className,(e={},Y(e,T(y.menuItemDisabled,a.disabledClassName),s),Y(e,T(y.menuItemActive,a.visibleClassName),h),Y(e,T(y.menuItemSelected,a.selectedClassName),l),e)),onMouseMove:this.props.onMouseMove,onMouseOut:this.props.onMouseOut,onClick:this.handleClick},b={ref:this.subMenuRef,style:{position:"absolute",transition:"opacity 1ms",top:0,left:"100%"},className:T(y.menu,this.props.className)};return N.createElement("nav",X({},p,{role:"menuitem",tabIndex:"-1","aria-haspopup":"true"}),N.createElement("div",X({},a,f),c),N.createElement("nav",X({},b,{role:"menu",tabIndex:"-1"}),this.renderChildren(r)))}}]),n}(se);le.propTypes={children:m.node.isRequired,attributes:m.object,title:m.node.isRequired,className:m.string,disabled:m.bool,hoverDelay:m.number,rtl:m.bool,selected:m.bool,onMouseMove:m.func,onMouseOut:m.func,forceOpen:m.bool,forceClose:m.func,parentKeyNavigationHandler:m.func};le.defaultProps={disabled:!1,hoverDelay:500,attributes:{},className:"",rtl:!1,selected:!1,onMouseMove:function(){return null},onMouseOut:function(){return null},forceOpen:!1,forceClose:function(){return null},parentKeyNavigationHandler:function(){return null}};var on=function(){function o(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,e){return i&&o(n.prototype,i),e&&o(n,e),n}}();function an(o,n,i){return n in o?Object.defineProperty(o,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[n]=i,o}function rn(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function sn(o,n){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:o}function ln(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(o,n):o.__proto__=n)}var we=function(o){ln(n,o);function n(i){rn(this,n);var e=sn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,i));return e.registerHandlers=function(){document.addEventListener("mousedown",e.handleOutsideClick),document.addEventListener("touchstart",e.handleOutsideClick),e.props.preventHideOnScroll||document.addEventListener("scroll",e.handleHide),e.props.preventHideOnContextMenu||document.addEventListener("contextmenu",e.handleHide),document.addEventListener("keydown",e.handleKeyNavigation),e.props.preventHideOnResize||window.addEventListener("resize",e.handleHide)},e.unregisterHandlers=function(){document.removeEventListener("mousedown",e.handleOutsideClick),document.removeEventListener("touchstart",e.handleOutsideClick),document.removeEventListener("scroll",e.handleHide),document.removeEventListener("contextmenu",e.handleHide),document.removeEventListener("keydown",e.handleKeyNavigation),window.removeEventListener("resize",e.handleHide)},e.handleShow=function(t){if(!(t.detail.id!==e.props.id||e.state.isVisible)){var r=t.detail.position,a=r.x,s=r.y;e.setState({isVisible:!0,x:a,y:s}),e.registerHandlers(),E(e.props.onShow,t)}},e.handleHide=function(t){e.state.isVisible&&(!t.detail||!t.detail.id||t.detail.id===e.props.id)&&(e.unregisterHandlers(),e.setState({isVisible:!1,selectedItem:null,forceSubMenuOpen:!1}),E(e.props.onHide,t))},e.handleOutsideClick=function(t){e.menu.contains(t.target)||B()},e.handleMouseLeave=function(t){t.preventDefault(),E(e.props.onMouseLeave,t,w({},e.props.data,S.data),S.target),e.props.hideOnLeave&&B()},e.handleContextMenu=function(t){e.handleHide(t)},e.hideMenu=function(t){(t.keyCode===27||t.keyCode===13)&&B()},e.getMenuPosition=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a={top:r,left:t};if(!e.menu)return a;var s=window,c=s.innerWidth,l=s.innerHeight,h=e.menu.getBoundingClientRect();return r+h.height>l&&(a.top-=h.height),t+h.width>c&&(a.left-=h.width),a.top<0&&(a.top=h.height<l?(l-h.height)/2:0),a.left<0&&(a.left=h.width<c?(c-h.width)/2:0),a},e.getRTLMenuPosition=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a={top:r,left:t};if(!e.menu)return a;var s=window,c=s.innerWidth,l=s.innerHeight,h=e.menu.getBoundingClientRect();return a.left=t-h.width,r+h.height>l&&(a.top-=h.height),a.left<0&&(a.left+=h.width),a.top<0&&(a.top=h.height<l?(l-h.height)/2:0),a.left+h.width>c&&(a.left=h.width<c?(c-h.width)/2:0),a},e.menuRef=function(t){e.menu=t},e.state=w({},e.state,{x:0,y:0,isVisible:!1}),e}return on(n,[{key:"getSubMenuType",value:function(){return le}},{key:"componentDidMount",value:function(){this.listenId=U.register(this.handleShow,this.handleHide)}},{key:"componentDidUpdate",value:function(){var e=this,t=window.requestAnimationFrame||setTimeout;this.state.isVisible?t(function(){var r=e.state,a=r.x,s=r.y,c=e.props.rtl?e.getRTLMenuPosition(a,s):e.getMenuPosition(a,s),l=c.top,h=c.left;t(function(){e.menu&&(e.menu.style.top=l+"px",e.menu.style.left=h+"px",e.menu.style.opacity=1,e.menu.style.pointerEvents="auto")})}):t(function(){e.menu&&(e.menu.style.opacity=0,e.menu.style.pointerEvents="none")})}},{key:"componentWillUnmount",value:function(){this.listenId&&U.unregister(this.listenId),this.unregisterHandlers()}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,a=e.style,s=this.state.isVisible,c=w({},a,{position:"fixed",opacity:0,pointerEvents:"none"}),l=T(y.menu,r,an({},y.menuVisible,s));return N.createElement("nav",{role:"menu",tabIndex:"-1",ref:this.menuRef,style:c,className:l,onContextMenu:this.handleContextMenu,onMouseLeave:this.handleMouseLeave},this.renderChildren(t))}}]),n}(se);we.propTypes={id:m.string.isRequired,children:m.node.isRequired,data:m.object,className:m.string,hideOnLeave:m.bool,rtl:m.bool,onHide:m.func,onMouseLeave:m.func,onShow:m.func,preventHideOnContextMenu:m.bool,preventHideOnResize:m.bool,preventHideOnScroll:m.bool,style:m.object};we.defaultProps={className:"",data:{},hideOnLeave:!1,rtl:!1,onHide:function(){return null},onMouseLeave:function(){return null},onShow:function(){return null},preventHideOnContextMenu:!1,preventHideOnResize:!1,preventHideOnScroll:!1,style:{}};var un=function(){function o(n,i){for(var e=0;e<i.length;e++){var t=i[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(n,i,e){return i&&o(n.prototype,i),e&&o(n,e),n}}();function cn(o,n){if(!(o instanceof n))throw new TypeError("Cannot call a class as a function")}function me(o,n){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n&&(typeof n=="object"||typeof n=="function")?n:o}function dn(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof n);o.prototype=Object.create(n&&n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(o,n):o.__proto__=n)}var ue=function(o){dn(n,o);function n(){var i,e,t,r;cn(this,n);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return r=(e=(t=me(this,(i=n.__proto__||Object.getPrototypeOf(n)).call.apply(i,[this].concat(s))),t),t.touchHandled=!1,t.handleMouseDown=function(l){t.props.holdToDisplay>=0&&l.button===0&&(l.persist(),l.stopPropagation(),t.mouseDownTimeoutId=setTimeout(function(){return t.handleContextClick(l)},t.props.holdToDisplay)),E(t.props.attributes.onMouseDown,l)},t.handleMouseUp=function(l){l.button===0&&clearTimeout(t.mouseDownTimeoutId),E(t.props.attributes.onMouseUp,l)},t.handleMouseOut=function(l){l.button===0&&clearTimeout(t.mouseDownTimeoutId),E(t.props.attributes.onMouseOut,l)},t.handleTouchstart=function(l){t.touchHandled=!1,t.props.holdToDisplay>=0&&(l.persist(),l.stopPropagation(),t.touchstartTimeoutId=setTimeout(function(){t.handleContextClick(l),t.touchHandled=!0},t.props.holdToDisplay)),E(t.props.attributes.onTouchStart,l)},t.handleTouchEnd=function(l){t.touchHandled&&l.preventDefault(),clearTimeout(t.touchstartTimeoutId),E(t.props.attributes.onTouchEnd,l)},t.handleContextMenu=function(l){l.button===t.props.mouseButton&&t.handleContextClick(l),E(t.props.attributes.onContextMenu,l)},t.handleMouseClick=function(l){l.button===t.props.mouseButton&&t.handleContextClick(l),E(t.props.attributes.onClick,l)},t.handleContextClick=function(l){if(!t.props.disable&&!(t.props.disableIfShiftIsPressed&&l.shiftKey)){l.preventDefault(),l.stopPropagation();var h=l.clientX||l.touches&&l.touches[0].pageX,p=l.clientY||l.touches&&l.touches[0].pageY;t.props.posX&&(h-=t.props.posX),t.props.posY&&(p-=t.props.posY),B();var f=E(t.props.collect,t.props),b={position:{x:h,y:p},target:t.elem,id:t.props.id};f&&typeof f.then=="function"?f.then(function(C){b.data=w({},C,{target:l.target}),he(b)}):(b.data=w({},f,{target:l.target}),he(b))}},t.elemRef=function(l){t.elem=l},e),me(t,r)}return un(n,[{key:"render",value:function(){var e=this.props,t=e.renderTag,r=e.attributes,a=e.children,s=w({},r,{className:T(y.menuWrapper,r.className),onContextMenu:this.handleContextMenu,onClick:this.handleMouseClick,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchstart,onTouchEnd:this.handleTouchEnd,onMouseOut:this.handleMouseOut,ref:this.elemRef});return N.createElement(t,s,a)}}]),n}(v.Component);ue.propTypes={id:m.string.isRequired,children:m.node.isRequired,attributes:m.object,collect:m.func,disable:m.bool,holdToDisplay:m.number,posX:m.number,posY:m.number,renderTag:m.elementType,mouseButton:m.number,disableIfShiftIsPressed:m.bool};ue.defaultProps={attributes:{},collect:function(){return null},disable:!1,holdToDisplay:1e3,renderTag:"div",posX:0,posY:0,mouseButton:2,disableIfShiftIsPressed:!1};function hn(o){if(Array.isArray(o)){for(var n=0,i=Array(o.length);n<o.length;n++)i[n]=o[n];return i}else return Array.from(o)}[].concat(hn(Object.keys(ue.propTypes)),["children"]);m.array.isRequired,m.string.isRequired;Te();Te();const O={INSERTRIGHT:"INSERTRIGHT",INSERTLEFT:"INSERTLEFT",GROUPCREATE:"GROUPCREATE",GROUPDELETE:"GROUPDELETE",DELETE:"DELETE",CREATE:"CREATE",FORTMATNUMBER:"FORTMATNUMBER",FORTMATTEXT:"FORTMATTEXT"},fn=[{name:"Chèn cột bên phải",action:O.INSERTRIGHT,type:"Insert",disabled:!1},{name:"Chèn cột bên trái",action:O.INSERTLEFT,type:"Insert",disabled:!1},{name:"Tạo cột nhóm",action:O.GROUPCREATE,type:"Create",disabled:!1},{name:"Định dạng số",action:O.FORTMATNUMBER,type:"Number",disabled:!1},{name:"Định dạng văn bản",action:O.FORTMATTEXT,type:"Text",disabled:!1},{name:"Bỏ cột nhóm",action:O.GROUPDELETE,type:"Delete",disabled:!1},{name:"Xóa cột",action:O.DELETE,type:"Delete",disabled:!1}],L={INSERTTOP:"INSERTTOP",INSERTBOTTOM:"INSERTBOTTOM",INSERTCHILD:"INSERTCHILD",DELETE:"DELETE",CREATE:"CREATE",ALLOW:"ALLOW",COPY:"COPY",PAST:"PAST",MERGE:"MERGE"},mn=[{name:"Tạo hàng con",action:L.INSERTCHILD,type:"Insert"},{name:"Chèn hàng phía trên",action:L.INSERTTOP,type:"Insert"},{name:"Chèn hàng phía dưới",action:L.INSERTBOTTOM,type:"Insert"},{name:"Cho phép thao tác",action:L.ALLOW,type:"Insert"},{name:"Hợp nhất ô",action:L.MERGE,type:"Merge"},{name:"Xóa hàng",action:L.DELETE,type:"Delete"}];v.createContext();new qe({});_e(o=>({root:{width:"100%","& > * + *":{marginTop:o.spacing(2)}}}));var ae=globalThis&&globalThis.__assign||function(){return ae=Object.assign||function(o){for(var n,i=1,e=arguments.length;i<e;i++){n=arguments[i];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}return o},ae.apply(this,arguments)},ke={onActivate:u.func,onAddUndo:u.func,onBeforeAddUndo:u.func,onBeforeExecCommand:u.func,onBeforeGetContent:u.func,onBeforeRenderUI:u.func,onBeforeSetContent:u.func,onBeforePaste:u.func,onBlur:u.func,onChange:u.func,onClearUndos:u.func,onClick:u.func,onContextMenu:u.func,onCopy:u.func,onCut:u.func,onDblclick:u.func,onDeactivate:u.func,onDirty:u.func,onDrag:u.func,onDragDrop:u.func,onDragEnd:u.func,onDragGesture:u.func,onDragOver:u.func,onDrop:u.func,onExecCommand:u.func,onFocus:u.func,onFocusIn:u.func,onFocusOut:u.func,onGetContent:u.func,onHide:u.func,onInit:u.func,onKeyDown:u.func,onKeyPress:u.func,onKeyUp:u.func,onLoadContent:u.func,onMouseDown:u.func,onMouseEnter:u.func,onMouseLeave:u.func,onMouseMove:u.func,onMouseOut:u.func,onMouseOver:u.func,onMouseUp:u.func,onNodeChange:u.func,onObjectResizeStart:u.func,onObjectResized:u.func,onObjectSelected:u.func,onPaste:u.func,onPostProcess:u.func,onPostRender:u.func,onPreProcess:u.func,onProgressState:u.func,onRedo:u.func,onRemove:u.func,onReset:u.func,onSaveContent:u.func,onSelectionChange:u.func,onSetAttrib:u.func,onSetContent:u.func,onShow:u.func,onSubmit:u.func,onUndo:u.func,onVisualAid:u.func},pn=ae({apiKey:u.string,id:u.string,inline:u.bool,init:u.object,initialValue:u.string,onEditorChange:u.func,outputFormat:u.oneOf(["html","text"]),value:u.string,tagName:u.string,cloudChannel:u.string,plugins:u.oneOfType([u.string,u.array]),toolbar:u.oneOfType([u.string,u.array]),disabled:u.bool,textareaName:u.string,tinymceScriptSrc:u.string,rollback:u.oneOfType([u.number,u.oneOf([!1])]),scriptLoading:u.shape({async:u.bool,defer:u.bool,delay:u.number})},ke),J=function(o){return typeof o=="function"},pe=function(o){return o in ke},ve=function(o){return o.substr(2)},vn=function(o,n,i,e,t,r,a){var s=Object.keys(t).filter(pe),c=Object.keys(r).filter(pe),l=s.filter(function(p){return r[p]===void 0}),h=c.filter(function(p){return t[p]===void 0});l.forEach(function(p){var f=ve(p),b=a[f];i(f,b),delete a[f]}),h.forEach(function(p){var f=e(o,p),b=ve(p);a[b]=f,n(b,f)})},bn=function(o,n,i,e,t){return vn(t,o.on.bind(o),o.off.bind(o),function(r,a){return function(s){var c;return(c=r(a))===null||c===void 0?void 0:c(s,o)}},n,i,e)},be=0,je=function(o){var n=Date.now(),i=Math.floor(Math.random()*1e9);return be++,o+"_"+i+be+String(n)},ge=function(o){return o!==null&&(o.tagName.toLowerCase()==="textarea"||o.tagName.toLowerCase()==="input")},Ce=function(o){return typeof o>"u"||o===""?[]:Array.isArray(o)?o:o.split(" ")},gn=function(o,n){return Ce(o).concat(Ce(n))},Cn=function(){return window.InputEvent&&typeof InputEvent.prototype.getTargetRanges=="function"},yn=function(o){if(!("isConnected"in Node.prototype)){for(var n=o,i=o.parentNode;i!=null;)n=i,i=n.parentNode;return n===o.ownerDocument}return o.isConnected},ye=function(o,n){o!==void 0&&(o.mode!=null&&typeof o.mode=="object"&&typeof o.mode.set=="function"?o.mode.set(n):o.setMode(n))},Me=function(){return{listeners:[],scriptId:je("tiny-script"),scriptLoading:!1,scriptLoaded:!1}},Mn=function(){var o=Me(),n=function(t,r,a,s,c,l){var h=r.createElement("script");h.referrerPolicy="origin",h.type="application/javascript",h.id=t,h.src=a,h.async=s,h.defer=c;var p=function(){h.removeEventListener("load",p),l()};h.addEventListener("load",p),r.head&&r.head.appendChild(h)},i=function(t,r,a,s,c,l){var h=function(){return n(o.scriptId,t,r,a,s,function(){o.listeners.forEach(function(p){return p()}),o.scriptLoaded=!0})};o.scriptLoaded?l():(o.listeners.push(l),o.scriptLoading||(o.scriptLoading=!0,c>0?setTimeout(h,c):h()))},e=function(){o=Me()};return{load:i,reinitialize:e}},Nn=Mn(),Tn=function(){return typeof window<"u"?window:global},re=function(){var o=Tn();return o&&o.tinymce?o.tinymce:null},En=globalThis&&globalThis.__extends||function(){var o=function(n,i){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");o(n,i);function e(){this.constructor=n}n.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}}(),z=globalThis&&globalThis.__assign||function(){return z=Object.assign||function(o){for(var n,i=1,e=arguments.length;i<e;i++){n=arguments[i];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}return o},z.apply(this,arguments)},Q=function(){var o,n,i;return!((i=(n=(o=re())===null||o===void 0?void 0:o.Env)===null||n===void 0?void 0:n.browser)===null||i===void 0)&&i.isIE()?"change keyup compositionend setcontent":"change input compositionend setcontent"},Z=function(){return Cn()?"beforeinput SelectionChange":"SelectionChange"},wn=function(o){En(n,o);function n(i){var e=this,t,r,a;return e=o.call(this,i)||this,e.rollbackTimer=void 0,e.valueCursor=void 0,e.rollbackChange=function(){var s=e.editor,c=e.props.value;s&&c&&c!==e.currentContent&&s.undoManager.ignore(function(){if(s.setContent(c),e.valueCursor&&(!e.inline||s.hasFocus()))try{s.selection.moveToBookmark(e.valueCursor)}catch{}}),e.rollbackTimer=void 0},e.handleBeforeInput=function(s){if(e.props.value!==void 0&&e.props.value===e.currentContent&&e.editor&&(!e.inline||e.editor.hasFocus))try{e.valueCursor=e.editor.selection.getBookmark(3)}catch{}},e.handleBeforeInputSpecial=function(s){(s.key==="Enter"||s.key==="Backspace"||s.key==="Delete")&&e.handleBeforeInput(s)},e.handleEditorChange=function(s){var c=e.editor;if(c&&c.initialized){var l=c.getContent();if(e.props.value!==void 0&&e.props.value!==l&&e.props.rollback!==!1&&(e.rollbackTimer||(e.rollbackTimer=window.setTimeout(e.rollbackChange,typeof e.props.rollback=="number"?e.props.rollback:200))),l!==e.currentContent&&(e.currentContent=l,J(e.props.onEditorChange))){var h=e.props.outputFormat,p=h==="html"?l:c.getContent({format:h});e.props.onEditorChange(p,c)}}},e.handleEditorChangeSpecial=function(s){(s.key==="Backspace"||s.key==="Delete")&&e.handleEditorChange(s)},e.initialise=function(s){var c,l,h;s===void 0&&(s=0);var p=e.elementRef.current;if(p){if(!yn(p)){if(s===0)setTimeout(function(){return e.initialise(1)},1);else if(s<100)setTimeout(function(){return e.initialise(s+1)},100);else throw new Error("tinymce can only be initialised when in a document");return}var f=re();if(!f)throw new Error("tinymce should have been loaded into global scope");var b=z(z({},e.props.init),{selector:void 0,target:p,readonly:e.props.disabled,inline:e.inline,plugins:gn((c=e.props.init)===null||c===void 0?void 0:c.plugins,e.props.plugins),toolbar:(l=e.props.toolbar)!==null&&l!==void 0?l:(h=e.props.init)===null||h===void 0?void 0:h.toolbar,setup:function(C){e.editor=C,e.bindHandlers({}),e.inline&&!ge(p)&&C.once("PostRender",function(j){C.setContent(e.getInitialValue(),{no_events:!0})}),e.props.init&&J(e.props.init.setup)&&e.props.init.setup(C)},init_instance_callback:function(C){var j,x,D=e.getInitialValue();e.currentContent=(j=e.currentContent)!==null&&j!==void 0?j:C.getContent(),e.currentContent!==D&&(e.currentContent=D,C.setContent(D),C.undoManager.clear(),C.undoManager.add(),C.setDirty(!1));var R=(x=e.props.disabled)!==null&&x!==void 0?x:!1;ye(e.editor,R?"readonly":"design"),e.props.init&&J(e.props.init.init_instance_callback)&&e.props.init.init_instance_callback(C)}});e.inline||(p.style.visibility=""),ge(p)&&(p.value=e.getInitialValue()),f.init(b)}},e.id=e.props.id||je("tiny-react"),e.elementRef=v.createRef(),e.inline=(a=(t=e.props.inline)!==null&&t!==void 0?t:(r=e.props.init)===null||r===void 0?void 0:r.inline)!==null&&a!==void 0?a:!1,e.boundHandlers={},e}return n.prototype.componentDidUpdate=function(i){var e=this,t,r;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(i),this.editor.initialized)){if(this.currentContent=(t=this.currentContent)!==null&&t!==void 0?t:this.editor.getContent(),typeof this.props.initialValue=="string"&&this.props.initialValue!==i.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if(typeof this.props.value=="string"&&this.props.value!==this.currentContent){var a=this.editor;a.undoManager.transact(function(){var c;if(!e.inline||a.hasFocus())try{c=a.selection.getBookmark(3)}catch{}var l=e.valueCursor;if(a.setContent(e.props.value),!e.inline||a.hasFocus())for(var h=0,p=[c,l];h<p.length;h++){var f=p[h];if(f)try{a.selection.moveToBookmark(f),e.valueCursor=f;break}catch{}}})}if(this.props.disabled!==i.disabled){var s=(r=this.props.disabled)!==null&&r!==void 0?r:!1;ye(this.editor,s?"readonly":"design")}}},n.prototype.componentDidMount=function(){var i,e,t,r,a,s;re()!==null?this.initialise():this.elementRef.current&&this.elementRef.current.ownerDocument&&Nn.load(this.elementRef.current.ownerDocument,this.getScriptSrc(),(e=(i=this.props.scriptLoading)===null||i===void 0?void 0:i.async)!==null&&e!==void 0?e:!1,(r=(t=this.props.scriptLoading)===null||t===void 0?void 0:t.defer)!==null&&r!==void 0?r:!1,(s=(a=this.props.scriptLoading)===null||a===void 0?void 0:a.delay)!==null&&s!==void 0?s:0,this.initialise)},n.prototype.componentWillUnmount=function(){var i=this,e=this.editor;e&&(e.off(Q(),this.handleEditorChange),e.off(Z(),this.handleBeforeInput),e.off("keypress",this.handleEditorChangeSpecial),e.off("keydown",this.handleBeforeInputSpecial),e.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(t){e.off(t,i.boundHandlers[t])}),this.boundHandlers={},e.remove(),this.editor=void 0)},n.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},n.prototype.renderInline=function(){var i=this.props.tagName,e=i===void 0?"div":i;return v.createElement(e,{ref:this.elementRef,id:this.id})},n.prototype.renderIframe=function(){return v.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id})},n.prototype.getScriptSrc=function(){if(typeof this.props.tinymceScriptSrc=="string")return this.props.tinymceScriptSrc;var i=this.props.cloudChannel,e=this.props.apiKey?this.props.apiKey:"no-api-key";return"https://cdn.tiny.cloud/1/".concat(e,"/tinymce/").concat(i,"/tinymce.min.js")},n.prototype.getInitialValue=function(){return typeof this.props.initialValue=="string"?this.props.initialValue:typeof this.props.value=="string"?this.props.value:""},n.prototype.bindHandlers=function(i){var e=this;if(this.editor!==void 0){bn(this.editor,i,this.props,this.boundHandlers,function(s){return e.props[s]});var t=function(s){return s.onEditorChange!==void 0||s.value!==void 0},r=t(i),a=t(this.props);!r&&a?(this.editor.on(Q(),this.handleEditorChange),this.editor.on(Z(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):r&&!a&&(this.editor.off(Q(),this.handleEditorChange),this.editor.off(Z(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},n.propTypes=pn,n.defaultProps={cloudChannel:"5"},n}(v.Component);function kn({initialValue:o,value:n,disabled:i,handleChange:e,handleSave:t,titleButton:r,height:a},s){const c=v.useRef(null);v.useEffect(()=>{i===!0&&(c.current.innerHTML=o)},[i,o]);const l=v.useCallback((f,b)=>{e&&e(f)},[e]),h=v.useCallback(f=>{t&&t(f)},[t]),p=v.useCallback(()=>`savedata | undo redo | formatselect | bold italic | contenteditable | alignleft aligncenter alignright alignjustify 
        | table tableinsertdialog tablecellprops tableprops | fullscreen | removeformat | code`,[]);return v.useImperativeHandle(s,()=>c.current),d.jsxDEV(d.Fragment,{children:i?d.jsxDEV("div",{className:"editor-view",ref:c},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/ReportTemplate/Components/Editor/index.jsx",lineNumber:41,columnNumber:9},this):d.jsxDEV(wn,{initialValue:o,value:n,init:{height:a||250,menubar:!1,plugins:"table code lists fullscreen",toolbar:p(),setup:f=>{f.ui.registry.addButton("contenteditable",{text:"",icon:"highlight-bg-color",onAction:b=>{f.insertContent('&nbsp;<span contenteditable="true" style="display: inline-block; border-bottom: 2px dotted #c8ced3; min-width: 50px"></span>&nbsp;')}}),f.ui.registry.addButton("savedata",{text:r||"Lưu",icon:"notice",onAction:b=>h(f.getContent({format:"html"}))})},forced_root_block:"div",entity_encoding:"numeric",font_formats:"Times New Roman"},tinymceScriptSrc:"https://cdnjs.cloudflare.com/ajax/libs/tinymce/5.6.2/tinymce.min.js",scriptLoading:{async:!0},onEditorChange:l,disabled:i},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/ReportTemplate/Components/Editor/index.jsx",lineNumber:43,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/ReportTemplate/Components/Editor/index.jsx",lineNumber:39,columnNumber:5},this)}v.forwardRef(kn);const jn=o=>{const[n,i]=v.useState(0),e=t=>{n!==t&&i(t)};return d.jsxDEV("div",{className:"win10-container",children:d.jsxDEV(Ne,{children:[d.jsxDEV(A,{md:"12",children:d.jsxDEV(Se,{tabs:!0,children:o.data&&o.data.map((t,r)=>{let a=t.MaChucNang;const s=De.filter(c=>c.ma_chuc_nang===a);return a?s[0]&&s[0].access&&d.jsxDEV(ce,{children:d.jsxDEV(de,{className:T({active:n===r}),onClick:()=>{e(r),o.onChangeTab&&o.onChangeTab(r)},children:t.TabName},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:39,columnNumber:25},globalThis)},r,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:38,columnNumber:23},globalThis):d.jsxDEV(ce,{children:d.jsxDEV(de,{className:T({active:n===r}),onClick:()=>{e(r),o.onChangeTab&&o.onChangeTab(r)},children:t.TabName},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:26,columnNumber:23},globalThis)},r,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:25,columnNumber:21},globalThis)})},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:17,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:16,columnNumber:9},globalThis),d.jsxDEV(A,{md:"12",children:d.jsxDEV(Le,{activeTab:n,style:{border:"none"},children:o.data&&o.data.map((t,r)=>d.jsxDEV(He,{tabId:r,children:n===r&&t.TabContent},r,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:60,columnNumber:19},globalThis))},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:56,columnNumber:11},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:55,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:15,columnNumber:7},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/childcomp/tabs/Tabs1.jsx",lineNumber:14,columnNumber:5},globalThis)};function xn({MaBaoCao:o}){const[n,i]=v.useState(!0),[e,t]=v.useState(null),r=v.useCallback(()=>{k("HeaderFooter/Variable","GET",null,{odata:!1}).then(a=>{t(a)})},[]);return v.useEffect(()=>{r()},[r]),d.jsxDEV(N.Fragment,{children:d.jsxDEV(K,{children:[d.jsxDEV(ne,{onClick:()=>i(!n),children:"Model"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:27,columnNumber:9},this),d.jsxDEV(G,{className:"p-0",children:d.jsxDEV(Be,{isOpen:n,children:d.jsxDEV(Re,{children:e&&e.map((a,s)=>d.jsxDEV(Pe,{className:"p-0",children:[d.jsxDEV("b",{children:a.Kieu},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:35,columnNumber:23},this)," : ",a.Mota]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:34,columnNumber:21},this))},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:30,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:29,columnNumber:11},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:28,columnNumber:9},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:26,columnNumber:7},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/BaoCaoFunctionsAndModel.jsx",lineNumber:25,columnNumber:5},this)}function ee(o){const{type:n,Id:i,IdMauBaoCao2:e}=o,[t,r]=v.useState({}),a=v.useCallback(()=>{i&&k(`DM_MauBaoCao(guid'${i}')`,"GET",null).then(c=>{r(c)}),e&&k(`DM_MauBaoCao_HTML('${e}')`,"GET",null).then(c=>{r(c)})},[i,e]);v.useEffect(()=>{e&&a()},[e,a]),v.useEffect(()=>{i&&a()},[i,a]);const s=v.useCallback(()=>{let c={Id:i,IdMauBaoCao2:e,[n]:t[n]},l={[n]:t[n]};i&&k(`DM_MauBaoCao(guid'${c.Id}')`,"PATCH",JSON.stringify(c)).then(h=>{q("Cập nhật thành công","THÔNG BÁO")}).catch(h=>F("Cập nhật không thành công","Thông báo")),e&&k(`DM_MauBaoCao_HTML('${c.IdMauBaoCao2}')`,"PATCH",JSON.stringify(l)).then(h=>{q("Cập nhật thành công","THÔNG BÁO")}).catch(h=>F("Cập nhật không thành công","Thông báo"))},[i,e,t,n]);return d.jsxDEV("div",{children:d.jsxDEV("div",{className:"edit-mau-in",children:[d.jsxDEV(te,{className:"me-2 btn btn-success btn-sm",onClick:s,children:"Cập nhật"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:65,columnNumber:9},this),d.jsxDEV(te,{className:"btnXemTruoc btn-sm",color:"primary",children:"Xem trước"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:68,columnNumber:9},this),d.jsxDEV(Ne,{children:[d.jsxDEV(A,{md:"9",children:d.jsxDEV(Ve,{style:{height:"100%",color:"black"},value:t[n],onChange:c=>r({...t,[n]:c.target.value})},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:73,columnNumber:13},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:72,columnNumber:11},this),d.jsxDEV(A,{md:"3",children:[d.jsxDEV(xn,{data:t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:80,columnNumber:13},this),d.jsxDEV("div",{children:"<!DOCTYPE html>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:81,columnNumber:13},this),d.jsxDEV("div",{children:"<html>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:82,columnNumber:13},this),d.jsxDEV("div",{children:"<head>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:83,columnNumber:13},this),d.jsxDEV("div",{children:'<meta charset="UTF-8"/>'},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:84,columnNumber:13},this),d.jsxDEV("div",{children:"</head>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:85,columnNumber:13},this),d.jsxDEV("div",{children:"<body>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:86,columnNumber:13},this),d.jsxDEV("div",{children:""},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:87,columnNumber:13},this),d.jsxDEV("div",{children:"</body>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:88,columnNumber:13},this),d.jsxDEV("div",{children:"</html>"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:89,columnNumber:13},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:79,columnNumber:11},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:71,columnNumber:9},this)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:64,columnNumber:7},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/FormEdit.jsx",lineNumber:63,columnNumber:5},this)}var I={MaMauBaoCao:{field_name:"MaMauBaoCao",title:"Mã mẫu báo cáo:",type:"textbox"},CodeMauTongHop:{field_name:"CodeMauTongHop",title:"Code Mẫu tổng hợp:",type:"textbox"},IsLandscape:{field_name:"IsLandscape",title:"Chiều ngang:",type:"checkbox"},KhoGiay_Id:{field_name:"KhoGiay_Id",title:"Khổ giấy",type:"data-select",required:!0,dataSelect:{url:"DM_KhoGiay",column:["Id","Name"],value_field:"Id",text_field:"Name"}},FontSize:{field_name:"FontSize",title:"Cỡ chữ:",type:"numeric"},HieuLuc_TuNam:{field_name:"HieuLuc_TuNam",title:"Hiệu lực từ năm:",type:"date"},HieuLuc_DenNam:{field_name:"HieuLuc_DenNam",title:"Hiệu lực đến năm:",type:"date"}};const Dn=o=>{const{Id:n,reloadList:i,Id_HTML:e,IdMauBaoCao2:t}=o,[r,a]=v.useState(!0),[s,c]=v.useState(null),[l,h]=v.useState(null),[p,f]=v.useState(null),[b,C]=v.useState(null),[j,x]=v.useState(null),[D,R]=v.useState(null),xe=()=>{var g={Id:n,IdMauBaoCao2:t,IsLandscape:r,KhoGiay_Id:s,FontSize:b,HieuLuc_TuNam:j,HieuLuc_DenNam:D},M={IsLandscape:r,KhoGiay_Id:s,FontSize:b,HieuLuc_TuNam:j,HieuLuc_DenNam:D};n&&k(`DM_MauBaoCao(guid'${g.Id}')`,"PATCH",JSON.stringify(g)).then(P=>q("Cập nhật thành công","THÔNG BÁO").then(()=>{i&&i()})).catch(P=>F(P,"THÔNG BÁO")),t&&k(`DM_MauBaoCao_HTML('${g.IdMauBaoCao2}')`,"PATCH",JSON.stringify(M)).then(P=>q("Cập nhật thành công","THÔNG BÁO").then(()=>{i&&i()})).catch(P=>F(P,"THÔNG BÁO"))},V=v.useCallback(()=>{n&&k(`DM_MauBaoCao(guid'${n}')`,"GET",null).then(g=>{a(g.IsLandscape),c(g.KhoGiay_Id),h(g.MaMauBaoCao),f(g.MauTongHop_Code),C(g.FontSize),x(g.HieuLuc_TuNam),R(g.HieuLuc_DenNam)}),t&&k(`DM_MauBaoCao_HTML(${t})`,"GET",null).then(g=>{a(g.IsLandscape),c(g.KhoGiay_Id),h(g.MaMauBaoCao),f(g.MauTongHop_Code),C(g.FontSize),x(g.HieuLuc_TuNam),R(g.HieuLuc_DenNam)})},[n,t]);return v.useEffect(()=>{t&&V()},[t,e,V]),v.useEffect(()=>{n&&V()},[n,V]),d.jsxDEV("div",{className:"edit-mau-in",children:[d.jsxDEV(te,{className:"me-2 btn btn-success btn-sm",onClick:xe,children:"Cập nhật"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:162,columnNumber:7},globalThis),d.jsxDEV("div",{className:"edit-thiet-lap-khac",children:[d.jsxDEV(K,{className:"mb-3",children:[d.jsxDEV(ne,{children:d.jsxDEV("b",{children:"Thiết lập khổ giấy"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:169,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:168,columnNumber:11},globalThis),d.jsxDEV(G,{children:[d.jsxDEV(_,{data:I.IsLandscape,value:r,onChange:(g,M)=>a(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:172,columnNumber:13},globalThis),d.jsxDEV(_,{data:I.KhoGiay_Id,value:s,onChange:(g,M)=>c(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:173,columnNumber:13},globalThis),d.jsxDEV(_,{data:I.MaMauBaoCao,value:l,onChange:(g,M)=>h(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:174,columnNumber:13},globalThis),d.jsxDEV(_,{data:I.CodeMauTongHop,value:p,onChange:(g,M)=>f(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:179,columnNumber:13},globalThis),d.jsxDEV(_,{data:I.FontSize,value:b,onChange:(g,M)=>C(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:184,columnNumber:13},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:171,columnNumber:11},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:167,columnNumber:9},globalThis),d.jsxDEV(K,{className:"mb-3",children:[d.jsxDEV(ne,{children:d.jsxDEV("b",{children:"Thiết lập hiệu lực"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:189,columnNumber:13},globalThis)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:188,columnNumber:11},globalThis),d.jsxDEV(G,{children:[d.jsxDEV(_,{data:I.HieuLuc_TuNam,value:j,onChange:(g,M)=>x(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:192,columnNumber:13},globalThis),d.jsxDEV(_,{data:I.HieuLuc_DenNam,value:D,onChange:(g,M)=>R(M)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:193,columnNumber:13},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:191,columnNumber:11},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:187,columnNumber:9},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:166,columnNumber:7},globalThis)]},void 0,!0,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/ThietLapKhac.jsx",lineNumber:161,columnNumber:5},globalThis)};function _n({IdMauBaoCao2:o,open:n,onClose:i,IdMauBaoCao:e,title:t,IdBaoCao:r,afterCreate:a,MauBaoCao_ID:s}){return d.jsxDEV(K,{children:d.jsxDEV(G,{children:d.jsxDEV(jn,{data:[{TabName:"Header",TabContent:d.jsxDEV(ee,{Id:e,IdMauBaoCao2:o,Id_HTML:s,type:"Header"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:26,columnNumber:17},this)},{TabName:"Body",TabContent:d.jsxDEV(ee,{Id:e,IdMauBaoCao2:o,Id_HTML:s,type:"Body"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:32,columnNumber:17},this)},{TabName:"Footer",TabContent:d.jsxDEV(ee,{Id:e,IdMauBaoCao2:o,Id_HTML:s,type:"Footer"},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:38,columnNumber:17},this)},{TabName:"Thiết lập khác",TabContent:d.jsxDEV(Dn,{Id:e,Id_HTML:s,IdMauBaoCao2:o},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:43,columnNumber:27},this)}]},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:21,columnNumber:9},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/EditHeaderFooter.jsx",lineNumber:19,columnNumber:5},this)}function qn({open:o,onClose:n,IdMauBaoCao:i,title:e,MauBaoCao_ID:t,reportTemplate:r,IdMauBaoCao2:a}){return d.jsxDEV(Oe,{open:o,title:e,onClose:n,toggle:n,size:"xl",className:"dialog-mau-in",children:d.jsxDEV(Ie,{data:[{TabName:"Cấu hình mẫu kiểu 1 ",TabContent:d.jsxDEV(_n,{IdMauBaoCao2:a,IdMauBaoCao:i,Id_HTML:t},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/EditPDF.jsx",lineNumber:15,columnNumber:15},this)}]},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/EditPDF.jsx",lineNumber:10,columnNumber:7},this)},void 0,!1,{fileName:"/home/jenkins/agent/workspace/qlhncn.gdtsolutions.vn/src/views/DanhMuc/MauBaoCao/Components/EditPDF.jsx",lineNumber:9,columnNumber:5},this)}export{qn as E};