UNPKG

@pdftron/webviewer

Version:

[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib

2 lines • 23.5 kB
(window.webpackJsonpWebViewerUI=window.webpackJsonpWebViewerUI||[]).push([[65],{2078:function(e,t,n){var r=n(36),i=n(2079);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:function(e){if(!window.isApryseWebViewerWebComponent)return void document.head.appendChild(e);let t;t=document.getElementsByTagName("apryse-webviewer"),t.length||(t=function e(t,n=document){const r=[];return n.querySelectorAll(t).forEach(e=>r.push(e)),n.querySelectorAll("*").forEach(n=>{n.shadowRoot&&r.push(...e(t,n.shadowRoot))}),r}("apryse-webviewer"));const n=[];for(let r=0;r<t.length;r++){const i=t[r];if(0===r)i.shadowRoot.appendChild(e),e.onload=function(){n.length>0&&n.forEach(t=>{t.innerHTML=e.innerHTML})};else{const t=e.cloneNode(!0);i.shadowRoot.appendChild(t),n.push(t)}}},singleton:!1};r(i,o);e.exports=i.locals||{}},2079:function(e,t,n){(t=e.exports=n(37)(!1)).push([e.i,":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.MainHeader.OfficeEditorTools{padding:0 8px;align-items:center;flex-direction:row}.MainHeader.OfficeEditorTools .HeaderItems{width:auto}.MainHeader.OfficeEditorTools .HeaderItems .Dropdown{margin-inline-start:8px}.MainHeader.OfficeEditorTools .HeaderItems .Dropdown .picked-option{text-align:start}.MainHeader.OfficeEditorTools .HeaderItems .action-button-wrapper{display:flex;align-items:center;position:relative}.MainHeader.OfficeEditorTools .HeaderItems .action-button-wrapper .more-tools{position:absolute;inset-block-start:46px;inset-inline-end:6px;width:auto;padding:0}.MainHeader.OfficeEditorTools .Button .Icon svg{vertical-align:middle}.MainHeader.OfficeEditorTools .icon-text-color{display:flex;align-items:center;justify-content:center}.MainHeader.OfficeEditorTools .list-style-button{margin-inline-end:0!important}.MainHeader.OfficeEditorTools .list-style-dropdown{background:transparent;border:none;width:12px!important;height:32px!important;margin-inline-start:0!important;z-index:0}.MainHeader.OfficeEditorTools .list-style-dropdown.Dropdown__wrapper:hover{border-radius:4px;background:var(--tools-button-hover)}.MainHeader.OfficeEditorTools .list-style-dropdown .Dropdown{padding:0}.MainHeader.OfficeEditorTools .list-style-dropdown .Dropdown svg rect{stroke:none}.MainHeader.OfficeEditorTools .list-style-dropdown .picked-option-text{display:none}.MainHeader.OfficeEditorTools .list-style-dropdown .arrow{padding-inline-start:0}.MainHeader.OfficeEditorTools .list-style-dropdown .Dropdown__items{overflow:hidden;width:auto!important}.MainHeader.OfficeEditorTools .list-style-dropdown .Dropdown__items .Dropdown__item{height:74px!important;padding:15px 0;margin:3px;cursor:pointer}.MainHeader.OfficeEditorTools .list-style-dropdown .Dropdown__items .Dropdown__item .officeEditor-list-style-icon{width:60px!important;height:74px!important}.MainHeader.OfficeEditorTools .insert-table-dropdown{margin:0 6px}.MainHeader.OfficeEditorTools .insert-table-dropdown.open{background-color:var(--tools-button-hover);border-radius:4px}.MainHeader.OfficeEditorTools .insert-table-dropdown .display-button{display:flex;align-items:center;cursor:pointer}.MainHeader.OfficeEditorTools .insert-table-dropdown .display-button:hover{background-color:var(--tools-button-hover);border-radius:4px}.MainHeader.OfficeEditorTools .insert-table-dropdown .display-button .Button{background-color:transparent!important}.MainHeader.OfficeEditorTools .insert-table-dropdown .display-button .Icon.arrow{width:12px;height:12px;margin:0 2px}",""]),t.locals={LEFT_HEADER_WIDTH:"41px",RIGHT_HEADER_WIDTH:"41px"}},2119:function(e,t,n){"use strict";n.r(t);n(9),n(10),n(14),n(32),n(34),n(27),n(21),n(46),n(20),n(12),n(44),n(22),n(33),n(18),n(26),n(16),n(29),n(40),n(49),n(24),n(48),n(50),n(41),n(35),n(42),n(8),n(88),n(111),n(57),n(17),n(19),n(64),n(11),n(232),n(268),n(31),n(13);var r=n(0),i=n.n(r),o=n(6),a=n(3),c=n(4),l=n(208),d=n(2),s=n.n(d),f=n(1),u=n(72),p=n(81),m=n(356),E=n(61),g=n(580),b=n(25);n(496);function y(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof c?r:c,d=Object.create(l.prototype);return v(d,"_invoke",function(n,r,i){var o,c,l,d=0,s=i||[],f=!1,u={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,c=0,l=e,u.n=n,a}};function p(n,r){for(c=n,l=r,t=0;!f&&d&&!i&&t<s.length;t++){var i,o=s[t],p=u.p,m=o[2];n>3?(i=m===r)&&(l=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(c=0,u.v=r,u.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,u.n=m,c=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,m){if(d>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,m),c=s,l=m;(t=c<2?e:l)||!f;){o||(c?c<3?(c>1&&(u.n=-1),p(c,l)):u.n=l:u.v=l);try{if(d=2,o){if(c||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=o.return)&&t.call(o),c<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),c=1);o=e}else if((t=(f=u.n<0)?l:n.call(r,u))!==a)break}catch(t){o=e,c=1,l=t}finally{d=1}}return{value:t,done:f}}}(n,i,o),!0),d}var a={};function c(){}function l(){}function d(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(v(t={},r,(function(){return this})),t),f=d.prototype=c.prototype=Object.create(s);function u(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,v(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=d,v(f,"constructor",d),v(d,"constructor",l),l.displayName="GeneratorFunction",v(d,i,"GeneratorFunction"),v(f),v(f,i,"Generator"),v(f,r,(function(){return this})),v(f,"toString",(function(){return"[object Generator]"})),(y=function(){return{w:o,m:u}})()}function v(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(v=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){v(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}})(e,t,n,r)}function h(e,t,n,r,i,o,a){try{var c=e[o](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,i)}var O=function(){var e=Object(o.d)(),t=Object(o.e)(c.a.getActiveFlyout),n=function(){var n,r=(n=y().m((function n(r){return y().w((function(n){for(;;)switch(n.n){case 0:return n.n=1,Object(g.a)(e,a.a,r,t);case 1:return n.a(2)}}),n)})),function(){var e=this,t=arguments;return new Promise((function(r,i){var o=n.apply(e,t);function a(e){h(o,r,i,a,c,"next",e)}function c(e){h(o,r,i,a,c,"throw",e)}a(void 0)}))});return function(e){return r.apply(this,arguments)}}();return i.a.createElement("div",{className:"FilePickerHandler"},i.a.createElement("input",{id:"office-editor-file-picker",type:"file",accept:b.x,onChange:n}))},w=n(602),S=n(51),T=n(603),j=n(5),x=n(233),C=n(23),I=n(62);n(495),n(2078),n(646);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,c=[],l=!0,d=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){d=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof c?r:c,d=Object.create(l.prototype);return N(d,"_invoke",function(n,r,i){var o,c,l,d=0,s=i||[],f=!1,u={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,c=0,l=e,u.n=n,a}};function p(n,r){for(c=n,l=r,t=0;!f&&d&&!i&&t<s.length;t++){var i,o=s[t],p=u.p,m=o[2];n>3?(i=m===r)&&(l=o[(c=o[4])?5:(c=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(c=0,u.v=r,u.n=o[1]):p<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,u.n=m,c=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,m){if(d>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,m),c=s,l=m;(t=c<2?e:l)||!f;){o||(c?c<3?(c>1&&(u.n=-1),p(c,l)):u.n=l:u.v=l);try{if(d=2,o){if(c||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=o.return)&&t.call(o),c<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),c=1);o=e}else if((t=(f=u.n<0)?l:n.call(r,u))!==a)break}catch(t){o=e,c=1,l=t}finally{d=1}}return{value:t,done:f}}}(n,i,o),!0),d}var a={};function c(){}function l(){}function d(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(N(t={},r,(function(){return this})),t),f=d.prototype=c.prototype=Object.create(s);function u(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,N(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=d,N(f,"constructor",d),N(d,"constructor",l),l.displayName="GeneratorFunction",N(d,i,"GeneratorFunction"),N(f),N(f,i,"Generator"),N(f,r,(function(){return this})),N(f,"toString",(function(){return"[object Generator]"})),(F=function(){return{w:o,m:u}})()}function N(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(N=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var o=function(t,n){N(e,t,(function(e){return this._invoke(t,n,e)}))};o("next",0),o("throw",1),o("return",2)}})(e,t,n,r)}function M(e,t,n,r,i,o,a){try{var c=e[o](a),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,i)}function D(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){M(o,r,i,a,c,"next",e)}function c(e){M(o,r,i,a,c,"throw",e)}a(void 0)}))}}function R(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var L=window.Core.Document.OfficeEditor.ToggleableStyles,B=function(e){var t=e.activeStates;return Object.values(L).map((function(e){return i.a.createElement(p.a,{key:e,isActive:t[e],ariaPressed:t[e],onClick:function(){f.a.getOfficeEditor().updateSelectionAndCursorStyle(R({},e,!0))},dataElement:"office-editor-".concat(e),title:"officeEditor.".concat(e),img:"icon-text-".concat(e)})}))},G=function(e){var t=e.justification;return i.a.createElement(i.a.Fragment,null,i.a.createElement(p.a,{isActive:t===b.n.Left,dataElement:"office-editor-left-align",title:"officeEditor.leftAlign",img:"icon-menu-left-align",onClick:function(){f.a.getOfficeEditor().updateParagraphStyle({justification:"left"})}}),i.a.createElement(p.a,{isActive:t===b.n.Center,dataElement:"office-editor-center-align",title:"officeEditor.centerAlign",img:"icon-menu-center-align",onClick:function(){f.a.getOfficeEditor().updateParagraphStyle({justification:"center"})}}),i.a.createElement(p.a,{isActive:t===b.n.Right,dataElement:"office-editor-right-align",title:"officeEditor.rightAlign",img:"icon-menu-right-align",onClick:function(){f.a.getOfficeEditor().updateParagraphStyle({justification:"right"})}}),i.a.createElement(p.a,{isActive:t===b.n.Both,dataElement:"office-editor-justify",title:"officeEditor.justify",img:"icon-menu-both-align",onClick:function(){f.a.getOfficeEditor().updateParagraphStyle({justification:"both"})}}))},z=function(e){var t=e.listType,n=b.w.map((function(e){return{className:"officeEditor-list-style-icon",key:e.enum,src:e.img}})),r=b.B.map((function(e){return{className:"officeEditor-list-style-icon",key:e.enum,src:e.img}}));return i.a.createElement(i.a.Fragment,null,i.a.createElement(p.a,{isActive:t===b.q.Unordered,dataElement:"unorderedListDropButton",title:"officeEditor.bulletList",img:"icon-office-editor-bullet-list",className:"list-style-button",onClick:function(){f.a.getOfficeEditor().toggleListSelection(b.q.Unordered)}}),i.a.createElement(u.a,{id:"office-editor-bullet-list-dropdown",dataElement:"office-editor-bullet-list-dropdown",images:n,columns:3,onClickItem:function(e){f.a.getOfficeEditor().setListPreset(e)},className:"list-style-dropdown"}),i.a.createElement(p.a,{isActive:t===b.q.Ordered,dataElement:"office-editor-number-list",title:"officeEditor.numberList",img:"icon-office-editor-number-list",className:"list-style-button",onClick:function(){f.a.getOfficeEditor().toggleListSelection(b.q.Ordered)}}),i.a.createElement(u.a,{id:"office-editor-number-list-dropdown",dataElement:"office-editor-number-list-dropdown",images:r,columns:3,onClickItem:function(e){f.a.getOfficeEditor().setListPreset(e)},className:"list-style-dropdown"}),i.a.createElement(p.a,{dataElement:"decreaseIndentButton",title:"officeEditor.decreaseIndent",img:"ic-indent-decrease",onClick:D(F().m((function e(){return F().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,f.a.getOfficeEditor().decreaseIndent();case 1:return e.a(2)}}),e)})))}),i.a.createElement(p.a,{dataElement:"increaseIndentButton",title:"officeEditor.increaseIndent",img:"ic-indent-increase",onClick:D(F().m((function e(){return F().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,f.a.getOfficeEditor().increaseIndent();case 1:return e.a(2)}}),e)})))}))};z.propTypes={listType:s.a.string};t.default=function(){var e,t=Object(o.d)(),n=A(Object(o.e)((function(e){return[c.a.isElementOpen(e,j.a.OFFICE_EDITOR_TOOLS_HEADER),c.a.getOfficeEditorCursorProperties(e),c.a.isCursorInTable(e),c.a.getOfficeEditorSelectionProperties(e),c.a.getAvailableFontFaces(e),c.a.getActiveTheme(e),c.a.getCSSFontValues(e),c.a.isNonPrintingCharactersEnabled(e)]}),o.c),8),d=n[0],s=n[1],g=n[2],y=n[3],v=n[4],h=n[5],_=n[6],k=n[7],H=A(Object(r.useState)(0),2),N=H[0],M=H[1],R=A(Object(r.useState)(0),2),L=R[0],U=R[1],q=A(Object(r.useState)(6),2),K=q[0],V=q[1],W=A(Object(r.useState)(!1),2),X=W[0],J=W[1];Object(r.useEffect)((function(){var e,n=function(){var e=D(F().m((function e(n){return F().w((function(e){for(;;)switch(e.n){case 0:t(a.a.setOfficeEditorCursorProperties(n));case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}(),r=function(e){t(a.a.setOfficeEditorSelectionProperties(e))};return f.a.getDocument().addEventListener("cursorPropertiesUpdated",n),null===(e=f.a.getDocument())||void 0===e||e.addEventListener("selectionPropertiesUpdated",r),function(){f.a.getDocument().removeEventListener("selectionPropertiesUpdated",r),f.a.getDocument().removeEventListener("cursorPropertiesUpdated",n)}}),[]),Object(r.useEffect)((function(){s.fontFace&&!v.includes(s.fontFace)&&t(a.a.addOfficeEditorAvailableFontFace(s.fontFace))}),[v,s]),Object(r.useEffect)((function(){if(0!==N&&0!==L){var e=N-16;V(e>=L?6:e<L&&e>=L-121+77?5:e<L-121+77&&e>=L-121-209+77&&e>=858?4:3)}}),[N,L]);var Y=f.a.getOfficeEditor().isTextSelected()?y:s,$=Y.bold,Q=Y.italic,Z="single"===Y.underlineStyle,ee=Y.fontFace||"",te=Y.pointSize,ne=void 0===te?"":te.toString(),re=Y.paragraphProperties.justification,ie=Object(I.d)(Y.paragraphProperties.lineHeightMultiplier,Y.paragraphProperties.lineHeight,s.paragraphProperties.fontPointSize||b.f),oe=Y.paragraphProperties.listType,ae=h===x.a.LIGHT,ce=Object(I.f)(Y.color),le=ae?"rgba(255,255,255,1)"===ce.toString():"rgba(0,0,0,1)"===ce.toString(),de=null==ce||null===(e=ce.toHexString)||void 0===e?void 0:e.call(ce);return d?i.a.createElement(E.a,{dataElement:j.a.OFFICE_EDITOR_TOOLS_HEADER,className:"HeaderToolsContainer"},i.a.createElement(l.a,{bounds:!0,onResize:function(e){var t=e.bounds;M(t.width)}},(function(e){var n=e.measureRef;return i.a.createElement("div",{className:"MainHeader Tools OfficeEditorTools",ref:n},i.a.createElement(l.a,{bounds:!0,onResize:function(e){var t=e.bounds;0===L&&U(t.width)}},(function(e){var n=e.measureRef;return i.a.createElement("div",{className:"HeaderItems",ref:n},i.a.createElement(u.a,{id:"office-editor-text-format",items:Object.keys(b.b),onOpened:function(){return J(!1)},onClickItem:function(){var e=D(F().m((function e(t){var n,r,i,o,a;return F().w((function(e){for(;;)switch(e.n){case 0:return n=b.b[t],r=parseInt(n.fontSize,10),i=new window.Core.Annotations.Color(n.color),o={r:i.R,g:i.G,b:i.B,a:255},a={bold:!1,italic:!1,underline:!1,pointSize:r,color:o},e.n=1,f.a.getOfficeEditor().updateParagraphStylePresets(a);case 1:return e.n=2,f.a.getOfficeEditor().setMainCursorStyle(a);case 2:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}(),getCustomItemStyle:function(e){return P(P({},b.b[e]),{},{padding:"20px 10px",color:"var(--gray-8)"})},applyCustomStyleToButton:!1,currentSelectionKey:Object(I.g)(Y),width:160,dataElement:"office-editor-text-format"}),i.a.createElement(u.a,{id:"office-editor-font",items:v,onOpened:function(){return J(!1)},onClickItem:function(e){"string"==typeof e&&f.a.getOfficeEditor().updateSelectionAndCursorStyle({fontFace:e})},getCustomItemStyle:function(e){return P({},_[e])},maxHeight:500,customDataValidator:function(e){return v.includes(e)},width:160,dataElement:"office-editor-font",currentSelectionKey:ee,hasInput:!0}),i.a.createElement(u.a,{id:"office-editor-font-size",items:b.a,onOpened:function(){return J(!1)},onClickItem:function(e){var t=parseInt(e,10);isNaN(t)&&(t=b.f),t>b.l.MAX?t=b.l.MAX:t<b.l.MIN&&(t=b.l.MIN),f.a.getOfficeEditor().updateSelectionAndCursorStyle({pointSize:t})},currentSelectionKey:ne,width:80,dataElement:"office-editor-font-size",hasInput:!0,isSearchEnabled:!1}),K>=4&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"divider"}),i.a.createElement(B,{activeStates:{bold:$,italic:Q,underline:Z}})),i.a.createElement("div",{className:"divider"}),i.a.createElement(m.a,{onClick:function(){return J(!1)},dataElement:j.a.OFFICE_EDITOR_TEXT_COLOR_BUTTON,title:"officeEditor.textColor",ariaLabel:de,img:"icon-office-editor-circle",element:j.a.OFFICE_EDITOR_COLOR_PICKER_OVERLAY,color:ce.toString(),iconClassName:"".concat(le?"icon-border":""," icon-text-color")}),i.a.createElement(w.a,{onStyleChange:function(e,n){var r={r:n.R,g:n.G,b:n.B,a:255};f.a.getOfficeEditor().updateSelectionAndCursorStyle({color:r}),t(a.a.closeElements([j.a.OFFICE_EDITOR_COLOR_PICKER_OVERLAY]))},color:ce}),K>=5&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"divider"}),i.a.createElement(G,{justification:re})),i.a.createElement("div",{className:"divider"}),i.a.createElement(u.a,{id:"office-editor-line-spacing",items:Object.keys(b.p),onClickItem:function(e){var t=b.p[e];f.a.getOfficeEditor().updateParagraphStyle({lineHeightMultiplier:t})},currentSelectionKey:ie,width:80,dataElement:"office-editor-line-spacing",displayButton:function(e){return i.a.createElement(p.a,{title:"officeEditor.lineSpacing",img:"icon-office-editor-line-spacing",isActive:e,onClick:function(){return J(!1)}})}}),i.a.createElement("div",{className:"divider"}),i.a.createElement(p.a,{title:"officeEditor.pageBreak",img:"icon-office-editor-page-break",dataElement:j.a.OFFICE_EDITOR_PAGE_BREAK,disabled:g,onClick:function(){f.a.getOfficeEditor().insertPageBreak()}}),i.a.createElement(u.a,{id:"office-editor-insert-table",dataElement:j.a.OFFICE_EDITOR_TOOLS_HEADER_INSERT_TABLE,width:136,className:"insert-table-dropdown",displayButton:function(e){return i.a.createElement(i.a.Fragment,null,i.a.createElement(p.a,{title:"officeEditor.table",img:"ic-table",isActive:e}),i.a.createElement(S.a,{className:"arrow",glyph:"icon-chevron-".concat(e?"up":"down")}))}},i.a.createElement(T.a,null)),i.a.createElement(i.a.Fragment,null,i.a.createElement(p.a,{className:"tool-group-button",dataElement:j.a.OFFICE_EDITOR_TOOLS_HEADER_INSERT_IMAGE,title:"officeEditor.insertImage",img:"icon-tool-image-line",onClick:function(){var e;null===(e=Object(C.a)().querySelector("#office-editor-file-picker"))||void 0===e||e.click()}}),i.a.createElement(O,null)),6===K&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"divider"}),i.a.createElement(z,{listType:oe,enableNonPrintingCharacters:k})),K<6&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"divider"}),i.a.createElement("div",{className:"action-button-wrapper"},i.a.createElement(p.a,{className:"tool-group-button",isActive:X,dataElement:"office-editor-more-tools",title:"action.more",img:"icon-tools-more-vertical",onClick:function(){return J(!X)}}),X&&i.a.createElement("div",{className:"more-tools MainHeader Tools OfficeEditorTools"},i.a.createElement("div",{className:"HeaderItems"},K<4&&i.a.createElement(i.a.Fragment,null,i.a.createElement(B,{activeStates:{bold:$,italic:Q,underline:Z}}),i.a.createElement("div",{className:"divider"})),K<5&&i.a.createElement(i.a.Fragment,null,i.a.createElement(G,{justification:re}),i.a.createElement("div",{className:"divider"})),K<6&&i.a.createElement(z,{listType:oe,enableNonPrintingCharacters:k}))))))})))}))):null}}}]); //# sourceMappingURL=chunk.65.js.map