1 line
36 KiB
JavaScript
1 line
36 KiB
JavaScript
(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[6964],{59748:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(87462),o=r(47313),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M732 120c0-4.4-3.6-8-8-8H300c-4.4 0-8 3.6-8 8v148h440V120zm120 212H172c-44.2 0-80 35.8-80 80v328c0 17.7 14.3 32 32 32h168v132c0 4.4 3.6 8 8 8h424c4.4 0 8-3.6 8-8V772h168c17.7 0 32-14.3 32-32V412c0-44.2-35.8-80-80-80zM664 844H360V568h304v276zm164-360c0 4.4-3.6 8-8 8h-40c-4.4 0-8-3.6-8-8v-40c0-4.4 3.6-8 8-8h40c4.4 0 8 3.6 8 8v40z"}}]},name:"printer",theme:"filled"},a=r(16141),s=function(e,t){return o.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:i}))};var c=o.forwardRef(s)},96467:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(4942),o=r(63366),i=r(87462),a=r(47313),s=r(83061),c=r(21921),u=r(17592),l=r(77342),d=r(77430),f=r(32298);function p(e){return(0,f.Z)("MuiDialogContent",e)}(0,d.Z)("MuiDialogContent",["root","dividers"]);var h=r(93174),v=r(46417),y=["className","dividers"],m=(0,u.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:function(e,t){var r=e.ownerState;return[t.root,r.dividers&&t.dividers]}})((function(e){var t=e.theme,r=e.ownerState;return(0,i.Z)({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},r.dividers?{padding:"16px 24px",borderTop:"1px solid ".concat((t.vars||t).palette.divider),borderBottom:"1px solid ".concat((t.vars||t).palette.divider)}:(0,n.Z)({},".".concat(h.Z.root," + &"),{paddingTop:0}))})),g=a.forwardRef((function(e,t){var r=(0,l.Z)({props:e,name:"MuiDialogContent"}),n=r.className,a=r.dividers,u=void 0!==a&&a,d=(0,o.Z)(r,y),f=(0,i.Z)({},r,{dividers:u}),h=function(e){var t=e.classes,r={root:["root",e.dividers&&"dividers"]};return(0,c.Z)(r,p,t)}(f);return(0,v.jsx)(m,(0,i.Z)({className:(0,s.Z)(h.root,n),ownerState:f,ref:t},d))}))},93174:function(e,t,r){"use strict";r.d(t,{a:function(){return i}});var n=r(77430),o=r(32298);function i(e){return(0,o.Z)("MuiDialogTitle",e)}var a=(0,n.Z)("MuiDialogTitle",["root"]);t.Z=a},94469:function(e,t,r){"use strict";var n=r(4942),o=r(63366),i=r(87462),a=r(47313),s=r(83061),c=r(21921),u=r(28334),l=r(91615),d=r(10387),f=r(32530),p=r(70501),h=r(77342),v=r(17592),y=r(85560),m=r(63909),g=r(91554),b=r(19860),w=r(46417),_=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],P=(0,v.ZP)(g.Z,{name:"MuiDialog",slot:"Backdrop",overrides:function(e,t){return t.backdrop}})({zIndex:-1}),S=(0,v.ZP)(d.Z,{name:"MuiDialog",slot:"Root",overridesResolver:function(e,t){return t.root}})({"@media print":{position:"absolute !important"}}),x=(0,v.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:function(e,t){var r=e.ownerState;return[t.container,t["scroll".concat((0,l.Z)(r.scroll))]]}})((function(e){var t=e.ownerState;return(0,i.Z)({height:"100%","@media print":{height:"auto"},outline:0},"paper"===t.scroll&&{display:"flex",justifyContent:"center",alignItems:"center"},"body"===t.scroll&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})})),M=(0,v.ZP)(p.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:function(e,t){var r=e.ownerState;return[t.paper,t["scrollPaper".concat((0,l.Z)(r.scroll))],t["paperWidth".concat((0,l.Z)(String(r.maxWidth)))],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})((function(e){var t=e.theme,r=e.ownerState;return(0,i.Z)({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},"paper"===r.scroll&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},"body"===r.scroll&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!r.maxWidth&&{maxWidth:"calc(100% - 64px)"},"xs"===r.maxWidth&&(0,n.Z)({maxWidth:"px"===t.breakpoints.unit?Math.max(t.breakpoints.values.xs,444):"".concat(t.breakpoints.values.xs).concat(t.breakpoints.unit)},"&.".concat(y.Z.paperScrollBody),(0,n.Z)({},t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})),r.maxWidth&&"xs"!==r.maxWidth&&(0,n.Z)({maxWidth:"".concat(t.breakpoints.values[r.maxWidth]).concat(t.breakpoints.unit)},"&.".concat(y.Z.paperScrollBody),(0,n.Z)({},t.breakpoints.down(t.breakpoints.values[r.maxWidth]+64),{maxWidth:"calc(100% - 64px)"})),r.fullWidth&&{width:"calc(100% - 64px)"},r.fullScreen&&(0,n.Z)({margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0},"&.".concat(y.Z.paperScrollBody),{margin:0,maxWidth:"100%"}))})),O=a.forwardRef((function(e,t){var r=(0,h.Z)({props:e,name:"MuiDialog"}),n=(0,b.Z)(),d={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},v=r["aria-describedby"],g=r["aria-labelledby"],O=r.BackdropComponent,D=r.BackdropProps,k=r.children,T=r.className,C=r.disableEscapeKeyDown,$=void 0!==C&&C,j=r.fullScreen,E=void 0!==j&&j,Z=r.fullWidth,A=void 0!==Z&&Z,W=r.maxWidth,R=void 0===W?"sm":W,I=r.onBackdropClick,F=r.onClose,N=r.open,B=r.PaperComponent,L=void 0===B?p.Z:B,H=r.PaperProps,Y=void 0===H?{}:H,q=r.scroll,z=void 0===q?"paper":q,V=r.TransitionComponent,G=void 0===V?f.Z:V,U=r.transitionDuration,K=void 0===U?d:U,J=r.TransitionProps,X=(0,o.Z)(r,_),Q=(0,i.Z)({},r,{disableEscapeKeyDown:$,fullScreen:E,fullWidth:A,maxWidth:R,scroll:z}),ee=function(e){var t=e.classes,r=e.scroll,n=e.maxWidth,o=e.fullWidth,i=e.fullScreen,a={root:["root"],container:["container","scroll".concat((0,l.Z)(r))],paper:["paper","paperScroll".concat((0,l.Z)(r)),"paperWidth".concat((0,l.Z)(String(n))),o&&"paperFullWidth",i&&"paperFullScreen"]};return(0,c.Z)(a,y.D,t)}(Q),te=a.useRef(),re=(0,u.Z)(g),ne=a.useMemo((function(){return{titleId:re}}),[re]);return(0,w.jsx)(S,(0,i.Z)({className:(0,s.Z)(ee.root,T),closeAfterTransition:!0,components:{Backdrop:P},componentsProps:{backdrop:(0,i.Z)({transitionDuration:K,as:O},D)},disableEscapeKeyDown:$,onClose:F,open:N,ref:t,onClick:function(e){te.current&&(te.current=null,I&&I(e),F&&F(e,"backdropClick"))},ownerState:Q},X,{children:(0,w.jsx)(G,(0,i.Z)({appear:!0,in:N,timeout:K,role:"presentation"},J,{children:(0,w.jsx)(x,{className:(0,s.Z)(ee.container),onMouseDown:function(e){te.current=e.target===e.currentTarget},ownerState:Q,children:(0,w.jsx)(M,(0,i.Z)({as:L,elevation:24,role:"dialog","aria-describedby":v,"aria-labelledby":re},Y,{className:(0,s.Z)(ee.paper,Y.className),ownerState:Q,children:(0,w.jsx)(m.Z.Provider,{value:ne,children:k})}))})}))}))}));t.Z=O},63909:function(e,t,r){"use strict";var n=r(47313).createContext({});t.Z=n},85560:function(e,t,r){"use strict";r.d(t,{D:function(){return i}});var n=r(77430),o=r(32298);function i(e){return(0,o.Z)("MuiDialog",e)}var a=(0,n.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);t.Z=a},10658:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",c="week",u="month",l="quarter",d="year",f="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},m=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:m,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+m(n,2,"0")+":"+m(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,a=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:c,d:s,D:f,h:a,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var _="$isDayjsObject",P=function(e){return e instanceof O||!(!e||!e[_])},S=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!n&&o&&(b=o),o||!n&&b},x=function(e,t){if(P(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new O(r)},M=g;M.l=S,M.i=P,M.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function y(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var m=y.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(M.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return M},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(e,t){var r=x(e);return this.startOf(t)<=r&&r<=this.endOf(t)},m.isAfter=function(e,t){return x(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<x(e)},m.$g=function(e,t,r){return M.u(e)?this[t]:this.set(r,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var r=this,n=!!M.u(t)||t,l=M.p(e),p=function(e,t){var o=M.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(s)},h=function(e,t){return M.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return n?p(1,0):p(31,11);case u:return n?p(1,y):p(0,y+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(n?m-w:m+(6-w),y);case s:case f:return h(g+"Hours",0);case a:return h(g+"Minutes",1);case i:return h(g+"Seconds",2);case o:return h(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var r,c=M.p(e),l="set"+(this.$u?"UTC":""),p=(r={},r[s]=l+"Date",r[f]=l+"Date",r[u]=l+"Month",r[d]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===s?this.$D+(t-this.$W):t;if(c===u||c===d){var v=this.clone().set(f,1);v.$d[p](h),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[M.p(e)]()},m.add=function(n,l){var f,p=this;n=Number(n);var h=M.p(l),v=function(e){var t=x(p);return M.w(t.date(t.date()+Math.round(e*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===d)return this.set(d,this.$y+n);if(h===s)return v(1);if(h===c)return v(7);var y=(f={},f[i]=t,f[a]=r,f[o]=e,f)[h]||1,m=this.$d.getTime()+n*y;return M.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=M.z(this),i=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,d=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},f=function(e){return M.s(i%12||12,e,"0")},h=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(v,(function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return M.s(t.$y,4,"0");case"M":return s+1;case"MM":return M.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return t.$D;case"DD":return M.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(r.weekdaysMin,t.$W,c,2);case"ddd":return d(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return M.s(i,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return M.s(a,2,"0");case"s":return String(t.$s);case"ss":return M.s(t.$s,2,"0");case"SSS":return M.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,f,p){var h,v=this,y=M.p(f),m=x(n),g=(m.utcOffset()-this.utcOffset())*t,b=this-m,w=function(){return M.m(v,m)};switch(y){case d:h=w()/12;break;case u:h=w();break;case l:h=w()/3;break;case c:h=(b-g)/6048e5;break;case s:h=(b-g)/864e5;break;case a:h=b/r;break;case i:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:M.a(h)},m.daysInMonth=function(){return this.endOf(u).$D},m.$locale=function(){return w[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=S(e,t,!0);return n&&(r.$L=n),r},m.clone=function(){return M.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),D=O.prototype;return x.prototype=D,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,O,x),e.$i=!0),x},x.locale=S,x.isDayjs=P,x.unix=function(e){return x(1e3*e)},x.en=w[b],x.Ls=w,x.p={},x}()},43295:function(e,t,r){var n,o;"undefined"!=typeof self&&self,e.exports=(n=r(47313),o=r(1168),function(){"use strict";var e={328:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.PrintContextConsumer=t.PrintContext=void 0;var n=r(496),o=Object.prototype.hasOwnProperty.call(n,"createContext");t.PrintContext=o?n.createContext({}):null,t.PrintContextConsumer=t.PrintContext?t.PrintContext.Consumer:function(){return null}},428:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactToPrint=void 0;var n=r(316),o=r(496),i=r(190),a=r(328),s=r(940),c=function(e){function t(){var t=e.apply(this,n.__spreadArray([],n.__read(arguments),!1))||this;return t.startPrint=function(e){var r=t.props,n=r.onAfterPrint,o=r.onPrintError,i=r.print,a=r.documentTitle;setTimeout((function(){var r,s;if(e.contentWindow)if(e.contentWindow.focus(),i)i(e).then((function(){return null==n?void 0:n()})).then((function(){return t.handleRemoveIframe()})).catch((function(e){o?o("print",e):t.logMessages(["An error was thrown by the specified `print` function"])}));else{if(e.contentWindow.print){var c=null!==(s=null===(r=e.contentDocument)||void 0===r?void 0:r.title)&&void 0!==s?s:"",u=e.ownerDocument.title;a&&(e.ownerDocument.title=a,e.contentDocument&&(e.contentDocument.title=a)),e.contentWindow.print(),a&&(e.ownerDocument.title=u,e.contentDocument&&(e.contentDocument.title=c))}else t.logMessages(["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."]);null==n||n(),t.handleRemoveIframe()}else t.logMessages(["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/gregnb/react-to-print/issues/"])}),500)},t.triggerPrint=function(e){var r=t.props,n=r.onBeforePrint,o=r.onPrintError;if(n){var i=n();i&&"function"==typeof i.then?i.then((function(){t.startPrint(e)})).catch((function(e){o&&o("onBeforePrint",e)})):t.startPrint(e)}else t.startPrint(e)},t.handlePrint=function(e){var r=t.props,o=r.bodyClass,a=r.content,s=r.copyStyles,c=r.fonts,u=r.pageStyle,l=r.nonce,d="function"==typeof e?e():null;if(d&&"function"==typeof a&&t.logMessages(['"react-to-print" received a `content` prop and a content param passed the callback return by `useReactToPrint. The `content` prop will be ignored.'],"warning"),d||"function"!=typeof a||(d=a()),void 0!==d)if(null!==d){var f=document.createElement("iframe");f.width="".concat(document.documentElement.clientWidth,"px"),f.height="".concat(document.documentElement.clientHeight,"px"),f.style.position="absolute",f.style.top="-".concat(document.documentElement.clientHeight+100,"px"),f.style.left="-".concat(document.documentElement.clientWidth+100,"px"),f.id="printWindow",f.srcdoc="<!DOCTYPE html>";var p=(0,i.findDOMNode)(d);if(p){var h=p.cloneNode(!0),v=h instanceof Text,y=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),m=v?[]:h.querySelectorAll("img"),g=v?[]:h.querySelectorAll("video"),b=c?c.length:0;t.numResourcesToLoad=y.length+m.length+g.length+b,t.resourcesLoaded=[],t.resourcesErrored=[];var w=function(e,r){t.resourcesLoaded.includes(e)?t.logMessages(["Tried to mark a resource that has already been handled",e],"debug"):(r?(t.logMessages(n.__spreadArray(['"react-to-print" was unable to load a resource but will continue attempting to print the page'],n.__read(r),!1)),t.resourcesErrored.push(e)):t.resourcesLoaded.push(e),t.resourcesLoaded.length+t.resourcesErrored.length===t.numResourcesToLoad&&t.triggerPrint(f))};f.onload=function(){var e,r,i,a;f.onload=null;var d=f.contentDocument||(null===(r=f.contentWindow)||void 0===r?void 0:r.document);if(d){d.body.appendChild(h),c&&((null===(i=f.contentDocument)||void 0===i?void 0:i.fonts)&&(null===(a=f.contentWindow)||void 0===a?void 0:a.FontFace)?c.forEach((function(e){var t=new FontFace(e.family,e.source,{weight:e.weight,style:e.style});f.contentDocument.fonts.add(t),t.loaded.then((function(){w(t)})).catch((function(e){w(t,["Failed loading the font:",t,"Load error:",e])}))})):(c.forEach((function(e){return w(e)})),t.logMessages(['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'])));var y="function"==typeof u?u():u;if("string"!=typeof y)t.logMessages(['"react-to-print" expected a "string" from `pageStyle` but received "'.concat(typeof y,'". Styles from `pageStyle` will not be applied.')]);else{var b=d.createElement("style");l&&(b.setAttribute("nonce",l),d.head.setAttribute("nonce",l)),b.appendChild(d.createTextNode(y)),d.head.appendChild(b)}if(o&&(e=d.body.classList).add.apply(e,n.__spreadArray([],n.__read(o.split(" ")),!1)),!v){for(var _=v?[]:p.querySelectorAll("canvas"),P=d.querySelectorAll("canvas"),S=0;S<_.length;++S){var x=_[S],M=P[S].getContext("2d");M&&M.drawImage(x,0,0)}var O=function(e){var t=m[e],r=t.getAttribute("src");if(r){var n=new Image;n.onload=function(){return w(t)},n.onerror=function(e,r,n,o,i){return w(t,["Error loading <img>",t,"Error",i])},n.src=r}else w(t,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it. The <img> is:',t])};for(S=0;S<m.length;S++)O(S);var D=function(e){var t=g[e];t.preload="auto";var r=t.getAttribute("poster");if(r){var n=new Image;n.onload=function(){return w(t)},n.onerror=function(e,n,o,i,a){return w(t,["Error loading video poster",r,"for video",t,"Error:",a])},n.src=r}else t.readyState>=2?w(t):(t.onloadeddata=function(){return w(t)},t.onerror=function(e,r,n,o,i){return w(t,["Error loading video",t,"Error",i])},t.onstalled=function(){return w(t,["Loading video stalled, skipping",t])})};for(S=0;S<g.length;S++)D(S);var k="input",T=p.querySelectorAll(k),C=d.querySelectorAll(k);for(S=0;S<T.length;S++)C[S].value=T[S].value;var $="input[type=checkbox],input[type=radio]",j=p.querySelectorAll($),E=d.querySelectorAll($);for(S=0;S<j.length;S++)E[S].checked=j[S].checked;var Z="select",A=p.querySelectorAll(Z),W=d.querySelectorAll(Z);for(S=0;S<A.length;S++)W[S].value=A[S].value}if(s)for(var R=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']"),I=function(e,r){var n=R[e];if("style"===n.tagName.toLowerCase()){var o=d.createElement(n.tagName),i=n.sheet;if(i){var a="";try{for(var s=i.cssRules.length,c=0;c<s;++c)"string"==typeof i.cssRules[c].cssText&&(a+="".concat(i.cssRules[c].cssText,"\r\n"))}catch(e){t.logMessages(["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/gregnb/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",n],"warning")}o.setAttribute("id","react-to-print-".concat(e)),l&&o.setAttribute("nonce",l),o.appendChild(d.createTextNode(a)),d.head.appendChild(o)}}else if(n.getAttribute("href"))if(n.hasAttribute("disabled"))t.logMessages(["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",n],"warning"),w(n);else{for(var u=d.createElement(n.tagName),f=(c=0,n.attributes.length);c<f;++c){var p=n.attributes[c];p&&u.setAttribute(p.nodeName,p.nodeValue||"")}u.onload=function(){return w(u)},u.onerror=function(e,t,r,n,o){return w(u,["Failed to load",u,"Error:",o])},l&&u.setAttribute("nonce",l),d.head.appendChild(u)}else t.logMessages(["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",n],"warning"),w(n)},F=(S=0,R.length);S<F;++S)I(S)}0!==t.numResourcesToLoad&&s||t.triggerPrint(f)},t.handleRemoveIframe(!0),document.body.appendChild(f)}else t.logMessages(['"react-to-print" could not locate the DOM node corresponding with the `content` prop'])}else t.logMessages(['There is nothing to print because the "content" prop returned "null". Please ensure "content" is renderable before allowing "react-to-print" to be called.']);else t.logMessages(["To print a functional component ensure it is wrapped with `React.forwardRef`, and ensure the forwarded ref is used. See the README for an example: https://github.com/gregnb/react-to-print#examples"])},t.handleRemoveIframe=function(e){var r=t.props.removeAfterPrint;if(e||r){var n=document.getElementById("printWindow");n&&document.body.removeChild(n)}},t.logMessages=function(e,r){void 0===r&&(r="error"),t.props.suppressErrors||("error"===r?console.error(e):"warning"===r?console.warn(e):"debug"===r&&console.debug(e))},t}return n.__extends(t,e),t.prototype.handleClick=function(e,t){var r=this,n=this.props,o=n.onBeforeGetContent,i=n.onPrintError;if(o){var a=o();a&&"function"==typeof a.then?a.then((function(){return r.handlePrint(t)})).catch((function(e){i&&i("onBeforeGetContent",e)})):this.handlePrint(t)}else this.handlePrint(t)},t.prototype.render=function(){var e=this.props,t=e.children,r=e.trigger;if(r)return o.cloneElement(r(),{onClick:this.handleClick.bind(this)});if(!a.PrintContext)return this.logMessages(['"react-to-print" requires React ^16.3.0 to be able to use "PrintContext"']),null;var n={handlePrint:this.handleClick.bind(this)};return o.createElement(a.PrintContext.Provider,{value:n},t)},t.defaultProps=s.defaultProps,t}(o.Component);t.ReactToPrint=c},940:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultProps=void 0,t.defaultProps={copyStyles:!0,pageStyle:"\n @page {\n /* Remove browser default header (title) and footer (url) */\n margin: 0;\n }\n @media print {\n body {\n /* Tell browsers to print background colors */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n color-adjust: exact; /* Firefox */\n }\n }\n ",removeAfterPrint:!1,suppressErrors:!1}},892:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.useReactToPrint=void 0;var n=r(316),o=r(496),i=r(428),a=r(940),s=r(860),c=Object.prototype.hasOwnProperty.call(o,"useMemo")&&Object.prototype.hasOwnProperty.call(o,"useCallback");t.useReactToPrint=function(e){if(!c)return e.suppressErrors||console.error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"'),function(){throw new Error('"react-to-print" requires React ^16.8.0 to be able to use "useReactToPrint"')};var t=o.useMemo((function(){return new i.ReactToPrint(n.__assign(n.__assign({},a.defaultProps),e))}),[e]);return o.useCallback((function(e,r){return(0,s.wrapCallbackWithArgs)(t,t.handleClick,r)(e)}),[t])}},860:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapCallbackWithArgs=void 0;var n=r(316);t.wrapCallbackWithArgs=function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return t.apply(e,n.__spreadArray(n.__spreadArray([],n.__read(o),!1),n.__read(r),!1))}}},496:function(e){e.exports=n},190:function(e){e.exports=o},316:function(e,t,r){r.r(t),r.d(t,{__addDisposableResource:function(){return Z},__assign:function(){return i},__asyncDelegator:function(){return M},__asyncGenerator:function(){return x},__asyncValues:function(){return O},__await:function(){return S},__awaiter:function(){return h},__classPrivateFieldGet:function(){return $},__classPrivateFieldIn:function(){return E},__classPrivateFieldSet:function(){return j},__createBinding:function(){return y},__decorate:function(){return s},__disposeResources:function(){return W},__esDecorate:function(){return u},__exportStar:function(){return m},__extends:function(){return o},__generator:function(){return v},__importDefault:function(){return C},__importStar:function(){return T},__makeTemplateObject:function(){return D},__metadata:function(){return p},__param:function(){return c},__propKey:function(){return d},__read:function(){return b},__rest:function(){return a},__runInitializers:function(){return l},__setFunctionName:function(){return f},__spread:function(){return w},__spreadArray:function(){return P},__spreadArrays:function(){return _},__values:function(){return g}});var n=function(e,t){return n=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])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function c(e,t){return function(r,n){t(r,n,e)}}function u(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,p=r.length-1;p>=0;p--){var h={};for(var v in n)h[v]="access"===v?{}:n[v];for(var v in n.access)h.access[v]=n.access[v];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var y=(0,r[p])("accessor"===c?{get:d.get,set:d.set}:d[u],h);if("accessor"===c){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=a(y.get))&&(d.get=s),(s=a(y.set))&&(d.set=s),(s=a(y.init))&&o.unshift(s)}else(s=a(y))&&("field"===c?o.unshift(s):d[u]=s)}l&&Object.defineProperty(l,n.name,d),f=!0}function l(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}function v(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var y=Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||y(t,e,r)}function g(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function _(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function P(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function M(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,o,(t=e[r](t)).done,t.value)}))}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var k=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return k(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function $(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function j(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function E(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Z(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var A="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function W(e){function t(t){e.error=e.hasError?new A(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,(function(e){return t(e),r()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}t.default={__extends:o,__assign:i,__rest:a,__decorate:s,__param:c,__metadata:p,__awaiter:h,__generator:v,__createBinding:y,__exportStar:m,__values:g,__read:b,__spread:w,__spreadArrays:_,__spreadArray:P,__await:S,__asyncGenerator:x,__asyncDelegator:M,__asyncValues:O,__makeTemplateObject:D,__importStar:T,__importDefault:C,__classPrivateFieldGet:$,__classPrivateFieldSet:j,__classPrivateFieldIn:E,__addDisposableResource:Z,__disposeResources:W}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.useReactToPrint=e.ReactToPrint=e.PrintContextConsumer=void 0;var t=r(328);Object.defineProperty(e,"PrintContextConsumer",{enumerable:!0,get:function(){return t.PrintContextConsumer}});var n=r(428);Object.defineProperty(e,"ReactToPrint",{enumerable:!0,get:function(){return n.ReactToPrint}});var o=r(892);Object.defineProperty(e,"useReactToPrint",{enumerable:!0,get:function(){return o.useReactToPrint}});var a=r(428);e.default=a.ReactToPrint}(),i}())}}]); |