@tallcomponents/unopdf-core
Advanced tools
Comparing version 1.2.12 to 1.2.13-b0edaebc
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ApiClient=require("./ApiClient-1db1c423.js"),IPdfField=require("./IPdfField-d920c3b2.js");require("./index-7e6a9b14.js");const createPdfWidgetState=(e,t)=>"text"==t?createTextWidgetState(e):createCheckBoxWidgetState(e),createCheckBoxWidgetState=e=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:e,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),createTextWidgetState=e=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:e,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),UnoPdf={settings:{logger:ApiClient.GlobalLoggerSettings}};exports.ApiEmpty=ApiClient.ApiEmpty,exports.ApiError=ApiClient.ApiError,exports.ApiLoading=ApiClient.ApiLoading,exports.ApiResult=ApiClient.ApiResult,Object.defineProperty(exports,"HttpCodes",{enumerable:!0,get:function(){return ApiClient.HttpCodes}}),exports.HttpError=ApiClient.HttpError,exports.NewPdfDocument=ApiClient.NewPdfDocument,exports.NewPdfDocumentInfo=ApiClient.NewPdfDocumentInfo,Object.defineProperty(exports,"PageMode",{enumerable:!0,get:function(){return ApiClient.PageMode}}),Object.defineProperty(exports,"PageRotate",{enumerable:!0,get:function(){return ApiClient.PageRotate}}),Object.defineProperty(exports,"UserMode",{enumerable:!0,get:function(){return ApiClient.UserMode}}),exports.devicePointToPage=ApiClient.devicePointToPage,exports.pageBottom=ApiClient.pageBottom,exports.pageHeight=ApiClient.pageHeight,exports.pageLeft=ApiClient.pageLeft,exports.pageRight=ApiClient.pageRight,exports.pageTop=ApiClient.pageTop,exports.pageWidth=ApiClient.pageWidth,exports.rotate=ApiClient.rotate,exports.translateX=ApiClient.translateX,exports.translateY=ApiClient.translateY,exports.createCheckBoxFieldState=IPdfField.createCheckBoxFieldState,exports.createPdfFieldState=IPdfField.createPdfFieldState,exports.createTextFieldState=IPdfField.createTextFieldState,exports.fieldIsChecked=IPdfField.fieldIsChecked,exports.UnoPdf=UnoPdf,exports.createCheckBoxWidgetState=createCheckBoxWidgetState,exports.createPdfWidgetState=createPdfWidgetState,exports.createTextWidgetState=createTextWidgetState; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ApiClient=require("./ApiClient-eb21273a.js"),IPdfField=require("./IPdfField-d920c3b2.js");require("./index-d93e18a5.js");const createPdfWidgetState=(e,t)=>"text"==t?createTextWidgetState(e):createCheckBoxWidgetState(e),createCheckBoxWidgetState=e=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:e,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),createTextWidgetState=e=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:e,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),UnoPdf={settings:{logger:ApiClient.GlobalLoggerSettings}};exports.ApiEmpty=ApiClient.ApiEmpty,exports.ApiError=ApiClient.ApiError,exports.ApiLoading=ApiClient.ApiLoading,exports.ApiResult=ApiClient.ApiResult,Object.defineProperty(exports,"HttpCodes",{enumerable:!0,get:function(){return ApiClient.HttpCodes}}),exports.HttpError=ApiClient.HttpError,exports.NewPdfDocument=ApiClient.NewPdfDocument,exports.NewPdfDocumentInfo=ApiClient.NewPdfDocumentInfo,Object.defineProperty(exports,"PageMode",{enumerable:!0,get:function(){return ApiClient.PageMode}}),Object.defineProperty(exports,"PageRotate",{enumerable:!0,get:function(){return ApiClient.PageRotate}}),Object.defineProperty(exports,"UserMode",{enumerable:!0,get:function(){return ApiClient.UserMode}}),exports.devicePointToPage=ApiClient.devicePointToPage,exports.pageBottom=ApiClient.pageBottom,exports.pageHeight=ApiClient.pageHeight,exports.pageLeft=ApiClient.pageLeft,exports.pageRight=ApiClient.pageRight,exports.pageTop=ApiClient.pageTop,exports.pageWidth=ApiClient.pageWidth,exports.rotate=ApiClient.rotate,exports.translateX=ApiClient.translateX,exports.translateY=ApiClient.translateY,exports.createCheckBoxFieldState=IPdfField.createCheckBoxFieldState,exports.createPdfFieldState=IPdfField.createPdfFieldState,exports.createTextFieldState=IPdfField.createTextFieldState,exports.fieldIsChecked=IPdfField.fieldIsChecked,exports.UnoPdf=UnoPdf,exports.createCheckBoxWidgetState=createCheckBoxWidgetState,exports.createPdfWidgetState=createPdfWidgetState,exports.createTextWidgetState=createTextWidgetState; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),appGlobals=require("./app-globals-3a1e7e63.js"),defineCustomElements=async(e,d)=>{if("undefined"!=typeof window)return await appGlobals.globalScripts(),index.bootstrapLazy([["pdf-store-wrapper.cjs",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages.cjs",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails.cjs",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks.cjs",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers.cjs",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar.cjs",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader.cjs",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button.cjs",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control.cjs",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application.cjs",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document.cjs",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner.cjs",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base.cjs",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page.cjs",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail.cjs",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8.cjs",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],d)};exports.setNonce=index.setNonce,exports.defineCustomElements=defineCustomElements; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),appGlobals=require("./app-globals-3a1e7e63.js"),defineCustomElements=async(e,d)=>{if("undefined"!=typeof window)return await appGlobals.globalScripts(),index.bootstrapLazy([["pdf-store-wrapper.cjs",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages.cjs",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails.cjs",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks.cjs",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers.cjs",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar.cjs",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader.cjs",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button.cjs",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control.cjs",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application.cjs",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document.cjs",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner.cjs",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base.cjs",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page.cjs",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail.cjs",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8.cjs",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],d)};exports.setNonce=index.setNonce,exports.defineCustomElements=defineCustomElements; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),FileService=require("./FileService-a7648fb6.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),LIB_VERSION="1.2.12";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=constants$1,n=debug_1,a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",s],[c,i]],m=(e,t,r)=>{const i=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=p++;n(e,s,t),h[e]=s,l[s]=t,a[s]=new RegExp(t,r?"g":void 0),o[s]=new RegExp(i,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),i=numeric.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,i,s).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),i=parse$3(t,null,!0),s=r.compare(i);if(0===s)return null;const n=s>0,a=n?r:i,o=n?i:r,l=!!a.prerelease.length;if(!!o.prerelease.length&&!l)return o.patch||o.minor?a.patch?"patch":a.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==i.major?h+"major":r.minor!==i.minor?h+"minor":r.patch!==i.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const i=new SemVer$8(e,r),s=new SemVer$8(t,r);return i.compare(s)||i.compareBuild(s)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,i)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,i);case"!=":return neq$1(e,r,i);case">":return gt$3(e,r,i);case">=":return gte$2(e,r,i);case"<":return lt$2(e,r,i);case"<=":return lte$2(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const i=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let s;for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const i=r[2],s=r[3]||"0",n=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",o=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${i}.${s}.${n}${a}${o}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function insert(e,t,r){var i=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,i){if(!(this instanceof Node))return new Node(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;null!==r;i++)e.call(t,r.value,i,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;null!==r;i--)e.call(t,r.value,i,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var s=0;null!==i;s++)r=e(r,i.value,s),i=i.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==i;s--)r=e(r,i.value,s),i=i.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;var n=[];for(i=0;s&&i<t;i++)n.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(i=0;i<r.length;i++)s=insert(this,s,r[i]);return n},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const i=r.prev;forEachStep(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const i=r.next;forEachStep(this,e,r,t),r=i}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const i=r?Date.now():0,s=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(s>this[MAX])return del(this,this[CACHE].get(e)),!1;const n=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,n.value)),n.now=i,n.maxAge=r,n.value=t,this[LENGTH]+=s-n.length,n.length=s,this.get(e),trim(this),!0}const n=new Entry(e,t,s,i,r);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r],s=i.e||0;if(0===s)this.set(i.k,i.v);else{const e=s-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const i=e[CACHE].get(t);if(i){const t=i.value;if(isStale(e,t)){if(del(e,i),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),e[LRU_LIST].unshiftNode(i));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,i,s){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=s||0}}const forEachStep=(e,t,r,i)=>{let s=r.value;isStale(e,s)&&(del(e,r),e[ALLOW_STALE]||(s=void 0)),s&&t.call(i,s.value,s.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const i=this.options.loose,s=i?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(s,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let n=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));i&&(n=n.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",n);const a=new Map,o=n.map((e=>new Comparator$4(e,this.options)));for(const e of o){if(isNullSet(e))return[e];a.set(e.value,e)}a.size>1&&a.has("")&&a.delete("");const l=[...a.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const i=e.slice();let s=i.pop();for(;r&&i.length;)r=i.every((e=>s.intersects(e,t))),s=i.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,i,s,n)=>{let a;return debug$1("tilde",e,t,r,i,s,n),isX(r)?a="":isX(i)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(s)?a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:n?(debug$1("replaceTilde pr",n),a=`>=${r}.${i}.${s}-${n} <${r}.${+i+1}.0-0`):a=`>=${r}.${i}.${s} <${r}.${+i+1}.0-0`,debug$1("tilde return",a),a}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,n,a)=>{let o;return debug$1("caret",e,t,r,s,n,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0${i} <${+r+1}.0.0-0`:isX(n)?o="0"===r?`>=${r}.${s}.0${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${i} <${+r+1}.0.0-0`:a?(debug$1("replaceCaret pr",a),o="0"===r?"0"===s?`>=${r}.${s}.${n}-${a} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}-${a} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n}-${a} <${+r+1}.0.0-0`):(debug$1("no pr"),o="0"===r?"0"===s?`>=${r}.${s}.${n}${i} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n} <${+r+1}.0.0-0`),debug$1("caret return",o),o}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,i,s,n,a,o)=>{debug$1("xRange",e,r,i,s,n,a,o);const l=isX(s),h=l||isX(n),p=h||isX(a),c=p;return"="===i&&c&&(i=""),o=t.includePrerelease?"-0":"",l?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&c?(h&&(n=0),a=0,">"===i?(i=">=",h?(s=+s+1,n=0,a=0):(n=+n+1,a=0)):"<="===i&&(i="<",h?s=+s+1:n=+n+1),"<"===i&&(o="-0"),r=`${i+s}.${n}.${a}${o}`):h?r=`>=${s}.0.0${o} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${n}.0${o} <${s}.${+n+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,i,s,n,a,o,l,h,p,c,u,m)=>`${r=isX(i)?"":isX(s)?`>=${i}.0.0${e?"-0":""}`:isX(n)?`>=${i}.${s}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],i=e.match(r);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new SemVer$5(i[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new SemVer$4(i,r)))})),i};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new SemVer$3(i,r)))})),i};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!gt$2(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!gt$2(r,s)||(r=s)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,i)=>{let s,n,a,o,l;switch(e=new SemVer$1(e,i),t=new Range$3(t,i),r){case">":s=gt$1,n=lte$1,a=lt$1,o=">",l=">=";break;case"<":s=lt$1,n=gte$1,a=gt$1,o="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,i))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,s(e.semver,p.semver,i)?p=e:a(e.semver,c.semver,i)&&(c=e)})),p.operator===o||p.operator===l)return!1;if((!c.operator||c.operator===o)&&n(e,c.semver))return!1;if(c.operator===l&&a(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const i=[];let s=null,n=null;const a=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of a){satisfies$2(e,t,r)?(n=e,s||(s=e)):(n&&i.push([s,n]),n=null,s=null)}s&&i.push([s,null]);const o=[];for(const[e,t]of i)e===t?o.push(e):t||e!==a[0]?t?e===a[0]?o.push(`<=${t}`):o.push(`${e} - ${t}`):o.push(`>=${e}`):o.push("*");const l=o.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let i=!1;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const i=new Set;let s,n,a,o,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?s=higherGT(s,t,r):"<"===t.operator||"<="===t.operator?n=lowerLT(n,t,r):i.add(t.semver);if(i.size>1)return null;if(s&&n){if(a=compare$1(s.semver,n.semver,r),a>0)return null;if(0===a&&(">="!==s.operator||"<="!==n.operator))return null}for(const e of i){if(s&&!satisfies$1(e,String(s),r))return null;if(n&&!satisfies$1(e,String(n),r))return null;for(const i of t)if(!satisfies$1(e,String(i),r))return!1;return!0}let c=!(!n||r.includePrerelease||!n.semver.prerelease.length)&&n.semver,u=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;c&&1===c.prerelease.length&&"<"===n.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,s)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(o=higherGT(s,e,r),o===e&&o!==s)return!1}else if(">="===s.operator&&!satisfies$1(s.semver,String(e),r))return!1;if(n)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(n,e,r),l===e&&l!==n)return!1}else if("<="===n.operator&&!satisfies$1(n.semver,String(e),r))return!1;if(!e.operator&&(n||s)&&0!==a)return!1}return!(s&&h&&!n&&0!==a)&&(!(n&&p&&!s&&0!==a)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){index.registerInstance(this,e),this.apiError=index.createEvent(this,"apiError",7),this.sessionService=new ApiClient.SessionService,this.fileService=new FileService.FileService,this.logger=ApiClient.createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiClient.ApiLoading,this.versionInfo=new ApiClient.ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const i=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:"1.2.12",apiBaseUrl:ApiClient.state.apiBaseUrl,publicKey:ApiClient.state.publicKey,apiVersion:i.error?`error: ${i.error.code} - ${i.error.message}`:null!==(r=null===(t=i.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){ApiClient.state.apiBaseUrl=this.apiBaseUrl||index.Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${ApiClient.state.apiBaseUrl}`),ApiClient.state.publicKey=this.publickey||index.Env.API_PUBLIC_KEY,ApiClient.state.privateKey=this.privatekey||index.Env.API_PRIVATE_KEY,this.sessionsurl&&(ApiClient.state.sessionsUrl=this.sessionsurl),ApiClient.state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await insertFonts.addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return index.h(index.Host,null,index.h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),index.h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION)||preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION),t=preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${index.Env.API_MINIMUM_VERSION}.`:`Package version 1.2.12 is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),index.h("div",{class:"text-red-600"},e&&index.h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",index.Env.API_MINIMUM_VERSION," of the Api."),t&&index.h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ","1.2.12",". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),index.h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0,exports.pdf_application=PdfApplication; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),LIB_VERSION="1.2.13-b0edaebc";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:s}=constants$1,n=debug_1,a=(t=e.exports={}).re=[],o=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",s],[c,i]],m=(e,t,r)=>{const i=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),s=p++;n(e,s,t),h[e]=s,l[s]=t,a[s]=new RegExp(t,r?"g":void 0),o[s]=new RegExp(i,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),i=numeric.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(debug$2("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return compareIdentifiers(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===r&&(i=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,i,s)=>{"string"==typeof r&&(s=i,i=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,i,s).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),i=parse$3(t,null,!0),s=r.compare(i);if(0===s)return null;const n=s>0,a=n?r:i,o=n?i:r,l=!!a.prerelease.length;if(!!o.prerelease.length&&!l)return o.patch||o.minor?a.patch?"patch":a.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==i.major?h+"major":r.minor!==i.minor?h+"minor":r.patch!==i.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const i=new SemVer$8(e,r),s=new SemVer$8(t,r);return i.compare(s)||i.compareBuild(s)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,i)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,i);case"!=":return neq$1(e,r,i);case">":return gt$3(e,r,i);case">=":return gte$2(e,r,i);case"<":return lt$2(e,r,i);case"<=":return lte$2(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const i=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let s;for(;(s=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&s.index+s[0].length===r.index+r[0].length||(r=s),i.lastIndex=s.index+s[1].length+s[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const i=r[2],s=r[3]||"0",n=r[4]||"0",a=t.includePrerelease&&r[5]?`-${r[5]}`:"",o=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${i}.${s}.${n}${a}${o}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function insert(e,t,r){var i=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===i.next&&(e.tail=i),null===i.prev&&(e.head=i),e.length++,i}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,i){if(!(this instanceof Node))return new Node(e,t,r,i);this.list=i,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,i=0;null!==r;i++)e.call(t,r.value,i,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,i=this.length-1;null!==r;i--)e.call(t,r.value,i,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,i=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var s=0;null!==i;s++)r=e(r,i.value,s),i=i.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,i=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var s=this.length-1;null!==i;s--)r=e(r,i.value,s),i=i.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;for(;null!==s&&i<t;i++,s=s.next)r.push(s.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,s=this.tail;null!==s&&i>t;i--)s=s.prev;for(;null!==s&&i>e;i--,s=s.prev)r.push(s.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,s=this.head;null!==s&&i<e;i++)s=s.next;var n=[];for(i=0;s&&i<t;i++)n.push(s.value),s=this.removeNode(s);null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(i=0;i<r.length;i++)s=insert(this,s,r[i]);return n},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const i=r.prev;forEachStep(this,e,r,t),r=i}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const i=r.next;forEachStep(this,e,r,t),r=i}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const i=r?Date.now():0,s=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(s>this[MAX])return del(this,this[CACHE].get(e)),!1;const n=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,n.value)),n.now=i,n.maxAge=r,n.value=t,this[LENGTH]+=s-n.length,n.length=s,this.get(e),trim(this),!0}const n=new Entry(e,t,s,i,r);return n.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=n.length,this[LRU_LIST].unshift(n),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const i=e[r],s=i.e||0;if(0===s)this.set(i.k,i.v);else{const e=s-t;e>0&&this.set(i.k,i.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const i=e[CACHE].get(t);if(i){const t=i.value;if(isStale(e,t)){if(del(e,i),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(i.value.now=Date.now()),e[LRU_LIST].unshiftNode(i));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,i,s){this.key=e,this.value=t,this.length=r,this.now=i,this.maxAge=s||0}}const forEachStep=(e,t,r,i)=>{let s=r.value;isStale(e,s)&&(del(e,r),e[ALLOW_STALE]||(s=void 0)),s&&t.call(i,s.value,s.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const i=this.options.loose,s=i?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(s,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let n=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));i&&(n=n.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",n);const a=new Map,o=n.map((e=>new Comparator$4(e,this.options)));for(const e of o){if(isNullSet(e))return[e];a.set(e.value,e)}a.size>1&&a.has("")&&a.delete("");const l=[...a.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const i=e.slice();let s=i.pop();for(;r&&i.length;)r=i.every((e=>s.intersects(e,t))),s=i.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,i,s,n)=>{let a;return debug$1("tilde",e,t,r,i,s,n),isX(r)?a="":isX(i)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(s)?a=`>=${r}.${i}.0 <${r}.${+i+1}.0-0`:n?(debug$1("replaceTilde pr",n),a=`>=${r}.${i}.${s}-${n} <${r}.${+i+1}.0-0`):a=`>=${r}.${i}.${s} <${r}.${+i+1}.0-0`,debug$1("tilde return",a),a}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,((t,r,s,n,a)=>{let o;return debug$1("caret",e,t,r,s,n,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0${i} <${+r+1}.0.0-0`:isX(n)?o="0"===r?`>=${r}.${s}.0${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.0${i} <${+r+1}.0.0-0`:a?(debug$1("replaceCaret pr",a),o="0"===r?"0"===s?`>=${r}.${s}.${n}-${a} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}-${a} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n}-${a} <${+r+1}.0.0-0`):(debug$1("no pr"),o="0"===r?"0"===s?`>=${r}.${s}.${n}${i} <${r}.${s}.${+n+1}-0`:`>=${r}.${s}.${n}${i} <${r}.${+s+1}.0-0`:`>=${r}.${s}.${n} <${+r+1}.0.0-0`),debug$1("caret return",o),o}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,i,s,n,a,o)=>{debug$1("xRange",e,r,i,s,n,a,o);const l=isX(s),h=l||isX(n),p=h||isX(a),c=p;return"="===i&&c&&(i=""),o=t.includePrerelease?"-0":"",l?r=">"===i||"<"===i?"<0.0.0-0":"*":i&&c?(h&&(n=0),a=0,">"===i?(i=">=",h?(s=+s+1,n=0,a=0):(n=+n+1,a=0)):"<="===i&&(i="<",h?s=+s+1:n=+n+1),"<"===i&&(o="-0"),r=`${i+s}.${n}.${a}${o}`):h?r=`>=${s}.0.0${o} <${+s+1}.0.0-0`:p&&(r=`>=${s}.${n}.0${o} <${s}.${+n+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,i,s,n,a,o,l,h,p,c,u,m)=>`${r=isX(i)?"":isX(s)?`>=${i}.0.0${e?"-0":""}`:isX(n)?`>=${i}.${s}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const i=e[r].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],i=e.match(r);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new SemVer$5(i[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new SemVer$4(i,r)))})),i};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let i=null,s=null,n=null;try{n=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{n.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new SemVer$3(i,r)))})),i};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let s=null;i.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!gt$2(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!gt$2(r,s)||(r=s)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,i)=>{let s,n,a,o,l;switch(e=new SemVer$1(e,i),t=new Range$3(t,i),r){case">":s=gt$1,n=lte$1,a=lt$1,o=">",l=">=";break;case"<":s=lt$1,n=gte$1,a=gt$1,o="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,i))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,s(e.semver,p.semver,i)?p=e:a(e.semver,c.semver,i)&&(c=e)})),p.operator===o||p.operator===l)return!1;if((!c.operator||c.operator===o)&&n(e,c.semver))return!1;if(c.operator===l&&a(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const i=[];let s=null,n=null;const a=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of a){satisfies$2(e,t,r)?(n=e,s||(s=e)):(n&&i.push([s,n]),n=null,s=null)}s&&i.push([s,null]);const o=[];for(const[e,t]of i)e===t?o.push(e):t||e!==a[0]?t?e===a[0]?o.push(`<=${t}`):o.push(`${e} - ${t}`):o.push(`>=${e}`):o.push("*");const l=o.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let i=!1;e:for(const s of e.set){for(const e of t.set){const t=simpleSubset(s,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const i=new Set;let s,n,a,o,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?s=higherGT(s,t,r):"<"===t.operator||"<="===t.operator?n=lowerLT(n,t,r):i.add(t.semver);if(i.size>1)return null;if(s&&n){if(a=compare$1(s.semver,n.semver,r),a>0)return null;if(0===a&&(">="!==s.operator||"<="!==n.operator))return null}for(const e of i){if(s&&!satisfies$1(e,String(s),r))return null;if(n&&!satisfies$1(e,String(n),r))return null;for(const i of t)if(!satisfies$1(e,String(i),r))return!1;return!0}let c=!(!n||r.includePrerelease||!n.semver.prerelease.length)&&n.semver,u=!(!s||r.includePrerelease||!s.semver.prerelease.length)&&s.semver;c&&1===c.prerelease.length&&"<"===n.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,s)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(o=higherGT(s,e,r),o===e&&o!==s)return!1}else if(">="===s.operator&&!satisfies$1(s.semver,String(e),r))return!1;if(n)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(n,e,r),l===e&&l!==n)return!1}else if("<="===n.operator&&!satisfies$1(n.semver,String(e),r))return!1;if(!e.operator&&(n||s)&&0!==a)return!1}return!(s&&h&&!n&&0!==a)&&(!(n&&p&&!s&&0!==a)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i>0?e:i<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const i=compare$1(e.semver,t.semver,r);return i<0?e:i>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){index.registerInstance(this,e),this.apiError=index.createEvent(this,"apiError",7),this.sessionService=new ApiClient.SessionService,this.fileService=new FileService.FileService,this.logger=ApiClient.createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiClient.ApiLoading,this.versionInfo=new ApiClient.ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const i=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:ApiClient.state.apiBaseUrl,publicKey:ApiClient.state.publicKey,apiVersion:i.error?`error: ${i.error.code} - ${i.error.message}`:null!==(r=null===(t=i.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){ApiClient.state.apiBaseUrl=this.apiBaseUrl||index.Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${ApiClient.state.apiBaseUrl}`),ApiClient.state.publicKey=this.publickey||index.Env.API_PUBLIC_KEY,ApiClient.state.privateKey=this.privatekey||index.Env.API_PRIVATE_KEY,this.sessionsurl&&(ApiClient.state.sessionsUrl=this.sessionsurl),ApiClient.state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await insertFonts.addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return index.h(index.Host,null,index.h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),index.h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,index.Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${index.Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),index.h("div",{class:"text-red-600"},e&&index.h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",index.Env.API_MINIMUM_VERSION," of the Api."),t&&index.h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?index.h(index.Host,null,index.h("div",{class:"m-4"},index.h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),index.h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0,exports.pdf_application=PdfApplication; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),pdfBookmarksCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}details details,p{margin-left:1em}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfBookmarksStyle0=pdfBookmarksCss,PdfBookmarks=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfBookmarks"),this.handleClickBookmark=e=>{var t,o;if(this.logger.debug("handleClickBookmarKKK",e),!e||0==e.length)return;const i=e[0];"goto"==i.actionType&&(null===(t=i.destination)||void 0===t?void 0:t.pageIndex)&&(this.logger.debug("handleClickBookmark",i.destination.pageIndex),(null===(o=this.viewerStore)||void 0===o?void 0:o.state)&&(this.viewerStore.state.pageIndex=i.destination.pageIndex))},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){var e,t;const o=e=>index.h(index.Fragment,null,null==e?void 0:e.map(((e,t)=>i(e,t)))),i=(e,t)=>{var i;return index.h(index.Fragment,null,0==(null===(i=e.children)||void 0===i?void 0:i.length)&&index.h("p",null,index.h("a",{href:"#",onClick:()=>{this.handleClickBookmark(e.actions)}},e.title)),e.children&&e.children.length>0&&index.h("details",null,index.h("summary",{key:t,onClick:()=>this.handleClickBookmark(e.actions)},e.title),index.h("div",null,e.children&&o(e.children))))};let n=null!==(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfBookmarks.value)&&void 0!==t?t:[];return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},0==n.length&&index.h("p",null,"This document has no bookmarks."),n.length>0&&o(n)))}};PdfBookmarks.style=PdfBookmarksStyle0,exports.pdf_bookmarks=PdfBookmarks; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),pdfBookmarksCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}details details,p{margin-left:1em}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfBookmarksStyle0=pdfBookmarksCss,PdfBookmarks=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfBookmarks"),this.handleClickBookmark=e=>{var t,o;if(this.logger.debug("handleClickBookmarKKK",e),!e||0==e.length)return;const i=e[0];"goto"==i.actionType&&(null===(t=i.destination)||void 0===t?void 0:t.pageIndex)&&(this.logger.debug("handleClickBookmark",i.destination.pageIndex),(null===(o=this.viewerStore)||void 0===o?void 0:o.state)&&(this.viewerStore.state.pageIndex=i.destination.pageIndex))},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){var e,t;const o=e=>index.h(index.Fragment,null,null==e?void 0:e.map(((e,t)=>i(e,t)))),i=(e,t)=>{var i;return index.h(index.Fragment,null,0==(null===(i=e.children)||void 0===i?void 0:i.length)&&index.h("p",null,index.h("a",{href:"#",onClick:()=>{this.handleClickBookmark(e.actions)}},e.title)),e.children&&e.children.length>0&&index.h("details",null,index.h("summary",{key:t,onClick:()=>this.handleClickBookmark(e.actions)},e.title),index.h("div",null,e.children&&o(e.children))))};let n=null!==(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfBookmarks.value)&&void 0!==t?t:[];return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},0==n.length&&index.h("p",null,"This document has no bookmarks."),n.length>0&&o(n)))}};PdfBookmarks.style=PdfBookmarksStyle0,exports.pdf_bookmarks=PdfBookmarks; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),FileService=require("./FileService-a7648fb6.js"),documentStore=require("./documentStore-e5a54072.js");require("./IPdfField-d920c3b2.js");const pdfDocumentCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.p-4{padding:1rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfDocumentStyle0=pdfDocumentCss,PdfDocument=class{constructor(e){index.registerInstance(this,e),this.loaded=index.createEvent(this,"loaded",7),this.unloaded=index.createEvent(this,"unloaded",7),this.formdatachanged=index.createEvent(this,"formdatachanged",7),this.logger=ApiClient.createLogger("PdfDocument"),this.documentStore=null,this.fileService=new FileService.FileService,this.name="default",this.pdfid=void 0}componentWillLoad(){this.logger.debug(this.name,"Starting..."),this.documentStore=documentStore.ensureStore(this.name)}componentDidLoad(){this.logger.debug("Started"),ApiClient.onChange("accessToken",(e=>{if(e&&this.pdfid)if(this.documentStore)if("new"==this.pdfid){if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening new pdf document"),this.new()}else{if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening pdf document",this.pdfid),this.open(this.pdfid)}else this.logger.error("Cannot update access token: documentStore is null")})),this.documentStore?(this.documentStore.onChange("pdfIdLoaded",(e=>{e?this.loaded.emit(e):this.unloaded.emit()})),this.documentStore.onChange("pdfFormDataUpdated",(e=>{this.formdatachanged.emit(e||void 0)}))):this.logger.error("Cannot set store listeners: documentStore is null")}disconnectedCallback(){this.logger.debug("Stopped")}async open(e){return this.logger.debug("Opening pdf document",e),this.documentStore?(await this.documentStore.load(e),await this.getSummary()):(this.logger.error("Cannot open document: documentStore is null"),null)}async openFile(e){if(this.logger.debug("Opening pdf document from File"),e){const t=await this.fileService.upload(e);return this.logger.debug("File uploaded",t),this.open(t.id)}return this.logger.debug("No valid file selected"),null}async download(){var e,t,o;const i=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfId;if(!i)return this.logger.debug("cannot download: no document loaded"),null;const n=null===(o=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfInfo.value)||void 0===o?void 0:o.originalFileName;return n?(this.logger.debug("download",{id:i,fileName:n}),this.fileService.download(i,n)):(this.logger.debug("cannot download: originalFileName is empty"),null)}async downloadAs(e){var t,o,i;const n=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfId;if(!n)return this.logger.debug("cannot convert: no document loaded"),null;const r=`${(null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfInfo.value)||void 0===i?void 0:i.originalFileName)||n}.${e}`;return this.logger.debug("convertTo",{format:e,id:n,fileName:r}),this.fileService.download(n,r,e)}async getSummary(){var e;return this.logger.info("Get document summary"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfInfo.value)||null}async getFields(){var e;return this.logger.debug("Get fields"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||[]}async getFormData(){var e,t;if(this.logger.debug("getFormData"),!this.documentStore)return this.logger.error("Cannot get form data because documentStore is null"),{};let o={};return null===(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||void 0===t||t.forEach((e=>o[e.fullName]=e.value)),o}async setFormData(e){var t;if(this.logger.debug("setFormData",e),this.documentStore){if(e)for(const[o,i]of Object.entries(e))await(null===(t=this.documentStore)||void 0===t?void 0:t.updateField(o,i,!0))}else this.logger.error("Cannot set form data because documentStore is null")}async setOptions(e,t){if(this.documentStore)return await this.documentStore.setOptions(e,t);this.logger.error("Cannot add option: documentStore is null")}async new(){this.logger.debug("Opening new pdf document"),this.documentStore?this.documentStore.state.pdfInfo=new ApiClient.ApiResult(ApiClient.NewPdfDocument):this.logger.error("Cannot open new document: documentStore is null")}async close(){this.logger.debug("Closing pdf document"),this.documentStore?this.documentStore.unload():this.logger.error("Cannot close document: documentStore is null")}async save(e){return this.logger.debug("Save"),this.documentStore?await this.documentStore.save(null!=e?e:null):(this.logger.error("Cannot save document: documentStore is null"),null)}render(){if(!this.documentStore)return this.logger.error("Cannot render pdf-document: documentStore is null"),index.h(index.Host,null,index.h("div",{class:"p-4 text-red text-lg"},"Error: No document store"));const e=this.documentStore.state.pdfInfo;return e.error?index.h(index.Host,null,index.h("div",{class:"p-4 text-red text-lg"},e.error)):void 0}};PdfDocument.style=PdfDocumentStyle0,exports.pdf_document=PdfDocument; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),documentStore=require("./documentStore-3ad3569b.js");require("./IPdfField-d920c3b2.js");const pdfDocumentCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.p-4{padding:1rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfDocumentStyle0=pdfDocumentCss,PdfDocument=class{constructor(e){index.registerInstance(this,e),this.loaded=index.createEvent(this,"loaded",7),this.unloaded=index.createEvent(this,"unloaded",7),this.formdatachanged=index.createEvent(this,"formdatachanged",7),this.logger=ApiClient.createLogger("PdfDocument"),this.documentStore=null,this.fileService=new FileService.FileService,this.name="default",this.pdfid=void 0}componentWillLoad(){this.logger.debug(this.name,"Starting..."),this.documentStore=documentStore.ensureStore(this.name)}componentDidLoad(){this.logger.debug("Started"),ApiClient.onChange("accessToken",(e=>{if(e&&this.pdfid)if(this.documentStore)if("new"==this.pdfid){if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening new pdf document"),this.new()}else{if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening pdf document",this.pdfid),this.open(this.pdfid)}else this.logger.error("Cannot update access token: documentStore is null")})),this.documentStore?(this.documentStore.onChange("pdfIdLoaded",(e=>{e?this.loaded.emit(e):this.unloaded.emit()})),this.documentStore.onChange("pdfFormDataUpdated",(e=>{this.formdatachanged.emit(e||void 0)}))):this.logger.error("Cannot set store listeners: documentStore is null")}disconnectedCallback(){this.logger.debug("Stopped")}async open(e){return this.logger.debug("Opening pdf document",e),this.documentStore?(await this.documentStore.load(e),await this.getSummary()):(this.logger.error("Cannot open document: documentStore is null"),null)}async openFile(e){if(this.logger.debug("Opening pdf document from File"),e){const t=await this.fileService.upload(e);return this.logger.debug("File uploaded",t),this.open(t.id)}return this.logger.debug("No valid file selected"),null}async download(){var e,t,o;const i=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfId;if(!i)return this.logger.debug("cannot download: no document loaded"),null;const n=null===(o=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfInfo.value)||void 0===o?void 0:o.originalFileName;return n?(this.logger.debug("download",{id:i,fileName:n}),this.fileService.download(i,n)):(this.logger.debug("cannot download: originalFileName is empty"),null)}async downloadAs(e){var t,o,i;const n=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfId;if(!n)return this.logger.debug("cannot convert: no document loaded"),null;const r=`${(null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfInfo.value)||void 0===i?void 0:i.originalFileName)||n}.${e}`;return this.logger.debug("convertTo",{format:e,id:n,fileName:r}),this.fileService.download(n,r,e)}async getSummary(){var e;return this.logger.info("Get document summary"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfInfo.value)||null}async getFields(){var e;return this.logger.debug("Get fields"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||[]}async getFormData(){var e,t;if(this.logger.debug("getFormData"),!this.documentStore)return this.logger.error("Cannot get form data because documentStore is null"),{};let o={};return null===(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||void 0===t||t.forEach((e=>o[e.fullName]=e.value)),o}async setFormData(e){var t;if(this.logger.debug("setFormData",e),this.documentStore){if(e)for(const[o,i]of Object.entries(e))await(null===(t=this.documentStore)||void 0===t?void 0:t.updateField(o,i,!0))}else this.logger.error("Cannot set form data because documentStore is null")}async setOptions(e,t){if(this.documentStore)return await this.documentStore.setOptions(e,t);this.logger.error("Cannot add option: documentStore is null")}async new(){this.logger.debug("Opening new pdf document"),this.documentStore?this.documentStore.state.pdfInfo=new ApiClient.ApiResult(ApiClient.NewPdfDocument):this.logger.error("Cannot open new document: documentStore is null")}async close(){this.logger.debug("Closing pdf document"),this.documentStore?this.documentStore.unload():this.logger.error("Cannot close document: documentStore is null")}async save(e){return this.logger.debug("Save"),this.documentStore?await this.documentStore.save(null!=e?e:null):(this.logger.error("Cannot save document: documentStore is null"),null)}render(){if(!this.documentStore)return this.logger.error("Cannot render pdf-document: documentStore is null"),index.h(index.Host,null,index.h("div",{class:"p-4 text-red text-lg"},"Error: No document store"));const e=this.documentStore.state.pdfInfo;return e.error?index.h(index.Host,null,index.h("div",{class:"p-4 text-red text-lg"},e.error)):void 0}};PdfDocument.style=PdfDocumentStyle0,exports.pdf_document=PdfDocument; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),pdfLayersCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-cover{background-size:cover}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfLayersStyle0=pdfLayersCss,PdfLayers=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfLayers"),this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&(e=>{const t=e.pdfLayers.value||[];return index.h("div",{class:"max-h-[40rem] overflow-y-auto"},0==(null==t?void 0:t.length)&&index.h("p",null,"This document has no layers."),index.h("ul",null,t.map((e=>index.h("li",{key:e.name},index.h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.visible?"Y":"N",e.name)))))})(this.documentStore.state)))}};PdfLayers.style=PdfLayersStyle0,exports.pdf_layers=PdfLayers; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),pdfLayersCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-cover{background-size:cover}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfLayersStyle0=pdfLayersCss,PdfLayers=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfLayers"),this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&(e=>{const t=e.pdfLayers.value||[];return index.h("div",{class:"max-h-[40rem] overflow-y-auto"},0==(null==t?void 0:t.length)&&index.h("p",null,"This document has no layers."),index.h("ul",null,t.map((e=>index.h("li",{key:e.name},index.h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.visible?"Y":"N",e.name)))))})(this.documentStore.state)))}};PdfLayers.style=PdfLayersStyle0,exports.pdf_layers=PdfLayers; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),FileService=require("./FileService-a7648fb6.js"),pdfPageCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}',PdfPageStyle0=pdfPageCss,fileService=new FileService.FileService,PdfPage=class{constructor(t){index.registerInstance(this,t),this.logger=ApiClient.createLogger("PdfPage"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.documentStore.onChange("layerRevisions",(t=>{this.layerRevision=t[this.pageIndex]}))},this.onViewerStoreLoaded=t=>{this.viewerStore=t},this.onIntersection=async t=>{for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;this.documentId&&this.pageIndex>=0&&(this.htmlContent=await fileService.pageAsHtml(this.documentId,this.pageIndex),this.logger.debug(`html loaded: ${null!==(e=null===(t=this.htmlContent.value)||void 0===t?void 0:t.length)&&void 0!==e?e:0} bytes`))},this.unload=async()=>{this.htmlContent=new ApiClient.ApiEmpty},this.documentStore=null,this.viewerStore=null,this.inView=!1,this.debugShouldLoad=!1,this.layerRevision=-1,this.htmlContent=new ApiClient.ApiEmpty,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=void 0,this.documentId=void 0,this.pdfPage=void 0,this.rectangleSelect=void 0,this.showCustomWidget=void 0,this.setFocusWidget=void 0}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const i=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");i&&this.observer.observe(i)}removeIntersectionObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}debugIntersectionColor(){return this.debugShouldLoad||this.inView?!this.debugShouldLoad&&this.inView?"yellow":this.debugShouldLoad&&!this.inView?"orange":"white":"teal"}generateStylesForHidingLayers(){var t;return((null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfLayers.value)||[]).filter((t=>!t.visible)).reduce(((t,e)=>`${t}\n div[data-layer="${e.name}"] {\n visibility: hidden !important;\n }`),"")}render(){const t=ApiClient.pageWidth(this.pdfPage),e=ApiClient.pageHeight(this.pdfPage),i=i=>{var o,r;if(null==this.pdfPage)return void this.logger.error("Cannot render page: pageInfo is null");return index.h(index.Fragment,null,index.h("div",{class:"overflow-visible relative flex-auto",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},index.h("div",{class:"absolute flex"},index.h("div",{style:{transform:`matrix(${i.zoomFactor},0,0,${i.zoomFactor},0,0)`}},index.h("div",{class:"absolute bg-white overflow-hidden",style:{width:`${t}px`,height:`${e}px`}},index.h("div",{style:{"transform-origin":"0 0",transform:`translate(${ApiClient.translateX(this.pdfPage)}px, ${ApiClient.translateY(this.pdfPage)}px) rotate(${ApiClient.rotate(this.pdfPage)}deg)`,width:`${t}px`,height:`${e}px`}},index.h("div",{innerHTML:this.htmlContent.value||void 0}),index.h("pdf-overlay",{images:null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfImages.get(this.pageIndex),texts:null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfTexts.get(this.pageIndex),width:t,height:e,userMode:i.userMode,pageIndex:this.pageIndex,pageInfo:this.pdfPage,rectangleSelect:t=>this.rectangleSelect(t),style:(i=>{switch(i.rotate){case ApiClient.PageRotate.Rotate0:return{transform:`translate(${-ApiClient.translateX(i)}px, ${-ApiClient.translateY(i)}px)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate90:return{"transform-origin":"0 0",transform:`translate(${ApiClient.translateY(i)}px, ${-ApiClient.translateX(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate180:return{"transform-origin":"0 0",transform:`translate(${ApiClient.translateX(i)}px, ${ApiClient.translateY(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate270:return{"transform-origin":"0 0",transform:`translate(${-ApiClient.translateY(i)}px, ${ApiClient.translateX(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`}}})(this.pdfPage)}),index.h("pdf-widgets",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,pdfPage:this.pdfPage,showCustomWidget:this.showCustomWidget,setFocusWidget:this.setFocusWidget},index.h("div",{slot:"customWidget",style:{height:"100%"}},index.h("slot",{name:"customWidget"})))))))),index.h("style",null,this.generateStylesForHidingLayers()))},o=i=>index.h("div",{style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},"Error: ",this.htmlContent.error);return index.h(index.Host,{class:{loaded:null!=this.htmlContent.value}},index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},index.h("div",{class:"mb-16 bg-white shadow-lg relative w-fit"},this.viewerStore&&(r=>index.h(index.Fragment,null,this.htmlContent.empty&&(i=>index.h("div",{class:"inset-0 flex justify-center items-center text-gray-400 text-sm",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},"Page not loaded"))(r),this.htmlContent.loading&&(i=>index.h("div",{class:"inset-0 flex justify-center items-center",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},index.h("pdf-spinner",null)))(r),this.htmlContent.value&&i(r),this.htmlContent.error&&o(r),index.h("div",{class:"text-gray-500 absolute -bottom-[2rem] left-1/2 -translate-x-1/2 font-[Arial]"},"page ",this.pageIndex+1)))(this.viewerStore.state))))}get el(){return index.getElement(this)}};PdfPage.style=PdfPageStyle0,exports.pdf_page=PdfPage; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),pdfPageCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}',PdfPageStyle0=pdfPageCss,fileService=new FileService.FileService,PdfPage=class{constructor(t){index.registerInstance(this,t),this.logger=ApiClient.createLogger("PdfPage"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.documentStore.onChange("layerRevisions",(t=>{this.layerRevision=t[this.pageIndex]}))},this.onViewerStoreLoaded=t=>{this.viewerStore=t},this.onIntersection=async t=>{for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;this.documentId&&this.pageIndex>=0&&(this.htmlContent=await fileService.pageAsHtml(this.documentId,this.pageIndex),this.logger.debug(`html loaded: ${null!==(e=null===(t=this.htmlContent.value)||void 0===t?void 0:t.length)&&void 0!==e?e:0} bytes`))},this.unload=async()=>{this.htmlContent=new ApiClient.ApiEmpty},this.documentStore=null,this.viewerStore=null,this.inView=!1,this.debugShouldLoad=!1,this.layerRevision=-1,this.htmlContent=new ApiClient.ApiEmpty,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=void 0,this.documentId=void 0,this.pdfPage=void 0,this.rectangleSelect=void 0,this.showCustomWidget=void 0,this.setFocusWidget=void 0}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const i=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");i&&this.observer.observe(i)}removeIntersectionObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}debugIntersectionColor(){return this.debugShouldLoad||this.inView?!this.debugShouldLoad&&this.inView?"yellow":this.debugShouldLoad&&!this.inView?"orange":"white":"teal"}generateStylesForHidingLayers(){var t;return((null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfLayers.value)||[]).filter((t=>!t.visible)).reduce(((t,e)=>`${t}\n div[data-layer="${e.name}"] {\n visibility: hidden !important;\n }`),"")}render(){const t=ApiClient.pageWidth(this.pdfPage),e=ApiClient.pageHeight(this.pdfPage),i=i=>{var o,r;if(null==this.pdfPage)return void this.logger.error("Cannot render page: pageInfo is null");return index.h(index.Fragment,null,index.h("div",{class:"overflow-visible relative flex-auto",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},index.h("div",{class:"absolute flex"},index.h("div",{style:{transform:`matrix(${i.zoomFactor},0,0,${i.zoomFactor},0,0)`}},index.h("div",{class:"absolute bg-white overflow-hidden",style:{width:`${t}px`,height:`${e}px`}},index.h("div",{style:{"transform-origin":"0 0",transform:`translate(${ApiClient.translateX(this.pdfPage)}px, ${ApiClient.translateY(this.pdfPage)}px) rotate(${ApiClient.rotate(this.pdfPage)}deg)`,width:`${t}px`,height:`${e}px`}},index.h("div",{innerHTML:this.htmlContent.value||void 0}),index.h("pdf-overlay",{images:null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfImages.get(this.pageIndex),texts:null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfTexts.get(this.pageIndex),width:t,height:e,userMode:i.userMode,pageIndex:this.pageIndex,pageInfo:this.pdfPage,rectangleSelect:t=>this.rectangleSelect(t),style:(i=>{switch(i.rotate){case ApiClient.PageRotate.Rotate0:return{transform:`translate(${-ApiClient.translateX(i)}px, ${-ApiClient.translateY(i)}px)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate90:return{"transform-origin":"0 0",transform:`translate(${ApiClient.translateY(i)}px, ${-ApiClient.translateX(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate180:return{"transform-origin":"0 0",transform:`translate(${ApiClient.translateX(i)}px, ${ApiClient.translateY(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`};case ApiClient.PageRotate.Rotate270:return{"transform-origin":"0 0",transform:`translate(${-ApiClient.translateY(i)}px, ${ApiClient.translateX(i)}px) rotate(${-ApiClient.rotate(i)}deg)`,width:`${t}px`,height:`${e}px`}}})(this.pdfPage)}),index.h("pdf-widgets",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,pdfPage:this.pdfPage,showCustomWidget:this.showCustomWidget,setFocusWidget:this.setFocusWidget},index.h("div",{slot:"customWidget",style:{height:"100%"}},index.h("slot",{name:"customWidget"})))))))),index.h("style",null,this.generateStylesForHidingLayers()))},o=i=>index.h("div",{style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},"Error: ",this.htmlContent.error);return index.h(index.Host,{class:{loaded:null!=this.htmlContent.value}},index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},index.h("div",{class:"mb-16 bg-white shadow-lg relative w-fit"},this.viewerStore&&(r=>index.h(index.Fragment,null,this.htmlContent.empty&&(i=>index.h("div",{class:"inset-0 flex justify-center items-center text-gray-400 text-sm",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},"Page not loaded"))(r),this.htmlContent.loading&&(i=>index.h("div",{class:"inset-0 flex justify-center items-center",style:{width:t*i.zoomFactor+"px",height:e*i.zoomFactor+"px"}},index.h("pdf-spinner",null)))(r),this.htmlContent.value&&i(r),this.htmlContent.error&&o(r),index.h("div",{class:"text-gray-500 absolute -bottom-[2rem] left-1/2 -translate-x-1/2 font-[Arial]"},"page ",this.pageIndex+1)))(this.viewerStore.state))))}get el(){return index.getElement(this)}};PdfPage.style=PdfPageStyle0,exports.pdf_page=PdfPage; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),pdfPagesCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{background-color:#f3f4f6;display:block;height:100%;overflow:scroll;width:100%}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}',PdfPagesStyle0=pdfPagesCss,PdfPages=class{constructor(e){index.registerInstance(this,e),this.pageindexchanged=index.createEvent(this,"pageindexchanged",7),this.zoomfactorchanged=index.createEvent(this,"zoomfactorchanged",7),this.usermodechanged=index.createEvent(this,"usermodechanged",7),this.focuswidgetchanged=index.createEvent(this,"focuswidgetchanged",7),this.rectangleselect=index.createEvent(this,"rectangleselect",7),this.logger=ApiClient.createLogger("PdfPages"),this.debug=!1,this.pageElements=[],this.onViewerStoreLoaded=e=>{this.viewerStore!=e?(this.viewerStore=e,this.logger.debug(`PdfViewerStore loaded: ${this.viewerStore.state.viewerName}`),this.viewerStore.onChange("pageIndex",(e=>{this.pageindexchanged.emit(e),this.pageMode===ApiClient.PageMode.Multi&&this.setScrollPositionToPage(e)})),this.viewerStore.onChange("zoomFactor",(e=>{this.zoomfactorchanged.emit(e)})),this.viewerStore.onChange("userMode",(e=>{this.usermodechanged.emit(e)})),this.viewerStore.state.debugUserMode=this.debugUserMode):this.logger.debug(`PdfViewerStore already loaded: ${this.viewerStore.state.viewerName}`)},this.registerPage=e=>t=>{t&&(this.pageElements[e]=t)},this.documentStore=null,this.viewerStore=null,this.document="default",this.name="default",this.pageMode=ApiClient.PageMode.Multi,this.debugUserMode=!1,this.showCustomWidget=()=>!1,this.focusWidget=null}componentDidLoad(){this.logger.debug("Loaded")}async zoom(e){this.viewerStore?(this.logger.debug("Zooming pdf document",e),this.viewerStore.state.zoomFactor=e):this.logger.error("Cannot zoom: viewerStore is null")}async gotoPage(e){this.viewerStore?(this.logger.debug("Going to page",e),this.viewerStore.state.pageIndex=e,this.setScrollPositionToPage(e)):this.logger.error("Cannot go to page: viewerStore is null")}async setPageMode(e){this.logger.debug("set page mode",e),this.pageMode=e}async getPageMode(){return this.pageMode}async getZoomFactor(){return this.viewerStore?this.viewerStore.state.zoomFactor:(this.logger.error("Cannot get zoom factor: viewerStore is null"),null)}async getPageIndex(){return this.viewerStore?this.viewerStore.state.pageIndex:(this.logger.error("Cannot get page index: viewerStore is null"),null)}async setHighlightFields(e){this.viewerStore?(this.logger.debug("Setting highlight fields",e),this.viewerStore.state.highlightFields=e):this.logger.error("Cannot set highlightFields: viewerStore is null")}async toggleLayer(e){this.documentStore?(this.logger.debug("Toggling pdf layer",e),this.documentStore.toggleLayer(e)):this.logger.error("Cannot toggle layer: documentStore is null")}async setUserMode(e){null!=this.viewerStore?this.viewerStore.state.userMode=e:this.logger.error("Cannot set user mode: viewer store is null")}async getUserMode(){if(null!=this.viewerStore)return this.viewerStore.state.userMode;this.logger.error("Cannot get user mode: viewer store is null")}async addImage(e,t,o,i,r,s){var a;null===(a=this.documentStore)||void 0===a||a.addImage(e,{bottom:t,left:o,width:i,height:r,image:s})}async addText(e,t,o,i,r,s,a){var n;null===(n=this.documentStore)||void 0===n||n.addText(e,{bottom:t,left:o,text:i,fontName:r,fontSize:s,color:a})}async getFocusWidget(){return this.focusWidget}setScrollPositionToPage(e){if(!this.pageElements[e])return;const t=this.pageElements[e].offsetTop||0;this.el.scrollTop=t-this.el.offsetTop-10}setFocusWidget(e){var t;this.focusWidget=e,null===(t=this.focuswidgetchanged)||void 0===t||t.emit(this.focusWidget)}render(){var e,t,o,i,r,s,a,n;this.logger.debug("render pdf-pages from document store",null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfRef,"viewer store",null===(t=this.viewerStore)||void 0===t?void 0:t.state.viewerName);const d=(e,t,o)=>index.h("pdf-page",{ref:this.registerPage(o),key:o,pdfdoc:this.document,pdfviewer:this.name,pageIndex:o,documentId:e.id,pdfPage:t,rectangleSelect:e=>{var t;return null===(t=this.rectangleselect)||void 0===t?void 0:t.emit(e)},showCustomWidget:this.showCustomWidget,setFocusWidget:e=>this.setFocusWidget(e)},index.h("div",{slot:"customWidget",style:{height:"100%"}},index.h("slot",{name:"customWidget"})));return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.name,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(null===(r=null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pdfInfo)||void 0===r?void 0:r.value)&&(null===(n=null===(a=null===(s=this.documentStore)||void 0===s?void 0:s.state)||void 0===a?void 0:a.pdfPages)||void 0===n?void 0:n.value)&&((e,t,o)=>{var i;return insertFonts.insertFonts(t,null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfFonts.value,document),index.h("div",{class:"bg-gray-100 p-4"},this.pageMode==ApiClient.PageMode.Multi&&((e,t)=>t.map(((t,o)=>d(e,t,o))))(t,o),this.pageMode!=ApiClient.PageMode.Multi&&((e,t,o)=>d(e,o[t],t))(t,e.pageIndex,o))})(this.viewerStore.state,this.documentStore.state.pdfInfo.value,this.documentStore.state.pdfPages.value)))}get el(){return index.getElement(this)}};PdfPages.style=PdfPagesStyle0,exports.pdf_pages=PdfPages; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),insertFonts=require("./insertFonts-9ab9bdee.js"),pdfPagesCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{background-color:#f3f4f6;display:block;height:100%;overflow:scroll;width:100%}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}',PdfPagesStyle0=pdfPagesCss,PdfPages=class{constructor(e){index.registerInstance(this,e),this.pageindexchanged=index.createEvent(this,"pageindexchanged",7),this.zoomfactorchanged=index.createEvent(this,"zoomfactorchanged",7),this.usermodechanged=index.createEvent(this,"usermodechanged",7),this.focuswidgetchanged=index.createEvent(this,"focuswidgetchanged",7),this.rectangleselect=index.createEvent(this,"rectangleselect",7),this.logger=ApiClient.createLogger("PdfPages"),this.debug=!1,this.pageElements=[],this.onViewerStoreLoaded=e=>{this.viewerStore!=e?(this.viewerStore=e,this.logger.debug(`PdfViewerStore loaded: ${this.viewerStore.state.viewerName}`),this.viewerStore.onChange("pageIndex",(e=>{this.pageindexchanged.emit(e),this.pageMode===ApiClient.PageMode.Multi&&this.setScrollPositionToPage(e)})),this.viewerStore.onChange("zoomFactor",(e=>{this.zoomfactorchanged.emit(e)})),this.viewerStore.onChange("userMode",(e=>{this.usermodechanged.emit(e)})),this.viewerStore.state.debugUserMode=this.debugUserMode):this.logger.debug(`PdfViewerStore already loaded: ${this.viewerStore.state.viewerName}`)},this.registerPage=e=>t=>{t&&(this.pageElements[e]=t)},this.documentStore=null,this.viewerStore=null,this.document="default",this.name="default",this.pageMode=ApiClient.PageMode.Multi,this.debugUserMode=!1,this.showCustomWidget=()=>!1,this.focusWidget=null}componentDidLoad(){this.logger.debug("Loaded")}async zoom(e){this.viewerStore?(this.logger.debug("Zooming pdf document",e),this.viewerStore.state.zoomFactor=e):this.logger.error("Cannot zoom: viewerStore is null")}async gotoPage(e){this.viewerStore?(this.logger.debug("Going to page",e),this.viewerStore.state.pageIndex=e,this.setScrollPositionToPage(e)):this.logger.error("Cannot go to page: viewerStore is null")}async setPageMode(e){this.logger.debug("set page mode",e),this.pageMode=e}async getPageMode(){return this.pageMode}async getZoomFactor(){return this.viewerStore?this.viewerStore.state.zoomFactor:(this.logger.error("Cannot get zoom factor: viewerStore is null"),null)}async getPageIndex(){return this.viewerStore?this.viewerStore.state.pageIndex:(this.logger.error("Cannot get page index: viewerStore is null"),null)}async setHighlightFields(e){this.viewerStore?(this.logger.debug("Setting highlight fields",e),this.viewerStore.state.highlightFields=e):this.logger.error("Cannot set highlightFields: viewerStore is null")}async toggleLayer(e){this.documentStore?(this.logger.debug("Toggling pdf layer",e),this.documentStore.toggleLayer(e)):this.logger.error("Cannot toggle layer: documentStore is null")}async setUserMode(e){null!=this.viewerStore?this.viewerStore.state.userMode=e:this.logger.error("Cannot set user mode: viewer store is null")}async getUserMode(){if(null!=this.viewerStore)return this.viewerStore.state.userMode;this.logger.error("Cannot get user mode: viewer store is null")}async addImage(e,t,o,i,r,s){var a;null===(a=this.documentStore)||void 0===a||a.addImage(e,{bottom:t,left:o,width:i,height:r,image:s})}async addText(e,t,o,i,r,s,a){var n;null===(n=this.documentStore)||void 0===n||n.addText(e,{bottom:t,left:o,text:i,fontName:r,fontSize:s,color:a})}async getFocusWidget(){return this.focusWidget}setScrollPositionToPage(e){if(!this.pageElements[e])return;const t=this.pageElements[e].offsetTop||0;this.el.scrollTop=t-this.el.offsetTop-10}setFocusWidget(e){var t;this.focusWidget=e,null===(t=this.focuswidgetchanged)||void 0===t||t.emit(this.focusWidget)}render(){var e,t,o,i,r,s,a,n;this.logger.debug("render pdf-pages from document store",null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfRef,"viewer store",null===(t=this.viewerStore)||void 0===t?void 0:t.state.viewerName);const d=(e,t,o)=>index.h("pdf-page",{ref:this.registerPage(o),key:o,pdfdoc:this.document,pdfviewer:this.name,pageIndex:o,documentId:e.id,pdfPage:t,rectangleSelect:e=>{var t;return null===(t=this.rectangleselect)||void 0===t?void 0:t.emit(e)},showCustomWidget:this.showCustomWidget,setFocusWidget:e=>this.setFocusWidget(e)},index.h("div",{slot:"customWidget",style:{height:"100%"}},index.h("slot",{name:"customWidget"})));return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.name,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(null===(r=null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pdfInfo)||void 0===r?void 0:r.value)&&(null===(n=null===(a=null===(s=this.documentStore)||void 0===s?void 0:s.state)||void 0===a?void 0:a.pdfPages)||void 0===n?void 0:n.value)&&((e,t,o)=>{var i;return insertFonts.insertFonts(t,null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfFonts.value,document),index.h("div",{class:"bg-gray-100 p-4"},this.pageMode==ApiClient.PageMode.Multi&&((e,t)=>t.map(((t,o)=>d(e,t,o))))(t,o),this.pageMode!=ApiClient.PageMode.Multi&&((e,t,o)=>d(e,o[t],t))(t,e.pageIndex,o))})(this.viewerStore.state,this.documentStore.state.pdfInfo.value,this.documentStore.state.pdfPages.value)))}get el(){return index.getElement(this)}};PdfPages.style=PdfPagesStyle0,exports.pdf_pages=PdfPages; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),IPdfField=require("./IPdfField-d920c3b2.js"),pdfSidebarCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.relative{position:relative}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-4{padding:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:1rem;position:relative}h1,h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}dl dt{font-weight:700}dl dd{margin-bottom:.5rem}h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-size:1.125rem;font-weight:700;line-height:1.75rem;margin-top:1rem}li a{cursor:pointer;display:block;padding-bottom:.25rem;padding-top:.25rem;text-decoration-line:underline}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.max-h-\\[40rem\\]{max-height:40rem}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}',PdfSidebarStyle0=pdfSidebarCss,PdfSidebar=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfSidebar"),this.updateCheckboxField=e=>()=>{if(!this.documentStore)return void this.logger.error("Cannot update checkbox field: documentStore is null");const t=IPdfField.fieldIsChecked(e)?e.checkBoxOffValue:e.checkBoxOnValue;this.documentStore.updateField(e.fullName,t)},this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default"}toggleCheckbox(e,t){this.logger.debug("toggleCheckbox, field=",e.fullName,"new value=",t),this.documentStore?this.documentStore.updateField(e.fullName,t):this.logger.error("Cannot toggle checkbox: documentStore is null")}render(){const e=e=>index.h(index.Fragment,null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"On value"),index.h("td",{class:"border px-4 py-2"},index.h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOnValue)},e.checkBoxOnValue))),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Off value"),index.h("td",{class:"border px-4 py-2"},index.h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOffValue)},e.checkBoxOffValue))),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Toggle"),index.h("td",{class:"border px-4 py-2"},index.h("input",{id:e.fullName,type:"checkbox",checked:IPdfField.fieldIsChecked(e),onChange:this.updateCheckboxField(e)}))));return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&this.viewerStore&&((t,i)=>{var d,l,n,r,o,a,s,x;const h=(null===(d=this.documentStore)||void 0===d?void 0:d.state.pdfInfo.value)||null,c=(null===(l=this.documentStore)||void 0===l?void 0:l.state.pdfPages.value)||null;if(i.pageIndex<0)return void this.logger.error(`viewerState.pageIndex is ${i.pageIndex}`);if(!h)return void this.logger.error("pdfInfo is null");if(!c)return void this.logger.error("pdfPages is null");const p=t.pdfFields.value||[],u=t.pdfLayers.value||[],g=t.pdfTags.value||[],b=(null===(o=null===(r=null===(n=this.documentStore)||void 0===n?void 0:n.state)||void 0===r?void 0:r.pdfLinks.get(i.pageIndex))||void 0===o?void 0:o.value)||[],y=(null===(x=null===(s=null===(a=this.documentStore)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pdfWidgets.get(i.pageIndex))||void 0===x?void 0:x.value)||[];return index.h("div",{class:"max-h-[40rem] overflow-y-auto"},index.h("ul",null,index.h("li",null,index.h("details",null,index.h("summary",null,"PDF info"),index.h("div",{class:"ml-4 outline"},index.h("dl",{class:"m-1"},index.h("dt",null,"id"),index.h("dd",null,h.id),index.h("dt",null,"fileName"),index.h("dd",null,h.originalFileName),index.h("dt",null,"pageCount"),index.h("dd",null,h.pageCount))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Pages"),index.h("div",{class:"ml-4 outline"},index.h("ul",{class:"m-1"},c.map(((e,t)=>index.h("li",{key:t},index.h("a",{class:{"font-bold":t==i.pageIndex},onClick:()=>i.pageIndex=t},"Page ",t+1)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Fields"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},p.map((t=>index.h("li",{class:"ml-4"},index.h("details",null,index.h("summary",null,"Field ",t.fullName),index.h("div",{class:"fieldPanel ml-4"},index.h("div",{class:"panel-header"}),index.h("div",{class:"panel-content divide-solid"},index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Field properties"},index.h("tbody",null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Full name"),index.h("td",{class:"border px-4 py-2"},t.fullName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Type"),index.h("td",{class:"border px-4 py-2"},t.fieldType)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Is XFA?"),index.h("td",{class:"border px-4 py-2"},t.isXfa?"Yes":"No")),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Read-only?"),index.h("td",{class:"border px-4 py-2"},t.readOnly?"Yes":"No")),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Required?"),index.h("td",{class:"border px-4 py-2"},t.requiredMode)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Value"),index.h("td",{class:"border px-4 py-2"},t.value)),"CheckBoxField"==t.fieldType&&e(t)))),index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Actions"},index.h("div",{class:"fixed-wrapper"},t.xfaActions&&t.xfaActions.map((e=>index.h("div",null,index.h("h2",null,e.activity),index.h("pre",null,e.script))))))))))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Layers"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},u.map((e=>index.h("li",{key:e.name},index.h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.name))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Links"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},b.map((e=>index.h("li",{key:e.pageIndex},index.h("a",null,"[link.type] / ",e.pageIndex)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Tags"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},g.map((e=>index.h("li",{key:e.tagId},index.h("a",null,e.tagType," / ",e.tagId)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Widgets"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},y.map((e=>index.h("li",null,index.h("details",null,index.h("summary",null,"Widget ",e.index," ",e.fieldName),index.h("div",{class:"widgetPanel mt-4"},index.h("div",{class:"panel-header"}),index.h("div",{class:"panel-content divide-solid"},index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Widget properties"},index.h("tbody",null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Index"),index.h("td",{class:"border px-4 py-2"},e.index)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Field"),index.h("td",{class:"border px-4 py-2"},e.fieldName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Type"),index.h("td",{class:"border px-4 py-2"},e.widgetType)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Font name"),index.h("td",{class:"border px-4 py-2"},e.fontName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Font size"),index.h("td",{class:"border px-4 py-2"},e.fontSize)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Left"),index.h("td",{class:"border px-4 py-2"},e.left)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Top"),index.h("td",{class:"border px-4 py-2"},e.top)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Bottom"),index.h("td",{class:"border px-4 py-2"},e.bottom)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Width"),index.h("td",{class:"border px-4 py-2"},e.width)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Height"),index.h("td",{class:"border px-4 py-2"},e.height)),"checkbox"==e.widgetType?index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Checkmark style"),index.h("td",{class:"border px-4 py-2"},e.checkMarkStyle)):null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Border style"),index.h("td",{class:"border px-4 py-2"},e.borderStyle)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Border color"),index.h("td",{class:"border px-4 py-2"},e.borderColor.R,", ",e.borderColor.G,", ",e.borderColor.B)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"New widget?"),index.h("td",{class:"border px-4 py-2"},e.newWidget?"yes":"no")),index.h("tr",null,index.h("table",null,index.h("thead",null,"Appearance States"),index.h("tbody",null,!!e.widgetType&&e.appearances.map((t=>index.h("tr",null,index.h("td",{class:"border px-4 py-2"},t.userStateString),index.h("td",{class:"border px-4 py-2"},t.appearanceStateString),((e,t)=>{if("checkbox"==e.widgetType)return null==t.html?index.h("td",null,"(empty)"):index.h("td",{class:"border px-4 py-2 scale-150 -translate-y-3",innerHTML:t.html});index.h("td",null)})(e,t)))))))))))))))))))))})(this.documentStore.state,this.viewerStore.state)))}};PdfSidebar.style=PdfSidebarStyle0,exports.pdf_sidebar=PdfSidebar; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),IPdfField=require("./IPdfField-d920c3b2.js"),pdfSidebarCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.relative{position:relative}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-4{padding:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:1rem;position:relative}h1,h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}dl dt{font-weight:700}dl dd{margin-bottom:.5rem}h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-size:1.125rem;font-weight:700;line-height:1.75rem;margin-top:1rem}li a{cursor:pointer;display:block;padding-bottom:.25rem;padding-top:.25rem;text-decoration-line:underline}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.max-h-\\[40rem\\]{max-height:40rem}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}',PdfSidebarStyle0=pdfSidebarCss,PdfSidebar=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfSidebar"),this.updateCheckboxField=e=>()=>{if(!this.documentStore)return void this.logger.error("Cannot update checkbox field: documentStore is null");const t=IPdfField.fieldIsChecked(e)?e.checkBoxOffValue:e.checkBoxOnValue;this.documentStore.updateField(e.fullName,t)},this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default"}toggleCheckbox(e,t){this.logger.debug("toggleCheckbox, field=",e.fullName,"new value=",t),this.documentStore?this.documentStore.updateField(e.fullName,t):this.logger.error("Cannot toggle checkbox: documentStore is null")}render(){const e=e=>index.h(index.Fragment,null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"On value"),index.h("td",{class:"border px-4 py-2"},index.h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOnValue)},e.checkBoxOnValue))),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Off value"),index.h("td",{class:"border px-4 py-2"},index.h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOffValue)},e.checkBoxOffValue))),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Toggle"),index.h("td",{class:"border px-4 py-2"},index.h("input",{id:e.fullName,type:"checkbox",checked:IPdfField.fieldIsChecked(e),onChange:this.updateCheckboxField(e)}))));return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&this.viewerStore&&((t,i)=>{var d,l,n,r,o,a,s,x;const h=(null===(d=this.documentStore)||void 0===d?void 0:d.state.pdfInfo.value)||null,c=(null===(l=this.documentStore)||void 0===l?void 0:l.state.pdfPages.value)||null;if(i.pageIndex<0)return void this.logger.error(`viewerState.pageIndex is ${i.pageIndex}`);if(!h)return void this.logger.error("pdfInfo is null");if(!c)return void this.logger.error("pdfPages is null");const p=t.pdfFields.value||[],u=t.pdfLayers.value||[],g=t.pdfTags.value||[],b=(null===(o=null===(r=null===(n=this.documentStore)||void 0===n?void 0:n.state)||void 0===r?void 0:r.pdfLinks.get(i.pageIndex))||void 0===o?void 0:o.value)||[],y=(null===(x=null===(s=null===(a=this.documentStore)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pdfWidgets.get(i.pageIndex))||void 0===x?void 0:x.value)||[];return index.h("div",{class:"max-h-[40rem] overflow-y-auto"},index.h("ul",null,index.h("li",null,index.h("details",null,index.h("summary",null,"PDF info"),index.h("div",{class:"ml-4 outline"},index.h("dl",{class:"m-1"},index.h("dt",null,"id"),index.h("dd",null,h.id),index.h("dt",null,"fileName"),index.h("dd",null,h.originalFileName),index.h("dt",null,"pageCount"),index.h("dd",null,h.pageCount))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Pages"),index.h("div",{class:"ml-4 outline"},index.h("ul",{class:"m-1"},c.map(((e,t)=>index.h("li",{key:t},index.h("a",{class:{"font-bold":t==i.pageIndex},onClick:()=>i.pageIndex=t},"Page ",t+1)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Fields"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},p.map((t=>index.h("li",{class:"ml-4"},index.h("details",null,index.h("summary",null,"Field ",t.fullName),index.h("div",{class:"fieldPanel ml-4"},index.h("div",{class:"panel-header"}),index.h("div",{class:"panel-content divide-solid"},index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Field properties"},index.h("tbody",null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Full name"),index.h("td",{class:"border px-4 py-2"},t.fullName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Type"),index.h("td",{class:"border px-4 py-2"},t.fieldType)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Is XFA?"),index.h("td",{class:"border px-4 py-2"},t.isXfa?"Yes":"No")),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Read-only?"),index.h("td",{class:"border px-4 py-2"},t.readOnly?"Yes":"No")),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Required?"),index.h("td",{class:"border px-4 py-2"},t.requiredMode)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Value"),index.h("td",{class:"border px-4 py-2"},t.value)),"CheckBoxField"==t.fieldType&&e(t)))),index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Actions"},index.h("div",{class:"fixed-wrapper"},t.xfaActions&&t.xfaActions.map((e=>index.h("div",null,index.h("h2",null,e.activity),index.h("pre",null,e.script))))))))))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Layers"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},u.map((e=>index.h("li",{key:e.name},index.h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.name))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Links"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},b.map((e=>index.h("li",{key:e.pageIndex},index.h("a",null,"[link.type] / ",e.pageIndex)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Tags"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},g.map((e=>index.h("li",{key:e.tagId},index.h("a",null,e.tagType," / ",e.tagId)))))))),index.h("li",null,index.h("details",null,index.h("summary",null,"Widgets"),index.h("div",{class:"ml-4"},index.h("ul",{class:"m-1"},y.map((e=>index.h("li",null,index.h("details",null,index.h("summary",null,"Widget ",e.index," ",e.fieldName),index.h("div",{class:"widgetPanel mt-4"},index.h("div",{class:"panel-header"}),index.h("div",{class:"panel-content divide-solid"},index.h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Widget properties"},index.h("tbody",null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Index"),index.h("td",{class:"border px-4 py-2"},e.index)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Field"),index.h("td",{class:"border px-4 py-2"},e.fieldName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Type"),index.h("td",{class:"border px-4 py-2"},e.widgetType)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Font name"),index.h("td",{class:"border px-4 py-2"},e.fontName)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Font size"),index.h("td",{class:"border px-4 py-2"},e.fontSize)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Left"),index.h("td",{class:"border px-4 py-2"},e.left)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Top"),index.h("td",{class:"border px-4 py-2"},e.top)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Bottom"),index.h("td",{class:"border px-4 py-2"},e.bottom)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Width"),index.h("td",{class:"border px-4 py-2"},e.width)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Height"),index.h("td",{class:"border px-4 py-2"},e.height)),"checkbox"==e.widgetType?index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Checkmark style"),index.h("td",{class:"border px-4 py-2"},e.checkMarkStyle)):null,index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Border style"),index.h("td",{class:"border px-4 py-2"},e.borderStyle)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"Border color"),index.h("td",{class:"border px-4 py-2"},e.borderColor.R,", ",e.borderColor.G,", ",e.borderColor.B)),index.h("tr",null,index.h("td",{class:"border px-4 py-2"},"New widget?"),index.h("td",{class:"border px-4 py-2"},e.newWidget?"yes":"no")),index.h("tr",null,index.h("table",null,index.h("thead",null,"Appearance States"),index.h("tbody",null,!!e.widgetType&&e.appearances.map((t=>index.h("tr",null,index.h("td",{class:"border px-4 py-2"},t.userStateString),index.h("td",{class:"border px-4 py-2"},t.appearanceStateString),((e,t)=>{if("checkbox"==e.widgetType)return null==t.html?index.h("td",null,"(empty)"):index.h("td",{class:"border px-4 py-2 scale-150 -translate-y-3",innerHTML:t.html});index.h("td",null)})(e,t)))))))))))))))))))))})(this.documentStore.state,this.viewerStore.state)))}};PdfSidebar.style=PdfSidebarStyle0,exports.pdf_sidebar=PdfSidebar; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),pdfSpinnerCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfSpinnerStyle0=pdfSpinnerCss,PdfSpinner=class{constructor(t){index.registerInstance(this,t),this.showText=!1}render(){return index.h("div",{key:"c28c7cd19b34336e380370e113960ba84837c5eb",role:"status",class:"flex items-center"},index.h("svg",{key:"3f7162976bbbd5ebced39b2570fe0c7c8e19b950","aria-hidden":"true",class:"w-8 h-8 mr-2 flex-shrink-0 text-gray-200 animate-spin fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},index.h("path",{key:"dd8bee8a2d58009e3846e63755f4e1815e826ac2",d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),index.h("path",{key:"88dfb6282854167b4fe0b71154ae52c036ff79ac",d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})),this.showText&&index.h("span",{class:""},"Loading..."))}};PdfSpinner.style=PdfSpinnerStyle0,exports.pdf_spinner=PdfSpinner; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),pdfSpinnerCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfSpinnerStyle0=pdfSpinnerCss,PdfSpinner=class{constructor(t){index.registerInstance(this,t),this.showText=!1}render(){return index.h("div",{key:"c28c7cd19b34336e380370e113960ba84837c5eb",role:"status",class:"flex items-center"},index.h("svg",{key:"3f7162976bbbd5ebced39b2570fe0c7c8e19b950","aria-hidden":"true",class:"w-8 h-8 mr-2 flex-shrink-0 text-gray-200 animate-spin fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},index.h("path",{key:"dd8bee8a2d58009e3846e63755f4e1815e826ac2",d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),index.h("path",{key:"88dfb6282854167b4fe0b71154ae52c036ff79ac",d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})),this.showText&&index.h("span",{class:""},"Loading..."))}};PdfSpinner.style=PdfSpinnerStyle0,exports.pdf_spinner=PdfSpinner; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),documentStore=require("./documentStore-e5a54072.js");require("./ApiClient-1db1c423.js"),require("./IPdfField-d920c3b2.js"),require("./FileService-a7648fb6.js");const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){index.registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=documentStore.ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),documentStore.onChange("pdfReferences",(()=>{this.setDocumentStore()})),documentStore.onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=documentStore.ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return index.h(index.Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},index.h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return index.getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0,exports.pdf_store_wrapper=PdfStoreWrapper; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),documentStore=require("./documentStore-3ad3569b.js");require("./ApiClient-eb21273a.js"),require("./IPdfField-d920c3b2.js"),require("./FileService-af047eef.js");const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){index.registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=documentStore.ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),documentStore.onChange("pdfReferences",(()=>{this.setDocumentStore()})),documentStore.onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=documentStore.ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return index.h(index.Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},index.h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return index.getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0,exports.pdf_store_wrapper=PdfStoreWrapper; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),FileService=require("./FileService-a7648fb6.js"),pdfThumbnailCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}img{background-size:cover}.static{position:static}.mb-4{margin-bottom:1rem}.flex{display:flex}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.hidden{display:none}.h-16{height:4rem}.h-24{height:6rem}.h-8{height:2rem}.w-0{width:0}.w-16{width:4rem}.w-8{width:2rem}.cursor-move{cursor:move}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pr-4{padding-right:1rem}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfThumbnailStyle0=pdfThumbnailCss,PdfThumbnail=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfThumbnail"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=e=>{this.documentStore=e,this.logger.debug("DocumentStoreLoaded",this.pageIndex)},this.onIntersection=async e=>{this.logger.debug("onIntersection");for(const t of e)this.inView=t.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var e,t;if(this.documentId&&this.pageIndex>=0){const i=new FileService.FileService,o=await i.getThumbnail(this.documentId,this.pageIndex);o.error?this.loadFailed=!0:(this.thumbnailData=o.value,this.logger.debug(`thumbnail loaded: ${null!==(t=null===(e=this.thumbnailData)||void 0===e?void 0:e.length)&&void 0!==t?t:0} characters`))}},this.unload=async()=>{this.thumbnailData=null},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.isDragged=!1,this.inView=!1,this.debugShouldLoad=!1,this.thumbnailData=null,this.loadFailed=!1,this.documentId=null,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=-1}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var e,t;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const i=null===(t=null===(e=this.el)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("div");i&&this.observer.observe(i)}removeIntersectionObserver(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null}render(){const e=e=>{return this.thumbnailData?(t=this.thumbnailData,index.h("img",{src:t,style:{"pointer-events":"none"}})):this.loadFailed?index.h("div",{class:"text-xs text-red-600"},"error"):index.h("div",{class:"w-8 h-8"},index.h("pdf-spinner",{showText:!1}));var t};return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:e=>this.viewerStore=e},index.h("div",null,this.documentStore&&this.viewerStore&&((t,i)=>{var o;let r=this.pageIndex==i.pageIndex;const n=null===(o=t.pdfPages.value)||void 0===o?void 0:o[this.pageIndex];if(!n)return null;const a=ApiClient.pageWidth(n),s=ApiClient.pageHeight(n),d=a>s;return index.h("div",{class:"flex -mr-4 pr-4"},index.h("div",{class:{"transition-width duration-300 w-0":!0,"duration-100 w-16 ml-1":this.isDraggingOver}}),index.h("div",{class:{"flex flex-col items-center":!0,hidden:this.isDragged},draggable:!1},index.h("div",{class:{"bg-white shadow-lg rounded border flex justify-center items-center":!0,"cursor-move":!1,"h-16":d,"h-24":!d,"shadow-none border-brand":r},style:{"aspect-ratio":`${a} / ${s}`}},e()),index.h("div",{class:{"mt-1 text-sm":!0,"text-black":r,"text-gray-600":!r,"font-[Arial]":!0}},"Page ",this.pageIndex+1)))})(this.documentStore.state,this.viewerStore.state))))}get el(){return index.getElement(this)}};PdfThumbnail.style=PdfThumbnailStyle0,exports.pdf_thumbnail=PdfThumbnail; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),pdfThumbnailCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}img{background-size:cover}.static{position:static}.mb-4{margin-bottom:1rem}.flex{display:flex}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.hidden{display:none}.h-16{height:4rem}.h-24{height:6rem}.h-8{height:2rem}.w-0{width:0}.w-16{width:4rem}.w-8{width:2rem}.cursor-move{cursor:move}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pr-4{padding-right:1rem}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfThumbnailStyle0=pdfThumbnailCss,PdfThumbnail=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfThumbnail"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=e=>{this.documentStore=e,this.logger.debug("DocumentStoreLoaded",this.pageIndex)},this.onIntersection=async e=>{this.logger.debug("onIntersection");for(const t of e)this.inView=t.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var e,t;if(this.documentId&&this.pageIndex>=0){const i=new FileService.FileService,o=await i.getThumbnail(this.documentId,this.pageIndex);o.error?this.loadFailed=!0:(this.thumbnailData=o.value,this.logger.debug(`thumbnail loaded: ${null!==(t=null===(e=this.thumbnailData)||void 0===e?void 0:e.length)&&void 0!==t?t:0} characters`))}},this.unload=async()=>{this.thumbnailData=null},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.isDragged=!1,this.inView=!1,this.debugShouldLoad=!1,this.thumbnailData=null,this.loadFailed=!1,this.documentId=null,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=-1}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var e,t;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const i=null===(t=null===(e=this.el)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("div");i&&this.observer.observe(i)}removeIntersectionObserver(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null}render(){const e=e=>{return this.thumbnailData?(t=this.thumbnailData,index.h("img",{src:t,style:{"pointer-events":"none"}})):this.loadFailed?index.h("div",{class:"text-xs text-red-600"},"error"):index.h("div",{class:"w-8 h-8"},index.h("pdf-spinner",{showText:!1}));var t};return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:e=>this.viewerStore=e},index.h("div",null,this.documentStore&&this.viewerStore&&((t,i)=>{var o;let r=this.pageIndex==i.pageIndex;const n=null===(o=t.pdfPages.value)||void 0===o?void 0:o[this.pageIndex];if(!n)return null;const a=ApiClient.pageWidth(n),s=ApiClient.pageHeight(n),d=a>s;return index.h("div",{class:"flex -mr-4 pr-4"},index.h("div",{class:{"transition-width duration-300 w-0":!0,"duration-100 w-16 ml-1":this.isDraggingOver}}),index.h("div",{class:{"flex flex-col items-center":!0,hidden:this.isDragged},draggable:!1},index.h("div",{class:{"bg-white shadow-lg rounded border flex justify-center items-center":!0,"cursor-move":!1,"h-16":d,"h-24":!d,"shadow-none border-brand":r},style:{"aspect-ratio":`${a} / ${s}`}},e()),index.h("div",{class:{"mt-1 text-sm":!0,"text-black":r,"text-gray-600":!r,"font-[Arial]":!0}},"Page ",this.pageIndex+1)))})(this.documentStore.state,this.viewerStore.state))))}get el(){return index.getElement(this)}};PdfThumbnail.style=PdfThumbnailStyle0,exports.pdf_thumbnail=PdfThumbnail; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),pdfThumbnailsCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}.flex{display:flex}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}:host{display:block}.thumbnails{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity));display:flex;flex-direction:column;padding:1rem}.static{position:static}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfThumbnailsStyle0=pdfThumbnailsCss,PdfThumbnails=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfThumbnails"),this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.clickPage=e=>()=>{var t;(null===(t=this.viewerStore)||void 0===t?void 0:t.state)&&(this.viewerStore.state.pageIndex=e)},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.document="default",this.pagesviewer="default",this.direction="row"}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.logger.debug("drop");const o=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/plain");if(!o)return;const{document:r,pageIndex:i}=JSON.parse(o);this.logger.debug("drop",r,i),this.documentStore?this.documentStore.movePageToDocument(r,i):this.logger.error("Cannot move page to document: documentstore is null")}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},index.h("div",{class:"thumbnails"},this.documentStore&&this.viewerStore&&(e=>{var t;const o=e.pdfInfo.value,r=e.pdfPages.value;if(!o||!r)return null;const i=o.id;return index.h("div",{class:{"max-w-full overflow-x-auto pt-4 min-h-[9rem]":!0,"border-dashed border-2":!0,"border-transparent":!this.isDraggingOver,"border-brand":this.isDraggingOver}},index.h("div",{class:{flex:!0,"gap-4":!0,"flex-row":"row"==(null!==(t=this.direction)&&void 0!==t?t:"row"),"flex-col":"column"==this.direction}},r.map(((e,t)=>index.h("a",{key:`${i}-${t}`,class:"cursor-pointer mb-4 flex flex-col justify-end items-center",onClick:this.clickPage(t)},index.h("pdf-thumbnail",{documentId:i,pdfdoc:this.document,pdfviewer:this.pagesviewer,pageIndex:t}))))))})(this.documentStore.state))))}};PdfThumbnails.style=PdfThumbnailsStyle0,exports.pdf_thumbnails=PdfThumbnails; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),pdfThumbnailsCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}.flex{display:flex}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}:host{display:block}.thumbnails{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity));display:flex;flex-direction:column;padding:1rem}.static{position:static}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfThumbnailsStyle0=pdfThumbnailsCss,PdfThumbnails=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfThumbnails"),this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.clickPage=e=>()=>{var t;(null===(t=this.viewerStore)||void 0===t?void 0:t.state)&&(this.viewerStore.state.pageIndex=e)},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.document="default",this.pagesviewer="default",this.direction="row"}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.logger.debug("drop");const o=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/plain");if(!o)return;const{document:r,pageIndex:i}=JSON.parse(o);this.logger.debug("drop",r,i),this.documentStore?this.documentStore.movePageToDocument(r,i):this.logger.error("Cannot move page to document: documentstore is null")}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},index.h("div",{class:"thumbnails"},this.documentStore&&this.viewerStore&&(e=>{var t;const o=e.pdfInfo.value,r=e.pdfPages.value;if(!o||!r)return null;const i=o.id;return index.h("div",{class:{"max-w-full overflow-x-auto pt-4 min-h-[9rem]":!0,"border-dashed border-2":!0,"border-transparent":!this.isDraggingOver,"border-brand":this.isDraggingOver}},index.h("div",{class:{flex:!0,"gap-4":!0,"flex-row":"row"==(null!==(t=this.direction)&&void 0!==t?t:"row"),"flex-col":"column"==this.direction}},r.map(((e,t)=>index.h("a",{key:`${i}-${t}`,class:"cursor-pointer mb-4 flex flex-col justify-end items-center",onClick:this.clickPage(t)},index.h("pdf-thumbnail",{documentId:i,pdfdoc:this.document,pdfviewer:this.pagesviewer,pageIndex:t}))))))})(this.documentStore.state))))}};PdfThumbnails.style=PdfThumbnailsStyle0,exports.pdf_thumbnails=PdfThumbnails; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),FileService=require("./FileService-a7648fb6.js"),pdfUploaderCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.flex{display:flex}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfUploaderStyle0=pdfUploaderCss,PdfUploader=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfUploader"),this.fileService=new FileService.FileService,this.upload=async e=>{if(e){this.logger.debug("File uploading",e.name,e.size,e.type);const t=await this.fileService.upload(e);if(this.logger.debug("File uploaded",t),!this.documentStore)return void this.logger.error("Cannot set pdf id in store: store is null");this.documentStore.load(t.id)}else this.logger.debug("No valid files uploaded")},this.handleFiles=e=>{this.logger.debug("File selected");const t=e.target.files||[];this.upload&&this.upload(t[0])},this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default",this.isDraggingOver=!1}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;this.logger.debug("File dropped"),e.preventDefault(),this.isDraggingOver=!1;const o=(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||[];this.upload&&this.upload(o[0])}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(e=>{if(!e.pdfId)return index.h("label",{class:{"flex flex-col bg-blue-300 py-12 px-24 rounded-xl cursor-pointer text-center m-8":!0,"bg-blue-400 border-dashed border-4 border-brand":this.isDraggingOver}},index.h("input",{type:"file",accept:"application/pdf",onChange:this.handleFiles,class:"hidden"}),index.h("h3",{class:"text-xl font-bold text-brand mb-2"},"Drag and drop a PDF document"),index.h("div",{class:"text-gray-600 text-sm"},"...or click to select a PDF document from your computer"))})(this.documentStore.state)))}};PdfUploader.style=PdfUploaderStyle0,exports.pdf_uploader=PdfUploader; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),FileService=require("./FileService-af047eef.js"),pdfUploaderCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.flex{display:flex}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfUploaderStyle0=pdfUploaderCss,PdfUploader=class{constructor(e){index.registerInstance(this,e),this.logger=ApiClient.createLogger("PdfUploader"),this.fileService=new FileService.FileService,this.upload=async e=>{if(e){this.logger.debug("File uploading",e.name,e.size,e.type);const t=await this.fileService.upload(e);if(this.logger.debug("File uploaded",t),!this.documentStore)return void this.logger.error("Cannot set pdf id in store: store is null");this.documentStore.load(t.id)}else this.logger.debug("No valid files uploaded")},this.handleFiles=e=>{this.logger.debug("File selected");const t=e.target.files||[];this.upload&&this.upload(t[0])},this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default",this.isDraggingOver=!1}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;this.logger.debug("File dropped"),e.preventDefault(),this.isDraggingOver=!1;const o=(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||[];this.upload&&this.upload(o[0])}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(e=>{if(!e.pdfId)return index.h("label",{class:{"flex flex-col bg-blue-300 py-12 px-24 rounded-xl cursor-pointer text-center m-8":!0,"bg-blue-400 border-dashed border-4 border-brand":this.isDraggingOver}},index.h("input",{type:"file",accept:"application/pdf",onChange:this.handleFiles,class:"hidden"}),index.h("h3",{class:"text-xl font-bold text-brand mb-2"},"Drag and drop a PDF document"),index.h("div",{class:"text-gray-600 text-sm"},"...or click to select a PDF document from your computer"))})(this.documentStore.state)))}};PdfUploader.style=PdfUploaderStyle0,exports.pdf_uploader=PdfUploader; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),ApiClient=require("./ApiClient-1db1c423.js"),UserModeEditPlaceholder=require("./UserModeEditPlaceholder-6a05b67c.js");function setDragEventData(t,e,i,o,r){if(!t.dataTransfer)return;const a=t.offsetY-e(),s=t.offsetX-i.left;t.dataTransfer.effectAllowed="move",o&&t.dataTransfer.setDragImage(o,s*r,a*r),t.dataTransfer.setData("text/plain",JSON.stringify({type:"widget",index:i.index,height:i.height,mouseTop:a,mouseLeft:s}))}const bgBlue200="rgb(191 219 254)",getWidgetDivStyle=t=>({top:`${t.top()}px`,left:`${t.pdfWidget.left}px`,width:`${t.pdfWidget.width}px`,height:`${t.pdfWidget.height}px`,"background-color":bgBlue200});function resolveAppearance(t,e){const i=t.mouseDown&&t.mouseOver?"down":t.mouseOver?"rollover":"normal";let o=!0;switch(e.fieldType){case"CheckBoxField":o=e.value!==e.checkBoxOnValue;break;case"RadioButtonField":o=e.value!==t.pdfWidget.radioButtonOption}let r=t.pdfWidget.appearances.find((t=>t.userStateString==i&&t.appearanceStateString==(o?"off":"on")));return r&&r.html||(t.logger.debug("did not find appearance matching userState",i,"and field state =",o?"off":"on"),r=t.pdfWidget.appearances.find((t=>"normal"==t.userStateString&&t.appearanceStateString==(o?"off":"on")))),r&&r.html||(t.logger.debug("did not find normal appearance matching field state =",o?"off":"on"),r=t.pdfWidget.appearances[0]),r}const renderWidget=(t,e,i)=>{const o=resolveAppearance(t,e);return index.h("div",{ref:e=>t.setDivElement(e),onClick:e=>t.click(e),draggable:t.isEditing(),class:"absolute z-40 opacity-100 overflow-hidden",style:i},index.h("div",{class:"tc-widget-appearance","data-user":o.userStateString,"data-state":o.appearanceStateString,innerHTML:o.html||void 0}))},bgOrange400="rgb(251 146 60)",getDraggingGhostStyle=t=>e=>({top:"-4000px",width:t.pdfWidget.width*e.zoomFactor+"px",height:t.pdfWidget.height*e.zoomFactor+"px",cursor:t.isEditing()?"move":void 0,"z-index":t.selected?"60":void 0,"background-color":t.selected?bgOrange400:void 0}),renderDraggingGhost=(t,e)=>index.h("div",{ref:e=>t.setDraggingGhost(e),class:"absolute z-40 bg-orange-200 opacity-40 overflow-hidden",style:getDraggingGhostStyle(t)(e)}),pdfWidgetBaseCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.z-40{z-index:40}.opacity-100{opacity:1}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.opacity-40{opacity:.4}',PdfWidgetBaseStyle0=pdfWidgetBaseCss,PdfWidgetBase=class{constructor(t){index.registerInstance(this,t),this.onClick=index.createEvent(this,"onClick",7),this.divElement=void 0,this.draggingGhost=void 0,this.logger=ApiClient.createLogger("PdfWidgetBase"),this.mouseDown=!1,this.mouseOver=!1,this.isEditing=()=>{var t;return(null===(t=this.viewerStore)||void 0===t?void 0:t.state.userMode)==UserModeEditPlaceholder.userModeEditPlaceholder},this.debugUserMode=()=>{var t;if(null===(t=this.viewerStore)||void 0===t?void 0:t.state.debugUserMode)return this.isEditing()?"2px dashed blue":"2px dashed red"},this.click=t=>{var e;this.logger.debug("click",t),(null===(e=this.field)||void 0===e?void 0:e.readOnly)||this.isEditing()||(this.hasFocus=!0),this.onClick.emit(t)},this.getWidgetState=()=>this.isEditing()?"edit":this.hasFocus?"focus":"view",this.viewerStore=null,this.pageIndex=-1,this.documentStore=null,this.pdfWidget=void 0,this.widgetDivStyles=void 0,this.pdfPage=void 0,this.field=null,this.hasFocus=!1,this.isDragged=!1,this.widgetsRevision=-1}componentWillRender(){var t,e,i,o,r;this.logger.debug("componentWillRender"),this.field=(null===(o=null===(i=null===(e=null===(t=this.documentStore)||void 0===t?void 0:t.state)||void 0===e?void 0:e.pdfFields)||void 0===i?void 0:i.value)||void 0===o?void 0:o.find((t=>t.fullName==this.pdfWidget.fieldName)))||null,null===(r=this.documentStore)||void 0===r||r.onChange("widgetsRevisions",(t=>{this.widgetsRevision=t[this.pageIndex]}))}mouseDownHandler(t){this.mouseDown=!0,this.logger.debug("mouseDown, ev target=",t.target)}mouseUpHandler(t){this.mouseDown=!1}mouseOverHandler(t){this.isEditing()||(this.mouseOver=!0,this.mouseDown=0!=t.buttons)}mouseOutHandler(t){this.isEditing()||(this.mouseOver=!1,this.mouseDown=0!=t.buttons)}dragStartHandler(t){var e;if(!this.isEditing())return;this.isDragged=!0;const i=(null===(e=this.viewerStore)||void 0===e?void 0:e.state.zoomFactor)||1;setDragEventData(t,this.top,this.pdfWidget,this.draggingGhost||null,i)}dragEndHandler(){this.isDragged=!1}setDivElement(t){this.divElement=t}top(){const t=this.pdfPage;return(t&&ApiClient.pageHeight(t)||0)-this.pdfWidget.bottom-this.pdfWidget.height}setDraggingGhost(t){this.draggingGhost=t}render(){var t;if(!this.field)return null;const e=this.isEditing()?"both":"none",i=this.debugUserMode(),o=Object.assign(Object.assign(Object.assign({},getWidgetDivStyle(this)),this.widgetDivStyles),{resize:e,border:i});if(!this.viewerStore)return null;const r=null===(t=this.viewerStore)||void 0===t?void 0:t.state;return index.h(index.Host,null,renderWidget(this,this.field,o),renderDraggingGhost(this,r),index.h("slot",null))}};PdfWidgetBase.style=PdfWidgetBaseStyle0,exports.pdf_widget_base=PdfWidgetBase; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),ApiClient=require("./ApiClient-eb21273a.js"),UserModeEditPlaceholder=require("./UserModeEditPlaceholder-6a05b67c.js");function setDragEventData(t,e,i,o,r){if(!t.dataTransfer)return;const a=t.offsetY-e(),s=t.offsetX-i.left;t.dataTransfer.effectAllowed="move",o&&t.dataTransfer.setDragImage(o,s*r,a*r),t.dataTransfer.setData("text/plain",JSON.stringify({type:"widget",index:i.index,height:i.height,mouseTop:a,mouseLeft:s}))}const bgBlue200="rgb(191 219 254)",getWidgetDivStyle=t=>({top:`${t.top()}px`,left:`${t.pdfWidget.left}px`,width:`${t.pdfWidget.width}px`,height:`${t.pdfWidget.height}px`,"background-color":bgBlue200});function resolveAppearance(t,e){const i=t.mouseDown&&t.mouseOver?"down":t.mouseOver?"rollover":"normal";let o=!0;switch(e.fieldType){case"CheckBoxField":o=e.value!==e.checkBoxOnValue;break;case"RadioButtonField":o=e.value!==t.pdfWidget.radioButtonOption}let r=t.pdfWidget.appearances.find((t=>t.userStateString==i&&t.appearanceStateString==(o?"off":"on")));return r&&r.html||(t.logger.debug("did not find appearance matching userState",i,"and field state =",o?"off":"on"),r=t.pdfWidget.appearances.find((t=>"normal"==t.userStateString&&t.appearanceStateString==(o?"off":"on")))),r&&r.html||(t.logger.debug("did not find normal appearance matching field state =",o?"off":"on"),r=t.pdfWidget.appearances[0]),r}const renderWidget=(t,e,i)=>{const o=resolveAppearance(t,e);return index.h("div",{ref:e=>t.setDivElement(e),onClick:e=>t.click(e),draggable:t.isEditing(),class:"absolute z-40 opacity-100 overflow-hidden",style:i},index.h("div",{class:"tc-widget-appearance","data-user":o.userStateString,"data-state":o.appearanceStateString,innerHTML:o.html||void 0}))},bgOrange400="rgb(251 146 60)",getDraggingGhostStyle=t=>e=>({top:"-4000px",width:t.pdfWidget.width*e.zoomFactor+"px",height:t.pdfWidget.height*e.zoomFactor+"px",cursor:t.isEditing()?"move":void 0,"z-index":t.selected?"60":void 0,"background-color":t.selected?bgOrange400:void 0}),renderDraggingGhost=(t,e)=>index.h("div",{ref:e=>t.setDraggingGhost(e),class:"absolute z-40 bg-orange-200 opacity-40 overflow-hidden",style:getDraggingGhostStyle(t)(e)}),pdfWidgetBaseCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.z-40{z-index:40}.opacity-100{opacity:1}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.opacity-40{opacity:.4}',PdfWidgetBaseStyle0=pdfWidgetBaseCss,PdfWidgetBase=class{constructor(t){index.registerInstance(this,t),this.onClick=index.createEvent(this,"onClick",7),this.divElement=void 0,this.draggingGhost=void 0,this.logger=ApiClient.createLogger("PdfWidgetBase"),this.mouseDown=!1,this.mouseOver=!1,this.isEditing=()=>{var t;return(null===(t=this.viewerStore)||void 0===t?void 0:t.state.userMode)==UserModeEditPlaceholder.userModeEditPlaceholder},this.debugUserMode=()=>{var t;if(null===(t=this.viewerStore)||void 0===t?void 0:t.state.debugUserMode)return this.isEditing()?"2px dashed blue":"2px dashed red"},this.click=t=>{var e;this.logger.debug("click",t),(null===(e=this.field)||void 0===e?void 0:e.readOnly)||this.isEditing()||(this.hasFocus=!0),this.onClick.emit(t)},this.getWidgetState=()=>this.isEditing()?"edit":this.hasFocus?"focus":"view",this.viewerStore=null,this.pageIndex=-1,this.documentStore=null,this.pdfWidget=void 0,this.widgetDivStyles=void 0,this.pdfPage=void 0,this.field=null,this.hasFocus=!1,this.isDragged=!1,this.widgetsRevision=-1}componentWillRender(){var t,e,i,o,r;this.logger.debug("componentWillRender"),this.field=(null===(o=null===(i=null===(e=null===(t=this.documentStore)||void 0===t?void 0:t.state)||void 0===e?void 0:e.pdfFields)||void 0===i?void 0:i.value)||void 0===o?void 0:o.find((t=>t.fullName==this.pdfWidget.fieldName)))||null,null===(r=this.documentStore)||void 0===r||r.onChange("widgetsRevisions",(t=>{this.widgetsRevision=t[this.pageIndex]}))}mouseDownHandler(t){this.mouseDown=!0,this.logger.debug("mouseDown, ev target=",t.target)}mouseUpHandler(t){this.mouseDown=!1}mouseOverHandler(t){this.isEditing()||(this.mouseOver=!0,this.mouseDown=0!=t.buttons)}mouseOutHandler(t){this.isEditing()||(this.mouseOver=!1,this.mouseDown=0!=t.buttons)}dragStartHandler(t){var e;if(!this.isEditing())return;this.isDragged=!0;const i=(null===(e=this.viewerStore)||void 0===e?void 0:e.state.zoomFactor)||1;setDragEventData(t,this.top,this.pdfWidget,this.draggingGhost||null,i)}dragEndHandler(){this.isDragged=!1}setDivElement(t){this.divElement=t}top(){const t=this.pdfPage;return(t&&ApiClient.pageHeight(t)||0)-this.pdfWidget.bottom-this.pdfWidget.height}setDraggingGhost(t){this.draggingGhost=t}render(){var t;if(!this.field)return null;const e=this.isEditing()?"both":"none",i=this.debugUserMode(),o=Object.assign(Object.assign(Object.assign({},getWidgetDivStyle(this)),this.widgetDivStyles),{resize:e,border:i});if(!this.viewerStore)return null;const r=null===(t=this.viewerStore)||void 0===t?void 0:t.state;return index.h(index.Host,null,renderWidget(this,this.field,o),renderDraggingGhost(this,r),index.h("slot",null))}};PdfWidgetBase.style=PdfWidgetBaseStyle0,exports.pdf_widget_base=PdfWidgetBase; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),pdfZoomButtonCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}:host{display:inline-block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomButtonStyle0=pdfZoomButtonCss,PdfZoomButton=class{constructor(t){index.registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default",this.zoom=void 0}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=>index.h("button",{type:"button",onClick:()=>t.zoomFactor=this.zoom},index.h("slot",null)))(this.viewerStore.state)))}};PdfZoomButton.style=PdfZoomButtonStyle0,exports.pdf_zoom_button=PdfZoomButton; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),pdfZoomButtonCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}:host{display:inline-block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomButtonStyle0=pdfZoomButtonCss,PdfZoomButton=class{constructor(t){index.registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default",this.zoom=void 0}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=>index.h("button",{type:"button",onClick:()=>t.zoomFactor=this.zoom},index.h("slot",null)))(this.viewerStore.state)))}};PdfZoomButton.style=PdfZoomButtonStyle0,exports.pdf_zoom_button=PdfZoomButton; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),pdfZoomControlCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.flex{display:flex}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomControlStyle0=pdfZoomControlCss,PdfZoomControl=class{constructor(t){index.registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default"}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=this.viewerStore.state,index.h("div",{class:"flex"},[.25,.5,1,2,4].map((e=>index.h("button",{key:e,type:"button",class:{btn:!0,"!bg-blue-700":e==t.zoomFactor},onClick:()=>t.zoomFactor=e},100*e,"%")))))));var t}};PdfZoomControl.style=PdfZoomControlStyle0,exports.pdf_zoom_control=PdfZoomControl; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),pdfZoomControlCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.flex{display:flex}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomControlStyle0=pdfZoomControlCss,PdfZoomControl=class{constructor(t){index.registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default"}render(){return index.h(index.Host,null,index.h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=this.viewerStore.state,index.h("div",{class:"flex"},[.25,.5,1,2,4].map((e=>index.h("button",{key:e,type:"button",class:{btn:!0,"!bg-blue-700":e==t.zoomFactor},onClick:()=>t.zoomFactor=e},100*e,"%")))))));var t}};PdfZoomControl.style=PdfZoomControlStyle0,exports.pdf_zoom_control=PdfZoomControl; |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-7e6a9b14.js"),appGlobals=require("./app-globals-3a1e7e63.js"),patchBrowser=()=>{const e="undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("unopdf-core.cjs.js",document.baseURI).href,d={};return""!==e&&(d.resourcesUrl=new URL(".",e).href),index.promiseResolve(d)};patchBrowser().then((async e=>(await appGlobals.globalScripts(),index.bootstrapLazy([["pdf-store-wrapper.cjs",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages.cjs",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails.cjs",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks.cjs",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers.cjs",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar.cjs",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader.cjs",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button.cjs",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control.cjs",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application.cjs",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document.cjs",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner.cjs",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base.cjs",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page.cjs",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail.cjs",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8.cjs",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))),exports.setNonce=index.setNonce; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-d93e18a5.js"),appGlobals=require("./app-globals-3a1e7e63.js"),patchBrowser=()=>{const e="undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("unopdf-core.cjs.js",document.baseURI).href,d={};return""!==e&&(d.resourcesUrl=new URL(".",e).href),index.promiseResolve(d)};patchBrowser().then((async e=>(await appGlobals.globalScripts(),index.bootstrapLazy([["pdf-store-wrapper.cjs",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages.cjs",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails.cjs",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks.cjs",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers.cjs",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar.cjs",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader.cjs",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button.cjs",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control.cjs",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application.cjs",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document.cjs",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner.cjs",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base.cjs",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page.cjs",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail.cjs",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8.cjs",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))),exports.setNonce=index.setNonce; |
@@ -1,1 +0,1 @@ | ||
export const LIB_VERSION="1.2.12"; | ||
export const LIB_VERSION="1.2.13-b0edaebc"; |
@@ -1,1 +0,1 @@ | ||
import{proxyCustomElement,HTMLElement,createEvent,Env,h,Host}from"@stencil/core/internal/client";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient.js";import{F as FileService}from"./FileService.js";import{a as addFontFace}from"./insertFonts.js";const LIB_VERSION="1.2.12";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:"1.2.12",apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version 1.2.12 is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ","1.2.12",". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}static get style(){return PdfApplicationStyle0}},[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["pdf-application"].forEach((e=>{if("pdf-application"===e)customElements.get(e)||customElements.define(e,PdfApplication$1)}))}const PdfApplication=PdfApplication$1,defineCustomElement=defineCustomElement$1;export{PdfApplication,defineCustomElement}; | ||
import{proxyCustomElement,HTMLElement,createEvent,Env,h,Host}from"@stencil/core/internal/client";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient.js";import{F as FileService}from"./FileService.js";import{a as addFontFace}from"./insertFonts.js";const LIB_VERSION="1.2.13-b0edaebc";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}static get style(){return PdfApplicationStyle0}},[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["pdf-application"].forEach((e=>{if("pdf-application"===e)customElements.get(e)||customElements.define(e,PdfApplication$1)}))}const PdfApplication=PdfApplication$1,defineCustomElement=defineCustomElement$1;export{PdfApplication,defineCustomElement}; |
@@ -1,1 +0,1 @@ | ||
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return this}static get style(){return PdfStoreWrapperStyle0}},[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["pdf-store-wrapper"].forEach((t=>{if("pdf-store-wrapper"===t)customElements.get(t)||customElements.define(t,PdfStoreWrapper)}))}export{PdfStoreWrapper as P,defineCustomElement as d}; | ||
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return this}static get style(){return PdfStoreWrapperStyle0}},[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["pdf-store-wrapper"].forEach((t=>{if("pdf-store-wrapper"===t)customElements.get(t)||customElements.define(t,PdfStoreWrapper)}))}export{PdfStoreWrapper as P,defineCustomElement as d}; |
@@ -1,1 +0,1 @@ | ||
import{G as GlobalLoggerSettings}from"./ApiClient-640dc1cb.js";export{A as ApiEmpty,c as ApiError,a as ApiLoading,b as ApiResult,H as HttpCodes,d as HttpError,N as NewPdfDocument,e as NewPdfDocumentInfo,m as PageMode,P as PageRotate,U as UserMode,l as devicePointToPage,p as pageBottom,f as pageHeight,g as pageLeft,h as pageRight,i as pageTop,j as pageWidth,r as rotate,t as translateX,k as translateY}from"./ApiClient-640dc1cb.js";export{b as createCheckBoxFieldState,c as createPdfFieldState,a as createTextFieldState,f as fieldIsChecked}from"./IPdfField-1a3e882c.js";import"./index-bc1ec980.js";const createPdfWidgetState=(s,o)=>"text"==o?createTextWidgetState(s):createCheckBoxWidgetState(s),createCheckBoxWidgetState=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),createTextWidgetState=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),UnoPdf={settings:{logger:GlobalLoggerSettings}};export{UnoPdf,createCheckBoxWidgetState,createPdfWidgetState,createTextWidgetState}; | ||
import{G as GlobalLoggerSettings}from"./ApiClient-c838e5e9.js";export{A as ApiEmpty,c as ApiError,a as ApiLoading,b as ApiResult,H as HttpCodes,d as HttpError,N as NewPdfDocument,e as NewPdfDocumentInfo,m as PageMode,P as PageRotate,U as UserMode,l as devicePointToPage,p as pageBottom,f as pageHeight,g as pageLeft,h as pageRight,i as pageTop,j as pageWidth,r as rotate,t as translateX,k as translateY}from"./ApiClient-c838e5e9.js";export{b as createCheckBoxFieldState,c as createPdfFieldState,a as createTextFieldState,f as fieldIsChecked}from"./IPdfField-1a3e882c.js";import"./index-ad2fce19.js";const createPdfWidgetState=(s,o)=>"text"==o?createTextWidgetState(s):createCheckBoxWidgetState(s),createCheckBoxWidgetState=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),createTextWidgetState=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),UnoPdf={settings:{logger:GlobalLoggerSettings}};export{UnoPdf,createCheckBoxWidgetState,createPdfWidgetState,createTextWidgetState}; |
@@ -1,1 +0,1 @@ | ||
import{b as bootstrapLazy}from"./index-bc1ec980.js";export{s as setNonce}from"./index-bc1ec980.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";const defineCustomElements=async(e,d)=>{if("undefined"!=typeof window)return await globalScripts(),bootstrapLazy([["pdf-store-wrapper",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],d)};export{defineCustomElements}; | ||
import{b as bootstrapLazy}from"./index-ad2fce19.js";export{s as setNonce}from"./index-ad2fce19.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";const defineCustomElements=async(e,d)=>{if("undefined"!=typeof window)return await globalScripts(),bootstrapLazy([["pdf-store-wrapper",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],d)};export{defineCustomElements}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,c as createEvent,E as Env,h,H as Host}from"./index-bc1ec980.js";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient-640dc1cb.js";import{F as FileService}from"./FileService-48165f97.js";import{a as addFontFace}from"./insertFonts-93b7c521.js";const LIB_VERSION="1.2.12";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){registerInstance(this,e),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:"1.2.12",apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt("1.2.12",this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version 1.2.12 is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ","1.2.12",". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0;export{PdfApplication as pdf_application}; | ||
import{r as registerInstance,c as createEvent,E as Env,h,H as Host}from"./index-ad2fce19.js";import{S as SessionService,n as createLogger,a as ApiLoading,s as state}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";import{a as addFontFace}from"./insertFonts-93b7c521.js";const LIB_VERSION="1.2.13-b0edaebc";var re$4={exports:{}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$1=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16,MAX_SAFE_BUILD_LENGTH=250,RELEASE_TYPES=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var constants$1={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,RELEASE_TYPES:RELEASE_TYPES,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const debug$3="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$3;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:i}=constants$1,a=debug_1,o=(t=e.exports={}).re=[],n=t.safeRe=[],l=t.src=[],h=t.t={};let p=0;const c="[a-zA-Z0-9-]",u=[["\\s",1],["\\d",i],[c,s]],m=(e,t,r)=>{const s=(e=>{for(const[t,r]of u)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),i=p++;a(e,i,t),h[e]=i,l[i]=t,o[i]=new RegExp(t,r?"g":void 0),n[i]=new RegExp(s,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${c}*`),m("MAINVERSION",`(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})\\.(${l[h.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})\\.(${l[h.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${l[h.NUMERICIDENTIFIER]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${l[h.NUMERICIDENTIFIERLOOSE]}|${l[h.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${l[h.PRERELEASEIDENTIFIER]}(?:\\.${l[h.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${l[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[h.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${c}+`),m("BUILD",`(?:\\+(${l[h.BUILDIDENTIFIER]}(?:\\.${l[h.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${l[h.MAINVERSION]}${l[h.PRERELEASE]}?${l[h.BUILD]}?`),m("FULL",`^${l[h.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${l[h.MAINVERSIONLOOSE]}${l[h.PRERELEASELOOSE]}?${l[h.BUILD]}?`),m("LOOSE",`^${l[h.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${l[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${l[h.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:\\.(${l[h.XRANGEIDENTIFIER]})(?:${l[h.PRERELEASE]})?${l[h.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[h.XRANGEIDENTIFIERLOOSE]})(?:${l[h.PRERELEASELOOSE]})?${l[h.BUILD]}?)?)?`),m("XRANGE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${l[h.GTLT]}\\s*${l[h.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${l[h.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",l[h.COERCEPLAIN]+`(?:${l[h.PRERELEASE]})?`+`(?:${l[h.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",l[h.COERCE],!0),m("COERCERTLFULL",l[h.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${l[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${l[h.LONETILDE]}${l[h.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${l[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${l[h.LONECARET]}${l[h.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${l[h.LONECARET]}${l[h.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${l[h.GTLT]}\\s*(${l[h.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${l[h.GTLT]}\\s*(${l[h.LOOSEPLAIN]}|${l[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${l[h.XRANGEPLAIN]})\\s+-\\s+(${l[h.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${l[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[h.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$4,re$4.exports);const looseOption=Object.freeze({loose:!0}),emptyOpts=Object.freeze({}),parseOptions$3=e=>e?"object"!=typeof e?looseOption:e:emptyOpts;var parseOptions_1=parseOptions$3;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const r=numeric.test(e),s=numeric.test(t);return r&&s&&(e=+e,t=+t),e===t?0:r&&!s?-1:s&&!r?1:e<t?-1:1},rcompareIdentifiers=(e,t)=>compareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug$2=debug_1,{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{safeRe:re$3,t:t$3}=re$4.exports,parseOptions$2=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;class SemVer$f{constructor(e,t){if(t=parseOptions$2(t),e instanceof SemVer$f){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>MAX_LENGTH)throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);debug$2("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?re$3[t$3.LOOSE]:re$3[t$3.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<MAX_SAFE_INTEGER)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(debug$2("SemVer.compare",this.version,this.options,e),!(e instanceof SemVer$f)){if("string"==typeof e&&e===this.version)return 0;e=new SemVer$f(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)}comparePre(e){if(e instanceof SemVer$f||(e=new SemVer$f(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],s=e.prerelease[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}compareBuild(e){e instanceof SemVer$f||(e=new SemVer$f(e,this.options));let t=0;do{const r=this.build[t],s=e.build[t];if(debug$2("prerelease compare",t,r,s),void 0===r&&void 0===s)return 0;if(void 0===s)return 1;if(void 0===r)return-1;if(r!==s)return compareIdentifiers(r,s)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let s=[t,e];!1===r&&(s=[t]),0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}var semver$1=SemVer$f;const SemVer$e=semver$1,parse$6=(e,t,r=!1)=>{if(e instanceof SemVer$e)return e;try{return new SemVer$e(e,t)}catch(e){if(!r)return null;throw e}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const r=parse$5(e,t);return r?r.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const r=parse$4(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var clean_1=clean$1;const SemVer$d=semver$1,inc$1=(e,t,r,s,i)=>{"string"==typeof r&&(i=s,s=r,r=void 0);try{return new SemVer$d(e instanceof SemVer$d?e.version:e,r).inc(t,s,i).version}catch(e){return null}};var inc_1=inc$1;const parse$3=parse_1,diff$1=(e,t)=>{const r=parse$3(e,null,!0),s=parse$3(t,null,!0),i=r.compare(s);if(0===i)return null;const a=i>0,o=a?r:s,n=a?s:r,l=!!o.prerelease.length;if(!!n.prerelease.length&&!l)return n.patch||n.minor?o.patch?"patch":o.minor?"minor":"major":"major";const h=l?"pre":"";return r.major!==s.major?h+"major":r.minor!==s.minor?h+"minor":r.patch!==s.patch?h+"patch":"prerelease"};var diff_1=diff$1;const SemVer$c=semver$1,major$1=(e,t)=>new SemVer$c(e,t).major;var major_1=major$1;const SemVer$b=semver$1,minor$1=(e,t)=>new SemVer$b(e,t).minor;var minor_1=minor$1;const SemVer$a=semver$1,patch$1=(e,t)=>new SemVer$a(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const r=parse$2(e,t);return r&&r.prerelease.length?r.prerelease:null};var prerelease_1=prerelease$1;const SemVer$9=semver$1,compare$b=(e,t,r)=>new SemVer$9(e,r).compare(new SemVer$9(t,r));var compare_1=compare$b;const compare$a=compare_1,rcompare$1=(e,t,r)=>compare$a(t,e,r);var rcompare_1=rcompare$1;const compare$9=compare_1,compareLoose$1=(e,t)=>compare$9(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$8=semver$1,compareBuild$3=(e,t,r)=>{const s=new SemVer$8(e,r),i=new SemVer$8(t,r);return s.compare(i)||s.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,r)=>compareBuild$2(e,r,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,r)=>compareBuild$1(r,e,t)));var rsort_1=rsort$1;const compare$8=compare_1,gt$4=(e,t,r)=>compare$8(e,t,r)>0;var gt_1=gt$4;const compare$7=compare_1,lt$3=(e,t,r)=>compare$7(e,t,r)<0;var lt_1=lt$3;const compare$6=compare_1,eq$2=(e,t,r)=>0===compare$6(e,t,r);var eq_1=eq$2;const compare$5=compare_1,neq$2=(e,t,r)=>0!==compare$5(e,t,r);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,r)=>compare$4(e,t,r)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,r)=>compare$3(e,t,r)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$2=(e,t,r,s)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return eq$1(e,r,s);case"!=":return neq$1(e,r,s);case">":return gt$3(e,r,s);case">=":return gte$2(e,r,s);case"<":return lt$2(e,r,s);case"<=":return lte$2(e,r,s);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$2;const SemVer$7=semver$1,parse$1=parse_1,{safeRe:re$2,t:t$2}=re$4.exports,coerce$1=(e,t)=>{if(e instanceof SemVer$7)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const s=t.includePrerelease?re$2[t$2.COERCERTLFULL]:re$2[t$2.COERCERTL];let i;for(;(i=s.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),s.lastIndex=i.index+i[1].length+i[2].length;s.lastIndex=-1}else r=e.match(t.includePrerelease?re$2[t$2.COERCEFULL]:re$2[t$2.COERCE]);if(null===r)return null;const s=r[2],i=r[3]||"0",a=r[4]||"0",o=t.includePrerelease&&r[5]?`-${r[5]}`:"",n=t.includePrerelease&&r[6]?`+${r[6]}`:"";return parse$1(`${s}.${i}.${a}${o}${n}`,t)};var coerce_1=coerce$1,yallist=Yallist$1;function Yallist$1(e){var t=this;if(t instanceof Yallist$1||(t=new Yallist$1),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)t.push(arguments[r]);return t}function insert(e,t,r){var s=t===e.head?new Node(r,null,t,e):new Node(r,t,t.next,e);return null===s.next&&(e.tail=s),null===s.prev&&(e.head=s),e.length++,s}function push(e,t){e.tail=new Node(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function unshift(e,t){e.head=new Node(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Node(e,t,r,s){if(!(this instanceof Node))return new Node(e,t,r,s);this.list=s,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}Yallist$1.Node=Node,Yallist$1.create=Yallist$1,Yallist$1.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},Yallist$1.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},Yallist$1.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},Yallist$1.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)push(this,arguments[e]);return this.length},Yallist$1.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)unshift(this,arguments[e]);return this.length},Yallist$1.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},Yallist$1.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},Yallist$1.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,s=0;null!==r;s++)e.call(t,r.value,s,this),r=r.next},Yallist$1.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,s=this.length-1;null!==r;s--)e.call(t,r.value,s,this),r=r.prev},Yallist$1.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},Yallist$1.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},Yallist$1.prototype.map=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.head;null!==s;)r.push(e.call(t,s.value,this)),s=s.next;return r},Yallist$1.prototype.mapReverse=function(e,t){t=t||this;for(var r=new Yallist$1,s=this.tail;null!==s;)r.push(e.call(t,s.value,this)),s=s.prev;return r},Yallist$1.prototype.reduce=function(e,t){var r,s=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");s=this.head.next,r=this.head.value}for(var i=0;null!==s;i++)r=e(r,s.value,i),s=s.next;return r},Yallist$1.prototype.reduceReverse=function(e,t){var r,s=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");s=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==s;i--)r=e(r,s.value,i),s=s.prev;return r},Yallist$1.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},Yallist$1.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},Yallist$1.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;for(;null!==i&&s<t;s++,i=i.next)r.push(i.value);return r},Yallist$1.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new Yallist$1;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,i=this.tail;null!==i&&s>t;s--)i=i.prev;for(;null!==i&&s>e;s--,i=i.prev)r.push(i.value);return r},Yallist$1.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var s=0,i=this.head;null!==i&&s<e;s++)i=i.next;var a=[];for(s=0;i&&s<t;s++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(s=0;s<r.length;s++)i=insert(this,i,r[s]);return a},Yallist$1.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=t,this.tail=e,this};try{require("./iterator.js")(Yallist$1)}catch(e){}const Yallist=yallist,MAX=Symbol("max"),LENGTH=Symbol("length"),LENGTH_CALCULATOR=Symbol("lengthCalculator"),ALLOW_STALE=Symbol("allowStale"),MAX_AGE=Symbol("maxAge"),DISPOSE=Symbol("dispose"),NO_DISPOSE_ON_SET=Symbol("noDisposeOnSet"),LRU_LIST=Symbol("lruList"),CACHE=Symbol("cache"),UPDATE_AGE_ON_GET=Symbol("updateAgeOnGet"),naiveLength=()=>1;class LRUCache{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[MAX]=e.max||1/0;const t=e.length||naiveLength;if(this[LENGTH_CALCULATOR]="function"!=typeof t?naiveLength:t,this[ALLOW_STALE]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[MAX_AGE]=e.maxAge||0,this[DISPOSE]=e.dispose,this[NO_DISPOSE_ON_SET]=e.noDisposeOnSet||!1,this[UPDATE_AGE_ON_GET]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[MAX]=e||1/0,trim(this)}get max(){return this[MAX]}set allowStale(e){this[ALLOW_STALE]=!!e}get allowStale(){return this[ALLOW_STALE]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[MAX_AGE]=e,trim(this)}get maxAge(){return this[MAX_AGE]}set lengthCalculator(e){"function"!=typeof e&&(e=naiveLength),e!==this[LENGTH_CALCULATOR]&&(this[LENGTH_CALCULATOR]=e,this[LENGTH]=0,this[LRU_LIST].forEach((e=>{e.length=this[LENGTH_CALCULATOR](e.value,e.key),this[LENGTH]+=e.length}))),trim(this)}get lengthCalculator(){return this[LENGTH_CALCULATOR]}get length(){return this[LENGTH]}get itemCount(){return this[LRU_LIST].length}rforEach(e,t){t=t||this;for(let r=this[LRU_LIST].tail;null!==r;){const s=r.prev;forEachStep(this,e,r,t),r=s}}forEach(e,t){t=t||this;for(let r=this[LRU_LIST].head;null!==r;){const s=r.next;forEachStep(this,e,r,t),r=s}}keys(){return this[LRU_LIST].toArray().map((e=>e.key))}values(){return this[LRU_LIST].toArray().map((e=>e.value))}reset(){this[DISPOSE]&&this[LRU_LIST]&&this[LRU_LIST].length&&this[LRU_LIST].forEach((e=>this[DISPOSE](e.key,e.value))),this[CACHE]=new Map,this[LRU_LIST]=new Yallist,this[LENGTH]=0}dump(){return this[LRU_LIST].map((e=>!isStale(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[LRU_LIST]}set(e,t,r){if((r=r||this[MAX_AGE])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const s=r?Date.now():0,i=this[LENGTH_CALCULATOR](t,e);if(this[CACHE].has(e)){if(i>this[MAX])return del(this,this[CACHE].get(e)),!1;const a=this[CACHE].get(e).value;return this[DISPOSE]&&(this[NO_DISPOSE_ON_SET]||this[DISPOSE](e,a.value)),a.now=s,a.maxAge=r,a.value=t,this[LENGTH]+=i-a.length,a.length=i,this.get(e),trim(this),!0}const a=new Entry(e,t,i,s,r);return a.length>this[MAX]?(this[DISPOSE]&&this[DISPOSE](e,t),!1):(this[LENGTH]+=a.length,this[LRU_LIST].unshift(a),this[CACHE].set(e,this[LRU_LIST].head),trim(this),!0)}has(e){if(!this[CACHE].has(e))return!1;const t=this[CACHE].get(e).value;return!isStale(this,t)}get(e){return get(this,e,!0)}peek(e){return get(this,e,!1)}pop(){const e=this[LRU_LIST].tail;return e?(del(this,e),e.value):null}del(e){del(this,this[CACHE].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const s=e[r],i=s.e||0;if(0===i)this.set(s.k,s.v);else{const e=i-t;e>0&&this.set(s.k,s.v,e)}}}prune(){this[CACHE].forEach(((e,t)=>get(this,t,!1)))}}const get=(e,t,r)=>{const s=e[CACHE].get(t);if(s){const t=s.value;if(isStale(e,t)){if(del(e,s),!e[ALLOW_STALE])return}else r&&(e[UPDATE_AGE_ON_GET]&&(s.value.now=Date.now()),e[LRU_LIST].unshiftNode(s));return t.value}},isStale=(e,t)=>{if(!t||!t.maxAge&&!e[MAX_AGE])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[MAX_AGE]&&r>e[MAX_AGE]},trim=e=>{if(e[LENGTH]>e[MAX])for(let t=e[LRU_LIST].tail;e[LENGTH]>e[MAX]&&null!==t;){const r=t.prev;del(e,t),t=r}},del=(e,t)=>{if(t){const r=t.value;e[DISPOSE]&&e[DISPOSE](r.key,r.value),e[LENGTH]-=r.length,e[CACHE].delete(r.key),e[LRU_LIST].removeNode(t)}};class Entry{constructor(e,t,r,s,i){this.key=e,this.value=t,this.length=r,this.now=s,this.maxAge=i||0}}const forEachStep=(e,t,r,s)=>{let i=r.value;isStale(e,i)&&(del(e,r),e[ALLOW_STALE]||(i=void 0)),i&&t.call(s,i.value,i.key,e)};var lruCache=LRUCache;class Range$b{constructor(e,t){if(t=parseOptions$1(t),e instanceof Range$b)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range$b(e.raw,t);if(e instanceof Comparator$4)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!isNullSet(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&isAny(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&FLAG_INCLUDE_PRERELEASE)|(this.options.loose&&FLAG_LOOSE))+":"+e,r=cache.get(t);if(r)return r;const s=this.options.loose,i=s?re$1[t$1.HYPHENRANGELOOSE]:re$1[t$1.HYPHENRANGE];e=e.replace(i,hyphenReplace(this.options.includePrerelease)),debug$1("hyphen replace",e),e=e.replace(re$1[t$1.COMPARATORTRIM],comparatorTrimReplace),debug$1("comparator trim",e),e=e.replace(re$1[t$1.TILDETRIM],tildeTrimReplace),debug$1("tilde trim",e),e=e.replace(re$1[t$1.CARETTRIM],caretTrimReplace),debug$1("caret trim",e);let a=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));s&&(a=a.filter((e=>(debug$1("loose invalid filter",e,this.options),!!e.match(re$1[t$1.COMPARATORLOOSE]))))),debug$1("range list",a);const o=new Map,n=a.map((e=>new Comparator$4(e,this.options)));for(const e of n){if(isNullSet(e))return[e];o.set(e.value,e)}o.size>1&&o.has("")&&o.delete("");const l=[...o.values()];return cache.set(t,l),l}intersects(e,t){if(!(e instanceof Range$b))throw new TypeError("a Range is required");return this.set.some((r=>isSatisfiable(r,t)&&e.set.some((e=>isSatisfiable(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new SemVer$6(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1}}var range=Range$b;const LRU=lruCache,cache=new LRU({max:1e3}),parseOptions$1=parseOptions_1,Comparator$4=comparator,debug$1=debug_1,SemVer$6=semver$1,{safeRe:re$1,t:t$1,comparatorTrimReplace:comparatorTrimReplace,tildeTrimReplace:tildeTrimReplace,caretTrimReplace:caretTrimReplace}=re$4.exports,{FLAG_INCLUDE_PRERELEASE:FLAG_INCLUDE_PRERELEASE,FLAG_LOOSE:FLAG_LOOSE}=constants$1,isNullSet=e=>"<0.0.0-0"===e.value,isAny=e=>""===e.value,isSatisfiable=(e,t)=>{let r=!0;const s=e.slice();let i=s.pop();for(;r&&s.length;)r=s.every((e=>i.intersects(e,t))),i=s.pop();return r},parseComparator=(e,t)=>(debug$1("comp",e,t),e=replaceCarets(e,t),debug$1("caret",e),e=replaceTildes(e,t),debug$1("tildes",e),e=replaceXRanges(e,t),debug$1("xrange",e),e=replaceStars(e,t),debug$1("stars",e),e),isX=e=>!e||"x"===e.toLowerCase()||"*"===e,replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" "),replaceTilde=(e,t)=>{const r=t.loose?re$1[t$1.TILDELOOSE]:re$1[t$1.TILDE];return e.replace(r,((t,r,s,i,a)=>{let o;return debug$1("tilde",e,t,r,s,i,a),isX(r)?o="":isX(s)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:isX(i)?o=`>=${r}.${s}.0 <${r}.${+s+1}.0-0`:a?(debug$1("replaceTilde pr",a),o=`>=${r}.${s}.${i}-${a} <${r}.${+s+1}.0-0`):o=`>=${r}.${s}.${i} <${r}.${+s+1}.0-0`,debug$1("tilde return",o),o}))},replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" "),replaceCaret=(e,t)=>{debug$1("caret",e,t);const r=t.loose?re$1[t$1.CARETLOOSE]:re$1[t$1.CARET],s=t.includePrerelease?"-0":"";return e.replace(r,((t,r,i,a,o)=>{let n;return debug$1("caret",e,t,r,i,a,o),isX(r)?n="":isX(i)?n=`>=${r}.0.0${s} <${+r+1}.0.0-0`:isX(a)?n="0"===r?`>=${r}.${i}.0${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${s} <${+r+1}.0.0-0`:o?(debug$1("replaceCaret pr",o),n="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(debug$1("no pr"),n="0"===r?"0"===i?`>=${r}.${i}.${a}${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),debug$1("caret return",n),n}))},replaceXRanges=(e,t)=>(debug$1("replaceXRanges",e,t),e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")),replaceXRange=(e,t)=>{e=e.trim();const r=t.loose?re$1[t$1.XRANGELOOSE]:re$1[t$1.XRANGE];return e.replace(r,((r,s,i,a,o,n)=>{debug$1("xRange",e,r,s,i,a,o,n);const l=isX(i),h=l||isX(a),p=h||isX(o),c=p;return"="===s&&c&&(s=""),n=t.includePrerelease?"-0":"",l?r=">"===s||"<"===s?"<0.0.0-0":"*":s&&c?(h&&(a=0),o=0,">"===s?(s=">=",h?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===s&&(s="<",h?i=+i+1:a=+a+1),"<"===s&&(n="-0"),r=`${s+i}.${a}.${o}${n}`):h?r=`>=${i}.0.0${n} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${n} <${i}.${+a+1}.0-0`),debug$1("xRange return",r),r}))},replaceStars=(e,t)=>(debug$1("replaceStars",e,t),e.trim().replace(re$1[t$1.STAR],"")),replaceGTE0=(e,t)=>(debug$1("replaceGTE0",e,t),e.trim().replace(re$1[t.includePrerelease?t$1.GTE0PRE:t$1.GTE0],"")),hyphenReplace=e=>(t,r,s,i,a,o,n,l,h,p,c,u,m)=>`${r=isX(s)?"":isX(i)?`>=${s}.0.0${e?"-0":""}`:isX(a)?`>=${s}.${i}.0${e?"-0":""}`:o?`>=${r}`:`>=${r}${e?"-0":""}`} ${l=isX(h)?"":isX(p)?`<${+h+1}.0.0-0`:isX(c)?`<${h}.${+p+1}.0-0`:u?`<=${h}.${p}.${c}-${u}`:e?`<${h}.${p}.${+c+1}-0`:`<=${l}`}`.trim(),testSet=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(debug$1(e[r].semver),e[r].semver!==Comparator$4.ANY&&e[r].semver.prerelease.length>0){const s=e[r].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0},ANY$2=Symbol("SemVer ANY");class Comparator$3{static get ANY(){return ANY$2}constructor(e,t){if(t=parseOptions(t),e instanceof Comparator$3){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),debug("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ANY$2?this.value="":this.value=this.operator+this.semver.version,debug("comp",this)}parse(e){const r=this.options.loose?re[t.COMPARATORLOOSE]:re[t.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==s[1]?s[1]:"","="===this.operator&&(this.operator=""),s[2]?this.semver=new SemVer$5(s[2],this.options.loose):this.semver=ANY$2}toString(){return this.value}test(e){if(debug("Comparator.test",e,this.options.loose),this.semver===ANY$2||e===ANY$2)return!0;if("string"==typeof e)try{e=new SemVer$5(e,this.options)}catch(e){return!1}return cmp$1(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator$3))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new Range$a(e.value,t).test(this.value):""===e.operator?""===e.value||new Range$a(this.value,t).test(e.semver):(!(t=parseOptions(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(cmp$1(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(cmp$1(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}var comparator=Comparator$3;const parseOptions=parseOptions_1,{safeRe:re,t:t}=re$4.exports,cmp$1=cmp_1,debug=debug_1,SemVer$5=semver$1,Range$a=range,Range$9=range,satisfies$4=(e,t,r)=>{try{t=new Range$9(t,r)}catch(e){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=range,toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=range,maxSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$7(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&-1!==i.compare(e)||(s=e,i=new SemVer$4(s,r)))})),s};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=range,minSatisfying$1=(e,t,r)=>{let s=null,i=null,a=null;try{a=new Range$6(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(s&&1!==i.compare(e)||(s=e,i=new SemVer$3(s,r)))})),s};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=range,gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let r=new SemVer$2("0.0.0");if(e.test(r))return r;if(r=new SemVer$2("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const s=e.set[t];let i=null;s.forEach((e=>{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||r&&!gt$2(r,i)||(r=i)}return r&&e.test(r)?r:null};var minVersion_1=minVersion$1;const Range$4=range,validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(e){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=comparator,{ANY:ANY$1}=Comparator$2,Range$3=range,satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,r,s)=>{let i,a,o,n,l;switch(e=new SemVer$1(e,s),t=new Range$3(t,s),r){case">":i=gt$1,a=lte$1,o=lt$1,n=">",l=">=";break;case"<":i=lt$1,a=gte$1,o=gt$1,n="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,s))return!1;for(let r=0;r<t.set.length;++r){const h=t.set[r];let p=null,c=null;if(h.forEach((e=>{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),p=p||e,c=c||e,i(e.semver,p.semver,s)?p=e:o(e.semver,c.semver,s)&&(c=e)})),p.operator===n||p.operator===l)return!1;if((!c.operator||c.operator===n)&&a(e,c.semver))return!1;if(c.operator===l&&o(e,c.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,r)=>outside$2(e,t,">",r);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,r)=>outside$1(e,t,"<",r);var ltr_1=ltr$1;const Range$2=range,intersects$1=(e,t,r)=>(e=new Range$2(e,r),t=new Range$2(t,r),e.intersects(t,r));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,r)=>{const s=[];let i=null,a=null;const o=e.sort(((e,t)=>compare$2(e,t,r)));for(const e of o){satisfies$2(e,t,r)?(a=e,i||(i=e)):(a&&s.push([i,a]),a=null,i=null)}i&&s.push([i,null]);const n=[];for(const[e,t]of s)e===t?n.push(e):t||e!==o[0]?t?e===o[0]?n.push(`<=${t}`):n.push(`${e} - ${t}`):n.push(`>=${e}`):n.push("*");const l=n.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return l.length<h.length?l:t};const Range$1=range,Comparator$1=comparator,{ANY:ANY}=Comparator$1,satisfies$1=satisfies_1,compare$1=compare_1,subset$1=(e,t,r={})=>{if(e===t)return!0;e=new Range$1(e,r),t=new Range$1(t,r);let s=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,r);if(s=s||null!==t,t)continue e}if(s)return!1}return!0},minimumVersionWithPreRelease=[new Comparator$1(">=0.0.0-0")],minimumVersion=[new Comparator$1(">=0.0.0")],simpleSubset=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=r.includePrerelease?minimumVersionWithPreRelease:minimumVersion}if(1===t.length&&t[0].semver===ANY){if(r.includePrerelease)return!0;t=minimumVersion}const s=new Set;let i,a,o,n,l,h,p;for(const t of e)">"===t.operator||">="===t.operator?i=higherGT(i,t,r):"<"===t.operator||"<="===t.operator?a=lowerLT(a,t,r):s.add(t.semver);if(s.size>1)return null;if(i&&a){if(o=compare$1(i.semver,a.semver,r),o>0)return null;if(0===o&&(">="!==i.operator||"<="!==a.operator))return null}for(const e of s){if(i&&!satisfies$1(e,String(i),r))return null;if(a&&!satisfies$1(e,String(a),r))return null;for(const s of t)if(!satisfies$1(e,String(s),r))return!1;return!0}let c=!(!a||r.includePrerelease||!a.semver.prerelease.length)&&a.semver,u=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;c&&1===c.prerelease.length&&"<"===a.operator&&0===c.prerelease[0]&&(c=!1);for(const e of t){if(p=p||">"===e.operator||">="===e.operator,h=h||"<"===e.operator||"<="===e.operator,i)if(u&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===u.major&&e.semver.minor===u.minor&&e.semver.patch===u.patch&&(u=!1),">"===e.operator||">="===e.operator){if(n=higherGT(i,e,r),n===e&&n!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(e),r))return!1;if(a)if(c&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===c.major&&e.semver.minor===c.minor&&e.semver.patch===c.patch&&(c=!1),"<"===e.operator||"<="===e.operator){if(l=lowerLT(a,e,r),l===e&&l!==a)return!1}else if("<="===a.operator&&!satisfies$1(a.semver,String(e),r))return!1;if(!e.operator&&(a||i)&&0!==o)return!1}return!(i&&h&&!a&&0!==o)&&(!(a&&p&&!i&&0!==o)&&(!u&&!c))},higherGT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s>0?e:s<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,r)=>{if(!e)return t;const s=compare$1(e.semver,t.semver,r);return s<0?e:s>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=re$4.exports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=comparator,Range=range,satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,RELEASE_TYPES:constants.RELEASE_TYPES,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},preload=semver;const pdfApplicationCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.m-4{margin:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfApplicationStyle0=pdfApplicationCss,PdfApplication=class{constructor(e){registerInstance(this,e),this.apiError=createEvent(this,"apiError",7),this.sessionService=new SessionService,this.fileService=new FileService,this.logger=createLogger("PdfApplication"),this.apiErrorHandler=e=>{this.apiError?this.apiError.emit(e):console.error("Unhandled API error",e)},this.authenticated=new ApiLoading,this.versionInfo=new ApiLoading,this.publickey=void 0,this.privatekey=void 0,this.apiBaseUrl=void 0,this.sessionsurl=void 0}async getAbout(){var e,t,r;this.logger.debug("Get diagnostics");const s=null!==(e=this.versionInfo)&&void 0!==e?e:await this.sessionService.getVersion();return{npmVersion:LIB_VERSION,apiBaseUrl:state.apiBaseUrl,publicKey:state.publicKey,apiVersion:s.error?`error: ${s.error.code} - ${s.error.message}`:null!==(r=null===(t=s.value)||void 0===t?void 0:t.apiVersion)&&void 0!==r?r:"error: could not read api version"}}async getDocuments(){this.logger.debug("Get documents");return(await this.fileService.getDocuments()).value||[]}async deleteDocument(e){this.logger.debug("Delete single document"),await this.fileService.deleteDocuments([e])}async deleteDocuments(e){this.logger.debug("Delete multiple document"),await this.fileService.deleteDocuments(e)}async createDocument(e,t,r){return this.logger.debug("Create new document"),await this.fileService.createDocument(e,t,null!=r?r:null)}async componentWillLoad(){this.logger.debug("Starting..."),this.configure(),await this.versionCheck(),await this.login(),this.authenticated.value&&await this.loadStandardFonts()}componentDidLoad(){this.logger.debug("Started")}disconnectedCallback(){this.sessionService.onUnmounted()}configure(){state.apiBaseUrl=this.apiBaseUrl||Env.API_BASE_URL,this.logger.debug(`apiBaseURL: ${state.apiBaseUrl}`),state.publicKey=this.publickey||Env.API_PUBLIC_KEY,state.privateKey=this.privatekey||Env.API_PRIVATE_KEY,this.sessionsurl&&(state.sessionsUrl=this.sessionsurl),state.apiErrorHandler=this.apiErrorHandler,this.sessionService.onMounted((e=>this.authenticated=e.map((e=>e>0))))}async versionCheck(){this.versionInfo=await this.sessionService.getVersion()}async login(){this.authenticated=(await this.sessionService.login()).map((e=>e>0))}async logout(){this.authenticated=await this.sessionService.logout()}async loadStandardFonts(){var e;this.logger.debug("Setting standard fonts");null===(e=(await this.fileService.getStandardFonts()).value)||void 0===e||e.forEach((async e=>{await addFontFace(e.fontId,e.fontData,document)}))}render(){if(this.authenticated.loading||this.versionInfo.loading)return h(Host,null,h("div",{class:"m-4"},"Loading..."));if(this.versionInfo.error)return h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api unavailable:"),h("div",{class:"text-red-600"},this.versionInfo.error.code," - ",this.versionInfo.error.message)));if(this.versionInfo.value&&(preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION)||preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion))){let e=preload.lt(this.versionInfo.value.apiVersion,Env.API_MINIMUM_VERSION),t=preload.lt(LIB_VERSION,this.versionInfo.value.minimumNpmPackageVersion);return this.logger.error(e?`Api version ${this.versionInfo.value.apiVersion} is too low. Must be at least ${Env.API_MINIMUM_VERSION}.`:`Package version ${LIB_VERSION} is too low. Must be at least ${this.versionInfo.value.minimumNpmPackageVersion}.`),h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Api and npm package version mismatch:"),h("div",{class:"text-red-600"},e&&h("span",null,"The version of the Api used is not supported. Current Api version: ",this.versionInfo.value.apiVersion,". Current version of this package requires at least version ",Env.API_MINIMUM_VERSION," of the Api."),t&&h("span",null,"This version of the npm package is no longer supported by the Api. You current version: ",LIB_VERSION,". Please upgrade to ",this.versionInfo.value.minimumNpmPackageVersion," or above."))))}return this.authenticated.error?h(Host,null,h("div",{class:"m-4"},h("h2",{class:"text-xl font-bold text-red-600"},"Error logging in:"),h("div",{class:"text-red-600"},this.authenticated.error.code," - ",this.authenticated.error.message))):void 0}};PdfApplication.style=PdfApplicationStyle0;export{PdfApplication as pdf_application}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-bc1ec980.js";import{n as createLogger}from"./ApiClient-640dc1cb.js";const pdfBookmarksCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}details details,p{margin-left:1em}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfBookmarksStyle0=pdfBookmarksCss,PdfBookmarks=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfBookmarks"),this.handleClickBookmark=t=>{var e,o;if(this.logger.debug("handleClickBookmarKKK",t),!t||0==t.length)return;const i=t[0];"goto"==i.actionType&&(null===(e=i.destination)||void 0===e?void 0:e.pageIndex)&&(this.logger.debug("handleClickBookmark",i.destination.pageIndex),(null===(o=this.viewerStore)||void 0===o?void 0:o.state)&&(this.viewerStore.state.pageIndex=i.destination.pageIndex))},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){var t,e;const o=t=>h(Fragment,null,null==t?void 0:t.map(((t,e)=>i(t,e)))),i=(t,e)=>{var i;return h(Fragment,null,0==(null===(i=t.children)||void 0===i?void 0:i.length)&&h("p",null,h("a",{href:"#",onClick:()=>{this.handleClickBookmark(t.actions)}},t.title)),t.children&&t.children.length>0&&h("details",null,h("summary",{key:e,onClick:()=>this.handleClickBookmark(t.actions)},t.title),h("div",null,t.children&&o(t.children))))};let r=null!==(e=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfBookmarks.value)&&void 0!==e?e:[];return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:t=>this.documentStore=t,viewerStoreLoaded:t=>this.viewerStore=t},0==r.length&&h("p",null,"This document has no bookmarks."),r.length>0&&o(r)))}};PdfBookmarks.style=PdfBookmarksStyle0;export{PdfBookmarks as pdf_bookmarks}; | ||
import{r as registerInstance,h,F as Fragment,H as Host}from"./index-ad2fce19.js";import{n as createLogger}from"./ApiClient-c838e5e9.js";const pdfBookmarksCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}details details,p{margin-left:1em}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfBookmarksStyle0=pdfBookmarksCss,PdfBookmarks=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfBookmarks"),this.handleClickBookmark=t=>{var e,o;if(this.logger.debug("handleClickBookmarKKK",t),!t||0==t.length)return;const i=t[0];"goto"==i.actionType&&(null===(e=i.destination)||void 0===e?void 0:e.pageIndex)&&(this.logger.debug("handleClickBookmark",i.destination.pageIndex),(null===(o=this.viewerStore)||void 0===o?void 0:o.state)&&(this.viewerStore.state.pageIndex=i.destination.pageIndex))},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){var t,e;const o=t=>h(Fragment,null,null==t?void 0:t.map(((t,e)=>i(t,e)))),i=(t,e)=>{var i;return h(Fragment,null,0==(null===(i=t.children)||void 0===i?void 0:i.length)&&h("p",null,h("a",{href:"#",onClick:()=>{this.handleClickBookmark(t.actions)}},t.title)),t.children&&t.children.length>0&&h("details",null,h("summary",{key:e,onClick:()=>this.handleClickBookmark(t.actions)},t.title),h("div",null,t.children&&o(t.children))))};let r=null!==(e=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfBookmarks.value)&&void 0!==e?e:[];return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:t=>this.documentStore=t,viewerStoreLoaded:t=>this.viewerStore=t},0==r.length&&h("p",null,"This document has no bookmarks."),r.length>0&&o(r)))}};PdfBookmarks.style=PdfBookmarksStyle0;export{PdfBookmarks as pdf_bookmarks}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-bc1ec980.js";import{n as createLogger,q as onChange,b as ApiResult,N as NewPdfDocument}from"./ApiClient-640dc1cb.js";import{F as FileService}from"./FileService-48165f97.js";import{e as ensureStore}from"./documentStore-7f36f51f.js";import"./IPdfField-1a3e882c.js";const pdfDocumentCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.p-4{padding:1rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfDocumentStyle0=pdfDocumentCss,PdfDocument=class{constructor(e){registerInstance(this,e),this.loaded=createEvent(this,"loaded",7),this.unloaded=createEvent(this,"unloaded",7),this.formdatachanged=createEvent(this,"formdatachanged",7),this.logger=createLogger("PdfDocument"),this.documentStore=null,this.fileService=new FileService,this.name="default",this.pdfid=void 0}componentWillLoad(){this.logger.debug(this.name,"Starting..."),this.documentStore=ensureStore(this.name)}componentDidLoad(){this.logger.debug("Started"),onChange("accessToken",(e=>{if(e&&this.pdfid)if(this.documentStore)if("new"==this.pdfid){if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening new pdf document"),this.new()}else{if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening pdf document",this.pdfid),this.open(this.pdfid)}else this.logger.error("Cannot update access token: documentStore is null")})),this.documentStore?(this.documentStore.onChange("pdfIdLoaded",(e=>{e?this.loaded.emit(e):this.unloaded.emit()})),this.documentStore.onChange("pdfFormDataUpdated",(e=>{this.formdatachanged.emit(e||void 0)}))):this.logger.error("Cannot set store listeners: documentStore is null")}disconnectedCallback(){this.logger.debug("Stopped")}async open(e){return this.logger.debug("Opening pdf document",e),this.documentStore?(await this.documentStore.load(e),await this.getSummary()):(this.logger.error("Cannot open document: documentStore is null"),null)}async openFile(e){if(this.logger.debug("Opening pdf document from File"),e){const t=await this.fileService.upload(e);return this.logger.debug("File uploaded",t),this.open(t.id)}return this.logger.debug("No valid file selected"),null}async download(){var e,t,o;const i=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfId;if(!i)return this.logger.debug("cannot download: no document loaded"),null;const n=null===(o=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfInfo.value)||void 0===o?void 0:o.originalFileName;return n?(this.logger.debug("download",{id:i,fileName:n}),this.fileService.download(i,n)):(this.logger.debug("cannot download: originalFileName is empty"),null)}async downloadAs(e){var t,o,i;const n=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfId;if(!n)return this.logger.debug("cannot convert: no document loaded"),null;const r=`${(null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfInfo.value)||void 0===i?void 0:i.originalFileName)||n}.${e}`;return this.logger.debug("convertTo",{format:e,id:n,fileName:r}),this.fileService.download(n,r,e)}async getSummary(){var e;return this.logger.info("Get document summary"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfInfo.value)||null}async getFields(){var e;return this.logger.debug("Get fields"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||[]}async getFormData(){var e,t;if(this.logger.debug("getFormData"),!this.documentStore)return this.logger.error("Cannot get form data because documentStore is null"),{};let o={};return null===(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||void 0===t||t.forEach((e=>o[e.fullName]=e.value)),o}async setFormData(e){var t;if(this.logger.debug("setFormData",e),this.documentStore){if(e)for(const[o,i]of Object.entries(e))await(null===(t=this.documentStore)||void 0===t?void 0:t.updateField(o,i,!0))}else this.logger.error("Cannot set form data because documentStore is null")}async setOptions(e,t){if(this.documentStore)return await this.documentStore.setOptions(e,t);this.logger.error("Cannot add option: documentStore is null")}async new(){this.logger.debug("Opening new pdf document"),this.documentStore?this.documentStore.state.pdfInfo=new ApiResult(NewPdfDocument):this.logger.error("Cannot open new document: documentStore is null")}async close(){this.logger.debug("Closing pdf document"),this.documentStore?this.documentStore.unload():this.logger.error("Cannot close document: documentStore is null")}async save(e){return this.logger.debug("Save"),this.documentStore?await this.documentStore.save(null!=e?e:null):(this.logger.error("Cannot save document: documentStore is null"),null)}render(){if(!this.documentStore)return this.logger.error("Cannot render pdf-document: documentStore is null"),h(Host,null,h("div",{class:"p-4 text-red text-lg"},"Error: No document store"));const e=this.documentStore.state.pdfInfo;return e.error?h(Host,null,h("div",{class:"p-4 text-red text-lg"},e.error)):void 0}};PdfDocument.style=PdfDocumentStyle0;export{PdfDocument as pdf_document}; | ||
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-ad2fce19.js";import{n as createLogger,q as onChange,b as ApiResult,N as NewPdfDocument}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";import{e as ensureStore}from"./documentStore-c4eea1c1.js";import"./IPdfField-1a3e882c.js";const pdfDocumentCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.p-4{padding:1rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfDocumentStyle0=pdfDocumentCss,PdfDocument=class{constructor(e){registerInstance(this,e),this.loaded=createEvent(this,"loaded",7),this.unloaded=createEvent(this,"unloaded",7),this.formdatachanged=createEvent(this,"formdatachanged",7),this.logger=createLogger("PdfDocument"),this.documentStore=null,this.fileService=new FileService,this.name="default",this.pdfid=void 0}componentWillLoad(){this.logger.debug(this.name,"Starting..."),this.documentStore=ensureStore(this.name)}componentDidLoad(){this.logger.debug("Started"),onChange("accessToken",(e=>{if(e&&this.pdfid)if(this.documentStore)if("new"==this.pdfid){if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening new pdf document"),this.new()}else{if(this.documentStore.state.pdfId)return;this.logger.debug("Auto opening pdf document",this.pdfid),this.open(this.pdfid)}else this.logger.error("Cannot update access token: documentStore is null")})),this.documentStore?(this.documentStore.onChange("pdfIdLoaded",(e=>{e?this.loaded.emit(e):this.unloaded.emit()})),this.documentStore.onChange("pdfFormDataUpdated",(e=>{this.formdatachanged.emit(e||void 0)}))):this.logger.error("Cannot set store listeners: documentStore is null")}disconnectedCallback(){this.logger.debug("Stopped")}async open(e){return this.logger.debug("Opening pdf document",e),this.documentStore?(await this.documentStore.load(e),await this.getSummary()):(this.logger.error("Cannot open document: documentStore is null"),null)}async openFile(e){if(this.logger.debug("Opening pdf document from File"),e){const t=await this.fileService.upload(e);return this.logger.debug("File uploaded",t),this.open(t.id)}return this.logger.debug("No valid file selected"),null}async download(){var e,t,o;const i=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfId;if(!i)return this.logger.debug("cannot download: no document loaded"),null;const n=null===(o=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfInfo.value)||void 0===o?void 0:o.originalFileName;return n?(this.logger.debug("download",{id:i,fileName:n}),this.fileService.download(i,n)):(this.logger.debug("cannot download: originalFileName is empty"),null)}async downloadAs(e){var t,o,i;const n=null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfId;if(!n)return this.logger.debug("cannot convert: no document loaded"),null;const r=`${(null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state.pdfInfo.value)||void 0===i?void 0:i.originalFileName)||n}.${e}`;return this.logger.debug("convertTo",{format:e,id:n,fileName:r}),this.fileService.download(n,r,e)}async getSummary(){var e;return this.logger.info("Get document summary"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfInfo.value)||null}async getFields(){var e;return this.logger.debug("Get fields"),(null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||[]}async getFormData(){var e,t;if(this.logger.debug("getFormData"),!this.documentStore)return this.logger.error("Cannot get form data because documentStore is null"),{};let o={};return null===(t=null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfFields.value)||void 0===t||t.forEach((e=>o[e.fullName]=e.value)),o}async setFormData(e){var t;if(this.logger.debug("setFormData",e),this.documentStore){if(e)for(const[o,i]of Object.entries(e))await(null===(t=this.documentStore)||void 0===t?void 0:t.updateField(o,i,!0))}else this.logger.error("Cannot set form data because documentStore is null")}async setOptions(e,t){if(this.documentStore)return await this.documentStore.setOptions(e,t);this.logger.error("Cannot add option: documentStore is null")}async new(){this.logger.debug("Opening new pdf document"),this.documentStore?this.documentStore.state.pdfInfo=new ApiResult(NewPdfDocument):this.logger.error("Cannot open new document: documentStore is null")}async close(){this.logger.debug("Closing pdf document"),this.documentStore?this.documentStore.unload():this.logger.error("Cannot close document: documentStore is null")}async save(e){return this.logger.debug("Save"),this.documentStore?await this.documentStore.save(null!=e?e:null):(this.logger.error("Cannot save document: documentStore is null"),null)}render(){if(!this.documentStore)return this.logger.error("Cannot render pdf-document: documentStore is null"),h(Host,null,h("div",{class:"p-4 text-red text-lg"},"Error: No document store"));const e=this.documentStore.state.pdfInfo;return e.error?h(Host,null,h("div",{class:"p-4 text-red text-lg"},e.error)):void 0}};PdfDocument.style=PdfDocumentStyle0;export{PdfDocument as pdf_document}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host}from"./index-bc1ec980.js";import{n as createLogger}from"./ApiClient-640dc1cb.js";const pdfLayersCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-cover{background-size:cover}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfLayersStyle0=pdfLayersCss,PdfLayers=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfLayers"),this.clickLayer=t=>()=>{this.documentStore?this.documentStore.toggleLayer(t.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:t=>this.documentStore=t,viewerStoreLoaded:t=>this.viewerStore=t},this.documentStore&&(t=>{const e=t.pdfLayers.value||[];return h("div",{class:"max-h-[40rem] overflow-y-auto"},0==(null==e?void 0:e.length)&&h("p",null,"This document has no layers."),h("ul",null,e.map((t=>h("li",{key:t.name},h("span",{class:{eye:!0,open:t.visible},onClick:this.clickLayer(t)}),t.visible?"Y":"N",t.name)))))})(this.documentStore.state)))}};PdfLayers.style=PdfLayersStyle0;export{PdfLayers as pdf_layers}; | ||
import{r as registerInstance,h,H as Host}from"./index-ad2fce19.js";import{n as createLogger}from"./ApiClient-c838e5e9.js";const pdfLayersCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-cover{background-size:cover}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}:host{background-color:#fff;display:block;height:100%;overflow:scroll;width:100%}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfLayersStyle0=pdfLayersCss,PdfLayers=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfLayers"),this.clickLayer=t=>()=>{this.documentStore?this.documentStore.toggleLayer(t.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default"}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:t=>this.documentStore=t,viewerStoreLoaded:t=>this.viewerStore=t},this.documentStore&&(t=>{const e=t.pdfLayers.value||[];return h("div",{class:"max-h-[40rem] overflow-y-auto"},0==(null==e?void 0:e.length)&&h("p",null,"This document has no layers."),h("ul",null,e.map((t=>h("li",{key:t.name},h("span",{class:{eye:!0,open:t.visible},onClick:this.clickLayer(t)}),t.visible?"Y":"N",t.name)))))})(this.documentStore.state)))}};PdfLayers.style=PdfLayersStyle0;export{PdfLayers as pdf_layers}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,F as Fragment,H as Host,a as getElement}from"./index-bc1ec980.js";import{n as createLogger,A as ApiEmpty,j as pageWidth,f as pageHeight,t as translateX,k as translateY,r as rotate,P as PageRotate}from"./ApiClient-640dc1cb.js";import{F as FileService}from"./FileService-48165f97.js";const pdfPageCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}',PdfPageStyle0=pdfPageCss,fileService=new FileService,PdfPage=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfPage"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.documentStore.onChange("layerRevisions",(t=>{this.layerRevision=t[this.pageIndex]}))},this.onViewerStoreLoaded=t=>{this.viewerStore=t},this.onIntersection=async t=>{for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;this.documentId&&this.pageIndex>=0&&(this.htmlContent=await fileService.pageAsHtml(this.documentId,this.pageIndex),this.logger.debug(`html loaded: ${null!==(e=null===(t=this.htmlContent.value)||void 0===t?void 0:t.length)&&void 0!==e?e:0} bytes`))},this.unload=async()=>{this.htmlContent=new ApiEmpty},this.documentStore=null,this.viewerStore=null,this.inView=!1,this.debugShouldLoad=!1,this.layerRevision=-1,this.htmlContent=new ApiEmpty,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=void 0,this.documentId=void 0,this.pdfPage=void 0,this.rectangleSelect=void 0,this.showCustomWidget=void 0,this.setFocusWidget=void 0}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const o=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");o&&this.observer.observe(o)}removeIntersectionObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}debugIntersectionColor(){return this.debugShouldLoad||this.inView?!this.debugShouldLoad&&this.inView?"yellow":this.debugShouldLoad&&!this.inView?"orange":"white":"teal"}generateStylesForHidingLayers(){var t;return((null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfLayers.value)||[]).filter((t=>!t.visible)).reduce(((t,e)=>`${t}\n div[data-layer="${e.name}"] {\n visibility: hidden !important;\n }`),"")}render(){const t=pageWidth(this.pdfPage),e=pageHeight(this.pdfPage),o=o=>{var i,r;if(null==this.pdfPage)return void this.logger.error("Cannot render page: pageInfo is null");return h(Fragment,null,h("div",{class:"overflow-visible relative flex-auto",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},h("div",{class:"absolute flex"},h("div",{style:{transform:`matrix(${o.zoomFactor},0,0,${o.zoomFactor},0,0)`}},h("div",{class:"absolute bg-white overflow-hidden",style:{width:`${t}px`,height:`${e}px`}},h("div",{style:{"transform-origin":"0 0",transform:`translate(${translateX(this.pdfPage)}px, ${translateY(this.pdfPage)}px) rotate(${rotate(this.pdfPage)}deg)`,width:`${t}px`,height:`${e}px`}},h("div",{innerHTML:this.htmlContent.value||void 0}),h("pdf-overlay",{images:null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfImages.get(this.pageIndex),texts:null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfTexts.get(this.pageIndex),width:t,height:e,userMode:o.userMode,pageIndex:this.pageIndex,pageInfo:this.pdfPage,rectangleSelect:t=>this.rectangleSelect(t),style:(o=>{switch(o.rotate){case PageRotate.Rotate0:return{transform:`translate(${-translateX(o)}px, ${-translateY(o)}px)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate90:return{"transform-origin":"0 0",transform:`translate(${translateY(o)}px, ${-translateX(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate180:return{"transform-origin":"0 0",transform:`translate(${translateX(o)}px, ${translateY(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate270:return{"transform-origin":"0 0",transform:`translate(${-translateY(o)}px, ${translateX(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`}}})(this.pdfPage)}),h("pdf-widgets",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,pdfPage:this.pdfPage,showCustomWidget:this.showCustomWidget,setFocusWidget:this.setFocusWidget},h("div",{slot:"customWidget",style:{height:"100%"}},h("slot",{name:"customWidget"})))))))),h("style",null,this.generateStylesForHidingLayers()))},i=o=>h("div",{style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},"Error: ",this.htmlContent.error);return h(Host,{class:{loaded:null!=this.htmlContent.value}},h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},h("div",{class:"mb-16 bg-white shadow-lg relative w-fit"},this.viewerStore&&(r=>h(Fragment,null,this.htmlContent.empty&&(o=>h("div",{class:"inset-0 flex justify-center items-center text-gray-400 text-sm",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},"Page not loaded"))(r),this.htmlContent.loading&&(o=>h("div",{class:"inset-0 flex justify-center items-center",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},h("pdf-spinner",null)))(r),this.htmlContent.value&&o(r),this.htmlContent.error&&i(r),h("div",{class:"text-gray-500 absolute -bottom-[2rem] left-1/2 -translate-x-1/2 font-[Arial]"},"page ",this.pageIndex+1)))(this.viewerStore.state))))}get el(){return getElement(this)}};PdfPage.style=PdfPageStyle0;export{PdfPage as pdf_page}; | ||
import{r as registerInstance,h,F as Fragment,H as Host,a as getElement}from"./index-ad2fce19.js";import{n as createLogger,A as ApiEmpty,j as pageWidth,f as pageHeight,t as translateX,k as translateY,r as rotate,P as PageRotate}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";const pdfPageCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}',PdfPageStyle0=pdfPageCss,fileService=new FileService,PdfPage=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfPage"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.documentStore.onChange("layerRevisions",(t=>{this.layerRevision=t[this.pageIndex]}))},this.onViewerStoreLoaded=t=>{this.viewerStore=t},this.onIntersection=async t=>{for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;this.documentId&&this.pageIndex>=0&&(this.htmlContent=await fileService.pageAsHtml(this.documentId,this.pageIndex),this.logger.debug(`html loaded: ${null!==(e=null===(t=this.htmlContent.value)||void 0===t?void 0:t.length)&&void 0!==e?e:0} bytes`))},this.unload=async()=>{this.htmlContent=new ApiEmpty},this.documentStore=null,this.viewerStore=null,this.inView=!1,this.debugShouldLoad=!1,this.layerRevision=-1,this.htmlContent=new ApiEmpty,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=void 0,this.documentId=void 0,this.pdfPage=void 0,this.rectangleSelect=void 0,this.showCustomWidget=void 0,this.setFocusWidget=void 0}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const o=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");o&&this.observer.observe(o)}removeIntersectionObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}debugIntersectionColor(){return this.debugShouldLoad||this.inView?!this.debugShouldLoad&&this.inView?"yellow":this.debugShouldLoad&&!this.inView?"orange":"white":"teal"}generateStylesForHidingLayers(){var t;return((null===(t=this.documentStore)||void 0===t?void 0:t.state.pdfLayers.value)||[]).filter((t=>!t.visible)).reduce(((t,e)=>`${t}\n div[data-layer="${e.name}"] {\n visibility: hidden !important;\n }`),"")}render(){const t=pageWidth(this.pdfPage),e=pageHeight(this.pdfPage),o=o=>{var i,r;if(null==this.pdfPage)return void this.logger.error("Cannot render page: pageInfo is null");return h(Fragment,null,h("div",{class:"overflow-visible relative flex-auto",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},h("div",{class:"absolute flex"},h("div",{style:{transform:`matrix(${o.zoomFactor},0,0,${o.zoomFactor},0,0)`}},h("div",{class:"absolute bg-white overflow-hidden",style:{width:`${t}px`,height:`${e}px`}},h("div",{style:{"transform-origin":"0 0",transform:`translate(${translateX(this.pdfPage)}px, ${translateY(this.pdfPage)}px) rotate(${rotate(this.pdfPage)}deg)`,width:`${t}px`,height:`${e}px`}},h("div",{innerHTML:this.htmlContent.value||void 0}),h("pdf-overlay",{images:null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfImages.get(this.pageIndex),texts:null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfTexts.get(this.pageIndex),width:t,height:e,userMode:o.userMode,pageIndex:this.pageIndex,pageInfo:this.pdfPage,rectangleSelect:t=>this.rectangleSelect(t),style:(o=>{switch(o.rotate){case PageRotate.Rotate0:return{transform:`translate(${-translateX(o)}px, ${-translateY(o)}px)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate90:return{"transform-origin":"0 0",transform:`translate(${translateY(o)}px, ${-translateX(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate180:return{"transform-origin":"0 0",transform:`translate(${translateX(o)}px, ${translateY(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`};case PageRotate.Rotate270:return{"transform-origin":"0 0",transform:`translate(${-translateY(o)}px, ${translateX(o)}px) rotate(${-rotate(o)}deg)`,width:`${t}px`,height:`${e}px`}}})(this.pdfPage)}),h("pdf-widgets",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,pdfPage:this.pdfPage,showCustomWidget:this.showCustomWidget,setFocusWidget:this.setFocusWidget},h("div",{slot:"customWidget",style:{height:"100%"}},h("slot",{name:"customWidget"})))))))),h("style",null,this.generateStylesForHidingLayers()))},i=o=>h("div",{style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},"Error: ",this.htmlContent.error);return h(Host,{class:{loaded:null!=this.htmlContent.value}},h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,pageindex:this.pageIndex,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},h("div",{class:"mb-16 bg-white shadow-lg relative w-fit"},this.viewerStore&&(r=>h(Fragment,null,this.htmlContent.empty&&(o=>h("div",{class:"inset-0 flex justify-center items-center text-gray-400 text-sm",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},"Page not loaded"))(r),this.htmlContent.loading&&(o=>h("div",{class:"inset-0 flex justify-center items-center",style:{width:t*o.zoomFactor+"px",height:e*o.zoomFactor+"px"}},h("pdf-spinner",null)))(r),this.htmlContent.value&&o(r),this.htmlContent.error&&i(r),h("div",{class:"text-gray-500 absolute -bottom-[2rem] left-1/2 -translate-x-1/2 font-[Arial]"},"page ",this.pageIndex+1)))(this.viewerStore.state))))}get el(){return getElement(this)}};PdfPage.style=PdfPageStyle0;export{PdfPage as pdf_page}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-bc1ec980.js";import{n as createLogger,m as PageMode}from"./ApiClient-640dc1cb.js";import{i as insertFonts}from"./insertFonts-93b7c521.js";const pdfPagesCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{background-color:#f3f4f6;display:block;height:100%;overflow:scroll;width:100%}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}',PdfPagesStyle0=pdfPagesCss,PdfPages=class{constructor(e){registerInstance(this,e),this.pageindexchanged=createEvent(this,"pageindexchanged",7),this.zoomfactorchanged=createEvent(this,"zoomfactorchanged",7),this.usermodechanged=createEvent(this,"usermodechanged",7),this.focuswidgetchanged=createEvent(this,"focuswidgetchanged",7),this.rectangleselect=createEvent(this,"rectangleselect",7),this.logger=createLogger("PdfPages"),this.debug=!1,this.pageElements=[],this.onViewerStoreLoaded=e=>{this.viewerStore!=e?(this.viewerStore=e,this.logger.debug(`PdfViewerStore loaded: ${this.viewerStore.state.viewerName}`),this.viewerStore.onChange("pageIndex",(e=>{this.pageindexchanged.emit(e),this.pageMode===PageMode.Multi&&this.setScrollPositionToPage(e)})),this.viewerStore.onChange("zoomFactor",(e=>{this.zoomfactorchanged.emit(e)})),this.viewerStore.onChange("userMode",(e=>{this.usermodechanged.emit(e)})),this.viewerStore.state.debugUserMode=this.debugUserMode):this.logger.debug(`PdfViewerStore already loaded: ${this.viewerStore.state.viewerName}`)},this.registerPage=e=>t=>{t&&(this.pageElements[e]=t)},this.documentStore=null,this.viewerStore=null,this.document="default",this.name="default",this.pageMode=PageMode.Multi,this.debugUserMode=!1,this.showCustomWidget=()=>!1,this.focusWidget=null}componentDidLoad(){this.logger.debug("Loaded")}async zoom(e){this.viewerStore?(this.logger.debug("Zooming pdf document",e),this.viewerStore.state.zoomFactor=e):this.logger.error("Cannot zoom: viewerStore is null")}async gotoPage(e){this.viewerStore?(this.logger.debug("Going to page",e),this.viewerStore.state.pageIndex=e,this.setScrollPositionToPage(e)):this.logger.error("Cannot go to page: viewerStore is null")}async setPageMode(e){this.logger.debug("set page mode",e),this.pageMode=e}async getPageMode(){return this.pageMode}async getZoomFactor(){return this.viewerStore?this.viewerStore.state.zoomFactor:(this.logger.error("Cannot get zoom factor: viewerStore is null"),null)}async getPageIndex(){return this.viewerStore?this.viewerStore.state.pageIndex:(this.logger.error("Cannot get page index: viewerStore is null"),null)}async setHighlightFields(e){this.viewerStore?(this.logger.debug("Setting highlight fields",e),this.viewerStore.state.highlightFields=e):this.logger.error("Cannot set highlightFields: viewerStore is null")}async toggleLayer(e){this.documentStore?(this.logger.debug("Toggling pdf layer",e),this.documentStore.toggleLayer(e)):this.logger.error("Cannot toggle layer: documentStore is null")}async setUserMode(e){null!=this.viewerStore?this.viewerStore.state.userMode=e:this.logger.error("Cannot set user mode: viewer store is null")}async getUserMode(){if(null!=this.viewerStore)return this.viewerStore.state.userMode;this.logger.error("Cannot get user mode: viewer store is null")}async addImage(e,t,o,i,r,s){var a;null===(a=this.documentStore)||void 0===a||a.addImage(e,{bottom:t,left:o,width:i,height:r,image:s})}async addText(e,t,o,i,r,s,a){var n;null===(n=this.documentStore)||void 0===n||n.addText(e,{bottom:t,left:o,text:i,fontName:r,fontSize:s,color:a})}async getFocusWidget(){return this.focusWidget}setScrollPositionToPage(e){if(!this.pageElements[e])return;const t=this.pageElements[e].offsetTop||0;this.el.scrollTop=t-this.el.offsetTop-10}setFocusWidget(e){var t;this.focusWidget=e,null===(t=this.focuswidgetchanged)||void 0===t||t.emit(this.focusWidget)}render(){var e,t,o,i,r,s,a,n;this.logger.debug("render pdf-pages from document store",null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfRef,"viewer store",null===(t=this.viewerStore)||void 0===t?void 0:t.state.viewerName);const d=(e,t,o)=>h("pdf-page",{ref:this.registerPage(o),key:o,pdfdoc:this.document,pdfviewer:this.name,pageIndex:o,documentId:e.id,pdfPage:t,rectangleSelect:e=>{var t;return null===(t=this.rectangleselect)||void 0===t?void 0:t.emit(e)},showCustomWidget:this.showCustomWidget,setFocusWidget:e=>this.setFocusWidget(e)},h("div",{slot:"customWidget",style:{height:"100%"}},h("slot",{name:"customWidget"})));return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.name,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(null===(r=null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pdfInfo)||void 0===r?void 0:r.value)&&(null===(n=null===(a=null===(s=this.documentStore)||void 0===s?void 0:s.state)||void 0===a?void 0:a.pdfPages)||void 0===n?void 0:n.value)&&((e,t,o)=>{var i;return insertFonts(t,null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfFonts.value,document),h("div",{class:"bg-gray-100 p-4"},this.pageMode==PageMode.Multi&&((e,t)=>t.map(((t,o)=>d(e,t,o))))(t,o),this.pageMode!=PageMode.Multi&&((e,t,o)=>d(e,o[t],t))(t,e.pageIndex,o))})(this.viewerStore.state,this.documentStore.state.pdfInfo.value,this.documentStore.state.pdfPages.value)))}get el(){return getElement(this)}};PdfPages.style=PdfPagesStyle0;export{PdfPages as pdf_pages}; | ||
import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-ad2fce19.js";import{n as createLogger,m as PageMode}from"./ApiClient-c838e5e9.js";import{i as insertFonts}from"./insertFonts-93b7c521.js";const pdfPagesCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{background-color:#f3f4f6;display:block;height:100%;overflow:scroll;width:100%}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}',PdfPagesStyle0=pdfPagesCss,PdfPages=class{constructor(e){registerInstance(this,e),this.pageindexchanged=createEvent(this,"pageindexchanged",7),this.zoomfactorchanged=createEvent(this,"zoomfactorchanged",7),this.usermodechanged=createEvent(this,"usermodechanged",7),this.focuswidgetchanged=createEvent(this,"focuswidgetchanged",7),this.rectangleselect=createEvent(this,"rectangleselect",7),this.logger=createLogger("PdfPages"),this.debug=!1,this.pageElements=[],this.onViewerStoreLoaded=e=>{this.viewerStore!=e?(this.viewerStore=e,this.logger.debug(`PdfViewerStore loaded: ${this.viewerStore.state.viewerName}`),this.viewerStore.onChange("pageIndex",(e=>{this.pageindexchanged.emit(e),this.pageMode===PageMode.Multi&&this.setScrollPositionToPage(e)})),this.viewerStore.onChange("zoomFactor",(e=>{this.zoomfactorchanged.emit(e)})),this.viewerStore.onChange("userMode",(e=>{this.usermodechanged.emit(e)})),this.viewerStore.state.debugUserMode=this.debugUserMode):this.logger.debug(`PdfViewerStore already loaded: ${this.viewerStore.state.viewerName}`)},this.registerPage=e=>t=>{t&&(this.pageElements[e]=t)},this.documentStore=null,this.viewerStore=null,this.document="default",this.name="default",this.pageMode=PageMode.Multi,this.debugUserMode=!1,this.showCustomWidget=()=>!1,this.focusWidget=null}componentDidLoad(){this.logger.debug("Loaded")}async zoom(e){this.viewerStore?(this.logger.debug("Zooming pdf document",e),this.viewerStore.state.zoomFactor=e):this.logger.error("Cannot zoom: viewerStore is null")}async gotoPage(e){this.viewerStore?(this.logger.debug("Going to page",e),this.viewerStore.state.pageIndex=e,this.setScrollPositionToPage(e)):this.logger.error("Cannot go to page: viewerStore is null")}async setPageMode(e){this.logger.debug("set page mode",e),this.pageMode=e}async getPageMode(){return this.pageMode}async getZoomFactor(){return this.viewerStore?this.viewerStore.state.zoomFactor:(this.logger.error("Cannot get zoom factor: viewerStore is null"),null)}async getPageIndex(){return this.viewerStore?this.viewerStore.state.pageIndex:(this.logger.error("Cannot get page index: viewerStore is null"),null)}async setHighlightFields(e){this.viewerStore?(this.logger.debug("Setting highlight fields",e),this.viewerStore.state.highlightFields=e):this.logger.error("Cannot set highlightFields: viewerStore is null")}async toggleLayer(e){this.documentStore?(this.logger.debug("Toggling pdf layer",e),this.documentStore.toggleLayer(e)):this.logger.error("Cannot toggle layer: documentStore is null")}async setUserMode(e){null!=this.viewerStore?this.viewerStore.state.userMode=e:this.logger.error("Cannot set user mode: viewer store is null")}async getUserMode(){if(null!=this.viewerStore)return this.viewerStore.state.userMode;this.logger.error("Cannot get user mode: viewer store is null")}async addImage(e,t,o,i,r,s){var a;null===(a=this.documentStore)||void 0===a||a.addImage(e,{bottom:t,left:o,width:i,height:r,image:s})}async addText(e,t,o,i,r,s,a){var n;null===(n=this.documentStore)||void 0===n||n.addText(e,{bottom:t,left:o,text:i,fontName:r,fontSize:s,color:a})}async getFocusWidget(){return this.focusWidget}setScrollPositionToPage(e){if(!this.pageElements[e])return;const t=this.pageElements[e].offsetTop||0;this.el.scrollTop=t-this.el.offsetTop-10}setFocusWidget(e){var t;this.focusWidget=e,null===(t=this.focuswidgetchanged)||void 0===t||t.emit(this.focusWidget)}render(){var e,t,o,i,r,s,a,n;this.logger.debug("render pdf-pages from document store",null===(e=this.documentStore)||void 0===e?void 0:e.state.pdfRef,"viewer store",null===(t=this.viewerStore)||void 0===t?void 0:t.state.viewerName);const d=(e,t,o)=>h("pdf-page",{ref:this.registerPage(o),key:o,pdfdoc:this.document,pdfviewer:this.name,pageIndex:o,documentId:e.id,pdfPage:t,rectangleSelect:e=>{var t;return null===(t=this.rectangleselect)||void 0===t?void 0:t.emit(e)},showCustomWidget:this.showCustomWidget,setFocusWidget:e=>this.setFocusWidget(e)},h("div",{slot:"customWidget",style:{height:"100%"}},h("slot",{name:"customWidget"})));return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.name,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(null===(r=null===(i=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===i?void 0:i.pdfInfo)||void 0===r?void 0:r.value)&&(null===(n=null===(a=null===(s=this.documentStore)||void 0===s?void 0:s.state)||void 0===a?void 0:a.pdfPages)||void 0===n?void 0:n.value)&&((e,t,o)=>{var i;return insertFonts(t,null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfFonts.value,document),h("div",{class:"bg-gray-100 p-4"},this.pageMode==PageMode.Multi&&((e,t)=>t.map(((t,o)=>d(e,t,o))))(t,o),this.pageMode!=PageMode.Multi&&((e,t,o)=>d(e,o[t],t))(t,e.pageIndex,o))})(this.viewerStore.state,this.documentStore.state.pdfInfo.value,this.documentStore.state.pdfPages.value)))}get el(){return getElement(this)}};PdfPages.style=PdfPagesStyle0;export{PdfPages as pdf_pages}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host,F as Fragment}from"./index-bc1ec980.js";import{n as createLogger}from"./ApiClient-640dc1cb.js";import{f as fieldIsChecked}from"./IPdfField-1a3e882c.js";const pdfSidebarCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.relative{position:relative}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-4{padding:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:1rem;position:relative}h1,h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}dl dt{font-weight:700}dl dd{margin-bottom:.5rem}h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-size:1.125rem;font-weight:700;line-height:1.75rem;margin-top:1rem}li a{cursor:pointer;display:block;padding-bottom:.25rem;padding-top:.25rem;text-decoration-line:underline}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.max-h-\\[40rem\\]{max-height:40rem}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}',PdfSidebarStyle0=pdfSidebarCss,PdfSidebar=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfSidebar"),this.updateCheckboxField=e=>()=>{if(!this.documentStore)return void this.logger.error("Cannot update checkbox field: documentStore is null");const t=fieldIsChecked(e)?e.checkBoxOffValue:e.checkBoxOnValue;this.documentStore.updateField(e.fullName,t)},this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default"}toggleCheckbox(e,t){this.logger.debug("toggleCheckbox, field=",e.fullName,"new value=",t),this.documentStore?this.documentStore.updateField(e.fullName,t):this.logger.error("Cannot toggle checkbox: documentStore is null")}render(){const e=e=>h(Fragment,null,h("tr",null,h("td",{class:"border px-4 py-2"},"On value"),h("td",{class:"border px-4 py-2"},h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOnValue)},e.checkBoxOnValue))),h("tr",null,h("td",{class:"border px-4 py-2"},"Off value"),h("td",{class:"border px-4 py-2"},h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOffValue)},e.checkBoxOffValue))),h("tr",null,h("td",{class:"border px-4 py-2"},"Toggle"),h("td",{class:"border px-4 py-2"},h("input",{id:e.fullName,type:"checkbox",checked:fieldIsChecked(e),onChange:this.updateCheckboxField(e)}))));return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&this.viewerStore&&((t,l)=>{var r,i,o,a,s,d,n,c;const p=(null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfInfo.value)||null,u=(null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfPages.value)||null;if(l.pageIndex<0)return void this.logger.error(`viewerState.pageIndex is ${l.pageIndex}`);if(!p)return void this.logger.error("pdfInfo is null");if(!u)return void this.logger.error("pdfPages is null");const g=t.pdfFields.value||[],b=t.pdfLayers.value||[],y=t.pdfTags.value||[],m=(null===(s=null===(a=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===a?void 0:a.pdfLinks.get(l.pageIndex))||void 0===s?void 0:s.value)||[],x=(null===(c=null===(n=null===(d=this.documentStore)||void 0===d?void 0:d.state)||void 0===n?void 0:n.pdfWidgets.get(l.pageIndex))||void 0===c?void 0:c.value)||[];return h("div",{class:"max-h-[40rem] overflow-y-auto"},h("ul",null,h("li",null,h("details",null,h("summary",null,"PDF info"),h("div",{class:"ml-4 outline"},h("dl",{class:"m-1"},h("dt",null,"id"),h("dd",null,p.id),h("dt",null,"fileName"),h("dd",null,p.originalFileName),h("dt",null,"pageCount"),h("dd",null,p.pageCount))))),h("li",null,h("details",null,h("summary",null,"Pages"),h("div",{class:"ml-4 outline"},h("ul",{class:"m-1"},u.map(((e,t)=>h("li",{key:t},h("a",{class:{"font-bold":t==l.pageIndex},onClick:()=>l.pageIndex=t},"Page ",t+1)))))))),h("li",null,h("details",null,h("summary",null,"Fields"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},g.map((t=>h("li",{class:"ml-4"},h("details",null,h("summary",null,"Field ",t.fullName),h("div",{class:"fieldPanel ml-4"},h("div",{class:"panel-header"}),h("div",{class:"panel-content divide-solid"},h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Field properties"},h("tbody",null,h("tr",null,h("td",{class:"border px-4 py-2"},"Full name"),h("td",{class:"border px-4 py-2"},t.fullName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Type"),h("td",{class:"border px-4 py-2"},t.fieldType)),h("tr",null,h("td",{class:"border px-4 py-2"},"Is XFA?"),h("td",{class:"border px-4 py-2"},t.isXfa?"Yes":"No")),h("tr",null,h("td",{class:"border px-4 py-2"},"Read-only?"),h("td",{class:"border px-4 py-2"},t.readOnly?"Yes":"No")),h("tr",null,h("td",{class:"border px-4 py-2"},"Required?"),h("td",{class:"border px-4 py-2"},t.requiredMode)),h("tr",null,h("td",{class:"border px-4 py-2"},"Value"),h("td",{class:"border px-4 py-2"},t.value)),"CheckBoxField"==t.fieldType&&e(t)))),h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Actions"},h("div",{class:"fixed-wrapper"},t.xfaActions&&t.xfaActions.map((e=>h("div",null,h("h2",null,e.activity),h("pre",null,e.script))))))))))))))),h("li",null,h("details",null,h("summary",null,"Layers"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},b.map((e=>h("li",{key:e.name},h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.name))))))),h("li",null,h("details",null,h("summary",null,"Links"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},m.map((e=>h("li",{key:e.pageIndex},h("a",null,"[link.type] / ",e.pageIndex)))))))),h("li",null,h("details",null,h("summary",null,"Tags"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},y.map((e=>h("li",{key:e.tagId},h("a",null,e.tagType," / ",e.tagId)))))))),h("li",null,h("details",null,h("summary",null,"Widgets"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},x.map((e=>h("li",null,h("details",null,h("summary",null,"Widget ",e.index," ",e.fieldName),h("div",{class:"widgetPanel mt-4"},h("div",{class:"panel-header"}),h("div",{class:"panel-content divide-solid"},h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Widget properties"},h("tbody",null,h("tr",null,h("td",{class:"border px-4 py-2"},"Index"),h("td",{class:"border px-4 py-2"},e.index)),h("tr",null,h("td",{class:"border px-4 py-2"},"Field"),h("td",{class:"border px-4 py-2"},e.fieldName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Type"),h("td",{class:"border px-4 py-2"},e.widgetType)),h("tr",null,h("td",{class:"border px-4 py-2"},"Font name"),h("td",{class:"border px-4 py-2"},e.fontName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Font size"),h("td",{class:"border px-4 py-2"},e.fontSize)),h("tr",null,h("td",{class:"border px-4 py-2"},"Left"),h("td",{class:"border px-4 py-2"},e.left)),h("tr",null,h("td",{class:"border px-4 py-2"},"Top"),h("td",{class:"border px-4 py-2"},e.top)),h("tr",null,h("td",{class:"border px-4 py-2"},"Bottom"),h("td",{class:"border px-4 py-2"},e.bottom)),h("tr",null,h("td",{class:"border px-4 py-2"},"Width"),h("td",{class:"border px-4 py-2"},e.width)),h("tr",null,h("td",{class:"border px-4 py-2"},"Height"),h("td",{class:"border px-4 py-2"},e.height)),"checkbox"==e.widgetType?h("tr",null,h("td",{class:"border px-4 py-2"},"Checkmark style"),h("td",{class:"border px-4 py-2"},e.checkMarkStyle)):null,h("tr",null,h("td",{class:"border px-4 py-2"},"Border style"),h("td",{class:"border px-4 py-2"},e.borderStyle)),h("tr",null,h("td",{class:"border px-4 py-2"},"Border color"),h("td",{class:"border px-4 py-2"},e.borderColor.R,", ",e.borderColor.G,", ",e.borderColor.B)),h("tr",null,h("td",{class:"border px-4 py-2"},"New widget?"),h("td",{class:"border px-4 py-2"},e.newWidget?"yes":"no")),h("tr",null,h("table",null,h("thead",null,"Appearance States"),h("tbody",null,!!e.widgetType&&e.appearances.map((t=>h("tr",null,h("td",{class:"border px-4 py-2"},t.userStateString),h("td",{class:"border px-4 py-2"},t.appearanceStateString),((e,t)=>{if("checkbox"==e.widgetType)return null==t.html?h("td",null,"(empty)"):h("td",{class:"border px-4 py-2 scale-150 -translate-y-3",innerHTML:t.html});h("td",null)})(e,t)))))))))))))))))))))})(this.documentStore.state,this.viewerStore.state)))}};PdfSidebar.style=PdfSidebarStyle0;export{PdfSidebar as pdf_sidebar}; | ||
import{r as registerInstance,h,H as Host,F as Fragment}from"./index-ad2fce19.js";import{n as createLogger}from"./ApiClient-c838e5e9.js";import{f as fieldIsChecked}from"./IPdfField-1a3e882c.js";const pdfSidebarCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.relative{position:relative}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.h-5{height:1.25rem}.w-5{width:1.25rem}.cursor-pointer{cursor:pointer}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-cover{background-size:cover}.p-4{padding:1rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.underline{text-decoration-line:underline}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:1rem;position:relative}h1,h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}dl dt{font-weight:700}dl dd{margin-bottom:.5rem}h2{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity));font-size:1.125rem;font-weight:700;line-height:1.75rem;margin-top:1rem}li a{cursor:pointer;display:block;padding-bottom:.25rem;padding-top:.25rem;text-decoration-line:underline}li{align-items:center;display:flex}li span.eye{--tw-text-opacity:1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im0zLjE3MiA1LjEzIDE4IDE0IiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHBhdGggZD0iTTE0LjM2NSAxMy44NDZhMyAzIDAgMCAxLTQuNzY3LTMuNjQzIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik05IDUuNjI3YTcuMDAzIDcuMDAzIDAgMCAxIDcuODUgMS40MjNsMy4wMDEgMy4wMDJjLjQ5Ny40OTcuNzQ1Ljc0NS44ODUgMS4wMDhhMiAyIDAgMCAxIDAgMS44OGMtLjE0LjI2My0uMzg4LjUxMS0uODg1IDEuMDA4djBMMTkuOCAxNCIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjxwYXRoIGQ9Ik03LjAxNiA4LjM5OGExIDEgMCAxIDAtMS40MTQtMS40MTRsMS40MTQgMS40MTRabS42NCA3Ljg0NS0yLjEyLTIuMTIyLTEuNDE1IDEuNDE1IDIuMTIyIDIuMTIgMS40MTQtMS40MTNabTguNDg2IDBhNiA2IDAgMCAxLTguNDg1IDBsLTEuNDE0IDEuNDE0YTggOCAwIDAgMCAxMS4zMTMgMGwtMS40MTQtMS40MTRaTTUuNTM2IDkuODc5bDEuNDgtMS40OC0xLjQxNC0xLjQxNS0xLjQ4IDEuNDhMNS41MzUgOS44OFptMTEuMjEgNS43Ni0uNjA0LjYwNCAxLjQxNCAxLjQxNC42MDUtLjYwNC0xLjQxNS0xLjQxNVpNNS41MzcgMTQuMTJjLS42ODctLjY4Ni0xLjEzLTEuMTMyLTEuNDEzLTEuNTAzLS4yNjUtLjM0OC0uMjk1LS41MS0uMjk1LS42MThoLTJjMCAuNzIuMzA0IDEuMzA2LjcwNSAxLjgzMi4zODQuNTAyLjk0MiAxLjA1NyAxLjU4OCAxLjcwNGwxLjQxNS0xLjQxNVpNNC4xMiA4LjQ2NGMtLjY0Ni42NDctMS4yMDQgMS4yMDItMS41ODggMS43MDUtLjQuNTI1LS43MDUgMS4xMS0uNzA1IDEuODMxaDJjMC0uMTA4LjAzLS4yNy4yOTUtLjYxOC4yODQtLjM3MS43MjYtLjgxNyAxLjQxMy0xLjUwM0w0LjEyIDguNDY0WiIgZmlsbD0iIzMyMzIzMiIvPjwvc3ZnPg==);background-size:cover;color:rgb(153 0 0/var(--tw-text-opacity));cursor:pointer;display:inline-block;height:1.25rem;margin-bottom:.5rem;margin-right:.5rem;margin-top:.5rem;width:1.25rem}li span.eye:hover{opacity:.6}li span.eye.open{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xNSAxMmEzIDMgMCAxIDEtNiAwIDMgMyAwIDAgMSA2IDBaIiBzdHJva2U9IiMzMjMyMzIiIHN0cm9rZS13aWR0aD0iMiIvPjxwYXRoIGQ9Ik02Ljk1IDcuMDVhNyA3IDAgMCAxIDkuOSAwbDIuMTIgMi4xMjJjMS4zMzQgMS4zMzMgMiAyIDIgMi44MjggMCAuODI4LS42NjYgMS40OTUtMiAyLjgyOGwtMi4xMiAyLjEyMmE3IDcgMCAwIDEtOS45IDBsLTIuMTIyLTIuMTIyYy0xLjMzMy0xLjMzMy0yLTItMi0yLjgyOCAwLS44MjguNjY3LTEuNDk1IDItMi44MjhMNi45NSA3LjA1WiIgc3Ryb2tlPSIjMzIzMjMyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=)}.visible{visibility:visible}.static{position:static}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.max-h-\\[40rem\\]{max-height:40rem}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.overflow-y-auto{overflow-y:auto}.border{border-width:1px}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}',PdfSidebarStyle0=pdfSidebarCss,PdfSidebar=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfSidebar"),this.updateCheckboxField=e=>()=>{if(!this.documentStore)return void this.logger.error("Cannot update checkbox field: documentStore is null");const t=fieldIsChecked(e)?e.checkBoxOffValue:e.checkBoxOnValue;this.documentStore.updateField(e.fullName,t)},this.clickLayer=e=>()=>{this.documentStore?this.documentStore.toggleLayer(e.name):this.logger.error("Cannot toggle layer: documentStore is null")},this.documentStore=null,this.viewerStore=null,this.document="default"}toggleCheckbox(e,t){this.logger.debug("toggleCheckbox, field=",e.fullName,"new value=",t),this.documentStore?this.documentStore.updateField(e.fullName,t):this.logger.error("Cannot toggle checkbox: documentStore is null")}render(){const e=e=>h(Fragment,null,h("tr",null,h("td",{class:"border px-4 py-2"},"On value"),h("td",{class:"border px-4 py-2"},h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOnValue)},e.checkBoxOnValue))),h("tr",null,h("td",{class:"border px-4 py-2"},"Off value"),h("td",{class:"border px-4 py-2"},h("a",{onClick:()=>this.toggleCheckbox(e,e.checkBoxOffValue)},e.checkBoxOffValue))),h("tr",null,h("td",{class:"border px-4 py-2"},"Toggle"),h("td",{class:"border px-4 py-2"},h("input",{id:e.fullName,type:"checkbox",checked:fieldIsChecked(e),onChange:this.updateCheckboxField(e)}))));return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,documentStoreLoaded:e=>this.documentStore=e,viewerStoreLoaded:e=>this.viewerStore=e},this.documentStore&&this.viewerStore&&((t,l)=>{var r,i,o,a,s,d,n,c;const p=(null===(r=this.documentStore)||void 0===r?void 0:r.state.pdfInfo.value)||null,u=(null===(i=this.documentStore)||void 0===i?void 0:i.state.pdfPages.value)||null;if(l.pageIndex<0)return void this.logger.error(`viewerState.pageIndex is ${l.pageIndex}`);if(!p)return void this.logger.error("pdfInfo is null");if(!u)return void this.logger.error("pdfPages is null");const g=t.pdfFields.value||[],b=t.pdfLayers.value||[],y=t.pdfTags.value||[],m=(null===(s=null===(a=null===(o=this.documentStore)||void 0===o?void 0:o.state)||void 0===a?void 0:a.pdfLinks.get(l.pageIndex))||void 0===s?void 0:s.value)||[],x=(null===(c=null===(n=null===(d=this.documentStore)||void 0===d?void 0:d.state)||void 0===n?void 0:n.pdfWidgets.get(l.pageIndex))||void 0===c?void 0:c.value)||[];return h("div",{class:"max-h-[40rem] overflow-y-auto"},h("ul",null,h("li",null,h("details",null,h("summary",null,"PDF info"),h("div",{class:"ml-4 outline"},h("dl",{class:"m-1"},h("dt",null,"id"),h("dd",null,p.id),h("dt",null,"fileName"),h("dd",null,p.originalFileName),h("dt",null,"pageCount"),h("dd",null,p.pageCount))))),h("li",null,h("details",null,h("summary",null,"Pages"),h("div",{class:"ml-4 outline"},h("ul",{class:"m-1"},u.map(((e,t)=>h("li",{key:t},h("a",{class:{"font-bold":t==l.pageIndex},onClick:()=>l.pageIndex=t},"Page ",t+1)))))))),h("li",null,h("details",null,h("summary",null,"Fields"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},g.map((t=>h("li",{class:"ml-4"},h("details",null,h("summary",null,"Field ",t.fullName),h("div",{class:"fieldPanel ml-4"},h("div",{class:"panel-header"}),h("div",{class:"panel-content divide-solid"},h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Field properties"},h("tbody",null,h("tr",null,h("td",{class:"border px-4 py-2"},"Full name"),h("td",{class:"border px-4 py-2"},t.fullName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Type"),h("td",{class:"border px-4 py-2"},t.fieldType)),h("tr",null,h("td",{class:"border px-4 py-2"},"Is XFA?"),h("td",{class:"border px-4 py-2"},t.isXfa?"Yes":"No")),h("tr",null,h("td",{class:"border px-4 py-2"},"Read-only?"),h("td",{class:"border px-4 py-2"},t.readOnly?"Yes":"No")),h("tr",null,h("td",{class:"border px-4 py-2"},"Required?"),h("td",{class:"border px-4 py-2"},t.requiredMode)),h("tr",null,h("td",{class:"border px-4 py-2"},"Value"),h("td",{class:"border px-4 py-2"},t.value)),"CheckBoxField"==t.fieldType&&e(t)))),h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Actions"},h("div",{class:"fixed-wrapper"},t.xfaActions&&t.xfaActions.map((e=>h("div",null,h("h2",null,e.activity),h("pre",null,e.script))))))))))))))),h("li",null,h("details",null,h("summary",null,"Layers"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},b.map((e=>h("li",{key:e.name},h("span",{class:{eye:!0,open:e.visible},onClick:this.clickLayer(e)}),e.name))))))),h("li",null,h("details",null,h("summary",null,"Links"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},m.map((e=>h("li",{key:e.pageIndex},h("a",null,"[link.type] / ",e.pageIndex)))))))),h("li",null,h("details",null,h("summary",null,"Tags"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},y.map((e=>h("li",{key:e.tagId},h("a",null,e.tagType," / ",e.tagId)))))))),h("li",null,h("details",null,h("summary",null,"Widgets"),h("div",{class:"ml-4"},h("ul",{class:"m-1"},x.map((e=>h("li",null,h("details",null,h("summary",null,"Widget ",e.index," ",e.fieldName),h("div",{class:"widgetPanel mt-4"},h("div",{class:"panel-header"}),h("div",{class:"panel-content divide-solid"},h("table",{class:"table-auto border outline border-slate-400 px-4 py-2",title:"Widget properties"},h("tbody",null,h("tr",null,h("td",{class:"border px-4 py-2"},"Index"),h("td",{class:"border px-4 py-2"},e.index)),h("tr",null,h("td",{class:"border px-4 py-2"},"Field"),h("td",{class:"border px-4 py-2"},e.fieldName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Type"),h("td",{class:"border px-4 py-2"},e.widgetType)),h("tr",null,h("td",{class:"border px-4 py-2"},"Font name"),h("td",{class:"border px-4 py-2"},e.fontName)),h("tr",null,h("td",{class:"border px-4 py-2"},"Font size"),h("td",{class:"border px-4 py-2"},e.fontSize)),h("tr",null,h("td",{class:"border px-4 py-2"},"Left"),h("td",{class:"border px-4 py-2"},e.left)),h("tr",null,h("td",{class:"border px-4 py-2"},"Top"),h("td",{class:"border px-4 py-2"},e.top)),h("tr",null,h("td",{class:"border px-4 py-2"},"Bottom"),h("td",{class:"border px-4 py-2"},e.bottom)),h("tr",null,h("td",{class:"border px-4 py-2"},"Width"),h("td",{class:"border px-4 py-2"},e.width)),h("tr",null,h("td",{class:"border px-4 py-2"},"Height"),h("td",{class:"border px-4 py-2"},e.height)),"checkbox"==e.widgetType?h("tr",null,h("td",{class:"border px-4 py-2"},"Checkmark style"),h("td",{class:"border px-4 py-2"},e.checkMarkStyle)):null,h("tr",null,h("td",{class:"border px-4 py-2"},"Border style"),h("td",{class:"border px-4 py-2"},e.borderStyle)),h("tr",null,h("td",{class:"border px-4 py-2"},"Border color"),h("td",{class:"border px-4 py-2"},e.borderColor.R,", ",e.borderColor.G,", ",e.borderColor.B)),h("tr",null,h("td",{class:"border px-4 py-2"},"New widget?"),h("td",{class:"border px-4 py-2"},e.newWidget?"yes":"no")),h("tr",null,h("table",null,h("thead",null,"Appearance States"),h("tbody",null,!!e.widgetType&&e.appearances.map((t=>h("tr",null,h("td",{class:"border px-4 py-2"},t.userStateString),h("td",{class:"border px-4 py-2"},t.appearanceStateString),((e,t)=>{if("checkbox"==e.widgetType)return null==t.html?h("td",null,"(empty)"):h("td",{class:"border px-4 py-2 scale-150 -translate-y-3",innerHTML:t.html});h("td",null)})(e,t)))))))))))))))))))))})(this.documentStore.state,this.viewerStore.state)))}};PdfSidebar.style=PdfSidebarStyle0;export{PdfSidebar as pdf_sidebar}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h}from"./index-bc1ec980.js";const pdfSpinnerCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfSpinnerStyle0=pdfSpinnerCss,PdfSpinner=class{constructor(t){registerInstance(this,t),this.showText=!1}render(){return h("div",{key:"c28c7cd19b34336e380370e113960ba84837c5eb",role:"status",class:"flex items-center"},h("svg",{key:"3f7162976bbbd5ebced39b2570fe0c7c8e19b950","aria-hidden":"true",class:"w-8 h-8 mr-2 flex-shrink-0 text-gray-200 animate-spin fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"dd8bee8a2d58009e3846e63755f4e1815e826ac2",d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h("path",{key:"88dfb6282854167b4fe0b71154ae52c036ff79ac",d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})),this.showText&&h("span",{class:""},"Loading..."))}};PdfSpinner.style=PdfSpinnerStyle0;export{PdfSpinner as pdf_spinner}; | ||
import{r as registerInstance,h}from"./index-ad2fce19.js";const pdfSpinnerCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfSpinnerStyle0=pdfSpinnerCss,PdfSpinner=class{constructor(t){registerInstance(this,t),this.showText=!1}render(){return h("div",{key:"c28c7cd19b34336e380370e113960ba84837c5eb",role:"status",class:"flex items-center"},h("svg",{key:"3f7162976bbbd5ebced39b2570fe0c7c8e19b950","aria-hidden":"true",class:"w-8 h-8 mr-2 flex-shrink-0 text-gray-200 animate-spin fill-blue-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"dd8bee8a2d58009e3846e63755f4e1815e826ac2",d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),h("path",{key:"88dfb6282854167b4fe0b71154ae52c036ff79ac",d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})),this.showText&&h("span",{class:""},"Loading..."))}};PdfSpinner.style=PdfSpinnerStyle0;export{PdfSpinner as pdf_spinner}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-bc1ec980.js";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore-7f36f51f.js";import"./ApiClient-640dc1cb.js";import"./IPdfField-1a3e882c.js";import"./FileService-48165f97.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0;export{PdfStoreWrapper as pdf_store_wrapper}; | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-ad2fce19.js";import{e as ensureStore,o as onChange,a as onChange$1,b as ensureStore$1}from"./documentStore-c4eea1c1.js";import"./ApiClient-c838e5e9.js";import"./IPdfField-1a3e882c.js";import"./FileService-7bd3d04f.js";const pdfStoreWrapperCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.visible{visibility:visible}.max-h-\\[40rem\\]{max-height:40rem}.overflow-y-auto{overflow-y:auto}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.m-1{margin:.25rem}.ml-4{margin-left:1rem}.mt-4{margin-top:1rem}.table{display:table}.table-auto{table-layout:auto}.-translate-y-3{--tw-translate-y:-0.75rem}.-translate-y-3,.scale-150{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-150{--tw-scale-x:1.5;--tw-scale-y:1.5}.divide-solid>:not([hidden])~:not([hidden]){border-style:solid}.border-slate-400{--tw-border-opacity:1;border-color:rgb(148 163 184/var(--tw-border-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.font-bold{font-weight:700}.outline{outline-style:solid}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.flex-row{flex-direction:row}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.h-16{height:4rem}.h-24{height:6rem}.w-0{width:0}.w-16{width:4rem}.cursor-move{cursor:move}.rounded{border-radius:.25rem}.pr-4{padding-right:1rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfStoreWrapperStyle0=pdfStoreWrapperCss,PdfStoreWrapper=class{constructor(t){registerInstance(this,t),this.documentStore=null,this.viewerStore=null,this.setDocumentStore=()=>{this.documentStore||(this.documentStore=ensureStore(this.pdfdoc)||null,this.documentStore&&this.documentStoreLoaded&&this.documentStoreLoaded(this.documentStore))},this.pdfdoc="default",this.pdfviewer="default",this.pageindex=-1,this.documentStoreLoaded=void 0,this.viewerStoreLoaded=void 0}componentDidLoad(){this.setDocumentStore(),this.setViewerStore(),onChange("pdfReferences",(()=>{this.setDocumentStore()})),onChange$1("stores",(()=>{this.setViewerStore()}))}setViewerStore(){this.viewerStore||(this.viewerStore=ensureStore$1(this.pdfdoc,this.pdfviewer),this.viewerStore&&this.viewerStoreLoaded&&this.viewerStoreLoaded(this.viewerStore))}render(){return h(Host,{key:"6586487a8b82ea87152f7662d6c0d43beca31d10"},h("slot",{key:"f9603b68cf8d8ebd1c6204b6f9a4d835b7eb955d"}))}get el(){return getElement(this)}};PdfStoreWrapper.style=PdfStoreWrapperStyle0;export{PdfStoreWrapper as pdf_store_wrapper}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-bc1ec980.js";import{n as createLogger,j as pageWidth,f as pageHeight}from"./ApiClient-640dc1cb.js";import{F as FileService}from"./FileService-48165f97.js";const pdfThumbnailCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}img{background-size:cover}.static{position:static}.mb-4{margin-bottom:1rem}.flex{display:flex}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.hidden{display:none}.h-16{height:4rem}.h-24{height:6rem}.h-8{height:2rem}.w-0{width:0}.w-16{width:4rem}.w-8{width:2rem}.cursor-move{cursor:move}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pr-4{padding-right:1rem}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfThumbnailStyle0=pdfThumbnailCss,PdfThumbnail=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfThumbnail"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.logger.debug("DocumentStoreLoaded",this.pageIndex)},this.onIntersection=async t=>{this.logger.debug("onIntersection");for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;if(this.documentId&&this.pageIndex>=0){const o=new FileService,i=await o.getThumbnail(this.documentId,this.pageIndex);i.error?this.loadFailed=!0:(this.thumbnailData=i.value,this.logger.debug(`thumbnail loaded: ${null!==(e=null===(t=this.thumbnailData)||void 0===t?void 0:t.length)&&void 0!==e?e:0} characters`))}},this.unload=async()=>{this.thumbnailData=null},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.isDragged=!1,this.inView=!1,this.debugShouldLoad=!1,this.thumbnailData=null,this.loadFailed=!1,this.documentId=null,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=-1}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const o=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");o&&this.observer.observe(o)}removeIntersectionObserver(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.observer=null}render(){const t=t=>{return this.thumbnailData?(e=this.thumbnailData,h("img",{src:e,style:{"pointer-events":"none"}})):this.loadFailed?h("div",{class:"text-xs text-red-600"},"error"):h("div",{class:"w-8 h-8"},h("pdf-spinner",{showText:!1}));var e};return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:t=>this.viewerStore=t},h("div",null,this.documentStore&&this.viewerStore&&((e,o)=>{var i;let r=this.pageIndex==o.pageIndex;const a=null===(i=e.pdfPages.value)||void 0===i?void 0:i[this.pageIndex];if(!a)return null;const n=pageWidth(a),s=pageHeight(a),d=n>s;return h("div",{class:"flex -mr-4 pr-4"},h("div",{class:{"transition-width duration-300 w-0":!0,"duration-100 w-16 ml-1":this.isDraggingOver}}),h("div",{class:{"flex flex-col items-center":!0,hidden:this.isDragged},draggable:!1},h("div",{class:{"bg-white shadow-lg rounded border flex justify-center items-center":!0,"cursor-move":!1,"h-16":d,"h-24":!d,"shadow-none border-brand":r},style:{"aspect-ratio":`${n} / ${s}`}},t()),h("div",{class:{"mt-1 text-sm":!0,"text-black":r,"text-gray-600":!r,"font-[Arial]":!0}},"Page ",this.pageIndex+1)))})(this.documentStore.state,this.viewerStore.state))))}get el(){return getElement(this)}};PdfThumbnail.style=PdfThumbnailStyle0;export{PdfThumbnail as pdf_thumbnail}; | ||
import{r as registerInstance,h,H as Host,a as getElement}from"./index-ad2fce19.js";import{n as createLogger,j as pageWidth,f as pageHeight}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";const pdfThumbnailCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}img{background-size:cover}.static{position:static}.mb-4{margin-bottom:1rem}.flex{display:flex}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.-mr-4{margin-right:-1rem}.ml-1{margin-left:.25rem}.mt-1{margin-top:.25rem}.hidden{display:none}.h-16{height:4rem}.h-24{height:6rem}.h-8{height:2rem}.w-0{width:0}.w-16{width:4rem}.w-8{width:2rem}.cursor-move{cursor:move}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.border{border-width:1px}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.pr-4{padding-right:1rem}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}',PdfThumbnailStyle0=pdfThumbnailCss,PdfThumbnail=class{constructor(t){registerInstance(this,t),this.logger=createLogger("PdfThumbnail"),this.observer=null,this.loadTimeoutInSeconds=.3,this.unLoadTimeoutInSeconds=60,this.loadTimer=null,this.unloadTimer=null,this.onDocumentStoreLoaded=t=>{this.documentStore=t,this.logger.debug("DocumentStoreLoaded",this.pageIndex)},this.onIntersection=async t=>{this.logger.debug("onIntersection");for(const e of t)this.inView=e.isIntersecting,this.inView?(this.unloadTimer&&clearTimeout(this.unloadTimer),this.loadTimer=setTimeout((()=>(this.debugShouldLoad=!0,this.inView&&this.load())),1e3*this.loadTimeoutInSeconds)):(this.loadTimer&&clearTimeout(this.loadTimer),this.unloadTimer=setTimeout((()=>(this.debugShouldLoad=!1,!this.inView&&this.unload())),1e3*this.unLoadTimeoutInSeconds))},this.load=async()=>{var t,e;if(this.documentId&&this.pageIndex>=0){const o=new FileService,i=await o.getThumbnail(this.documentId,this.pageIndex);i.error?this.loadFailed=!0:(this.thumbnailData=i.value,this.logger.debug(`thumbnail loaded: ${null!==(e=null===(t=this.thumbnailData)||void 0===t?void 0:t.length)&&void 0!==e?e:0} characters`))}},this.unload=async()=>{this.thumbnailData=null},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.isDragged=!1,this.inView=!1,this.debugShouldLoad=!1,this.thumbnailData=null,this.loadFailed=!1,this.documentId=null,this.pdfdoc="default",this.pdfviewer="default",this.pageIndex=-1}componentDidLoad(){this.addIntersectionObserver()}disconnectedCallback(){this.removeIntersectionObserver()}addIntersectionObserver(){var t,e;this.observer=new IntersectionObserver(this.onIntersection,{rootMargin:"60% 0px 60% 0px"});const o=null===(e=null===(t=this.el)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.querySelector("div");o&&this.observer.observe(o)}removeIntersectionObserver(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.observer=null}render(){const t=t=>{return this.thumbnailData?(e=this.thumbnailData,h("img",{src:e,style:{"pointer-events":"none"}})):this.loadFailed?h("div",{class:"text-xs text-red-600"},"error"):h("div",{class:"w-8 h-8"},h("pdf-spinner",{showText:!1}));var e};return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:t=>this.viewerStore=t},h("div",null,this.documentStore&&this.viewerStore&&((e,o)=>{var i;let r=this.pageIndex==o.pageIndex;const a=null===(i=e.pdfPages.value)||void 0===i?void 0:i[this.pageIndex];if(!a)return null;const n=pageWidth(a),s=pageHeight(a),d=n>s;return h("div",{class:"flex -mr-4 pr-4"},h("div",{class:{"transition-width duration-300 w-0":!0,"duration-100 w-16 ml-1":this.isDraggingOver}}),h("div",{class:{"flex flex-col items-center":!0,hidden:this.isDragged},draggable:!1},h("div",{class:{"bg-white shadow-lg rounded border flex justify-center items-center":!0,"cursor-move":!1,"h-16":d,"h-24":!d,"shadow-none border-brand":r},style:{"aspect-ratio":`${n} / ${s}`}},t()),h("div",{class:{"mt-1 text-sm":!0,"text-black":r,"text-gray-600":!r,"font-[Arial]":!0}},"Page ",this.pageIndex+1)))})(this.documentStore.state,this.viewerStore.state))))}get el(){return getElement(this)}};PdfThumbnail.style=PdfThumbnailStyle0;export{PdfThumbnail as pdf_thumbnail}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host}from"./index-bc1ec980.js";import{n as createLogger}from"./ApiClient-640dc1cb.js";const pdfThumbnailsCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}.flex{display:flex}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}:host{display:block}.thumbnails{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity));display:flex;flex-direction:column;padding:1rem}.static{position:static}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfThumbnailsStyle0=pdfThumbnailsCss,PdfThumbnails=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfThumbnails"),this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.clickPage=e=>()=>{var t;(null===(t=this.viewerStore)||void 0===t?void 0:t.state)&&(this.viewerStore.state.pageIndex=e)},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.document="default",this.pagesviewer="default",this.direction="row"}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.logger.debug("drop");const o=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/plain");if(!o)return;const{document:r,pageIndex:i}=JSON.parse(o);this.logger.debug("drop",r,i),this.documentStore?this.documentStore.movePageToDocument(r,i):this.logger.error("Cannot move page to document: documentstore is null")}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},h("div",{class:"thumbnails"},this.documentStore&&this.viewerStore&&(e=>{var t;const o=e.pdfInfo.value,r=e.pdfPages.value;if(!o||!r)return null;const i=o.id;return h("div",{class:{"max-w-full overflow-x-auto pt-4 min-h-[9rem]":!0,"border-dashed border-2":!0,"border-transparent":!this.isDraggingOver,"border-brand":this.isDraggingOver}},h("div",{class:{flex:!0,"gap-4":!0,"flex-row":"row"==(null!==(t=this.direction)&&void 0!==t?t:"row"),"flex-col":"column"==this.direction}},r.map(((e,t)=>h("a",{key:`${i}-${t}`,class:"cursor-pointer mb-4 flex flex-col justify-end items-center",onClick:this.clickPage(t)},h("pdf-thumbnail",{documentId:i,pdfdoc:this.document,pdfviewer:this.pagesviewer,pageIndex:t}))))))})(this.documentStore.state))))}};PdfThumbnails.style=PdfThumbnailsStyle0;export{PdfThumbnails as pdf_thumbnails}; | ||
import{r as registerInstance,h,H as Host}from"./index-ad2fce19.js";import{n as createLogger}from"./ApiClient-c838e5e9.js";const pdfThumbnailsCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}.flex{display:flex}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}:host{display:block}.thumbnails{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity));display:flex;flex-direction:column;padding:1rem}.static{position:static}.mb-4{margin-bottom:1rem}.min-h-\\[9rem\\]{min-height:9rem}.max-w-full{max-width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.overflow-x-auto{overflow-x:auto}.border-2{border-width:2px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.pt-4{padding-top:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfThumbnailsStyle0=pdfThumbnailsCss,PdfThumbnails=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfThumbnails"),this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.clickPage=e=>()=>{var t;(null===(t=this.viewerStore)||void 0===t?void 0:t.state)&&(this.viewerStore.state.pageIndex=e)},this.documentStore=null,this.viewerStore=null,this.isDraggingOver=!1,this.document="default",this.pagesviewer="default",this.direction="row"}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.logger.debug("drop");const o=null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("text/plain");if(!o)return;const{document:r,pageIndex:i}=JSON.parse(o);this.logger.debug("drop",r,i),this.documentStore?this.documentStore.movePageToDocument(r,i):this.logger.error("Cannot move page to document: documentstore is null")}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},h("div",{class:"thumbnails"},this.documentStore&&this.viewerStore&&(e=>{var t;const o=e.pdfInfo.value,r=e.pdfPages.value;if(!o||!r)return null;const i=o.id;return h("div",{class:{"max-w-full overflow-x-auto pt-4 min-h-[9rem]":!0,"border-dashed border-2":!0,"border-transparent":!this.isDraggingOver,"border-brand":this.isDraggingOver}},h("div",{class:{flex:!0,"gap-4":!0,"flex-row":"row"==(null!==(t=this.direction)&&void 0!==t?t:"row"),"flex-col":"column"==this.direction}},r.map(((e,t)=>h("a",{key:`${i}-${t}`,class:"cursor-pointer mb-4 flex flex-col justify-end items-center",onClick:this.clickPage(t)},h("pdf-thumbnail",{documentId:i,pdfdoc:this.document,pdfviewer:this.pagesviewer,pageIndex:t}))))))})(this.documentStore.state))))}};PdfThumbnails.style=PdfThumbnailsStyle0;export{PdfThumbnails as pdf_thumbnails}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host}from"./index-bc1ec980.js";import{n as createLogger}from"./ApiClient-640dc1cb.js";import{F as FileService}from"./FileService-48165f97.js";const pdfUploaderCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.flex{display:flex}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfUploaderStyle0=pdfUploaderCss,PdfUploader=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfUploader"),this.fileService=new FileService,this.upload=async e=>{if(e){this.logger.debug("File uploading",e.name,e.size,e.type);const t=await this.fileService.upload(e);if(this.logger.debug("File uploaded",t),!this.documentStore)return void this.logger.error("Cannot set pdf id in store: store is null");this.documentStore.load(t.id)}else this.logger.debug("No valid files uploaded")},this.handleFiles=e=>{this.logger.debug("File selected");const t=e.target.files||[];this.upload&&this.upload(t[0])},this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default",this.isDraggingOver=!1}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;this.logger.debug("File dropped"),e.preventDefault(),this.isDraggingOver=!1;const o=(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||[];this.upload&&this.upload(o[0])}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(e=>{if(!e.pdfId)return h("label",{class:{"flex flex-col bg-blue-300 py-12 px-24 rounded-xl cursor-pointer text-center m-8":!0,"bg-blue-400 border-dashed border-4 border-brand":this.isDraggingOver}},h("input",{type:"file",accept:"application/pdf",onChange:this.handleFiles,class:"hidden"}),h("h3",{class:"text-xl font-bold text-brand mb-2"},"Drag and drop a PDF document"),h("div",{class:"text-gray-600 text-sm"},"...or click to select a PDF document from your computer"))})(this.documentStore.state)))}};PdfUploader.style=PdfUploaderStyle0;export{PdfUploader as pdf_uploader}; | ||
import{r as registerInstance,h,H as Host}from"./index-ad2fce19.js";import{n as createLogger}from"./ApiClient-c838e5e9.js";import{F as FileService}from"./FileService-7bd3d04f.js";const pdfUploaderCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.m-8{margin:2rem}.mb-2{margin-bottom:.5rem}.flex{display:flex}.hidden{display:none}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-dashed{border-style:dashed}.border-brand{--tw-border-opacity:1;border-color:rgb(153 0 0/var(--tw-border-opacity))}.bg-blue-300{--tw-bg-opacity:1;background-color:rgb(147 197 253/var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.px-24{padding-left:6rem;padding-right:6rem}.py-12{padding-bottom:3rem;padding-top:3rem}.text-center{text-align:center}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand{--tw-text-opacity:1;color:rgb(153 0 0/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfUploaderStyle0=pdfUploaderCss,PdfUploader=class{constructor(e){registerInstance(this,e),this.logger=createLogger("PdfUploader"),this.fileService=new FileService,this.upload=async e=>{if(e){this.logger.debug("File uploading",e.name,e.size,e.type);const t=await this.fileService.upload(e);if(this.logger.debug("File uploaded",t),!this.documentStore)return void this.logger.error("Cannot set pdf id in store: store is null");this.documentStore.load(t.id)}else this.logger.debug("No valid files uploaded")},this.handleFiles=e=>{this.logger.debug("File selected");const t=e.target.files||[];this.upload&&this.upload(t[0])},this.onDocumentStoreLoaded=e=>{this.logger.debug("Document store loaded"),this.documentStore=e},this.onViewerStoreLoaded=e=>{this.viewerStore=e},this.documentStore=null,this.viewerStore=null,this.document="default",this.pagesviewer="default",this.isDraggingOver=!1}dragLeaveHandler(){this.isDraggingOver=!1}dragOverHandler(e){e.preventDefault(),this.isDraggingOver=!0}dragEnterHandler(){this.isDraggingOver=!0}dragEndHandler(){this.isDraggingOver=!1}dropHandler(e){var t;this.logger.debug("File dropped"),e.preventDefault(),this.isDraggingOver=!1;const o=(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||[];this.upload&&this.upload(o[0])}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.document,pdfviewer:this.pagesviewer,documentStoreLoaded:this.onDocumentStoreLoaded,viewerStoreLoaded:this.onViewerStoreLoaded},this.documentStore&&this.viewerStore&&(e=>{if(!e.pdfId)return h("label",{class:{"flex flex-col bg-blue-300 py-12 px-24 rounded-xl cursor-pointer text-center m-8":!0,"bg-blue-400 border-dashed border-4 border-brand":this.isDraggingOver}},h("input",{type:"file",accept:"application/pdf",onChange:this.handleFiles,class:"hidden"}),h("h3",{class:"text-xl font-bold text-brand mb-2"},"Drag and drop a PDF document"),h("div",{class:"text-gray-600 text-sm"},"...or click to select a PDF document from your computer"))})(this.documentStore.state)))}};PdfUploader.style=PdfUploaderStyle0;export{PdfUploader as pdf_uploader}; |
@@ -1,1 +0,1 @@ | ||
import{h,r as registerInstance,c as createEvent,H as Host}from"./index-bc1ec980.js";import{n as createLogger,f as pageHeight}from"./ApiClient-640dc1cb.js";import{u as userModeEditPlaceholder}from"./UserModeEditPlaceholder-66a11998.js";function setDragEventData(t,e,i,o,r){if(!t.dataTransfer)return;const a=t.offsetY-e(),s=t.offsetX-i.left;t.dataTransfer.effectAllowed="move",o&&t.dataTransfer.setDragImage(o,s*r,a*r),t.dataTransfer.setData("text/plain",JSON.stringify({type:"widget",index:i.index,height:i.height,mouseTop:a,mouseLeft:s}))}const bgBlue200="rgb(191 219 254)",getWidgetDivStyle=t=>({top:`${t.top()}px`,left:`${t.pdfWidget.left}px`,width:`${t.pdfWidget.width}px`,height:`${t.pdfWidget.height}px`,"background-color":bgBlue200});function resolveAppearance(t,e){const i=t.mouseDown&&t.mouseOver?"down":t.mouseOver?"rollover":"normal";let o=!0;switch(e.fieldType){case"CheckBoxField":o=e.value!==e.checkBoxOnValue;break;case"RadioButtonField":o=e.value!==t.pdfWidget.radioButtonOption}let r=t.pdfWidget.appearances.find((t=>t.userStateString==i&&t.appearanceStateString==(o?"off":"on")));return r&&r.html||(t.logger.debug("did not find appearance matching userState",i,"and field state =",o?"off":"on"),r=t.pdfWidget.appearances.find((t=>"normal"==t.userStateString&&t.appearanceStateString==(o?"off":"on")))),r&&r.html||(t.logger.debug("did not find normal appearance matching field state =",o?"off":"on"),r=t.pdfWidget.appearances[0]),r}const renderWidget=(t,e,i)=>{const o=resolveAppearance(t,e);return h("div",{ref:e=>t.setDivElement(e),onClick:e=>t.click(e),draggable:t.isEditing(),class:"absolute z-40 opacity-100 overflow-hidden",style:i},h("div",{class:"tc-widget-appearance","data-user":o.userStateString,"data-state":o.appearanceStateString,innerHTML:o.html||void 0}))},bgOrange400="rgb(251 146 60)",getDraggingGhostStyle=t=>e=>({top:"-4000px",width:t.pdfWidget.width*e.zoomFactor+"px",height:t.pdfWidget.height*e.zoomFactor+"px",cursor:t.isEditing()?"move":void 0,"z-index":t.selected?"60":void 0,"background-color":t.selected?bgOrange400:void 0}),renderDraggingGhost=(t,e)=>h("div",{ref:e=>t.setDraggingGhost(e),class:"absolute z-40 bg-orange-200 opacity-40 overflow-hidden",style:getDraggingGhostStyle(t)(e)}),pdfWidgetBaseCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.z-40{z-index:40}.opacity-100{opacity:1}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.opacity-40{opacity:.4}',PdfWidgetBaseStyle0=pdfWidgetBaseCss,PdfWidgetBase=class{constructor(t){registerInstance(this,t),this.onClick=createEvent(this,"onClick",7),this.divElement=void 0,this.draggingGhost=void 0,this.logger=createLogger("PdfWidgetBase"),this.mouseDown=!1,this.mouseOver=!1,this.isEditing=()=>{var t;return(null===(t=this.viewerStore)||void 0===t?void 0:t.state.userMode)==userModeEditPlaceholder},this.debugUserMode=()=>{var t;if(null===(t=this.viewerStore)||void 0===t?void 0:t.state.debugUserMode)return this.isEditing()?"2px dashed blue":"2px dashed red"},this.click=t=>{var e;this.logger.debug("click",t),(null===(e=this.field)||void 0===e?void 0:e.readOnly)||this.isEditing()||(this.hasFocus=!0),this.onClick.emit(t)},this.getWidgetState=()=>this.isEditing()?"edit":this.hasFocus?"focus":"view",this.viewerStore=null,this.pageIndex=-1,this.documentStore=null,this.pdfWidget=void 0,this.widgetDivStyles=void 0,this.pdfPage=void 0,this.field=null,this.hasFocus=!1,this.isDragged=!1,this.widgetsRevision=-1}componentWillRender(){var t,e,i,o,r;this.logger.debug("componentWillRender"),this.field=(null===(o=null===(i=null===(e=null===(t=this.documentStore)||void 0===t?void 0:t.state)||void 0===e?void 0:e.pdfFields)||void 0===i?void 0:i.value)||void 0===o?void 0:o.find((t=>t.fullName==this.pdfWidget.fieldName)))||null,null===(r=this.documentStore)||void 0===r||r.onChange("widgetsRevisions",(t=>{this.widgetsRevision=t[this.pageIndex]}))}mouseDownHandler(t){this.mouseDown=!0,this.logger.debug("mouseDown, ev target=",t.target)}mouseUpHandler(t){this.mouseDown=!1}mouseOverHandler(t){this.isEditing()||(this.mouseOver=!0,this.mouseDown=0!=t.buttons)}mouseOutHandler(t){this.isEditing()||(this.mouseOver=!1,this.mouseDown=0!=t.buttons)}dragStartHandler(t){var e;if(!this.isEditing())return;this.isDragged=!0;const i=(null===(e=this.viewerStore)||void 0===e?void 0:e.state.zoomFactor)||1;setDragEventData(t,this.top,this.pdfWidget,this.draggingGhost||null,i)}dragEndHandler(){this.isDragged=!1}setDivElement(t){this.divElement=t}top(){const t=this.pdfPage;return(t&&pageHeight(t)||0)-this.pdfWidget.bottom-this.pdfWidget.height}setDraggingGhost(t){this.draggingGhost=t}render(){var t;if(!this.field)return null;const e=this.isEditing()?"both":"none",i=this.debugUserMode(),o=Object.assign(Object.assign(Object.assign({},getWidgetDivStyle(this)),this.widgetDivStyles),{resize:e,border:i});if(!this.viewerStore)return null;const r=null===(t=this.viewerStore)||void 0===t?void 0:t.state;return h(Host,null,renderWidget(this,this.field,o),renderDraggingGhost(this,r),h("slot",null))}};PdfWidgetBase.style=PdfWidgetBaseStyle0;export{PdfWidgetBase as pdf_widget_base}; | ||
import{h,r as registerInstance,c as createEvent,H as Host}from"./index-ad2fce19.js";import{n as createLogger,f as pageHeight}from"./ApiClient-c838e5e9.js";import{u as userModeEditPlaceholder}from"./UserModeEditPlaceholder-66a11998.js";function setDragEventData(t,e,i,o,r){if(!t.dataTransfer)return;const a=t.offsetY-e(),s=t.offsetX-i.left;t.dataTransfer.effectAllowed="move",o&&t.dataTransfer.setDragImage(o,s*r,a*r),t.dataTransfer.setData("text/plain",JSON.stringify({type:"widget",index:i.index,height:i.height,mouseTop:a,mouseLeft:s}))}const bgBlue200="rgb(191 219 254)",getWidgetDivStyle=t=>({top:`${t.top()}px`,left:`${t.pdfWidget.left}px`,width:`${t.pdfWidget.width}px`,height:`${t.pdfWidget.height}px`,"background-color":bgBlue200});function resolveAppearance(t,e){const i=t.mouseDown&&t.mouseOver?"down":t.mouseOver?"rollover":"normal";let o=!0;switch(e.fieldType){case"CheckBoxField":o=e.value!==e.checkBoxOnValue;break;case"RadioButtonField":o=e.value!==t.pdfWidget.radioButtonOption}let r=t.pdfWidget.appearances.find((t=>t.userStateString==i&&t.appearanceStateString==(o?"off":"on")));return r&&r.html||(t.logger.debug("did not find appearance matching userState",i,"and field state =",o?"off":"on"),r=t.pdfWidget.appearances.find((t=>"normal"==t.userStateString&&t.appearanceStateString==(o?"off":"on")))),r&&r.html||(t.logger.debug("did not find normal appearance matching field state =",o?"off":"on"),r=t.pdfWidget.appearances[0]),r}const renderWidget=(t,e,i)=>{const o=resolveAppearance(t,e);return h("div",{ref:e=>t.setDivElement(e),onClick:e=>t.click(e),draggable:t.isEditing(),class:"absolute z-40 opacity-100 overflow-hidden",style:i},h("div",{class:"tc-widget-appearance","data-user":o.userStateString,"data-state":o.appearanceStateString,innerHTML:o.html||void 0}))},bgOrange400="rgb(251 146 60)",getDraggingGhostStyle=t=>e=>({top:"-4000px",width:t.pdfWidget.width*e.zoomFactor+"px",height:t.pdfWidget.height*e.zoomFactor+"px",cursor:t.isEditing()?"move":void 0,"z-index":t.selected?"60":void 0,"background-color":t.selected?bgOrange400:void 0}),renderDraggingGhost=(t,e)=>h("div",{ref:e=>t.setDraggingGhost(e),class:"absolute z-40 bg-orange-200 opacity-40 overflow-hidden",style:getDraggingGhostStyle(t)(e)}),pdfWidgetBaseCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.block{display:block}:host{display:block}.static{position:static}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.mr-2{margin-right:.5rem}.flex{display:flex}.h-8{height:2rem}.w-8{width:2rem}.flex-shrink-0{flex-shrink:0}.animate-spin{animation:spin 1s linear infinite}.items-center{align-items:center}.fill-blue-600{fill:#2563eb}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.resize{resize:both}.border{border-width:1px}.absolute{position:absolute}.z-50{z-index:50}.border-spacing-1{--tw-border-spacing-x:0.25rem;--tw-border-spacing-y:0.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-2{border-width:2px}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.visible{visibility:visible}.relative{position:relative}.inset-0{inset:0}.-bottom-\\[2rem\\]{bottom:-2rem}.left-1\\/2{left:50%}.mb-16{margin-bottom:4rem}.hidden{display:none}.w-fit{width:fit-content}.flex-auto{flex:1 1 auto}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.font-\\[Arial\\]{font-family:Arial}.text-sm{font-size:.875rem;line-height:1.25rem}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.z-40{z-index:40}.opacity-100{opacity:1}.bg-orange-200{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity))}.opacity-40{opacity:.4}',PdfWidgetBaseStyle0=pdfWidgetBaseCss,PdfWidgetBase=class{constructor(t){registerInstance(this,t),this.onClick=createEvent(this,"onClick",7),this.divElement=void 0,this.draggingGhost=void 0,this.logger=createLogger("PdfWidgetBase"),this.mouseDown=!1,this.mouseOver=!1,this.isEditing=()=>{var t;return(null===(t=this.viewerStore)||void 0===t?void 0:t.state.userMode)==userModeEditPlaceholder},this.debugUserMode=()=>{var t;if(null===(t=this.viewerStore)||void 0===t?void 0:t.state.debugUserMode)return this.isEditing()?"2px dashed blue":"2px dashed red"},this.click=t=>{var e;this.logger.debug("click",t),(null===(e=this.field)||void 0===e?void 0:e.readOnly)||this.isEditing()||(this.hasFocus=!0),this.onClick.emit(t)},this.getWidgetState=()=>this.isEditing()?"edit":this.hasFocus?"focus":"view",this.viewerStore=null,this.pageIndex=-1,this.documentStore=null,this.pdfWidget=void 0,this.widgetDivStyles=void 0,this.pdfPage=void 0,this.field=null,this.hasFocus=!1,this.isDragged=!1,this.widgetsRevision=-1}componentWillRender(){var t,e,i,o,r;this.logger.debug("componentWillRender"),this.field=(null===(o=null===(i=null===(e=null===(t=this.documentStore)||void 0===t?void 0:t.state)||void 0===e?void 0:e.pdfFields)||void 0===i?void 0:i.value)||void 0===o?void 0:o.find((t=>t.fullName==this.pdfWidget.fieldName)))||null,null===(r=this.documentStore)||void 0===r||r.onChange("widgetsRevisions",(t=>{this.widgetsRevision=t[this.pageIndex]}))}mouseDownHandler(t){this.mouseDown=!0,this.logger.debug("mouseDown, ev target=",t.target)}mouseUpHandler(t){this.mouseDown=!1}mouseOverHandler(t){this.isEditing()||(this.mouseOver=!0,this.mouseDown=0!=t.buttons)}mouseOutHandler(t){this.isEditing()||(this.mouseOver=!1,this.mouseDown=0!=t.buttons)}dragStartHandler(t){var e;if(!this.isEditing())return;this.isDragged=!0;const i=(null===(e=this.viewerStore)||void 0===e?void 0:e.state.zoomFactor)||1;setDragEventData(t,this.top,this.pdfWidget,this.draggingGhost||null,i)}dragEndHandler(){this.isDragged=!1}setDivElement(t){this.divElement=t}top(){const t=this.pdfPage;return(t&&pageHeight(t)||0)-this.pdfWidget.bottom-this.pdfWidget.height}setDraggingGhost(t){this.draggingGhost=t}render(){var t;if(!this.field)return null;const e=this.isEditing()?"both":"none",i=this.debugUserMode(),o=Object.assign(Object.assign(Object.assign({},getWidgetDivStyle(this)),this.widgetDivStyles),{resize:e,border:i});if(!this.viewerStore)return null;const r=null===(t=this.viewerStore)||void 0===t?void 0:t.state;return h(Host,null,renderWidget(this,this.field,o),renderDraggingGhost(this,r),h("slot",null))}};PdfWidgetBase.style=PdfWidgetBaseStyle0;export{PdfWidgetBase as pdf_widget_base}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host}from"./index-bc1ec980.js";const pdfZoomButtonCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}:host{display:inline-block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomButtonStyle0=pdfZoomButtonCss,PdfZoomButton=class{constructor(t){registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default",this.zoom=void 0}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=>h("button",{type:"button",onClick:()=>t.zoomFactor=this.zoom},h("slot",null)))(this.viewerStore.state)))}};PdfZoomButton.style=PdfZoomButtonStyle0;export{PdfZoomButton as pdf_zoom_button}; | ||
import{r as registerInstance,h,H as Host}from"./index-ad2fce19.js";const pdfZoomButtonCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}:host{display:inline-block}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomButtonStyle0=pdfZoomButtonCss,PdfZoomButton=class{constructor(t){registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default",this.zoom=void 0}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=>h("button",{type:"button",onClick:()=>t.zoomFactor=this.zoom},h("slot",null)))(this.viewerStore.state)))}};PdfZoomButton.style=PdfZoomButtonStyle0;export{PdfZoomButton as pdf_zoom_button}; |
@@ -1,1 +0,1 @@ | ||
import{r as registerInstance,h,H as Host}from"./index-bc1ec980.js";const pdfZoomControlCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.flex{display:flex}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomControlStyle0=pdfZoomControlCss,PdfZoomControl=class{constructor(t){registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default"}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=this.viewerStore.state,h("div",{class:"flex"},[.25,.5,1,2,4].map((o=>h("button",{key:o,type:"button",class:{btn:!0,"!bg-blue-700":o==t.zoomFactor},onClick:()=>t.zoomFactor=o},100*o,"%")))))));var t}};PdfZoomControl.style=PdfZoomControlStyle0;export{PdfZoomControl as pdf_zoom_control}; | ||
import{r as registerInstance,h,H as Host}from"./index-ad2fce19.js";const pdfZoomControlCss='*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}.mr-2{margin-right:.5rem}.block{display:block}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.p-2{padding:.5rem}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}:host{display:block}.btn{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(153 0 0/var(--tw-bg-opacity));border-radius:.5rem;border-width:1px;color:rgb(255 255 255/var(--tw-text-opacity));margin-right:.5rem;padding:.5rem}.static{position:static}.flex{display:flex}.\\!bg-blue-700{--tw-bg-opacity:1!important;background-color:rgb(29 78 216/var(--tw-bg-opacity))!important}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}',PdfZoomControlStyle0=pdfZoomControlCss,PdfZoomControl=class{constructor(t){registerInstance(this,t),this.viewerStore=null,this.pdfdoc="default",this.pdfviewer="default"}render(){return h(Host,null,h("pdf-store-wrapper",{pdfdoc:this.pdfdoc,pdfviewer:this.pdfviewer,viewerStoreLoaded:t=>this.viewerStore=t},this.viewerStore&&(t=this.viewerStore.state,h("div",{class:"flex"},[.25,.5,1,2,4].map((o=>h("button",{key:o,type:"button",class:{btn:!0,"!bg-blue-700":o==t.zoomFactor},onClick:()=>t.zoomFactor=o},100*o,"%")))))));var t}};PdfZoomControl.style=PdfZoomControlStyle0;export{PdfZoomControl as pdf_zoom_control}; |
@@ -1,1 +0,1 @@ | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-bc1ec980.js";export{s as setNonce}from"./index-bc1ec980.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";const patchBrowser=()=>{const e=import.meta.url,d={};return""!==e&&(d.resourcesUrl=new URL(".",e).href),promiseResolve(d)};patchBrowser().then((async e=>(await globalScripts(),bootstrapLazy([["pdf-store-wrapper",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); | ||
import{p as promiseResolve,b as bootstrapLazy}from"./index-ad2fce19.js";export{s as setNonce}from"./index-ad2fce19.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";const patchBrowser=()=>{const e=import.meta.url,d={};return""!==e&&(d.resourcesUrl=new URL(".",e).href),promiseResolve(d)};patchBrowser().then((async e=>(await globalScripts(),bootstrapLazy([["pdf-store-wrapper",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["pdf-pages",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["pdf-thumbnails",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-bookmarks",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-layers",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-sidebar",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["pdf-uploader",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["pdf-zoom-button",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["pdf-zoom-control",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["pdf-application",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["pdf-document",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["pdf-spinner",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["pdf-widget-base",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["pdf-page",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["pdf-thumbnail",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["pdf-overlay_8",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); |
@@ -1,1 +0,1 @@ | ||
export declare const LIB_VERSION = "1.2.12"; | ||
export declare const LIB_VERSION = "1.2.13-b0edaebc"; |
@@ -1,1 +0,1 @@ | ||
import{G as s}from"./p-80c4330f.js";export{A as ApiEmpty,c as ApiError,a as ApiLoading,b as ApiResult,H as HttpCodes,d as HttpError,N as NewPdfDocument,e as NewPdfDocumentInfo,m as PageMode,P as PageRotate,U as UserMode,l as devicePointToPage,p as pageBottom,f as pageHeight,g as pageLeft,h as pageRight,i as pageTop,j as pageWidth,r as rotate,t as translateX,k as translateY}from"./p-80c4330f.js";export{b as createCheckBoxFieldState,c as createPdfFieldState,a as createTextFieldState,f as fieldIsChecked}from"./p-c3d1c7db.js";import"./p-a6a9bfea.js";const o=(s,o)=>"text"==o?v(s):n(s),n=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),v=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),u={settings:{logger:s}};export{u as UnoPdf,n as createCheckBoxWidgetState,o as createPdfWidgetState,v as createTextWidgetState}; | ||
import{G as s}from"./p-24ee0eb4.js";export{A as ApiEmpty,c as ApiError,a as ApiLoading,b as ApiResult,H as HttpCodes,d as HttpError,N as NewPdfDocument,e as NewPdfDocumentInfo,m as PageMode,P as PageRotate,U as UserMode,l as devicePointToPage,p as pageBottom,f as pageHeight,g as pageLeft,h as pageRight,i as pageTop,j as pageWidth,r as rotate,t as translateX,k as translateY}from"./p-24ee0eb4.js";export{b as createCheckBoxFieldState,c as createPdfFieldState,a as createTextFieldState,f as fieldIsChecked}from"./p-c3d1c7db.js";import"./p-f5d373a7.js";const o=(s,o)=>"text"==o?v(s):n(s),n=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Courier",fontSize:12,height:18,index:0,left:0,widgetType:"checkbox",width:18,appearances:[{userStateString:"normal",appearanceStateString:"off",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 18px; height: 18px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform: matrix(1,0,0,-1,0,18)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; "><svg style="position:absolute"><defs><clipPath id="Clip1"><path d="M 0 0 L 18 0 L 18 18 L 0 18 Z Z" clip-rule="nonzero"></path></clipPath></defs></svg><div class="shape "><svg style="position:absolute;overflow:visible;clip-path:url(#Clip1)" width="1em" height="1em"><path transform="matrix(1,0,0,1,0.5,0.5)" d="M 0 0 M 0 0 L 17 0 L 17 17 L 0 17 Z Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10"></path></svg></div><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,2,15.715)"><div class="shape "><div style="position:absolute; "><div class="shape "><div style="position:absolute; transform:matrix(1,0,0,1,1.101,-13.429)"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path transform="matrix(0.01395,0,0,0.01395,0,1.994)" d="M 811 679 C 811 701 805 706 782 706 C 763 706 755 703 738 690 C 656 625 609 583 519 490 C 457 425 413 382 392 362 C 338 311 307 282 298 273 C 290 265 281 260 275 260 C 273 260 265 263 258 268 C 246 275 242 283 239 305 C 233 346 228 373 226 384 C 221 412 217 442 218 444 C 218 464 215 469 201 478 C 193 484 183 487 174 487 C 160 487 135 483 122 478 C 106 472 99 466 67 427 C 42 396 42 396 41 385 C 40 376 36 317 36 307 C 36 284 38 258 43 226 C 50 169 58 106 56 104 C 58 80 60 73 70 62 C 85 45 104 29 124 15 C 157 -8 171 -14 193 -14 C 211 -14 228 -3 270 33 C 371 120 574 320 642 397 C 717 484 768 541 784 555 C 799 570 809 580 810 585 L 811 667 L 811 679 Z" stroke="none" fill="rgb(0,0,0)" fill-rule="nonzero"></path></svg></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>'},{userStateString:"rollover",appearanceStateString:"off",html:null},{userStateString:"rollover",appearanceStateString:"on",html:null},{userStateString:"down",appearanceStateString:"off",html:null},{userStateString:"down",appearanceStateString:"on",html:null}],newWidget:!1,invisible:!1}),v=s=>({borderColor:{R:0,G:0,B:0},borderStyle:"solid",bottom:0,checkMarkStyle:"check",fieldName:s,radioButtonOption:"",fontName:"Helvetica",fontSize:0,height:22,index:0,left:0,widgetType:"text",width:150,appearances:[{userStateString:"normal",appearanceStateString:"on",html:'<div class="tc-widget-appearance" style="position: absolute; width: 150px; height: 22px; background-color: transparent;"><div class="content" style="position: absolute;line-height: 1.15;"><div style="transform:matrix(1,0,0,-1,0,22)"><div class="shape "><div style="position:absolute;"><div class="shape "><svg style="position:absolute;overflow:visible;" width="1em" height="1em"><path d="M 0.5 0.5 L 149.5 0.5 L 149.5 21.5 L 0.5 21.5 Z" stroke="rgb(0,0,0)" stroke-width="1" fill="none" stroke-miterlimit="10" /></svg></div></div></div></div></div></div>'}],newWidget:!1,invisible:!1}),u={settings:{logger:s}};export{u as UnoPdf,n as createCheckBoxWidgetState,o as createPdfWidgetState,v as createTextWidgetState}; |
@@ -1,1 +0,1 @@ | ||
import{p as e,b as d}from"./p-a6a9bfea.js";export{s as setNonce}from"./p-a6a9bfea.js";import{g as o}from"./p-e1255160.js";const t=()=>{const d=import.meta.url,o={};return""!==d&&(o.resourcesUrl=new URL(".",d).href),e(o)};t().then((async e=>(await o(),d([["p-f65c30c6",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["p-8b525158",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["p-aacd5e57",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-54dc0dc8",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-9dcf1fb7",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-32d817f4",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["p-2d442c11",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-5f0ccac5",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["p-c5597bfe",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["p-d57f90f4",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["p-c9236651",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["p-9d89cd8a",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["p-a8fd2796",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["p-4800a9a6",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["p-6fc36892",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["p-58a65e88",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); | ||
import{p as e,b as d}from"./p-f5d373a7.js";export{s as setNonce}from"./p-f5d373a7.js";import{g as o}from"./p-e1255160.js";const t=()=>{const d=import.meta.url,o={};return""!==d&&(o.resourcesUrl=new URL(".",d).href),e(o)};t().then((async e=>(await o(),d([["p-a7cb0682",[[1,"pdf-store-wrapper",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],documentStoreLoaded:[16],viewerStoreLoaded:[16]}]]],["p-80b1e5c9",[[1,"pdf-pages",{document:[1],name:[1],pageMode:[1,"page-mode"],debugUserMode:[4,"debug-user-mode"],showCustomWidget:[16],focusWidget:[16],documentStore:[32],viewerStore:[32],zoom:[64],gotoPage:[64],setPageMode:[64],getPageMode:[64],getZoomFactor:[64],getPageIndex:[64],setHighlightFields:[64],toggleLayer:[64],setUserMode:[64],getUserMode:[64],addImage:[64],addText:[64],getFocusWidget:[64]}]]],["p-e0b6c5da",[[1,"pdf-thumbnails",{document:[1],pagesviewer:[1],direction:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-7ed1ae15",[[1,"pdf-bookmarks",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f080272e",[[1,"pdf-layers",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32]}]]],["p-f30495c6",[[1,"pdf-sidebar",{document:[1],documentStore:[32],viewerStore:[32]}]]],["p-1167a2bf",[[1,"pdf-uploader",{document:[1],pagesviewer:[1],documentStore:[32],viewerStore:[32],isDraggingOver:[32]},[[1,"dragleave","dragLeaveHandler"],[1,"dragover","dragOverHandler"],[1,"dragenter","dragEnterHandler"],[1,"dragend","dragEndHandler"],[1,"drop","dropHandler"]]]]],["p-59bf0356",[[1,"pdf-zoom-button",{pdfdoc:[1],pdfviewer:[1],zoom:[2],viewerStore:[32]}]]],["p-381a3564",[[1,"pdf-zoom-control",{pdfdoc:[1],pdfviewer:[1],viewerStore:[32]}]]],["p-983c021d",[[1,"pdf-application",{publickey:[1],privatekey:[1],apiBaseUrl:[1,"api-base-url"],sessionsurl:[1],authenticated:[32],versionInfo:[32],getAbout:[64],getDocuments:[64],deleteDocument:[64],deleteDocuments:[64],createDocument:[64]}]]],["p-d146a709",[[1,"pdf-document",{name:[1],pdfid:[1],open:[64],openFile:[64],download:[64],downloadAs:[64],getSummary:[64],getFields:[64],getFormData:[64],setFormData:[64],setOptions:[64],new:[64],close:[64],save:[64]}]]],["p-f314f0ab",[[1,"pdf-spinner",{showText:[4,"show-text"]}]]],["p-d04e1157",[[1,"pdf-widget-base",{viewerStore:[16],pageIndex:[2,"page-index"],documentStore:[16],pdfWidget:[16],widgetDivStyles:[16],pdfPage:[16],field:[32],hasFocus:[32],isDragged:[32],widgetsRevision:[32]},[[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mouseover","mouseOverHandler"],[1,"mouseout","mouseOutHandler"],[1,"dragstart","dragStartHandler"],[1,"dragend","dragEndHandler"]]]]],["p-68dedbbb",[[1,"pdf-page",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentId:[1,"document-id"],pdfPage:[16],rectangleSelect:[16],showCustomWidget:[16],setFocusWidget:[16],documentStore:[32],viewerStore:[32],inView:[32],debugShouldLoad:[32],layerRevision:[32],htmlContent:[32]}]]],["p-4dfd6d19",[[1,"pdf-thumbnail",{documentId:[1,"document-id"],pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],documentStore:[32],viewerStore:[32],isDraggingOver:[32],isDragged:[32],inView:[32],debugShouldLoad:[32],thumbnailData:[32],loadFailed:[32]}]]],["p-29865889",[[1,"pdf-widgets",{pdfdoc:[1],pdfviewer:[1],pageindex:[2],pdfPage:[16],showCustomWidget:[16],setFocusWidget:[16],viewerStore:[32],documentStore:[32],widgets:[32],selectedPdfWidget:[32],focusWidgetIndex:[32],renderCustomWidget:[32]},[[0,"click","onClickHandler"]]],[1,"pdf-overlay",{images:[16],texts:[16],pageInfo:[16],pageIndex:[2,"page-index"],width:[2],height:[2],userMode:[1,"user-mode"],origin:[16],p:[16],rectangleSelect:[16]},[[1,"mousedown","onMouseDownHandler"],[1,"mousemove","onMouseMoveHandler"],[1,"mouseup","onMouseUpHandler"],[0,"keydown","onKeyDownHandler"]]],[1,"pdf-widget-checkbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-listbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],size:[2],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],fieldValue:[32]}],[1,"pdf-widget-multilinetextbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}],[1,"pdf-widget-radiobutton",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-signature",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],pdfPage:[16],viewerStore:[32],documentStore:[32],rerenderState:[32]}],[1,"pdf-widget-textbox",{pdfdoc:[1],pdfviewer:[1],pageIndex:[2,"page-index"],pdfWidget:[16],selected:[4],type:[1],pdfPage:[16],hasFocus:[4,"has-focus"],isDragged:[32],viewerStore:[32],documentStore:[32],textFieldValue:[32]}]]]],e)))); |
{ | ||
"name": "@tallcomponents/unopdf-core", | ||
"//": "below 'version' is set automatically using the bump-versions ci workflow", | ||
"version": "1.2.12", | ||
"version": "1.2.13-b0edaebc", | ||
"author": "TallComponents <info@tallcomponents.com>", | ||
@@ -6,0 +6,0 @@ "homepage": "https://unopdf.tallcomponents.com", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1984805
25