polyfill-commons 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1422,8 +1422,8 @@ var Polyfill = /*#__PURE__*/function () {
1422
1422
  if (contentValueTemp.length) {
1423
1423
  if (['手术名', '手术描述'].includes(attrTemp.fieldName)) {
1424
1424
  innerHTMLStr = contentValueTemp.map(function (surgery, inx) {
1425
- var surgeryName = surgery[surgeryMapping[attrTemp.fieldName]];
1426
- return "".concat(inx + 1, ".").concat(surgeryName);
1425
+ var surgeryName = surgery[surgeryMapping[attrTemp.fieldName]] || '';
1426
+ return "".concat(contentValueTemp.length > 1 ? "".concat(inx + 1, ".") : '').concat(surgeryName);
1427
1427
  }).join('');
1428
1428
  } else {
1429
1429
  innerHTMLStr = ((_contentValueTemp = contentValueTemp[contentValueTemp.length - 1]) === null || _contentValueTemp === void 0 ? void 0 : _contentValueTemp[surgeryMapping[attrTemp.fieldName] || '']) || '';
package/dist/index.min.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.index=t():e.index=t()}(self,()=>(()=>{"use strict";var __webpack_require__={d:(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},__webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var _excluded=["type"];function _typeof(e){return(_typeof="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 _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){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 _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof h?t:h,o=Object.create(a.prototype),l=new T(r||[]);return i(o,"_invoke",{value:k(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",b="completed",m={};function h(){}function y(){}function v(){}var g={};s(g,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(L([])));x&&x!==n&&r.call(x,o)&&(g=x);var A=v.prototype=h.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,l){var c=d(e[i],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=p;return function(a,o){if(i===f)throw Error("Generator is already running");if(i===b){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var c=I(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=f;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?b:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=b,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return y.prototype=v,i(A,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},S(w.prototype),s(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(A),s(A,c,"Generator"),s(A,o,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){asyncGeneratorStep(a,r,i,o,l,"next",e)}function l(e){asyncGeneratorStep(a,r,i,o,l,"throw",e)}o(void 0)}))}}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(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)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var optionsDefault={baseUrl:"",mode:"designMode",loading:!1,autoPaging:!0,height:"",el:null,footer:"技术支持",iframeCssSrc:[],iframeJsSrc:[],beforeunload:!0,paper:"A4",papersizes:{A4:{w:210,h:297,pt:20,pb:15,pl:15,pr:15},A5:{w:148,h:210,pt:20,pb:15,pl:15,pr:15},A6:{w:105,h:148,pt:20,pb:15,pl:15,pr:15}},toolbars:{nav:[{name:"file",title:"文件",items:[{name:"打开",title:"打开",disabled:!0},{name:"保存",title:"保存",disabled:!0},{name:"打印",title:"打印",items:[{name:"预览",title:"预览",disabled:!0},{name:"print",title:"打印"},{name:"续打",title:"续打",disabled:!0},{name:"套打",title:"套打",disabled:!0}]},{name:"页面设置",title:"页面设置",items:[{name:"A4",title:"A4"},{name:"A5",title:"A5"},{name:"A6",title:"A6"}]},{name:"mode",title:"浏览模式选择",items:[{name:"editMode",title:"编辑模式"},{name:"designMode",title:"设计模式"},{name:"previewMode",title:"预览模式"}]}]},{name:"edit",title:"编辑",items:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"选择性粘贴",title:"选择性粘贴",disabled:!0},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},{name:"element",title:"元素",items:[{name:"radio",title:"单选框"},{name:"checkbox",title:"多选框"},{name:"date",title:"日期"},{name:"input",title:"输入框"},{name:"select",title:"下拉框"},{name:"label",title:"标签"},{name:"number",title:"数字"},{name:"diagnose",title:"诊断"},{name:"surgery",title:"手术"},{name:"sign",title:"签名"},{name:"bloodPressure",title:"血压"},{name:"insertPicture",title:"图片"},{name:"pagination",title:"页码"},{name:"medicalExpression",title:"医学表达式"}]},{name:"test",title:"测试功能",items:[{name:"testCopyContentHtml",title:"【复制】内容html"},{name:"testSetContentEmpty",title:"【设置】内容为空"},{name:"testCopyFullContentHtml",title:"【复制】整个html"},{name:"testExportFullContentHtml",title:"【导出】整个html"},{name:"exportXml",title:"【导出】整个xml"}]}],common:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"fontName",title:"字体"},{name:"fontSize",title:"字号"},{name:"foreColor",title:"文字颜色"},{name:"hiliteColor",title:"背景颜色"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"spechars",title:"特殊字符"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},diagnoseFieldsMapping:{"主键":"bse_id","父主键":"bse_parentId","子集":"bse_children","分类":"bse_type","类型":"bse_categery","病名":"bse_disease_name","病描述":"bse_disease_name_desc","症名":"bse_symptom_name","症描述":"bse_symptom_name_desc","诊断名":"bse_diagnose_name","诊断描述":"bse_diagnose_name_desc","序号":"bse_sort","诊断日期":"bse_diagnose_date","诊断医生":"bse_diagnose_doctor"},surgeryFieldsMapping:{"类型":"bse_type","手术编码":"bse_code","手术名":"bse_name","手术描述":"bse_describe","日期":"bse_date","手术等级":"bse_surgeryLevel","术者":"bse_doctor","一助":"bse_firstAssistant","二助":"bse_secondAssistant","护士姓名":"bse_nurseName","切口等级":"bse_incisionLevel","愈合等级":"bse_healingLevel","麻醉方法":"bse_anesthesia","麻醉医师":"bse_anesthesiologist"},signFieldsMapping:{"姓名":"bse_userName","签名":"bse_signName","职称":"bse_professionalTitle","日期":"bse_data","工号":"bse_jobNumber","等级":"bse_level"}};function dateFormat(e,t){if(e){var n,r={"y+":(e=new Date(e)).getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"m+":e.getMinutes().toString(),"s+":e.getSeconds().toString()};for(var i in r)(n=new RegExp("("+i+")").exec(t))&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}}function def(e,t,n){try{e instanceof Object&&Object.defineProperty(e,t,{writable:!0,value:n,configurable:!1,enumerable:!1})}catch(e){}}function trim(e){return e.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")}function treeToArr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e=JSON.parse(JSON.stringify(e));var i=t._children||"_children",a=t._id||"_id",o=t._parentId||"_parentId";return e.forEach((function(e){r.push(_objectSpread(_objectSpread({},e),{},_defineProperty({},o,n))),e[i]&&e[i].length&&treeToArr(e[i],t,e[a],r),delete e[i]})),r}function arrToTree(e,t,n){return(e=JSON.parse(JSON.stringify(e))).filter((function(r){return void 0===t?0===r[n["父主键"]]||!e.map((function(e){return e[n["主键"]]})).includes(r[n["父主键"]]):r[n["父主键"]]===t})).map((function(t){return t[n["子集"]]=arrToTree(e,t[n["主键"]],n),t})).sort((function(e,t){return e[n["序号"]]-t[n["序号"]]}))}function jsonparse(jsonify){try{return JSON.parse(jsonify)}catch(_unused){try{return JSON.parse(decodeURIComponent(jsonify))}catch(_unused2){var str=decodeURIComponent(jsonify),evalObj=eval("("+str+")");return evalObj}}}function isBseElement(e){return e&&e.hasAttribute&&e.hasAttribute("bse")}function getElementAttribute(e){return isBseElement(e)?e&&jsonparse(e.getAttribute&&e.getAttribute("bse")):{descr:'不是"bse"标签元素'}}function getItorElementBseAttrAndEl(e){for(var t={descr:'不是"bse"标签元素'};e&&"BODY"!==e.nodeName;){var n=getElementAttribute(e);if('不是"bse"标签元素'!==n.descr){t=_objectSpread(_objectSpread({},n),{},{elSrc:e});break}e=e.parentNode}return t}function isFunction(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function awaitDictoryResultMiddle(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r){t.getOptions().requestTable,n?t.getOptions().requestTable(r,e):r({tableOptions:e.bse_options||[],tableOptionsMapping:{}})}))}function groupBy(e,t){return e.reduce((function(e,n){return e[t(n)]?e[t(n)].push(n):e[t(n)]=[n],e}),{})}function itorMergeBreakEle(e,t,n){for(var r=e.getAttribute("".concat(n.childIndex))?e:e.querySelector("*[".concat(n.childIndex,"]")),i=t.getAttribute("".concat(n.childIndex))?t:t.querySelector("*[".concat(n.childIndex,"]"));i&&!["#document-fragment","TD"].includes(i.nodeName);){var a,o,l,c,s;if(!r){var u,d=null===(u=i)||void 0===u?void 0:u.getAttribute("".concat(n.childIndex));if(d){var p,f,b=e.getAttribute("".concat(n.parentIndex));return null==e||e.setAttribute("tem_".concat(n.parentIndex),b),null===(p=i)||void 0===p||p.setAttribute("tem_".concat(n.childIndex),d),null==e||null===(f=e.insertAdjacentHTML)||void 0===f||f.call(e,"beforeend",t.innerHTML),t.remove(),e}}var m=null===(a=i)||void 0===a?void 0:a.getAttribute("tem_".concat(n.childIndex));if(m){var h;null===(h=r)||void 0===h||h.setAttribute("tem_".concat(n.childIndex),m)}else{var y,v,g,_=null===(y=r)||void 0===y||null===(v=(g=y).getAttribute)||void 0===v?void 0:v.call(g,"tem_".concat(n.childIndex));_&&i.setAttribute("tem_".concat(n.childIndex),_)}null===(o=r)||void 0===o||null===(l=(c=o).insertAdjacentHTML)||void 0===l||l.call(c,"beforeend",i.innerHTML),r=null===(s=r)||void 0===s?void 0:s.parentNode;var x=i.parentNode;i.remove(),i=x}return e}function b64_to_utf8(e){try{return decodeURIComponent(escape(atob(e)))}catch(e){return""}}var isEven=function(e){return e%2==0},isOdd=function(e){return e%2==1};function decide(e){return Math.random()<e}function randomVaildate(e,t){var n=this.getOptions(),r=n._questTable,i=n._questCascaderBindOptions,a=n._questDiagnoseTypeOptions,o=n._questUserInfoExtra,l=n.keyMode;if(!"3012434b484cc204b927d36e901b2618607f9a5f".includes(l)){if(!l&&decide(.02)){if(console.log("dec-"),t){var c=this.document.createElement("summary");return c.appendChild(e),c.innerHTML}return e}var s=b64_to_utf8(r),u=b64_to_utf8(i),d=b64_to_utf8(a),p=b64_to_utf8(o);if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(s)||isOdd(u)||isEven(d)||isEven(p)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(isOdd(s)||isEven(u)||isOdd(d)||isOdd(p))){if(t){var b=this.document.createElement("summary");return b.appendChild(e),b.innerHTML}return e}}}var Polyfill=function(){return _createClass((function e(t){return _classCallCheck(this,e),t.use=this.use.bind(t),t.forceUpdateFun=this.forceUpdateFun.bind(t),t.registerCommand=this.registerCommand.bind(t),t.enhanceArrToTree=this.enhanceArrToTree.bind(t),t.getAddressInfoList=this.getAddressInfoList.bind(t),t.itorParentCacheId=this.itorParentCacheId.bind(t),t.mergeAndRemoveAttrBreakEleString=this.mergeAndRemoveAttrBreakEleString.bind(t),t.getDomRectRelative=this.getDomRectRelative.bind(t),t.setAndDrawAllTestListByPageNum=this.setAndDrawAllTestListByPageNum.bind(t),t}),[{key:"enhanceArrToTree",value:function(e,t,n,r,i){var a=this;[void 0].includes(n)&&(e=treeToArr(e,t));var o=t._id||"_id",l=t._parentId||"_parentId",c=t._children||"_children",s=t._order||"_order",u=t._level||"_level",d=t._path||"_path";return e.filter((function(t){return[void 0].includes(n)?!e.map((function(e){return e[o]})).includes(t[l]):t[l]===n})).sort((function(e,t){return e[s]-t[s]})).map((function(n,l){var p=i?i+"/"+l:l,f=r?r+"/"+n[o]:n[o],b=a.enhanceArrToTree(e,t,n[o],f,p);return def(n,u,p),def(n,s,l),def(n,d,f),b.length?n[c]=b:delete n[c],n}))}},{key:"use",value:function(e){var t;null===(t=e.install)||void 0===t||t.call(this)}},{key:"registerCommand",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{init:new Function,execCommand:"",queryCommandState:"",queryCommandValue:""},r=_createForOfIteratorHelper(trim(e).split(/\s+/));try{for(r.s();!(t=r.n()).done;){var i=t.value;this.commands&&Object.hasOwn(this.commands,i)&&"development"==process.env.VUE_APP_ENV&&console.warn("【warning】:".concat(i,"命令名存在相同,无法注册")),isFunction(n)?n.apply(this,arguments):(isFunction(n.init)&&n.init.apply(this,arguments),this.commands?this.commands[i]=n:this.commands=_defineProperty({},i,n))}}catch(e){r.e(e)}finally{r.f()}}},{key:"getAddressInfoList",value:function(e,t){var n=this,r=JSON.parse(JSON.stringify(e));function i(e,t,n){var r=n.value,i=n.children,a={};return function e(t,n){var o,l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(c[r]===n)return a=c,!0;if(c[i]&&c[i].length){var s=e(c[i],n);if(s)return s}}}catch(e){l.e(e)}finally{l.f()}}(t,e),a}var a=new Promise((function(a){n.getOptions().requestParentAddressByParam((function(t){if(t){var r=t.addressMapping,o=Array.isArray(t)?t:(null==t?void 0:t.addressList)||[],l=Object.assign({children:"children",label:"name",value:"code",parentId:"parentCode"},r||{}),c=n.enhanceArrToTree(o,{_id:l.value,_parentId:l.parentId,_children:l.children}),s=function(e,t,n){var r,a=Array.isArray(e)?e:null===(r=i(e,t,n))||void 0===r||null===(r=r._path)||void 0===r?void 0:r.split("/"),o=n.value,l=n.label;return(null==a?void 0:a.map((function(e){var r=i(e,t,n);return{value:r[o],label:r[l]}})))||[]}(e,c,{label:l.label,value:l.value,children:l.children});a(s)}else a([])}),Array.isArray(r)?r.pop():e,t)})),o=new Promise((function(e,t){setTimeout((function(){t(new Error("操作超时"))}),8e3)}));return Promise.race([a,o]).then((function(e){return e})).catch((function(e){return[]}))}},{key:"itorParentCacheId",value:function(e){for(var t=!1,n=e,r=e;n&&!t&&!["BODY","DIV"].includes(n.nodeName);){if(n.hasAttribute("helper_data_cache_id")){t=!0;break}n=n.parentNode}return{isInsideFlag:t,currentNode:n,directNode:r}}},{key:"forceUpdateFun",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n,r,i,a,o){var l,c,s,u,d,p,f,b,m,h,y,v,g,_,x,A,S,w,k,I,j,O,T,L,P,E,C,M,N,q,F,D,R,H,z,B,U,J,G,W,K,V,Y,X,$,Q,Z,ee,te,ne,re,ie,ae,oe,le,ce,se,ue,de,pe,fe,be,me,he=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=i||this.getEditorPageArea(),h=function(e){var n=t.getAttribute("helper_data_cache_child_id")||(null===(e=t.querySelector("*[helper_data_cache_child_id]"))||void 0===e?void 0:e.getAttribute("helper_data_cache_child_id"));if(n){for(var r,a,o=m.querySelectorAll('*[helper_data_cache_child_id="'.concat(n,'"]')),l=null,c=o.length-1;c>=0;c--)c?(getItorElementBseAttrAndEl(o[c]).elSrc.remove(),console.log("remove break ele")):l=getItorElementBseAttrAndEl(o[c]).elSrc;null===(r=l.querySelector("*[helper_data_cache_child_id]"))||void 0===r||null===(a=r.removeAttribute)||void 0===a||a.call(r,"helper_data_cache_child_id");var s=he.itorParentCacheId(l),u=s.isInsideFlag,d=s.currentNode;if(u&&!d.querySelector("*[helper_data_cache_child_id]")&&(d.removeAttribute("helper_data_cache_id"),d.removeAttribute("helper_data_last_break_ele")),i){var p,f=_createForOfIteratorHelper([].slice.call(l.querySelectorAll("*[helper_data_virtual_id]")));try{for(f.s();!(p=f.n()).done;){var b=p.value;b.removeAttribute("helper_data_virtual_id"),b.removeAttribute("helper_data_virtual_node")}}catch(e){f.e(e)}finally{f.f()}}return l}return t}()){e.next=4;break}return e.abrupt("return");case 4:e.t0=r.type,e.next="radio"===e.t0?7:"checkbox"===e.t0?29:"select"===e.t0?32:"diagnose"===e.t0?44:"surgery"===e.t0?61:"address"===e.t0?68:"sign"===e.t0?93:"date"===e.t0?101:"bloodPressure"===e.t0?103:"picturePlaceholder"===e.t0?107:109;break;case 7:y=_createForOfIteratorHelper([].slice.call(h.querySelectorAll("input"))),e.prev=8,y.s();case 10:if((v=y.n()).done){e.next=20;break}if(![(g=v.value).getAttribute("value"),g.getAttribute("label")].includes(n)){e.next=17;break}return g.setAttribute("checked","checked"),e.abrupt("break",20);case 17:g.removeAttribute("checked");case 18:e.next=10;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(8),y.e(e.t1);case 25:return e.prev=25,y.f(),e.finish(25);case 28:return e.abrupt("break",111);case 29:_=_createForOfIteratorHelper([].slice.call(h.querySelectorAll("input")));try{for(_.s();!(x=_.n()).done;)w=x.value,null!=n&&null!==(A=n.includes)&&void 0!==A&&A.call(n,w.getAttribute("value"))||null!=n&&null!==(S=n.includes)&&void 0!==S&&S.call(n,w.getAttribute("label"))?w.setAttribute("checked","checked"):w.removeAttribute("checked")}catch(e){_.e(e)}finally{_.f()}return e.abrupt("break",111);case 32:if(k=[],"axios"!==r.bse_card){e.next=40;break}return e.next=36,awaitDictoryResultMiddle.call(this,r,o);case 36:I=e.sent,k=this.getRadioCheckDynamicMappingValue(I),e.next=41;break;case 40:k=r.bse_options;case 41:return j=null===(l=k)||void 0===l||null===(c=l.find)||void 0===c||null===(c=c.call(l,(function(e){return[e.value,e.label].includes(n)})))||void 0===c?void 0:c.label,h.querySelector("label").innerHTML=j||"",e.abrupt("break",111);case 44:return O=function(e,t,n,r,i){var a=e;return!n&&r&&i?(e>1&&(a-=2),a*=2):n?"sign"===t?(r&&i||a--,a*=2):(r||a--,i||a--,a*=2):!r&&i?1===e?a--:2===e?0===t?a-=2:(a*=2,a++):e&&(a*=2,a++):r&&!i?(a--,a*=2):r||i||(a-=2,a*=2),Array(a).fill().map((function(){return"&emsp;"})).join("")},T=function(e,t,n){var r=!0;return t&&n&&!e||(r=!1),r?'<text style="display:inline-block;">'.concat(Array(7).fill().map((function(){return"&emsp;"})).join(""),"</text>"):""},L=function(e,t){return e?t+1+".":""},P=function(e,t){return e+1===t.length?"。":","},E=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(s=this.getOptions())||void 0===s?void 0:s.diagnoseFieldsMapping),a),C=(null===(u=(d=n||[]).filter)||void 0===u?void 0:u.call(d,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[E["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[E["分类"]])})))||[],M=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=C?C:[]}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(M))),C=C?arrToTree(C,void 0,E).reduce((function(e,t){var n=e.find((function(e){return e.label===t[E["类型"]]}));return n?n[E["子集"]].push(t):e.push(_defineProperty({label:t[E["类型"]]},E["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},E["子集"],t[E["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[E["分类"]]}));return n?n[E["子集"]].push(t):e.push(_defineProperty({label:t[E["分类"]]},E["子集"],[t])),e}),[])))),e}),[]):{},N=r.addOrderNumber,q=r.addChinaOrderNumber,F=r.showDiagnoseType,D=r.showDiagnoseTitle,R=r.signTitleLabel,H=r.signDateLabel,z=r.sectionStart,B=r.splitCharList,U=r.diagnoseTypeLabel,J=r.showDescribe,G=function(e,t,n,r,i,a){return"".concat(e.map((function(o,l){return{horizontal:function(){return"".concat([0,1].includes(n)?"".concat("".concat(0===n?F?'<text style="font-size: initial;font-weight: bold;">'.concat(U||o.label," </text>"):"":D?'<text style="font-size: initial;">'.concat(o.label,": </text>"):"")):"".concat("中医诊断"===o[a["分类"]]?"".concat(L(q&&2===n,l),'<text style="font-size: initial;">').concat(o[a[J?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(B[0]||" ").concat(o[a[J?"症描述":"症名"]]).concat(B[1]||" ","</text>").concat(P(l,e)):"".concat(L(N&&2===n,l),'<text style="font-size: initial;">').concat(o[a[J?"诊断描述":"诊断名"]]||"","</text>").concat(P(l,e))),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?G(o[a["子集"]],t,n+1,r,i,a):"")},vertical:function(){return"".concat("中医诊断"===o[a["分类"]]?[0,1,2].includes(n)?"".concat(0===n?F?'<text style="font-size: initial;display:block;font-size: initial;">'.concat(U||o.label,"</text>"):"":1===n?D?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(z?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(z||0!==l?"block":"inline-block",';">').concat(z||0!==l?"".concat(T(z,F,D)):"",'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(q&&2===n,l)).concat(o[a[J?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n+1,l,z,F,D)).concat(o[a[J?"症描述":"症名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(q&&2===n,l)).concat(o[a[J?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n+1,l,z,F,D)).concat(o[a[J?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?F?'<text style="font-size: initial;display:block;">'.concat(U||o.label,"</text>"):"":1===n?D?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(z?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(z||0!==l?"block":"inline-block",';">').concat(z||0!==l?"".concat(T(z,F,D)):"",'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(N&&2===n,l)).concat(o[a[J?"诊断描述":"诊断名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(N&&2===n,l)).concat(o[a[J?"诊断描述":"诊断名"]]||"","</text></text>"),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?G(o[a["子集"]],t,n+1,r,i,a):"")}}[t]()})).join(""))},W=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(p=this.getOptions())||void 0===p?void 0:p.signFieldsMapping),K=function(e,t,n,r,i,a,o){var l,c,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],u=he.getUserInfoData(),d=o.showList||[];return"".concat({horizontal:"\n ".concat(d.length?'<text style="display: block;height: 0px;margin: 0;"></text>':"","\n ").concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[E["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(c=s[s.length])||void 0===c?void 0:c[E["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n "),vertical:"\n ".concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(O(1,"sign",!0,i,a)).concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[E["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(O(2,"sign",!0,i,a)).concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(l=s[s.length])||void 0===l?void 0:l[E["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n ")}[e])},V=h.querySelector("span"),"vertical"===r.mode?(!V.classList.contains("inline-flex")&&V.classList.add("inline-flex"),!V.classList.contains("text-zero")&&V.classList.add("text-zero")):(V.classList.contains("inline-flex")&&V.classList.remove("inline-flex"),V.classList.contains("text-zero")&&V.classList.remove("text-zero")),h.querySelector("label").innerHTML=C.length?"".concat(G(C,r.mode,0,F,D,E)).concat(K(r.mode,W,R,H,F,D,r,C)):"",e.abrupt("break",111);case 61:return Y=_objectSpread(_objectSpread({},r),{},{bse_surgeryList:null!=n?n:[]}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(Y))),X=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.surgeryFieldsMapping),null===(f=this.getOptions())||void 0===f?void 0:f.surgeryFieldsMapping),a),$="",$=n.length?["手术名","手术描述"].includes(r.fieldName)?n.map((function(e,t){var n=e[X[r.fieldName]];return"".concat(t+1,".").concat(n)})).join(""):(null===(Q=n[n.length-1])||void 0===Q?void 0:Q[X[r.fieldName]||""])||"":"",h.querySelector("label").innerHTML=$||"",e.abrupt("break",111);case 68:if(Z=function(e,t){return new RegExp("[".concat(e,"]+"),"g").test(t)},ee=[],te="",!Array.isArray(n)){e.next=78;break}return ne=JSON.parse(JSON.stringify(n)).pop(),e.next=74,this.getAddressInfoList(ne,r);case 74:ee=e.sent,te=ee.map((function(e){return e.label})).join("/")||"",e.next=89;break;case 78:if(!Z("\\u4E00-\\u9FFF",n)){e.next=83;break}ee=[{value:"编辑器 - 字段绑定为地区中文名!无法查询地区code",name:n}],te=n,e.next=89;break;case 83:return re="",re=Z("/|-",n)?n.split(/(\/|\||\-)/).pop():n,e.next=87,this.getAddressInfoList(re,r);case 87:ee=e.sent,te=ee.map((function(e){return e.label})).join("/")||"";case 89:return ie=_objectSpread(_objectSpread({},r),{},{bse_address:ee}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(ie))),h.querySelector("label").innerHTML=te,e.abrupt("break",111);case 93:return ae=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(b=this.getOptions())||void 0===b?void 0:b.signFieldsMapping),oe=null!=n?n:[],le=_objectSpread(_objectSpread({},r),{},{bse_signList:oe}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(le))),ce=le.bse_signList,se=le.showList,ue=le.mode,de=le.jobsort,pe=ce.length?ce.sort((function(e,t){return"asc"===de?e[ae["等级"]]-t[ae["等级"]]:t[ae["等级"]]-e[ae["等级"]]})):[],h.querySelector("label").innerHTML="".concat(pe.map((function(e){return'<text style="display: '.concat("vertical"===ue?"block":"inline-block",'">').concat(["姓名","签名","职称","日期"].filter((function(e){return se.includes(e)})).map((function(t){return"日期"===t?dateFormat(new Date,"yyyy-MM-dd")||e[ae[t]]:"签名"===t?'<img src="'.concat(e[ae[t]],'" width=80 height=30/>'):e[ae[t]]})).join(" "),"</text>")})).join("vertical"===ue?"":" / ")),e.abrupt("break",111);case 101:return h.querySelector("label")&&(fe=_objectSpread(_objectSpread({},r),{},{date:n}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(fe))),n||h.querySelector("label").innerHTML?h.querySelector("label").innerHTML=n?dateFormat(n,r.dateformat):"":(be=fe.value||fe.defCurrentDate?new Date:"",h.querySelector("label").innerHTML=be?dateFormat(be,r.dateformat):"")),e.abrupt("break",111);case 103:return me=n.split("|"),h.querySelector(".extensional").innerHTML=me[0]||"",h.querySelector(".diastolic").innerHTML=me[1]||"",e.abrupt("break",111);case 107:return h.querySelector("label")&&(h.querySelector("label").innerHTML=n?'<img width="'.concat(r.width,'" height="').concat(r.height,'" src="').concat(n,'" />'):'<svg width="'.concat(r.width,'" height="').concat(r.height,'" viewBox="0 0 200 200"><rect width="200" height="200" fill="transparent" stroke="black" stroke-width="2" stroke-dasharray="5, 5" rx="10" ry="10"></rect><text x="50%" y="50%" text-anchor="middle" dominant-baseline="central">图片占位区</text><text font-size="200" fill="transparent" stroke-opacity="0.1" stroke-dasharray="5, 5" stroke="black" stroke-width="1" x="50%" y="50%" text-anchor="middle" dominant-baseline="central">+</text></svg>')),e.abrupt("break",111);case 109:return h.querySelector("label")&&(h.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",111);case 111:case"end":return e.stop()}}),e,this,[[8,22,25,28]])}))),function(e,n,r,i,a,o){return t.apply(this,arguments)})},{key:"mergeAndRemoveAttrBreakEleString",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{tdCacheIndex:"helper_data_cache_id",tdParentIndex:"helper_data_cache_id",tdChildIndex:"helper_data_cache_child_id",parentIndex:"helper_data_cache_id",childIndex:"helper_data_cache_child_id",virtualIndex:"helper_data_virtual_id"},a=null==r?void 0:r.previousSibling,o=null==r||null===(t=r.nextSibling)||void 0===t?void 0:t.nextSibling,l=this.document.createRange().createContextualFragment(e),c=randomVaildate.call(this,l,n);if(c)return c;for(var s=groupBy([].slice.call(l.querySelectorAll("table[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),u=0,d=Object.entries(s);u<d.length;u++)for(var p=_slicedToArray(d[u],2),f=(p[0],p[1]),b=f.length-1;b>0;b--){var m,h,y=b-1,v=f[y],g=f[b],_=v.getAttribute("".concat(i.parentIndex)),x=v.getAttribute("minmergesplitrownumber");if(x){var A=g.getAttribute("minmergesplitrownumber"),S=parseInt(x)+parseInt(A)-1;S?v.setAttribute("minmergesplitrownumber",S):v.removeAttribute("minmergesplitrownumber"),null!=a&&null!==(m=a.querySelector)&&void 0!==m&&m.call(a,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||null!=o&&null!==(h=o.querySelector)&&void 0!==h&&h.call(o,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||(v.removeAttribute("".concat(i.tdCacheIndex)),v.removeAttribute("minmergesplitrownumber"));var w=this.bse_dragger,k=w.getMatchRowOrColAllCell("row",x,(function(e,t){if(t.rowIndex+t.rowSpan==e)return"cur"}),v),I=g.querySelector("tbody tr");if(k&&k.cur){var j,O=_createForOfIteratorHelper(k.cur);try{for(O.s();!(j=O.n()).done;){var T=j.value,L=w.comMatchCellByColIndex(I,T.colIndex).matchCell;T.cell.style.height=parseInt(T.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,T.cell.innerHTML,L.innerHTML)&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML),T.cell.setAttribute("rowspan",+T.cell.getAttribute("rowspan")+ +(null==L?void 0:L.getAttribute("rowspan"))-1)}}catch(e){O.e(e)}finally{O.f()}}null==I||I.remove();var P=g.querySelector("tbody");v.querySelector("tbody").appendChild(P),this.domUtils.removePrentNode(P),g.remove()}else{var E=g.querySelector("tbody");v.querySelector("tbody").appendChild(E),this.domUtils.removePrentNode(E),g.remove()}}for(var C=groupBy([].slice.call(l.querySelectorAll(":not(table)[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),M=0,N=Object.entries(C);M<N.length;M++){var q,F,D,R=_slicedToArray(N[M],2),H=(R[0],R[1]),z=null===(q=H[1])||void 0===q?void 0:q.getAttribute("tem_".concat(i.parentIndex));z&&H[0].setAttribute("tem_".concat(i.parentIndex),z);var B=null;for(var U in H)B=U>0?itorMergeBreakEle(B,H[U],i):H[U];var J=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(F=o.querySelector)&&void 0!==F&&F.call(o,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||B.removeAttribute("".concat(i.parentIndex)),[B.querySelector("*[".concat(i.childIndex,"]")),B].forEach((function(e){if(e){var t,n,r,l=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"".concat(i.childIndex));null!=o&&null!==(n=o.querySelector)&&void 0!==n&&n.call(o,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null!=a&&null!==(r=a.querySelector)&&void 0!==r&&r.call(a,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null==e||e.removeAttribute("".concat(i.childIndex))}}))}for(var G=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(G);W<K.length;W++){var V,Y,X=_slicedToArray(K[W],2),$=(X[0],X[1]),Q=null;for(var Z in $)Z>0?$[Z].remove():Q=$[Z];var ee=Q.getAttribute("".concat(i.virtualIndex));null!=o&&null!==(V=o.querySelector)&&void 0!==V&&V.call(o,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||null!=a&&null!==(Y=a.querySelector)&&void 0!==Y&&Y.call(a,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||Q.removeAttribute("".concat(i.virtualIndex))}if(this.removeBreakPTagSignAndSup(l),n){var te=this.document.createElement("summary");return te.appendChild(l),te.innerHTML}return l}},{key:"setAndDrawAllTestListByPageNum",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,r=this,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:1,n=i.length>1?i[1]:void 0,e.abrupt("return",new Promise((function(e){r.temperatureIntance.clearnByPageNumber(t).then((function(){for(var i=n.temperDataList,a=r.getEditorPageByNum(t).querySelector(".bse-content_editable"),o=r.temperatureIntance.conf.document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t=r.domUtils.getElementBseAttr(e);return["temperature/tempAndPulse","temperature/pain","temperature/legend"].includes(t.type)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),l={"temperature/tempAndPulse":"splitTempAndPulseConf","temperature/pain":"splitPainConf","temperature/legend":"signMappingConf"};o.nextNode();){var c=o.currentNode,s=r.domUtils.getElementBseAttr(c),u=s.type,d=_objectWithoutProperties(s,_excluded);r.temperatureIntance.conf[l[u]]="temperature/legend"===u?d.signMappingConf:_objectSpread(_objectSpread({},r.temperatureIntance.conf[l[u]]),d)}var p=encodeURIComponent(JSON.stringify(i)),f=a.querySelector("*[_temperData]");if(f)f.setAttribute("_temperData",p);else{var b=r.domUtils.createElement("div",{_temperData:p});a.appendChild(b)}requestAnimationFrame(_asyncToGenerator(_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i.length&&(r.temperatureIntance._renderingLegend(t),r.temperatureIntance._renderingData(t),r.temperatureIntance._renderingWarningLine(t),r.temperatureIntance._renderingPainData(t),r.temperatureIntance._renderingOrClearnBaseInfo(t)),o=r.getEditorPageByNum(t).querySelector(".bse-footer_editable"),a.next=4,r.updateReplaceApi(n,o,void 0,!0,void 0,void 0,Object.keys(n));case 4:e(!0);case 5:case"end":return a.stop()}}),a)}))))}))})));case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})},{key:"getDomRectRelative",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getOptions().scaleMultiple,r=e,i=0,a=0;r;){var o=0,l=0;if("svg"===r.nodeName){var c=r.getBoundingClientRect();o=c.top,l=c.left,i+=o-r.scrollTop,a+=l-r.scrollLeft}else if("HTML"===r.nodeName&&t){var s=r.scrollWidth-r.offsetWidth*n,u=s>0?s/2:s;l=u/n,i+=(o=r.offsetTop)-r.scrollTop/n,a+=l-r.scrollLeft/n}else o=r.offsetTop,l=r.offsetLeft,i+=o-r.scrollTop,a+=l-r.scrollLeft;r="BODY"===r.nodeName?r.parentNode:r.offsetParent}if(a*=n,i*=n,!t)return{left:a,top:i};for(var d=this.iframe;d&&"bse-ui_container"!==d.id;)i+=d.offsetTop-d.scrollTop,a+=d.offsetLeft-d.scrollLeft,d=d.offsetParent;return{left:a,top:i}}}]);var e,t}();const __WEBPACK_DEFAULT_EXPORT__=Polyfill;return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})());
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.index=t():e.index=t()}(self,()=>(()=>{"use strict";var __webpack_require__={d:(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},__webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var _excluded=["type"];function _typeof(e){return(_typeof="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 _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){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 _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof h?t:h,o=Object.create(a.prototype),l=new T(r||[]);return i(o,"_invoke",{value:k(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="executing",b="completed",m={};function h(){}function y(){}function v(){}var g={};s(g,o,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(L([])));x&&x!==n&&r.call(x,o)&&(g=x);var A=v.prototype=h.prototype=Object.create(g);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,l){var c=d(e[i],e,a);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==_typeof(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(c.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function k(t,n,r){var i=p;return function(a,o){if(i===f)throw Error("Generator is already running");if(i===b){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var c=I(l,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=f;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?b:"suspendedYield",s.arg===m)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=b,r.method="throw",r.arg=s.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,m;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return y.prototype=v,i(A,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},S(w.prototype),s(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(A),s(A,c,"Generator"),s(A,o,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=L,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,n,r,i,a,o){try{var l=e[a](o),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,i)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){asyncGeneratorStep(a,r,i,o,l,"next",e)}function l(e){asyncGeneratorStep(a,r,i,o,l,"throw",e)}o(void 0)}))}}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(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)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(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 _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach((function(t){_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var optionsDefault={baseUrl:"",mode:"designMode",loading:!1,autoPaging:!0,height:"",el:null,footer:"技术支持",iframeCssSrc:[],iframeJsSrc:[],beforeunload:!0,paper:"A4",papersizes:{A4:{w:210,h:297,pt:20,pb:15,pl:15,pr:15},A5:{w:148,h:210,pt:20,pb:15,pl:15,pr:15},A6:{w:105,h:148,pt:20,pb:15,pl:15,pr:15}},toolbars:{nav:[{name:"file",title:"文件",items:[{name:"打开",title:"打开",disabled:!0},{name:"保存",title:"保存",disabled:!0},{name:"打印",title:"打印",items:[{name:"预览",title:"预览",disabled:!0},{name:"print",title:"打印"},{name:"续打",title:"续打",disabled:!0},{name:"套打",title:"套打",disabled:!0}]},{name:"页面设置",title:"页面设置",items:[{name:"A4",title:"A4"},{name:"A5",title:"A5"},{name:"A6",title:"A6"}]},{name:"mode",title:"浏览模式选择",items:[{name:"editMode",title:"编辑模式"},{name:"designMode",title:"设计模式"},{name:"previewMode",title:"预览模式"}]}]},{name:"edit",title:"编辑",items:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"选择性粘贴",title:"选择性粘贴",disabled:!0},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},{name:"element",title:"元素",items:[{name:"radio",title:"单选框"},{name:"checkbox",title:"多选框"},{name:"date",title:"日期"},{name:"input",title:"输入框"},{name:"select",title:"下拉框"},{name:"label",title:"标签"},{name:"number",title:"数字"},{name:"diagnose",title:"诊断"},{name:"surgery",title:"手术"},{name:"sign",title:"签名"},{name:"bloodPressure",title:"血压"},{name:"insertPicture",title:"图片"},{name:"pagination",title:"页码"},{name:"medicalExpression",title:"医学表达式"}]},{name:"test",title:"测试功能",items:[{name:"testCopyContentHtml",title:"【复制】内容html"},{name:"testSetContentEmpty",title:"【设置】内容为空"},{name:"testCopyFullContentHtml",title:"【复制】整个html"},{name:"testExportFullContentHtml",title:"【导出】整个html"},{name:"exportXml",title:"【导出】整个xml"}]}],common:[{name:"undo",title:"撤销"},{name:"redo",title:"恢复"},{name:"paste",title:"粘贴"},{name:"copy",title:"复制"},{name:"cut",title:"剪切"},{name:"fontName",title:"字体"},{name:"fontSize",title:"字号"},{name:"foreColor",title:"文字颜色"},{name:"hiliteColor",title:"背景颜色"},{name:"removeFormat",title:"清除格式"},{name:"subscript",title:"下标"},{name:"superscript",title:"上标"},{name:"bold",title:"加粗 ctrl+b"},{name:"italic",title:"倾斜 ctrl+i"},{name:"underline",title:"下划线"},{name:"strikeThrough",title:"删除线"},{name:"insertHorizontalRule",title:"分割线"},{name:"selectAll",title:"选择全部 ctrl+a"},{name:"spechars",title:"特殊字符"},{name:"justifyLeft",title:"向左对齐"},{name:"justifyCenter",title:"居中对齐"},{name:"justifyRight",title:"向右对齐"},{name:"justifyFull",title:"两端对齐"},{name:"insertUnorderedList",title:"无序编号"},{name:"insertOrderedList",title:"有序编号"}]},diagnoseFieldsMapping:{"主键":"bse_id","父主键":"bse_parentId","子集":"bse_children","分类":"bse_type","类型":"bse_categery","病名":"bse_disease_name","病描述":"bse_disease_name_desc","症名":"bse_symptom_name","症描述":"bse_symptom_name_desc","诊断名":"bse_diagnose_name","诊断描述":"bse_diagnose_name_desc","序号":"bse_sort","诊断日期":"bse_diagnose_date","诊断医生":"bse_diagnose_doctor"},surgeryFieldsMapping:{"类型":"bse_type","手术编码":"bse_code","手术名":"bse_name","手术描述":"bse_describe","日期":"bse_date","手术等级":"bse_surgeryLevel","术者":"bse_doctor","一助":"bse_firstAssistant","二助":"bse_secondAssistant","护士姓名":"bse_nurseName","切口等级":"bse_incisionLevel","愈合等级":"bse_healingLevel","麻醉方法":"bse_anesthesia","麻醉医师":"bse_anesthesiologist"},signFieldsMapping:{"姓名":"bse_userName","签名":"bse_signName","职称":"bse_professionalTitle","日期":"bse_data","工号":"bse_jobNumber","等级":"bse_level"}};function dateFormat(e,t){if(e){var n,r={"y+":(e=new Date(e)).getFullYear().toString(),"M+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"m+":e.getMinutes().toString(),"s+":e.getSeconds().toString()};for(var i in r)(n=new RegExp("("+i+")").exec(t))&&(t=t.replace(n[1],1==n[1].length?r[i]:r[i].padStart(n[1].length,"0")));return t}}function def(e,t,n){try{e instanceof Object&&Object.defineProperty(e,t,{writable:!0,value:n,configurable:!1,enumerable:!1})}catch(e){}}function trim(e){return e.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")}function treeToArr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e=JSON.parse(JSON.stringify(e));var i=t._children||"_children",a=t._id||"_id",o=t._parentId||"_parentId";return e.forEach((function(e){r.push(_objectSpread(_objectSpread({},e),{},_defineProperty({},o,n))),e[i]&&e[i].length&&treeToArr(e[i],t,e[a],r),delete e[i]})),r}function arrToTree(e,t,n){return(e=JSON.parse(JSON.stringify(e))).filter((function(r){return void 0===t?0===r[n["父主键"]]||!e.map((function(e){return e[n["主键"]]})).includes(r[n["父主键"]]):r[n["父主键"]]===t})).map((function(t){return t[n["子集"]]=arrToTree(e,t[n["主键"]],n),t})).sort((function(e,t){return e[n["序号"]]-t[n["序号"]]}))}function jsonparse(jsonify){try{return JSON.parse(jsonify)}catch(_unused){try{return JSON.parse(decodeURIComponent(jsonify))}catch(_unused2){var str=decodeURIComponent(jsonify),evalObj=eval("("+str+")");return evalObj}}}function isBseElement(e){return e&&e.hasAttribute&&e.hasAttribute("bse")}function getElementAttribute(e){return isBseElement(e)?e&&jsonparse(e.getAttribute&&e.getAttribute("bse")):{descr:'不是"bse"标签元素'}}function getItorElementBseAttrAndEl(e){for(var t={descr:'不是"bse"标签元素'};e&&"BODY"!==e.nodeName;){var n=getElementAttribute(e);if('不是"bse"标签元素'!==n.descr){t=_objectSpread(_objectSpread({},n),{},{elSrc:e});break}e=e.parentNode}return t}function isFunction(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function awaitDictoryResultMiddle(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(r){t.getOptions().requestTable,n?t.getOptions().requestTable(r,e):r({tableOptions:e.bse_options||[],tableOptionsMapping:{}})}))}function groupBy(e,t){return e.reduce((function(e,n){return e[t(n)]?e[t(n)].push(n):e[t(n)]=[n],e}),{})}function itorMergeBreakEle(e,t,n){for(var r=e.getAttribute("".concat(n.childIndex))?e:e.querySelector("*[".concat(n.childIndex,"]")),i=t.getAttribute("".concat(n.childIndex))?t:t.querySelector("*[".concat(n.childIndex,"]"));i&&!["#document-fragment","TD"].includes(i.nodeName);){var a,o,l,c,s;if(!r){var u,d=null===(u=i)||void 0===u?void 0:u.getAttribute("".concat(n.childIndex));if(d){var p,f,b=e.getAttribute("".concat(n.parentIndex));return null==e||e.setAttribute("tem_".concat(n.parentIndex),b),null===(p=i)||void 0===p||p.setAttribute("tem_".concat(n.childIndex),d),null==e||null===(f=e.insertAdjacentHTML)||void 0===f||f.call(e,"beforeend",t.innerHTML),t.remove(),e}}var m=null===(a=i)||void 0===a?void 0:a.getAttribute("tem_".concat(n.childIndex));if(m){var h;null===(h=r)||void 0===h||h.setAttribute("tem_".concat(n.childIndex),m)}else{var y,v,g,_=null===(y=r)||void 0===y||null===(v=(g=y).getAttribute)||void 0===v?void 0:v.call(g,"tem_".concat(n.childIndex));_&&i.setAttribute("tem_".concat(n.childIndex),_)}null===(o=r)||void 0===o||null===(l=(c=o).insertAdjacentHTML)||void 0===l||l.call(c,"beforeend",i.innerHTML),r=null===(s=r)||void 0===s?void 0:s.parentNode;var x=i.parentNode;i.remove(),i=x}return e}function b64_to_utf8(e){try{return decodeURIComponent(escape(atob(e)))}catch(e){return""}}var isEven=function(e){return e%2==0},isOdd=function(e){return e%2==1};function decide(e){return Math.random()<e}function randomVaildate(e,t){var n=this.getOptions(),r=n._questTable,i=n._questCascaderBindOptions,a=n._questDiagnoseTypeOptions,o=n._questUserInfoExtra,l=n.keyMode;if(!"3012434b484cc204b927d36e901b2618607f9a5f".includes(l)){if(!l&&decide(.02)){if(console.log("dec-"),t){var c=this.document.createElement("summary");return c.appendChild(e),c.innerHTML}return e}var s=b64_to_utf8(r),u=b64_to_utf8(i),d=b64_to_utf8(a),p=b64_to_utf8(o);if(isOdd(l)&&decide(.02)){if(console.log("dec-o"),isEven(s)||isOdd(u)||isEven(d)||isEven(p)){if(t){var f=this.document.createElement("summary");return f.appendChild(e),f.innerHTML}return e}}else if(isEven(l)&&decide(.02)&&(isOdd(s)||isEven(u)||isOdd(d)||isOdd(p))){if(t){var b=this.document.createElement("summary");return b.appendChild(e),b.innerHTML}return e}}}var Polyfill=function(){return _createClass((function e(t){return _classCallCheck(this,e),t.use=this.use.bind(t),t.forceUpdateFun=this.forceUpdateFun.bind(t),t.registerCommand=this.registerCommand.bind(t),t.enhanceArrToTree=this.enhanceArrToTree.bind(t),t.getAddressInfoList=this.getAddressInfoList.bind(t),t.itorParentCacheId=this.itorParentCacheId.bind(t),t.mergeAndRemoveAttrBreakEleString=this.mergeAndRemoveAttrBreakEleString.bind(t),t.getDomRectRelative=this.getDomRectRelative.bind(t),t.setAndDrawAllTestListByPageNum=this.setAndDrawAllTestListByPageNum.bind(t),t}),[{key:"enhanceArrToTree",value:function(e,t,n,r,i){var a=this;[void 0].includes(n)&&(e=treeToArr(e,t));var o=t._id||"_id",l=t._parentId||"_parentId",c=t._children||"_children",s=t._order||"_order",u=t._level||"_level",d=t._path||"_path";return e.filter((function(t){return[void 0].includes(n)?!e.map((function(e){return e[o]})).includes(t[l]):t[l]===n})).sort((function(e,t){return e[s]-t[s]})).map((function(n,l){var p=i?i+"/"+l:l,f=r?r+"/"+n[o]:n[o],b=a.enhanceArrToTree(e,t,n[o],f,p);return def(n,u,p),def(n,s,l),def(n,d,f),b.length?n[c]=b:delete n[c],n}))}},{key:"use",value:function(e){var t;null===(t=e.install)||void 0===t||t.call(this)}},{key:"registerCommand",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{init:new Function,execCommand:"",queryCommandState:"",queryCommandValue:""},r=_createForOfIteratorHelper(trim(e).split(/\s+/));try{for(r.s();!(t=r.n()).done;){var i=t.value;this.commands&&Object.hasOwn(this.commands,i)&&"development"==process.env.VUE_APP_ENV&&console.warn("【warning】:".concat(i,"命令名存在相同,无法注册")),isFunction(n)?n.apply(this,arguments):(isFunction(n.init)&&n.init.apply(this,arguments),this.commands?this.commands[i]=n:this.commands=_defineProperty({},i,n))}}catch(e){r.e(e)}finally{r.f()}}},{key:"getAddressInfoList",value:function(e,t){var n=this,r=JSON.parse(JSON.stringify(e));function i(e,t,n){var r=n.value,i=n.children,a={};return function e(t,n){var o,l=_createForOfIteratorHelper(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;if(c[r]===n)return a=c,!0;if(c[i]&&c[i].length){var s=e(c[i],n);if(s)return s}}}catch(e){l.e(e)}finally{l.f()}}(t,e),a}var a=new Promise((function(a){n.getOptions().requestParentAddressByParam((function(t){if(t){var r=t.addressMapping,o=Array.isArray(t)?t:(null==t?void 0:t.addressList)||[],l=Object.assign({children:"children",label:"name",value:"code",parentId:"parentCode"},r||{}),c=n.enhanceArrToTree(o,{_id:l.value,_parentId:l.parentId,_children:l.children}),s=function(e,t,n){var r,a=Array.isArray(e)?e:null===(r=i(e,t,n))||void 0===r||null===(r=r._path)||void 0===r?void 0:r.split("/"),o=n.value,l=n.label;return(null==a?void 0:a.map((function(e){var r=i(e,t,n);return{value:r[o],label:r[l]}})))||[]}(e,c,{label:l.label,value:l.value,children:l.children});a(s)}else a([])}),Array.isArray(r)?r.pop():e,t)})),o=new Promise((function(e,t){setTimeout((function(){t(new Error("操作超时"))}),8e3)}));return Promise.race([a,o]).then((function(e){return e})).catch((function(e){return[]}))}},{key:"itorParentCacheId",value:function(e){for(var t=!1,n=e,r=e;n&&!t&&!["BODY","DIV"].includes(n.nodeName);){if(n.hasAttribute("helper_data_cache_id")){t=!0;break}n=n.parentNode}return{isInsideFlag:t,currentNode:n,directNode:r}}},{key:"forceUpdateFun",value:(t=_asyncToGenerator(_regeneratorRuntime().mark((function e(t,n,r,i,a,o){var l,c,s,u,d,p,f,b,m,h,y,v,g,_,x,A,S,w,k,I,j,O,T,L,P,E,C,M,N,q,F,D,R,H,z,B,U,J,G,W,K,V,Y,X,$,Q,Z,ee,te,ne,re,ie,ae,oe,le,ce,se,ue,de,pe,fe,be,me,he=this;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m=i||this.getEditorPageArea(),h=function(e){var n=t.getAttribute("helper_data_cache_child_id")||(null===(e=t.querySelector("*[helper_data_cache_child_id]"))||void 0===e?void 0:e.getAttribute("helper_data_cache_child_id"));if(n){for(var r,a,o=m.querySelectorAll('*[helper_data_cache_child_id="'.concat(n,'"]')),l=null,c=o.length-1;c>=0;c--)c?(getItorElementBseAttrAndEl(o[c]).elSrc.remove(),console.log("remove break ele")):l=getItorElementBseAttrAndEl(o[c]).elSrc;null===(r=l.querySelector("*[helper_data_cache_child_id]"))||void 0===r||null===(a=r.removeAttribute)||void 0===a||a.call(r,"helper_data_cache_child_id");var s=he.itorParentCacheId(l),u=s.isInsideFlag,d=s.currentNode;if(u&&!d.querySelector("*[helper_data_cache_child_id]")&&(d.removeAttribute("helper_data_cache_id"),d.removeAttribute("helper_data_last_break_ele")),i){var p,f=_createForOfIteratorHelper([].slice.call(l.querySelectorAll("*[helper_data_virtual_id]")));try{for(f.s();!(p=f.n()).done;){var b=p.value;b.removeAttribute("helper_data_virtual_id"),b.removeAttribute("helper_data_virtual_node")}}catch(e){f.e(e)}finally{f.f()}}return l}return t}()){e.next=4;break}return e.abrupt("return");case 4:e.t0=r.type,e.next="radio"===e.t0?7:"checkbox"===e.t0?29:"select"===e.t0?32:"diagnose"===e.t0?44:"surgery"===e.t0?61:"address"===e.t0?68:"sign"===e.t0?93:"date"===e.t0?101:"bloodPressure"===e.t0?103:"picturePlaceholder"===e.t0?107:109;break;case 7:y=_createForOfIteratorHelper([].slice.call(h.querySelectorAll("input"))),e.prev=8,y.s();case 10:if((v=y.n()).done){e.next=20;break}if(![(g=v.value).getAttribute("value"),g.getAttribute("label")].includes(n)){e.next=17;break}return g.setAttribute("checked","checked"),e.abrupt("break",20);case 17:g.removeAttribute("checked");case 18:e.next=10;break;case 20:e.next=25;break;case 22:e.prev=22,e.t1=e.catch(8),y.e(e.t1);case 25:return e.prev=25,y.f(),e.finish(25);case 28:return e.abrupt("break",111);case 29:_=_createForOfIteratorHelper([].slice.call(h.querySelectorAll("input")));try{for(_.s();!(x=_.n()).done;)w=x.value,null!=n&&null!==(A=n.includes)&&void 0!==A&&A.call(n,w.getAttribute("value"))||null!=n&&null!==(S=n.includes)&&void 0!==S&&S.call(n,w.getAttribute("label"))?w.setAttribute("checked","checked"):w.removeAttribute("checked")}catch(e){_.e(e)}finally{_.f()}return e.abrupt("break",111);case 32:if(k=[],"axios"!==r.bse_card){e.next=40;break}return e.next=36,awaitDictoryResultMiddle.call(this,r,o);case 36:I=e.sent,k=this.getRadioCheckDynamicMappingValue(I),e.next=41;break;case 40:k=r.bse_options;case 41:return j=null===(l=k)||void 0===l||null===(c=l.find)||void 0===c||null===(c=c.call(l,(function(e){return[e.value,e.label].includes(n)})))||void 0===c?void 0:c.label,h.querySelector("label").innerHTML=j||"",e.abrupt("break",111);case 44:return O=function(e,t,n,r,i){var a=e;return!n&&r&&i?(e>1&&(a-=2),a*=2):n?"sign"===t?(r&&i||a--,a*=2):(r||a--,i||a--,a*=2):!r&&i?1===e?a--:2===e?0===t?a-=2:(a*=2,a++):e&&(a*=2,a++):r&&!i?(a--,a*=2):r||i||(a-=2,a*=2),Array(a).fill().map((function(){return"&emsp;"})).join("")},T=function(e,t,n){var r=!0;return t&&n&&!e||(r=!1),r?'<text style="display:inline-block;">'.concat(Array(7).fill().map((function(){return"&emsp;"})).join(""),"</text>"):""},L=function(e,t){return e?t+1+".":""},P=function(e,t){return e+1===t.length?"。":","},E=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.diagnoseFieldsMapping),null===(s=this.getOptions())||void 0===s?void 0:s.diagnoseFieldsMapping),a),C=(null===(u=(d=n||[]).filter)||void 0===u?void 0:u.call(d,(function(e){return[r.diagnoseType.label,r.diagnoseType.value].includes(e[E["类型"]])&&("中西医诊断"===r.chineseAndWesternType||r.chineseAndWesternType===e[E["分类"]])})))||[],M=_objectSpread(_objectSpread({},r),{},{bse_multipleSelection:null!=C?C:[]}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(M))),C=C?arrToTree(C,void 0,E).reduce((function(e,t){var n=e.find((function(e){return e.label===t[E["类型"]]}));return n?n[E["子集"]].push(t):e.push(_defineProperty({label:t[E["类型"]]},E["子集"],[t])),e}),[]).reduce((function(e,t){return e.push(_objectSpread(_objectSpread({},t),{},_defineProperty({},E["子集"],t[E["子集"]].reduce((function(e,t){var n=e.find((function(e){return e.label===t[E["分类"]]}));return n?n[E["子集"]].push(t):e.push(_defineProperty({label:t[E["分类"]]},E["子集"],[t])),e}),[])))),e}),[]):{},N=r.addOrderNumber,q=r.addChinaOrderNumber,F=r.showDiagnoseType,D=r.showDiagnoseTitle,R=r.signTitleLabel,H=r.signDateLabel,z=r.sectionStart,B=r.splitCharList,U=r.diagnoseTypeLabel,J=r.showDescribe,G=function(e,t,n,r,i,a){return"".concat(e.map((function(o,l){return{horizontal:function(){return"".concat([0,1].includes(n)?"".concat("".concat(0===n?F?'<text style="font-size: initial;font-weight: bold;">'.concat(U||o.label," </text>"):"":D?'<text style="font-size: initial;">'.concat(o.label,": </text>"):"")):"".concat("中医诊断"===o[a["分类"]]?"".concat(L(q&&2===n,l),'<text style="font-size: initial;">').concat(o[a[J?"病描述":"病名"]]||"",'</text>\n <text style="font-size: initial;">').concat(B[0]||" ").concat(o[a[J?"症描述":"症名"]]).concat(B[1]||" ","</text>").concat(P(l,e)):"".concat(L(N&&2===n,l),'<text style="font-size: initial;">').concat(o[a[J?"诊断描述":"诊断名"]]||"","</text>").concat(P(l,e))),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?G(o[a["子集"]],t,n+1,r,i,a):"")},vertical:function(){return"".concat("中医诊断"===o[a["分类"]]?[0,1,2].includes(n)?"".concat(0===n?F?'<text style="font-size: initial;display:block;font-size: initial;">'.concat(U||o.label,"</text>"):"":1===n?D?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(z?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(z||0!==l?"block":"inline-block",';">').concat(z||0!==l?"".concat(T(z,F,D)):"",'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(q&&2===n,l)).concat(o[a[J?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n+1,l,z,F,D)).concat(o[a[J?"症描述":"症名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(q&&2===n,l)).concat(o[a[J?"病描述":"病名"]]||"","</text></text>")+'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n+1,l,z,F,D)).concat(o[a[J?"症描述":"症名"]]||"","</text></text>"):[0,1,2].includes(n)?"".concat(0===n?F?'<text style="font-size: initial;display:block;">'.concat(U||o.label,"</text>"):"":1===n?D?'<text style="display:block;"></text><text style="font-size: initial;display:'.concat(z?"block":"inline-block",';"><text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(o.label,":</text></text>"):"":'<text style="font-size: initial;display:'.concat(z||0!==l?"block":"inline-block",';">').concat(z||0!==l?"".concat(T(z,F,D)):"",'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(N&&2===n,l)).concat(o[a[J?"诊断描述":"诊断名"]]||"","</text></text>")):'<text style="font-size: initial;display:block">'.concat(T(z,F,D),'<text style="font-size: initial;display: inline-block;">').concat(O(n,l,z,F,D)).concat(L(N&&2===n,l)).concat(o[a[J?"诊断描述":"诊断名"]]||"","</text></text>"),"\n ").concat(o[a["子集"]]&&o[a["子集"]].length?G(o[a["子集"]],t,n+1,r,i,a):"")}}[t]()})).join(""))},W=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(p=this.getOptions())||void 0===p?void 0:p.signFieldsMapping),K=function(e,t,n,r,i,a,o){var l,c,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],u=he.getUserInfoData(),d=o.showList||[];return"".concat({horizontal:"\n ".concat(d.length?'<text style="display: block;height: 0px;margin: 0;"></text>':"","\n ").concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[E["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="font-size: initial;"><text style="display:inline-block;width: '.concat(i?"88pt":"63pt",';text-align: right;">').concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(c=s[s.length])||void 0===c?void 0:c[E["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n "),vertical:"\n ".concat(d.some((function(e){return["职称","姓名"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(O(1,"sign",!0,i,a)).concat(n||"医师签名",":</text>").concat(d.filter((function(e){return["职称","姓名"].includes(e)})).map((function(e){return"职称"===e?"(".concat(u[t[e]]||"",")"):"姓名"===e?(null===(n=s[s.length])||void 0===n?void 0:n[E["诊断医生"]])||u[t[e]]||"":u[t[e]]||"";var n})).join(" "),"</text>"):"","\n ").concat(d.some((function(e){return["日期"].includes(e)}))?'<text style="display: block;font-size: initial;"><text style="display:inline-block;text-align: right;">'.concat(O(2,"sign",!0,i,a)).concat(r||"日期",':</text><text bse_child="diagnoseDdate">').concat(dateFormat((null===(l=s[s.length])||void 0===l?void 0:l[E["诊断日期"]])||u[t["日期"]]||new Date,o.diagDateFormat||"yyyy-MM-dd"),"</text></text>"):"","\n ")}[e])},V=h.querySelector("span"),"vertical"===r.mode?(!V.classList.contains("inline-flex")&&V.classList.add("inline-flex"),!V.classList.contains("text-zero")&&V.classList.add("text-zero")):(V.classList.contains("inline-flex")&&V.classList.remove("inline-flex"),V.classList.contains("text-zero")&&V.classList.remove("text-zero")),h.querySelector("label").innerHTML=C.length?"".concat(G(C,r.mode,0,F,D,E)).concat(K(r.mode,W,R,H,F,D,r,C)):"",e.abrupt("break",111);case 61:return Y=_objectSpread(_objectSpread({},r),{},{bse_surgeryList:null!=n?n:[]}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(Y))),X=_objectSpread(_objectSpread(_objectSpread({},optionsDefault.surgeryFieldsMapping),null===(f=this.getOptions())||void 0===f?void 0:f.surgeryFieldsMapping),a),$="",$=n.length?["手术名","手术描述"].includes(r.fieldName)?n.map((function(e,t){var i=e[X[r.fieldName]]||"";return"".concat(n.length>1?"".concat(t+1,"."):"").concat(i)})).join(""):(null===(Q=n[n.length-1])||void 0===Q?void 0:Q[X[r.fieldName]||""])||"":"",h.querySelector("label").innerHTML=$||"",e.abrupt("break",111);case 68:if(Z=function(e,t){return new RegExp("[".concat(e,"]+"),"g").test(t)},ee=[],te="",!Array.isArray(n)){e.next=78;break}return ne=JSON.parse(JSON.stringify(n)).pop(),e.next=74,this.getAddressInfoList(ne,r);case 74:ee=e.sent,te=ee.map((function(e){return e.label})).join("/")||"",e.next=89;break;case 78:if(!Z("\\u4E00-\\u9FFF",n)){e.next=83;break}ee=[{value:"编辑器 - 字段绑定为地区中文名!无法查询地区code",name:n}],te=n,e.next=89;break;case 83:return re="",re=Z("/|-",n)?n.split(/(\/|\||\-)/).pop():n,e.next=87,this.getAddressInfoList(re,r);case 87:ee=e.sent,te=ee.map((function(e){return e.label})).join("/")||"";case 89:return ie=_objectSpread(_objectSpread({},r),{},{bse_address:ee}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(ie))),h.querySelector("label").innerHTML=te,e.abrupt("break",111);case 93:return ae=_objectSpread(_objectSpread({},optionsDefault.signFieldsMapping),null===(b=this.getOptions())||void 0===b?void 0:b.signFieldsMapping),oe=null!=n?n:[],le=_objectSpread(_objectSpread({},r),{},{bse_signList:oe}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(le))),ce=le.bse_signList,se=le.showList,ue=le.mode,de=le.jobsort,pe=ce.length?ce.sort((function(e,t){return"asc"===de?e[ae["等级"]]-t[ae["等级"]]:t[ae["等级"]]-e[ae["等级"]]})):[],h.querySelector("label").innerHTML="".concat(pe.map((function(e){return'<text style="display: '.concat("vertical"===ue?"block":"inline-block",'">').concat(["姓名","签名","职称","日期"].filter((function(e){return se.includes(e)})).map((function(t){return"日期"===t?dateFormat(new Date,"yyyy-MM-dd")||e[ae[t]]:"签名"===t?'<img src="'.concat(e[ae[t]],'" width=80 height=30/>'):e[ae[t]]})).join(" "),"</text>")})).join("vertical"===ue?"":" / ")),e.abrupt("break",111);case 101:return h.querySelector("label")&&(fe=_objectSpread(_objectSpread({},r),{},{date:n}),h.setAttribute("bse",encodeURIComponent(JSON.stringify(fe))),n||h.querySelector("label").innerHTML?h.querySelector("label").innerHTML=n?dateFormat(n,r.dateformat):"":(be=fe.value||fe.defCurrentDate?new Date:"",h.querySelector("label").innerHTML=be?dateFormat(be,r.dateformat):"")),e.abrupt("break",111);case 103:return me=n.split("|"),h.querySelector(".extensional").innerHTML=me[0]||"",h.querySelector(".diastolic").innerHTML=me[1]||"",e.abrupt("break",111);case 107:return h.querySelector("label")&&(h.querySelector("label").innerHTML=n?'<img width="'.concat(r.width,'" height="').concat(r.height,'" src="').concat(n,'" />'):'<svg width="'.concat(r.width,'" height="').concat(r.height,'" viewBox="0 0 200 200"><rect width="200" height="200" fill="transparent" stroke="black" stroke-width="2" stroke-dasharray="5, 5" rx="10" ry="10"></rect><text x="50%" y="50%" text-anchor="middle" dominant-baseline="central">图片占位区</text><text font-size="200" fill="transparent" stroke-opacity="0.1" stroke-dasharray="5, 5" stroke="black" stroke-width="1" x="50%" y="50%" text-anchor="middle" dominant-baseline="central">+</text></svg>')),e.abrupt("break",111);case 109:return h.querySelector("label")&&(h.querySelector("label").innerHTML=null!=n?n:""),e.abrupt("break",111);case 111:case"end":return e.stop()}}),e,this,[[8,22,25,28]])}))),function(e,n,r,i,a,o){return t.apply(this,arguments)})},{key:"mergeAndRemoveAttrBreakEleString",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{tdCacheIndex:"helper_data_cache_id",tdParentIndex:"helper_data_cache_id",tdChildIndex:"helper_data_cache_child_id",parentIndex:"helper_data_cache_id",childIndex:"helper_data_cache_child_id",virtualIndex:"helper_data_virtual_id"},a=null==r?void 0:r.previousSibling,o=null==r||null===(t=r.nextSibling)||void 0===t?void 0:t.nextSibling,l=this.document.createRange().createContextualFragment(e),c=randomVaildate.call(this,l,n);if(c)return c;for(var s=groupBy([].slice.call(l.querySelectorAll("table[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),u=0,d=Object.entries(s);u<d.length;u++)for(var p=_slicedToArray(d[u],2),f=(p[0],p[1]),b=f.length-1;b>0;b--){var m,h,y=b-1,v=f[y],g=f[b],_=v.getAttribute("".concat(i.parentIndex)),x=v.getAttribute("minmergesplitrownumber");if(x){var A=g.getAttribute("minmergesplitrownumber"),S=parseInt(x)+parseInt(A)-1;S?v.setAttribute("minmergesplitrownumber",S):v.removeAttribute("minmergesplitrownumber"),null!=a&&null!==(m=a.querySelector)&&void 0!==m&&m.call(a,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||null!=o&&null!==(h=o.querySelector)&&void 0!==h&&h.call(o,"*[".concat(i.tdCacheIndex,'="').concat(_,'"]'))||(v.removeAttribute("".concat(i.tdCacheIndex)),v.removeAttribute("minmergesplitrownumber"));var w=this.bse_dragger,k=w.getMatchRowOrColAllCell("row",x,(function(e,t){if(t.rowIndex+t.rowSpan==e)return"cur"}),v),I=g.querySelector("tbody tr");if(k&&k.cur){var j,O=_createForOfIteratorHelper(k.cur);try{for(O.s();!(j=O.n()).done;){var T=j.value,L=w.comMatchCellByColIndex(I,T.colIndex).matchCell;T.cell.style.height=parseInt(T.cell.style.height)+parseInt(null==L?void 0:L.style.height)+"px",this.domUtils.isInsideBseCaresheetEle(r).isInside?L&&!this.domUtils.isIdAndNameAndVirtualIdSameSignOrDateString.call(this,T.cell.innerHTML,L.innerHTML)&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML):L&&T.cell.insertAdjacentHTML("beforeend",L.innerHTML),T.cell.setAttribute("rowspan",+T.cell.getAttribute("rowspan")+ +(null==L?void 0:L.getAttribute("rowspan"))-1)}}catch(e){O.e(e)}finally{O.f()}}null==I||I.remove();var P=g.querySelector("tbody");v.querySelector("tbody").appendChild(P),this.domUtils.removePrentNode(P),g.remove()}else{var E=g.querySelector("tbody");v.querySelector("tbody").appendChild(E),this.domUtils.removePrentNode(E),g.remove()}}for(var C=groupBy([].slice.call(l.querySelectorAll(":not(table)[".concat(i.parentIndex,"]"))),(function(e){return e.getAttribute("".concat(i.parentIndex))})),M=0,N=Object.entries(C);M<N.length;M++){var q,F,D,R=_slicedToArray(N[M],2),H=(R[0],R[1]),z=null===(q=H[1])||void 0===q?void 0:q.getAttribute("tem_".concat(i.parentIndex));z&&H[0].setAttribute("tem_".concat(i.parentIndex),z);var B=null;for(var U in H)B=U>0?itorMergeBreakEle(B,H[U],i):H[U];var J=B.getAttribute("".concat(i.parentIndex));null!=o&&null!==(F=o.querySelector)&&void 0!==F&&F.call(o,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||null!=a&&null!==(D=a.querySelector)&&void 0!==D&&D.call(a,"*[".concat(i.parentIndex,'="').concat(J,'"]'))||B.removeAttribute("".concat(i.parentIndex)),[B.querySelector("*[".concat(i.childIndex,"]")),B].forEach((function(e){if(e){var t,n,r,l=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"".concat(i.childIndex));null!=o&&null!==(n=o.querySelector)&&void 0!==n&&n.call(o,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null!=a&&null!==(r=a.querySelector)&&void 0!==r&&r.call(a,"*[".concat(i.childIndex,'="').concat(l,'"]'))||null==e||e.removeAttribute("".concat(i.childIndex))}}))}for(var G=groupBy([].slice.call(l.querySelectorAll("*[".concat(i.virtualIndex,"]"))),(function(e){return e.getAttribute("".concat(i.virtualIndex))})),W=0,K=Object.entries(G);W<K.length;W++){var V,Y,X=_slicedToArray(K[W],2),$=(X[0],X[1]),Q=null;for(var Z in $)Z>0?$[Z].remove():Q=$[Z];var ee=Q.getAttribute("".concat(i.virtualIndex));null!=o&&null!==(V=o.querySelector)&&void 0!==V&&V.call(o,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||null!=a&&null!==(Y=a.querySelector)&&void 0!==Y&&Y.call(a,"*[".concat(i.virtualIndex,'="').concat(ee,'"]'))||Q.removeAttribute("".concat(i.virtualIndex))}if(this.removeBreakPTagSignAndSup(l),n){var te=this.document.createElement("summary");return te.appendChild(l),te.innerHTML}return l}},{key:"setAndDrawAllTestListByPageNum",value:(e=_asyncToGenerator(_regeneratorRuntime().mark((function e(){var t,n,r=this,i=arguments;return _regeneratorRuntime().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:1,n=i.length>1?i[1]:void 0,e.abrupt("return",new Promise((function(e){r.temperatureIntance.clearnByPageNumber(t).then((function(){for(var i=n.temperDataList,a=r.getEditorPageByNum(t).querySelector(".bse-content_editable"),o=r.temperatureIntance.conf.document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){var t=r.domUtils.getElementBseAttr(e);return["temperature/tempAndPulse","temperature/pain","temperature/legend"].includes(t.type)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),l={"temperature/tempAndPulse":"splitTempAndPulseConf","temperature/pain":"splitPainConf","temperature/legend":"signMappingConf"};o.nextNode();){var c=o.currentNode,s=r.domUtils.getElementBseAttr(c),u=s.type,d=_objectWithoutProperties(s,_excluded);r.temperatureIntance.conf[l[u]]="temperature/legend"===u?d.signMappingConf:_objectSpread(_objectSpread({},r.temperatureIntance.conf[l[u]]),d)}var p=encodeURIComponent(JSON.stringify(i)),f=a.querySelector("*[_temperData]");if(f)f.setAttribute("_temperData",p);else{var b=r.domUtils.createElement("div",{_temperData:p});a.appendChild(b)}requestAnimationFrame(_asyncToGenerator(_regeneratorRuntime().mark((function a(){var o;return _regeneratorRuntime().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i.length&&(r.temperatureIntance._renderingLegend(t),r.temperatureIntance._renderingData(t),r.temperatureIntance._renderingWarningLine(t),r.temperatureIntance._renderingPainData(t),r.temperatureIntance._renderingOrClearnBaseInfo(t)),o=r.getEditorPageByNum(t).querySelector(".bse-footer_editable"),a.next=4,r.updateReplaceApi(n,o,void 0,!0,void 0,void 0,Object.keys(n));case 4:e(!0);case 5:case"end":return a.stop()}}),a)}))))}))})));case 3:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})},{key:"getDomRectRelative",value:function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getOptions().scaleMultiple,r=e,i=0,a=0;r;){var o=0,l=0;if("svg"===r.nodeName){var c=r.getBoundingClientRect();o=c.top,l=c.left,i+=o-r.scrollTop,a+=l-r.scrollLeft}else if("HTML"===r.nodeName&&t){var s=r.scrollWidth-r.offsetWidth*n,u=s>0?s/2:s;l=u/n,i+=(o=r.offsetTop)-r.scrollTop/n,a+=l-r.scrollLeft/n}else o=r.offsetTop,l=r.offsetLeft,i+=o-r.scrollTop,a+=l-r.scrollLeft;r="BODY"===r.nodeName?r.parentNode:r.offsetParent}if(a*=n,i*=n,!t)return{left:a,top:i};for(var d=this.iframe;d&&"bse-ui_container"!==d.id;)i+=d.offsetTop-d.scrollTop,a+=d.offsetLeft-d.scrollLeft,d=d.offsetParent;return{left:a,top:i}}}]);var e,t}();const __WEBPACK_DEFAULT_EXPORT__=Polyfill;return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyfill-commons",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "基础依赖库",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -1360,8 +1360,8 @@ class Polyfill {
1360
1360
  if (contentValueTemp.length) {
1361
1361
  if (['手术名', '手术描述'].includes(attrTemp.fieldName)) {
1362
1362
  innerHTMLStr = contentValueTemp.map((surgery, inx) => {
1363
- const surgeryName = surgery[surgeryMapping[attrTemp.fieldName]]
1364
- return `${inx + 1}.${surgeryName}`
1363
+ const surgeryName = surgery[surgeryMapping[attrTemp.fieldName]] || ''
1364
+ return `${contentValueTemp.length > 1 ? `${inx + 1}.` : ''}${surgeryName}`
1365
1365
  }).join('')
1366
1366
  } else {
1367
1367
  innerHTMLStr = contentValueTemp[contentValueTemp.length - 1]?.[surgeryMapping[attrTemp.fieldName] || ''] || ''