1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2507],{334:e=>{e.exports={"print-button":"ButtonWithPrintIcon_print-button__Y_8km","-inbutton":"ButtonWithPrintIcon_-inbutton__Y9Q8a",contents:"ButtonWithPrintIcon_contents__A3Ddb",icon:"ButtonWithPrintIcon_icon__vg8u5",children:"ButtonWithPrintIcon_children__gf5Gx",fadeIn:"ButtonWithPrintIcon_fadeIn__PCF2I",slideIn:"ButtonWithPrintIcon_slideIn__uovjo",scaleIn:"ButtonWithPrintIcon_scaleIn__eCWkd"}},3445:e=>{e.exports={"myremodel-preview":"preview_myremodel-preview__4Bqr1",head:"preview_head__gLnH4",back:"preview_back__Nky1L",icon:"preview_icon__Y17s5",text:"preview_text__9Vs33","reform-info":"preview_reform-info__vMl4H",title:"preview_title__NulBh","info-detail":"preview_info-detail__dR_eK",heading:"preview_heading__3yd12",info:"preview_info__c8a3a",data:"preview_data__3EUfG","reform-parts":"preview_reform-parts__7_arv",images:"preview_images__4qOt_",image:"preview_image__uT6Da","image-list":"preview_image-list__sAS_m",content:"preview_content__E1md2","-pdf":"preview_-pdf__AJ4XP","upload-images":"preview_upload-images__SF75B","free-memo":"preview_free-memo__JHBlD",memo:"preview_memo__zug9k",fadeIn:"preview_fadeIn__ZDLtg",slideIn:"preview_slideIn__2JDoA",scaleIn:"preview_scaleIn__tSDXS"}},8247:(e,t,n)=>{"use strict";n.d(t,{h:()=>l});var r=n(661);let l=e=>e&&e.length?[...e].sort((e,t)=>{let n=r.S5.findIndex(t=>t.value===e.part),l=r.S5.findIndex(e=>e.value===t.part),a=-1===n?Number.MAX_SAFE_INTEGER:n,o=-1===l?Number.MAX_SAFE_INTEGER:l;return a!==o?a-o:(e.sortNumber||0)-(t.sortNumber||0)}):[]},8491:(e,t,n)=>{"use strict";n.d(t,{LH:()=>r,Rx:()=>l,ZN:()=>o,ZU:()=>i,qg:()=>s,uN:()=>a});let r={zero:0,one:1,two:2,three:3,four:4,five:5,six:6},l={one:1,two:2,three:3,four:4,five:5,six:6},a={none:0,partner:1,child:2,parent:3,grandChild:4,grandParent:5,other:6,pet:7};var o=function(e){return e.detachedHome="detachedHome",e.apartmentHouse="apartmentHouse",e.other="other",e}({});let s={wooden:"wooden",steelFramework:"steelFrame",RC:"rcMethod",other:"other"};var i=function(e){return e.sooner="sooner",e.inOneMonth="inOneMonth",e.inThreeMonth="inThreeMonth",e.overThreeMonth="overThreeMonth",e.notDecided="notDecided",e}({})},12602:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/mypage/myremodel/preview",function(){return n(50149)}])},50149:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>y,default:()=>j});var r=n(37876),l=n(15039),a=n.n(l),o=n(89099),s=n(14232),i=n(98110),d=n(44558),c=n(72453),u=n(51316),m=n(93326),h=n(1095),p=n(59600),v=n(96558),f=n(6107),g=n(20091),b=n(22308),x=n(3445),N=n.n(x),_=n(64482),w=n(8247),y=!0;let j=()=>{var e,t,n,l,x;let y=(0,o.useRouter)(),j=(0,s.useRef)(null),E=(0,i.useReactToPrint)({contentRef:j}),[P,A]=(0,s.useState)();(0,s.useEffect)(()=>{let{query:e}=y,t=Number(null==e?void 0:e.reformbaseId);isNaN(t)||(async()=>{let e=await (0,v.Mb)(t);if(!e)return;let n={...e,reformParts:(0,w.h)(e.reformParts||[])};A((0,v.vQ)(n))})()},[y]);let[S,T]=(0,s.useState)([]),[I,k]=(0,s.useState)([]),[R,C]=(0,s.useState)();(0,s.useEffect)(()=>{P&&(async()=>{try{var e;let t=await Promise.all((null==(e=P.images)?void 0:e.map(async e=>{let t=e.name.split("."),n=t[t.length-1],r=await (0,v.HL)(e.imageId);return{status:e.status,url:r?await (0,g.w4)(new File([r],e.name)):"",name:e.name,extension:n}}))||[]);T(t.filter(e=>0===e.status)),k(t.filter(e=>2===e.status))}catch(e){(0,f.$8)(e)}})()},[P]),(0,s.useEffect)(()=>{P&&(async()=>{try{var e;let t=await Promise.all((null==(e=P.remodelInfoList)?void 0:e.map(async e=>{var t;let n=(await Promise.all((null==e||null==(t=e.images)?void 0:t.map(async e=>{let t=e.name.split("."),n=t[t.length-1],r=await (0,v.p9)(e.imageId);return r?{imageId:e.imageId,url:await (0,g.w4)(new File([r],e.name)),name:e.name,extension:n}:null}))||[])).filter(e=>null!==e);return{reformPartsId:e.reformPartsId,images:n}}))||[]);C(t)}catch(e){(0,f.$8)(e)}})()},[P]);let L=(0,s.useMemo)(()=>{var e;return P?!P.methodOfProperty&&P.method?"ãã®ä»":null==(e=_.LR.find(e=>e.value===P.methodOfProperty))?void 0:e.label:""},[P]);return(0,r.jsx)(r.Fragment,{children:P?(0,r.jsxs)("div",{className:N()["myremodel-preview"],children:[(0,r.jsxs)("div",{className:N().head,children:[(0,r.jsxs)(u.A,{className:N().back,onClick:()=>{y.back()},children:[(0,r.jsx)(d.oc3,{className:N().icon}),(0,r.jsx)("span",{className:N().text,children:"æ»ã"})]}),(0,r.jsx)("div",{className:N().print,children:(0,r.jsx)(m.A,{label:"å°å·ãã",handleClick:E})})]}),(0,r.jsxs)("div",{ref:j,className:N()["reform-info"],children:[(0,r.jsx)("h2",{className:N().title,children:P.label}),(0,r.jsxs)("div",{className:N()["info-detail"],children:[(0,r.jsx)("h3",{className:N().heading,children:"ãç»é²å
容"}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãªãã©ã¼ã ã®ã¹ãããï¼"}),(0,r.jsx)("p",{className:N().data,children:P.remodelStatus})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"åå±
人æ°ï¼ãæ¬äººå«ãï¼ï¼"}),P.livingTogetherNumber&&(0,r.jsx)("p",{className:N().data,children:6===P.livingTogetherNumber?"6人以ä¸":"".concat(P.livingTogetherNumber,"人")})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"åå±
è
ï¼"}),(0,r.jsx)("p",{className:N().data,children:P.familyStructure})]}),(null==(e=P.familyStructure)?void 0:e.includes("ããã"))&&(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("div",{className:N().heading,children:"ãããã®æ
å ±ï¼"}),P.petMemo&&(0,r.jsx)("p",{className:N().value,children:P.petMemo})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãæ¬äººã®å¹´ä»£ï¼"}),P.age&&(0,r.jsxs)("p",{className:N().data,children:["".concat(10*P.age,"代"),10*P.age<=20&&"以ä¸",10*P.age>
1=70&&"以ä¸"]})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãä½ã¾ãã®ç©ä»¶ã®å½¢æ
ï¼"}),(0,r.jsx)("p",{className:N().data,children:P.type})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãä½ã¾ãã®ç©ä»¶ã®å·¥æ³ï¼"}),(0,r.jsx)("p",{className:N().data,children:L}),(0,r.jsx)("p",{className:N().data,children:P.method})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãä½ã¾ãã®ç©ä»¶ã®ç¯å¹´æ°ï¼"}),((null==(t=P.old)?void 0:t.from)||(null==(n=P.old)?void 0:n.to))&&(0,r.jsx)("p",{className:N().data,children:1!==P.old.from?99!==P.old.to?"".concat(P.old.from,"ï½").concat(P.old.to,"å¹´"):"".concat(P.old.from,"年以ä¸"):P.old.to&&"".concat(P.old.to,"å¹´æªæº")||""})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãªãã©ã¼ã äºå®ææï¼"}),P.schedule&&(0,r.jsx)("p",{className:N().data,children:P.schedule.text})]}),(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("p",{className:N().heading,children:"ãªãã©ã¼ã ã®ãäºç®ï¼"}),((null==(l=P.budget)?void 0:l.lower)||(null==(x=P.budget)?void 0:x.upper))&&(0,r.jsx)("p",{className:N().value,children:1!==P.budget.lower?9999!==P.budget.upper?"".concat(P.budget.lower,"ä¸ï½").concat(P.budget.upper,"䏿ªæº"):"".concat(P.budget.lower,"ä¸ä»¥ä¸"):"".concat(P.budget.upper,"䏿ªæº")})]})]}),(0,b._5)(P.remodelInfoList)&&(0,r.jsx)(r.Fragment,{children:P.remodelInfoList.map((e,t)=>{var n;let l=null==R||null==(n=R.find(t=>e.reformPartsId===t.reformPartsId))?void 0:n.images;return(0,r.jsxs)("div",{className:N()["reform-parts"],children:[e.area&&(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("h3",{className:N().heading,children:"æ¤è¨é¨ä½"}),(0,r.jsx)("p",{className:N().data,children:e.area})]}),e.memo&&(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("h3",{className:N().heading,children:"ã¡ã¢"}),(0,r.jsx)("p",{className:N().data,children:e.memo})]}),(0,b._5)(e.images)&&(0,r.jsxs)("div",{className:N().info,children:[(0,r.jsx)("h3",{className:N().heading,children:"åèåç"}),(0,r.jsx)("div",{className:N()["image-list"],children:e.images.map((e,t)=>{let n=null==l?void 0:l.find(t=>t.imageId==e.imageId),o=(null==n?void 0:n.extension)==="pdf";return(0,r.jsx)("div",{className:a()(N().content,{[N()["-pdf"]]:o}),children:o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{className:N().image,proportion:c.k.free,src:p.$P,alt:(null===c.A||void 0===c.A?void 0:c.A.name)||"",transparent:!0}),(0,r.jsx)("p",{className:N().text,children:null==n?void 0:n.name})]}):(0,r.jsx)(c.A,{src:(null==n?void 0:n.url)||"",alt:(null===c.A||void 0===c.A?void 0:c.A.name)||""})},"image-".concat(t))})})]})]},"parts-".concat(t))})}),(0,b._5)(S)&&(0,r.jsxs)("div",{className:N()["upload-images"],children:[(0,r.jsx)("p",{className:N().heading,children:"ã¢ãããã¼ãæ¸ã¿è³æ"}),(0,r.jsx)("div",{className:N()["image-list"],children:S.map((e,t)=>{let n=(null==e?void 0:e.extension)==="pdf";return(0,r.jsx)("div",{className:a()(N().content,{[N()["-pdf"]]:n}),children:n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{proportion:c.k.free,className:N().image,src:p.$P,alt:e.name}),(0,r.jsx)("p",{className:N().text,children:e.name})]}):(0,r.jsx)(c.A,{src:e.url,alt:e.name})},"userattachmentinfo-image-".concat(t))})})]}),(0,b._5)(I)&&(0,r.jsxs)("div",{className:N()["upload-images"],children:[(0,r.jsx)("p",{className:N().heading,children:"ã·ã§ã¼ã«ã¼ã ã¢ããã¤ã¶ã¼ããã®éä»è³æ"}),(0,r.jsx)("div",{className:N()["image-list"],children:I.map((e,t)=>{let n=(null==e?void 0:e.extension)==="pdf";return(0,r.jsx)("div",{className:a()(N().content,{[N()["-pdf"]]:n}),children:n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{proportion:c.k.free,className:N().image,src:p.$P,alt:e.name}),(0,r.jsx)("p",{className:N().text,children:e.name})]}):(0,r.jsx)(c.A,{src:e.url,alt:e.name})},"sradattachmentinfo-image-".concat(t))})})]}),P.memo&&(0,r.jsxs)("div",{className:N()["free-memo"],children:[(0,r.jsx)("p",{className:N().heading,children:"ããªã¼ã¡ã¢"}),(0,r.jsx)("p",{className:N().memo,children:P.memo})]})]})]}):(0,r.jsx)(h.A,{})})}},64482:(e,t,n)=>{"use strict";n.d(t,{F:()=>c,LP:()=>h,LR:()=>i,Lf:()=>u,OP:()=>m,RC:()=>l,Tl:()=>p,YS:()=>a,aI:()=>d,gc:()=>s,qj:()=>o});var r=n(8491);let l=[{label:"ãªãã©ã¼ã ã«é¢å¿ããã",value:r.LH.zero},{label:"ãªãã©ã¼ã ã®ããã«æ
å ±ãéãã¦ãã",value:r.LH.one},{label:"ãªãã©ã¼ã ãæ±ºããã¨ãã",value:r.LH.two},{label:"ãªãã©ã¼ã ãæ±ºãã¦æ¥è
ãé¸ãã§ãã",value:r.LH.three},{label:"ãªãã©ã¼ã æ¥è
ãæ±ºããã¨ãã",value:r.LH.five},{label:"ãªãã©ã¼ã æ¥è
ã¨æ¤è¨ä¸",value:r.LH.four},{label:"ãªãã©ã¼ã ãçµãã",value:r.LH.six}],a=[{label:"1人",value:r.Rx.one},{label:"2人",value:r.Rx.two},{label:"3人",value:r.Rx.three},{label:"4人",value:r.Rx.four},{label:"5人",value:r.Rx.five},{label:"6人以ä¸",value:r.Rx.six}],o=[{label:"åå±
è
ãªã",value:r.uN.none},{label:"é
å¶è
ã»ãã¼ããã¼",value:r.uN.partner},{label:"åä¾",value:r.uN.child},{label:"親",value:r.uN.parent},{label:"å«",value:r.uN.grandChild},{label:"ããã",value:r.uN.pet},{label:"ãã®ä»",value:r.uN.other}],s=[{label:"æ¸å»ºã¦",value:r.ZN.detachedHome},{label:"éåä½å®
ã»ãã³ã·ã§ã³",value:r.ZN.apartmentHouse},{label:"ãã®ä»",value:r.ZN.other}],i=[{label:"æ¨é ",value:r.qg.wooden},{label:"é骨é ",value:r.qg.steelFramework},{label:"éçã³ã³ã¯ãªã¼ãé ",value:r.qg.RC},{label:"ãã®ä»",value:r.qg.other}],d=[{label:"5å¹´æªæº",value:"1-5"},{label:"6ï½10å¹´",value:"6-10"},{label:"11ï½20å¹´",value:"11-20"},{label:"21年以ä¸",value:"21-99"}],c=[{label:"50䏿ªæº",value:"1-50"},{label:"50ä¸ï½100䏿ªæº",value:"50-100"},{label:"100ä¸ï½150䏿ªæº",value:"100-150"},{label:"150ä¸ï½200䏿ªæº",value:"150-200"},{label:"200ä¸ï½300䏿ªæº",value:"200-300"},{label:"300ä¸ï½400䏿ªæº",value:"300-400"},{label:"400ä¸ï½500䏿ªæº",value:"400-500"},{label:"500ä¸ï½600䏿ªæº",value:"500-600"},{label:"600ä¸ï½700䏿ªæº",value:"600-700"},{label:"700ä¸ï½800䏿ªæº",value:"700-800"},{label:"800ä¸ï½900䏿ªæº",value:"800-900"},{label:"900ä¸ï½1000䏿ªæº",value:"900-1000"},{label:"1000ä¸ä»¥ä¸",value:"1000-9999"}],u=[{label:"å¯è½ãªéãæ©ã",value:r.ZU.sooner},{label:"1ã¶æä»¥å
",value:r.ZU.inOneMonth},{label:"1~3ã¶æä»¥å
",value:r.ZU.inThreeMonth},{label:"3ã¶æä»¥ä¸",value:r.ZU.overThreeMonth},{label:"æªå®",value:r.ZU.notDecided}],m="鏿ãã¦ãã ãã",h={age:"",budget:"",buildingAge:"",livingTogetherNumber:void 0,familyStructure:[],petMemo:"",formOfProperty:"",memo:"",methodOfProperty:"",schedule:"",status:void 0,title:""},p="ããããã®ãªãã©ã¼ã ã¡ã¢ãã®ç»é²ãå®äºã§ãã¾ããã§ãããå
¥åå
容ãã確èªã®ãããå度ãç·¨éãå®äºããããã¿ã³ãæ¼ãã¦ãã ããã"},93326:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(37876);n(14232);var l=n(334),a=n.n(l),o=n(15039),s=n.n(o),i=n(44558);let d=e=>{let{label:t,inButton:n,handleClick:l}=e,o=s()(a()["print-button"],{[a()["-inbutton"]]:n});return(0,r.jsx)("button",{className:o,onClick:l,children:(0,r.jsxs)("div",{className:a().contents,children:[(0,r.jsx)(i.pr_,{className:a().icon,width:20,height:20}),(0,r.jsx)("div",{className:a().children,children:t})]})})}},98110:function(e,t,n){var r;"undefined"!=typeof self&&self,r=n(14232),e.exports=function(){"use strict";var e={155:function(e){e.exports=r}},t={};function n(r){var l=t[r];if(void 0!==l)return l.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})};var l={};n.r(l),n.d(l,{useReactToPrint:function(){return u}});var a=n(155);function o({level:e="error",messages:t,suppressErrors:n=!1}){n||("error"===e?console.error(t):"warning"===e?console.warn(t):console.debug(t))}function s(e,t){if(t||!e){let e=document.getElementById("printWindow");e&&document.body.removeChild(e)}}function i(e){return e instanceof Error?e:Error("Unknown Error")}function d(e,t){let{documentTitle:n,onAfterPrint:r,onPrintError:l,preserveAfterPrint:a,print:d,suppressErrors:c}=t;setTimeout(()=>{var t,u;if(e.contentWindow){function m(){null==r||r(),s(a)}if(e.contentWindow.focus(),d)d(e).then(m).catch(e=>{l?l("print",i(e)):o({messages:["An error was thrown by the specified `print` function"],suppressErrors:c})});else{if(e.contentWindow.print){let r=null!=(u=null==(t=e.contentDocument)?void 0:t.title)?u:"",l=e.ownerDocument.title;n&&(e.ownerDocument.title=n,e.contentDocument&&(e.contentDocument.title=n)),e.contentWindow.print(),n&&(e.ownerDocument.title=l,e.contentDocument&&(e.contentDocument.title=r))}else o({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:c});[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(e=>{var t,n;return(null!=(n=null!=(t=navigator.userAgent)?t:navigator.vendor)?n:"opera"in window&&window.opera).match(e)})?setTimeout(m,500):m()}}else o({messages:["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/MatthewHerbst/react-to-print/issues/"],suppressErrors:c})},500)}function c(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,null),r=n.nextNode();for(;r;)t.push(r),r=n.nextNode();return t}function u({bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:l,ignoreGlobalStyles:u,nonce:m,onAfterPrint:h,onBeforePrint:p,onPrintError:v,pageStyle:f,preserveAfterPrint:g,print:b,suppressErrors:x}){return(0,a.useCallback)(a=>{function N(){let s={bodyClass:e,contentRef:t,copyShadowRoots:n,documentTitle:r,fonts:l,ignoreGlobalStyles:u,nonce:m,onAfterPrint:h,onBeforePrint:p,onPrintError:v,pageStyle:f,preserveAfterPrint:g,print:b,suppressErrors:x},N=function(){let e=document.createElement("iframe");return e.width=`${document.documentElement.clientWidth}px`,e.height=`${document.documentElement.clientHeight}px`,e.style.position="absolute",e.style.top=`-${document.documentElement.clientHeight+100}px`,e.style.left=`-${document.documentElement.clientWidth+100}px`,e.id="printWindow",e.srcdoc="<!DOCTYPE html>",e}(),_=function(e,t){let{contentRef:n,fonts:r,ignoreGlobalStyles:l,suppressErrors:a}=t,s=function({contentRef:e,optionalContent:t,suppressErrors:n}){return t&&"function"==typeof t?(e&&o({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),t()):e?e.current:void o({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:n})}({contentRef:n,optionalContent:e,suppressErrors:a});if(!s)return;let i=s.cloneNode(!0),d=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),c=i.querySelectorAll("img"),u=i.querySelectorAll("video"),m=r?r.length:0;return{contentNode:s,clonedContentNode:i,clonedImgNodes:c,clonedVideoNodes:u,numResourcesToLoad:(l?0:d.length)+c.length+u.length+m,originalCanvasNodes:s.querySelectorAll("canvas")}}(a,s);if(!_)return void o({messages:["There is nothing to print"],suppressErrors:x});let w=function(e,t,n){let{suppressErrors:r}=e,l=[],a=[];return function(s,i){l.includes(s)?o({level:"debug",messages:["Tried to mark a resource that has already been handled",s],suppressErrors:r}):(i?(o({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...i],suppressErrors:r}),a.push(s)):l.push(s),l.length+a.length===t&&d(n,e))}}(s,_.numResourcesToLoad,N);N.onload=()=>{!function(e,t,n,r){var l,a,s,u,m;let{contentNode:h,clonedContentNode:p,clonedImgNodes:v,clonedVideoNodes:f,numResourcesToLoad:g,originalCanvasNodes:b}=n,{bodyClass:x,fonts:N,ignoreGlobalStyles:_,pageStyle:w,nonce:y,suppressErrors:j,copyShadowRoots:E}=r;e.onload=null;let P=null!=(l=e.contentDocument)?l:null==(a=e.contentWindow)?void 0:a.document;if(P){let n=P.body.appendChild(p);E&&function e(t,n,r){let l=c(t),a=c(n);if(l.length===a.length)for(let t=0;t<l.length;t++){let n=l[t],o=a[t],s=n.shadowRoot;
1if(null!==s){let t=o.attachShadow({mode:s.mode});t.innerHTML=s.innerHTML,e(s,t,r)}}else o({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",t,n],suppressErrors:r})}(h,n,!!j),N&&((null==(s=e.contentDocument)?void 0:s.fonts)&&(null==(u=e.contentWindow)?void 0:u.FontFace)?N.forEach(n=>{let r=new FontFace(n.family,n.source,{weight:n.weight,style:n.style});e.contentDocument.fonts.add(r),r.loaded.then(()=>{t(r)}).catch(e=>{t(r,["Failed loading the font:",r,"Load error:",i(e)])})}):(N.forEach(e=>{t(e)}),o({messages:['"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'],suppressErrors:j})));let r=P.createElement("style");y&&(r.setAttribute("nonce",y),P.head.setAttribute("nonce",y)),r.appendChild(P.createTextNode(null!=w?w:'\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 color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */\n print-color-adjust: exact; /* Firefox/Safari */\n -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */\n }\n }\n')),P.head.appendChild(r),x&&P.body.classList.add(...x.split(" "));let l=P.querySelectorAll("canvas");for(let e=0;e<b.length;++e){let t=b[e],n=l[e];if(void 0===n){o({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",t],suppressErrors:j});continue}let r=n.getContext("2d");r&&r.drawImage(t,0,0)}for(let e=0;e<v.length;e++){let n=v[e],r=n.getAttribute("src");if(r){let e=new Image;e.onload=()=>{t(n)},e.onerror=(e,r,l,a,o)=>{t(n,["Error loading <img>",n,"Error",o])},e.src=r}else t(n,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',n])}for(let e=0;e<f.length;e++){let n=f[e];n.preload="auto";let r=n.getAttribute("poster");if(r){let e=new Image;e.onload=()=>{t(n)},e.onerror=(e,l,a,o,s)=>{t(n,["Error loading video poster",r,"for video",n,"Error:",s])},e.src=r}else n.readyState>=2?t(n):n.src?(n.onloadeddata=()=>{t(n)},n.onerror=(e,r,l,a,o)=>{t(n,["Error loading video",n,"Error",o])},n.onstalled=()=>{t(n,["Loading video stalled, skipping",n])}):t(n,["Error loading video, `src` is empty",n])}let a="select",d=h.querySelectorAll(a),g=P.querySelectorAll(a);for(let e=0;e<d.length;e++)g[e].value=d[e].value;if(!_){let e=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let n=0,r=e.length;n<r;++n){let r=e[n];if("style"===r.tagName.toLowerCase()){let e=P.createElement(r.tagName),t=r.sheet;if(t){let l="";try{let e=t.cssRules.length;for(let n=0;n<e;++n)"string"==typeof t.cssRules[n].cssText&&(l+=`${t.cssRules[n].cssText}\r 2`)}catch(e){o({messages:["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/MatthewHerbst/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.",r,`Original error: ${i(e).message}`],level:"warning"})}e.setAttribute("id",`react-to-print-${n}`),y&&e.setAttribute("nonce",y),e.appendChild(P.createTextNode(l)),P.head.appendChild(e)}}else if(r.getAttribute("href"))if(r.hasAttribute("disabled"))o({messages:["`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:",r],level:"warning"}),t(r);else{let e=P.createElement(r.tagName);for(let t=0,n=r.attributes.length;t<n;++t){let n=r.attributes[t];n&&e.setAttribute(n.nodeName,null!=(m=n.nodeValue)?m:"")}e.onload=()=>{t(e)},e.onerror=(n,r,l,a,o)=>{t(e,["Failed to load",e,"Error:",o])},y&&e.setAttribute("nonce",y),P.head.appendChild(e)}
2else o({messages:["`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:",r],level:"warning"}),t(r)}}}0===g&&d(e,r)}(N,w,_,s)},document.body.appendChild(N)}s(g,!0),p?p().then(()=>{N()}).catch(e=>{null==v||v("onBeforePrint",i(e))}):N()},[e,t,n,r,l,u,m,h,p,v,f,g,b,x])}return l}()}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=12602)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.