@mescius/dspdfviewer
Version:
Document Solutions PDF Viewer
7 lines • 7.16 MB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dspdfviewer=t():e.dspdfviewer=t()}(this,()=>(()=>{var __webpack_modules__={119:function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,function(e){return n[e]}).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return t[e]}).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(95093))},122:(e,t,n)=>{"use strict";var o=n(46518),i=n(22195),r=n(91955),a=n(79306),s=n(22812),c=n(79039),l=n(43724);o({global:!0,enumerable:!0,dontCallGetSet:!0,forced:c(function(){return l&&1!==Object.getOwnPropertyDescriptor(i,"queueMicrotask").value.length})},{queueMicrotask:function(e){s(arguments.length,1),r(a(e))}})},655:(e,t,n)=>{"use strict";var o=n(36955),i=String;e.exports=function(e){if("Symbol"===o(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},1121:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=t.AsyncLock=t.createPromiseCapabilityWithTimeout=t.createPromiseCapability=void 0,t.createPromiseCapability=function(){var e={};return e.promise=new Promise(function(t,n){e.resolve=t,e.reject=n}),e},t.createPromiseCapabilityWithTimeout=function(e,t){void 0===e&&(e=-1),void 0===t&&(t="Timeout");var n={resolved:!1,rejected:!1,rejectTimeout:-1};return n.promise=new Promise(function(e,t){n.resolve=function(t){-1!==n.rejectTimeout&&(clearTimeout(n.rejectTimeout),n.rejectTimeout=-1),n.resolved=!0,e(t)},n.reject=function(e){-1!==n.rejectTimeout&&(clearTimeout(n.rejectTimeout),n.rejectTimeout=-1),n.rejected=!1,t(e)}}),e>0&&(n.rejectTimeout=setTimeout(function(){n.rejectTimeout=-1,n.resolved||n.rejected||n.reject(t)},e)),n};var i=function(){function e(){this._queue=[],this._isLocked=!1}return Object.defineProperty(e.prototype,"locked",{get:function(){return this._isLocked},enumerable:!1,configurable:!0}),e.prototype.lock=function(){return n(this,void 0,void 0,function(){var e=this;return o(this,function(t){return[2,new Promise(function(t){e._isLocked?e._queue.push(function(){t(),e._isLocked=!0}):(e._isLocked=!0,t())})]})})},e.prototype.unlock=function(){if(this._isLocked){var e=this._queue.shift();e?e():this._isLocked=!1}},e}();t.AsyncLock=i;var r=function(){function e(){this._queue=Promise.resolve(!0),this._queueId=0}return e.prototype.enqueue=function(e){var t=this;return e.___queueId||(e.___queueId=this._queueId),new Promise(function(i,r){e.___queueId===t._queueId&&(t._queue=t._queue.then(function(){return n(t,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return e.___queueId!==this._queueId?[2]:[4,e()];case 1:return t.sent(),[2]}})})}).then(i).catch(r))})},e.prototype.clear=function(){this._queueId++,isNaN(this._queueId)&&(this._queueId=0),this._queue=Promise.resolve(!0)},e}();t.PromiseQueue=r},1221:function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(95093))},1301:(e,t,n)=>{"use strict";n.d(t,{t:()=>h});var o=n(96540),i=n(2877),r=n(19986);function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}function s(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t,n){return t=d(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}const[p,g]=(0,i.Tu)("gc-tabs");let h=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,t,arguments)).onTabClick=t=>()=>{const{onTabSelect:n}=e.props;n&&n(t)},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),n=t,(s=[{key:"render",value:function(){const{id:e,block:t,tabs:n,customCSS:a,dataAid:s,design:c,rounded:l,align:d,size:u,splitter:h,selectedTabId:f}=this.props,m=(0,i.pS)(p,a,{[g("block")]:t,[g("simplified")]:"simplified"===c,[g("transparent")]:"transparent"===c}),b="simplified"===c?"text+icon":"full",v="transparent"!==c?"none":"full",y={id:e?`${e}_group`:void 0,block:t,rounded:l,align:d,size:u,defaultAccent:v,defaultBackground:"default"===c?"default":"transparent",withSplitters:h,items:n.map(e=>({type:"button",dataAid:s?`${s}_tab_${e.id}`:void 0,icon:e.icon,text:e.text,title:e.title,badge:e.badge,disabled:e.disabled,accent:e.id===f?b:v,onClick:this.onTabClick(e.id),customCSS:e.id===f?"selected":void 0}))};return o.createElement("div",{id:e,"data-aid":s,className:m},o.createElement(r.e,{...y}))}}])&&a(n.prototype,s),l&&a(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s,l}(o.Component);h.defaultProps={align:"left",block:!1,design:"default",rounded:!1,size:"default",splitter:!1}},1346:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MediaFileEditor=void 0;var r=n(84814),a=n(21375),s=function(e){function t(t,n){return e.call(this,t,n)||this}return i(t,e),t.prototype.getValuePath=function(){return"fileId"},t.prototype.getDescriptorType=function(){return"media_file"},t.prototype.getAcceptExtensions=function(){return a.RICH_MEDIA_ACCEPTS},t}(r.FileEditor);t.MediaFileEditor=s},1469:(e,t,n)=>{"use strict";var o=n(87433);e.exports=function(e,t){return new(o(e))(0===t?0:t)}},1548:(e,t,n)=>{"use strict";var o=n(22195),i=n(79039),r=n(39519),a=n(84215),s=o.structuredClone;e.exports=!!s&&!i(function(){if("DENO"===a&&r>92||"NODE"===a&&r>94||"BROWSER"===a&&r>97)return!1;var e=new ArrayBuffer(8),t=s(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})},1625:(e,t,n)=>{"use strict";var o=n(79504);e.exports=o({}.isPrototypeOf)},1632:function(e,t,n){!function(e){"use strict";
//! moment.js locale configuration
e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var o=100*e+t;return o<600?"凌晨":o<900?"早上":o<1200?"上午":1200===o?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(95093))},1767:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},2034:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CancellationToken:()=>i.CancellationToken,ChangedEventArgs:()=>i.ChangedEventArgs,DocumentOpenedEventArgs:()=>i.DocumentOpenedEventArgs,DocumentViewOpenedEventArgs:()=>i.DocumentViewOpenedEventArgs,EventFan:()=>i.EventFan,MouseMode:()=>a.MouseMode,PluginModel:()=>r.b,ReactStateBinder:()=>i.ReactStateBinder,ReportViewer:()=>i.ReportViewer,SearchFeature:()=>o,SessionState:()=>i.SessionState,Store:()=>i.Store,Toolbar:()=>i.Toolbar,ViewMode:()=>a.ViewMode,ViewerStatus:()=>a.ViewerStatus,ZoomMode:()=>a.ZoomMode,withThumbnails:()=>s.kz});var o=n(12634),i=n(29070),r=n(56001),a=n(79388),s=n(59092)},2165:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return a(t,e),t},c=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},l=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeTool=void 0;var d=s(n(96540)),u=n(32390),p=n(91406),g=n(52251),h=n(83878),f=n(12253),m=n(53488),b=n(76327);var v=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o.state={fontSize:o.fontSize},o.onColorSelect=function(e){var t;t=0===e.A?"":e.hex,o._dropdown&&o._dropdown.close(),o.textColor=t},o}return i(t,e),t.prototype.componentDidMount=function(){this._mounted=!0,this.redrawText(),this.focusInput()},t.prototype.componentWillUnmount=function(){this._mounted=!1},t.prototype.componentDidUpdate=function(){this._pendingFocus&&this.focusInput(),this.repaintCanvas()},t.prototype.focusInput=function(){var e=this;setTimeout(function(){e._mounted&&e._textInput&&e._textInput.focus()},0)},t.prototype.render=function(){var e=this,t=this.props.in17n,n=[],o=this.props.canvasSize;n.push(d.default.createElement("canvas",{className:"type-canvas gc-no-select",key:"type_tool_canvas",width:"".concat(o.width,"px"),height:"".concat(o.height,"px"),ref:function(t){e._canvas=t}})),!1!==this.settings.ruler&&n.push(d.default.createElement(b.CanvasRuler,{key:"canvas_ruler",settings:this.settings,ref:function(t){return e._canvasRuler=t},toolType:"Type"})),n.push(d.default.createElement("input",{placeholder:t.t("dialogs.sign-tool.input-text.placeholder","Input here..."),className:"sign-text-input gc-input",value:this.text,onChange:function(t){return e.onTextChange(t)},ref:function(t){e._textInput=t}}));var i=d.default.createElement("a",{key:"clear-text-button",href:"#",className:"clear-text-button",title:t.t("dialogs.sign-tool.clear-text-button.title","Clear text"),onClick:function(t){return e.clearText(),t.preventDefault(),!1}},t.t("dialogs.sign-tool.clear-text-button.label","Clear"));return d.default.createElement("div",{key:"type_tool_content",className:"sign-tool-content"},this.renderToolbar(),d.default.createElement("div",{key:"type_tool_canvas_outer",className:"canvas-outer",style:{width:"".concat(o.width,"px"),height:"".concat(o.height,"px")}},n),i)},t.prototype.onTextChange=function(e){var t=e.target;this.text=t.value},t.prototype.renderToolbar=function(){var e=this;if(this.hideToolbar)return null;var t=this.props.in17n,n=this.state||{},o=u.Color.fromHEX(this.textColor),i=this.italic,r=this.bold,a=r?"checked toolbar-bold-button":"toolbar-bold-button",s=i?"checked toolbar-italic-button":"toolbar-italic-button",c=n.fontSize||void 0;return d.default.createElement(u.Toolbar,{id:"test",block:!0,padding:!0,customCSS:"sign-tool-toolbar",size:"small"},(0,p.renderColorDropdown)(o,function(t){e._pendingFocus=!0,e.onColorSelect(t)},(0,g.getColorEditorLocalization)(this.props.in17n),function(t){return e._dropdown=t},"small"),function(e,t,n,o){for(var i,r=[],a=24;a<=128;a+=8)r.push({type:"button",value:a,text:a.toString(),selected:e===a});return d.default.createElement(u.ComboBox,{items:r,key:"type_tool_font_size",size:"small",placeholder:t.t("dialogs.sign-tool.font-size.placeholder","Size"),openOnFocus:!1,width:"70px",value:null!==(i=null==e?void 0:e.toString())&&void 0!==i?i:"",onChange:function(e){var t,n=(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)||"";o&&o(n)},onSelect:function(e){n&&n(e||"")}})}(c,this.props.in17n,function(t){e._pendingFocus=!0,e.fontSize=t},function(t){return e.fontSize=t}),function(e,t,n,o,i,r,a){for(var s=[],c=0;c<t.length;c++){var l=t[c];s.push({type:"button",value:l,selected:e===l,text:l})}return d.default.createElement(u.ComboBox,{items:s,key:"type_tool_font_name",size:"small",menuCustomCSS:"font-name-svg-combo",placeholder:i.t("dialogs.sign-tool.font-name.placeholder","Font name"),openOnFocus:!0,value:e,width:"140px",onChange:function(e){var t,n=(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)||"";a&&a(n)},onSelect:function(e){r&&r(e||"")}})}(this.fontName,this.fontNames,0,0,this.props.in17n,function(t){e._pendingFocus=!0,e.fontName=t},function(t){return e.fontName=t}),d.default.createElement(u.Button,{key:"type_tool_bold",size:"small",icon:{type:"svg",content:h.pdfSvgIcons["font-bold"]},customCSS:a,title:t.t("dialogs.sign-tool.font-bold.title","Bold"),onClick:function(){e.bold=!r}}),d.default.createElement(u.Button,{key:"type_tool_italic",size:"small",icon:{type:"svg",content:h.pdfSvgIcons["font-italic"]},customCSS:s,title:t.t("dialogs.sign-tool.font-italic.title","Italic"),onClick:function(){e.italic=!i}}),d.default.createElement(u.ToolbarSplitter,{key:"type_tool_toolbar_splitter"}),d.default.createElement(u.Button,{size:"small",customCSS:"toolbar-clear-button",key:"type_tool_toolbar_clear",title:t.t("dialogs.sign-tool.clear-text-button.title","Clear text"),accent:"icon",icon:{type:"svg",content:h.pdfSvgIcons["context-delete"]},onClick:function(){e.clearText()}}))},Object.defineProperty(t.prototype,"isMounted",{get:function(){return this._mounted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textColor",{get:function(){return(this.state||{}).textColor||this.settings.textColor||"#000000"},set:function(e){var t=this;this.setState({textColor:e},function(){t.setSetting("textColor",e),t.redrawText()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){var e=this.state||{};return void 0===e.italic&&void 0===this.settings.italic||(e.italic||this.settings.italic||!1)},set:function(e){var t=this;this.setState({italic:e},function(){t.setSetting("italic",e),t.forceUpdate(function(){t.redrawText()})})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bold",{get:function(){return(this.state||{}).bold||this.settings.bold||!1},set:function(e){var t=this;this.setState({bold:e},function(){t.setSetting("bold",e),t.forceUpdate(function(){t.redrawText()})})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return(this.state||{}).text||this.settings.text||""},set:function(e){var t=this;this.setState({text:e},function(){t.setSetting("text",e),t.redrawText()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return(this.state||{}).fontSize||this.settings.fontSize||48},set:function(e){var t=this;this.setState({fontSize:e},function(){t.setSetting("fontSize",e),t.redrawText()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontName",{get:function(){return(this.state||{}).fontName||this.settings.fontName||"Brush Script MT"},set:function(e){var t=this;this.setState({fontName:e},function(){t.setSetting("fontName",e),t.redrawText()})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontNames",{get:function(){return this.settings.fontNames||["Arial","Verdana","Helvetica","Tahoma","Trebuchet MS","Times New Roman","Georgia","Garamond","Courier New","Brush Script MT"]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideToolbar",{get:function(){var e=this.settings.hideToolbar;return null!=e&&e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"settings",{get:function(){var e=(0,m.mergeObject)({},this.props.settings||{});return(0,m.mergeObject)(e,this.props.signToolStorage.settings||{})},enumerable:!1,configurable:!0}),t.prototype.setSetting=function(e,t){this.props.signToolStorage.setSetting(e,t)},t.prototype.clearText=function(){this.text=""},t.prototype.clearCanvas=function(){var e=this._canvas;if(e){var t=e.getContext("2d");null==t||t.clearRect(0,0,e.width,e.height)}},t.prototype.redrawText=function(){this.repaintCanvas();var e=this._canvas;e&&(this.props.signToolStorage.saveCanvas("Type",e),this.markDirty(!!this.text))},t.prototype.repaintCanvas=function(){this.clearCanvas();var e=this.text,t=this._canvas;if(t&&e){var n=this.italic,o=this.bold,i=t.getContext("2d");i.fillStyle=this.textColor,i.strokeStyle=this.textColor;var r=this.fontSize+"px "+this.fontName;n&&(r="italic ".concat(r)),o&&(r="bold ".concat(r)),i.font=r;var a=i.measureText(e),s=a.actualBoundingBoxAscent||this.fontSize,c=(t.width-a.width)/2;c<0&&(c=0);var l=t.height/2+s/2;if(l<0&&(l=0),this._canvasRuler){var d=this._canvasRuler.getRulerLines();if(d&&d.length>0){var u=d[0],p=u.position;Number.isFinite(u.position)||(p=0),Number.isFinite(u.position)&&(l=this.canvasSize.height-this.canvasSize.height*p/100)}}i.fillText(e,c,l,t.width)}},t.prototype.markDirty=function(e){!!this._isDirty!==e&&(this._isDirty=e,this.props.onChanged(e))},Object.defineProperty(t.prototype,"canvasSize",{get:function(){return this.props.canvasSize},enumerable:!1,configurable:!0}),t.prototype.toDataURL=function(){return this._canvas.toDataURL()},t.prototype.toImageData=function(){return c(this,void 0,void 0,function(){return l(this,function(e){return[2,f.DropFileAreaHelper.canvasToImageData(this._canvas)]})})},t}(d.Component);t.TypeTool=v},2222:(e,t,n)=>{"use strict";var o=n(46518),i=n(97751),r=n(79039),a=n(22812),s=n(655),c=n(67416),l=i("URL"),d=c&&r(function(){l.canParse()}),u=r(function(){return 1!==l.canParse.length});o({target:"URL",stat:!0,forced:!d||u},{canParse:function(e){var t=a(arguments.length,1),n=s(e),o=t<2||void 0===arguments[1]?void 0:s(arguments[1]);try{return!!new l(n,o)}catch(e){return!1}}})},2360:(e,t,n)=>{"use strict";var o,i=n(28551),r=n(96801),a=n(88727),s=n(30421),c=n(20397),l=n(4055),d=n(66119),u="prototype",p="script",g=d("IE_PROTO"),h=function(){},f=function(e){return"<"+p+">"+e+"</"+p+">"},m=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){try{o=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;b="undefined"!=typeof document?document.domain&&o?m(o):(t=l("iframe"),n="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):m(o);for(var i=a.length;i--;)delete b[u][a[i]];return b()};s[g]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[u]=i(e),n=new h,h[u]=null,n[g]=e):n=b(),void 0===t?n:r.f(n,t)}},2455:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},r=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.PersistentConnection=void 0;var a,s,c=n(7734),l=n(2882),d=n(53488);function u(e){return i(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return a?[3,5]:window.signalR?[3,4]:!e||"Debug"!==e&&"Trace"!==e?[3,2]:[4,(0,d.attachHeadJs)("https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/5.0.0/signalr.js","_ms_signalr")];case 1:return t.sent(),[3,4];case 2:return[4,(0,d.attachHeadJs)("https://cdnjs.cloudflare.com/ajax/libs/microsoft-signalr/5.0.0/signalr.min.js","_ms_signalr")];case 3:t.sent(),t.label=4;case 4:a=window.signalR,t.label=5;case 5:return[2]}})})}function p(){return i(this,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return s?[3,4]:(s=!0,window.$&&window.jQuery?[3,2]:[4,(0,d.attachHeadJs)("https://code.jquery.com/jquery-1.12.4.min.js","_jquery_1_12_4")]);case 1:e.sent(),e.label=2;case 2:return window.$&&window.$.connection?[3,4]:[4,(0,d.attachHeadJs)("https://ajax.aspnetcdn.com/ajax/signalr/jquery.signalr-2.2.2.min.js","_jquery_signalr")];case 3:e.sent(),e.label=4;case 4:return[2]}})})}var g=function(){function e(e,t,n,o,i,r){this._host=e,this._supportApi=t,this._clientId=n,this._reconnectInterval=o,this._webSocketUrl=i,this._isLegacyServer=r,this._pendingResponseHash={},this._isLegacyServer?this.initLegacyServer():this.initNetCoreServer()}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._host.logLevel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientId",{get:function(){return this._clientId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._connected},enumerable:!1,configurable:!0}),e.prototype.start=function(){return i(this,void 0,void 0,function(){var e=this;return r(this,function(t){switch(t.label){case 0:return this._isLegacyServer?[4,this.initLegacyServer()]:[3,2];case 1:return t.sent(),this._connection?(this._connection.start().done(function(){e._connected=!0,e.logDebug("start","SignalR(ASP.NET) Connected"),e.sendMessage(c.ClientMessageType.Start,{data:{clientId:e._supportApi.clientId,userName:e._host.currentUserName}})}).fail(function(t){e._connected=!1,e.logDebug("start","SignalR(ASP.NET) Not connected: "+t)}),[3,6]):(this.logError("start","SignalR client library not found."),[2]);case 2:return[4,this.initNetCoreServer()];case 3:return t.sent(),this._connection?[3,5]:(this._isLegacyServer=!0,[4,this.initLegacyServer()]);case 4:return t.sent(),this.start(),[2];case 5:this._connection.start().then(function(){e._connected=!0,e.logDebug("start","SignalR(ASP.NET Core) Connected"),e.sendMessage(c.ClientMessageType.Start,{data:{clientId:e._supportApi.clientId,userName:e._host.currentUserName}})}).catch(function(t){e._connected=!1,-1!==(t=t?t.message||t.toString():"Unspecified reason").indexOf("ASP.NET SignalR Server")?(e.logDebug("start","Fallback to ASP.NET SignalR Server."),e._isLegacyServer=!0,e.start()):e.logError("start","SignalR(ASP.NET Core) Not connected: "+t)}),t.label=6;case 6:return[2]}})})},e.prototype.stop=function(){this._connected&&(this.sendMessage(c.ClientMessageType.Stop,{data:{clientId:this._supportApi.clientId}}),this._connection.stop())},e.prototype.sendMessage=function(e,t){return i(this,void 0,void 0,function(){var n,i,a=this;return r(this,function(r){if(!this._connected)throw this._connection?new Error("Persistent connection has not been established."):new Error("SignalR is required for real-time collaboration. Please add a reference to the SignalR script, more details: https://docs.microsoft.com/en-us/aspnet/core/signalr/javascript-client");return n=o({correlationId:f(),clientId:this.clientId,type:e},t||{}),i=JSON.stringify(n),(this._isLegacyServer?this._legacyServerHub:this._connection).invoke("send",i).then(function(t){a.logDebug("sendMessage",e+" success."+(t?" "+t:""))},function(e){a.logError("sendMessage",e)}),[2]})})},e.prototype.sendRequest=function(e,t){return i(this,void 0,void 0,function(){var n=this;return r(this,function(i){if(!this._connected)throw this._connection?new Error("Persistent connection has not been established."):new Error("SignalR is required for real-time collaboration. Please add a reference to the SignalR script, more details: https://docs.microsoft.com/en-us/aspnet/core/signalr/javascript-client");return[2,new Promise(function(i,r){var a=f();n._pendingResponseHash[a]={resolve:i,reject:r};var s=o({correlationId:a,clientId:n.clientId,type:e},t||{}),c=JSON.stringify(s);try{(n._isLegacyServer?n._legacyServerHub:n._connection).invoke("send",c).then(function(t){n.logDebug("sendRequest",e+" success."+(t?" "+t:""))},function(e){n.logError("sendRequest",e),r(e)})}catch(e){n.logError("sendRequest",e),r(e)}})]})})},e.prototype.logError=function(e,t){try{this._host.plugin.logError(e,t)}catch(e){}},e.prototype.logDebug=function(e,t){try{this._host.plugin.logDebug(e,t)}catch(e){}},e.prototype.onServerMessage=function(e){var t,n,o=e.correlationId;o&&this._pendingResponseHash[o]?(e.type===l.ServerMessageType.Error?this._pendingResponseHash[o].reject(null!==(n=null===(t=e.data)||void 0===t?void 0:t.toString())&&void 0!==n?n:"Empty server error message"):this._pendingResponseHash[o].resolve(e.data),delete this._pendingResponseHash[o]):this._supportApi.onPushMessage(e)},e.prototype.initLegacyServer=function(){return this._legacyServerPromise||(this._legacyServerPromise=this.initLegacyServerInternal()),this._legacyServerPromise},e.prototype.initNetCoreServer=function(){return this._netCoreServerPromise||(this._netCoreServerPromise=this.initNetCoreServerInternal()),this._netCoreServerPromise},e.prototype.initNetCoreServerInternal=function(){return i(this,void 0,void 0,function(){var e,t,n,o,i,s=this;return r(this,function(r){switch(r.label){case 0:return e=this.logLevel,this.logDebug("initNetCoreServer","Log level: ".concat(e)),t=this._webSocketUrl||"/signalr",[4,u(e)];case 1:return r.sent(),a?(this.logDebug("initNetCoreServer","Using SignalR URL: ".concat(t)),n=(new a.HubConnectionBuilder).withUrl(t),e&&(o=void 0!==a.LogLevel[e]?a.LogLevel[e]:a.LogLevel.None,n=n.configureLogging(o)),this._connection=n.build(),this._connection.on("send",function(e){return s.onServerMessage(JSON.parse(e))}),i=function(){s.logDebug("HubConnection","Reconnecting after timeout...");try{s._connection.start().then(function(){s.logDebug("HubConnection","Reconnected successfully"),s._connected=!0,s.logDebug("HubConnection","Notifying server about success reconnect..."),s.sendMessage(c.ClientMessageType.Reconnect,{data:{clientId:s._supportApi.clientId,userName:s._host.currentUserName}})}).catch(function(e){s.logDebug("HubConnection","Cannot reconnect: "+e),s.logDebug("HubConnection","The client will try to reconnect after ".concat(s._reconnectInterval/1e3," seconds.")),setTimeout(i,s._reconnectInterval)})}catch(e){s.logError("HubConnection.onclose",e)}},this._connection.onclose(function(){s._connected=!1,s._connection?s._reconnectInterval&&s._reconnectInterval>0?(s.logDebug("HubConnection","Disconnected. The client will try to reconnect after ".concat(s._reconnectInterval/1e3," seconds.")),setTimeout(i,s._reconnectInterval)):s.logDebug("HubConnection","Disconnected. Auto reconnect is not enabled."):s.logDebug("HubConnection","Disconnected. The connection disposed.")}),this._connection.onreconnected(function(e){s.logDebug("HubConnection",'Connection reestablished. Connected with connectionId "'.concat(e,", state ").concat(s._connection.state,".")),s.logDebug("HubConnection","Notifying server about success reconnect..."),s.sendMessage(c.ClientMessageType.Reconnect,{data:{clientId:s._supportApi.clientId,userName:s._host.currentUserName}})}),[2]):[2]}})})},e.prototype.initLegacyServerInternal=function(){return i(this,void 0,void 0,function(){var e,t,n,o,i,a=this;return r(this,function(r){switch(r.label){case 0:return e=this.logLevel,this.logDebug("initLegacyServer","Log level: ".concat(e)),[4,p()];case 1:return r.sent(),window.$&&window.$.connection?(t=this._webSocketUrl||"/signalr",window.$.connection.hub.url=t,n=t.replace(/\/signalr\/?$/i,"").replace(/\/$/,""),this.logDebug("initLegacyServer",n?"Using SignalR URL: ".concat(t,", base URL: ").concat(n):"Using SignalR URL: ".concat(t)),o=window.$.hubConnection(n),!e||"Trace"!==e&&"Debug"!==e&&"Information"!==e||(o.logging=!0),o.connectionSlow(function(){a.logDebug("$.connection.hub","Connection is slow")}),o.reconnecting(function(){a._connected=!1,a.logDebug("$.connection.hub","Reconnecting"),a._host.plugin.raiseStateChanged()}),o.reconnected(function(){a.logDebug("$.connection.hub","Reconnected")}),o.disconnected(function(){a._connected=!1,a._connection?a._reconnectInterval&&a._reconnectInterval>0?(a.logDebug("$.connection.hub","Disconnected. The client will try to reconnect after ".concat(a._reconnectInterval/1e3," seconds.")),setTimeout(function(){a.logDebug("$.connection.hub","Reconnecting after timeout..."),a._connection.start().done(function(){a._connected=!0,a.logDebug("$.connection.hub","Reconnected successfully"),a.sendMessage(c.ClientMessageType.Reconnect,{data:{clientId:a._supportApi.clientId,userName:a._host.currentUserName}})}).fail(function(e){a._connected=!1,a.logDebug("$.connection.hub","Cannot reconnect: "+e)})},a._reconnectInterval)):a.logDebug("$.connection.hub","Disconnected. Auto reconnect is not enabled."):a.logDebug("$.connection.hub","Disconnected. The connection disposed.")}),(i=o.createHubProxy("gcPdfViewerHub")).on("send",function(e){return a.onServerMessage(JSON.parse(e))}),this._legacyServerHub=i,this._connection=o,[2]):[2]}})})},e}();t.PersistentConnection=g;var h=0;function f(){return isFinite(++h)||(h=1),h.toString()}},2531:function(e,t,n){"use strict";var o,i=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},a=this&&this.__generator||function(e,t){var n,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(i=2&s[0]?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPanelBase=void 0;var s=n(96540),c=n(64890),l=n(63351),d="search-result__selected",u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onQueryInputChange=function(e){e&&e.target&&t.updateText(e.target.value)},t.onKeyPress=function(e){(e||e.target)&&(114===e.keyCode||(e.ctrlKey||e.metaKey||e.altKey)&&70===e.keyCode?e.preventDefault():27===e.keyCode?t.onEscKey():13===e.keyCode&&(t.searchWorker.dispatch({type:"UpdateText",payload:{text:e.target.value}}),t.onEnterKey()))},t}return i(t,e),Object.defineProperty(t.prototype,"searcher",{get:function(){return this.viewer.searcher},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewer",{get:function(){return this.props.viewer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"eventBus",{get:function(){return this.viewer.eventBus},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"i18n",{get:function(){return this.viewer.in17n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replaceMode",{get:function(){return!!this.searchWorker.searchStore.state.replaceMode},set:function(e){this.searchWorker.dispatch({type:"UpdateReplaceMode",payload:{replaceMode:e}})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"replaceWith",{get:function(){return this.searchWorker.searchStore.state.replaceWith||""},set:function(e){this.searchWorker.dispatch({type:"UpdateReplaceWith",payload:{replaceWith:e}})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchWorker",{get:function(){return this.props.searchWorker},enumerable:!1,configurable:!0}),t.prototype.componentDidMount=function(){this._mounted=!0,this.bindEvents()},t.prototype.componentWillUnmount=function(){this.resetResults(),this._mounted=!1,this.unbindEvents()},t.prototype.replaceNext=function(){return r(this,void 0,void 0,function(){var e,t;return a(this,function(n){switch(n.label){case 0:return e=this.state.replaceWith,(t=this.searcher.selectedSearchResult)&&void 0!==e?this.replaceHelper.replaceSearchResults([t],e,!1)>0?[4,this.onEnterKey()]:[3,3]:[3,4];case 1:return n.sent(),[4,this.searcher.highlight(this.searcher.getSearchResultByIndex(t.overallIndex+1))];case 2:return n.sent(),this.forceUpdate(),[3,4];case 3:alert(this.viewer.in17n.t("floating-replace-bar.replace-next.nothing-to-replace","The current selection has already been replaced or does not match the search criteria.")),n.label=4;case 4:return[2]}})})},Object.defineProperty(t.prototype,"replaceHelper",{get:function(){return this._replaceHelper||(this._replaceHelper=new c.ReplaceHelper(this.viewer)),this._replaceHelper},enumerable:!1,configurable:!0}),t.prototype.replaceAll=function(){return r(this,void 0,void 0,function(){var e,t;return a(this,function(n){return e=this.searcher.allResults,t=this.state.replaceWith,this.replaceHelper.replaceSearchResults(e,t,!0),[2]})})},t.prototype.bindEvents=function(){this._onDocumentLoadHandler||(this._onDocumentLoadHandler=this.onDocumentLoad.bind(this),this.eventBus._on("documentload",this._onDocumentLoadHandler)),this._onSupportApiConnectedHandler||(this._onSupportApiConnectedHandler=this.onSupportApiConnected.bind(this),this.eventBus._on("supportapi-document-opened",this._onSupportApiConnectedHandler))},t.prototype.unbindEvents=function(){this._onDocumentLoadHandler&&(this.eventBus._off("documentload",this._onDocumentLoadHandler),delete this._onDocumentLoadHandler),this._onSupportApiConnectedHandler&&(this.eventBus._off("supportapi-document-opened",this._onSupportApiConnectedHandler),delete this._onSupportApiConnectedHandler)},t.prototype.onDocumentLoad=function(){return r(this,void 0,void 0,function(){var e;return a(this,function(t){switch(t.label){case 0:return e=this._mounted&&!this._optionsDirty&&!!this.state.options.Text,[4,this.resetResults()];case 1:return t.sent(),e?[4,this.onEnterKey()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}})})},t.prototype.onSupportApiConnected=function(e){return r(this,void 0,void 0,function(){return a(this,function(e){return this._mounted&&this.forceUpdate(),[2]})})},t.prototype.onOptionToggle=function(e,t){this._optionsDirty=!0,this.searchWorker.dispatch({type:"UpdateOption",payload:{option:e,value:t}}),"HighlightAll"===e&&(this.searcher.highlightAll=t)},t.prototype.resetResults=function(){var e;return r(this,void 0,void 0,function(){var t;return a(this,function(n){switch(n.label){case 0:this._optionsDirty=!0,n.label=1;case 1:return n.trys.push([1,3,,4]),this.searchWorker.dispatch({type:"ResetResults"}),this.searcher.resetResults(),[4,this.searcher.highlight(null)];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),null===(e=this.viewer)||void 0===e||e.logError("resetResults","Error during the search results reset operation: "+t),[3,4];case 4:return[2]}})})},t.prototype.setOptions=function(e){if(e)for(var t in this._optionsDirty=!0,e)"Text"===t?this.updateText(e[t]):this.searchWorker.dispatch({type:"UpdateOption",payload:{option:t,value:e[t]}})},t.prototype.updateText=function(e){this._optionsDirty=!0,this.searchWorker.dispatch({type:"UpdateText",payload:{text:e}})},t.prototype.onEscKey=function(){return r(this,void 0,void 0,function(){return a(this,function(e){return this.resetResults(),this.viewer.searcher.close(),[2]})})},t.prototype.onEnterKey=function(){return r(this,void 0,void 0,function(){return a(this,function(e){switch(e.label){case 0:return[4,this.onSearchBtnClick()];case 1:return e.sent(),[2]}})})},t.prototype.getBriefResultsInfo=function(){var e=this.viewer.in17n,t=this.state||{},n=t.options||{},o=t.status,i=Math.max(1,this.searcher.selectedSearchResultIndex+1),r=this.searcher.totalResultsCount;return r>0?e.t("floating-search-bar.result-label.label-format","{{num}}/{{totalCount}}",{num:i,totalCount:r}):n.Text&&"inprogress"!==o&&"cancelled"!==o&&"suspended"!==o?e.t("floating-search-bar.result-label.not-found","Query not found"):""},t.prototype.updateBriefResultsInfo=function(e){var t,n=null===(t=this.outerDiv)||void 0===t?void 0:t.querySelector(".info-label span");n&&(n.textContent=void 0!==e?e:this.getBriefResultsInfo())},t.prototype.highlightNextSearchResult=function(e){return r(this,void 0,void 0,function(){var t,n,o,i,r;return a(this,function(a){switch(a.label){case 0:return t=this.state,n=t.results,o=t.status,i=this.searcher.selectedSearchResultIndex,"cancelled"!==o&&n.length>0?(e?--i<0&&(i=n.length-1):++i>n.length-1&&(i=0),r=n[i],[4,this.onResultClick(r)]):[3,2];case 1:return a.sent(),this.updateBriefResultsInfo(),[3,4];case 2:return[4,this.onResultClick(null)];case 3:a.sent(),a.label=4;case 4:return[2]}})})},t.prototype.onSearchBtnClick=function(){return r(this,void 0,void 0,function(){var e,t,n,o;return a(this,function(i){switch(i.label){case 0:return this._optionsDirty=!1,e=this.state,t=e.options,n=e.status,o=null==t.Text||""===t.Text.trim(),"inprogress"===n||o?[3,2]:(this.searchWorker.dispatch({type:"Started"}),this.searchWorker.beginSearch(t),[4,this.searchWorker.searchNext()]);case 1:return i.sent(),[3,3];case 2:"inprogress"===n&&this.searchWorker.cancel("cancel pressed"),i.label=3;case 3:return[2]}})})},t.prototype.loadMoreResults=function(e){return r(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return[4,this.searchWorker.searchNext(e)];case 1:return[2,t.sent()]}})})},t.prototype.onResultClick=function(e){return r(this,void 0,void 0,function(){return a(this,function(t){switch(t.label){case 0:return[4,this.searchWorker.onResultClick(e)];case 1:return t.sent(),this.ensureSelectedResultClass(e),[2]}})})},t.prototype.ensureSelectedResultClass=function(e){if(this.outerDiv){var t=this.outerDiv.querySelector("."+d);if(t&&t.classList.remove(d),e){var n=this.outerDiv.querySelector('.search-result[data-id="'+(0,l.getResultId)(e)+'"]');n&&n.classList.add(d)}}},t}(s.Component);t.SearchPanelBase=u},2877:(e,t,n)=>{"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function i(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}n.d(t,{AV:()=>u,KE:()=>h,Tu:()=>g,XJ:()=>c,eB:()=>p,hh:()=>a,pS:()=>l,yV:()=>r});const r=e=>{const{clientHeight:t}=e,{paddingTop:n,paddingBottom:o}=getComputedStyle(e);return t-parseFloat(n)-parseFloat(o)},a=e=>{const{clientWidth:t}=e,{paddingLeft:n,paddingRight:o}=getComputedStyle(e);return t-parseFloat(n)-parseFloat(o)};let s=0;const c=()=>{if(0!==s)return s;if("undefined"!=typeof document){const e=document.createElement("div");u(e,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(e),s=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else s=0;return s||0},l=function(){const e=[];for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t],o=typeof n;n&&("string"===o||"number"===o?e.push(`${n}`):Array.isArray(n)&&n.length?e.push(l(n)):"object"===o&&Object.keys(n).forEach(t=>n[t]&&e.push(t)))}return e.join(" ")},d=["animationiterationcount","boxflex","boxflexgroup","boxordinalgroup","columncount","fillopacity","flex","flexgrow","flexpositive","flexshrink","flexnegative","flexorder","gridrow","gridcolumn","fontweight","lineclamp","lineheight","opacity","order","orphans","stopopacity","strokedashoffset","strokeopacity","strokewidth","tabsize","widows","zindex","zoom"],u=(e,t)=>{e&&e.style&&Object.keys(t).forEach(n=>{"string"==typeof t[n]?e.style[n]=t[n]:d.includes(n.toLowerCase())?e.style[n]=`${t[n]}`:e.style[n]=`${t[n]}px`})};let p=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.blockName=t,this.modifier=e=>`${this.name}--${e}`,this.element=t=>new e(`${this.name}__${t}`)},(t=[{key:"name",get:function(){return this.blockName}}])&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();const g=e=>[e,t=>`${e}--${t}`,t=>g(`${e}__${t}`)],h=e=>g(e)},2882:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerMessageType=void 0,function(e){e[e.Information=10]="Information",e[e.Error=11]="Error",e[e.Modifications=20]="Modifications",e[e.SharedDocumentsListChanged=45]="SharedDocumentsListChanged",e[e.UserAccessListResponse=100]="UserAccessListResponse",e[e.SharedDocumentsListResponse=101]="SharedDocumentsListResponse",e[e.AllUsersListResponse=102]="AllUsersListResponse",e[e.OpenSharedDocumentResponse=103]="OpenSharedDocumentResponse",e[e.StartSharedModeResponse=104]="StartSharedModeResponse",e[e.StopSharedModeResponse=105]="StopSharedModeResponse"}(t.ServerMessageType||(t.ServerMessageType={}))},2945:(e,t,n)=>{"use strict";var o=n(46518),i=n(22195),r=n(97751),a=n(79504),s=n(69565),c=n(79039),l=n(655),d=n(22812),u=n(92804).c2i,p