UNPKG

captide

Version:

Get hundreds of thousands of financial documents into your AI app πŸš€

1 lines β€’ 397 kB
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=t(e),n=function(){return n=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},n.apply(this,arguments)};function s(e,t,r,a){return new(r||(r=Promise))((function(n,s){function i(e){try{c(a.next(e))}catch(e){s(e)}}function o(e){try{c(a.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,o)}c((a=a.apply(e,t||[])).next())}))}function i(e,t){var r,a,n,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=o(0),i.throw=o(1),i.return=o(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,o[0]&&(s=0)),s;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,a=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function o(e,t,r){if(r||2===arguments.length)for(var a,n=0,s=t.length;n<s;n++)!a&&n in t||(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var c=["10-K","10-Q","8-K","transcript","DEF 14A","DEFM14A","DEF 14C","DEFM14C","20-F","40-F","6-K","S-1","ir"],l={document:null,highlightedElementId:null,isLoading:!1,isOpen:!1,tabs:[],zoomLevel:1},f=e.createContext(void 0);function u(e){try{var t=new URL(e).searchParams.get("sourceType");if(!t)return"ir";var r=t.toUpperCase();if(c.includes(t))return t;var a=c.find((function(e){return e.toUpperCase()===r}));return a||"ir"}catch(e){return"ir"}}function h(e){try{var t=new URL(e).searchParams.get("fileType");return"pdf"===t||"xlsx"===t?t:void 0}catch(e){return}}function d(e,t){if(void 0===t&&(t=null),!e||"object"!=typeof e)throw new Error("Invalid document provided to convertToInternalDocument");e.sourceType||(e.sourceType="ir"),e.sourceLink||(e.sourceLink="unknown");var r="ir";if(c.includes(e.sourceType))r=e.sourceType;else{var a=e.sourceType.toUpperCase(),s=c.find((function(e){return e.toUpperCase()===a}));s&&(r=s)}var i=n(n({},e),{sourceType:r});if(i.sasUrl){var o=i.sasUrl;return o&&o.includes("sig=")&&(o.includes("se=")||o.includes("sp=")),{sourceLink:i.sourceLink,sourceType:i.sourceType,date:i.date||null,htmlContent:"",ticker:i.ticker||"",fiscalPeriod:i.fiscalPeriod||null,companyName:i.companyName||"",highlightedElementId:t,fileType:i.fileType||((i.fileName||"").toLowerCase().endsWith(".pdf")?"pdf":"xlsx"),contentType:i.contentType||((i.fileName||"").toLowerCase().endsWith(".pdf")?"application/pdf":(i.fileName||"").toLowerCase().endsWith(".xlsx")?"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"application/octet-stream"),fileName:i.fileName,sasUrl:i.sasUrl,metadata:i.metadata||{}}}return n(n({},i),{highlightedElementId:t})}f.displayName="DocumentViewerContext";var p=function(){var t=e.useContext(f);if(void 0===t)throw new Error("useDocumentViewer must be used within a DocumentViewerProvider. Make sure you have wrapped your application or component with <DocumentViewerProvider>.</DocumentViewerProvider>");return t},m="undefined"!=typeof process&&void 0!==process.env&&"undefined"!=typeof require,g=function(e,t){void 0===t&&(t={ssr:!0});var r=t.ssr,n=void 0===r||r,s=t.loading;if(m)try{return(0,require("next/dynamic").default)(e,{ssr:n,loading:s?function(){return a.default.createElement(s)}:void 0})}catch(e){}return a.default.lazy(e)};function v(e,t,r,a){void 0===r&&(r=window.location.origin),void 0===a&&(a="/document-viewer"),r.endsWith("/")&&(r=r.slice(0,-1)),a.startsWith("/")||(a="/"+a);var n=new URL("".concat(r).concat(a));return n.searchParams.append("sourceLink",encodeURIComponent(e)),t&&n.searchParams.append("elementId",t),n.toString()}var b=function(t){var r=t.isVisible,n=t.position,o=t.sourceLink,c=t.elementId,l=t.baseUrl,f=t.onClose,u=t.buttonColor,h=void 0===u?"#2563eb":u,d=t.viewerRoutePath,p=void 0===d?"document-viewer":d,m=e.useState(!1),g=m[0],b=m[1],w=v(o,c,l,p);if(!r)return null;var E;E=h.replace("#",""),parseInt(E.substring(0,2),16),parseInt(E.substring(2,4),16),parseInt(E.substring(4,6),16);return a.default.createElement("div",{className:"absolute z-50 bg-white rounded-lg shadow-xl border border-gray-200 p-3 w-80 shareable-link-tooltip-container",style:{left:"".concat(n.x,"px"),top:"".concat(n.y,"px"),transform:"translateX(-25%)"}},a.default.createElement("div",{className:"absolute w-4 h-4 bg-white border-t border-l border-gray-200 transform rotate-45",style:{top:"-2px",left:"25%",marginLeft:"-2px"}}),a.default.createElement("div",{className:"flex items-center justify-between mb-2"},a.default.createElement("div",{className:"flex items-center"},a.default.createElement("svg",{className:"w-4 h-4 mr-2",style:{color:h},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),a.default.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})),a.default.createElement("span",{className:"text-sm font-medium"},"Share this highlight")),a.default.createElement("button",{className:"text-gray-400 hover:text-gray-600 transition-colors",onClick:f,"aria-label":"Close"},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),a.default.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})))),a.default.createElement("div",{className:"text-xs text-gray-500 mb-2"},"Anyone with this link can view this highlighted section:"),a.default.createElement("div",{className:"flex items-center"},a.default.createElement("input",{type:"text",value:w,readOnly:!0,className:"flex-1 p-2 text-sm border rounded-l-md bg-gray-50 text-gray-700 overflow-hidden text-ellipsis focus:outline-none"}),a.default.createElement("button",{onClick:function(){return s(void 0,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(w)];case 1:return e.sent(),b(!0),setTimeout((function(){b(!1)}),2e3),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}}))}))},className:"px-3 py-2 rounded-r-md text-sm font-medium ".concat("text-white"," transition-colors"),style:{backgroundColor:g?"#10B981":h}},g?a.default.createElement("div",{className:"flex items-center"},a.default.createElement("svg",{className:"w-4 h-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("polyline",{points:"20 6 9 17 4 12"})),a.default.createElement("span",null,"Copied")):a.default.createElement("div",{className:"flex items-center"},a.default.createElement("svg",{className:"w-4 h-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),a.default.createElement("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})),a.default.createElement("span",null,"Copy")))))},w=function(e){var t=(new DOMParser).parseFromString(e,"text/html"),r=Array.from(t.querySelectorAll('div[style*="padding-top:2em"]'));if(0===r.length)return e;var a="<html><head><style>";return a+="\n .page-container {\n margin-bottom: 20px;\n padding: 10px;\n border: 1px solid #ddd;\n background-color: white;\n position: relative;\n }\n .page-highlighted {\n outline: 4px solid yellow;\n outline-offset: -4px;\n }\n .page-number {\n position: absolute;\n top: 5px;\n right: 5px;\n background-color: rgba(0,0,0,0.1);\n padding: 2px 8px;\n border-radius: 10px;\n font-size: 12px;\n z-index: 1000;\n }\n ",a+='</style></head><body><div id="document-pages-wrapper">',r.forEach((function(e,t){a+='<div class="page-container" data-page="'.concat(t,'">'),a+='<div class="page-number">'.concat(t+1,"</div>"),a+=e.outerHTML,a+="</div>"})),a+="</div></body></html>"},E=function(e){var t=e.toUpperCase();return"20-F"===t||"40-F"===t||"6-K"===t||"S-1"===t},T=function(e,t,r,a,n){if(n&&e.current&&e.current.contentDocument){var o=e.current.contentDocument,c=e.current.contentWindow;if(o&&c){o.querySelectorAll(".shareable-link-button").forEach((function(e){return e.remove()}));var l=o.getElementById("shareable-link-button-styles");l||((l=o.createElement("style")).id="shareable-link-button-styles",o.head.appendChild(l)),l.textContent="\n .shareable-link-button {\n position: absolute !important;\n top: -10px !important;\n left: 5px !important;\n width: 28px !important;\n height: 28px !important;\n min-width: 28px !important;\n min-height: 28px !important;\n background-color: ".concat(t," !important;\n color: white !important;\n border-radius: 50% !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n cursor: pointer !important;\n border: 2px solid white !important;\n z-index: 100000 !important;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background-color 0.2s ease !important;\n pointer-events: auto !important;\n opacity: 0 !important;\n visibility: hidden !important;\n }\n \n /* Show the button when hovering over ANY highlighted element */\n .highlighted:hover ~ .shareable-link-button,\n .highlighted:hover .shareable-link-button,\n .page-highlighted:hover .shareable-link-button {\n opacity: 0.9 !important;\n visibility: visible !important;\n background-color: ").concat(t," !important;\n }\n \n .shareable-link-button:hover {\n background-color: ").concat("#2563eb"===t?"#1d4ed8":t," !important;\n transform: scale(1.1) !important;\n opacity: 1 !important;\n }\n\n .highlighted {\n position: relative !important;\n padding-left: 5px !important;\n }\n \n .first-highlighted {\n margin-top: 12px !important;\n }\n ");var f=function(e,a,n){void 0===n&&(n=!1),e.style.position="relative";var c=o.createElement("button");c.className="shareable-link-button",c.title=n?"Click to copy link to this page":"Click to copy link to this highlight",c.setAttribute("data-share-id",a),c.style.position="absolute",c.style.top="-10px",c.style.left="5px",c.style.width="24px",c.style.height="24px",c.style.minWidth="24px",c.style.minHeight="24px",c.style.backgroundColor=t,c.style.color="white",c.style.borderRadius="50%",c.style.display="flex",c.style.alignItems="center",c.style.justifyContent="center",c.style.cursor="pointer",c.style.border="2px solid white",c.style.zIndex="100000",c.style.boxShadow="0 2px 4px rgba(0, 0, 0, 0.3)",c.style.opacity="0",c.style.visibility="hidden",c.addEventListener("mouseenter",(function(){c.style.transform="scale(1.1)",c.style.opacity="1",c.style.backgroundColor="#2563eb"===t?"#1d4ed8":t})),c.addEventListener("mouseleave",(function(){c.style.transform="scale(1)",c.style.backgroundColor=t,c.style.opacity="0.9"}));var l=function(e){void 0===e&&(e=!1),c.innerHTML=e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="width: 16px; height: 16px;">\n <polyline points="20 6 9 17 4 12"></polyline>\n </svg>':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" style="width: 16px; height: 16px;">\n <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>\n <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>\n </svg>'};l(),c.addEventListener("click",(function(e){return s(void 0,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return e.stopPropagation(),e.preventDefault(),r?[4,y(r.sourceLink,a)]:[3,2];case 1:n.sent()&&(l(!0),c.style.backgroundColor=t,setTimeout((function(){l(!1),c.style.backgroundColor=t}),2e3)),n.label=2;case 2:return[2]}}))}))})),e.appendChild(c)};if("8-K"!==(null==r?void 0:r.sourceType)){var u=o.querySelectorAll(".highlighted");if(u.length>0){var h=Array.from(u);h.sort((function(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}));var d=h[0];d.classList.add("first-highlighted");var p=d.getAttribute("unique_id")||d.getAttribute("unique-id")||d.getAttribute("id"),m=p?"#".concat(p.replace(/[#\[\]]/g,"")):a;m&&(f(d,m),u.forEach((function(e){e.addEventListener("mouseenter",(function(){var e=d.querySelector(".shareable-link-button");e&&(e.style.visibility="visible",e.style.opacity="0.9")})),e.addEventListener("mouseleave",(function(){var e=d.querySelector(".shareable-link-button");e&&(e.matches(":hover")||(e.style.visibility="hidden",e.style.opacity="0"))}))})))}}else if("8-K"===(null==r?void 0:r.sourceType)){o.querySelectorAll(".page-container.page-highlighted").forEach((function(e){var t=e.getAttribute("data-page");if(null!==t){var r="#f234".concat(t.padStart(4,"0"));f(e,r,!0)}}))}}}},y=function(e,t,r,a){return void 0===a&&(a="document-viewer"),s(void 0,void 0,void 0,(function(){var n;return i(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),n=v(e,t,r,a),[4,navigator.clipboard.writeText(n)];case 1:return s.sent(),[2,!0];case 2:return s.sent(),[2,!1];case 3:return[2]}}))}))},k=function(e){return"\n <html>\n <head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <style>\n html, body { \n margin: 0; \n padding: 0;\n width: 100%;\n height: auto;\n background-color: white;\n }\n \n /* Highlighted elements basic styling */\n .highlighted {\n background-color: yellow !important;\n }\n .highlighted * {\n background-color: transparent !important;\n }\n </style>\n <script>\n // Add resize handler to recalculate document height\n window.addEventListener('resize', function() {\n // Force reflow calculation\n document.body.style.height = 'auto';\n // Inform parent of new height if needed\n if (window.parent && window.parent !== window) {\n const height = document.body.scrollHeight;\n window.parent.postMessage({ type: 'resize', height: height }, '*');\n }\n });\n \n // Initialize height after content is loaded\n document.addEventListener('DOMContentLoaded', function() {\n if (window.parent && window.parent !== window) {\n setTimeout(function() {\n const height = document.body.scrollHeight;\n window.parent.postMessage({ type: 'resize', height: height }, '*');\n }, 200);\n }\n });\n <\/script>\n <base target=\"_blank\">\n </head>\n <body>".concat(e,"</body>\n </html>\n")},x=function(e){if(!e)return null;var t=e.replace("#","");if(8!==t.length)return null;var r=t.slice(-4);return parseInt(r,10)},A=function(e){var t=e.toUpperCase();return["DEF 14A","DEFM14A","DEF 14C","DEFM14C"].includes(t)},S=function(e,t,r,a,n){var s=e.contentDocument;if(s&&(s.querySelectorAll(".highlighted").forEach((function(e){e.classList.remove("highlighted")})),r)){var i=r.replace("#","");setTimeout((function(){var e=s.querySelectorAll('[unique_id*="'.concat(i,'"], [unique-id*="').concat(i,'"], [unique-id*="#').concat(i,'"], [id*="[#').concat(i,']"]'));if(e.length>0){e.forEach((function(e){e.classList.add("highlighted")}));var t=e[0];t&&t.scrollIntoView({behavior:a?"auto":"smooth",block:"center"})}}),a?500:0)}},C=function(t){var r=t.document,s=t.highlightedElementId,i=t.zoomLevel,o=t.className,c=void 0===o?"w-full h-full":o,l=t.style,f=t.enableShareableLinks,u=void 0===f||f,h=t.shareableLinkBaseUrl,d=t.shareableLinkButtonColor,p=void 0===d?"#2563eb":d,m=t.viewerRoutePath,g=void 0===m?"document-viewer":m,v=!!h&&!1!==u,y=e.useRef(null),C=e.useRef(null),_=e.useRef(null);e.useRef(1);var O=e.useState(!1),R=O[0],I=O[1],N=e.useState({x:0,y:0}),L=N[0];N[1];var D=e.useState(null),P=D[0];D[1];var F=e.useState(!0),M=F[0],U=F[1];e.useEffect((function(){var e=y.current;if(e&&r){U(!0);var t,a,n,o=function(){var t=e.contentDocument;if(t){if(E(r.sourceType)){var a=t.createElement("style");if(a.textContent="\n .highlighted {\n background-color: yellow !important;\n }\n .highlighted * {\n background-color: transparent !important;\n }\n .first-highlighted {\n margin-top: 12px !important;\n }\n \n /* Ensure white background */\n html, body {\n background-color: white !important;\n }\n ",t.head.appendChild(a),1!==i){var n=t.createElement("style");n.textContent="\n body {\n transform-origin: top left;\n transform: scale(".concat(i,");\n width: ").concat(100/i,"%;\n }\n "),t.head.appendChild(n)}return function(e,t){var r,a,n,s=e.contentDocument,i=e.contentWindow;if(s&&i&&t){for(var o,c=t.replace("#",""),l=8===c.length&&c.substring(0,4)===c.substring(4,8),f=c.substring(0,4),u=l?f:c.length>=8?c.substring(4,8):f,h=[],d=s.createNodeIterator(s.body,NodeFilter.SHOW_COMMENT,{acceptNode:function(){return NodeFilter.FILTER_ACCEPT}});o=d.nextNode();){var p=null===(r=o.nodeValue)||void 0===r?void 0:r.trim();p&&p.startsWith("[[#")&&p.endsWith("]]")&&h.push({node:o,id:p.substring(3,7)})}if(s.querySelectorAll(".highlighted").forEach((function(e){e.classList.remove("highlighted")})),c.length,f===u||l){var m=h.filter((function(e){return e.id===f}));if(m.length>=2)for(var g=l?2:1,v=0;v<m.length-1;v+=g){var b=m[v],w=v+1<m.length?m[v+1]:null;if(w){for(var E=[],T=b.node.nextSibling;T&&T!==w.node;){if(T.nodeType===Node.ELEMENT_NODE)E.push(T);else if(T.nodeType===Node.TEXT_NODE&&(null===(a=T.textContent)||void 0===a?void 0:a.trim())){var y=s.createElement("span");y.classList.add("highlighted"),null===(n=T.parentNode)||void 0===n||n.insertBefore(y,T),y.appendChild(T),E.push(y),T=y}T=T.nextSibling}if(E.forEach((function(e){e.classList.add("highlighted")})),E.length>0){E[0].scrollIntoView({behavior:"smooth",block:"start"});break}}}}else{var k=h.findIndex((function(e){return e.id===f})),x=h.findIndex((function(e){return e.id===u}));if(-1!==k&&-1!==x){var A=[];h[k].node,h[x].node;var S=function(e){for(var t,r=s.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT,null),a=[];t=r.nextNode();)a.push(t);return a}(s.body),C=S.findIndex((function(e){var t;return e.nodeType===Node.COMMENT_NODE&&(null===(t=e.nodeValue)||void 0===t?void 0:t.trim())==="[[#".concat(f,"]]")})),_=S.findIndex((function(e){var t;return e.nodeType===Node.COMMENT_NODE&&(null===(t=e.nodeValue)||void 0===t?void 0:t.trim())==="[[#".concat(u,"]]")}));if(-1!==C&&-1!==_)for(v=C+1;v<=_;v++){var O=S[v];O&&O.nodeType===Node.ELEMENT_NODE&&A.push(O)}if(A.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&e.classList.add("highlighted")})),A.length>0){var R=A.find((function(e){return e.nodeType===Node.ELEMENT_NODE}));R&&R.scrollIntoView({behavior:"smooth",block:"start"})}}}}}(e,s),T(y,p,r,s,v),void U(!1)}if("8-k"===r.sourceType||(c=r.sourceType,"DEF 14A"===(l=c.toUpperCase())||"DEFM14A"===l||"DEF 14C"===l||"DEFM14C"===l)){var o=t.createElement("style");return o.textContent=function(e){return"\n /* Base container styles with consistent padding */\n html, body {\n transform-origin: top left;\n transform: scale(".concat(e,");\n width: ").concat(100/e,"%;\n overflow-x: hidden;\n margin: 0;\n padding: 0;\n background-color: white;\n }\n \n /* Apply consistent width and padding to pages */\n .page-container, .captide-page {\n width: 100% !important;\n max-width: 100%;\n margin-left: auto !important;\n margin-right: auto !important;\n margin-bottom: 10px;\n padding: 16px !important;\n box-sizing: border-box !important;\n background-color: white;\n border: 1px solid #ddd;\n }\n \n .page-highlighted {\n outline: 4px solid yellow;\n outline-offset: -4px;\n }\n \n /* Styles for proxy statement documents with captide-page markers */\n .captide-page-highlighted {\n outline: 4px solid yellow;\n outline-offset: -4px;\n }\n \n /* Improve table rendering */\n table {\n max-width: 100%;\n table-layout: auto;\n margin-left: auto !important;\n margin-right: auto !important;\n }\n \n /* Highlighted elements */\n .highlighted {\n background-color: yellow !important;\n }\n \n .highlighted * {\n background-color: transparent !important;\n }\n")}(i),t.head.appendChild(o),function(e,t,r){var a=e.contentDocument,n=e.contentWindow;if(a&&n&&("8-K"===t.sourceType.toUpperCase()||A(t.sourceType))&&r){var s=x(r);if(null===s)return;if(A(t.sourceType)){var i=s+1;return void setTimeout((function(){if("function"==typeof n.highlightCaptidePage)n.highlightCaptidePage(i);else{var e=a.querySelectorAll('.captide-page[data-page-number="'.concat(i,'"]'));e.length>0&&(a.querySelectorAll(".captide-page-highlighted").forEach((function(e){e.classList.remove("captide-page-highlighted")})),e[0].classList.add("captide-page-highlighted"),e[0].scrollIntoView({behavior:"smooth",block:"start"}))}}),200)}var o=a.querySelectorAll(".page-container");if(o&&o.length>0){a.querySelectorAll(".page-highlighted").forEach((function(e){e.classList.remove("page-highlighted")}));var c=null,l=Math.min(s,o.length-1);(c=o[l])&&(c.classList.add("page-highlighted"),setTimeout((function(){c&&c.scrollIntoView({behavior:"smooth",block:"start"})}),100))}}}(e,r,s),void U(!1)}var c,l;if("10-k"===r.sourceType.toLowerCase()||"10-q"===r.sourceType.toLowerCase()){var f=t.createElement("style");return f.textContent=function(e){return"\n /* Base container styles */\n html, body {\n transform-origin: top left;\n transform: scale(".concat(e,");\n width: ").concat(100/e,'%;\n overflow-x: hidden;\n margin: 0;\n padding: 0;\n background-color: white;\n }\n \n /* Apply consistent width to direct children of body */\n body > * {\n width: 100% !important;\n max-width: 100%;\n margin-left: auto !important;\n margin-right: auto !important;\n padding-left: 16px !important;\n padding-right: 16px !important;\n box-sizing: border-box !important;\n }\n \n /* Ensure tables are displayed properly */\n table {\n max-width: 100%;\n table-layout: auto;\n margin-left: auto !important;\n margin-right: auto !important;\n }\n \n /* Financial tables should be handled specially */\n .financial-table, \n .ix_hidden, \n .previewer-table,\n table[class*="table"],\n div[class*="table"] {\n width: auto !important;\n max-width: 100%;\n overflow-x: auto;\n }\n \n /* For numeric data columns, preserve formatting */\n td[align="right"], th[align="right"] {\n white-space: nowrap;\n text-align: right;\n }\n \n /* Highlighted elements */\n .highlighted {\n background-color: yellow !important;\n }\n \n .highlighted * {\n background-color: transparent !important;\n }\n \n /* Remove any unwanted margins/padding */\n body p, body div, body section, body article {\n max-width: 100%;\n }\n')}(i),t.head.appendChild(f),S(e,0,s,C.current!==r.sourceLink||_.current!==r.sourceType),T(y,p,r,s,v),void U(!1)}S(e,0,s,C.current!==r.sourceLink||_.current!==r.sourceType);var u=t.createElement("style");u.textContent=function(e){return"\n /* Base container styles */\n html, body {\n transform-origin: top left;\n transform: scale(".concat(e,");\n width: ").concat(100/e,'%;\n max-width: 100%;\n overflow-x: hidden;\n margin: 0;\n padding: 0;\n background-color: white;\n }\n \n /* Apply consistent width to direct children of body */\n body > * {\n width: 100% !important;\n max-width: 100%;\n margin-left: auto !important;\n margin-right: auto !important;\n padding-left: 24px !important;\n padding-right: 24px !important;\n box-sizing: border-box !important;\n }\n \n /* Allow natural wrapping while preventing horizontal overflow */\n body * {\n max-width: 100%;\n box-sizing: border-box;\n font-size: 1.025em; /* Slightly increase text size */\n }\n \n /* Handle tables more naturally */\n table {\n max-width: 100%;\n table-layout: auto;\n width: auto;\n margin-left: auto !important;\n margin-right: auto !important;\n }\n \n /* Allow tables to wrap - less aggressive approach */\n table, thead, tbody, th, td {\n max-width: 100%;\n overflow-wrap: break-word;\n }\n \n /* Financial document tables often need special handling */\n .ix_hidden, .previewer-table, .financial-table {\n max-width: 100%;\n width: auto !important;\n }\n \n /* For numeric data columns, preserve as much as possible */\n td[align="right"], th[align="right"] {\n white-space: nowrap;\n text-align: right;\n }\n \n /* Make images responsive */\n img {\n max-width: 100%;\n height: auto;\n }\n \n /* Highlighted elements */\n .highlighted {\n background-color: yellow !important;\n }\n .highlighted * {\n background-color: transparent !important;\n }\n \n /* Make links visible */\n a {\n color: #2563eb;\n text-decoration: underline;\n }\n')}(i),t.head.appendChild(u);var h=t.createElement("style");h.textContent="\n html, body { \n background-color: white !important;\n }\n ",t.head.appendChild(h),setTimeout((function(){T(y,p,r,s,v),U(!1)}),500)}};return t=r.htmlContent||"",a=r.sourceLink,"8-k"===r.sourceType&&(t=function(e){if(/ex(hibit)?[-_]?99/i.test(e)&&(e.includes(".jpg")||e.includes(".png"))&&e.includes("padding-top:2em;"))return w(e);var t=[/<hr[^>]*style=['"]page-break-after:always['"][^>]*>/gi,/<hr[^>]*style=['"][^"']*page-break[^"']*['"][^>]*>/gi],r=0;t.forEach((function(t){var a=e.match(t)||[];r+=a.length}));var a=e;t.forEach((function(e){a=a.replace(e,"\x3c!-- PAGE_BREAK --\x3e")})),r<2&&[/<div[^>]*class=['"]BRPFPageBreak['"][^>]*>/gi,/<div[^>]*style=['"][^"']*page-break-before:always['"][^>]*>/gi,/<div[^>]*style=['"][^"']*page-break-after:always['"][^>]*>/gi,/<div[^>]*style=['"]min-height:42\.75pt;[^"']*['"][^>]*><div><[^>]*><br><\/[^>]*><\/div><\/div>/gi,/<hr[^>]*noshade[^>]*>/gi].forEach((function(e){(a.match(e)||[]).length>0&&(a=a.replace(e,"\x3c!-- PAGE_BREAK --\x3e"))})),a.includes("\x3c!-- PAGE_BREAK --\x3e")||(a=a.replace(/<hr[^>]*>/gi,"\x3c!-- PAGE_BREAK --\x3e"));var n=a.split("\x3c!-- PAGE_BREAK --\x3e").filter((function(e){return e.trim().length>0})),s="<html><head><style>";return s+="\n .page-container {\n margin-bottom: 20px;\n padding: 10px;\n border: 1px solid #ddd;\n background-color: white;\n position: relative;\n }\n .page-highlighted {\n outline: 4px solid yellow;\n outline-offset: -4px;\n }\n .page-number {\n position: absolute;\n top: 5px;\n right: 5px;\n background-color: rgba(0,0,0,0.1);\n padding: 2px 8px;\n border-radius: 10px;\n font-size: 12px;\n z-index: 1000;\n }\n ",s+='</style></head><body><div id="document-pages-wrapper">',n.forEach((function(e,t){s+='<div class="page-container" data-page="'.concat(t,'">'),s+='<div class="page-number">'.concat(t+1,"</div>"),s+=e,s+="</div>"})),s+="</div></body></html>"}(t)),n=E(r.sourceType)?"\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <base target=\"_blank\">\n <script>\n // Simple resize handler\n window.addEventListener('resize', function() {\n if (window.parent) {\n window.parent.postMessage({ type: 'resize', height: document.body.scrollHeight }, '*');\n }\n });\n \n // Report document height after load\n window.addEventListener('load', function() {\n setTimeout(function() {\n if (window.parent) {\n window.parent.postMessage({ type: 'resize', height: document.body.scrollHeight }, '*');\n }\n }, 100);\n });\n <\/script>\n </head>\n <body>".concat(t,"</body>\n </html>\n "):k(t),C.current!==a||_.current!==r.sourceType?(e.srcdoc=n,C.current=a,_.current=r.sourceType):o(),e.addEventListener("load",o),function(){return e.removeEventListener("load",o)}}}),[r,s,i,v,p]),e.useEffect((function(){var e=setTimeout((function(){T(y,p,r,s,v)}),1e3);return function(){return clearTimeout(e)}}),[s,r,v,p]);var B=function(){I(!1)};e.useEffect((function(){var e=function(e){if(R){var t=window.document.querySelector(".shareable-link-tooltip-container");t&&!t.contains(e.target)&&B()}};return window.document.addEventListener("click",e),function(){window.document.removeEventListener("click",e)}}),[R]),e.useEffect((function(){var e,t=function(e){e.data&&e.data.type};window.addEventListener("message",t);var r=null===(e=y.current)||void 0===e?void 0:e.parentElement;if(r&&window.ResizeObserver){var a=new ResizeObserver((function(){y.current&&y.current.contentWindow&&y.current.contentWindow.dispatchEvent(new Event("resize"))}));return a.observe(r),function(){window.removeEventListener("message",t),a.disconnect()}}return function(){window.removeEventListener("message",t)}}),[]);var W=r?"captide-source-".concat(r.sourceType.toLowerCase().replace(/\s/g,"-")):"",z=r&&r.htmlContent?k(r.htmlContent):"";return a.default.createElement("div",{className:"relative w-full h-full",style:{background:"white"}},a.default.createElement("iframe",{ref:y,srcDoc:z,className:"".concat(c," ").concat(W),style:n(n({},l),{border:"none",opacity:M?0:1,width:"100%",height:"100%",overflow:"auto",background:"white",display:"block",maxWidth:"100%",transition:"opacity 0.3s ease"}),title:"Document Viewer"}),M&&a.default.createElement("div",{className:"absolute inset-0 flex flex-col items-center justify-center",style:{zIndex:10,backgroundColor:"white"}},a.default.createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #f3f3f3",borderTop:"3px solid #475569",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"20px"}}),a.default.createElement("style",null,"\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "),a.default.createElement("div",{className:"text-gray-600 font-medium text-lg mb-2"},"Loading document..."),a.default.createElement("div",{className:"text-gray-400 text-sm"},"Preparing content")),v&&h&&a.default.createElement(b,{isVisible:R,position:L,sourceLink:null==r?void 0:r.sourceLink,elementId:P,baseUrl:h,onClose:B,buttonColor:p,viewerRoutePath:g}))},_=g((function(){return Promise.resolve().then((function(){return D}))}),{ssr:!1}),O=g((function(){return Promise.resolve().then((function(){return nl}))}),{ssr:!1}),R=function(e){var t=e.zoomIn,r=e.zoomOut;return a.default.createElement("div",{className:"bg-white flex items-center",style:{padding:"1px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",border:"1px solid #cbd5e1",borderRadius:"4px",position:"absolute",bottom:"15px",right:"14px",zIndex:10,height:"32px"}},a.default.createElement("button",{onClick:r,"aria-label":"Zoom out",style:{fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"3px",cursor:"pointer",padding:"4px",backgroundColor:"#f1f5f9",color:"#475569",border:"1px solid #cbd5e1",height:"26px",width:"26px",minWidth:"26px",margin:"2px"}},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))),a.default.createElement("button",{onClick:t,"aria-label":"Zoom in",style:{fontSize:"12px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"3px",cursor:"pointer",padding:"4px",backgroundColor:"#f1f5f9",color:"#475569",border:"1px solid #cbd5e1",height:"26px",width:"26px",minWidth:"26px",margin:"2px"}},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),a.default.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))))},I=function(e){var t=e.onClick,r=e.label,s=void 0===r?"Download":r,i=e.style,o=void 0===i?{}:i,c=e.className,l=void 0===c?"":c,f=e.primary,u=void 0!==f&&f,h=n({padding:"6px 12px",borderRadius:"4px",cursor:"pointer",fontWeight:"bold",display:"flex",alignItems:"center",gap:"4px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",transition:"background-color 0.2s ease",fontSize:"12px"},o),d=n(n({},h),{backgroundColor:"#475569",color:"#ffffff",border:"1px solid #475569"}),p=n(n({},h),{backgroundColor:"#f1f5f9",color:"#475569",border:"1px solid #cbd5e1"}),m=u?d:p;return a.default.createElement("button",{onClick:t,style:m,className:l,onMouseOver:function(e){e.currentTarget.style.backgroundColor=u?"#3f4a5c":"#e2e8f0"},onMouseOut:function(e){e.currentTarget.style.backgroundColor=u?"#475569":"#f1f5f9"},title:"Download ".concat(s)},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.default.createElement("polyline",{points:"7 10 12 15 17 10"}),a.default.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"})),s)},N=function(e){var t=e.currentPage,r=e.totalPages,s=e.style,i=void 0===s?{}:s,o=e.className,c=void 0===o?"":o,l=n({padding:"6px 12px",backgroundColor:"white",color:"#475569",border:"1px solid #cbd5e1",borderRadius:"4px",fontSize:"12px",fontWeight:500,boxShadow:"0 1px 2px rgba(0, 0, 0, 0.05)",display:"inline-flex",alignItems:"center"},i);return a.default.createElement("div",{style:l,className:c},"Page ",t," of ",r)},L=function(e){var t=e.className,r=void 0===t?"w-full h-full":t,s=e.style;return a.default.createElement("div",{className:r,style:n(n({},s),{display:"flex",alignItems:"center",justifyContent:"center",padding:"20px",background:"#f5f5f5",color:"#666"})},"PDF viewer loading...")},D=Object.freeze({__proto__:null,default:function(t){var n=t.sasUrl,o=t.className,c=void 0===o?"w-full h-full":o,l=t.style,f=t.zoomLevel,u=void 0===f?1:f,h=t.highlightedElementId,d=void 0===h?null:h,p=e.useRef(null),m=e.useState(!0),g=m[0],v=m[1],b=e.useState(null),w=b[0],E=b[1],T=e.useState(0),y=T[0],k=T[1],A=e.useState(1),S=A[0],C=A[1],_=e.useState(!1),O=_[0],R=_[1],D=e.useState(null),P=D[0],F=D[1],M="undefined"!=typeof window,U=function(){n&&fetch(n).then((function(e){if(!e.ok)throw new Error("Network response was not ok");return e.blob()})).then((function(e){var t=window.URL.createObjectURL(e),r=document.createElement("a");r.href=t;var a="document.pdf";try{var s=new URL(n).pathname.split("/"),i=s[s.length-1];i&&i.includes(".pdf")&&(a=decodeURIComponent(i.split("?")[0]))}catch(e){}r.download=a,document.body.appendChild(r),r.click(),window.URL.revokeObjectURL(t),document.body.removeChild(r)})).catch((function(e){window.open(n,"_blank")}))};return e.useEffect((function(){if(M){var e=!0;return s(void 0,void 0,void 0,(function(){var t,a,n,s,o,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,Promise.resolve().then((function(){return r(require("pdfjs-dist"))}))];case 1:return t=i.sent(),[4,Promise.resolve().then((function(){return r(require("pdfjs-dist"))}))];case 2:a=i.sent().GlobalWorkerOptions,n="https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(t.version,"/build/pdf.worker.min.mjs"),a.workerSrc=n;try{(s=document.createElement("link")).rel="preload",s.as="script",s.href=n,document.head.appendChild(s)}catch(e){}return document.getElementById("pdfjs-viewer-styles")||((o=document.createElement("link")).id="pdfjs-viewer-styles",o.rel="stylesheet",o.href="https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(t.version,"/web/pdf_viewer.css"),document.head.appendChild(o),(c=document.createElement("style")).id="pdf-custom-styles",c.textContent="\n .pdf-container {\n position: absolute;\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: #f8f9fa;\n }\n .pdfViewer .page {\n margin: 15px auto;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n }\n .pdfViewer .page.highlighted {\n box-shadow: 0 0 15px 5px rgba(255, 235, 59, 0.5);\n }\n ",document.head.appendChild(c)),e&&R(!0),[3,4];case 3:return l=i.sent(),e&&(E("Failed to load PDF.js: ".concat(l instanceof Error?l.message:String(l))),v(!1)),[3,4];case 4:return[2]}}))})),function(){e=!1}}}),[M]),e.useEffect((function(){if(M&&n&&O&&p.current){var e=!0,t=null,a=null,o=null;return s(void 0,void 0,void 0,(function(){var s,c,l,f,h,m,g,b,w;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),v(!0),E(null),[4,Promise.resolve().then((function(){return r(require("pdfjs-dist"))}))];case 1:return s=i.sent(),[4,Promise.resolve().then((function(){return r(require("pdfjs-dist/web/pdf_viewer.mjs"))}))];case 2:return c=i.sent(),e&&p.current?(p.current.innerHTML="",(l=document.createElement("div")).className="pdf-container",(f=document.createElement("div")).className="pdfViewer",l.appendChild(f),p.current.appendChild(l),o=new c.EventBus,h=new c.PDFLinkService({eventBus:o}),t=new c.PDFViewer({container:l,viewer:f,eventBus:o,linkService:h,textLayerMode:2,removePageBorders:!1}),h.setViewer(t),o.on("pagesinit",(function(){t&&(t.currentScaleValue=u)})),o.on("pagechanging",(function(t){e&&C(t.pageNumber||1)})),(m=s.getDocument({url:n,withCredentials:!1,cMapUrl:"https://cdn.jsdelivr.net/npm/pdfjs-dist@".concat(s.version,"/cmaps/"),cMapPacked:!0})).onProgress=function(e){},[4,m.promise]):[2];case 3:return a=i.sent(),e&&t?(t.setDocument(a),h.setDocument(a),k(a.numPages),F(t),d&&null!==(g=x(d))&&(b=g+1,setTimeout((function(){t&&e&&(t.currentPageNumber=b,setTimeout((function(){var r;if(e&&t){var a=null===(r=t.getPageView(g))||void 0===r?void 0:r.div;a&&a.classList.add("highlighted")}}),100))}),100)),e&&v(!1),[3,5]):[2];case 4:return w=i.sent(),e&&(E("Failed to load or render PDF: ".concat(w instanceof Error?w.message:String(w))),v(!1)),[3,5];case 5:return[2]}}))})),function(){e=!1,o&&(o.off("pagesinit"),o.off("pagechanging")),a&&a.destroy()}}}),[n,O,u,d,M]),e.useEffect((function(){P&&"number"==typeof u&&(P.currentScaleValue=u)}),[P,u]),M?a.default.createElement("div",{className:"relative ".concat(c),style:l},a.default.createElement("div",{ref:p,className:"w-full h-full",style:{opacity:g?0:1,transition:"opacity 0.3s ease"}}),g&&a.default.createElement("div",{className:"absolute inset-0 flex flex-col items-center justify-center",style:{backgroundColor:"white"}},a.default.createElement("div",{style:{width:"40px",height:"40px",border:"3px solid #f3f3f3",borderTop:"3px solid #475569",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"20px"}}),a.default.createElement("style",null,"\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n "),a.default.createElement("div",{className:"text-gray-600 font-medium text-lg mb-2"},"Loading PDF..."),a.default.createElement("div",{className:"text-gray-400 text-sm"},0===y?"Preparing document...":"Loading ".concat(y," pages..."))),w&&!g&&a.default.createElement("div",{className:"absolute inset-0 flex flex-col items-center justify-center p-4",style:{backgroundColor:"white"}},a.default.createElement("div",{style:{marginBottom:"20px",color:"#dc2626"}},a.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a.default.createElement("circle",{cx:"12",cy:"12",r:"10"}),a.default.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),a.default.createElement("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))),a.default.createElement("h2",{style:{margin:"0 0 10px",fontSize:"20px",color:"#333"}},"Failed to Load PDF"),a.default.createElement("p",{style:{margin:"0 0 20px",color:"#666",textAlign:"center"}},w),a.default.createElement("button",{className:"mt-4 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",onClick:function(){return window.location.reload()}},"Reload Page"),a.default.createElement("div",{className:"mt-4 ml-2"},a.default.createElement(I,{onClick:U,label:"Download PDF",primary:!0}))),y>0&&!w&&!g&&a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"absolute top-2 left-2 z-10"},a.default.createElement(N,{currentPage:S,totalPages:y})),a.default.createElement("div",{className:"absolute top-2 right-4 z-10"},a.default.createElement(I,{onClick:U})))):a.default.createElement(L,{className:c,style:l})}}),P=1252,F=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],M={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},U=function(e){-1!=F.indexOf(e)&&(P=M[0]=e)};var B=function(e){U(e)};function W(){B(1200),U(1252)}function z(e){for(var t=[],r=0,a=e.length;r<a;++r)t[r]=e.charCodeAt(r);return t}function H(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var V,G=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return 255==t&&254==r?function(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}(e.slice(2)):254==t&&255==r?H(e.slice(2)):65279==t?e.slice(1):e},j=function(e){return String.fromCharCode(e)},K=function(e){return String.fromCharCode(e)},X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Y(e){for(var t="",r=0,a=0,n=0,s=0,i=0,o=0,c=0,l=0;l<e.length;)s=(r=e.charCodeAt(l++))>>2,i=(3&r)<<4|(a=e.charCodeAt(l++))>>4,o=(15&a)<<2|(n=e.charCodeAt(l++))>>6,c=63&n,isNaN(a)?o=c=64:isNaN(n)&&(c=64),t+=X.charAt(s)+X.charAt(i)+X.charAt(o)+X.charAt(c);return t}function q(e){var t="",r=0,a=0,n=0,s=0,i=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var c=0;c<e.length;)r=X.indexOf(e.charAt(c++))<<2|(s=X.indexOf(e.charAt(c++)))>>4,t+=String.fromCharCode(r),a=(15&s)<<4|(i=X.indexOf(e.charAt(c++)))>>2,64!==i&&(t+=String.fromCharCode(a)),n=(3&i)<<6|(o=X.indexOf(e.charAt(c++))),64!==o&&(t+=String.fromCharCode(n));return t}var J=function(){return"undefined"!=typeof Buffer&&"undefined"!=typeof process&&void 0!==process.versions&&!!process.versions.node}(),Z=function(){if("undefined"!=typeof Buffer){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(t){e=!0}return e?function(e,t){return t?new Buffer(e,t):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function Q(e){return J?Buffer.alloc?Buffer.alloc(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}function ee(e){return J?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}var te=function(e){return J?Z(e,"binary"):e.split("").map((function(e){return 255&e.charCodeAt(0)}))};function re(e){if(Array.isArray(e))return e.map((function(e){return String.fromCharCode(e)})).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function ae(e){if("undefined"==typeof ArrayBuffer)throw new Error("Unsupported");if(e instanceof ArrayBuffer)return ae(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var ne=J?function(e){return Buffer.concat(e.map((function(e){return Buffer.isBuffer(e)?e:Z(e)})))}:function(e){if("undefined"!=typeof Uint8Array){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var a=new Uint8Array(r),n=0;for(t=0,r=0;t<e.length;r+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)a.set(e[t],r);else{if("string"==typeof e[t])throw"wtf";a.set(new Uint8Array(e[t]),r)}return a}return[].concat.apply([],e.map((function(e){return Array.isArray(e)?e:[].slice.call(e)})))};var se=/\u0000/g,ie=/[\u0001-\u0006]/g;function oe(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function ce(e,t){var r=""+e;return r.length>=t?r:gt("0",t-r.length)+r}function le(e,t){var r=""+e;return r.length>=t?r:gt(" ",t-r.length)+r}function fe(e,t){var r=""+e;return r.length>=t?r:r+gt(" ",t-r.length)}var ue=Math.pow(2,32);function he(e,t){return e>ue||e<-ue?function(e,t){var r=""+Math.round(e);return r.length>=t?r:gt("0",t-r.length)+r}(e,t):function(e,t){var r=""+e;return r.length>=t?r:gt("0",t-r.length)+r}(Math.round(e),t)}function de(e,t){return t=t||0,e.length>=7+t&&103==(32|e.charCodeAt(t))&&101==(32|e.charCodeAt(t+1))&&110==(32|e.charCodeAt(t+2))&&101==(32|e.charCodeAt(t+3))&&114==(32|e.charCodeAt(t+4))&&97==(32|e.charCodeAt(t+5))&&108==(32|e.charCodeAt(t+6))}var pe=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],me=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];var ge={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/δΈ‹εˆ "hh"ζ™‚"mm"εˆ†"ss"η§’ "'},ve={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},be={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function we(e,t,r){for(var a=e<0?-1:1,n=e*a,s=0,i=1,o=0,c=1,l=0,f=0,u=Math.floor(n);l<t&&(o=(u=Math.floor(n))*i+s,f=u*l+c,!(n-u<5e-8));)n=1/(n-u),s=i,i=o,c=l,l=f;if(f>t&&(l>t?(f=c,o=s):(f=l,o=i)),!r)return[0,a*o,f];var h=Math.floor(a*o/f);return[h,a*o-h*f,f]}function Ee(e,t,r){if(e>2958465||e<0)return null;var a=0|e,n=Math.floor(86400*(e-a)),s=0,i=[],o={D:a,T:n,u:86400*(e-a)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),t&&t.date1904&&(a+=1462),o.u>.9999&&(o.u=0,86400==++n&&(o.T=n=0,++a,++o.D)),60===a)i=r?[1317,10,29]:[1900,2,29],s=3;else if(0===a)i=r?[1317,8,29]:[1900,1,0],s=6;else{a>60&&--a;var c=new Date(1900,0,1);c.setDate(c.getDate()+a-1),i=[c.getFullYear(),c.getMonth()+1,c.getDate()],s=c.getDay(),a<60&&(s=(s+6)%7),r&&(s=function(e,t){t[0]-=581;var r=e.getDay();e<60&&(r=(r+6)%7);return r}(c,i))}return o.y=i[0],o.m=i[1],o.d=i[2],o.S=n%60,n=Math.floor(n/60),o.M=n%60,n=Math.floor(n/60),o.H=n,o.q=s,o}var Te=new Date(1899,11,31,0,0,0),ye=Te.getTime(),ke=new Date(1900,2,1,0,0,0);function xe(e,t){var r=e.getTime();return t?r-=1262304e5:e>=ke&&(r+=864e5),(r-(ye+6e4*(e.getTimezoneOffset()-Te.getTimezoneOffset())))/864e5}function Ae(e){return-1==e.i