aicfe-answer-card 0.1.35 → 0.1.37

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/lib/card.js CHANGED
@@ -1,6 +1,6 @@
1
1
  module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s="4089")}({"00ee":function(t,e,n){var i=n("b622"),r=i("toStringTag"),a={};a[r]="z",t.exports="[object z]"===String(a)},"0366":function(t,e,n){var i=n("4625"),r=n("59ed"),a=n("40d5"),o=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:a?o(t,e):function(){return t.apply(e,arguments)}}},"04f8":function(t,e,n){var i=n("2d00"),r=n("d039"),a=n("da84"),o=a.String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},"06cf":function(t,e,n){var i=n("83ab"),r=n("c65b"),a=n("d1e7"),o=n("5c6c"),s=n("fc6a"),c=n("a04b"),l=n("1a2d"),u=n("0cfb"),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=s(t),e=c(e),u)try{return h(t,e)}catch(n){}if(l(t,e))return o(!r(a.f,t,e),t[e])}},"07fa":function(t,e,n){var i=n("50c4");t.exports=function(t){return i(t.length)}},"0cfb":function(t,e,n){var i=n("83ab"),r=n("d039"),a=n("cc12");t.exports=!i&&!r((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,n){var i=n("e330"),r=Error,a=i("".replace),o=function(t){return String(r(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,c=s.test(o);t.exports=function(t,e){if(c&&"string"==typeof t&&!r.prepareStackTrace)while(e--)t=a(t,s,"");return t}},"0d51":function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"13d2":function(t,e,n){var i=n("e330"),r=n("d039"),a=n("1626"),o=n("1a2d"),s=n("83ab"),c=n("5e77").CONFIGURABLE,l=n("8925"),u=n("69f3"),h=u.enforce,d=u.get,f=String,p=Object.defineProperty,g=i("".slice),m=i("".replace),y=i([].join),v=s&&!r((function(){return 8!==p((function(){}),"length",{value:8}).length})),_=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===g(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||c&&t.name!==e)&&(s?p(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&o(n,"arity")&&t.length!==n.arity&&p(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(r){}var i=h(t);return o(i,"source")||(i.source=y(_,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return a(this)&&d(this).source||l(this)}),"toString")},"13d5":function(t,e,n){"use strict";var i=n("23e7"),r=n("d58f").left,a=n("a640"),o=n("2d00"),s=n("605d"),c=!s&&o>79&&o<83,l=c||!a("reduce");i({target:"Array",proto:!0,forced:l},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},"13ed":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"mark-point"},[e("div",{staticClass:"mark-point__top-left",style:3===t.layout&&{top:"20px",left:"20px"},attrs:{"data-export_name":"左上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box"},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0)]),e("div",{staticClass:"mark-point__top-right",style:3===t.layout&&{top:"20px",right:"20px"},attrs:{"data-export_name":"右上标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box mark-point__half"})]),e("div",{staticClass:"mark-point__bottom-left",style:3===t.layout&&{bottom:"20px",left:"20px"},attrs:{"data-export_name":"左下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box mark-point__half"})]),e("div",{staticClass:"mark-point__bottom-center",style:3===t.layout&&{bottom:"20px"},attrs:{"data-export_name":"底部中心标志点_".concat(t.pageIndex),"data-scan-type":"absolute"}},t._l(t.pageShiftBinary,(function(t,n){return e("div",{staticClass:"mark-point__group"},[e("div",{key:n,class:[Number(t)?"mark-point__half":"mark-point__full"]})])})),0),e("div",{staticClass:"mark-point__bottom-right",style:3===t.layout&&{bottom:"20px",right:"20px"},attrs:{"data-export_name":"右下标志点","data-scan-type":"absolute"}},[e("div",{staticClass:"mark-point__box mark-point__half"})]),1===t.layout?e("div",{staticClass:"mark-point__top-center__one mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}):t._e(),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__two mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-center__three mark-point__full",attrs:{"data-export_name":"顶部中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__zero mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_0"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__left mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_1"),"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-three__right mark-point__full",attrs:{"data-export_name":"分栏中心标志点_".concat(t.pageIndex,"_2"),"data-scan-type":"absolute"}})]):t._e(),e("div",{staticClass:"mark-point__left-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__left-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__right-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),2===t.layout?e("div",[e("div",{staticClass:"mark-point__center-one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e(),3===t.layout?e("div",[e("div",{staticClass:"mark-point__center-left_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-left_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_one mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}}),e("div",{staticClass:"mark-point__center-right_two mark-point__pencil",style:t.positionStyle,attrs:{"data-scan-type":"absolute"}})]):t._e()])},r=[],a={name:"AcMarkPoint",props:{pageIndex:{type:Number}},computed:{pageShiftBinary:function(){var t=this.pageIndex.toString(2).padStart(4,"0");return t.split("")},layout:function(){return this.$store.getters["AC/layout"]},positionStyle:function(){var t={"--coords":3===this.layout?"20px":"30px"};return t}}},o=a,s=n("2877"),c=Object(s["a"])(o,i,r,!1,null,null,null),l=c.exports;l.install=function(t){t.component(l.name,l)};e["default"]=l},"14d9":function(t,e,n){"use strict";var i=n("23e7"),r=n("7b0b"),a=n("07fa"),o=n("3a34"),s=n("3511"),c=n("d039"),l=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=l||!u();i({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=r(this),n=a(e),i=arguments.length;s(n+i);for(var c=0;c<i;c++)e[n]=arguments[c],n++;return o(e,n),n}})},1626:function(t,e,n){var i=n("8ea1"),r=i.all;t.exports=i.IS_HTMLDDA?function(t){return"function"==typeof t||t===r}:function(t){return"function"==typeof t}},"182d":function(t,e,n){var i=n("f8cd"),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw r("Wrong offset");return n}},"19aa":function(t,e,n){var i=n("3a9b"),r=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw r("Incorrect invocation")}},"1a2d":function(t,e,n){var i=n("e330"),r=n("7b0b"),a=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return a(r(t),e)}},"1d02":function(t,e,n){"use strict";var i=n("ebb5"),r=n("a258").findLastIndex,a=i.aTypedArray,o=i.exportTypedArrayMethod;o("findLastIndex",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"1d80":function(t,e,n){var i=n("7234"),r=TypeError;t.exports=function(t){if(i(t))throw r("Can't call method on "+t);return t}},"1fb5":function(t,e,n){"use strict";e.byteLength=u,e.toByteArray=d,e.fromByteArray=g;for(var i=[],r=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)i[s]=o[s],r[o.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var i=n===e?0:4-n%4;return[n,i]}function u(t){var e=l(t),n=e[0],i=e[1];return 3*(n+i)/4-i}function h(t,e,n){return 3*(e+n)/4-n}function d(t){var e,n,i=l(t),o=i[0],s=i[1],c=new a(h(t,o,s)),u=0,d=s>0?o-4:o;for(n=0;n<d;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[u++]=e>>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[u++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c}function f(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function p(t,e,n){for(var i,r=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),r.push(f(i));return r.join("")}function g(t){for(var e,n=t.length,r=n%3,a=[],o=16383,s=0,c=n-r;s<c;s+=o)a.push(p(t,s,s+o>c?c:s+o));return 1===r?(e=t[n-1],a.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],a.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},"21a6":function(t,e,n){(function(n){var i,r,a;(function(n,o){r=[],i=o,a="function"===typeof i?i.apply(e,r):i,void 0===a||(t.exports=a)})(0,(function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function i(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){c(i.response,e,n)},i.onerror=function(){},i.send()}function r(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function a(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(i){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,e,n){var s=o.URL||o.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?a(c):r(c.href)?i(t,e,n):a(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){a(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,o){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,o),n);else if(r(t))i(t,n,o);else{var s=document.createElement("a");s.href=t,s.target="_blank",setTimeout((function(){a(s)}))}}:function(t,e,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return i(t,e,n);var a="application/octet-stream"===t.type,c=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&c||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=l?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},u.readAsDataURL(t)}else{var h=o.URL||o.webkitURL,d=h.createObjectURL(t);r?r.location=d:location.href=d,r=null,setTimeout((function(){h.revokeObjectURL(d)}),4e4)}});o.saveAs=c.saveAs=c,t.exports=c}))}).call(this,n("c8ba"))},"23cb":function(t,e,n){var i=n("5926"),r=Math.max,a=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):a(n,e)}},"23e7":function(t,e,n){var i=n("da84"),r=n("06cf").f,a=n("9112"),o=n("cb2d"),s=n("6374"),c=n("e893"),l=n("94ca");t.exports=function(t,e){var n,u,h,d,f,p,g=t.target,m=t.global,y=t.stat;if(u=m?i:y?i[g]||s(g,{}):(i[g]||{}).prototype,u)for(h in e){if(f=e[h],t.dontCallGetSet?(p=r(u,h),d=p&&p.value):d=u[h],n=l(m?h:g+(y?".":"#")+h,t.forced),!n&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&a(f,"sham",!0),o(u,h,f,t)}}},"241c":function(t,e,n){var i=n("ca84"),r=n("7839"),a=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,a)}},2638:function(t,e,n){"use strict";function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e,n=1;n<arguments.length;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)}var r=["attrs","props","domProps"],a=["class","style","directives"],o=["on","nativeOn"],s=function(t){return t.reduce((function(t,e){for(var n in e)if(t[n])if(-1!==r.indexOf(n))t[n]=i({},t[n],e[n]);else if(-1!==a.indexOf(n)){var s=t[n]instanceof Array?t[n]:[t[n]],l=e[n]instanceof Array?e[n]:[e[n]];t[n]=[].concat(s,l)}else if(-1!==o.indexOf(n))for(var u in e[n])if(t[n][u]){var h=t[n][u]instanceof Array?t[n][u]:[t[n][u]],d=e[n][u]instanceof Array?e[n][u]:[e[n][u]];t[n][u]=[].concat(h,d)}else t[n][u]=e[n][u];else if("hook"===n)for(var f in e[n])t[n][f]=t[n][f]?c(t[n][f],e[n][f]):e[n][f];else t[n]=e[n];else t[n]=e[n];return t}),{})},c=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=s},2834:function(t,e,n){"use strict";var i=n("ebb5"),r=n("e330"),a=n("59ed"),o=n("dfb9"),s=i.aTypedArray,c=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,u=r(i.TypedArrayPrototype.sort);l("toSorted",(function(t){void 0!==t&&a(t);var e=s(this),n=o(c(e),e);return u(n,t)}))},2877:function(t,e,n){"use strict";function i(t,e,n,i,r,a,o,s){var c,l="function"===typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var h=l.beforeCreate;l.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:l}}n.d(e,"a",(function(){return i}))},"2b16":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],style:{"--layout":t.layout},attrs:{visible:t.currentVisible,"custom-class":"ac-preview",top:"20px"},on:{"update:visible":function(e){t.currentVisible=e},opened:t.handleOpen,close:function(e){t.imgList=[]}}},[t._l(t.imgList,(function(t,n){return e("img",{key:n,staticClass:"ac-preview__item",attrs:{src:t}})})),t.imgList.length?e("i",{staticClass:"el-icon-circle-close",attrs:{slot:"footer"},on:{click:function(e){t.currentVisible=!1}},slot:"footer"}):t._e()],2)},r=[],a=n("5dcc"),o={name:"AcPreview",props:{visible:{type:Boolean,default:!1},selector:{type:String,required:!0}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},layout:function(){return this.$store.getters["AC/layout"]}},data:function(){return{imgList:[],loading:!1}},methods:{handleOpen:function(){var t=this,e=$(this.selector);e.length&&(this.loading=!0,Object(a["d"])(e).then((function(e){t.imgList=e,t.loading=!1})).catch((function(){t.loading=!1})))}}},s=o,c=n("2877"),l=Object(c["a"])(s,i,r,!1,null,null,null),u=l.exports;u.install=function(t){t.component(u.name,u)};e["default"]=u},"2ba4":function(t,e,n){var i=n("40d5"),r=Function.prototype,a=r.apply,o=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?o.bind(a):function(){return o.apply(a,arguments)})},"2d00":function(t,e,n){var i,r,a=n("da84"),o=n("342f"),s=a.process,c=a.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u&&(i=u.split("."),r=i[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&o&&(i=o.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/),i&&(r=+i[1]))),t.exports=r},"342f":function(t,e){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3511:function(t,e){var n=TypeError,i=9007199254740991;t.exports=function(t){if(t>i)throw n("Maximum allowed index exceeded");return t}},"3a34":function(t,e,n){"use strict";var i=n("83ab"),r=n("e8b5"),a=TypeError,o=Object.getOwnPropertyDescriptor,s=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(r(t)&&!o(t,"length").writable)throw a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"3a9b":function(t,e,n){var i=n("e330");t.exports=i({}.isPrototypeOf)},"3bbe":function(t,e,n){var i=n("1626"),r=String,a=TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw a("Can't set "+r(t)+" as a prototype")}},"3c5d":function(t,e,n){"use strict";var i=n("da84"),r=n("c65b"),a=n("ebb5"),o=n("07fa"),s=n("182d"),c=n("7b0b"),l=n("d039"),u=i.RangeError,h=i.Int8Array,d=h&&h.prototype,f=d&&d.set,p=a.aTypedArray,g=a.exportTypedArrayMethod,m=!l((function(){var t=new Uint8ClampedArray(2);return r(f,t,{length:1,0:3},1),3!==t[1]})),y=m&&a.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=s(arguments.length>1?arguments[1]:void 0,1),n=c(t);if(m)return r(f,this,n,e);var i=this.length,a=o(n),l=0;if(a+e>i)throw u("Wrong length");while(l<a)this[e+l]=n[l++]}),!m||y)},4089:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-card"},[e("div",{staticClass:"ac-card__left"},[e("div",{staticClass:"ac-card__content",style:{width:"".concat(1===t.layout?980:1960,"px")}},[t.paperTree.length?[1===t.acMode?e("ac-lattice",{ref:"latticeCard"}):e("ac-sweep",{ref:"sweepCard",on:{"build-failed":t.buildFailed}})]:t._e()],2)]),t.showConfig?e("ac-answer-config",t._b({on:{download:t.download,save:t.save,"view-paper":t.viewPaper}},"ac-answer-config",t.config,!1)):t._e()],1)},r=[];n("14d9");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function o(t){if(Array.isArray(t))return a(t)}function s(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function c(t,e){if(t){if("string"===typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}n("d9e2");function l(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(t){return o(t)||s(t)||c(t)||l()}var h=n("639e"),d=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-lattice"},[e("ac-virtual",{on:{change:t.setDomList}}),e("ac-panel",{attrs:{"dom-list":t.domList}})],1)},f=[],p=(n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1"),n("53ca"));function g(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- g=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),s=new T(r||[]);return i(o,"_invoke",{value:A(t,n,s)}),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(O){return{type:"throw",arg:O}}}t.wrap=l;var h={};function d(){}function f(){}function m(){}var y={};c(y,a,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(S([])));_&&_!==e&&n.call(_,a)&&(y=_);var b=m.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(i,a,o,s){var c=u(t[i],t,a);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==Object(p["a"])(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(h).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function A(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return I()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=u(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=m,i(b,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:f,configurable:!0}),f.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(C.prototype),c(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,i,r,a){void 0===a&&(a=Promise);var o=new C(l(e,n,i,r),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=S,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return o.type="throw",o.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function m(t,e,n,i,r,a,o){try{var s=t[a](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,r)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){m(a,i,r,o,s,"next",t)}function s(t){m(a,i,r,o,s,"throw",t)}o(void 0)}))}}var v=n("d4ec"),_=n("bee2"),b=n("a38e");function w(t,e,n){return e=Object(b["a"])(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){w(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x=n("4e0a"),E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-question ck-content",attrs:{"data-key":t.dataKey}},[t.formatChoices.length||"hand"===t.readType?e("div",{staticClass:"ac-question__prefix"},[e("ac-answer-box",{attrs:{label:t.formatChoices.length?t.showQuestion?"答案":t.plainTitle:"得分",direction:t.formatChoices.length?"column":"row",width:t.formatChoices.length&&!t.showQuestion?144:128}})],1):t._e(),!t.formatChoices.length||t.showQuestion?e("div",{staticClass:"ac-question__content"},[t.formatTitle||t.formatPrefix?e("div",{staticClass:"ac-question__title",style:t.titleAlign?{"text-align":t.titleAlign}:""},[t.formatPrefix?e("div",{staticClass:"ac-question__title-prefix",class:{"is-float":!!t.formatTitle,"is-bold":t.showQuestion},domProps:{innerHTML:t._s(t.formatPrefix)}}):t._e(),t.formatTitle?e("div",{staticClass:"ac-question__title-inner",domProps:{innerHTML:t._s(t.formatTitle)}}):t._e()]):t._e(),t.formatChoices.length?e("ac-choice",{attrs:{list:t.formatChoices,wrap:t.choiceWrap}}):t._e()],1):t._e()])},k=[],T=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice"},[t.wrap?[e("div",{staticClass:"ac-choice__list"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1),t.list.length%2?t._e():e("div",{staticClass:"ac-choice__list--half"},t._l(Array(t.list.length/2).fill(""),(function(n,i){return e("div",{key:i,staticClass:"row-direction"},t._l(t.list.slice(2*i,2*i+2),(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)})),0),e("div",{staticClass:"ac-choice__list--all"},[e("div",{staticClass:"row-direction"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)])]:e("div",{staticClass:"ac-choice__list--nowrap"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)],2)},S=[],I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice__item"},[t.identifier?e("div",{staticClass:"ac-choice__prefix"},[t._v(t._s(t.identifier)+".")]):t._e(),t.content?e("div",{staticClass:"ac-choice__content",domProps:{innerHTML:t._s(t.content)}}):t._e()])},O=[],B={name:"AcChoiceItem",props:{identifier:{type:String,default:""},content:{type:String,default:""}}},L=B,P=n("2877"),R=Object(P["a"])(L,I,O,!1,null,null,null),j=R.exports,M={name:"AcChoice",components:{AcChoiceItem:j},props:{list:{type:Array,default:function(){return[]}},wrap:{type:Boolean,default:!0}}},z=M,N=Object(P["a"])(z,T,S,!1,null,null,null),D=N.exports,U=n("fbd7"),F={name:"AcQuestion",components:{AcChoice:D,AcAnswerBox:U["default"]},props:{title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},titleAlign:{type:String,default:""},prefix:{type:String,default:""},prefixEditable:{type:Boolean,default:!1},choices:{type:Array,default:function(){return[]}},choiceEditable:{type:Boolean,default:!0},choiceWrap:{type:Boolean,default:!0},dataKey:{type:String,default:""},plainTitle:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},formatTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||(this.showQuestion?this.title:"")},formatPrefix:function(){var t,e=this;return(null===(t=this.editTitleList.find((function(t){return t.dataKey===e.dataKey})))||void 0===t?void 0:t.prefix)||(this.showQuestion?this.prefix:this.plainTitle)},formatChoices:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).choices||this.choices||[]},readType:function(){return this.$store.getters["AC/readType"]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]}}},H=F,K=Object(P["a"])(H,E,k,!1,null,null,null),W=K.exports;W.install=function(t){t.component(W.name,W)};var V,Z,Y=W,G=n("8f60"),Q=n("e6c4"),X=function(){window.MathJax&&(window.MathJax.Hub.Config({showProcessingMessages:!1,messageStyle:"none",jax:["input/TeX","output/HTML-CSS"],tex2jax:{inlineMath:[["\\(","\\)"],["\\[","\\]"]],displayMath:[],skipTags:["script","noscript","style","textarea","pre"]},"HTML-CSS":{showMathMenu:!1}}),window.isAcMathJaxConfig=!0)},J=function(t){if(window.MathJax)return window.isAcMathJaxConfig||X(),new Promise((function(e){window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,document.getElementById(t)]),window.MathJax.Hub.Queue((function(){e()}))}))},q=n("5dcc"),tt={name:"AcVirtual",components:{AcEssay:x["default"],AcQuestion:Y,AcAnswerBox:U["default"],AcGraffiti:G["default"],AcBasicInfo:Q["default"]},data:function(){return{continueObjectiveCount:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]},readType:function(){return this.$store.getters["AC/readType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},getEditedTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},splitDom:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",i=0,r=0,a=[],o=[];if(t){if(t.childNodes.length){var s=t.childNodes[t.childNodes.length-1];t.childNodes.length>1&&(2!==t.childNodes.length||"\n"!==s.textContent)?o=t.childNodes:t.childNodes[0].childNodes.length&&"FIGURE"!==t.childNodes[0].nodeName&&(o=t.childNodes[0].childNodes)}o.length||(o=t.childNodes)}for(var c=0;c<o.length;c++){var l=o[c];if(-1===["P","DIV","IMG","FIGURE"].indexOf(l.nodeName))try{"#text"===l.nodeName?n+=l.textContent:n+=l.outerHTML}catch(g){}else{var u=getComputedStyle(l),h=Number(u.marginTop.replace("px",""))||0,d=Number(u.marginBottom.replace("px",""))||0,f=Object(q["e"])(l);a.length&&(f-=r),n+=l.outerHTML,i+=f+$(l).outerHeight()+h+d,a.push({type:e,content:n,height:i}),n="",i=0,r=Object(q["e"])(l)+$(l).outerHeight()+h+d}}if(n){var p=$(t).outerHeight();a.push({type:e,content:n,height:a.length?p-r:p})}return a},getDomList:function(){var t=this,e=function(e,n,r,a){var o={dataKey:r,children:[],updatePage:e.updatePage,updatePiece:e.updatePiece},s=null,c=0;if((e.title||e.prefix)&&(t.showQuestion||!e.choices)){var l=n.find(".ac-question__title")[0],u=n.find(".ac-question__title-inner")[0],h=n.find(".ac-question__title-prefix")[0],d=n.find(".ac-answer-box")[0],f=getComputedStyle(l),p=Number(f.paddingTop.replace("px",""))||0,g=Number(f.paddingBottom.replace("px",""))||0,m=[];if(u?(m=t.splitDom(u,"questionTitleItem"),m.length&&(d&&(c=$(d).outerHeight(),m[0].answerBoxHeight=c,m[0].needAnswerBox=!0,s=m[0]),m[0].prefix=(null===h||void 0===h?void 0:h.outerHTML)||"",m[0].height+=p,m[m.length-1].height+=g,m.forEach((function(t){t.hasChoice=e.choices&&e.choices.length,t.titleAlign=e.titleAlign})))):h&&(m=[{type:"questionTitleItem",prefix:h.outerHTML,height:Math.max($(h).outerHeight()+p+g,d?$(d).outerHeight():0),content:"",needAnswerBox:!!d}]),m.length){var y={children:m};o.children.push(y)}}if(e.choices)if(t.showQuestion){var v={},_=n.find(".ac-choice")[0];if(!1===e.choiceWrap)Object.assign(v,{type:"choiceItem",height:$(_).outerHeight(),content:_.outerHTML});else{var b=$(_).outerWidth(),w=$(_).find(".ac-choice__list").outerWidth();if(b>=w*e.choices.length)Object.assign(v,{type:"choiceItem",height:$(_).find(".ac-choice__list--all").outerHeight(),content:$(_).find(".ac-choice__list--all")[0].outerHTML});else{v.children=[];var C=$(_).find(".ac-choice__list .ac-choice__item"),A="ac-choice__list";!(e.choices.length%2)&&b>=2*w&&(A="ac-choice__list--half",C=$(_).find(".ac-choice__list--half .row-direction")),Array.from(C).forEach((function(t){v.children.push({type:"choiceItem",height:$(t).outerHeight(),content:t.outerHTML,wrapperClass:A})}))}}o.children.push(v)}else{var x=n.find(".ac-answer-box")[0];o.children.push({type:"plainBox",boxContent:e.plainTitle,height:t.continueObjectiveCount%5===0?$(x).outerHeight():0}),t.continueObjectiveCount++}else t.continueObjectiveCount=0;if(s){var E=0,k=function t(e){e.forEach((function(e){e.children?t(e.children):E+=e.height}))};k(o.children),c-E>0&&(s.height+=c-E)}if(i.push(o),e.essay){var T={type:"essay",essay:Object.assign({rowCount:4},e.essay),dataKey:r};if(a&&(a.essayRowCount=T.essay.rowCount,i.push(Object.assign({},a,{subtype:"beforeEssay"}))),e.essay.title){var S=n.find(".ac-essay__title")[0];T.essay.titleChildren=t.splitDom(S)}i.push(T)}},n=function n(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];a.forEach((function(a,s){var c=[].concat(u(o),[a[a.idProp||"id"]||s]),l=r.find(".ac-virtual__section[data-key=".concat(c.join("_"),"]"));if(Array.isArray(a.children)&&a.children.length){t.continueObjectiveCount=0;var h=l.find(".ac-virtual__title")[0];if(h||"complex"===a.code){var d={};if("complex"===a.code){var f=l.find(".ac-material__title-prefix")[0],p=l.find(".ac-material__title-inner")[0],g=[];p?(g=t.splitDom(p,"materialItem"),g.length&&(g[0].prefix=(null===f||void 0===f?void 0:f.outerHTML)||"",g[0].height+=16)):f&&(g=[{type:"materialItem",prefix:f.outerHTML,height:$(f).outerHeight()+16,content:""}]),d={dataKey:c.join("_"),children:g}}else d={dataKey:c.join("_"),height:$(h).outerHeight(),content:h.innerHTML,updatePage:a.updatePage,updatePiece:a.updatePiece};i.push(d)}n(a.children,c)}else{var m=null;if("graffiti"===t.readType){var y=l.find(".ac-graffiti__wrapper")[0];y&&(m={type:"graffiti",dataKey:c.join("_"),height:$(y).outerHeight(),content:y.innerHTML,subtype:"beforeTitle"},i.push(m))}e(a,l,c.join("_"),m)}}))},i=[],r=$(".ac-virtual"),a=r.find(".ac-basicInfo");if(a){var o=a.find(".ac-basicInfo__title"),s=a.find(".ac-attention"),c=a.find(".ac-basic-info__edu");i.push({type:"basicInfo",headHeight:null===o||void 0===o?void 0:o.outerHeight(),attentionHeight:null===s||void 0===s?void 0:s.outerHeight(),eduHeight:null===c||void 0===c?void 0:c.outerHeight()})}n(this.paperTree),this.$emit("change",i)},getTitle:function(t,e){var n=this.$createElement,i=t.title,r=t.prefix,a=t.plainTitle,o=t.code,s=this.editTitleList.find((function(t){return t.dataKey===e})),c=s||{},l=c.title,u=c.editKey,h=s?l:this.showQuestion||"complex"!==o?i:"",d=this.showQuestion?r:a;return h||d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title")},[d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title-prefix").concat(this.showQuestion?" is-bold":"").concat(h?" is-float":"")},[d]):null,h?n("div",{key:"virtual_title_".concat(u),class:"ac-".concat("complex"===o?"material":"virtual","__title-inner ck-content"),domProps:{innerHTML:h}}):null]):null},getList:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.$createElement;return t.map((function(t,r){var a=[].concat(u(n),[t[t.idProp||"id"]||r]);return i("div",{key:"".concat(r,"_").concat(t[t.idProp||"id"]||""),class:"ac-virtual__section",attrs:{"data-key":a.join("_")}},[Array.isArray(t.children)&&t.children.length?i("div",[e.getTitle(t,a.join("_")),e.getList(t.children,a)]):i("div",["graffiti"!==e.readType||t.choices?null:i("ac-graffiti",{attrs:{scanName:t.scanName,score:t.score}}),i("ac-question",{key:"virtual_question_".concat(e.getEditedKey(a.join("_"))),props:A({},Object.assign({dataKey:a.join("_")},t))}),t.essay?i("ac-essay",{props:A({},Object.assign(t.essay,{title:e.getEssayTitle(a.join("_"),t.essay.title)}))}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},key:"virtual_"+this.readType},[t("ac-basic-info"),this.getList(this.paperTree)])}},et=tt,nt=Object(P["a"])(et,V,Z,!1,null,null,null),it=nt.exports;it.install=function(t){t.component(it.name,it)};var rt,at,ot=it,st=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,i){return e("div",{key:i,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",style:{width:1===t.layout?"980px":"1960px"},attrs:{"data-page":i+1}},[t._l(n,(function(n,r){return e("ac-piece",{key:r,attrs:{"data-piece":i*t.layout+r,"data-page":i,list:n},on:{edit:t.handleEdit}})})),t.layout-n.length?e("div",{staticClass:"ac-piece"},[e("ac-restrict")],1):t._e(),"graffiti"===t.readType?e("ac-mark-point",{attrs:{"page-index":i}}):t._e(),e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(i+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")])],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||"",title:t.editorTitle},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},ct=[],lt=(n("13d5"),{name:"AcPiece",components:{AcEssay:x["default"],AcAnswerBox:U["default"],AcBasicInfo:Q["default"]},props:{list:{type:Array,default:function(){return[]}}},inject:["contentEditable","paddingBlock"],computed:{paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){return"K"===this.sizeType?"1357px":"1386px"},piecePadding:function(){return"number"===typeof this.paddingBlock?"".concat(this.paddingBlock,"px 0px"):"".concat(this.paddingBlock[0]||0,"px 0px ").concat(this.paddingBlock[1]||0,"px")}},methods:{getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},isWithSpace:function(t){var e=!1,n=t.split("_"),i=this.paperTree||[];return n.forEach((function(t,r){var a=i.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};i=a.children||[],r===n.length-1&&(e=a.choices&&a.choices.length)})),e},handleClick:function(t,e){this.$emit("edit",t,e)},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getContent:function(t,e){var n,i=this,r=this.$createElement,a=null;switch(t.type){case"question":a=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question ck-content"},[t.answerBoxType?r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:"answer"===t.answerBoxType?"答案":"得分",direction:"answer"===t.answerBoxType?"column":"row"}})]):null,r("div",{class:"ac-question__content"+("hand"!==this.readType&&!this.isWithSpace(t.dataKey)||t.answerBoxType?"":" with-space")},[t.editBtn&&this.contentEditable?r("el-button",{attrs:{type:"primary",size:"small"},class:"ac-question__edit",on:{click:function(){return i.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,null===(n=t.content)||void 0===n?void 0:n.map((function(t){return"string"===typeof t?r("div",{domProps:{innerHTML:t}}):t}))])]);break;case"essay":a=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.dataKey||""},props:A({},t.content[0])});break;case"material":a=r("div",{key:"material_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-material ck-content"},[t.editBtn&&this.contentEditable?r("el-button",{class:"ac-material__edit",attrs:{type:"primary",size:"small"},on:{click:function(){return i.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,r("div",{domProps:{innerHTML:t.content.join("")}})]);break;case"plainBox":a=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question is-box".concat(t.isFollowBox?" is-follow":"")},[r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:this.getPlainTitle(t.dataKey)||t.boxContent,width:144,editable:!0,dataKey:t.dataKey}})])]);break;case"graffiti":a=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-graffiti__wrapper".concat("beforeEssay"===t.subtype?" is-bottom":""),domProps:{innerHTML:t.content}});break;case"basicInfo":a=r("ac-basic-info",{props:A({},t)});break;default:a=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-piece__section"},[r("div",{attrs:{contenteditable:this.contentEditable},domProps:{innerHTML:t.content},on:{blur:function(e){return i.handleBlur(e,t.dataKey)}}})])}return a}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight,padding:this.piecePadding}},[this.list.map((function(e,n){return t.getContent(e,n)}))])}}),ut=lt,ht=Object(P["a"])(ut,rt,at,!1,null,null,null),dt=ht.exports;dt.install=function(t){t.component(dt.name,dt)};var ft=dt,pt=n("6bdf"),gt=n("13ed"),mt=function(){var t=this,e=t._self._c;return e("div",{ref:"restrictRef",class:["ac-restrict",t.lastOneClass],style:{width:t.$store.getters["AC/layout"]>2?"580px":"868px",height:t.realHeight,marginTop:"".concat(t.marginTop,"px")}},[t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",(1250===t.height||"100%"===t.height||t.isFirst)&&"show-border_top",t.isShowTipWord&&"show-border_word-top"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",(1250===t.height||"100%"===t.height||t.isFirst)&&"show-outline_top",t.isShowTipWord&&"show-border_word-top"]}):t._e()])},yt=[],vt={name:"AcRestrict",inject:["paddingBlock"],props:{height:{type:[Number,String],default:"100%"},marginTop:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},data:function(){return{realHeight:"100%"}},computed:{isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]}},watch:{height:function(){var t=this;this.$nextTick((function(){return t.updateHeight()}))}},mounted:function(){this.updateHeight()},methods:{updateHeight:function(){var t=this;if("number"===typeof this.height){if(1250!==this.height){var e=this.$refs.restrictRef,n=this.$parent.$el,i=n.clientHeight-(Object(q["e"])(e)+this.height);this.realHeight="".concat(i<68&&this.height+(i-68)>0?this.height+(i-68):this.height,"px")}else this.realHeight="".concat(this.height-5,"px");this.lastOneClass&&this.$nextTick((function(){return t.getDistanceToParentBottom()}))}else this.realHeight=this.height},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t);this.realHeight="".concat(parseInt(this.realHeight)+e,"px")}}},_t=vt,bt=Object(P["a"])(_t,mt,yt,!1,null,null,null),wt=bt.exports;wt.install=function(t){t.component(wt.name,wt)};var Ct=wt,At={name:"AcPanel",components:{AcPiece:ft,AcEditor:pt["default"],AcMarkPoint:gt["default"],AcRestrict:Ct},props:{domList:{type:Array,default:function(){return[]}}},inject:["showStudentInfo","paddingBlock"],data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0,editorTitle:"编辑题目"}},computed:{formatPanelList:function(){var t=this,e=[];return this.panelList.forEach((function(n,i){i%t.layout===0?e.push([n]):e[e.length-1].push(n)})),e},paperTree:function(){return this.$store.getters["AC/paperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},layout:function(){return this.$store.getters["AC/layout"]},latticeAttention:function(){return this.$store.getters["AC/latticeAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){var t="number"===typeof this.paddingBlock?2*this.paddingBlock:this.paddingBlock.reduce((function(t,e){return t+e}),0);return("K"===this.sizeType?1357:1386)-(t+10)},rowConfig:function(){return this.$store.getters["AC/rowConfig"]}},watch:{domList:function(t){t.length&&this.getPanelList()},panelFlag:function(){this.getPanelList()}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleEdit:function(t,e){var n={dataKey:t,content:"",hasChoice:!1},i=this.editTitleList.find((function(e){return e.dataKey===t}));if(null!==i&&void 0!==i&&i.title){var r=i.title,a=void 0===r?"":r,o=i.choices,s=void 0===o?[]:o;n.content+=a||"",s.length&&(n.hasChoice=!0,n.content+=s.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join(""))}else{var c=t.split("_"),l=this.paperTree||[];c.forEach((function(t,e){var i=l.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};l=i.children||[],e===c.length-1&&(n.content+=i.title||"",i.choices&&i.choices.length&&(n.hasChoice=!0,n.content+=i.choices.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join("")))}))}this.editing=n,this.editorTitle=e,this.visible=!0},handleSubmit:function(t){var e=this.editing,n=e.dataKey,i=e.hasChoice,r={dataKey:n};if(i){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],l=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");l={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(l)}else l?l.content+=t:s+=t})),Object.assign(r,{title:s,choices:c})}else r.title=t;this.$store.dispatch("AC/paper/setEditTitle",r)},getBasicInfo:function(t){var e=null;return t?"graffiti"!==this.readType||t%(this.patchwork?4:2*this.layout)||(e={hideStudentInfo:!this.showStudentInfo,hideTitle:!0,hideAttention:!0,height:this.eduHeight}):e={hideStudentInfo:!this.showStudentInfo,hideAttention:!this.showAttention,height:this.headHeight+(this.showAttention?this.attentionHeight:0)+this.eduHeight},e},getPanelList:function(){var t=this,e=this.$createElement,n=[],i=0;n[i]=[];var r=this.pieceHeight,a=n[i],o=[],s=function(){var e=t.getBasicInfo(i);e&&(r-=e.height,a.push(Object.assign({type:"basicInfo"},e)))},c=function(){var e=n[i];if(i++,n[i]=[],r=t.pieceHeight,a=n[i],s(),"graffiti"===e[e.length-1].type){var o=e[e.length-1];e.pop(),a.push(o),r-=o.height}},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=["","inner"].includes(i)?0:30,o=r-(n?32:0)-a;return Math.floor((o+e)/(t+e))},u=function(n,i,r){var o="编辑题目",s=!1,c="",l="",u=!1,h=n.map((function(n){var a="";switch(n.type){case"choice":a="<div class=".concat(n.className,">").concat(n.children.join(""),"</div>");break;case"questionTitle":var h;s=n.isFirst,n.needAnswerBox&&(c="score"),n.hasChoice&&n.needAnswerBox&&(c="answer");var d=n.children.join(""),f=!(null===(h=n.prefix)||void 0===h||!h.match(/class="([^"]*?)is-float([^"]*?)"/));a=e("div",{class:"ac-question__title",style:n.titleAlign?"text-align: ".concat(n.titleAlign):""},[n.prefix?e("div",{attrs:{contentEditable:!0},domProps:{innerHTML:n.prefix},style:f?"float: left; position: relative; z-index: 1;":"",on:{blur:function(e){return t.handleTitlePrefixBlur(e,i)}}}):null,d?e("div",{class:"ac-question__title-inner",domProps:{innerHTML:d}}):null]);break;case"essayArea":a=n.essayConfig;break;case"material":s=n.isFirst,o="编辑材料",r="material";var p=n.children.join("");a="<div class='ac-material__title'>".concat(n.prefix||"").concat(p?"<div class='ac-material__title-inner'>".concat(p,"</div>"):"","</div>");break;case"plainBox":r="plainBox",l=n.boxContent,u=n.isFollow;break;default:a=n.content}return a}));n.length=0,a.push({type:r,dataKey:i,content:h,editBtn:s?o:"",answerBoxType:c,boxContent:l,isFollowBox:u})},h=function(e,n,i){var a=e.rowHeight,o=e.rowGap,s=e.titleChildren,h=e.borderType,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType),p=t.rowConfig[f]||{};a="number"===typeof a?a:p.rowHeight||0,o="number"===typeof o?o:p.rowGap||0,r<30&&c();var g={type:"essayArea"};if(s){var m="";s.forEach((function(t,a){r>=t.height+(a?0:32)?(m+=t.content,r-=t.height+(a?0:32)):(m&&i.push({type:"essayArea",essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d,bgType:f})}),i.length&&u(i,n,"essay"),c(),m=t.content,r-=t.height+32)})),m?Object.assign(g,{essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d})}):g=null}else g=null;if(!d)return g?i.push(g):(i.push({type:"essayArea",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30),void u(i,n,"essay");var y=d;while(y){var v=l(a,o,!g,h);if(v<1)g&&(i.push(g),g=null),i.length&&u(i,n,"essay"),c();else if(v<y)i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:v,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})}),g&&(g=null),u(i,n,"essay"),c(),y-=v;else{i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:y,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})});var _=["","inner"].includes(h)?0:30;r-=y*(a+o)-o+(g?0:32)+_,y=0,g&&(g=null)}}},d=function t(e,n,i){e.forEach((function(e,a){if(e.children)t(e.children,n,i);else{var o=e.height;if(!a&&e.answerBoxHeight&&(o=Math.max(o,e.answerBoxHeight)),r<o&&(i.length&&u(i,n,"question"),c(),["questionTitleItem","materialItem"].includes(e.type)&&a&&(e.height+=16)),r>=e.height){switch(e.type){case"choiceItem":i.length&&"choice"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"choice",className:e.wrapperClass,children:[e.content]});break;case"questionTitleItem":i.length&&"questionTitle"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"questionTitle",prefix:e.prefix,children:[e.content],isFirst:!a,hasChoice:e.hasChoice,needAnswerBox:e.needAnswerBox,titleAlign:e.titleAlign});break;case"materialItem":i.length&&"material"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"material",prefix:e.prefix,children:[e.content],isFirst:!a});break;case"plainBox":i.push({type:"plainBox",isFollow:!e.height,boxContent:e.boxContent});break;default:i.push(e.content)}r-=e.height}}}))},f=JSON.parse(JSON.stringify(this.domList));f.forEach((function(e){if(e){if(e.updatePiece)c();else if(e.updatePage)for(var i=2*t.layout,l=i-(n.length%i||i)+1,f=0;f<l;f++)c();if(e.children)e.children&&(d(e.children,e.dataKey,o),o.length&&u(o,e.dataKey,"question"));else switch(e.type){case"essay":h(e.essay,e.dataKey,o),o.length&&u(o,e.dataKey,"essay");break;case"basicInfo":t.headHeight=e.headHeight||0,t.attentionHeight=t.latticeAttention.height||e.attentionHeight||0,t.showStudentInfo&&(t.showEducationId?t.eduHeight=t.eduIdLength>10&&0!==t.registrationType?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)),s();break;case"graffiti":var p=t.getRowCount(e.dataKey,e.essayRowCount||0);if(e.subtype===(p?"beforeTitle":"beforeEssay"))break;default:r<e.height&&c(),r>=e.height&&(a.push({type:e.type||"",dataKey:e.dataKey,content:e.content,height:e.height,subtype:e.subtype}),r-=e.height)}}})),this.panelList=n},handleTitlePrefixBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{prefix:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})}}},xt=At,Et=Object(P["a"])(xt,st,ct,!1,null,null,null),kt=Et.exports;kt.install=function(t){t.component(kt.name,kt)};var Tt=kt,St=n("cf03"),It=n.n(St),Ot=n("c4e3"),Bt=n.n(Ot),Lt=n("21a6"),Pt=n.n(Lt),Rt={name:"AcLattice",components:{AcVirtual:ot,AcPanel:Tt},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],bgUrlList:[],scanZipUrl:""}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(v["a"])(this,e),this.file=t}return Object(_["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){t(e.file,n)}))}}]),e}()}},methods:{setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(q["d"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("graffiti"!==t.readType){e.next=8;break}if(!($(".ac-piece__wrapper").length>16)){e.next=4;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 4:return e.next=6,t.getZipContent();case 6:n=e.sent,t.scanZipUrl=n||"";case 8:return e.next=10,t.getAreaImages();case 10:return e.next=12,t.getPositionData();case 12:return i=e.sent,e.next=15,t.getPageImage();case 15:return r=e.sent,a="K"===t.sizeType?1===t.layout?[552.76,765.35]:[765.35,1105.51]:1===t.layout?"a4":"a3",o=new It.a(1===t.layout?"p":"l","pt",a),r.forEach((function(e,n){var i=1===t.layout?"K"===t.sizeType?552.76:595.28:"K"===t.sizeType?1105.51:1190.55,a="K"===t.sizeType?765.35:841.89;o.addImage(e,"JPEG",0,0,i,a),n!==r.length-1&&o.addPage()})),s="".concat(t.$store.getters["AC/title"].replace(/\n/g,"")),c=o.output("blob"),l="".concat(("K"===t.sizeType?195:210)*t.layout,"mm*").concat("K"===t.sizeType?270:297,"mm"),u={file:c,positionList:i,paperSize:l,pageImgs:r,pdfName:s},t.scanZipUrl&&(u.scanZipUrl=t.scanZipUrl),e.abrupt("return",u);case 25:case"end":return e.stop()}}),e)})))()},getPositionData:function(){var t=this;return y(g().mark((function e(){var n,i,r;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],i=function(e,n,i){var r=i||$(e).parents(".ac-piece__wrapper"),a=r.offset(),o=a.left,s=a.top,c=$(e).offset(),l=c.left,u=c.top,h=l-o,d=h+$(e).outerWidth(),f=u-s,p=f+$(e).outerHeight(),g={page_left_top:"(".concat(t.pxToAU(h),",").concat(t.pxToAU(f),")"),page_right_bottom:"(".concat(t.pxToAU(d),",").concat(t.pxToAU(p),")"),question_page:r.data("page")};if("hand"===t.readType&&n){var m=$(e).find(".ac-answer-box")[0];if(m){var y=$(m).offset(),v=y.left,_=y.top;Object.assign(g,{mark_left_top:"(".concat(t.pxToAU(v-o),",").concat(t.pxToAU(_-s),")"),mark_right_bottom:"(".concat(t.pxToAU(v-o+$(m).outerWidth()),",").concat(t.pxToAU(_-s+$(m).outerHeight()),")")})}}return g},r=function e(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,o){var s=[].concat(u(a),[r[r.idProp||"id"]||o]);if(Array.isArray(r.children)&&r.children.length)e(r.children,s);else{var c=s.join("_"),l=$(".ac-panel");if(r.choices){var h=l.find(".ac-question[data-key=".concat(c,"] .ac-answer-box"))[0];h&&n.push(Object.assign(i(h),r.positionInfo||{}))}else if(r.essay)for(var d=t.editEssayList.find((function(t){return t.dataKey===c}))||{},f="number"===typeof d.row?0===d.row:0===r.essay.rowCount,p=f?l.find(".ac-question[data-key=".concat(c,"]")):l.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(c,"],"):"",".ac-essay__wrapper[data-key=").concat(c,"]").concat("area"===r.essay.range?" .ac-essay__area":"")),g=(t.bgUrlList.find((function(t){return t.dataKey===c}))||{}).bgUrls||[],m=0;m<p.length;m++){var y=i(p[m],!0);g[m]&&(y.backGroundImage=g[m]),n.push(Object.assign(y,r.positionInfo||{}))}else for(var v=l.find(".ac-question[data-key=".concat(c,"]")),_=0;_<v.length;_++){var b=i(v[_],!0);n.push(Object.assign(b,r.positionInfo||{}))}}}))},r(t.paperTree),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))()},pxToAU:function(t){var e="K"===this.sizeType?195:210;return Math.floor(t*e*8/294*100)/100},getAreaImages:function(){var t=this;return y(g().mark((function e(){var n,i,r,a;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],i=$(".ac-panel"),r=function e(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,o){var s=[].concat(u(a),[r[r.idProp||"id"]||o]);if(Array.isArray(r.children)&&r.children)e(r.children,s);else if(r.essay){var c=s.join("_"),l=t.editEssayList.find((function(t){return t.dataKey===c}))||{},h="number"===typeof l.row?0===l.row:0===r.essay.rowCount,d=l.title||r.essay.title;h?n.push({dataKey:c,domArr:i.find(".ac-question[data-key=".concat(c,"]"))}):d&&n.push({dataKey:c,domArr:i.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(c,"],"):"",".ac-essay__wrapper[data-key=").concat(c,"]"))})}}))},r(t.paperTree),a=[],n.forEach((function(e){e.domArr.length&&a.push(new Promise((function(n,i){Object(q["d"])(e.domArr,4,"K"===t.sizeType?5200:5600).then((function(i){var r=i.map((function(t){return Object(q["a"])(t)})),a=[];r.forEach((function(e){var n=new t.UploadAdapter(e);a.push(n.upload())})),Promise.allSettled(a).then((function(t){t.forEach((function(t,e){var n;i[e]="fulfilled"===t.status?"https://".concat(null===t||void 0===t||null===(n=t.value)||void 0===n?void 0:n.url):""})),e.bgUrls=i,n()}))})).catch((function(){return n()}))})))})),e.next=8,Promise.allSettled(a);case 8:t.bgUrlList=n;case 9:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d,f;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),i=$(".ac-piece__wrapper"),r=1===t.registrationNumberType,a=new Bt.a,o="".concat(n,"模板_").concat(n,"_").concat(2===t.layout?"A3":"A4","_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(i.length,"_").concat(r?"涂点":"条码","_").concat(r?"10":"-1","_").concat(r?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(i).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(q["d"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]),o=r.length,c=new Uint8Array(o);while(o--)c[o]=r.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return l=e.sent,u="".concat(n,"模板.zip"),h=new File([l],u,{type:"zip"}),Pt()(l,u),d=new t.UploadAdapter(h),e.next=21,d.upload();case 21:return f=e.sent,e.abrupt("return","https://"+f.url);case 23:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),i=function(n,i){var r=$(n).offset(),a=r.left,o=r.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var r=$(n),s="absolute"===r.data("scan-type"),c={Type:"AnswerArea",Name:r.data("export_name"),Page:i,X:Math.floor(r.offset().left-(s?a:l)),Y:Math.floor(r.offset().top-(s?o:u)),Width:Math.ceil(r.outerWidth()),Height:Math.ceil(r.outerHeight())};"考号"===r.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},r=function(t,n){var i=$(t).find(".mark-point__top-left")[0],r=$(i).offset(),a=r.left,o=r.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var i=$(t),r={Type:"ReviewArea",Name:i.data("scan-name"),Page:n,X:i.offset().left-a,Y:i.offset().top-o,Width:i.outerWidth(),Height:i.outerHeight(),MaxScore:i.data("scan-score")};String(r.X).indexOf(".")>-1&&(r.X=Math.floor(r.X),r.Width+=1),String(r.Y).indexOf(".")>-1&&(r.Y=Math.floor(r.Y),r.Height+=1),r.Width=Math.ceil(r.Width),r.Height=Math.ceil(r.Height),e.push(r)}))};Array.from(n).forEach((function(t,e){i(t,"第".concat(e+1,"页")),r(t,"第".concat(e+1,"页"))}));var a='<?xml version="1.0" encoding="utf-8"?>';return a+='<answerSheet isNew="true" isYcProject="true" isYCLattice="true" layout="'.concat(this.layout,'">'),a+=this.getXMLStringFromArray(e),a+="</answerSheet>",a},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">")})).join("")}}},jt=Rt,Mt=Object(P["a"])(jt,d,f,!1,null,null,null),zt=Mt.exports,Nt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-sweep"},[e("ac-sweep-virtual",{attrs:{tree:t.sweepPaperTree},on:{change:t.setDomList,"build-failed":t.buildFailed}}),e("ac-sweep-panel",{attrs:{"dom-list":t.domList}})],1)},Dt=[],$t=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__choice",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom"],attrs:{"data-key":t.dataKey}},[Array.isArray(t.listData)?t._l(t.listData,(function(n,i){return e("div",{key:i,staticClass:"ac-sweep__choice-wrapper"},[e("ul",{class:["ac-sweep__choice-box"],style:{gridTemplateColumns:"repeat(".concat(n.questionsWidth.length,", auto)"),gridTemplateRows:"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridAutoFlow:t.objectiveOrder}},t._l(n.questions,(function(n,r){return e("li",{key:"".concat(i,"_").concat(r),ref:"choiceEach_".concat(i,"_").concat(r),refInFor:!0,staticClass:"ac-sweep__choice-each"},[e("span",{staticClass:"choice-title",style:{width:t.isComplex?"50px":"20px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"".concat(i,"_").concat(r))}}},[t._v(" "+t._s(t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n.choices,(function(n,a){return e("span",{key:"".concat(i,"_").concat(r,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])})),0)])})):[e("div",{staticClass:"ac-sweep__choice-wrapper"},[e("ul",{staticClass:"ac-sweep__choice-box"},[e("li",[e("span",{staticClass:"choice-title",attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"0")}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,i){return e("span",{key:i,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])])])]],2)},Ut=[],Ft={name:"AcSweepChoice",components:{},props:{list:{type:[Array,Object]},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isComplex:{type:Boolean,default:!1},dataKey:{type:[String,Number]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]}},watch:{objectiveOrder:function(t){this.convertTree(this.list)}},mounted:function(){this.convertTree(this.list)},data:function(){return{listData:null}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(this.dataKey,"_").concat(e)})},convertTree:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++){var i=t[n];"single_choice"===i.code?(0!==n&&"single_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i)):"multiple_choice"===i.code?(0!==n&&"multiple_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i)):"judgment"===i.code&&(0!==n&&"judgment"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i))}this.listData=e,this.getChoiceWidth(this.listData)}},getChoiceWidth:function(t){var e=this;t.forEach((function(t){t.questions.forEach((function(n){t.questionsWidth.push(6+(e.isComplex?50:20)+30*n.choices.length-8+28)}))})),this.listData.forEach((function(t){t.questionsWidth=e.designLayout(e.objectiveOrder,t.questionsWidth)}))},designLayout:function(t,e){var n=$(".ac-sweep__choice").innerWidth()-64,i=function(t){return t.reduce((function(t,e){return Math.max(t,e)}),0)},r=function(t){return t.reduce((function(t,e){return Math.min(t,e)}),n)},a=function(t,i){var r=[];return e.forEach((function(n,a){var o="row"===i?a%t:Math.floor(a/Math.ceil(e.length/t));r[o]=Math.max(r[o]||0,n)})),n-r.reduce((function(t,e){return t+e}),0)},o=i(e),s=r(e),c=Math.floor(n/o),l=c,u=!0;while(u){var h=a(l,t);h<s||l>=e.length?(u=!1,h<0&&(l-=1)):l+=1}var d=Array(l).fill("").map((function(n,i){return e.filter((function(n,r){if("row"===t)return r%l===i;var a=Math.ceil(e.length/l);return r<(i+1)*a&&r>=i*a}))}));return d}}},Ht=Ft,Kt=Object(P["a"])(Ht,$t,Ut,!1,null,null,null),Wt=Kt.exports;Wt.install=function(t){t.component(Wt.name,Wt)};var Vt=Wt,Zt=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__composite",t.lastOneClass,t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"hide-border-top",t.isPaddingTop&&"is-padding-top"],style:{paddingBottom:"".concat(t.additionalPadding,"px")},attrs:{"data-key":t.dataKey,type:"composite","page-index":t.pageIndex}},[e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getTitle)}}),t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom"]}):t._e(),e("el-button",{staticClass:"edit-btn",attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}})],1)},Yt=[],Gt={name:"AcSweepComposite",components:{AcEditor:pt["default"]},inject:["paddingBlock"],props:{title:{type:String,default:""},blankNum:{type:Number,default:0},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isHideBorderTop:{type:Boolean,default:!1},dataKey:{type:String,default:""},isComplex:{type:Boolean,default:!1},isPaddingTop:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},ctnType:{type:String,default:"virtual"},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""},height:{type:Number,default:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]},getTitle:function(){var t=this;if("piece"===this.ctnType)return this.title;var e=this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{},n=new Array(this.blankNum).fill("").map((function(){return'<span style="display: inline-block; height: 40px; vertical-align: text-top; '.concat(t.isEntranceExams&&"color: #EB617E;",'"><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></span>')}));return e.title||'<span style="height: 40px;">'.concat(this.title,"</span>").concat(n.join("、"))},panelFlag:function(){return this.$store.getters["AC/panelFlag"]}},watch:{lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}}},mounted:function(){},data:function(){return{editorVisible:!1,editContent:"",additionalPadding:void 0,lastAdditionPadding:0}},methods:{getFullTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.$refs.compositeContent.innerHTML},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/paper/setEditTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,0),this.additionalPadding=e>0?e:0}}},Qt=Gt,Xt=Object(P["a"])(Qt,Zt,Yt,!1,null,null,null),Jt=Xt.exports;Jt.install=function(t){t.component(Jt.name,Jt)};var qt,te,ee=Jt,ne={name:"AcSweepComplex",components:{AcSweepChoice:Vt,AcSweepCompletion:ee,AcEssay:x["default"],AcEditor:pt["default"]},props:{list:{type:[Array,Object]},isShowBorderBottom:{type:Boolean,default:!1},dataKey:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},created:function(){this.init()},data:function(){return{listTree:null,editorVisible:!1,editContent:""}},methods:{init:function(){this.listTree=this.convertTree(this.list)},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},convertTree:function(t){for(var e=t.children,n=[],i=0;i<e.length;i++){var r=e[i];("single_choice"===r.code||"multiple_choice"===r.code||"judgment"===r.code)&&i<e.length-1&&("single_choice"===e[i+1].code||"multiple_choice"===e[i+1].code||"judgment"===e[i+1].code)?(n.push([r,e[i+1]]),i++):n.push(r)}return t.children=n,t},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.listTree.title},editTitle:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},getList:function(t){var e=this,n=this.$createElement;return t.map((function(t,i){return n("div",{key:"".concat(i,"_").concat(t[t.idProp||"id"]||""),class:!t.code&&!Array.isArray(t)&&"ac-sweep__virtual-section",attrs:{"data-key":t.dataKey,"question-code":t.code}},[Array.isArray(t.children)&&t.children.length&&"complex"!==t.code?n("div",{class:"ac-sweep__virtual-box"},[!t.code&&e.getTitle(t,t.dataKey),e.getList(t.children)]):n("div",[Array.isArray(t)||"single_choice"===t.code||"multiple_choice"===t.code||"judgment"===t.code?n("ac-sweep-choice",{props:A({},{list:t,showBorder:!1,dataKey:t.dataKey,isComplex:!0})}):null,"completion"===t.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(t.dataKey)),props:A({},Object.assign(t,{dataKey:t.dataKey,isComplex:!0,showBorder:!0}))}):null,"subjectivity"===t.code?n("ac-essay",{props:A({},Object.assign(t.essay,{title:e.getEssayTitle(t.dataKey,t.title),hiddenBorderBoth:!1}))}):null,"complex"===t.code?n("ac-sweep-complex",{props:A({},{list:t,dataKey:t.dataKey})}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-sweep__complex ".concat(this.isShowBorderBottom&&"is-border-bottom")},[this.listTree.title?t("p",{class:"ac-sweep__complex-title",on:{click:this.editTitle},domProps:{innerHTML:this.getLiContent?this.getLiContent:this.listTree.title}}):null,this.getList(this.listTree.children),t("ac-editor",{attrs:{visible:this.editorVisible,content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}})])}},ie=ne,re=Object(P["a"])(ie,qt,te,!1,null,null,null),ae=re.exports;ae.install=function(t){t.component(ae.name,ae)};var oe,se,ce=ae,le={name:"AcSweepVirtual",components:{AcSweepChoice:Vt,AcSweepCompletion:ee,AcSweepComplex:ce,AcEssay:x["default"],AcBasicInfo:Q["default"]},props:{tree:{type:Array,default:function(){return[]}}},computed:{sweepPaperTree:function(){return this.$store.getters["AC/sweepPaperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},layout:function(){return this.$store.getters["AC/layout"]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},readType:function(){return this.$store.getters["AC/readType"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},watch:{panelFlag:function(){var t=this;this.$nextTick((function(){return t.getDomList()}))}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},errorCaptured:function(){this.$emit("build-failed")},data:function(){return{}},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},getTitle:function(t,e){var n=this,i=this.$createElement,r=t.title;return i("div",{class:"ac-sweep__virtual-head",attrs:{contenteditable:!0,"data-key":e},domProps:{innerHTML:r},on:{blur:function(t){return n.handleBlur(t,e)}}})},getList:function(t){var e=this,n=this.$createElement;return t.map((function(i,r){return n("div",{key:"".concat(r,"_").concat(i[i.idProp||"id"]||""),class:!i.code&&!Array.isArray(i)&&"ac-sweep__virtual-section",attrs:{"data-key":i.dataKey||r,"question-code":i.code}},[Array.isArray(i.children)&&i.children.length&&"complex"!==i.code?n("div",{class:"ac-sweep__virtual-box"},[!i.code&&e.getTitle(i,i.dataKey||r),e.getList(i.children)]):n("div",[(e.layout>1?r%(2*e.layout)===0:e.patchwork?(r+1)%4===1:r%2===0)?n("ac-basic-info"):null,Array.isArray(i)||"single_choice"===i.code||"multiple_choice"===i.code||"judgment"===i.code?n("ac-sweep-choice",{props:A({},{list:i,isShowBorderBottom:r===t.length-1,dataKey:i.dataKey||r})}):null,"completion"===i.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(i.dataKey)),props:A({},Object.assign({dataKey:i.dataKey},i,{isShowBorderBottom:r===t.length-1,isPaddingTop:t[r-1]&&"completion"!==t[r-1].code&&"complexTitle"!==t[r-1].code}))}):null,"subjectivity"===i.code?n("ac-essay",{props:A({},Object.assign(i.essay,{title:e.getEssayTitle(i.dataKey,i.title)}))}):null,"complex"===i.code?n("ac-sweep-complex",{props:A({},{list:i,isShowBorderBottom:r===t.length-1,dataKey:i.dataKey})}):null])])}))},splitDom:function(t){for(var e="",n=0,i=0,r=[],a=t.childNodes||[],o=0;o<a.length;o++){var s=a[o];if(-1===["P","DIV","IMG","FIGURE"].indexOf(s.nodeName))try{"#text"===s.nodeName?e+=s.textContent:e+=s.outerHTML}catch(f){}else{var c=getComputedStyle(s),l=Number(c.marginTop.replace("px",""))||0,u=Number(c.marginBottom.replace("px",""))||0,h=Object(q["e"])(s);r.length&&(h-=i),e+=s.outerHTML,n+=h+$(s).outerHeight()+l+u,r.push({content:e,height:n}),e="",n=0,i=Object(q["e"])(s)+$(s).outerHeight()+l+u}}if(e){var d=$(t).outerHeight();r.push({content:e,height:r.length?d-i:d})}return r},getDomList:function(){var t=this,e=function(e){e.forEach((function(e,n){var i=l.find(".ac-sweep__virtual-section[data-key=".concat(n,"]")),r=i.find(".ac-sweep__virtual-head")[0];r&&c.push({type:"sectionHead",height:t.editTitleList.find((function(t){return t.dataKey===n}))?t.editTitleList.find((function(t){return t.dataKey===n})).height:$(r).outerHeight(),content:r.innerHTML,dataKey:$(r).data("key")}),Array.isArray(e.children)&&e.children&&e.children.forEach((function(t,n){var r=t.dataKey,a=i.find("div[data-key=".concat(r,"]"))[0];s(t,a,!1,n===e.children.length-1,r)}))}))},n=function(e,n){var i=t.layout>2?520:808,r=function(t){return t.reduce((function(t,e){return Math.max(t,e.width)}),0)},a=function(t){return t.reduce((function(t,e){return Math.min(t,e.width)}),i)},o=function(t,e){var r=[];return n.forEach((function(i,a){var o="row"===e?a%t:Math.floor(a/Math.ceil(n.length/t));r[o]=Math.max(r[o]||0,i.width)})),i-r.reduce((function(t,e){return t+e}),0)},s=r(n),c=a(n),l=Math.floor(i/s),u=l,h=!0;while(h){var d=o(u,e);d<c||u>=n.length?(h=!1,d<0&&(u-=1)):u+=1}var f=Array(u).fill("").map((function(t,i){return n.filter((function(t,r){if("row"===e)return r%u===i;var a=Math.ceil(n.length/u);return r<(i+1)*a&&r>=i*a}))}));return f.forEach((function(t){var e=r(t);t.forEach((function(t){t.columnWidth=e}))})),f},i=function(e,i){if(Array.isArray(e)){for(var o=[],s=0;s<e.length;s++){var c=e[s];"single_choice"===c.code?(0!==s&&"single_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"multiple_choice"===c.code?(0!==s&&"multiple_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"judgment"===c.code&&(0!==s&&"judgment"===e[s-1].code||o.push([]),o[o.length-1].push(c))}var l=[],u=0;return o.forEach((function(e){e.forEach((function(t){var e=r(t.title)?a(t.title):23;u=e>u?e:u})),e.forEach((function(t){t.titleWidth=u,t.width=t.titleWidth+6+30*t.choices.length-8+18}));for(var i=n(t.objectiveOrder,e),o=i[0].length,s=function(t){l.push(i.map((function(e){return e.find((function(e,n){return n===t}))})))},c=0;c<o;c++)s(c)})),l}},r=function(t){var e=o(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},a=function(t){var e=o(t).length;return e>6?56:6===e?48:e<6?40:void 0},o=function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},s=function e(n,r,a,o,s){if(Array.isArray(n)){var l=i(n,a);l.forEach((function(t,e){c.push({height:0===e||l.length-1===e?39:24,type:"objective",isComplex:a,isShowBorderBottom:o,dataKey:s,list:t})}))}else switch(n.code){case"single_choice":case"multiple_choice":case"judgment":c.push(Object.assign({height:39,type:"objective",isComplex:a,isShowBorderBottom:o},n));break;case"completion":var u=$(r).find(".ac-sweep__composite-title")[0],h=t.splitDom(u);h.forEach((function(t){t.type="completionItem",t.isComplex=a})),h.length&&"graffiti"===t.readType&&(h[0].height+=16),"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"completion",isComplex:a,isShowBorderBottom:o,dataKey:n.dataKey,height:$(u).outerHeight(),children:h});break;case"subjectivity":var d=$(r).find(".ac-essay__title")[0];"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"essay",dataKey:s,essay:Object.assign({rowCount:4,dataKey:n.dataKey,isComplex:a,titleChildren:t.splitDom(d)},n.essay)});break;case"complex":var f=$(r).find(".ac-sweep__complex-title")[0];if(f){var p=t.splitDom(f);p.length&&(p[0].type="complexTitleItem"),c.push({type:n.title?"complexTitle":null,children:p})}n.children&&n.children.forEach((function(t,i){var a=$(r).find("div[data-key=".concat(t.dataKey,"]"));e(t,a,!0,i===n.children.length-1,t.dataKey)}));break}},c=[],l=$(".ac-virtual"),u=l.find(".ac-basicInfo");if(u){var h=u.find(".ac-basicInfo__title"),d=u.find(".ac-attention"),f=u.find(".ac-basic-info__edu");c.push({type:"basicInfo",headHeight:null===h||void 0===h?void 0:h.outerHeight(),attentionHeight:null===d||void 0===d?void 0:d.outerHeight(),eduHeight:null===f||void 0===f?void 0:f.outerHeight()})}e(this.tree),this.$emit("change",c)}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},style:{width:this.$store.getters["AC/layout"]>2?"690px":"978px"}},[this.getList(this.tree)])}},ue=le,he=Object(P["a"])(ue,oe,se,!1,null,null,null),de=he.exports;de.install=function(t){t.component(de.name,de)};var fe=de,pe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,i){return e("div",{key:i,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",attrs:{"data-page-type":n.flat().length?"":"restrict"}},[n.length?t._l(n,(function(n,r){return e("ac-sweep-piece",{key:r,attrs:{"data-piece":i*t.layout+r,"data-page":i,list:n,"page-index":i,"outlay-index":"".concat(i,"_").concat(r)}})})):e("div",{staticClass:"ac-piece"},[e("ac-restrict",{attrs:{height:1250}})],1),e("ac-mark-point",{attrs:{"page-index":i}}),t.isAddFooter?e("div",{staticClass:"ac-piece__footer",style:t.isEntranceExams&&{bottom:"42px",left:"140px"}},[t.isEntranceExams?e("span",[t._v(t._s(t.courseName))]):t._e(),t._v(" "+t._s("第".concat(i+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")]):t._e()],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||""},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},ge=[],me=n("2638"),ye=n.n(me),ve=function(){var t=this,e=t._self._c;return e("div",{class:["objective","is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"is-hide_Border-top",t.lastOneClass],style:{paddingBottom:"".concat(t.additionalPadding,"px")},attrs:{"data-key":Array.isArray(t.list)?t.list[0].list[0].dataKey:t.list.dataKey||t.list.list[0].dataKey,"data-objective_area":"客观题区域","page-index":t.pageIndex,"data-scan-type":"absolute"}},[t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom"]}):t._e(),Array.isArray(t.list)?t._l(t.list,(function(n,i){return e("div",{key:i,class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},[n.list?t._l(n.list,(function(r,a){return e("div",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-each",style:{width:r&&"".concat(r.columnWidth,"px"),height:r&&"".concat(n.height,"px"),lineHeight:r&&"".concat(24,"px"),paddingTop:"".concat(0===i&&n.height-24,"px"),paddingBottom:"".concat(i===t.list.length-1&&n.height&&r-24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":r&&r.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:r&&"".concat(r.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,r.dataKey)}}},[t._v(" "+t._s(r&&t.getBeforeChinese(r.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(r&&r.choices,(function(n,o){return e("span",{key:"".concat(i,"_").concat(a,"_").concat(o),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==r.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])})):t._l([n],(function(n,i){return e("div",{key:"".concat(i),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(n.height,"px"),lineHeight:n&&"".concat(n.height,"px"),whiteSpace:"nowrap",paddingTop:"15px",paddingBottom:"15px"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&"".concat(n.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(r,a){return e("span",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==n.code?r.identifier:t.judgmentMode?"T"===r.identifier?"✓":"×":r.identifier)+" ")])})),0)])}))],2)})):[t.list.list?e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},t._l(t.list.list,(function(n,i){return e("div",{key:"".concat(i),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(t.list.height,"px"),lineHeight:n&&"".concat(t.list.height,"px"),whiteSpace:"nowrap"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&"".concat(n.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(r,a){return e("span",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==n.code?r.identifier:t.judgmentMode?"T"===r.identifier?"✓":"×":r.identifier)+" ")])})),0)])})),0):e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap",paddingLeft:0===t.answerMode&&"40px"}},[e("div",{staticClass:"ac-sweep__choice-each",style:{width:"".concat(t.list.columnWidth,"px"),height:"".concat(t.list.height,"px"),lineHeight:"".concat(t.list.height,"px"),whiteSpace:"nowrap"},attrs:{"data-key":t.list.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:"".concat(t.list.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,t.list.dataKey)}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,i){return e("span",{key:i,staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==t.list.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])])]],2)},_e=[],be={name:"AcObjective",components:{},inject:["paddingBlock"],props:{list:{type:[Array,Object]},isHideBorderTop:{type:Boolean,default:!1},isShowBorderBottom:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},computed:{objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},judgmentMode:function(){return this.$store.getters["AC/judgmentMode"]},layout:function(){return this.$store.getters["AC/layout"]},answerMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},watch:{lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}}},mounted:function(){},data:function(){return{additionalPadding:void 0,lastAdditionPadding:0}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);if(-1===n)return t;var i=t.slice(0,n);return i.endsWith(".")?i.slice(0,-1):i}},isHasBrackets:function(t){var e=this.getBeforeChinese(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},convertWidth:function(t){var e=this.getBeforeChinese(t).length;return e>6?56:6===e?48:e<6?40:void 0},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(e)})},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,0),this.additionalPadding=e>0?e:void 0}}},we=be,Ce=Object(P["a"])(we,ve,_e,!1,null,null,null),Ae=Ce.exports;Ae.install=function(t){t.component(Ae.name,Ae)};var xe,Ee,ke=Ae,Te={name:"AcSweepPiece",components:{AcEssay:x["default"],AcBasicInfo:Q["default"],AcSweepCompletion:ee,AcObjective:ke,AcEditor:pt["default"],AcRestrict:Ct,AcGraffiti:G["default"]},props:{list:{type:Array,default:function(){return[]}},pageIndex:{type:Number,default:0},outlayIndex:{type:String,default:""}},computed:{pieceHeight:function(){return"1386px"},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sweepList:function(){return this.transformTree(this.list)},layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},data:function(){return{editorVisible:!1,editContent:"",completionIsLastOne:!1}},methods:{handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e,height:t.target.offsetHeight}),this.$store.dispatch("AC/paper/resetPanel")},editTitle:function(t){var e=this;this.editContent=(this.editEssayList.find((function(t){return t.dataKey===e.dataKey}))||{}).title||t,this.editorVisible=!0},getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},transformTree:function(t){var e=this,n=new Set(["objective"]);return t.reduce((function(i,r,a){r.children&&(r.children=e.transformTree(r.children));var o=i[i.length-1];return o&&n.has(t[a-1].type)&&n.has(r.type)?(Array.isArray(o)?o.push(r):i[i.length-1]=[o,r],i):(i.push(r),i)}),[])},getContent:function(t,e){var n=this,i=this.$createElement,r=null;switch(!0){case"basicInfo"===t.type:r=i("ac-basic-info",{props:A({},t)});break;case"complexTitle"===t.type:r=i("div",{class:"ac-sweep__complex",style:{borderBottom:this.sweepList.length-1===e&&"1px solid #000"}},[i("p",{class:"ac-sweep__complex-title",on:{click:function(){return n.editTitle(t.content[0])}},domProps:{innerHTML:this.getLiContent?this.getLiContent:t.content[0]}})]);break;case"sectionHead"===t.type:r=i("div",{class:"ac-sweep__head-wrapper"},[i("div",{class:"ac-sweep__virtual-head",style:{marginTop:"".concat(t.height>=51?0===e?0:5:t.height-46,"px")},attrs:{contenteditable:!0,dataKey:t.dataKey},domProps:{innerHTML:t.content},on:{blur:function(e){return n.handleBlur(e,t.dataKey)}}}),i("div",{class:"".concat(this.isEntranceExams&&"entrance-border"," ").concat(this.isEntranceExams&&this.layout>2&&"three-column_border"," ").concat(this.isEntranceExams&&0===e&&"show-border_top"," ").concat(this.isEntranceExams&&this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type&&"show-border_word-top")}),i("div",{class:"".concat(this.isEntranceExams&&"entrance-outline"," ").concat(this.isEntranceExams&&this.layout>2&&"three-column_outline"," ").concat(this.isEntranceExams&&0===e&&"show-outline_top"," ").concat(this.isEntranceExams&&this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type&&"show-outline_word-top")})]);break;case"graffiti"===t.type:r=i("ac-graffiti",{props:A({},Object.assign(t,{hideTopBorder:this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type}))});break;case"completion"===t.type:r=i("ac-sweep-completion",{props:A({},Object.assign(t,{ctnType:"piece",dataKey:t.dataKey,title:t.content[0],isHideBorderTop:0!==e&&this.sweepList[e-1]&&["completion","complexTitle"].includes(this.sweepList[e-1].type)&&!(t.isComplex&&"0"===t.dataKey[t.dataKey.length-1]),isPaddingTop:0==e||this.sweepList[e-1]&&"completion"!==this.sweepList[e-1].type&&"complexTitle"!==this.sweepList[e-1].type||t.isComplex&&"0"===t.dataKey[t.dataKey.length-1],pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type),isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:e===this.sweepList.length-1,lastOneClass:e===this.sweepList.length-1?"piece-composite".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null}))});break;case"objective"===t.type||Array.isArray(t):r=i("ac-objective",{props:A({},{list:t,isHideBorderTop:0!==e&&this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||!!this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type),isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:e===this.sweepList.length-1,lastOneClass:e===this.sweepList.length-1?"piece-objective".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null})});break;case"essay"===t.type:r=i("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.essayConfig.dataKey||"","page-index":this.pageIndex+1,"row-height":34,"li-editable":!0},props:A({},A(A({},t.essayConfig),{},{hiddenBorderTop:0!==e&&"complexTitle"===this.sweepList[e-1].type,hiddenBorderBottom:e!==this.sweepList.length-1&&this.sweepList[e+1]&&("essay"===this.sweepList[e+1].type||"completion"===this.sweepList[e+1].type||"complexTitle"===this.sweepList[e+1].type),column:3===this.layout?15:23,isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:0===this.acMode&&e===this.sweepList.length-1,lastOneClass:0===this.acMode&&e===this.sweepList.length-1?"piece-essay".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null}))});break;case"restrict"===t.type:r=i("ac-restrict",{props:A({},{height:t.height,marginTop:20,isLastOne:e===this.sweepList.length-1,isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,lastOneClass:0===this.acMode&&e===this.sweepList.length-1?"piece-restrict".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null})});break}return r}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{display:"flex",justifyContent:"center",height:this.pieceHeight}},[e("div",{class:this.$store.getters["AC/layout"]>2?"ac-module__ThreeColumn":"ac-module__column",style:"height: calc(100% - 5px)"},[this.sweepList.length?this.sweepList.map((function(e,n){return t.getContent(e,n)})):e("ac-restrict",{props:A({},{height:1250})}),e("ac-editor",ye()([{attrs:{visible:this.editorVisible}},{on:{"update:visible":function(e){return t.editorVisible=e}}},{attrs:{content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}}]))])])}},Se=Te,Ie=Object(P["a"])(Se,xe,Ee,!1,null,null,null),Oe=Ie.exports;Oe.install=function(t){t.component(Oe.name,Oe)};var Be=Oe,Le={name:"AcSweepPanel",components:{AcSweepPiece:Be,AcEditor:pt["default"],AcMarkPoint:gt["default"],AcRestrict:Ct},inject:["courseName"],props:{domList:{type:Array,default:function(){return[]}}},computed:{formatPanelList:function(){var t=this,e=[];if(this.panelList.length)if(this.panelList.forEach((function(n,i){i%t.layout===0?e.push([n]):e[e.length-1].push(n)})),1===this.layout&&e.length%2)e.push([]);else if(2===this.layout)e[e.length-1].length%2&&e[e.length-1].push([]),(1===e.length||e.length%2)&&e.push(u(Array(2).fill([])));else if(3===this.layout){var n;3!==e[e.length-1].length&&(n=e[e.length-1]).push.apply(n,u(Array(3-e[e.length-1].length).fill([]))),(1===e.length||e.length%2)&&e.push(u(Array(3).fill([])))}return e},pieceHeight:function(){return 1245},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},scansionAttention:function(){return this.$store.getters["AC/scansionAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},layout:function(){return this.$store.getters["AC/layout"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},isAddFooter:function(){return this.$store.getters["AC/addFooter"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},watch:{domList:function(t){t.length&&this.getPanelList()}},mounted:function(){},data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleSubmit:function(t){var e=this.editing,n=e.dataKey,i=e.hasChoice,r={dataKey:n};if(i){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],l=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");l={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(l)}else l?l.content+=t:s+=t})),Object.assign(r,{title:s,choices:c})}else r.title=t;this.$store.dispatch("AC/paper/setEditTitle",r)},getBasicInfo:function(t){var e=null;return(this.layout>1?t%(2*this.layout)===0:this.patchwork?(t+1)%4===1:t%2===0)&&(e={hideAttention:!this.showAttention||0!==t,height:this.headHeight+(this.isEntranceExams?this.layout<3?this.attentionHeight:0:this.showAttention&&0===t?this.attentionHeight:0)+this.eduHeight+(this.isEntranceExams?50:0)}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var i=this.pieceHeight,r=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(i-=e.height,r.push(Object.assign({type:"basicInfo"},e)))},s=function(){var a=e[n];if(n++,e[n]=[],i=t.pieceHeight,r=e[n],o(),"graffiti"===a[a.length-1].type){var s=a[a.length-1];a.pop(),r.push(s),i-=30}if("sectionHead"===a[a.length-1].type){var c=a[a.length-1];c.height>46&&(c.height-=5),c.isMarginTop=!1,a.pop(),r.length?"basicInfo"===r[0].type?r.splice(1,0,c):r.unshift(c):r.push(c),i-=c.height}},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:34,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=i-(n?62:30);return Math.floor((r+e)/(t+e))},l=function(t,e){var n="",i="",a=t.map((function(t){var e="";switch(t.type){case"completion":n="completion",i=t.height+1,e="".concat(t.children.join(""));break;case"complexTitle":n="complexTitle",i=t.height,e="".concat(t.children.join(""));break}return e}));t.length=0,r.push({height:i,type:n,isComplex:e.isComplex,isShowBorderBottom:e.isShowBorderBottom,dataKey:e.dataKey,content:a})},u=function(e,n,a){e.forEach((function(e){if("completionItem"===e.type){var o=r[r.length-1]||{};(!["completion","graffiti"].includes(o.type)||!["graffiti"].includes(o.type)&&a.isComplex&&"0"===a.dataKey[a.dataKey.length-1])&&(e.height+=16)}if(i<e.height&&(n.length&&l(n,a),s()),i>=e.height){switch("graffiti"===t.readType||r.length||"completion"!==a.type||(e.height+=16),e.type){case"completionItem":n.length&&"completion"===n[n.length-1].type?n[n.length-1].children.push(e.content):n.push({type:"completion",height:e.height,children:[e.content]});break;case"complexTitleItem":n.length&&"complexTitle"===n[n.length-1].type?n[n.length-1].children.push(e.content):n.push({type:"complexTitle",height:e.height,children:[e.content]});break}i-=e.height}}))},h=function(e,n){var a=e.rowHeight,o=void 0===a?34:a,l=e.rowGap,u=void 0===l?15:l,h=e.titleChildren,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType);i<30&&s();var p={type:"essay"};if(h){var g="";h.forEach((function(t,n){i>=t.height+(n?0:32)?(g+=t.content,i-=t.height+(n?0:32)):(g&&r.push({type:"essay",essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d,bgType:f})}),s(),g=t.content,i-=t.height+32)})),g?Object.assign(p,{essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d})}):p=null}else p=null;if(d){var m=d;while(m){var y=c(o,u,!p);y<1?(p&&(r.push(p),p=null),s()):y<m?(r.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:y,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),p&&(p=null),s(),m-=y):(r.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:m,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),i-=m*(o+u)-u+(p?30:62),m=0,p&&(p=null))}}else p?r.push(p):(r.push({type:"essay",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),i-=30)},d=JSON.parse(JSON.stringify(this.domList));d.forEach((function(e,n){"essay"===e.type?h(e.essay,e.dataKey):"complexTitle"===e.type||"completion"===e.type?(u(e.children,a,e),a.length&&l(a,e)):"basicInfo"===e.type?(t.headHeight=e.headHeight||0,t.attentionHeight=t.scansionAttention.height||e.attentionHeight||0,t.isEntranceExams?t.eduHeight=e.eduHeight:t.registrationType?t.layout<3?t.eduHeight=t.eduIdLength>10?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)+14+310:t.eduHeight=t.layout<3?310:48*Math.ceil(t.stuInfoLength/3)+310,o()):(i<e.height&&s(),i>=e.height&&("sectionHead"===e.type&&"basicInfo"!==d[n-1].type&&(e.height+=5,e.isMarginTop=!0),r.push(e),i-=e.height))})),i>54&&e[e.length-1].push({type:"restrict",height:i-25}),e.length>16&&1===this.layout&&(this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",2),this.$store.dispatch("AC/answerConfig/setDisableOneLayout",!0)),this.panelList=e}}},Pe=Le,Re=Object(P["a"])(Pe,pe,ge,!1,null,null,null),je=Re.exports;je.install=function(t){t.component(je.name,je)};var Me=je,ze={name:"AcSweep",components:{AcSweepVirtual:fe,AcSweepPanel:Me},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],sweepPaperTree:[],isFirstRender:!0}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(v["a"])(this,e),this.file=t}return Object(_["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){t(e.file,n)}))}}]),e}()},patchwork:function(){return this.$store.getters["AC/patchwork"]},downloadType:function(){return this.$store.getters["AC/downloadType"]},downloadSize:function(){return this.$store.getters["AC/downloadSize"]}},created:function(){this.init()},methods:{init:function(){this.sweepPaperTree=this.transformTree(this.createDataKey(this.$store.getters["AC/sweepPaperTree"]))},createDataKey:function(t){var e=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.forEach((function(e,i){var r=n?"".concat(n,"_").concat(i):"".concat(i);e.code&&(e.dataKey=r),e.children&&t(e.children,r)}))};return e(t),t},transformTree:function(t){var e=this,n=new Set(["single_choice","multiple_choice","judgment"]);return t.reduce((function(i,r,a){r.children&&(r.children=e.transformTree(r.children));var o=i[i.length-1];return o&&n.has(t[a-1].code)&&n.has(r.code)?(Array.isArray(o)?o.push(r):i[i.length-1]=[o,r],i):(i.push(r),i)}),[])},setDomList:function(t){this.domList=t,this.isFirstRender=!1},buildFailed:function(){this.isFirstRender&&this.$emit("build-failed")},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(q["d"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getZipContent();case 5:if(n=e.sent,i=n||"","PDF"!==t.downloadType){e.next=25;break}return e.next=10,t.getPageImage();case 10:return r=e.sent,a=new It.a(1===t.layout?"p":"l","pt",1===t.layout?"a4":"a3"),r.forEach((function(e,n){var i=1===t.layout?595.28:1190.55,o=841.89;a.addImage(e,"JPEG",0,0,i,o),n!==r.length-1&&a.addPage()})),o="".concat(t.$store.getters["AC/title"].replace(/\n/g,""),".pdf"),a.save(o),s=a.output("blob"),s.name=o,c=new t.UploadAdapter(s),e.next=20,c.upload();case 20:return l=e.sent,u="https://"+l.url,e.abrupt("return",{scanZipUrl:i,scanPdfUrl:u});case 25:if("PNG"!==t.downloadType){e.next=31;break}return e.next=28,t.getPngZip();case 28:return h=e.sent,d=h||"",e.abrupt("return",{scanZipUrl:i,scanPdfUrl:d});case 31:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d,f;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),n=n.replace(/[/,\\]/g,""),i=$(".ac-piece__wrapper"),r=1===t.registrationNumberType,a=new Bt.a,o="".concat(n,"模板_").concat(n,"_").concat(t.downloadSize,"_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(i.length,"_").concat(r?"涂点":"条码","_").concat(r?"10":"-1","_").concat(r?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(i).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=11,Object(q["d"])(s.map((function(t){return t.dom})),1);case 11:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]),o=r.length,c=new Uint8Array(o);while(o--)c[o]=r.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=15,a.generateAsync({type:"blob"});case 15:return l=e.sent,u="".concat(n,"模板.zip"),h=new File([l],u,{type:"zip"}),Pt()(l,u),d=new t.UploadAdapter(h),e.next=22,d.upload();case 22:return f=e.sent,e.abrupt("return","https://"+f.url);case 24:case"end":return e.stop()}}),e)})))()},getPngZip:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),n=n.replace(/[/,\\]/g,""),i=$(".ac-piece__wrapper"),r=new Bt.a,a=[],Array.from(i).forEach((function(t,e){a.push({dom:t,name:"".concat(e+1,".png")})})),e.next=8,Object(q["d"])(a.map((function(t){return t.dom})));case 8:return o=e.sent,o.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],o=atob(n[1]),s=o.length,c=new Uint8Array(s);while(s--)c[s]=o.charCodeAt(s);r.file(a[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=12,r.generateAsync({type:"blob"});case 12:return s=e.sent,c="".concat(n,".zip"),l=new File([s],c,{type:"zip"}),Pt()(s,c),u=new t.UploadAdapter(l),e.next=19,u.upload();case 19:return h=e.sent,e.abrupt("return","https://"+h.url);case 21:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),i=function(n,i){var r=$(n).offset(),a=r.left,o=r.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var r=$(n),s="absolute"===r.data("scan-type"),c={Type:"AnswerArea",Name:r.data("export_name"),Page:i,X:Math.floor(r.offset().left-(s?a:l)),Y:Math.floor(r.offset().top-(s?o:u)),Width:r.outerWidth(),Height:r.outerHeight()};String(c.X).indexOf(".")>-1&&(c.X=Math.floor(c.X),c.Width+=1),String(c.Y).indexOf(".")>-1&&(c.Y=Math.floor(c.Y),c.Height+=1),c.Width=Math.ceil(c.Width),c.Height=Math.ceil(c.Height),"考号"===r.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},r=function(t,n){var i=$(t).find(".mark-point__top-left")[0],r=$(i).offset(),a=r.left,o=r.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var i=$(t),r={Type:"ReviewArea",Name:i.data("scan-name"),Page:n,X:i.offset().left-a,Y:i.offset().top-o,Width:i.outerWidth(),Height:i.outerHeight(),MaxScore:i.data("scan-score")};String(r.X).indexOf(".")>-1&&(r.X=Math.floor(r.X),r.Width+=1),String(r.Y).indexOf(".")>-1&&(r.Y=Math.floor(r.Y),r.Height+=1),r.Width=Math.ceil(r.Width),r.Height=Math.ceil(r.Height),e.push(r)}))},a=[],o=function(t,e){var i=n.find(".ac-sweep__choice-each[data-key=".concat(t.dataKey,"]"))[0],r=($(i).find(".choice-title")[0],$(i).find(".ac-sweep__choice-item")[0]),o=i.getAttribute("page-index"),s=$(e[o-1]).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h={Type:"AnswerArea",Name:t.scanName,Page:"第".concat(o,"页"),X:$(r).offset().left-l+5,Y:$(r).offset().top-u-1,Width:$(r).outerWidth()-3,Height:$(r).outerHeight()+3,Rows:1,Columns:t.choices.length,Horizon:0};String(h.X).indexOf(".")>-1&&(h.X=Math.floor(h.X),h.Width+=1),String(h.Y).indexOf(".")>-1&&(h.Y=Math.floor(h.Y),h.Height+=1),h.Width=Math.ceil(h.Width),h.Height=Math.ceil(h.Height),a.push(h)},s=function t(e){var i=$(".ac-piece__wrapper");e.forEach((function(e){if(e.children)t(e.children);else if("completion"===e.code)for(var r=n.find(".ac-sweep__composite[data-key=".concat(e.dataKey,"]")),s=0;s<r.length;s++){var c=r[s].getAttribute("page-index"),l=$(i[c-1]).find(".mark-point__top-left")[0],u=$(l).offset(),h=u.left,d=u.top,f={Type:"AnswerArea",Name:"".concat(e.scanName).concat(s>0?"_"+s:""),Page:"第".concat(c,"页"),X:Math.floor($(r[s]).offset().left-h),Y:Math.floor($(r[s]).offset().top-d),Width:Math.ceil($(r[s]).outerWidth()),Height:Math.ceil($(r[s]).outerHeight())};a.push(f)}else if(Array.isArray(e)||"single_choice"===e.code||"multiple_choice"===e.code||"judgment"===e.code)Array.isArray(e)?e.forEach((function(t){o(t,i)})):o(e,i);else if("subjectivity"===e.code)for(var p=n.find(".ac-essay__wrapper[data-key=".concat(e.dataKey,"]")),g=0;g<p.length;g++){var m=p[g].getAttribute("page-index"),y=$(i[m-1]).find(".mark-point__top-left")[0],v=$(y).offset(),_=v.left,b=v.top,w={Type:"AnswerArea",Name:"".concat(e.scanName).concat(g>0?"_"+g:""),Page:"第".concat(m,"页"),X:Math.floor($(p[g]).offset().left-_),Y:Math.floor($(p[g]).offset().top-b),Width:Math.ceil($(p[g]).outerWidth()),Height:Math.ceil($(p[g]).outerHeight())};a.push(w)}}))};s(this.sweepPaperTree);var c=function(t){var e={};return t.forEach((function(t){var n=t.Page;e[n]||(e[n]=[]),e[n].push(t)})),Object.values(e)},l=c(a);Array.from(n).forEach((function(t,n){"restrict"!==$(t).data("piece-type")&&(i(t,"第".concat(n+1,"页")),r(t,"第".concat(n+1,"页")),Array.isArray(l[n])?e.push.apply(e,u(l[n])):e.push(l[n]))}));var h='<?xml version="1.0" encoding="utf-8"?>';return h+='<answerSheet isNew="true" isYcProject="true" layout="'.concat(this.layout,'" isScrabbled="').concat(this.patchwork,'">'),h+=this.getXMLStringFromArray(e),h+="</answerSheet>",h},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return t?"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">"):""})).join("")}}},Ne=ze,De=Object(P["a"])(Ne,Nt,Dt,!1,null,null,null),$e=De.exports,Ue={name:"AcCard",components:{AcAnswerConfig:h["default"],AcLattice:zt,AcSweep:$e},props:{title:{type:String,default:""},paperTitle:{type:String,default:""},tree:{type:Array,default:function(){return[]}},mode:{type:Number,default:0},config:{type:Object,default:function(){return null}},uploadOss:{type:Function,default:function(){}},ClassicEditor:{type:Function,default:function(){}},contentEditable:{type:Boolean,default:!0},showConfig:{type:Boolean,default:!0},showStudentInfo:{type:Boolean,default:!0},saveInfo:{type:Object,default:null},paddingBlock:{type:[Number,Array],default:68},courseName:{type:String,default:""}},provide:function(){return{uploadOss:this.uploadOss,ClassicEditor:this.ClassicEditor,contentEditable:this.contentEditable,showStudentInfo:this.showStudentInfo,paperTitle:this.title||this.paperTitle,paddingBlock:this.paddingBlock,courseName:this.courseName}},data:function(){return{paperTree:[],initWindowNum:0}},computed:{layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{tree:function(){this.initTree()},saveInfo:function(){this.handleSaveInfo()},title:function(){this.$store.dispatch("AC/paper/setTitle",this.title)}},beforeCreate:function(){if(!Promise.allSettled){var t=function(t){return{status:"rejected",reason:t}},e=function(t){return{status:"fulfilled",value:t}};Promise.allSettled=function(n){return Promise.all(n.map((function(n){return Promise.resolve(n).then(e,t)})))}}},created:function(){var t=this;this.$store.dispatch("AC/essay/resetEssay"),this.init(),this.$nextTick((function(){t.initWindowNum=window.devicePixelRatio,window.addEventListener("resize",t.resizeFun)}))},beforeDestroy:function(){window.removeEventListener("resize",this.resizeFun)},methods:{resizeFun:function(){var t=window.devicePixelRatio;t!==this.initWindowNum&&this.save(!0)},init:function(){this.$store.dispatch("AC/paper/setTitle",this.title),this.$store.dispatch("AC/answerConfig/setAnswerCardMode",this.mode),this.handleSaveInfo(),this.initTree()},handleSaveInfo:function(){var t=this;if(this.saveInfo){var e={},n={},i={};Object.keys(this.saveInfo).forEach((function(r){switch(r){case"title":case"editTitleList":case"candidateNumColor":case"scansionAttention":case"latticeAttention":e[r]=t.saveInfo[r];break;case"editEssayList":i[r]=t.saveInfo[r];break;case"answerCardMode":case"layout":case"showAttention":case"studentInfo":case"educationIdValue":case"registrationNumberType":case"readType":case"patchwork":case"showQuestion":case"sizeType":case"showEducationId":case"objectiveOrder":case"judgmentMode":case"addFooter":case"entranceExams":n[r]=t.saveInfo[r];break}})),this.$store.dispatch("AC/paper/setSaveState",e),this.$store.dispatch("AC/essay/setSaveState",i),this.$store.dispatch("AC/answerConfig/setSaveState",n)}},initTree:function(){var t=this,e=this.$store.getters["AC/editTitleList"],n=this.$store.getters["AC/editEssayList"].filter((function(t){return!!t.title}));Object(q["f"])(this.tree.concat([].concat(u(e),u(n)))).then((function(){0===t.mode&&t.extendComplex(),t.paperTree=t.tree,t.$store.dispatch(0===t.mode?"AC/paper/setSweepPaperTree":"AC/paper/setPaperTree",t.paperTree)}))},extendComplex:function(){var t=[];this.tree.forEach((function(e,n){t=[],[],e.children.forEach((function(e,n){var i;"complex"===e.code?(e.title=null,e.children.every((function(t){return["single_choice","multiple_choice","judgment"].includes(t.code)}))?(i=t).push.apply(i,u(e.children)):t.push(e)):(e.code,t.push(e))})),e.children=t}))},download:function(){var t=this;this.$emit("before-download"),this.save(),1===this.acMode?this.$refs.latticeCard&&this.$refs.latticeCard.download().then((function(e){t.$emit("download",e)})):0===this.acMode&&this.$refs.sweepCard&&this.$refs.sweepCard.download().then((function(e){t.$emit("download",e)}))},save:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=["title","editTitleList","candidateNumColor","editEssayList","answerCardMode","layout","showAttention","studentInfo","educationIdValue","registrationNumberType","readType","patchwork"],i=["latticeAttention","showQuestion","sizeType","showEducationId"],r=["scansionAttention","objectiveOrder","judgmentMode","addFooter","entranceExams"],a={},o=this.$store.getters["AC/answerCardMode"];n.concat(0===o?r:i).forEach((function(e){a[e]=t.$store.getters["AC/".concat(e)]})),this.$emit("save",a,e)},viewPaper:function(){this.$emit("view-paper")},buildFailed:function(){this.$emit("build-failed")}}},Fe=Ue,He=Object(P["a"])(Fe,i,r,!1,null,null,null),Ke=He.exports;Ke.install=function(t){t.component(Ke.name,Ke)};e["default"]=Ke},"40d5":function(t,e,n){var i=n("d039");t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,i="/";e.cwd=function(){return i},e.chdir=function(e){t||(t=n("df7c")),i=t.resolve(e,i)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var i=n("e330"),r=n("d039"),a=n("c6b6"),o=Object,s=i("".split);t.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},4625:function(t,e,n){var i=n("c6b6"),r=n("e330");t.exports=function(t){if("Function"===i(t))return r(t)}},"485a":function(t,e,n){var i=n("c65b"),r=n("1626"),a=n("861d"),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&r(n=t.toString)&&!a(s=i(n,t)))return s;if(r(n=t.valueOf)&&!a(s=i(n,t)))return s;if("string"!==e&&r(n=t.toString)&&!a(s=i(n,t)))return s;throw o("Can't convert object to primitive value")}},"4b11":function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"4d64":function(t,e,n){var i=n("fc6a"),r=n("23cb"),a=n("07fa"),o=function(t){return function(e,n,o){var s,c=i(e),l=a(c),u=r(o,l);if(t&&n!=n){while(l>u)if(s=c[u++],s!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4e0a":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{class:["ac-essay__wrapper",t.lastOneClass],style:{"--padding-inline":t.paddingInline+"px"},attrs:{"data-key":t.dataKey,type:"essay","page-index":t.pageIndex}},[e("div",{staticClass:"ac-essay",class:{"is-wrapper":"outer"===t.borderType,"is-editable":t.editable,"is-hidden__border-both":t.hiddenBorderBoth||!(t.row||t.title),"is-hidden__border-bottom":t.hiddenBorderBottom||!(t.row||t.title),"is-hidden__border-top":t.hiddenBorderTop||!(t.row||t.title)},style:{paddingBottom:"".concat(t.additionalPadding+15,"px"),paddingLeft:0===t.answerMode&&"40px"}},[0===t.answerMode&&t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom",t.isFirst&&t.isLastOne&&"show-border_all"]}):t._e(),0===t.answerMode&&t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom",t.isFirst&&t.isLastOne&&"show-outline_all"]}):t._e(),t.title?e("div",{staticClass:"ac-essay__title ck-content",domProps:{innerHTML:t._s(t.title)}}):t._e(),t.row?e("div",{staticClass:"ac-essay__container"},[e("div",{staticClass:"ac-essay__area",class:t.rowClass,style:t.areaStyle},[["empty","block","spell_field"].includes(t.rowType)?t._e():[t._l(t.itemList,(function(n,i){return[t.getLiContent(i)?e("li",{key:"li_".concat(i),staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!i,"is-editable":"line"===t.rowType&&t.liEditable},domProps:{innerHTML:t._s(t.getLiContent(i))},on:{blur:function(e){return t.handleBlur(e,i)}}}):e("li",{key:i,staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!i,"is-editable":"line"===t.rowType&&t.liEditable,"is-first-column":!(i%t.formatColumn)},style:{borderColor:t.isEntranceExams?"#EB617E":"#000000"},on:{blur:function(e){return t.handleBlur(e,i)}}},[t.showPrefix&&"line"===t.rowType?e("span",{staticClass:"ac-essay__area-prefix"},[t._v(" 【"+t._s(i+t.startRow+1)+"】 ")]):t._e(),t.wordCountStep&&["write","grid"].includes(t.rowType)?e("span",[t._v(" "+t._s(t.getWordCount(i))+" ")]):t._e()])]}))],"spell_field"===t.rowType?t._l(Array(t.row).fill(""),(function(n,i){return e("li",{key:i,staticClass:"ac-essay__area-item"},[e("div",{staticClass:"ac-essay__area-spell"}),t._l(Array(t.formatColumn).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-essay__area-field"})}))],2)})):t._e()],2)]):t._e(),t.editable?e("div",{staticClass:"ac-essay__tool"},[t.rowEditable?[e("span",[t._v("行数:")]),e("el-input-number",{attrs:{size:"small",min:0,max:100},on:{change:t.handleRowChange},model:{value:t.rowNum,callback:function(e){t.rowNum=e},expression:"rowNum"}})]:t._e(),t.typeEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openType}},[t._v(" 背景风格 ")]):t._e(),t.titleEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]):t._e()],2):t._e()]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}}),e("el-dialog",{attrs:{"custom-class":"ac-essay__dialog",visible:t.typeVisible,title:"设置背景风格",width:"770px"},on:{"update:visible":function(e){t.typeVisible=e}}},[e("div",{staticClass:"ac-bg"},[e("div",{staticClass:"ac-bg__item",class:{"is-checked":0===t.currentType},on:{click:function(e){t.currentType=0}}},[e("div",{staticClass:"ac-bg__title"},[t._v("空白纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper"})]),e("div",{staticClass:"ac-bg__item",class:{"is-checked":1===t.currentType},on:{click:function(e){t.currentType=1}}},[e("div",{staticClass:"ac-bg__title"},[t._v("横线纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-line"},[e("div",{staticClass:"ac-bg__content"})])]),e("div",{staticClass:"ac-bg__item",class:{"is-checked":2===t.currentType},on:{click:function(e){t.currentType=2}}},[e("div",{staticClass:"ac-bg__title"},[t._v("方格纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-grid"},t._l(Array(4).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)])]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.typeVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeType}},[t._v("确定")])],1)])],1)},r=[],a=n("6bdf"),o=n("5dcc"),s={name:"AcEssay",components:{AcEditor:a["default"]},inject:["paddingBlock"],props:{editable:{type:Boolean,default:!0},bgType:{type:Number,default:0},typeEditable:{type:Boolean,default:!0},row:{type:Number,default:4},startRow:{type:Number,default:0},rowCount:{type:Number,default:4},rowEditable:{type:Boolean,default:!0},title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},liEditable:{type:Boolean,default:!1},showPrefix:{type:Boolean,default:!1},rowHeight:{type:[Number,String],default:""},rowGap:{type:[Number,String],default:""},width:{type:[Number,String],default:""},borderType:{type:String,default:"outer"},topLineVisible:{type:Boolean,default:!1},wordCountStep:{type:Number,default:100},paddingInline:{type:Number,default:55},dataKey:{type:String,default:""},hiddenBorderBottom:{type:Boolean,default:!1},hiddenBorderBoth:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},hiddenBorderTop:{type:Boolean,default:!1},column:{type:Number,default:0},showSide:{type:Boolean,default:!0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},data:function(){return{rowNum:4,editorVisible:!1,editContent:"",typeVisible:!1,currentType:0,additionalPadding:0,lastAdditionPadding:0}},computed:{rowConfig:function(){return this.$store.getters["AC/rowConfig"]},rowType:function(){var t=["empty","line","grid","field","block","write","spell_field"];return t[this.bgType||0]},rowClass:function(){return"row-".concat(this.rowType).concat("inner"===this.borderType?" is-wrapper":"").concat(this.showSide?" show-side":"")},areaStyle:function(){var t=this.rowConfig[this.bgType]||{},e="number"===typeof this.rowHeight?this.rowHeight:t.rowHeight||0,n="number"===typeof this.rowGap?this.rowGap:t.rowGap||0;switch(this.rowType){case"write":n=e/9*2,e-=n;break;case"spell_field":n=e/9*4,e-=n;break}var i={"--row":this.row,"--row-height":e+"px","--row-gap":n+"px","--column":this.formatColumn};return(this.width||0===this.width)&&(i.width="number"===typeof this.width?this.width+"px":this.width),i},formatColumn:function(){var t=(this.rowConfig[this.bgType]||{}).column;return t?this.column||t:0},itemList:function(){return new Array(this.row*(this.formatColumn||1)).fill("")},rowDebounce:function(){return Object(o["b"])(this.commitRowChange,300)},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return function(t){return((e.liList||[]).find((function(e){return e.liIndex===t}))||{}).content}},answerMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]}},watch:{rowCount:function(t){t!==this.rowNum&&(this.rowNum=t)},lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}},row:function(){this.additionalPadding=0,this.lastAdditionPadding=0}},created:function(){this.rowNum=this.rowCount},methods:{getWordCount:function(t){var e=this.startRow*this.formatColumn+t+1;return e%this.wordCountStep?"":"".concat(e,"字")},handleRowChange:function(t,e){(t||0===t||(this.rowNum="",e))&&this.rowDebounce()},commitRowChange:function(){this.$store.dispatch("AC/essay/setEssayRow",{dataKey:this.dataKey,row:this.rowNum}),this.$store.dispatch("AC/paper/resetPanel")},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.title},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},handleBlur:function(t,e){this.$store.dispatch("AC/essay/setEssayLi",{dataKey:this.dataKey,liIndex:e+this.startRow,content:t.target.innerHTML})},openType:function(){this.currentType=this.bgType,this.typeVisible=!0},changeType:function(){this.typeVisible=!1,this.$store.dispatch("AC/essay/setEssayBgType",{dataKey:this.dataKey,bgType:this.currentType}),this.$store.dispatch("AC/paper/resetPanel")},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(o["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,-15),this.additionalPadding=e}}},c=s,l=n("2877"),u=Object(l["a"])(c,i,r,!1,null,null,null),h=u.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"4ea1":function(t,e,n){"use strict";var i=n("d429"),r=n("ebb5"),a=n("bcbf"),o=n("5926"),s=n("f495"),c=r.aTypedArray,l=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var n=c(this),r=o(t),u=a(n)?s(e):+e;return i(n,l(n),r,u)}}["with"],!h)},"50c4":function(t,e,n){var i=n("5926"),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},"53ca":function(t,e,n){"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n.d(e,"a",(function(){return i}))},5692:function(t,e,n){var i=n("c430"),r=n("c6cd");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,n){var i=n("d066"),r=n("e330"),a=n("241c"),o=n("7418"),s=n("825a"),c=r([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=a.f(s(t)),n=o.f;return n?c(e,n(t)):e}},"577e":function(t,e,n){var i=n("f5df"),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},5926:function(t,e,n){var i=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:i(e)}},"59ed":function(t,e,n){var i=n("1626"),r=n("0d51"),a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5dcc":function(t,e,n){"use strict";n.d(e,"b",(function(){return E})),n.d(e,"f",(function(){return T})),n.d(e,"d",(function(){return S})),n.d(e,"a",(function(){return I})),n.d(e,"e",(function(){return O})),n.d(e,"c",(function(){return B}));n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1");var i=b(),r=w(),a=C(),o=A(),s={imagePlaceholder:void 0,cacheBust:!1},c={toSvg:l,toPng:h,toJpeg:d,toBlob:f,toPixelData:u,impl:{fontFaces:a,images:o,util:i,inliner:r,options:{}}};function l(t,e){return e=e||{},p(e),Promise.resolve(t).then((function(t){return m(t,e.filter,!0)})).then(y).then(v).then(n).then((function(n){return _(n,e.width||i.width(t),e.height||i.height(t))}));function n(t){return e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]})),t}}function u(t,e){return g(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,i.width(t),i.height(t)).data}))}function h(t,e){return g(t,e||{}).then((function(t){return t.toDataURL()}))}function d(t,e){return e=e||{},g(t,e).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))}function f(t,e){return g(t,e||{}).then(i.canvasToBlob)}function p(t){"undefined"===typeof t.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=t.imagePlaceholder,"undefined"===typeof t.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=t.cacheBust}function g(t,e){return l(t,e).then(i.makeImage).then(i.delay(100)).then((function(e){var i=n(t);return i.getContext("2d").drawImage(e,0,0),i}));function n(t){var n=document.createElement("canvas"),r=n.getContext("2d");r.mozImageSmoothingEnabled=!1,r.webkitImageSmoothingEnabled=!1,r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1;var a=e.scale||1,o=e.width||i.width(t),s=e.height||i.height(t);return n.width=o*a,n.height=s*a,e.imageWidth&&(a=e.imageWidth/(o||1),n.width=e.imageWidth,n.height=s*a),e.imageHeight&&(a=e.imageHeight/(s||1),n.width=o*a,n.height=e.imageHeight),r.scale(a,a),e.bgcolor&&(r.fillStyle=e.bgcolor,r.fillRect(0,0,n.width,n.height)),n}}function m(t,e,n){return n||!e||e(t)?Promise.resolve(t).then(r).then((function(n){return a(t,n,e)})).then((function(e){return o(t,e)})):Promise.resolve();function r(t){return t instanceof HTMLCanvasElement?i.makeImage(t.toDataURL()):t.cloneNode(!1)}function a(t,e,n){var r=t.childNodes;return 0===r.length?Promise.resolve(e):a(e,i.asArray(r),n).then((function(){return e}));function a(t,e,n){var i=Promise.resolve();return e.forEach((function(e){i=i.then((function(){return m(e,n)})).then((function(e){e&&t.appendChild(e)}))})),i}}function o(t,e){return e instanceof Element?Promise.resolve().then(n).then(r).then(a).then(o).then((function(){return e})):e;function n(){function n(t,e){function n(t,e){i.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:n(t,e)}n(window.getComputedStyle(t),e.style)}function r(){function n(n){var r=window.getComputedStyle(t,n),a=r.getPropertyValue("content");if(""!==a&&"none"!==a){var o=i.uid();e.className=e.className+" "+o;var s=document.createElement("style");s.appendChild(c(o,n,r)),e.appendChild(s)}function c(t,e,n){var r="."+t+":"+e,a=n.cssText?o(n):s(n);return document.createTextNode(r+"{"+a+"}");function o(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return i.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){n(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function o(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}}function y(t){return a.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function v(t){return o.inlineAll(t).then((function(){return t}))}function _(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(i.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}function b(){return{escape:d,parseExtension:e,mimeType:n,dataAsUrl:h,isDataUrl:i,canvasToBlob:a,resolveUrl:o,getAndEncode:u,uid:s(),delay:f,asArray:p,escapeXhtml:g,makeImage:l,width:m,height:y};function t(){var t="application/font-woff",e="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:e,jpeg:e,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(n){var i=e(n).toLowerCase();return t()[i]||""}function i(t){return-1!==t.search(/^(data:)/)}function r(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);e(new Blob([r],{type:"image/png"}))}))}function a(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):r(t)}function o(t,e){var n=document.implementation.createHTMLDocument(),i=n.createElement("base");n.head.appendChild(i);var r=n.createElement("a");return n.body.appendChild(r),i.href=e,r.href=t,r.href}function s(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function l(t){return new Promise((function(e,n){var i=new Image;i.onload=function(){e(i)},i.onerror=n,i.src=t}))}function u(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=3e4;return(c.impl.options.cacheBust||n)&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),e&&t.startsWith("http")&&!t.startsWith("https")&&(t=t.replace("http","https")),new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=o,r.ontimeout=s,r.responseType="blob",r.timeout=i,r.open("GET",t,!0),r.send(),c.impl.options.imagePlaceholder){var a=c.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===r.readyState)if(200===r.status){var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e({content:t,fullUrl:i.result})},i.readAsDataURL(r.response)}else n?e(n):l("cannot fetch resource: "+t+", status: "+r.status)}function s(){n?e(n):l("timeout of "+i+"ms occured while fetching resource: "+t)}function l(t){e("")}}))}function h(t,e){return"data:"+e+";base64,"+t}function d(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function f(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}}function p(t){for(var e=[],n=t.length,i=0;i<n;i++)e.push(t[i]);return e}function g(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")}function m(t){var e=v(t,"border-left-width"),n=v(t,"border-right-width");return t.scrollWidth+e+n}function y(t){var e=v(t,"border-top-width"),n=v(t,"border-bottom-width");return t.scrollHeight+e+n}function v(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}function w(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:a,shouldProcess:e,impl:{readUrls:n,inline:r}};function e(e){return-1!==e.search(t)}function n(e){var n,r=[];while(null!==(n=t.exec(e)))r.push(n[1]);return r.filter((function(t){return!i.isDataUrl(t)}))}function r(t,e,n,r){return Promise.resolve(e).then((function(t){return n?i.resolveUrl(t,n):t})).then(r||i.getAndEncode).then((function(t){var n=t.content;t.fullUrl;return i.dataAsUrl(n,i.mimeType(e))})).then((function(n){return t.replace(a(e),"$1"+n+"$3")}));function a(t){return new RegExp("(url\\(['\"]?)("+i.escape(t)+")(['\"]?\\))","g")}}function a(t,i,a){return o()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return"about:blank"===t?Promise.resolve(t):r(e,t,i,a)}))})),n}));function o(){return!e(t)}}}function C(){return{resolveAll:t,impl:{readAll:e}};function t(){return e(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))}function e(){return Promise.resolve(i.asArray(document.styleSheets)).then(e).then(t).then((function(t){return t.map(n)}));function t(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))}function e(t){var e=[];return t.forEach((function(t){try{i.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(n){}})),e}function n(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}function A(){return{inlineAll:e,impl:{newImage:t}};function t(t){return{inline:e};function e(e){return i.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||function(t){return i.getAndEncode(t,!0,!0)}).then((function(t){t.content;var e=t.fullUrl;return e})).then((function(e){return new Promise((function(n,i){t.onload=n,t.onerror=i,t.src=e}))})).catch((function(){return t.src}))}}function e(n){return n instanceof Element?a(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(i.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n);function a(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}}}var x=c,E=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=arguments.length>2?arguments[2]:void 0,i=0;return function(){var r=this,a=arguments;i&&clearTimeout(i),n?(i||t.apply(r,a),i=setTimeout((function(){i=0}),e)):i=setTimeout((function(){t.apply(r,a)}),e)}},k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=0,i=[],r=[],a=function a(){if(n===t.length)return Promise.resolve();var o=t[n++],s=Promise.resolve().then((function(){return o()}));i.push(s);var c=s.then((function(){return r.splice(r.indexOf(c),1)}));r.push(c);var l=r.length>=e?Promise.race(r):Promise.resolve();return l.then((function(){return a()}))};return a().then((function(){return Promise.all(i)}))},T=function(t){var e=[],n=/<img.*?(?:>|\/>)/gi,i=/src=['"]?([^'"]*)['"]?/i,r=function(t){if(t){var r=t.match(n);Array.isArray(r)&&r.forEach((function(t){var n=t.match(i);Array.isArray(n)&&n[1]&&e.push(new Promise((function(t,e){var i=new Image;i.onload=function(){return t()},i.onerror=function(){return e()},i.src=n[1]})))}))}},a=function t(e){e.forEach((function(e){"complex"!==e.code&&e.children||(r(e.title),Array.isArray(e.choices)&&e.choices.forEach((function(t){return r(t.content)}))),e.children&&e.children.length&&t(e.children)}))};return a(t),new Promise((function(t,n){Promise.allSettled(e).then((function(){return t()}))}))},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2?arguments[2]:void 0;if(!t.length)return Promise.resolve([]);for(var i=[],r=function(){var r=t[a];i.push((function(){return x.toJpeg(r,{quality:.95,scale:e,width:r.offsetWidth,height:r.offsetHeight,imageWidth:n,bgcolor:"#ffffff"})}))},a=0;a<t.length;a++)r();return k(i)},I=function(t,e){for(var n=t.split(","),i=atob(n[1]),r={type:"image/jpeg",endings:"native"},a=new Uint8Array(i.length),o=0;o<i.length;o++)a[o]=i.charCodeAt(o);var s=new File([a],(e||Date.now().toString(36))+".jpg",r);return s},O=function(t){var e=0;try{var n=t.getBoundingClientRect(),i=n.top,r=t.parentNode.getBoundingClientRect(),a=r.top;e=i-a}catch(o){e=t.offsetTop}return e},B=function(t){var e=t.getBoundingClientRect(),n=e.bottom,i=t.parentNode.getBoundingClientRect(),r=i.bottom;return r-n}},"5e77":function(t,e,n){var i=n("83ab"),r=n("1a2d"),a=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,s=r(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!i||i&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},"605d":function(t,e,n){(function(e){var i=n("c6b6");t.exports="undefined"!=typeof e&&"process"==i(e)}).call(this,n("4362"))},6374:function(t,e,n){var i=n("da84"),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},"639e":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__bar"},[e("div",{class:["ac-config__arrow",t.showConfig?"el-icon-caret-right":"el-icon-caret-left"],on:{click:function(e){t.showConfig=!t.showConfig}}}),e("div",{staticClass:"ac-config__wrapper",class:{"is-hidden":!t.showConfig}},[e("div",{staticClass:"container"},[e("div",{staticClass:"config-mainCtrl"},[e("div",{staticClass:"zeroth-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.viewPaper}},[t._v(" 预览试卷 ")])],1),e("div",{staticClass:"first-row"},[e("el-button",{attrs:{size:"medium",icon:"icon el-icon-download"},on:{click:t.save}},[t._v("保存")]),e("el-button",{attrs:{size:"medium",icon:"icon el-icon-view"},on:{click:function(e){t.previewVisible=!0}}},[t._v(" 预览 ")])],1),e("div",{staticClass:"second-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.download}},[t._v(" 下载并保存 ")])],1)]),t.modeChangeable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode"},[e("el-radio-group",{model:{value:t.answerSheetMode,callback:function(e){t.answerSheetMode=e},expression:"answerSheetMode"}},[e("el-radio",{attrs:{label:0}},[t._v("扫描")]),e("el-radio",{attrs:{label:1}},[t._v("点阵笔")])],1)],1)]):t._e(),t.layoutChangeable?e("change-layout",{attrs:{mode:t.answerSheetMode}}):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("考生须知")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowAttention,callback:function(e){t.isShowAttention=e},expression:"isShowAttention"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("学生信息")]),e("div",{staticClass:"ac-config__item tags-box answer-mode"},[t._l(t.studentInfoTags,(function(n){return e("el-tag",{key:n,staticClass:"tags",attrs:{closable:t.studentInfoTags.length>1,"disable-transitions":!1,effect:"dark",size:"small"},on:{close:function(e){return t.handleClose(n)}}},[t._v(" "+t._s(n)+" ")])})),t.studentInfoTags.length<6&&t.inputVisible?e("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{maxLength:"4",size:"small"},on:{blur:t.handleInputConfirm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm.apply(null,arguments)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e(),t.studentInfoTags.length<6&&!t.inputVisible?e("el-button",{staticClass:"button-new-tag",attrs:{size:"mini"},on:{click:t.showInput}},[e("i",{staticClass:"el-icon-plus"}),t._v(" 添加 ")]):t._e()],2)]):t._e(),1===t.answerSheetMode&&t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowEducationId,callback:function(e){t.isShowEducationId=e},expression:"isShowEducationId"}})],1)]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID位数")]),e("div",{staticClass:"ac-config__item"},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.educationIdValue,callback:function(e){t.educationIdValue=e},expression:"educationIdValue"}},t._l(Array(13),(function(t,n){return e("el-option",{key:n,attrs:{label:n+6,value:n+6}})})),1)],1)]),e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择考号板式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.registrationNumberType,callback:function(e){t.registrationNumberType=e},expression:"registrationNumberType"}},[e("el-radio",{attrs:{label:0}},[t._v("条形码")]),e("el-radio",{attrs:{label:1}},[t._v("教育ID")])],1)],1)])]:t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("客观题排列")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.objectiveOrder,callback:function(e){t.objectiveOrder=e},expression:"objectiveOrder"}},[e("el-radio",{attrs:{label:"row"}},[t._v("横排")]),e("el-radio",{attrs:{label:"column"}},[t._v("竖排")])],1)],1)]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("判断题样式(TF/✓×)")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.judgmentMode,callback:function(e){t.judgmentMode=e},expression:"judgmentMode"}},[e("el-radio",{attrs:{label:0}},[t._v("TF")]),e("el-radio",{attrs:{label:1}},[t._v("✓×")])],1)],1)]):t._e(),1===t.answerSheetMode&&t.titleSwitchable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("显示题目内容")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowQuestion,callback:function(e){t.isShowQuestion=e},expression:"isShowQuestion"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("手工批阅")]),e("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"该试卷存在多个得分点题目,不支持线下批阅,请重新选择试卷",placement:"top-end",disabled:!t.graffitiDisable,"open-delay":200}},[e("div",{staticClass:"ac-config__item"},[e("el-switch",{attrs:{disabled:t.graffitiDisable||t.isEntranceExams},model:{value:t.handRead,callback:function(e){t.handRead=e},expression:"handRead"}})],1)])],1),t.readType&&1===t.answerSheetMode?e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("设置给分框样式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.readType,callback:function(e){t.readType=e},expression:"readType"}},[e("el-radio",{attrs:{label:"hand"}},[t._v("手写")]),e("el-radio",{attrs:{label:"graffiti"}},[t._v("涂点")])],1)],1)]):t._e()]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("添加页脚")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isAddFooter,callback:function(e){t.isAddFooter=e},expression:"isAddFooter"}})],1)]):t._e(),0!==t.answerSheetMode&&"graffiti"!==t.readType||1!==t.layout?t._e():e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("答题卡拼凑打印")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isPatchwork,callback:function(e){t.isPatchwork=e},expression:"isPatchwork"}})],1)]),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("中高考答题卡样式")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isEntranceExams,callback:function(e){t.isEntranceExams=e},expression:"isEntranceExams"}})],1)]):t._e()],2)]),e("ac-preview",{attrs:{visible:t.previewVisible,selector:".ac-panel .ac-piece__wrapper"},on:{"update:visible":function(e){t.previewVisible=e}}}),e("el-dialog",{staticClass:"download-dialog",attrs:{title:"下载提示",visible:t.showDownloadModal,width:"520px",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.showDownloadModal=e}}},[0===t.answerSheetMode?[e("p",{staticClass:"message"},[t._v(" 选择导出以下内容 "),e("span",{staticClass:"redTip"},[t._v("(为了保证下载内容的质量,建议使用chrome进行下载)")])]),e("div",{staticClass:"tip"},[e("el-radio",{attrs:{label:"sweep"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[t._v("答题卡")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadType,callback:function(e){t.downloadType=e},expression:"downloadType"}},[e("el-option",{attrs:{label:"PDF",value:"PDF"}}),e("el-option",{attrs:{label:"PNG",value:"PNG"}})],1)],1),e("div",{staticClass:"paper-type_selector"},[e("span",{staticClass:"label"},[t._v("请选择纸张大小")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadSize,callback:function(e){t.downloadSize=e},expression:"downloadSize"}},[e("el-option",{attrs:{label:1===t.layout?"A4":"A3",value:1===t.layout?"A4":"A3"}}),e("el-option",{attrs:{label:1===t.layout?"16K":"8K",value:1===t.layout?"16K":"8K"}})],1)],1)]:t._e(),e("div",{staticClass:"static-info"},[e("p",{staticClass:"static-info__title"},[t._v("请确认以下答题卡设置信息")]),1===t.answerSheetMode?e("p",{staticClass:"static-info__item"},[t._v(t._s("答题卡模式:".concat(t.sizeLabel)))]):t._e(),1===t.answerSheetMode?e("p",{staticClass:"static-info__item"},[t._v(t._s("是否填写教育ID:".concat(t.isShowEducationId?"是":"否")))]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("p",{staticClass:"static-info__item"},[t._v(t._s("教育ID位数:".concat(t.educationIdValue,"位")))]),e("p",{staticClass:"static-info__item"},[t._v(" "+t._s("考号板式:".concat(1===t.registrationNumberType?"教育ID":"条形码"))+" ")])]:t._e(),e("p",{staticClass:"static-info__item"},[t._v(t._s("是否手工批阅:".concat(t.handRead?"是":"否")))]),1===t.answerSheetMode&&t.handRead?e("p",{staticClass:"static-info__item"},[t._v(t._s("手工批阅形式:".concat("hand"===t.readType?"手写":"涂点")))]):t._e()],2),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDownloadModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmDownload}},[t._v("确 定")])],1)],2)],1)},r=[],a=(n("14d9"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode-other"},[e("p",{staticClass:"ac-card-config__sublabel"},[t._v("适用于"+t._s(t.subLabel)+"纸张")]),e("div",{staticClass:"layout-config"},[e("div",{class:["layout-config-item",t.disableOneLayout&&"disable-style"],attrs:{"aria-disabled":t.disableOneLayout},on:{click:function(e){return t.changeAnswerCardLayout(1)}}},[e("div",{class:["layout-image",1===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("d09a"),alt:"一栏"}})]),e("p",{staticClass:"layout-name"},[t._v("一栏")])]),e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(2)}}},[e("div",{class:["layout-image",2===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("eb33"),alt:"两栏"}})]),e("p",{staticClass:"layout-name"},[t._v("两栏")])]),0===t.mode?e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(3)}}},[e("div",{class:["layout-image",3===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("f714"),alt:"三栏"}})]),e("p",{staticClass:"layout-name"},[t._v("三栏")])]):t._e()]),1===t.mode?e("el-radio-group",{model:{value:t.sizeType,callback:function(e){t.sizeType=e},expression:"sizeType"}},[e("el-radio",{attrs:{label:"A"}},[t._v(t._s(1===t.layout?"A4":"A3"))]),e("el-radio",{attrs:{label:"K"}},[t._v(t._s(1===t.layout?"16K":"8K"))])],1):t._e()],1)])}),o=[],s={name:"ChangeLayout",components:{},props:{mode:{type:Number,default:0}},computed:{sizeType:{get:function(){return this.$store.getters["AC/sizeType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setSizeType",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},disableOneLayout:function(){return this.$store.getters["AC/disableOneLayout"]},subLabel:function(){return 0===this.mode?1===this.layout?"A4、16K":"A3、8K":"A"===this.sizeType?1===this.layout?"A4":"A3":1===this.layout?"16K":"8K"}},watch:{},mounted:function(){},data:function(){return{}},methods:{changeAnswerCardLayout:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",t),t>1&&this.$store.dispatch("AC/answerConfig/setPatchwork",!1),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,l=n("2877"),u=Object(l["a"])(c,a,o,!1,null,null,null),h=u.exports,d=n("2b16"),f={name:"AcAnswerConfig",components:{changeLayout:h,AcPreview:d["default"]},props:{modeChangeable:{type:Boolean,default:!0},layoutChangeable:{type:Boolean,default:!0},titleSwitchable:{type:Boolean,default:!0},graffitiDisable:{type:Boolean,default:!1}},inject:["showStudentInfo"],computed:{answerSheetMode:{get:function(){return this.$store.getters["AC/answerCardMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardMode",t),0===t&&this.$store.dispatch("AC/answerConfig/setSizeType","A")}},isShowAttention:{get:function(){return this.$store.getters["AC/showAttention"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAttention",t),this.$store.dispatch("AC/paper/resetPanel")}},studentInfoArr:function(){return this.$store.getters["AC/studentInfo"]},isShowEducationId:{get:function(){return this.$store.getters["AC/showEducationId"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},educationIdValue:{get:function(){return this.$store.getters["AC/educationIdValue"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},registrationNumberType:{get:function(){return this.$store.getters["AC/registrationNumberType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setRegistrationNumberType",t),this.$store.dispatch("AC/paper/resetPanel")}},objectiveOrder:{get:function(){return this.$store.getters["AC/objectiveOrder"]},set:function(t){this.$store.dispatch("AC/answerConfig/setObjectiveOrder",t),this.$store.dispatch("AC/paper/resetPanel")}},judgmentMode:{get:function(){return this.$store.getters["AC/judgmentMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setJudgmentMode",t)}},isShowQuestion:{get:function(){return this.$store.getters["AC/showQuestion"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowQuestion",t),this.$store.dispatch("AC/paper/resetEditTitle")}},handRead:{get:function(){return!!this.readType},set:function(t){this.readType=t?"graffiti":""}},readType:{get:function(){return this.$store.getters["AC/readType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setReadType",t),this.$store.dispatch("AC/paper/resetPanel")}},isAddFooter:{get:function(){return this.$store.getters["AC/addFooter"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAddFooter",t)}},isPatchwork:{get:function(){return this.$store.getters["AC/patchwork"]},set:function(t){this.$store.dispatch("AC/answerConfig/setPatchwork",t),this.$store.dispatch("AC/paper/resetPanel")}},isEntranceExams:{get:function(){return this.$store.getters["AC/entranceExams"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEntranceExams",t),"graffiti"===this.readType?this.handRead=!1:this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},sizeLabel:function(){var t="",e="";switch(this.layout){case 1:t="一栏",e="A"===this.sizeType?"A4":"16K";break;case 2:t="二栏",e="A"===this.sizeType?"A3":"8K";break}return"".concat(t," ").concat(e)},downloadType:{get:function(){return this.$store.getters["AC/downloadType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadType",t)}},downloadSize:{get:function(){return this.$store.getters["AC/downloadSize"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadSize",t)}},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{studentInfoArr:function(){this.studentInfoTags=this.studentInfoArr}},mounted:function(){this.studentInfoTags=this.studentInfoArr},data:function(){return{studentInfoTags:[],inputVisible:!1,inputValue:"",showConfig:!0,previewVisible:!1,showDownloadModal:!1,radio:"sweep"}},methods:{handleClose:function(t){this.studentInfoTags.splice(this.studentInfoTags.indexOf(t),1),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},showInput:function(){var t=this;this.inputVisible=!0,this.$nextTick((function(e){t.$refs.saveTagInput.$refs.input.focus()}))},handleInputConfirm:function(){var t=this.inputValue;t&&-1===this.studentInfoTags.indexOf(t)&&this.studentInfoTags.push(t),this.inputVisible=!1,this.inputValue="",this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},download:function(){this.acMode?this.isShowEducationId||this.handRead?this.showDownloadModal=!0:this.$emit("download"):(this.showDownloadModal=!0,this.$store.dispatch("AC/answerConfig/setDownloadSize",1===this.layout?"A4":"A3"))},confirmDownload:function(){this.showDownloadModal=!1,this.$emit("download")},save:function(){this.$emit("save")},viewPaper:function(){this.$emit("view-paper")}}},p=f,g=Object(l["a"])(p,i,r,!1,null,null,null),m=g.exports;m.install=function(t){t.component(m.name,m)};e["default"]=m},"69f3":function(t,e,n){var i,r,a,o=n("cdce"),s=n("da84"),c=n("861d"),l=n("9112"),u=n("1a2d"),h=n("c6cd"),d=n("f772"),f=n("d012"),p="Object already initialized",g=s.TypeError,m=s.WeakMap,y=function(t){return a(t)?r(t):i(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(o||h.state){var _=h.state||(h.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,i=function(t,e){if(_.has(t))throw g(p);return e.facade=t,_.set(t,e),e},r=function(t){return _.get(t)||{}},a=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,i=function(t,e){if(u(t,b))throw g(p);return e.facade=t,l(t,b,e),e},r=function(t){return u(t,b)?t[b]:{}},a=function(t){return u(t,b)}}t.exports={set:i,get:r,has:a,enforce:y,getterFor:v}},"6bdf":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{"custom-class":"ac-editor",visible:t.currentVisible,title:t.title,top:"10vh",width:"868px","close-on-click-modal":!1},on:{"update:visible":function(e){t.currentVisible=e},open:t.handleOpen}},[e("textarea",{attrs:{id:t.editorId}}),e("div",{staticClass:"ac-editor__footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.close}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirm}},[t._v("确定")])],1)])},r=[],a=n("d4ec"),o=n("bee2"),s={name:"AcEditor",props:{title:{type:String,default:"编辑标题"},content:{type:String,default:""},visible:{type:Boolean,default:!1},editorId:{type:String,default:"ac-editor"},editorConstructor:{type:Function,default:function(){}}},inject:["uploadOss","ClassicEditor"],data:function(){return{editor:null}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},uploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(a["a"])(this,e),this.loader=t}return Object(o["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){e.loader.file.then((function(e){return t(e,n)}))}))}}]),e}()},createFn:function(){return this.ClassicEditor||this.editorConstructor}},methods:{handleOpen:function(){var t=this;this.$nextTick((function(){return t.initEditor()}))},close:function(){this.currentVisible=!1},confirm:function(){this.close(),this.editor&&this.$emit("submit",this.editor.getData())},initEditor:function(){var t=this;this.editor?(""===this.content||this.content)&&this.editor.setData(this.content):this.createFn.create(document.querySelector("#".concat(this.editorId)),{isReadOnly:!0,placeholder:"请输入~",image:{resizeUnit:"px",toolbar:[{name:"imageStyle:pictures",items:["imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight"],defaultItem:"imageStyle:alignCenter"},"|","toggleImageCaption","imageStyle:inline"]}}).then((function(e){t.editor=e,t.content&&t.editor.setData(t.content),t.addSpecialCharacters(e),e.plugins.get("FileRepository").createUploadAdapter=function(e){return new t.uploadAdapter(e)},e.on("instanceReady",(function(t){t.editor.execCommand("toolbarCollapse")}))}))},addSpecialCharacters:function(t){t.plugins.get("SpecialCharacters").addItems("编号",[{title:"①",character:"①"},{title:"②",character:"②"},{title:"③",character:"③"},{title:"④",character:"④"},{title:"⑤",character:"⑤"},{title:"⑥",character:"⑥"},{title:"⑦",character:"⑦"},{title:"⑧",character:"⑧"},{title:"⑨",character:"⑨"},{title:"⑩",character:"⑩"},{title:"(1)",character:"(1)"},{title:"(2)",character:"(2)"},{title:"(3)",character:"(3)"},{title:"(4)",character:"(4)"},{title:"(5)",character:"(5)"},{title:"(6)",character:"(6)"},{title:"(7)",character:"(7)"},{title:"(8)",character:"(8)"},{title:"(9)",character:"(9)"},{title:"(10)",character:"(10)"},{title:"1)",character:"1)"},{title:"2)",character:"2)"},{title:"3)",character:"3)"},{title:"4)",character:"4)"},{title:"5)",character:"5)"},{title:"6)",character:"6)"},{title:"7)",character:"7)"},{title:"8)",character:"8)"},{title:"9)",character:"9)"},{title:"10)",character:"10)"},{title:"一",character:"一"},{title:"二",character:"二"},{title:"三",character:"三"},{title:"四",character:"四"},{title:"五",character:"五"},{title:"六",character:"六"},{title:"七",character:"七"},{title:"八",character:"八"},{title:"九",character:"九"},{title:"十",character:"十"},{title:"(一)",character:"(一)"},{title:"(二)",character:"(二)"},{title:"(三)",character:"(三)"},{title:"(四)",character:"(四)"},{title:"(五)",character:"(五)"},{title:"(六)",character:"(六)"},{title:"(七)",character:"(七)"},{title:"(八)",character:"(八)"},{title:"(九)",character:"(九)"},{title:"(十)",character:"(十)"}])}}},c=s,l=n("2877"),u=Object(l["a"])(c,i,r,!1,null,null,null),h=u.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"6ce5":function(t,e,n){"use strict";var i=n("df7e"),r=n("ebb5"),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;o("toReversed",(function(){return i(a(this),s(this))}))},"6f19":function(t,e,n){var i=n("9112"),r=n("0d26"),a=n("b980"),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):i(t,"stack",r(n,s)))}},7156:function(t,e,n){var i=n("1626"),r=n("861d"),a=n("d2bb");t.exports=function(t,e,n){var o,s;return a&&i(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,n){var i=n("e330"),r=n("59ed");t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(a){}}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var i=n("1d80"),r=Object;t.exports=function(t){return r(i(t))}},"825a":function(t,e,n){var i=n("861d"),r=String,a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not an object")}},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var i=n("1626"),r=n("8ea1"),a=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===a}:function(t){return"object"==typeof t?null!==t:i(t)}},8925:function(t,e,n){var i=n("e330"),r=n("1626"),a=n("c6cd"),o=i(Function.toString);r(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},"8ea1":function(t,e){var n="object"==typeof document&&document.all,i="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:i}},"8f60":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{class:["ac-graffiti__wrapper",t.hidePadding&&"is-hide-padding"]},[e("div",{class:["ac-graffiti",t.hideBottomBorder&&"is-hide-bottom",t.hideTopBorder&&"is-hide-top"],attrs:{"data-scan-type":"review","data-scan-name":t.scanName,"data-scan-score":t.score}},t._l(Array(21).fill(""),(function(n,i){return e("span",{key:i,staticClass:"ac-graffiti__item"},[t._v(" "+t._s(t.getItem(i))+" ")])})),0)])},r=[],a={name:"AcGraffiti",props:{score:{type:Number,required:!0},scanName:{type:String},hidePadding:{type:Boolean,required:!1},hideBottomBorder:{type:Boolean,required:!1},hideTopBorder:{type:Boolean,required:!1}},methods:{getItem:function(t){if(20===t)return.5;if(this.score>=20)return t>9||10*t<=this.score?t%10:"";var e=20-this.score-1;return t>=e?20-t-1:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,i,r,!1,null,null,null),l=c.exports;l.install=function(t){t.component(l.name,l)};e["default"]=l},"907a":function(t,e,n){"use strict";var i=n("ebb5"),r=n("07fa"),a=n("5926"),o=i.aTypedArray,s=i.exportTypedArrayMethod;s("at",(function(t){var e=o(this),n=r(e),i=a(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},"90e3":function(t,e,n){var i=n("e330"),r=0,a=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++r+a,36)}},9112:function(t,e,n){var i=n("83ab"),r=n("9bf2"),a=n("5c6c");t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},9152:function(t,e){
3
+ g=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var a=e&&e.prototype instanceof d?e:d,o=Object.create(a.prototype),s=new T(r||[]);return i(o,"_invoke",{value:A(t,n,s)}),o}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(O){return{type:"throw",arg:O}}}t.wrap=l;var h={};function d(){}function f(){}function m(){}var y={};c(y,a,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(S([])));_&&_!==e&&n.call(_,a)&&(y=_);var b=m.prototype=d.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(i,a,o,s){var c=u(t[i],t,a);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==Object(p["a"])(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(h).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function A(t,e,n){var i="suspendedStart";return function(r,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw a;return I()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=x(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(t,e,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function x(t,e){var n=e.method,i=t.iterator[n];if(void 0===i)return e.delegate=null,"throw"===n&&t.iterator["return"]&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var r=u(i,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var a=r.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,r=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return f.prototype=m,i(b,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:f,configurable:!0}),f.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(C.prototype),c(C.prototype,o,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,i,r,a){void 0===a&&(a=Promise);var o=new C(l(e,n,i,r),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=S,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return o.type="throw",o.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;k(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:S(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function m(t,e,n,i,r,a,o){try{var s=t[a](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,r)}function y(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){m(a,i,r,o,s,"next",t)}function s(t){m(a,i,r,o,s,"throw",t)}o(void 0)}))}}var v=n("d4ec"),_=n("bee2"),b=n("a38e");function w(t,e,n){return e=Object(b["a"])(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){w(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x=n("4e0a"),E=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-question ck-content",attrs:{"data-key":t.dataKey}},[t.formatChoices.length||"hand"===t.readType?e("div",{staticClass:"ac-question__prefix"},[e("ac-answer-box",{attrs:{label:t.formatChoices.length?t.showQuestion?"答案":t.plainTitle:"得分",direction:t.formatChoices.length?"column":"row",width:t.formatChoices.length&&!t.showQuestion?144:128}})],1):t._e(),!t.formatChoices.length||t.showQuestion?e("div",{staticClass:"ac-question__content"},[t.formatTitle||t.formatPrefix?e("div",{staticClass:"ac-question__title",style:t.titleAlign?{"text-align":t.titleAlign}:""},[t.formatPrefix?e("div",{staticClass:"ac-question__title-prefix",class:{"is-float":!!t.formatTitle,"is-bold":t.showQuestion},domProps:{innerHTML:t._s(t.formatPrefix)}}):t._e(),t.formatTitle?e("div",{staticClass:"ac-question__title-inner",domProps:{innerHTML:t._s(t.formatTitle)}}):t._e()]):t._e(),t.formatChoices.length?e("ac-choice",{attrs:{list:t.formatChoices,wrap:t.choiceWrap}}):t._e()],1):t._e()])},k=[],T=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice"},[t.wrap?[e("div",{staticClass:"ac-choice__list"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1),t.list.length%2?t._e():e("div",{staticClass:"ac-choice__list--half"},t._l(Array(t.list.length/2).fill(""),(function(n,i){return e("div",{key:i,staticClass:"row-direction"},t._l(t.list.slice(2*i,2*i+2),(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)})),0),e("div",{staticClass:"ac-choice__list--all"},[e("div",{staticClass:"row-direction"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)])]:e("div",{staticClass:"ac-choice__list--nowrap"},t._l(t.list,(function(t,n){return e("ac-choice-item",{key:n,attrs:{identifier:t.identifier,content:t.content}})})),1)],2)},S=[],I=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-choice__item"},[t.identifier?e("div",{staticClass:"ac-choice__prefix"},[t._v(t._s(t.identifier)+".")]):t._e(),t.content?e("div",{staticClass:"ac-choice__content",domProps:{innerHTML:t._s(t.content)}}):t._e()])},O=[],B={name:"AcChoiceItem",props:{identifier:{type:String,default:""},content:{type:String,default:""}}},L=B,P=n("2877"),R=Object(P["a"])(L,I,O,!1,null,null,null),j=R.exports,M={name:"AcChoice",components:{AcChoiceItem:j},props:{list:{type:Array,default:function(){return[]}},wrap:{type:Boolean,default:!0}}},z=M,N=Object(P["a"])(z,T,S,!1,null,null,null),D=N.exports,U=n("fbd7"),F={name:"AcQuestion",components:{AcChoice:D,AcAnswerBox:U["default"]},props:{title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},titleAlign:{type:String,default:""},prefix:{type:String,default:""},prefixEditable:{type:Boolean,default:!1},choices:{type:Array,default:function(){return[]}},choiceEditable:{type:Boolean,default:!0},choiceWrap:{type:Boolean,default:!0},dataKey:{type:String,default:""},plainTitle:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},formatTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||(this.showQuestion?this.title:"")},formatPrefix:function(){var t,e=this;return(null===(t=this.editTitleList.find((function(t){return t.dataKey===e.dataKey})))||void 0===t?void 0:t.prefix)||(this.showQuestion?this.prefix:this.plainTitle)},formatChoices:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).choices||this.choices||[]},readType:function(){return this.$store.getters["AC/readType"]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]}}},H=F,K=Object(P["a"])(H,E,k,!1,null,null,null),W=K.exports;W.install=function(t){t.component(W.name,W)};var V,Z,Y=W,G=n("8f60"),Q=n("e6c4"),X=function(){window.MathJax&&(window.MathJax.Hub.Config({showProcessingMessages:!1,messageStyle:"none",jax:["input/TeX","output/HTML-CSS"],tex2jax:{inlineMath:[["\\(","\\)"],["\\[","\\]"]],displayMath:[],skipTags:["script","noscript","style","textarea","pre"]},"HTML-CSS":{showMathMenu:!1}}),window.isAcMathJaxConfig=!0)},J=function(t){if(window.MathJax)return window.isAcMathJaxConfig||X(),new Promise((function(e){window.MathJax.Hub.Queue(["Typeset",window.MathJax.Hub,document.getElementById(t)]),window.MathJax.Hub.Queue((function(){e()}))}))},q=n("5dcc"),tt={name:"AcVirtual",components:{AcEssay:x["default"],AcQuestion:Y,AcAnswerBox:U["default"],AcGraffiti:G["default"],AcBasicInfo:Q["default"]},data:function(){return{continueObjectiveCount:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},showQuestion:function(){return this.$store.getters["AC/showQuestion"]},readType:function(){return this.$store.getters["AC/readType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},getEditedTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},splitDom:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n="",i=0,r=0,a=[],o=[];if(t){if(t.childNodes.length){var s=t.childNodes[t.childNodes.length-1];t.childNodes.length>1&&(2!==t.childNodes.length||"\n"!==s.textContent)?o=t.childNodes:t.childNodes[0].childNodes.length&&"FIGURE"!==t.childNodes[0].nodeName&&(o=t.childNodes[0].childNodes)}o.length||(o=t.childNodes)}for(var c=0;c<o.length;c++){var l=o[c];if(-1===["P","DIV","IMG","FIGURE"].indexOf(l.nodeName))try{"#text"===l.nodeName?n+=l.textContent:n+=l.outerHTML}catch(g){}else{var u=getComputedStyle(l),h=Number(u.marginTop.replace("px",""))||0,d=Number(u.marginBottom.replace("px",""))||0,f=Object(q["e"])(l);a.length&&(f-=r),n+=l.outerHTML,i+=f+$(l).outerHeight()+h+d,a.push({type:e,content:n,height:i}),n="",i=0,r=Object(q["e"])(l)+$(l).outerHeight()+h+d}}if(n){var p=$(t).outerHeight();a.push({type:e,content:n,height:a.length?p-r:p})}return a},getDomList:function(){var t=this,e=function(e,n,r,a){var o={dataKey:r,children:[],updatePage:e.updatePage,updatePiece:e.updatePiece},s=null,c=0;if((e.title||e.prefix)&&(t.showQuestion||!e.choices)){var l=n.find(".ac-question__title")[0],u=n.find(".ac-question__title-inner")[0],h=n.find(".ac-question__title-prefix")[0],d=n.find(".ac-answer-box")[0],f=getComputedStyle(l),p=Number(f.paddingTop.replace("px",""))||0,g=Number(f.paddingBottom.replace("px",""))||0,m=[];if(u?(m=t.splitDom(u,"questionTitleItem"),m.length&&(d&&(c=$(d).outerHeight(),m[0].answerBoxHeight=c,m[0].needAnswerBox=!0,s=m[0]),m[0].prefix=(null===h||void 0===h?void 0:h.outerHTML)||"",m[0].height+=p,m[m.length-1].height+=g,m.forEach((function(t){t.hasChoice=e.choices&&e.choices.length,t.titleAlign=e.titleAlign})))):h&&(m=[{type:"questionTitleItem",prefix:h.outerHTML,height:Math.max($(h).outerHeight()+p+g,d?$(d).outerHeight():0),content:"",needAnswerBox:!!d}]),m.length){var y={children:m};o.children.push(y)}}if(e.choices)if(t.showQuestion){var v={},_=n.find(".ac-choice")[0];if(!1===e.choiceWrap)Object.assign(v,{type:"choiceItem",height:$(_).outerHeight(),content:_.outerHTML});else{var b=$(_).outerWidth(),w=$(_).find(".ac-choice__list").outerWidth();if(b>=w*e.choices.length)Object.assign(v,{type:"choiceItem",height:$(_).find(".ac-choice__list--all").outerHeight(),content:$(_).find(".ac-choice__list--all")[0].outerHTML});else{v.children=[];var C=$(_).find(".ac-choice__list .ac-choice__item"),A="ac-choice__list";!(e.choices.length%2)&&b>=2*w&&(A="ac-choice__list--half",C=$(_).find(".ac-choice__list--half .row-direction")),Array.from(C).forEach((function(t){v.children.push({type:"choiceItem",height:$(t).outerHeight(),content:t.outerHTML,wrapperClass:A})}))}}o.children.push(v)}else{var x=n.find(".ac-answer-box")[0];o.children.push({type:"plainBox",boxContent:e.plainTitle,height:t.continueObjectiveCount%5===0?$(x).outerHeight():0}),t.continueObjectiveCount++}else t.continueObjectiveCount=0;if(s){var E=0,k=function t(e){e.forEach((function(e){e.children?t(e.children):E+=e.height}))};k(o.children),c-E>0&&(s.height+=c-E)}if(i.push(o),e.essay){var T={type:"essay",essay:Object.assign({rowCount:4},e.essay),dataKey:r};if(a&&(a.essayRowCount=T.essay.rowCount,i.push(Object.assign({},a,{subtype:"beforeEssay"}))),e.essay.title){var S=n.find(".ac-essay__title")[0];T.essay.titleChildren=t.splitDom(S)}i.push(T)}},n=function n(a){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];a.forEach((function(a,s){var c=[].concat(u(o),[a[a.idProp||"id"]||s]),l=r.find(".ac-virtual__section[data-key=".concat(c.join("_"),"]"));if(Array.isArray(a.children)&&a.children.length){t.continueObjectiveCount=0;var h=l.find(".ac-virtual__title")[0];if(h||"complex"===a.code){var d={};if("complex"===a.code){var f=l.find(".ac-material__title-prefix")[0],p=l.find(".ac-material__title-inner")[0],g=[];p?(g=t.splitDom(p,"materialItem"),g.length&&(g[0].prefix=(null===f||void 0===f?void 0:f.outerHTML)||"",g[0].height+=16)):f&&(g=[{type:"materialItem",prefix:f.outerHTML,height:$(f).outerHeight()+16,content:""}]),d={dataKey:c.join("_"),children:g}}else d={dataKey:c.join("_"),height:$(h).outerHeight(),content:h.innerHTML,updatePage:a.updatePage,updatePiece:a.updatePiece};i.push(d)}n(a.children,c)}else{var m=null;if("graffiti"===t.readType){var y=l.find(".ac-graffiti__wrapper")[0];y&&(m={type:"graffiti",dataKey:c.join("_"),height:$(y).outerHeight(),content:y.innerHTML,subtype:"beforeTitle"},i.push(m))}e(a,l,c.join("_"),m)}}))},i=[],r=$(".ac-virtual"),a=r.find(".ac-basicInfo");if(a){var o=a.find(".ac-basicInfo__title"),s=a.find(".ac-attention"),c=a.find(".ac-basic-info__edu");i.push({type:"basicInfo",headHeight:null===o||void 0===o?void 0:o.outerHeight(),attentionHeight:null===s||void 0===s?void 0:s.outerHeight(),eduHeight:null===c||void 0===c?void 0:c.outerHeight()})}n(this.paperTree),this.$emit("change",i)},getTitle:function(t,e){var n=this.$createElement,i=t.title,r=t.prefix,a=t.plainTitle,o=t.code,s=this.editTitleList.find((function(t){return t.dataKey===e})),c=s||{},l=c.title,u=c.editKey,h=s?l:this.showQuestion||"complex"!==o?i:"",d=this.showQuestion?r:a;return h||d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title")},[d?n("div",{class:"ac-".concat("complex"===o?"material":"virtual","__title-prefix").concat(this.showQuestion?" is-bold":"").concat(h?" is-float":"")},[d]):null,h?n("div",{key:"virtual_title_".concat(u),class:"ac-".concat("complex"===o?"material":"virtual","__title-inner ck-content"),domProps:{innerHTML:h}}):null]):null},getList:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.$createElement;return t.map((function(t,r){var a=[].concat(u(n),[t[t.idProp||"id"]||r]);return i("div",{key:"".concat(r,"_").concat(t[t.idProp||"id"]||""),class:"ac-virtual__section",attrs:{"data-key":a.join("_")}},[Array.isArray(t.children)&&t.children.length?i("div",[e.getTitle(t,a.join("_")),e.getList(t.children,a)]):i("div",["graffiti"!==e.readType||t.choices?null:i("ac-graffiti",{attrs:{scanName:t.scanName,score:t.score}}),i("ac-question",{key:"virtual_question_".concat(e.getEditedKey(a.join("_"))),props:A({},Object.assign({dataKey:a.join("_")},t))}),t.essay?i("ac-essay",{props:A({},Object.assign(t.essay,{title:e.getEssayTitle(a.join("_"),t.essay.title)}))}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},key:"virtual_"+this.readType},[t("ac-basic-info"),this.getList(this.paperTree)])}},et=tt,nt=Object(P["a"])(et,V,Z,!1,null,null,null),it=nt.exports;it.install=function(t){t.component(it.name,it)};var rt=it,at=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,i){return e("div",{key:i,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",style:{width:1===t.layout?"980px":"1960px"},attrs:{"data-page":i+1}},[t._l(n,(function(n,r){return e("ac-piece",{key:r,attrs:{"data-piece":i*t.layout+r,"data-page":i,list:n},on:{edit:t.handleEdit}})})),t.layout-n.length?e("div",{staticClass:"ac-piece"},[e("ac-restrict")],1):t._e(),"graffiti"===t.readType?e("ac-mark-point",{attrs:{"page-index":i}}):t._e(),e("div",{staticClass:"ac-piece__footer"},[t._v(" "+t._s("第".concat(i+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")])],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||"",title:t.editorTitle},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},ot=[],st=(n("13d5"),function(){var t=this,e=t._self._c;return e("div",{ref:"restrictRef",class:["ac-restrict",t.lastOneClass],style:{width:t.$store.getters["AC/layout"]>2?"580px":"868px",height:t.realHeight,marginTop:"".concat(t.marginTop,"px")}},[t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",(1250===t.height||"100%"===t.height||t.isFirst)&&"show-border_top",t.isShowTipWord&&"show-border_word-top"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",(1250===t.height||"100%"===t.height||t.isFirst)&&"show-outline_top",t.isShowTipWord&&"show-border_word-top"]}):t._e()])}),ct=[],lt={name:"AcRestrict",inject:["paddingBlock"],props:{height:{type:[Number,String],default:"100%"},marginTop:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},data:function(){return{realHeight:"100%"}},computed:{isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]}},watch:{height:function(){var t=this;this.$nextTick((function(){return t.updateHeight()}))}},mounted:function(){this.updateHeight()},methods:{updateHeight:function(){var t=this;if("number"===typeof this.height){if(1250!==this.height){var e=this.$refs.restrictRef,n=this.$parent.$el,i=n.clientHeight-(Object(q["e"])(e)+this.height);this.realHeight="".concat(i<68&&this.height+(i-68)>0?this.height+(i-68):this.height,"px")}else this.realHeight="".concat(this.height-5,"px");this.lastOneClass&&this.$nextTick((function(){return t.getDistanceToParentBottom()}))}else this.realHeight=this.height},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t);this.realHeight="".concat(parseInt(this.realHeight)+e,"px")}}},ut=lt,ht=Object(P["a"])(ut,st,ct,!1,null,null,null),dt=ht.exports;dt.install=function(t){t.component(dt.name,dt)};var ft,pt,gt=dt,mt={name:"AcPiece",components:{AcEssay:x["default"],AcAnswerBox:U["default"],AcBasicInfo:Q["default"],AcRestrict:gt},props:{list:{type:Array,default:function(){return[]}}},inject:["contentEditable","paddingBlock"],computed:{paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){return"K"===this.sizeType?"1357px":"1386px"},piecePadding:function(){return"number"===typeof this.paddingBlock?"".concat(this.paddingBlock,"px 0px"):"".concat(this.paddingBlock[0]||0,"px 0px ").concat(this.paddingBlock[1]||0,"px")}},methods:{getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},isWithSpace:function(t){var e=!1,n=t.split("_"),i=this.paperTree||[];return n.forEach((function(t,r){var a=i.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};i=a.children||[],r===n.length-1&&(e=a.choices&&a.choices.length)})),e},handleClick:function(t,e){this.$emit("edit",t,e)},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getContent:function(t,e){var n,i=this,r=this.$createElement,a=null;switch(t.type){case"question":a=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question ck-content"},[t.answerBoxType?r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:"answer"===t.answerBoxType?"答案":"得分",direction:"answer"===t.answerBoxType?"column":"row"}})]):null,r("div",{class:"ac-question__content"+("hand"!==this.readType&&!this.isWithSpace(t.dataKey)||t.answerBoxType?"":" with-space")},[t.editBtn&&this.contentEditable?r("el-button",{attrs:{type:"primary",size:"small"},class:"ac-question__edit",on:{click:function(){return i.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,null===(n=t.content)||void 0===n?void 0:n.map((function(t){return"string"===typeof t?r("div",{domProps:{innerHTML:t}}):t}))])]);break;case"essay":a=r("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.dataKey||""},props:A({},t.content[0])});break;case"material":a=r("div",{key:"material_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-material ck-content"},[t.editBtn&&this.contentEditable?r("el-button",{class:"ac-material__edit",attrs:{type:"primary",size:"small"},on:{click:function(){return i.handleClick(t.dataKey,t.editBtn)}}},[t.editBtn]):null,r("div",{domProps:{innerHTML:t.content.join("")}})]);break;case"plainBox":a=r("div",{key:"question_".concat(e),attrs:{"data-key":t.dataKey||""},class:"ac-question is-box".concat(t.isFollowBox?" is-follow":"")},[r("div",{class:"ac-question__prefix"},[r("ac-answer-box",{attrs:{label:this.getPlainTitle(t.dataKey)||t.boxContent,width:144,editable:!0,dataKey:t.dataKey}})])]);break;case"graffiti":a=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-graffiti__wrapper".concat("beforeEssay"===t.subtype?" is-bottom":""),domProps:{innerHTML:t.content}});break;case"basicInfo":a=r("ac-basic-info",{props:A({},t)});break;case"restrict":a=r("ac-restrict",{attrs:{height:t.height,marginTop:20}});break;default:a=r("div",{key:e,attrs:{"data-key":t.dataKey||""},class:"ac-piece__section"},[r("div",{attrs:{contenteditable:this.contentEditable},domProps:{innerHTML:t.content},on:{blur:function(e){return i.handleBlur(e,t.dataKey)}}})])}return a}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{height:this.pieceHeight,padding:this.piecePadding}},[this.list.map((function(e,n){return t.getContent(e,n)}))])}},yt=mt,vt=Object(P["a"])(yt,ft,pt,!1,null,null,null),_t=vt.exports;_t.install=function(t){t.component(_t.name,_t)};var bt=_t,wt=n("6bdf"),Ct=n("13ed"),At={name:"AcPanel",components:{AcPiece:bt,AcEditor:wt["default"],AcMarkPoint:Ct["default"],AcRestrict:gt},props:{domList:{type:Array,default:function(){return[]}}},inject:["showStudentInfo","paddingBlock"],data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0,editorTitle:"编辑题目"}},computed:{formatPanelList:function(){var t=this,e=[];return this.panelList.forEach((function(n,i){i%t.layout===0?e.push([n]):e[e.length-1].push(n)})),e},paperTree:function(){return this.$store.getters["AC/paperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},layout:function(){return this.$store.getters["AC/layout"]},latticeAttention:function(){return this.$store.getters["AC/latticeAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},pieceHeight:function(){var t="number"===typeof this.paddingBlock?2*this.paddingBlock:this.paddingBlock.reduce((function(t,e){return t+e}),0);return("K"===this.sizeType?1357:1386)-(t+10)},rowConfig:function(){return this.$store.getters["AC/rowConfig"]}},watch:{domList:function(t){t.length&&this.getPanelList()},panelFlag:function(){this.getPanelList()}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleEdit:function(t,e){var n={dataKey:t,content:"",hasChoice:!1},i=this.editTitleList.find((function(e){return e.dataKey===t}));if(null!==i&&void 0!==i&&i.title){var r=i.title,a=void 0===r?"":r,o=i.choices,s=void 0===o?[]:o;n.content+=a||"",s.length&&(n.hasChoice=!0,n.content+=s.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join(""))}else{var c=t.split("_"),l=this.paperTree||[];c.forEach((function(t,e){var i=l.find((function(e,n){return(e[e.idProp||"id"]||n).toString()===t}))||{};l=i.children||[],e===c.length-1&&(n.content+=i.title||"",i.choices&&i.choices.length&&(n.hasChoice=!0,n.content+=i.choices.map((function(t){return"<div class='ac-editor__choice'>".concat(t.identifier,".").concat(t.content,"</div>")})).join("")))}))}this.editing=n,this.editorTitle=e,this.visible=!0},handleSubmit:function(t){var e=this.editing,n=e.dataKey,i=e.hasChoice,r={dataKey:n};if(i){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],l=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");l={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(l)}else l?l.content+=t:s+=t})),Object.assign(r,{title:s,choices:c})}else r.title=t;this.$store.dispatch("AC/paper/setEditTitle",r)},getBasicInfo:function(t){var e=null;return t?"graffiti"!==this.readType||t%(this.patchwork?4:2*this.layout)||(e={hideStudentInfo:!this.showStudentInfo,hideTitle:!0,hideAttention:!0,height:this.eduHeight}):e={hideStudentInfo:!this.showStudentInfo,hideAttention:!this.showAttention,height:this.headHeight+(this.showAttention?this.attentionHeight:0)+this.eduHeight},e},getPanelList:function(){var t=this,e=this.$createElement,n=[],i=0;n[i]=[];var r=this.pieceHeight,a=n[i],o=[],s=function(){var e=t.getBasicInfo(i);e&&(r-=e.height,a.push(Object.assign({type:"basicInfo"},e)))},c=function(){var e=n[i];if(i++,n[i]=[],r=t.pieceHeight,a=n[i],s(),"graffiti"===e[e.length-1].type){var o=e[e.length-1];e.pop(),a.push(o),r-=o.height}},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3?arguments[3]:void 0,a=["","inner"].includes(i)?0:30,o=r-(n?32:0)-a;return Math.floor((o+e)/(t+e))},u=function(n,i,r){var o="编辑题目",s=!1,c="",l="",u=!1,h=n.map((function(n){var a="";switch(n.type){case"choice":a="<div class=".concat(n.className,">").concat(n.children.join(""),"</div>");break;case"questionTitle":var h;s=n.isFirst,n.needAnswerBox&&(c="score"),n.hasChoice&&n.needAnswerBox&&(c="answer");var d=n.children.join(""),f=!(null===(h=n.prefix)||void 0===h||!h.match(/class="([^"]*?)is-float([^"]*?)"/));a=e("div",{class:"ac-question__title",style:n.titleAlign?"text-align: ".concat(n.titleAlign):""},[n.prefix?e("div",{attrs:{contentEditable:!0},domProps:{innerHTML:n.prefix},style:f?"float: left; position: relative; z-index: 1;":"",on:{blur:function(e){return t.handleTitlePrefixBlur(e,i)}}}):null,d?e("div",{class:"ac-question__title-inner",domProps:{innerHTML:d}}):null]);break;case"essayArea":a=n.essayConfig;break;case"material":s=n.isFirst,o="编辑材料",r="material";var p=n.children.join("");a="<div class='ac-material__title'>".concat(n.prefix||"").concat(p?"<div class='ac-material__title-inner'>".concat(p,"</div>"):"","</div>");break;case"plainBox":r="plainBox",l=n.boxContent,u=n.isFollow;break;default:a=n.content}return a}));n.length=0,a.push({type:r,dataKey:i,content:h,editBtn:s?o:"",answerBoxType:c,boxContent:l,isFollowBox:u})},h=function(e,n,i){var a=e.rowHeight,o=e.rowGap,s=e.titleChildren,h=e.borderType,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType),p=t.rowConfig[f]||{};a="number"===typeof a?a:p.rowHeight||0,o="number"===typeof o?o:p.rowGap||0,r<30&&c();var g={type:"essayArea"};if(s){var m="";s.forEach((function(t,a){r>=t.height+(a?0:32)?(m+=t.content,r-=t.height+(a?0:32)):(m&&i.push({type:"essayArea",essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d,bgType:f})}),i.length&&u(i,n,"essay"),c(),m=t.content,r-=t.height+32)})),m?Object.assign(g,{essayConfig:Object.assign({},e,{row:0,title:m,rowCount:d})}):g=null}else g=null;if(!d)return g?i.push(g):(i.push({type:"essayArea",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),r-=30),void u(i,n,"essay");var y=d;while(y){var v=l(a,o,!g,h);if(v<1)g&&(i.push(g),g=null),i.length&&u(i,n,"essay"),c();else if(v<y)i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:v,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})}),g&&(g=null),u(i,n,"essay"),c(),y-=v;else{i.push({type:"essayArea",essayConfig:Object.assign({},e,{startRow:d-y,row:y,rowCount:d,bgType:f,title:g&&g.essayConfig?g.essayConfig.title:""})});var _=["","inner"].includes(h)?0:30;r-=y*(a+o)-o+(g?0:32)+_,y=0,g&&(g=null)}}},d=function t(e,n,i){e.forEach((function(e,a){if(e.children)t(e.children,n,i);else{var o=e.height;if(!a&&e.answerBoxHeight&&(o=Math.max(o,e.answerBoxHeight)),r<o&&(i.length&&u(i,n,"question"),c(),["questionTitleItem","materialItem"].includes(e.type)&&a&&(e.height+=16)),r>=e.height){switch(e.type){case"choiceItem":i.length&&"choice"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"choice",className:e.wrapperClass,children:[e.content]});break;case"questionTitleItem":i.length&&"questionTitle"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"questionTitle",prefix:e.prefix,children:[e.content],isFirst:!a,hasChoice:e.hasChoice,needAnswerBox:e.needAnswerBox,titleAlign:e.titleAlign});break;case"materialItem":i.length&&"material"===i[i.length-1].type?i[i.length-1].children.push(e.content):i.push({type:"material",prefix:e.prefix,children:[e.content],isFirst:!a});break;case"plainBox":i.push({type:"plainBox",isFollow:!e.height,boxContent:e.boxContent});break;default:i.push(e.content)}r-=e.height}}}))},f=JSON.parse(JSON.stringify(this.domList));f.forEach((function(e){if(e){if(e.updatePiece)c();else if(e.updatePage)for(var i=2*t.layout,l=i-(n.length%i||i)+1,f=0;f<l;f++)c();if(e.children)e.children&&(d(e.children,e.dataKey,o),o.length&&u(o,e.dataKey,"question"));else switch(e.type){case"essay":h(e.essay,e.dataKey,o),o.length&&u(o,e.dataKey,"essay");break;case"basicInfo":t.headHeight=e.headHeight||0,t.attentionHeight=t.latticeAttention.height||e.attentionHeight||0,t.showStudentInfo&&(t.showEducationId?t.eduHeight=t.eduIdLength>10&&0!==t.registrationType?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)),s();break;case"graffiti":var p=t.getRowCount(e.dataKey,e.essayRowCount||0);if(e.subtype===(p?"beforeTitle":"beforeEssay"))break;default:r<e.height&&c(),r>=e.height&&(a.push({type:e.type||"",dataKey:e.dataKey,content:e.content,height:e.height,subtype:e.subtype}),r-=e.height)}}})),r>44&&n[n.length-1].push({type:"restrict",height:r-10}),this.panelList=n},handleTitlePrefixBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{prefix:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})}}},xt=At,Et=Object(P["a"])(xt,at,ot,!1,null,null,null),kt=Et.exports;kt.install=function(t){t.component(kt.name,kt)};var Tt=kt,St=n("cf03"),It=n.n(St),Ot=n("c4e3"),Bt=n.n(Ot),Lt=n("21a6"),Pt=n.n(Lt),Rt={name:"AcLattice",components:{AcVirtual:rt,AcPanel:Tt},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],bgUrlList:[],scanZipUrl:""}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},paperTree:function(){return this.$store.getters["AC/paperTree"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(v["a"])(this,e),this.file=t}return Object(_["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){t(e.file,n)}))}}]),e}()}},methods:{setDomList:function(t){this.domList=t},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(q["d"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("graffiti"!==t.readType){e.next=8;break}if(!($(".ac-piece__wrapper").length>16)){e.next=4;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 4:return e.next=6,t.getZipContent();case 6:n=e.sent,t.scanZipUrl=n||"";case 8:return e.next=10,t.getAreaImages();case 10:return e.next=12,t.getPositionData();case 12:return i=e.sent,e.next=15,t.getPageImage();case 15:return r=e.sent,a="K"===t.sizeType?1===t.layout?[552.76,765.35]:[765.35,1105.51]:1===t.layout?"a4":"a3",o=new It.a(1===t.layout?"p":"l","pt",a),r.forEach((function(e,n){var i=1===t.layout?"K"===t.sizeType?552.76:595.28:"K"===t.sizeType?1105.51:1190.55,a="K"===t.sizeType?765.35:841.89;o.addImage(e,"JPEG",0,0,i,a),n!==r.length-1&&o.addPage()})),s="".concat(t.$store.getters["AC/title"].replace(/\n/g,"")),c=o.output("blob"),l="".concat(("K"===t.sizeType?195:210)*t.layout,"mm*").concat("K"===t.sizeType?270:297,"mm"),u={file:c,positionList:i,paperSize:l,pageImgs:r,pdfName:s},t.scanZipUrl&&(u.scanZipUrl=t.scanZipUrl),e.abrupt("return",u);case 25:case"end":return e.stop()}}),e)})))()},getPositionData:function(){var t=this;return y(g().mark((function e(){var n,i,r;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],i=function(e,n,i){var r=i||$(e).parents(".ac-piece__wrapper"),a=r.offset(),o=a.left,s=a.top,c=$(e).offset(),l=c.left,u=c.top,h=l-o,d=h+$(e).outerWidth(),f=u-s,p=f+$(e).outerHeight(),g={page_left_top:"(".concat(t.pxToAU(h),",").concat(t.pxToAU(f),")"),page_right_bottom:"(".concat(t.pxToAU(d),",").concat(t.pxToAU(p),")"),question_page:r.data("page")};if("hand"===t.readType&&n){var m=$(e).find(".ac-answer-box")[0];if(m){var y=$(m).offset(),v=y.left,_=y.top;Object.assign(g,{mark_left_top:"(".concat(t.pxToAU(v-o),",").concat(t.pxToAU(_-s),")"),mark_right_bottom:"(".concat(t.pxToAU(v-o+$(m).outerWidth()),",").concat(t.pxToAU(_-s+$(m).outerHeight()),")")})}}return g},r=function e(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,o){var s=[].concat(u(a),[r[r.idProp||"id"]||o]);if(Array.isArray(r.children)&&r.children.length)e(r.children,s);else{var c=s.join("_"),l=$(".ac-panel");if(r.choices){var h=l.find(".ac-question[data-key=".concat(c,"] .ac-answer-box"))[0];h&&n.push(Object.assign(i(h),r.positionInfo||{}))}else if(r.essay)for(var d=t.editEssayList.find((function(t){return t.dataKey===c}))||{},f="number"===typeof d.row?0===d.row:0===r.essay.rowCount,p=f?l.find(".ac-question[data-key=".concat(c,"]")):l.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(c,"],"):"",".ac-essay__wrapper[data-key=").concat(c,"]").concat("area"===r.essay.range?" .ac-essay__area":"")),g=(t.bgUrlList.find((function(t){return t.dataKey===c}))||{}).bgUrls||[],m=0;m<p.length;m++){var y=i(p[m],!0);g[m]&&(y.backGroundImage=g[m]),n.push(Object.assign(y,r.positionInfo||{}))}else for(var v=l.find(".ac-question[data-key=".concat(c,"]")),_=0;_<v.length;_++){var b=i(v[_],!0);n.push(Object.assign(b,r.positionInfo||{}))}}}))},r(t.paperTree),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)})))()},pxToAU:function(t){var e="K"===this.sizeType?195:210;return Math.floor(t*e*8/294*100)/100},getAreaImages:function(){var t=this;return y(g().mark((function e(){var n,i,r,a;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=[],i=$(".ac-panel"),r=function e(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];r.forEach((function(r,o){var s=[].concat(u(a),[r[r.idProp||"id"]||o]);if(Array.isArray(r.children)&&r.children)e(r.children,s);else if(r.essay){var c=s.join("_"),l=t.editEssayList.find((function(t){return t.dataKey===c}))||{},h="number"===typeof l.row?0===l.row:0===r.essay.rowCount,d=l.title||r.essay.title;h?n.push({dataKey:c,domArr:i.find(".ac-question[data-key=".concat(c,"]"))}):d&&n.push({dataKey:c,domArr:i.find("".concat("hand"===t.readType?".ac-question[data-key=".concat(c,"],"):"",".ac-essay__wrapper[data-key=").concat(c,"]"))})}}))},r(t.paperTree),a=[],n.forEach((function(e){e.domArr.length&&a.push(new Promise((function(n,i){Object(q["d"])(e.domArr,4,"K"===t.sizeType?5200:5600).then((function(i){var r=i.map((function(t){return Object(q["a"])(t)})),a=[];r.forEach((function(e){var n=new t.UploadAdapter(e);a.push(n.upload())})),Promise.allSettled(a).then((function(t){t.forEach((function(t,e){var n;i[e]="fulfilled"===t.status?"https://".concat(null===t||void 0===t||null===(n=t.value)||void 0===n?void 0:n.url):""})),e.bgUrls=i,n()}))})).catch((function(){return n()}))})))})),e.next=8,Promise.allSettled(a);case 8:t.bgUrlList=n;case 9:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d,f;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),i=$(".ac-piece__wrapper"),r=1===t.registrationNumberType,a=new Bt.a,o="".concat(n,"模板_").concat(n,"_").concat(2===t.layout?"A3":"A4","_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(i.length,"_").concat(r?"涂点":"条码","_").concat(r?"10":"-1","_").concat(r?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(i).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=10,Object(q["d"])(s.map((function(t){return t.dom})),1);case 10:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]),o=r.length,c=new Uint8Array(o);while(o--)c[o]=r.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=14,a.generateAsync({type:"blob"});case 14:return l=e.sent,u="".concat(n,"模板.zip"),h=new File([l],u,{type:"zip"}),Pt()(l,u),d=new t.UploadAdapter(h),e.next=21,d.upload();case 21:return f=e.sent,e.abrupt("return","https://"+f.url);case 23:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),i=function(n,i){var r=$(n).offset(),a=r.left,o=r.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var r=$(n),s="absolute"===r.data("scan-type"),c={Type:"AnswerArea",Name:r.data("export_name"),Page:i,X:Math.floor(r.offset().left-(s?a:l)),Y:Math.floor(r.offset().top-(s?o:u)),Width:Math.ceil(r.outerWidth()),Height:Math.ceil(r.outerHeight())};"考号"===r.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},r=function(t,n){var i=$(t).find(".mark-point__top-left")[0],r=$(i).offset(),a=r.left,o=r.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var i=$(t),r={Type:"ReviewArea",Name:i.data("scan-name"),Page:n,X:i.offset().left-a,Y:i.offset().top-o,Width:i.outerWidth(),Height:i.outerHeight(),MaxScore:i.data("scan-score")};String(r.X).indexOf(".")>-1&&(r.X=Math.floor(r.X),r.Width+=1),String(r.Y).indexOf(".")>-1&&(r.Y=Math.floor(r.Y),r.Height+=1),r.Width=Math.ceil(r.Width),r.Height=Math.ceil(r.Height),e.push(r)}))};Array.from(n).forEach((function(t,e){i(t,"第".concat(e+1,"页")),r(t,"第".concat(e+1,"页"))}));var a='<?xml version="1.0" encoding="utf-8"?>';return a+='<answerSheet isNew="true" isYcProject="true" isYCLattice="true" layout="'.concat(this.layout,'">'),a+=this.getXMLStringFromArray(e),a+="</answerSheet>",a},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">")})).join("")}}},jt=Rt,Mt=Object(P["a"])(jt,d,f,!1,null,null,null),zt=Mt.exports,Nt=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-sweep"},[e("ac-sweep-virtual",{attrs:{tree:t.sweepPaperTree},on:{change:t.setDomList,"build-failed":t.buildFailed}}),e("ac-sweep-panel",{attrs:{"dom-list":t.domList}})],1)},Dt=[],$t=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__choice",t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom"],attrs:{"data-key":t.dataKey}},[Array.isArray(t.listData)?t._l(t.listData,(function(n,i){return e("div",{key:i,staticClass:"ac-sweep__choice-wrapper"},[e("ul",{class:["ac-sweep__choice-box"],style:{gridTemplateColumns:"repeat(".concat(n.questionsWidth.length,", auto)"),gridTemplateRows:"repeat(".concat(Math.ceil(n.questions.length/n.questionsWidth.length),", auto)"),gridAutoFlow:t.objectiveOrder}},t._l(n.questions,(function(n,r){return e("li",{key:"".concat(i,"_").concat(r),ref:"choiceEach_".concat(i,"_").concat(r),refInFor:!0,staticClass:"ac-sweep__choice-each"},[e("span",{staticClass:"choice-title",style:{width:t.isComplex?"50px":"20px"},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"".concat(i,"_").concat(r))}}},[t._v(" "+t._s(t.getBeforeChinese(n.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n.choices,(function(n,a){return e("span",{key:"".concat(i,"_").concat(r,"_").concat(a),staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])})),0)])})):[e("div",{staticClass:"ac-sweep__choice-wrapper"},[e("ul",{staticClass:"ac-sweep__choice-box"},[e("li",[e("span",{staticClass:"choice-title",attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,"0")}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,i){return e("span",{key:i,staticClass:"ac-sweep__choice-option"},[t._v(" "+t._s(n.identifier)+" ")])})),0)])])])]],2)},Ut=[],Ft={name:"AcSweepChoice",components:{},props:{list:{type:[Array,Object]},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isComplex:{type:Boolean,default:!1},dataKey:{type:[String,Number]}},computed:{layout:function(){return this.$store.getters["AC/layout"]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]}},watch:{objectiveOrder:function(t){this.convertTree(this.list)}},mounted:function(){this.convertTree(this.list)},data:function(){return{listData:null}},methods:{getBeforeChinese:function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(this.dataKey,"_").concat(e)})},convertTree:function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++){var i=t[n];"single_choice"===i.code?(0!==n&&"single_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i)):"multiple_choice"===i.code?(0!==n&&"multiple_choice"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i)):"judgment"===i.code&&(0!==n&&"judgment"===t[n-1].code||e.push({questions:[],questionsWidth:[]}),e[e.length-1].questions.push(i))}this.listData=e,this.getChoiceWidth(this.listData)}},getChoiceWidth:function(t){var e=this;t.forEach((function(t){t.questions.forEach((function(n){t.questionsWidth.push(6+(e.isComplex?50:20)+30*n.choices.length-8+28)}))})),this.listData.forEach((function(t){t.questionsWidth=e.designLayout(e.objectiveOrder,t.questionsWidth)}))},designLayout:function(t,e){var n=$(".ac-sweep__choice").innerWidth()-64,i=function(t){return t.reduce((function(t,e){return Math.max(t,e)}),0)},r=function(t){return t.reduce((function(t,e){return Math.min(t,e)}),n)},a=function(t,i){var r=[];return e.forEach((function(n,a){var o="row"===i?a%t:Math.floor(a/Math.ceil(e.length/t));r[o]=Math.max(r[o]||0,n)})),n-r.reduce((function(t,e){return t+e}),0)},o=i(e),s=r(e),c=Math.floor(n/o),l=c,u=!0;while(u){var h=a(l,t);h<s||l>=e.length?(u=!1,h<0&&(l-=1)):l+=1}var d=Array(l).fill("").map((function(n,i){return e.filter((function(n,r){if("row"===t)return r%l===i;var a=Math.ceil(e.length/l);return r<(i+1)*a&&r>=i*a}))}));return d}}},Ht=Ft,Kt=Object(P["a"])(Ht,$t,Ut,!1,null,null,null),Wt=Kt.exports;Wt.install=function(t){t.component(Wt.name,Wt)};var Vt=Wt,Zt=function(){var t=this,e=t._self._c;return e("div",{class:["ac-sweep__composite",t.lastOneClass,t.showBorder&&"is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"hide-border-top",t.isPaddingTop&&"is-padding-top"],style:{paddingBottom:"".concat(t.additionalPadding,"px")},attrs:{"data-key":t.dataKey,type:"composite","page-index":t.pageIndex}},[e("div",{ref:"compositeContent",staticClass:"ac-sweep__composite-title",domProps:{innerHTML:t._s(t.getTitle)}}),t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom"]}):t._e(),e("el-button",{staticClass:"edit-btn",attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}})],1)},Yt=[],Gt={name:"AcSweepComposite",components:{AcEditor:wt["default"]},inject:["paddingBlock"],props:{title:{type:String,default:""},blankNum:{type:Number,default:0},showBorder:{type:Boolean,default:!0},isShowBorderBottom:{type:Boolean,default:!1},isHideBorderTop:{type:Boolean,default:!1},dataKey:{type:String,default:""},isComplex:{type:Boolean,default:!1},isPaddingTop:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},ctnType:{type:String,default:"virtual"},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""},height:{type:Number,default:0}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]},getTitle:function(){var t=this;if("piece"===this.ctnType)return this.title;var e=this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{},n=new Array(this.blankNum).fill("").map((function(){return'<span style="display: inline-block; height: 40px; vertical-align: text-top; '.concat(t.isEntranceExams&&"color: #EB617E;",'"><u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u></span>')}));return e.title||'<span style="height: 40px;">'.concat(this.title,"</span>").concat(n.join("、"))},panelFlag:function(){return this.$store.getters["AC/panelFlag"]}},watch:{lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}}},mounted:function(){},data:function(){return{editorVisible:!1,editContent:"",additionalPadding:void 0,lastAdditionPadding:0}},methods:{getFullTitle:function(){var t=this;return(this.editTitleList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.$refs.compositeContent.innerHTML},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/paper/setEditTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,0),this.additionalPadding=e>0?e:0}}},Qt=Gt,Xt=Object(P["a"])(Qt,Zt,Yt,!1,null,null,null),Jt=Xt.exports;Jt.install=function(t){t.component(Jt.name,Jt)};var qt,te,ee=Jt,ne={name:"AcSweepComplex",components:{AcSweepChoice:Vt,AcSweepCompletion:ee,AcEssay:x["default"],AcEditor:wt["default"]},props:{list:{type:[Array,Object]},isShowBorderBottom:{type:Boolean,default:!1},dataKey:{type:String,default:""}},computed:{editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title}},watch:{},created:function(){this.init()},data:function(){return{listTree:null,editorVisible:!1,editContent:""}},methods:{init:function(){this.listTree=this.convertTree(this.list)},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},convertTree:function(t){for(var e=t.children,n=[],i=0;i<e.length;i++){var r=e[i];("single_choice"===r.code||"multiple_choice"===r.code||"judgment"===r.code)&&i<e.length-1&&("single_choice"===e[i+1].code||"multiple_choice"===e[i+1].code||"judgment"===e[i+1].code)?(n.push([r,e[i+1]]),i++):n.push(r)}return t.children=n,t},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.listTree.title},editTitle:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},getList:function(t){var e=this,n=this.$createElement;return t.map((function(t,i){return n("div",{key:"".concat(i,"_").concat(t[t.idProp||"id"]||""),class:!t.code&&!Array.isArray(t)&&"ac-sweep__virtual-section",attrs:{"data-key":t.dataKey,"question-code":t.code}},[Array.isArray(t.children)&&t.children.length&&"complex"!==t.code?n("div",{class:"ac-sweep__virtual-box"},[!t.code&&e.getTitle(t,t.dataKey),e.getList(t.children)]):n("div",[Array.isArray(t)||"single_choice"===t.code||"multiple_choice"===t.code||"judgment"===t.code?n("ac-sweep-choice",{props:A({},{list:t,showBorder:!1,dataKey:t.dataKey,isComplex:!0})}):null,"completion"===t.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(t.dataKey)),props:A({},Object.assign(t,{dataKey:t.dataKey,isComplex:!0,showBorder:!0}))}):null,"subjectivity"===t.code?n("ac-essay",{props:A({},Object.assign(t.essay,{title:e.getEssayTitle(t.dataKey,t.title),hiddenBorderBoth:!1}))}):null,"complex"===t.code?n("ac-sweep-complex",{props:A({},{list:t,dataKey:t.dataKey})}):null])])}))}},render:function(){var t=arguments[0];return t("div",{class:"ac-sweep__complex ".concat(this.isShowBorderBottom&&"is-border-bottom")},[this.listTree.title?t("p",{class:"ac-sweep__complex-title",on:{click:this.editTitle},domProps:{innerHTML:this.getLiContent?this.getLiContent:this.listTree.title}}):null,this.getList(this.listTree.children),t("ac-editor",{attrs:{visible:this.editorVisible,content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}})])}},ie=ne,re=Object(P["a"])(ie,qt,te,!1,null,null,null),ae=re.exports;ae.install=function(t){t.component(ae.name,ae)};var oe,se,ce=ae,le={name:"AcSweepVirtual",components:{AcSweepChoice:Vt,AcSweepCompletion:ee,AcSweepComplex:ce,AcEssay:x["default"],AcBasicInfo:Q["default"]},props:{tree:{type:Array,default:function(){return[]}}},computed:{sweepPaperTree:function(){return this.$store.getters["AC/sweepPaperTree"]},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},layout:function(){return this.$store.getters["AC/layout"]},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},readType:function(){return this.$store.getters["AC/readType"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},watch:{panelFlag:function(){var t=this;this.$nextTick((function(){return t.getDomList()}))}},updated:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},mounted:function(){var t=this;this.handleLatex().then((function(){return t.getDomList()}))},errorCaptured:function(){this.$emit("build-failed")},data:function(){return{}},methods:{handleLatex:function(){return J("math-virtual")||Promise.resolve()},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e})},getEditedKey:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).editKey||""},getEssayTitle:function(t,e){return(this.editEssayList.find((function(e){return e.dataKey===t}))||{}).title||e},getTitle:function(t,e){var n=this,i=this.$createElement,r=this.editTitleList.find((function(t){return t.dataKey===e}))||t,a=r.title;return i("div",{class:"ac-sweep__virtual-head",attrs:{contenteditable:!0,"data-key":e},domProps:{innerHTML:a},on:{blur:function(t){return n.handleBlur(t,e)}}})},getList:function(t){var e=this,n=this.$createElement;return t.map((function(i,r){return n("div",{key:"".concat(r,"_").concat(i[i.idProp||"id"]||""),class:!i.code&&!Array.isArray(i)&&"ac-sweep__virtual-section",attrs:{"data-key":i.dataKey||r,"question-code":i.code}},[Array.isArray(i.children)&&i.children.length&&"complex"!==i.code?n("div",{class:"ac-sweep__virtual-box"},[!i.code&&e.getTitle(i,i.dataKey||r),e.getList(i.children)]):n("div",[(e.layout>1?r%(2*e.layout)===0:e.patchwork?(r+1)%4===1:r%2===0)?n("ac-basic-info"):null,Array.isArray(i)||"single_choice"===i.code||"multiple_choice"===i.code||"judgment"===i.code?n("ac-sweep-choice",{props:A({},{list:i,isShowBorderBottom:r===t.length-1,dataKey:i.dataKey||r})}):null,"completion"===i.code?n("ac-sweep-completion",{key:"virtual_question_".concat(e.getEditedKey(i.dataKey)),props:A({},Object.assign({dataKey:i.dataKey},i,{isShowBorderBottom:r===t.length-1,isPaddingTop:t[r-1]&&"completion"!==t[r-1].code&&"complexTitle"!==t[r-1].code}))}):null,"subjectivity"===i.code?n("ac-essay",{props:A({},Object.assign(i.essay,{title:e.getEssayTitle(i.dataKey,i.title)}))}):null,"complex"===i.code?n("ac-sweep-complex",{props:A({},{list:i,isShowBorderBottom:r===t.length-1,dataKey:i.dataKey})}):null])])}))},splitDom:function(t){for(var e="",n=0,i=0,r=[],a=t.childNodes||[],o=0;o<a.length;o++){var s=a[o];if(-1===["P","DIV","IMG","FIGURE"].indexOf(s.nodeName))try{"#text"===s.nodeName?e+=s.textContent:e+=s.outerHTML}catch(f){}else{var c=getComputedStyle(s),l=Number(c.marginTop.replace("px",""))||0,u=Number(c.marginBottom.replace("px",""))||0,h=Object(q["e"])(s);r.length&&(h-=i),e+=s.outerHTML,n+=h+$(s).outerHeight()+l+u,r.push({content:e,height:n}),e="",n=0,i=Object(q["e"])(s)+$(s).outerHeight()+l+u}}if(e){var d=$(t).outerHeight();r.push({content:e,height:r.length?d-i:d})}return r},getDomList:function(){var t=this,e=function(e){e.forEach((function(e,n){var i=l.find(".ac-sweep__virtual-section[data-key=".concat(n,"]")),r=i.find(".ac-sweep__virtual-head")[0];r&&c.push({type:"sectionHead",height:t.editTitleList.find((function(t){return t.dataKey===n}))?t.editTitleList.find((function(t){return t.dataKey===n})).height:$(r).outerHeight(),content:r.innerHTML,dataKey:$(r).data("key")}),Array.isArray(e.children)&&e.children&&e.children.forEach((function(t,n){var r=t.dataKey,a=i.find("div[data-key=".concat(r,"]"))[0];s(t,a,!1,n===e.children.length-1,r)}))}))},n=function(e,n){var i=t.layout>2?520:808,r=function(t){return t.reduce((function(t,e){return Math.max(t,e.width)}),0)},a=function(t){return t.reduce((function(t,e){return Math.min(t,e.width)}),i)},o=function(t,e){var r=[];return n.forEach((function(i,a){var o="row"===e?a%t:Math.floor(a/Math.ceil(n.length/t));r[o]=Math.max(r[o]||0,i.width)})),i-r.reduce((function(t,e){return t+e}),0)},s=r(n),c=a(n),l=Math.floor(i/s),u=l,h=!0;while(h){var d=o(u,e);d<c||u>=n.length?(h=!1,d<0&&(u-=1)):u+=1}var f=Array(u).fill("").map((function(t,i){return n.filter((function(t,r){if("row"===e)return r%u===i;var a=Math.ceil(n.length/u);return r<(i+1)*a&&r>=i*a}))}));return f.forEach((function(t){var e=r(t);t.forEach((function(t){t.columnWidth=e}))})),f},i=function(e,i){if(Array.isArray(e)){for(var o=[],s=0;s<e.length;s++){var c=e[s];"single_choice"===c.code?(0!==s&&"single_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"multiple_choice"===c.code?(0!==s&&"multiple_choice"===e[s-1].code||o.push([]),o[o.length-1].push(c)):"judgment"===c.code&&(0!==s&&"judgment"===e[s-1].code||o.push([]),o[o.length-1].push(c))}var l=[],u=0;return o.forEach((function(e){e.forEach((function(e){var n=(t.editTitleList.find((function(t){return t.dataKey===e.dataKey}))||{}).title||e.title,i=r(n)?a(n):23;u=i>u?i:u})),e.forEach((function(t){t.titleWidth=u,t.width=t.titleWidth+6+30*t.choices.length-8+18}));for(var i=n(t.objectiveOrder,e),o=i[0].length,s=function(t){l.push(i.map((function(e){return e.find((function(e,n){return n===t}))})))},c=0;c<o;c++)s(c)})),l}},r=function(t){var e=o(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},a=function(t){var e=o(t).length;return e>6?56:6===e?48:e<6?40:void 0},o=function(t){var e=/[\u4e00-\u9fa5]/;if(t){var n=t.search(e);return-1===n?t:t.slice(0,n)}},s=function e(n,r,a,o,s){if(Array.isArray(n)){var l=i(n,a);l.forEach((function(t,e){c.push({height:0===e||l.length-1===e?39:24,type:"objective",isComplex:a,isShowBorderBottom:o,dataKey:s,list:t})}))}else switch(n.code){case"single_choice":case"multiple_choice":case"judgment":c.push(Object.assign({height:39,type:"objective",isComplex:a,isShowBorderBottom:o},n));break;case"completion":var u=$(r).find(".ac-sweep__composite-title")[0],h=t.splitDom(u);h.forEach((function(t){t.type="completionItem",t.isComplex=a})),h.length&&"graffiti"===t.readType&&(h[0].height+=16),"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"completion",isComplex:a,isShowBorderBottom:o,dataKey:n.dataKey,height:$(u).outerHeight(),children:h});break;case"subjectivity":var d=$(r).find(".ac-essay__title")[0];"graffiti"===t.readType&&c.push({type:"graffiti",height:30,scanName:n.scanName,score:n.score,isComplex:a,hideBottomBorder:!0,dataKey:n.dataKey,hidePadding:!0}),c.push({type:"essay",dataKey:s,essay:Object.assign({rowCount:4,dataKey:n.dataKey,isComplex:a,titleChildren:t.splitDom(d)},n.essay)});break;case"complex":var f=$(r).find(".ac-sweep__complex-title")[0];if(f){var p=t.splitDom(f);p.length&&(p[0].type="complexTitleItem"),c.push({type:n.title?"complexTitle":null,children:p})}n.children&&n.children.forEach((function(t,i){var a=$(r).find("div[data-key=".concat(t.dataKey,"]"));e(t,a,!0,i===n.children.length-1,t.dataKey)}));break}},c=[],l=$(".ac-virtual"),u=l.find(".ac-basicInfo");if(u){var h=u.find(".ac-basicInfo__title"),d=u.find(".ac-attention"),f=u.find(".ac-basic-info__edu");c.push({type:"basicInfo",headHeight:null===h||void 0===h?void 0:h.outerHeight(),attentionHeight:null===d||void 0===d?void 0:d.outerHeight(),eduHeight:null===f||void 0===f?void 0:f.outerHeight()})}e(this.tree),this.$emit("change",c)}},render:function(){var t=arguments[0];return t("div",{class:"ac-virtual",attrs:{id:"math-virtual"},style:{width:this.$store.getters["AC/layout"]>2?"690px":"978px"}},[this.getList(this.tree)])}},ue=le,he=Object(P["a"])(ue,oe,se,!1,null,null,null),de=he.exports;de.install=function(t){t.component(de.name,de)};var fe=de,pe=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-panel"},[t._l(t.formatPanelList,(function(n,i){return e("div",{key:i,staticClass:"ac-panel__item"},[e("div",{staticClass:"ac-piece__wrapper",attrs:{"data-page-type":n.flat().length?"":"restrict"}},[n.length?t._l(n,(function(n,r){return e("ac-sweep-piece",{key:r,attrs:{"data-piece":i*t.layout+r,"data-page":i,list:n,"page-index":i,"outlay-index":"".concat(i,"_").concat(r)}})})):e("div",{staticClass:"ac-piece"},[e("ac-restrict",{attrs:{height:1250}})],1),e("ac-mark-point",{attrs:{"page-index":i}}),t.isAddFooter?e("div",{staticClass:"ac-piece__footer",style:t.isEntranceExams&&{bottom:"42px",left:"140px"}},[t.isEntranceExams?e("span",[t._v(t._s(t.courseName))]):t._e(),t._v(" "+t._s("第".concat(i+1,"页,共").concat(t.formatPanelList.length,"页"))+" ")]):t._e()],2)])})),e("ac-editor",{attrs:{visible:t.visible,content:t.editing.content||""},on:{"update:visible":function(e){t.visible=e},submit:t.handleSubmit}})],2)},ge=[],me=n("2638"),ye=n.n(me),ve=function(){var t=this,e=t._self._c;return e("div",{class:["objective","is-border",t.isShowBorderBottom&&"is-border-bottom",t.isHideBorderTop&&"is-hide_Border-top",t.lastOneClass],style:{paddingBottom:"".concat(t.additionalPadding,"px")},attrs:{"data-key":Array.isArray(t.list)?t.list[0].list[0].dataKey:t.list.dataKey||t.list.list[0].dataKey,"data-objective_area":"客观题区域","page-index":t.pageIndex,"data-scan-type":"absolute"}},[t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom"]}):t._e(),t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom"]}):t._e(),Array.isArray(t.list)?t._l(t.list,(function(n,i){return e("div",{key:i,class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},[n.list?t._l(n.list,(function(r,a){return e("div",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-each",style:{width:r&&"".concat(r.columnWidth,"px"),height:r&&"".concat(t.handleHeight(n.height),"px"),lineHeight:r&&"".concat(24,"px"),paddingTop:"".concat(0===i&&t.handleHeight(n.height)-24,"px"),whiteSpace:"nowrap"},attrs:{"data-key":r&&r.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:r&&"".concat(r.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,r.dataKey)}}},[t._v(" "+t._s(r&&t.getBeforeChinese(r.title,r.dataKey))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(r&&r.choices,(function(n,o){return e("span",{key:"".concat(i,"_").concat(a,"_").concat(o),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==r.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])})):t._l([n],(function(n,i){return e("div",{key:"".concat(i),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(t.handleHeight(n.height,2),"px"),lineHeight:n&&"".concat(t.handleHeight(n.height,2),"px"),whiteSpace:"nowrap",paddingTop:"15px",paddingBottom:"15px"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&"".concat(n.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title,n.dataKey))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(r,a){return e("span",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==n.code?r.identifier:t.judgmentMode?"T"===r.identifier?"✓":"×":r.identifier)+" ")])})),0)])}))],2)})):[t.list.list?e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap"}},t._l(t.list.list,(function(n,i){return e("div",{key:"".concat(i),staticClass:"ac-sweep__choice-each",style:{width:n&&"".concat(n.columnWidth,"px"),height:n&&"".concat(t.handleHeight(t.list.height,2),"px"),lineHeight:n&&"".concat(t.handleHeight(t.list.height,2),"px"),whiteSpace:"nowrap"},attrs:{"data-key":n&&n.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:n&&"".concat(n.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,n.dataKey)}}},[t._v(" "+t._s(n&&t.getBeforeChinese(n.title,n.dataKey))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(n&&n.choices,(function(r,a){return e("span",{key:"".concat(i,"_").concat(a),staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==n.code?r.identifier:t.judgmentMode?"T"===r.identifier?"✓":"×":r.identifier)+" ")])})),0)])})),0):e("div",{class:["ac-sweep__choice-wrapper"],style:{display:"flex",flexWrap:"wrap",paddingLeft:0===t.answerMode&&"40px"}},[e("div",{staticClass:"ac-sweep__choice-each",style:{width:"".concat(t.list.columnWidth,"px"),height:"".concat(t.handleHeight(t.list.height,2),"px"),lineHeight:"".concat(t.handleHeight(t.list.height,2),"px"),whiteSpace:"nowrap"},attrs:{"data-key":t.list.dataKey,type:"objective","page-index":t.pageIndex}},[e("span",{staticClass:"choice-title",style:{width:"".concat(t.list.titleWidth,"px")},attrs:{contenteditable:""},on:{blur:function(e){return t.handleBlur(e,t.list.dataKey)}}},[t._v(" "+t._s(t.getBeforeChinese(t.list.title,t.list.dataKey))+" ")]),e("div",{staticClass:"ac-sweep__choice-item"},t._l(t.list.choices,(function(n,i){return e("span",{key:i,staticClass:"ac-sweep__choice-option",style:{color:t.isEntranceExams?"#EB617E":"#000000"}},[t._v(" "+t._s("judgment"!==t.list.code?n.identifier:t.judgmentMode?"T"===n.identifier?"✓":"×":n.identifier)+" ")])})),0)])])]],2)},_e=[],be={name:"AcObjective",components:{},inject:["paddingBlock"],props:{list:{type:[Array,Object]},isHideBorderTop:{type:Boolean,default:!1},isShowBorderBottom:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},computed:{objectiveOrder:function(){return this.$store.getters["AC/objectiveOrder"]},judgmentMode:function(){return this.$store.getters["AC/judgmentMode"]},layout:function(){return this.$store.getters["AC/layout"]},answerMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},handleHeight:function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t>24?t-e:t}},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]}},watch:{lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}}},mounted:function(){},data:function(){return{additionalPadding:void 0,lastAdditionPadding:0}},methods:{getBeforeChinese:function(t,e){var n=/[\u4e00-\u9fa5]/,i=(this.editTitleList.find((function(t){return t.dataKey===e}))||{}).title||t;if(i){var r=i.search(n);if(-1===r)return i;var a=i.slice(0,r);return a.endsWith(".")?a.slice(0,-1):a}},isHasBrackets:function(t){var e=this.getBeforeChinese(t),n=/[\u4e00-\u9fa5()()]/;return n.test(e)},convertWidth:function(t){var e=this.getBeforeChinese(t).length;return e>6?56:6===e?48:e<6?40:void 0},handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:"".concat(e)})},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(q["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,0),this.additionalPadding=e>0?e:void 0}}},we=be,Ce=Object(P["a"])(we,ve,_e,!1,null,null,null),Ae=Ce.exports;Ae.install=function(t){t.component(Ae.name,Ae)};var xe,Ee,ke=Ae,Te={name:"AcSweepPiece",components:{AcEssay:x["default"],AcBasicInfo:Q["default"],AcSweepCompletion:ee,AcObjective:ke,AcEditor:wt["default"],AcRestrict:gt,AcGraffiti:G["default"]},props:{list:{type:Array,default:function(){return[]}},pageIndex:{type:Number,default:0},outlayIndex:{type:String,default:""}},computed:{pieceHeight:function(){return"1386px"},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return e.title},editTitleList:function(){return this.$store.getters["AC/editTitleList"]||[]},sweepList:function(){return this.transformTree(this.list)},layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},data:function(){return{editorVisible:!1,editContent:"",completionIsLastOne:!1}},methods:{handleBlur:function(t,e){var n;this.$store.dispatch("AC/paper/setEditTitle",{title:null===(n=t.target)||void 0===n?void 0:n.innerHTML,dataKey:e,height:t.target.offsetHeight}),this.$store.dispatch("AC/paper/resetPanel")},editTitle:function(t){var e=this;this.editContent=(this.editEssayList.find((function(t){return t.dataKey===e.dataKey}))||{}).title||t,this.editorVisible=!0},getPlainTitle:function(t){return(this.editTitleList.find((function(e){return e.dataKey===t}))||{}).title||""},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.editorVisible=!1},transformTree:function(t){var e=this,n=new Set(["objective"]);return t.reduce((function(i,r,a){r.children&&(r.children=e.transformTree(r.children));var o=i[i.length-1];return o&&n.has(t[a-1].type)&&n.has(r.type)?(Array.isArray(o)?o.push(r):i[i.length-1]=[o,r],i):(i.push(r),i)}),[])},getContent:function(t,e){var n=this,i=this.$createElement,r=null;switch(!0){case"basicInfo"===t.type:r=i("ac-basic-info",{props:A({},t)});break;case"complexTitle"===t.type:r=i("div",{class:"ac-sweep__complex",style:{borderBottom:this.sweepList.length-1===e&&"1px solid #000"}},[i("p",{class:"ac-sweep__complex-title",on:{click:function(){return n.editTitle(t.content[0])}},domProps:{innerHTML:this.getLiContent?this.getLiContent:t.content[0]}})]);break;case"sectionHead"===t.type:r=i("div",{class:"ac-sweep__head-wrapper"},[i("div",{class:"ac-sweep__virtual-head",style:{marginTop:"".concat(t.height>=51?0===e?0:5:t.height-46,"px")},attrs:{contenteditable:!0,dataKey:t.dataKey},domProps:{innerHTML:t.content},on:{blur:function(e){return n.handleBlur(e,t.dataKey)}}}),i("div",{class:"".concat(this.isEntranceExams&&"entrance-border"," ").concat(this.isEntranceExams&&this.layout>2&&"three-column_border"," ").concat(this.isEntranceExams&&0===e&&"show-border_top"," ").concat(this.isEntranceExams&&this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type&&"show-border_word-top")}),i("div",{class:"".concat(this.isEntranceExams&&"entrance-outline"," ").concat(this.isEntranceExams&&this.layout>2&&"three-column_outline"," ").concat(this.isEntranceExams&&0===e&&"show-outline_top"," ").concat(this.isEntranceExams&&this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type&&"show-outline_word-top")})]);break;case"graffiti"===t.type:r=i("ac-graffiti",{props:A({},Object.assign(t,{hideTopBorder:this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type}))});break;case"completion"===t.type:r=i("ac-sweep-completion",{props:A({},Object.assign(t,{ctnType:"piece",dataKey:t.dataKey,title:t.content[0],isHideBorderTop:0!==e&&this.sweepList[e-1]&&["completion","complexTitle"].includes(this.sweepList[e-1].type)&&!(t.isComplex&&"0"===t.dataKey[t.dataKey.length-1]),isPaddingTop:0==e||this.sweepList[e-1]&&"completion"!==this.sweepList[e-1].type&&"complexTitle"!==this.sweepList[e-1].type||t.isComplex&&"0"===t.dataKey[t.dataKey.length-1],pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type),isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:e===this.sweepList.length-1,lastOneClass:e===this.sweepList.length-1?"piece-composite".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null}))});break;case"objective"===t.type||Array.isArray(t):r=i("ac-objective",{props:A({},{list:t,isHideBorderTop:0!==e&&this.sweepList[e-1]&&"essay"===this.sweepList[e-1].type,pageIndex:this.pageIndex+1,isShowBorderBottom:e===this.sweepList.length-1||!!this.sweepList[e+1]&&["sectionHead","restrict"].includes(this.sweepList[e+1].type),isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:e===this.sweepList.length-1,lastOneClass:e===this.sweepList.length-1?"piece-objective".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null})});break;case"essay"===t.type:r=i("ac-essay",{key:"essay_".concat(e),attrs:{"data-key":t.essayConfig.dataKey||"","page-index":this.pageIndex+1,"row-height":34,"li-editable":!0},props:A({},A(A({},t.essayConfig),{},{hiddenBorderTop:0!==e&&"complexTitle"===this.sweepList[e-1].type,hiddenBorderBottom:e!==this.sweepList.length-1&&this.sweepList[e+1]&&("essay"===this.sweepList[e+1].type||"completion"===this.sweepList[e+1].type||"complexTitle"===this.sweepList[e+1].type),column:3===this.layout?15:23,isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,isLastOne:0===this.acMode&&e===this.sweepList.length-1,lastOneClass:0===this.acMode&&e===this.sweepList.length-1?"piece-essay".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null}))});break;case"restrict"===t.type:r=i("ac-restrict",{props:A({},{height:t.height,marginTop:20,isLastOne:e===this.sweepList.length-1,isFirst:0===e,isShowTipWord:this.sweepList[e-1]&&"basicInfo"===this.sweepList[e-1].type,lastOneClass:0===this.acMode&&e===this.sweepList.length-1?"piece-restrict".concat(Date.now().toString(36),"_").concat(this.outlayIndex):null})});break}return r}},render:function(){var t=this,e=arguments[0];return e("div",{class:"ac-piece",style:{display:"flex",justifyContent:"center",height:this.pieceHeight}},[e("div",{class:this.$store.getters["AC/layout"]>2?"ac-module__ThreeColumn":"ac-module__column",style:"height: calc(100% - 5px)"},[this.sweepList.length?this.sweepList.map((function(e,n){return t.getContent(e,n)})):e("ac-restrict",{props:A({},{height:1250})}),e("ac-editor",ye()([{attrs:{visible:this.editorVisible}},{on:{"update:visible":function(e){return t.editorVisible=e}}},{attrs:{content:this.editContent,title:"编辑答题区",editorId:"essay-editor_".concat(Date.now().toString(36))},on:{submit:this.handleSubmit}}]))])])}},Se=Te,Ie=Object(P["a"])(Se,xe,Ee,!1,null,null,null),Oe=Ie.exports;Oe.install=function(t){t.component(Oe.name,Oe)};var Be=Oe,Le={name:"AcSweepPanel",components:{AcSweepPiece:Be,AcEditor:wt["default"],AcMarkPoint:Ct["default"],AcRestrict:gt},inject:["courseName"],props:{domList:{type:Array,default:function(){return[]}}},computed:{formatPanelList:function(){var t=this,e=[];if(this.panelList.length)if(this.panelList.forEach((function(n,i){i%t.layout===0?e.push([n]):e[e.length-1].push(n)})),1===this.layout&&e.length%2)e.push([]);else if(2===this.layout)e[e.length-1].length%2&&e[e.length-1].push([]),(1===e.length||e.length%2)&&e.push(u(Array(2).fill([])));else if(3===this.layout){var n;3!==e[e.length-1].length&&(n=e[e.length-1]).push.apply(n,u(Array(3-e[e.length-1].length).fill([]))),(1===e.length||e.length%2)&&e.push(u(Array(3).fill([])))}return e},pieceHeight:function(){return 1245},panelFlag:function(){return this.$store.getters["AC/panelFlag"]},showAttention:function(){return this.$store.getters["AC/showAttention"]},patchwork:function(){return this.$store.getters["AC/patchwork"]},showEducationId:function(){return this.$store.getters["AC/showEducationId"]},readType:function(){return this.$store.getters["AC/readType"]},scansionAttention:function(){return this.$store.getters["AC/scansionAttention"]},stuInfoLength:function(){return this.$store.getters["AC/studentInfo"].length},eduIdLength:function(){return this.$store.getters["AC/educationIdValue"]},registrationType:function(){return this.$store.getters["AC/registrationNumberType"]},layout:function(){return this.$store.getters["AC/layout"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},isAddFooter:function(){return this.$store.getters["AC/addFooter"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]}},watch:{domList:function(t){t.length&&this.getPanelList()}},mounted:function(){},data:function(){return{panelList:[],visible:!1,editing:{},headHeight:0,attentionHeight:0,eduHeight:0}},methods:{getRowCount:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.row?n.row:e},getBgType:function(t,e){var n=this.editEssayList.find((function(e){return e.dataKey===t}))||{};return"number"===typeof n.bgType?n.bgType:e},handleSubmit:function(t){var e=this.editing,n=e.dataKey,i=e.hasChoice,r={dataKey:n};if(i){var a=t.match(/<(p.*?\/p|figure.*?\/figure)>/g),o=/>[A-O]{1}[.\s.、]{0,1}/,s="",c=[],l=null;a.forEach((function(t){var e=t.match(o);if(e){var n=t.replace(o,">");l={identifier:e[0][1],content:"<p></p>"===n?"":n},c.push(l)}else l?l.content+=t:s+=t})),Object.assign(r,{title:s,choices:c})}else r.title=t;this.$store.dispatch("AC/paper/setEditTitle",r)},getBasicInfo:function(t){var e=null;return(this.layout>1?t%(2*this.layout)===0:this.patchwork?(t+1)%4===1:t%2===0)&&(e={hideAttention:!this.showAttention||0!==t,height:this.headHeight+(this.isEntranceExams?this.layout<3?this.attentionHeight:0:this.showAttention&&0===t?this.attentionHeight:0)+this.eduHeight+(this.isEntranceExams?50:0)}),e},getPanelList:function(){var t=this,e=[],n=0;e[n]=[];var i=this.pieceHeight,r=e[n],a=[],o=function(){var e=t.getBasicInfo(n);e&&(i-=e.height,r.push(Object.assign({type:"basicInfo"},e)))},s=function(){var a=e[n];if(n++,e[n]=[],i=t.pieceHeight,r=e[n],o(),"graffiti"===a[a.length-1].type){var s=a[a.length-1];a.pop(),r.push(s),i-=30}if("sectionHead"===a[a.length-1].type){var c=a[a.length-1];c.height>46&&(c.height-=5),c.isMarginTop=!1,a.pop(),r.length?"basicInfo"===r[0].type?r.splice(1,0,c):r.unshift(c):r.push(c),i-=c.height}},c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:34,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=i-(n?62:30);return Math.floor((r+e)/(t+e))},l=function(t,e){var n="",i="",a=t.map((function(t){var e="";switch(t.type){case"completion":n="completion",i=t.height+1,e="".concat(t.children.join(""));break;case"complexTitle":n="complexTitle",i=t.height,e="".concat(t.children.join(""));break}return e}));t.length=0,r.push({height:i,type:n,isComplex:e.isComplex,isShowBorderBottom:e.isShowBorderBottom,dataKey:e.dataKey,content:a})},u=function(e,n,a){e.forEach((function(e){if("completionItem"===e.type){var o=r[r.length-1]||{};(!["completion","graffiti"].includes(o.type)||!["graffiti"].includes(o.type)&&a.isComplex&&"0"===a.dataKey[a.dataKey.length-1])&&(e.height+=16)}if(i<e.height&&(n.length&&l(n,a),s()),i>=e.height){switch("graffiti"===t.readType||r.length||"completion"!==a.type||(e.height+=16),e.type){case"completionItem":n.length&&"completion"===n[n.length-1].type?n[n.length-1].children.push(e.content):n.push({type:"completion",height:e.height,children:[e.content]});break;case"complexTitleItem":n.length&&"complexTitle"===n[n.length-1].type?n[n.length-1].children.push(e.content):n.push({type:"complexTitle",height:e.height,children:[e.content]});break}i-=e.height}}))},h=function(e,n){var a=e.rowHeight,o=void 0===a?34:a,l=e.rowGap,u=void 0===l?15:l,h=e.titleChildren,d=t.getRowCount(n,e.rowCount),f=t.getBgType(n,e.bgType);i<30&&s();var p={type:"essay"};if(h){var g="";h.forEach((function(t,n){i>=t.height+(n?0:32)?(g+=t.content,i-=t.height+(n?0:32)):(g&&r.push({type:"essay",essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d,bgType:f})}),s(),g=t.content,i-=t.height+32)})),g?Object.assign(p,{essayConfig:Object.assign({},e,{row:0,title:g,rowCount:d})}):p=null}else p=null;if(d){var m=d;while(m){var y=c(o,u,!p);y<1?(p&&(r.push(p),p=null),s()):y<m?(r.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:y,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),p&&(p=null),s(),m-=y):(r.push({type:"essay",essayConfig:Object.assign({},e,{startRow:d-m,row:m,rowCount:d,bgType:f,title:p&&p.essayConfig?p.essayConfig.title:""})}),i-=m*(o+u)-u+(p?30:62),m=0,p&&(p=null))}}else p?r.push(p):(r.push({type:"essay",essayConfig:Object.assign({},e,{rowCount:0,row:0,bgType:f})}),i-=30)},d=JSON.parse(JSON.stringify(this.domList));d.forEach((function(e,n){"essay"===e.type?h(e.essay,e.dataKey):"complexTitle"===e.type||"completion"===e.type?(u(e.children,a,e),a.length&&l(a,e)):"basicInfo"===e.type?(t.headHeight=e.headHeight||0,t.attentionHeight=t.scansionAttention.height||e.attentionHeight||0,t.isEntranceExams?t.eduHeight=e.eduHeight:t.registrationType?t.layout<3?t.eduHeight=t.eduIdLength>10?48*Math.ceil(t.stuInfoLength/3)+30+310:310:t.eduHeight=48*Math.ceil(t.stuInfoLength/3)+14+310:t.eduHeight=t.layout<3?310:48*Math.ceil(t.stuInfoLength/3)+310,o()):(i<e.height&&s(),i>=e.height&&("sectionHead"===e.type&&"basicInfo"!==d[n-1].type&&(e.height+=5,e.isMarginTop=!0),r.push(e),i-=e.height))})),i>54&&e[e.length-1].push({type:"restrict",height:i-25}),e.length>16&&1===this.layout&&(this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",2),this.$store.dispatch("AC/answerConfig/setDisableOneLayout",!0)),this.panelList=e}}},Pe=Le,Re=Object(P["a"])(Pe,pe,ge,!1,null,null,null),je=Re.exports;je.install=function(t){t.component(je.name,je)};var Me=je,ze={name:"AcSweep",components:{AcSweepVirtual:fe,AcSweepPanel:Me},inject:["uploadOss","paperTitle"],data:function(){return{domList:[],sweepPaperTree:[],isFirstRender:!0}},computed:{educationIdValue:function(){return this.$store.getters["AC/educationIdValue"]},registrationNumberType:function(){return this.$store.getters["AC/registrationNumberType"]},candidateNumColor:function(){return this.$store.getters["AC/candidateNumColor"]},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},readType:function(){return this.$store.getters["AC/readType"]},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},UploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(v["a"])(this,e),this.file=t}return Object(_["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){t(e.file,n)}))}}]),e}()},patchwork:function(){return this.$store.getters["AC/patchwork"]},downloadType:function(){return this.$store.getters["AC/downloadType"]},downloadSize:function(){return this.$store.getters["AC/downloadSize"]}},created:function(){this.init()},methods:{init:function(){this.sweepPaperTree=this.transformTree(this.createDataKey(this.$store.getters["AC/sweepPaperTree"]))},createDataKey:function(t){var e=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";e.forEach((function(e,i){var r=n?"".concat(n,"_").concat(i):"".concat(i);e.code&&(e.dataKey=r),e.children&&t(e.children,r)}))};return e(t),t},transformTree:function(t){var e=this,n=new Set(["single_choice","multiple_choice","judgment"]);return t.reduce((function(i,r,a){r.children&&(r.children=e.transformTree(r.children));var o=i[i.length-1];return o&&n.has(t[a-1].code)&&n.has(r.code)?(Array.isArray(o)?o.push(r):i[i.length-1]=[o,r],i):(i.push(r),i)}),[])},setDomList:function(t){this.domList=t,this.isFirstRender=!1},buildFailed:function(){this.isFirstRender&&this.$emit("build-failed")},getPageImage:function(){return new Promise((function(t,e){var n=$(".ac-panel .ac-piece__wrapper");Object(q["d"])(n).then((function(e){return t(e)})).catch((function(){return t([])}))}))},download:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!($(".ac-piece__wrapper").length>16)){e.next=3;break}return t.$message({showClose:!0,message:"涂点形式答题卡不能超过16页,请更换调整作答区域或更换试卷",type:"error"}),e.abrupt("return");case 3:return e.next=5,t.getZipContent();case 5:if(n=e.sent,i=n||"","PDF"!==t.downloadType){e.next=25;break}return e.next=10,t.getPageImage();case 10:return r=e.sent,a=new It.a(1===t.layout?"p":"l","pt",1===t.layout?"a4":"a3"),r.forEach((function(e,n){var i=1===t.layout?595.28:1190.55,o=841.89;a.addImage(e,"JPEG",0,0,i,o),n!==r.length-1&&a.addPage()})),o="".concat(t.$store.getters["AC/title"].replace(/\n/g,""),".pdf"),a.save(o),s=a.output("blob"),s.name=o,c=new t.UploadAdapter(s),e.next=20,c.upload();case 20:return l=e.sent,u="https://"+l.url,e.abrupt("return",{scanZipUrl:i,scanPdfUrl:u});case 25:if("PNG"!==t.downloadType){e.next=31;break}return e.next=28,t.getPngZip();case 28:return h=e.sent,d=h||"",e.abrupt("return",{scanZipUrl:i,scanPdfUrl:d});case 31:case"end":return e.stop()}}),e)})))()},getZipContent:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h,d,f;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),n=n.replace(/[/,\\]/g,""),i=$(".ac-piece__wrapper"),r=1===t.registrationNumberType,a=new Bt.a,o="".concat(n,"模板_").concat(n,"_").concat(t.downloadSize,"_").concat("#000000"===t.candidateNumColor?"黑白":"彩色","_").concat(i.length,"_").concat(r?"涂点":"条码","_").concat(r?"10":"-1","_").concat(r?t.educationIdValue:"-1","_涂点_涂点.xml"),a.file(o,t.getXMLData()),s=[],Array.from(i).forEach((function(t,e){s.push({dom:t,name:"".concat(e+1,".png")}),e%2||(s.push({dom:$(t).find(".mark-point__top-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoshang.jpg")}),s.push({dom:$(t).find(".mark-point__top-right .mark-point__box")[0],name:"第".concat(e+1,"页_youshang.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-left .mark-point__box")[0],name:"第".concat(e+1,"页_zuoxia.jpg")}),s.push({dom:$(t).find(".mark-point__bottom-right .mark-point__box")[0],name:"第".concat(e+1,"页_youxia.jpg")}))})),e.next=11,Object(q["d"])(s.map((function(t){return t.dom})),1);case 11:return c=e.sent,c.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]),o=r.length,c=new Uint8Array(o);while(o--)c[o]=r.charCodeAt(o);a.file(s[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=15,a.generateAsync({type:"blob"});case 15:return l=e.sent,u="".concat(n,"模板.zip"),h=new File([l],u,{type:"zip"}),Pt()(l,u),d=new t.UploadAdapter(h),e.next=22,d.upload();case 22:return f=e.sent,e.abrupt("return","https://"+f.url);case 24:case"end":return e.stop()}}),e)})))()},getPngZip:function(){var t=this;return y(g().mark((function e(){var n,i,r,a,o,s,c,l,u,h;return g().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.paperTitle.replace(/[_]/g,"-"),n=n.replace(/[/,\\]/g,""),i=$(".ac-piece__wrapper"),r=new Bt.a,a=[],Array.from(i).forEach((function(t,e){a.push({dom:t,name:"".concat(e+1,".png")})})),e.next=8,Object(q["d"])(a.map((function(t){return t.dom})));case 8:return o=e.sent,o.forEach((function(t,e){var n=t.split(","),i=n[0].match(/:(.*?);/)[1],o=atob(n[1]),s=o.length,c=new Uint8Array(s);while(s--)c[s]=o.charCodeAt(s);r.file(a[e].name,new Blob([c],{type:i}),{base64:!0})})),e.next=12,r.generateAsync({type:"blob"});case 12:return s=e.sent,c="".concat(n,".zip"),l=new File([s],c,{type:"zip"}),Pt()(s,c),u=new t.UploadAdapter(l),e.next=19,u.upload();case 19:return h=e.sent,e.abrupt("return","https://"+h.url);case 21:case"end":return e.stop()}}),e)})))()},getXMLData:function(){var t=this,e=[],n=$(".ac-piece__wrapper"),i=function(n,i){var r=$(n).offset(),a=r.left,o=r.top,s=$(n).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h=$(n).find("[data-export_name]");Array.from(h).forEach((function(n){var r=$(n),s="absolute"===r.data("scan-type"),c={Type:"AnswerArea",Name:r.data("export_name"),Page:i,X:Math.floor(r.offset().left-(s?a:l)),Y:Math.floor(r.offset().top-(s?o:u)),Width:r.outerWidth(),Height:r.outerHeight()};String(c.X).indexOf(".")>-1&&(c.X=Math.floor(c.X),c.Width+=1),String(c.Y).indexOf(".")>-1&&(c.Y=Math.floor(c.Y),c.Height+=1),c.Width=Math.ceil(c.Width),c.Height=Math.ceil(c.Height),"考号"===r.data("export_name")&&(c.Rows=10,c.Columns=t.educationIdValue),e.push(c)}))},r=function(t,n){var i=$(t).find(".mark-point__top-left")[0],r=$(i).offset(),a=r.left,o=r.top,s=$(t).find("[data-scan-type=review]");Array.from(s).forEach((function(t){var i=$(t),r={Type:"ReviewArea",Name:i.data("scan-name"),Page:n,X:i.offset().left-a,Y:i.offset().top-o,Width:i.outerWidth(),Height:i.outerHeight(),MaxScore:i.data("scan-score")};String(r.X).indexOf(".")>-1&&(r.X=Math.floor(r.X),r.Width+=1),String(r.Y).indexOf(".")>-1&&(r.Y=Math.floor(r.Y),r.Height+=1),r.Width=Math.ceil(r.Width),r.Height=Math.ceil(r.Height),e.push(r)}))},a=[],o=function(t,e){var i=n.find(".ac-sweep__choice-each[data-key=".concat(t.dataKey,"]"))[0],r=($(i).find(".choice-title")[0],$(i).find(".ac-sweep__choice-item")[0]),o=i.getAttribute("page-index"),s=$(e[o-1]).find(".mark-point__top-left")[0],c=$(s).offset(),l=c.left,u=c.top,h={Type:"AnswerArea",Name:t.scanName,Page:"第".concat(o,"页"),X:$(r).offset().left-l+5,Y:$(r).offset().top-u-1,Width:$(r).outerWidth()-3,Height:$(r).outerHeight()+3,Rows:1,Columns:t.choices.length,Horizon:0};String(h.X).indexOf(".")>-1&&(h.X=Math.floor(h.X),h.Width+=1),String(h.Y).indexOf(".")>-1&&(h.Y=Math.floor(h.Y),h.Height+=1),h.Width=Math.ceil(h.Width),h.Height=Math.ceil(h.Height),a.push(h)},s=function t(e){var i=$(".ac-piece__wrapper");e.forEach((function(e){if(e.children)t(e.children);else if("completion"===e.code)for(var r=n.find(".ac-sweep__composite[data-key=".concat(e.dataKey,"]")),s=0;s<r.length;s++){var c=r[s].getAttribute("page-index"),l=$(i[c-1]).find(".mark-point__top-left")[0],u=$(l).offset(),h=u.left,d=u.top,f={Type:"AnswerArea",Name:"".concat(e.scanName).concat(s>0?"_"+s:""),Page:"第".concat(c,"页"),X:Math.floor($(r[s]).offset().left-h),Y:Math.floor($(r[s]).offset().top-d),Width:Math.ceil($(r[s]).outerWidth()),Height:Math.ceil($(r[s]).outerHeight())};a.push(f)}else if(Array.isArray(e)||"single_choice"===e.code||"multiple_choice"===e.code||"judgment"===e.code)Array.isArray(e)?e.forEach((function(t){o(t,i)})):o(e,i);else if("subjectivity"===e.code)for(var p=n.find(".ac-essay__wrapper[data-key=".concat(e.dataKey,"]")),g=0;g<p.length;g++){var m=p[g].getAttribute("page-index"),y=$(i[m-1]).find(".mark-point__top-left")[0],v=$(y).offset(),_=v.left,b=v.top,w={Type:"AnswerArea",Name:"".concat(e.scanName).concat(g>0?"_"+g:""),Page:"第".concat(m,"页"),X:Math.floor($(p[g]).offset().left-_),Y:Math.floor($(p[g]).offset().top-b),Width:Math.ceil($(p[g]).outerWidth()),Height:Math.ceil($(p[g]).outerHeight())};a.push(w)}}))};s(this.sweepPaperTree);var c=function(t){var e={};return t.forEach((function(t){var n=t.Page;e[n]||(e[n]=[]),e[n].push(t)})),Object.values(e)},l=c(a);Array.from(n).forEach((function(t,n){"restrict"!==$(t).data("piece-type")&&(i(t,"第".concat(n+1,"页")),r(t,"第".concat(n+1,"页")),Array.isArray(l[n])?e.push.apply(e,u(l[n])):e.push(l[n]))}));var h='<?xml version="1.0" encoding="utf-8"?>';return h+='<answerSheet isNew="true" isYcProject="true" layout="'.concat(this.layout,'" isScrabbled="').concat(this.patchwork,'">'),h+=this.getXMLStringFromArray(e),h+="</answerSheet>",h},getXMLStringFromArray:function(t){var e=function(t){return Object.keys(t).map((function(e){return"Type"!==e?"<".concat(e,">").concat(t[e],"</").concat(e,">"):""})).join("")};return t.map((function(t){return t?"<".concat(t.Type,">").concat(e(t),"</").concat(t.Type,">"):""})).join("")}}},Ne=ze,De=Object(P["a"])(Ne,Nt,Dt,!1,null,null,null),$e=De.exports,Ue={name:"AcCard",components:{AcAnswerConfig:h["default"],AcLattice:zt,AcSweep:$e},props:{title:{type:String,default:""},paperTitle:{type:String,default:""},tree:{type:Array,default:function(){return[]}},mode:{type:Number,default:0},config:{type:Object,default:function(){return null}},uploadOss:{type:Function,default:function(){}},ClassicEditor:{type:Function,default:function(){}},contentEditable:{type:Boolean,default:!0},showConfig:{type:Boolean,default:!0},showStudentInfo:{type:Boolean,default:!0},saveInfo:{type:Object,default:null},paddingBlock:{type:[Number,Array],default:68},courseName:{type:String,default:""}},provide:function(){return{uploadOss:this.uploadOss,ClassicEditor:this.ClassicEditor,contentEditable:this.contentEditable,showStudentInfo:this.showStudentInfo,paperTitle:this.title||this.paperTitle,paddingBlock:this.paddingBlock,courseName:this.courseName}},data:function(){return{paperTree:[],initWindowNum:0}},computed:{layout:function(){return this.$store.getters["AC/layout"]},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{tree:function(){this.initTree()},saveInfo:function(){this.handleSaveInfo()},title:function(){this.$store.dispatch("AC/paper/setTitle",this.title)}},beforeCreate:function(){if(!Promise.allSettled){var t=function(t){return{status:"rejected",reason:t}},e=function(t){return{status:"fulfilled",value:t}};Promise.allSettled=function(n){return Promise.all(n.map((function(n){return Promise.resolve(n).then(e,t)})))}}},created:function(){var t=this;this.$store.dispatch("AC/essay/resetEssay"),this.init(),this.$nextTick((function(){t.initWindowNum=window.devicePixelRatio,window.addEventListener("resize",t.resizeFun)}))},beforeDestroy:function(){window.removeEventListener("resize",this.resizeFun)},methods:{resizeFun:function(){var t=window.devicePixelRatio;t!==this.initWindowNum&&this.save(!0)},init:function(){this.$store.dispatch("AC/paper/setTitle",this.title),this.$store.dispatch("AC/answerConfig/setAnswerCardMode",this.mode),this.handleSaveInfo(),this.initTree()},handleSaveInfo:function(){var t=this;if(this.saveInfo){var e={},n={},i={};Object.keys(this.saveInfo).forEach((function(r){switch(r){case"title":case"editTitleList":case"candidateNumColor":case"scansionAttention":case"latticeAttention":e[r]=t.saveInfo[r];break;case"editEssayList":i[r]=t.saveInfo[r];break;case"answerCardMode":case"layout":case"showAttention":case"studentInfo":case"educationIdValue":case"registrationNumberType":case"readType":case"patchwork":case"showQuestion":case"sizeType":case"showEducationId":case"objectiveOrder":case"judgmentMode":case"addFooter":case"entranceExams":n[r]=t.saveInfo[r];break}})),this.$store.dispatch("AC/paper/setSaveState",e),this.$store.dispatch("AC/essay/setSaveState",i),this.$store.dispatch("AC/answerConfig/setSaveState",n)}},initTree:function(){var t=this,e=this.$store.getters["AC/editTitleList"],n=this.$store.getters["AC/editEssayList"].filter((function(t){return!!t.title}));Object(q["f"])(this.tree.concat([].concat(u(e),u(n)))).then((function(){0===t.mode&&t.extendComplex(),t.paperTree=t.tree,t.$store.dispatch(0===t.mode?"AC/paper/setSweepPaperTree":"AC/paper/setPaperTree",t.paperTree)}))},extendComplex:function(){var t=[];this.tree.forEach((function(e,n){t=[],[],e.children.forEach((function(e,n){var i;"complex"===e.code?(e.title=null,e.children.every((function(t){return["single_choice","multiple_choice","judgment"].includes(t.code)}))?(i=t).push.apply(i,u(e.children)):t.push(e)):(e.code,t.push(e))})),e.children=t}))},download:function(){var t=this;this.$emit("before-download"),this.save(),1===this.acMode?this.$refs.latticeCard&&this.$refs.latticeCard.download().then((function(e){t.$emit("download",e)})):0===this.acMode&&this.$refs.sweepCard&&this.$refs.sweepCard.download().then((function(e){t.$emit("download",e)}))},save:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=["title","editTitleList","candidateNumColor","editEssayList","answerCardMode","layout","showAttention","studentInfo","educationIdValue","registrationNumberType","readType","patchwork"],i=["latticeAttention","showQuestion","sizeType","showEducationId"],r=["scansionAttention","objectiveOrder","judgmentMode","addFooter","entranceExams"],a={},o=this.$store.getters["AC/answerCardMode"];n.concat(0===o?r:i).forEach((function(e){a[e]=t.$store.getters["AC/".concat(e)]})),this.$emit("save",a,e)},viewPaper:function(){this.$emit("view-paper")},buildFailed:function(){this.$emit("build-failed")}}},Fe=Ue,He=Object(P["a"])(Fe,i,r,!1,null,null,null),Ke=He.exports;Ke.install=function(t){t.component(Ke.name,Ke)};e["default"]=Ke},"40d5":function(t,e,n){var i=n("d039");t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},4362:function(t,e,n){e.nextTick=function(t){var e=Array.prototype.slice.call(arguments);e.shift(),setTimeout((function(){t.apply(null,e)}),0)},e.platform=e.arch=e.execPath=e.title="browser",e.pid=1,e.browser=!0,e.env={},e.argv=[],e.binding=function(t){throw new Error("No such module. (Possibly not yet loaded)")},function(){var t,i="/";e.cwd=function(){return i},e.chdir=function(e){t||(t=n("df7c")),i=t.resolve(e,i)}}(),e.exit=e.kill=e.umask=e.dlopen=e.uptime=e.memoryUsage=e.uvCounters=function(){},e.features={}},"44ad":function(t,e,n){var i=n("e330"),r=n("d039"),a=n("c6b6"),o=Object,s=i("".split);t.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):o(t)}:o},4625:function(t,e,n){var i=n("c6b6"),r=n("e330");t.exports=function(t){if("Function"===i(t))return r(t)}},"485a":function(t,e,n){var i=n("c65b"),r=n("1626"),a=n("861d"),o=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&r(n=t.toString)&&!a(s=i(n,t)))return s;if(r(n=t.valueOf)&&!a(s=i(n,t)))return s;if("string"!==e&&r(n=t.toString)&&!a(s=i(n,t)))return s;throw o("Can't convert object to primitive value")}},"4b11":function(t,e){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"4d64":function(t,e,n){var i=n("fc6a"),r=n("23cb"),a=n("07fa"),o=function(t){return function(e,n,o){var s,c=i(e),l=a(c),u=r(o,l);if(t&&n!=n){while(l>u)if(s=c[u++],s!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4e0a":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{class:["ac-essay__wrapper",t.lastOneClass],style:{"--padding-inline":t.paddingInline+"px"},attrs:{"data-key":t.dataKey,type:"essay","page-index":t.pageIndex}},[e("div",{staticClass:"ac-essay",class:{"is-wrapper":"outer"===t.borderType,"is-editable":t.editable,"is-hidden__border-both":t.hiddenBorderBoth||!(t.row||t.title),"is-hidden__border-bottom":t.hiddenBorderBottom||!(t.row||t.title),"is-hidden__border-top":t.hiddenBorderTop||!(t.row||t.title)},style:{paddingBottom:"".concat(t.additionalPadding+15,"px"),paddingLeft:0===t.answerMode&&"40px"}},[0===t.answerMode&&t.isEntranceExams?e("div",{class:["entrance-border",t.layout>2&&"three-column_border",t.isFirst&&"show-border_top",t.isShowTipWord&&"show-border_word-top",t.isLastOne&&"show-border_bottom",t.isFirst&&t.isLastOne&&"show-border_all"]}):t._e(),0===t.answerMode&&t.isEntranceExams?e("div",{class:["entrance-outline",t.layout>2&&"three-column_outline",t.isFirst&&"show-outline_top",t.isShowTipWord&&"show-outline_word-top",t.isLastOne&&"show-outline_bottom",t.isFirst&&t.isLastOne&&"show-outline_all"]}):t._e(),t.title?e("div",{staticClass:"ac-essay__title ck-content",domProps:{innerHTML:t._s(t.title)}}):t._e(),t.row?e("div",{staticClass:"ac-essay__container"},[e("div",{staticClass:"ac-essay__area",class:t.rowClass,style:t.areaStyle},[["empty","block","spell_field"].includes(t.rowType)?t._e():[t._l(t.itemList,(function(n,i){return[t.getLiContent(i)?e("li",{key:"li_".concat(i),staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!i,"is-editable":"line"===t.rowType&&t.liEditable},domProps:{innerHTML:t._s(t.getLiContent(i))},on:{blur:function(e){return t.handleBlur(e,i)}}}):e("li",{key:i,staticClass:"ac-essay__area-item",class:{"with-top":t.topLineVisible&&!i,"is-editable":"line"===t.rowType&&t.liEditable,"is-first-column":!(i%t.formatColumn)},style:{borderColor:t.isEntranceExams?"#EB617E":"#000000"},on:{blur:function(e){return t.handleBlur(e,i)}}},[t.showPrefix&&"line"===t.rowType?e("span",{staticClass:"ac-essay__area-prefix"},[t._v(" 【"+t._s(i+t.startRow+1)+"】 ")]):t._e(),t.wordCountStep&&["write","grid"].includes(t.rowType)?e("span",[t._v(" "+t._s(t.getWordCount(i))+" ")]):t._e()])]}))],"spell_field"===t.rowType?t._l(Array(t.row).fill(""),(function(n,i){return e("li",{key:i,staticClass:"ac-essay__area-item"},[e("div",{staticClass:"ac-essay__area-spell"}),t._l(Array(t.formatColumn).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-essay__area-field"})}))],2)})):t._e()],2)]):t._e(),t.editable?e("div",{staticClass:"ac-essay__tool"},[t.rowEditable?[e("span",[t._v("行数:")]),e("el-input-number",{attrs:{size:"small",min:0,max:100},on:{change:t.handleRowChange},model:{value:t.rowNum,callback:function(e){t.rowNum=e},expression:"rowNum"}})]:t._e(),t.typeEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openType}},[t._v(" 背景风格 ")]):t._e(),t.titleEditable?e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.handleEdit}},[t._v(" 编辑答题区 ")]):t._e()],2):t._e()]),e("ac-editor",{attrs:{visible:t.editorVisible,content:t.editContent,title:"编辑答题区","editor-id":"essay-editor_".concat(Date.now().toString(36))},on:{"update:visible":function(e){t.editorVisible=e},submit:t.handleSubmit}}),e("el-dialog",{attrs:{"custom-class":"ac-essay__dialog",visible:t.typeVisible,title:"设置背景风格",width:"770px"},on:{"update:visible":function(e){t.typeVisible=e}}},[e("div",{staticClass:"ac-bg"},[e("div",{staticClass:"ac-bg__item",class:{"is-checked":0===t.currentType},on:{click:function(e){t.currentType=0}}},[e("div",{staticClass:"ac-bg__title"},[t._v("空白纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper"})]),e("div",{staticClass:"ac-bg__item",class:{"is-checked":1===t.currentType},on:{click:function(e){t.currentType=1}}},[e("div",{staticClass:"ac-bg__title"},[t._v("横线纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-line"},[e("div",{staticClass:"ac-bg__content"})])]),e("div",{staticClass:"ac-bg__item",class:{"is-checked":2===t.currentType},on:{click:function(e){t.currentType=2}}},[e("div",{staticClass:"ac-bg__title"},[t._v("方格纸")]),e("i",{staticClass:"el-icon-success"}),e("div",{staticClass:"ac-bg__wrapper is-grid"},t._l(Array(4).fill(""),(function(t,n){return e("div",{key:n,staticClass:"ac-bg__content-item"})})),0)])]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){t.typeVisible=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeType}},[t._v("确定")])],1)])],1)},r=[],a=n("6bdf"),o=n("5dcc"),s={name:"AcEssay",components:{AcEditor:a["default"]},inject:["paddingBlock"],props:{editable:{type:Boolean,default:!0},bgType:{type:Number,default:0},typeEditable:{type:Boolean,default:!0},row:{type:Number,default:4},startRow:{type:Number,default:0},rowCount:{type:Number,default:4},rowEditable:{type:Boolean,default:!0},title:{type:String,default:""},titleEditable:{type:Boolean,default:!0},liEditable:{type:Boolean,default:!1},showPrefix:{type:Boolean,default:!1},rowHeight:{type:[Number,String],default:""},rowGap:{type:[Number,String],default:""},width:{type:[Number,String],default:""},borderType:{type:String,default:"outer"},topLineVisible:{type:Boolean,default:!1},wordCountStep:{type:Number,default:100},paddingInline:{type:Number,default:55},dataKey:{type:String,default:""},hiddenBorderBottom:{type:Boolean,default:!1},hiddenBorderBoth:{type:Boolean,default:!1},pageIndex:{type:Number,default:0},hiddenBorderTop:{type:Boolean,default:!1},column:{type:Number,default:0},showSide:{type:Boolean,default:!0},isFirst:{type:Boolean,default:!1},isShowTipWord:{type:Boolean,default:!1},isLastOne:{type:Boolean,default:!1},lastOneClass:{type:String,default:""}},data:function(){return{rowNum:4,editorVisible:!1,editContent:"",typeVisible:!1,currentType:0,additionalPadding:0,lastAdditionPadding:0}},computed:{rowConfig:function(){return this.$store.getters["AC/rowConfig"]},rowType:function(){var t=["empty","line","grid","field","block","write","spell_field"];return t[this.bgType||0]},rowClass:function(){return"row-".concat(this.rowType).concat("inner"===this.borderType?" is-wrapper":"").concat(this.showSide?" show-side":"")},areaStyle:function(){var t=this.rowConfig[this.bgType]||{},e="number"===typeof this.rowHeight?this.rowHeight:t.rowHeight||0,n="number"===typeof this.rowGap?this.rowGap:t.rowGap||0;switch(this.rowType){case"write":n=e/9*2,e-=n;break;case"spell_field":n=e/9*4,e-=n;break}var i={"--row":this.row,"--row-height":e+"px","--row-gap":n+"px","--column":this.formatColumn};return(this.width||0===this.width)&&(i.width="number"===typeof this.width?this.width+"px":this.width),i},formatColumn:function(){var t=(this.rowConfig[this.bgType]||{}).column;return t?this.column||t:0},itemList:function(){return new Array(this.row*(this.formatColumn||1)).fill("")},rowDebounce:function(){return Object(o["b"])(this.commitRowChange,300)},editEssayList:function(){return this.$store.getters["AC/editEssayList"]||[]},getLiContent:function(){var t=this,e=this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{};return function(t){return((e.liList||[]).find((function(e){return e.liIndex===t}))||{}).content}},answerMode:function(){return this.$store.getters["AC/answerCardMode"]},isEntranceExams:function(){return this.$store.getters["AC/entranceExams"]},layout:function(){return this.$store.getters["AC/layout"]}},watch:{rowCount:function(t){t!==this.rowNum&&(this.rowNum=t)},lastOneClass:{immediate:!0,handler:function(t,e){var n=this;!t&&e&&(this.additionalPadding=0,this.lastAdditionPadding=0),t&&this.$nextTick((function(){return n.getDistanceToParentBottom()}))}},row:function(){this.additionalPadding=0,this.lastAdditionPadding=0}},created:function(){this.rowNum=this.rowCount},methods:{getWordCount:function(t){var e=this.startRow*this.formatColumn+t+1;return e%this.wordCountStep?"":"".concat(e,"字")},handleRowChange:function(t,e){(t||0===t||(this.rowNum="",e))&&this.rowDebounce()},commitRowChange:function(){this.$store.dispatch("AC/essay/setEssayRow",{dataKey:this.dataKey,row:this.rowNum}),this.$store.dispatch("AC/paper/resetPanel")},getFullTitle:function(){var t=this;return(this.editEssayList.find((function(e){return e.dataKey===t.dataKey}))||{}).title||this.title},handleEdit:function(){this.editContent=this.getFullTitle(),this.editorVisible=!0},handleSubmit:function(t){this.$store.dispatch("AC/essay/setEssayTitle",{dataKey:this.dataKey,title:t}),this.$store.dispatch("AC/paper/resetPanel")},handleBlur:function(t,e){this.$store.dispatch("AC/essay/setEssayLi",{dataKey:this.dataKey,liIndex:e+this.startRow,content:t.target.innerHTML})},openType:function(){this.currentType=this.bgType,this.typeVisible=!0},changeType:function(){this.typeVisible=!1,this.$store.dispatch("AC/essay/setEssayBgType",{dataKey:this.dataKey,bgType:this.currentType}),this.$store.dispatch("AC/paper/resetPanel")},getDistanceToParentBottom:function(){var t=document.getElementsByClassName(this.lastOneClass)[0],e=Object(o["c"])(t)+this.lastAdditionPadding;this.lastAdditionPadding=Math.max(e,-15),this.additionalPadding=e}}},c=s,l=n("2877"),u=Object(l["a"])(c,i,r,!1,null,null,null),h=u.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"4ea1":function(t,e,n){"use strict";var i=n("d429"),r=n("ebb5"),a=n("bcbf"),o=n("5926"),s=n("f495"),c=r.aTypedArray,l=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();u("with",{with:function(t,e){var n=c(this),r=o(t),u=a(n)?s(e):+e;return i(n,l(n),r,u)}}["with"],!h)},"50c4":function(t,e,n){var i=n("5926"),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},"53ca":function(t,e,n){"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}n.d(e,"a",(function(){return i}))},5692:function(t,e,n){var i=n("c430"),r=n("c6cd");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.30.2",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,n){var i=n("d066"),r=n("e330"),a=n("241c"),o=n("7418"),s=n("825a"),c=r([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=a.f(s(t)),n=o.f;return n?c(e,n(t)):e}},"577e":function(t,e,n){var i=n("f5df"),r=String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return r(t)}},5926:function(t,e,n){var i=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:i(e)}},"59ed":function(t,e,n){var i=n("1626"),r=n("0d51"),a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5dcc":function(t,e,n){"use strict";n.d(e,"b",(function(){return E})),n.d(e,"f",(function(){return T})),n.d(e,"d",(function(){return S})),n.d(e,"a",(function(){return I})),n.d(e,"e",(function(){return O})),n.d(e,"c",(function(){return B}));n("14d9"),n("b7ef"),n("907a"),n("986a"),n("1d02"),n("3c5d"),n("6ce5"),n("2834"),n("4ea1");var i=b(),r=w(),a=C(),o=A(),s={imagePlaceholder:void 0,cacheBust:!1},c={toSvg:l,toPng:h,toJpeg:d,toBlob:f,toPixelData:u,impl:{fontFaces:a,images:o,util:i,inliner:r,options:{}}};function l(t,e){return e=e||{},p(e),Promise.resolve(t).then((function(t){return m(t,e.filter,!0)})).then(y).then(v).then(n).then((function(n){return _(n,e.width||i.width(t),e.height||i.height(t))}));function n(t){return e.bgcolor&&(t.style.backgroundColor=e.bgcolor),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]})),t}}function u(t,e){return g(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,i.width(t),i.height(t)).data}))}function h(t,e){return g(t,e||{}).then((function(t){return t.toDataURL()}))}function d(t,e){return e=e||{},g(t,e).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))}function f(t,e){return g(t,e||{}).then(i.canvasToBlob)}function p(t){"undefined"===typeof t.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=t.imagePlaceholder,"undefined"===typeof t.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=t.cacheBust}function g(t,e){return l(t,e).then(i.makeImage).then(i.delay(100)).then((function(e){var i=n(t);return i.getContext("2d").drawImage(e,0,0),i}));function n(t){var n=document.createElement("canvas"),r=n.getContext("2d");r.mozImageSmoothingEnabled=!1,r.webkitImageSmoothingEnabled=!1,r.msImageSmoothingEnabled=!1,r.imageSmoothingEnabled=!1;var a=e.scale||1,o=e.width||i.width(t),s=e.height||i.height(t);return n.width=o*a,n.height=s*a,e.imageWidth&&(a=e.imageWidth/(o||1),n.width=e.imageWidth,n.height=s*a),e.imageHeight&&(a=e.imageHeight/(s||1),n.width=o*a,n.height=e.imageHeight),r.scale(a,a),e.bgcolor&&(r.fillStyle=e.bgcolor,r.fillRect(0,0,n.width,n.height)),n}}function m(t,e,n){return n||!e||e(t)?Promise.resolve(t).then(r).then((function(n){return a(t,n,e)})).then((function(e){return o(t,e)})):Promise.resolve();function r(t){return t instanceof HTMLCanvasElement?i.makeImage(t.toDataURL()):t.cloneNode(!1)}function a(t,e,n){var r=t.childNodes;return 0===r.length?Promise.resolve(e):a(e,i.asArray(r),n).then((function(){return e}));function a(t,e,n){var i=Promise.resolve();return e.forEach((function(e){i=i.then((function(){return m(e,n)})).then((function(e){e&&t.appendChild(e)}))})),i}}function o(t,e){return e instanceof Element?Promise.resolve().then(n).then(r).then(a).then(o).then((function(){return e})):e;function n(){function n(t,e){function n(t,e){i.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}t.cssText?e.cssText=t.cssText:n(t,e)}n(window.getComputedStyle(t),e.style)}function r(){function n(n){var r=window.getComputedStyle(t,n),a=r.getPropertyValue("content");if(""!==a&&"none"!==a){var o=i.uid();e.className=e.className+" "+o;var s=document.createElement("style");s.appendChild(c(o,n,r)),e.appendChild(s)}function c(t,e,n){var r="."+t+":"+e,a=n.cssText?o(n):s(n);return document.createTextNode(r+"{"+a+"}");function o(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}function s(t){return i.asArray(t).map(e).join("; ")+";";function e(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")}}}}[":before",":after"].forEach((function(t){n(t)}))}function a(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function o(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}}function y(t){return a.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function v(t){return o.inlineAll(t).then((function(){return t}))}function _(t,e,n){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(i.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+n+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}function b(){return{escape:d,parseExtension:e,mimeType:n,dataAsUrl:h,isDataUrl:i,canvasToBlob:a,resolveUrl:o,getAndEncode:u,uid:s(),delay:f,asArray:p,escapeXhtml:g,makeImage:l,width:m,height:y};function t(){var t="application/font-woff",e="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:e,jpeg:e,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function e(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function n(n){var i=e(n).toLowerCase();return t()[i]||""}function i(t){return-1!==t.search(/^(data:)/)}function r(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),i=n.length,r=new Uint8Array(i),a=0;a<i;a++)r[a]=n.charCodeAt(a);e(new Blob([r],{type:"image/png"}))}))}function a(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):r(t)}function o(t,e){var n=document.implementation.createHTMLDocument(),i=n.createElement("base");n.head.appendChild(i);var r=n.createElement("a");return n.body.appendChild(r),i.href=e,r.href=t,r.href}function s(){var t=0;return function(){return"u"+e()+t++;function e(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function l(t){return new Promise((function(e,n){var i=new Image;i.onload=function(){e(i)},i.onerror=n,i.src=t}))}function u(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=3e4;return(c.impl.options.cacheBust||n)&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()),e&&t.startsWith("http")&&!t.startsWith("https")&&(t=t.replace("http","https")),new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=o,r.ontimeout=s,r.responseType="blob",r.timeout=i,r.open("GET",t,!0),r.send(),c.impl.options.imagePlaceholder){var a=c.impl.options.imagePlaceholder.split(/,/);a&&a[1]&&(n=a[1])}function o(){if(4===r.readyState)if(200===r.status){var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e({content:t,fullUrl:i.result})},i.readAsDataURL(r.response)}else n?e(n):l("cannot fetch resource: "+t+", status: "+r.status)}function s(){n?e(n):l("timeout of "+i+"ms occured while fetching resource: "+t)}function l(t){e("")}}))}function h(t,e){return"data:"+e+";base64,"+t}function d(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function f(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}}function p(t){for(var e=[],n=t.length,i=0;i<n;i++)e.push(t[i]);return e}function g(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")}function m(t){var e=v(t,"border-left-width"),n=v(t,"border-right-width");return t.scrollWidth+e+n}function y(t){var e=v(t,"border-top-width"),n=v(t,"border-bottom-width");return t.scrollHeight+e+n}function v(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}function w(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:a,shouldProcess:e,impl:{readUrls:n,inline:r}};function e(e){return-1!==e.search(t)}function n(e){var n,r=[];while(null!==(n=t.exec(e)))r.push(n[1]);return r.filter((function(t){return!i.isDataUrl(t)}))}function r(t,e,n,r){return Promise.resolve(e).then((function(t){return n?i.resolveUrl(t,n):t})).then(r||i.getAndEncode).then((function(t){var n=t.content;t.fullUrl;return i.dataAsUrl(n,i.mimeType(e))})).then((function(n){return t.replace(a(e),"$1"+n+"$3")}));function a(t){return new RegExp("(url\\(['\"]?)("+i.escape(t)+")(['\"]?\\))","g")}}function a(t,i,a){return o()?Promise.resolve(t):Promise.resolve(t).then(n).then((function(e){var n=Promise.resolve(t);return e.forEach((function(t){n=n.then((function(e){return"about:blank"===t?Promise.resolve(t):r(e,t,i,a)}))})),n}));function o(){return!e(t)}}}function C(){return{resolveAll:t,impl:{readAll:e}};function t(){return e(document).then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))}function e(){return Promise.resolve(i.asArray(document.styleSheets)).then(e).then(t).then((function(t){return t.map(n)}));function t(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))}function e(t){var e=[];return t.forEach((function(t){try{i.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(n){}})),e}function n(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}function A(){return{inlineAll:e,impl:{newImage:t}};function t(t){return{inline:e};function e(e){return i.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||function(t){return i.getAndEncode(t,!0,!0)}).then((function(t){t.content;var e=t.fullUrl;return e})).then((function(e){return new Promise((function(n,i){t.onload=n,t.onerror=i,t.src=e}))})).catch((function(){return t.src}))}}function e(n){return n instanceof Element?a(n).then((function(){return n instanceof HTMLImageElement?t(n).inline():Promise.all(i.asArray(n.childNodes).map((function(t){return e(t)})))})):Promise.resolve(n);function a(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}}}var x=c,E=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=arguments.length>2?arguments[2]:void 0,i=0;return function(){var r=this,a=arguments;i&&clearTimeout(i),n?(i||t.apply(r,a),i=setTimeout((function(){i=0}),e)):i=setTimeout((function(){t.apply(r,a)}),e)}},k=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=0,i=[],r=[],a=function a(){if(n===t.length)return Promise.resolve();var o=t[n++],s=Promise.resolve().then((function(){return o()}));i.push(s);var c=s.then((function(){return r.splice(r.indexOf(c),1)}));r.push(c);var l=r.length>=e?Promise.race(r):Promise.resolve();return l.then((function(){return a()}))};return a().then((function(){return Promise.all(i)}))},T=function(t){var e=[],n=/<img.*?(?:>|\/>)/gi,i=/src=['"]?([^'"]*)['"]?/i,r=function(t){if(t){var r=t.match(n);Array.isArray(r)&&r.forEach((function(t){var n=t.match(i);Array.isArray(n)&&n[1]&&e.push(new Promise((function(t,e){var i=new Image;i.onload=function(){return t()},i.onerror=function(){return e()},i.src=n[1]})))}))}},a=function t(e){e.forEach((function(e){"complex"!==e.code&&e.children||(r(e.title),Array.isArray(e.choices)&&e.choices.forEach((function(t){return r(t.content)}))),e.children&&e.children.length&&t(e.children)}))};return a(t),new Promise((function(t,n){Promise.allSettled(e).then((function(){return t()}))}))},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2?arguments[2]:void 0;if(!t.length)return Promise.resolve([]);for(var i=[],r=function(){var r=t[a];i.push((function(){return x.toJpeg(r,{quality:.95,scale:e,width:r.offsetWidth,height:r.offsetHeight,imageWidth:n,bgcolor:"#ffffff"})}))},a=0;a<t.length;a++)r();return k(i)},I=function(t,e){for(var n=t.split(","),i=atob(n[1]),r={type:"image/jpeg",endings:"native"},a=new Uint8Array(i.length),o=0;o<i.length;o++)a[o]=i.charCodeAt(o);var s=new File([a],(e||Date.now().toString(36))+".jpg",r);return s},O=function(t){var e=0;try{var n=t.getBoundingClientRect(),i=n.top,r=t.parentNode.getBoundingClientRect(),a=r.top;e=i-a}catch(o){e=t.offsetTop}return e},B=function(t){var e=t.getBoundingClientRect(),n=e.bottom,i=t.parentNode.getBoundingClientRect(),r=i.bottom;return r-n}},"5e77":function(t,e,n){var i=n("83ab"),r=n("1a2d"),a=Function.prototype,o=i&&Object.getOwnPropertyDescriptor,s=r(a,"name"),c=s&&"something"===function(){}.name,l=s&&(!i||i&&o(a,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},"605d":function(t,e,n){(function(e){var i=n("c6b6");t.exports="undefined"!=typeof e&&"process"==i(e)}).call(this,n("4362"))},6374:function(t,e,n){var i=n("da84"),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},"639e":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__bar"},[e("div",{class:["ac-config__arrow",t.showConfig?"el-icon-caret-right":"el-icon-caret-left"],on:{click:function(e){t.showConfig=!t.showConfig}}}),e("div",{staticClass:"ac-config__wrapper",class:{"is-hidden":!t.showConfig}},[e("div",{staticClass:"container"},[e("div",{staticClass:"config-mainCtrl"},[e("div",{staticClass:"zeroth-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.viewPaper}},[t._v(" 预览试卷 ")])],1),e("div",{staticClass:"first-row"},[e("el-button",{attrs:{size:"medium",icon:"icon el-icon-download"},on:{click:t.save}},[t._v("保存")]),e("el-button",{attrs:{size:"medium",icon:"icon el-icon-view"},on:{click:function(e){t.previewVisible=!0}}},[t._v(" 预览 ")])],1),e("div",{staticClass:"second-row"},[e("el-button",{staticClass:"ac-card-btn ac-card-btn--main ac-card-btn--large",attrs:{type:"primary"},on:{click:t.download}},[t._v(" 下载并保存 ")])],1)]),t.modeChangeable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode"},[e("el-radio-group",{model:{value:t.answerSheetMode,callback:function(e){t.answerSheetMode=e},expression:"answerSheetMode"}},[e("el-radio",{attrs:{label:0}},[t._v("扫描")]),e("el-radio",{attrs:{label:1}},[t._v("点阵笔")])],1)],1)]):t._e(),t.layoutChangeable?e("change-layout",{attrs:{mode:t.answerSheetMode}}):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("考生须知")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowAttention,callback:function(e){t.isShowAttention=e},expression:"isShowAttention"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("学生信息")]),e("div",{staticClass:"ac-config__item tags-box answer-mode"},[t._l(t.studentInfoTags,(function(n){return e("el-tag",{key:n,staticClass:"tags",attrs:{closable:t.studentInfoTags.length>1,"disable-transitions":!1,effect:"dark",size:"small"},on:{close:function(e){return t.handleClose(n)}}},[t._v(" "+t._s(n)+" ")])})),t.studentInfoTags.length<6&&t.inputVisible?e("el-input",{ref:"saveTagInput",staticClass:"input-new-tag",attrs:{maxLength:"4",size:"small"},on:{blur:t.handleInputConfirm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleInputConfirm.apply(null,arguments)}},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e(),t.studentInfoTags.length<6&&!t.inputVisible?e("el-button",{staticClass:"button-new-tag",attrs:{size:"mini"},on:{click:t.showInput}},[e("i",{staticClass:"el-icon-plus"}),t._v(" 添加 ")]):t._e()],2)]):t._e(),1===t.answerSheetMode&&t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowEducationId,callback:function(e){t.isShowEducationId=e},expression:"isShowEducationId"}})],1)]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("教育ID位数")]),e("div",{staticClass:"ac-config__item"},[e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.educationIdValue,callback:function(e){t.educationIdValue=e},expression:"educationIdValue"}},t._l(Array(13),(function(t,n){return e("el-option",{key:n,attrs:{label:n+6,value:n+6}})})),1)],1)]),e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择考号板式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.registrationNumberType,callback:function(e){t.registrationNumberType=e},expression:"registrationNumberType"}},[e("el-radio",{attrs:{label:0}},[t._v("条形码")]),e("el-radio",{attrs:{label:1}},[t._v("教育ID")])],1)],1)])]:t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("客观题排列")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.objectiveOrder,callback:function(e){t.objectiveOrder=e},expression:"objectiveOrder"}},[e("el-radio",{attrs:{label:"row"}},[t._v("横排")]),e("el-radio",{attrs:{label:"column"}},[t._v("竖排")])],1)],1)]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("判断题样式(TF/✓×)")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.judgmentMode,callback:function(e){t.judgmentMode=e},expression:"judgmentMode"}},[e("el-radio",{attrs:{label:0}},[t._v("TF")]),e("el-radio",{attrs:{label:1}},[t._v("✓×")])],1)],1)]):t._e(),1===t.answerSheetMode&&t.titleSwitchable?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("显示题目内容")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isShowQuestion,callback:function(e){t.isShowQuestion=e},expression:"isShowQuestion"}})],1)]):t._e(),t.showStudentInfo?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("手工批阅")]),e("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:"该试卷存在多个得分点题目,不支持线下批阅,请重新选择试卷",placement:"top-end",disabled:!t.graffitiDisable,"open-delay":200}},[e("div",{staticClass:"ac-config__item"},[e("el-switch",{attrs:{disabled:t.graffitiDisable||t.isEntranceExams},model:{value:t.handRead,callback:function(e){t.handRead=e},expression:"handRead"}})],1)])],1),t.readType&&1===t.answerSheetMode?e("div",{staticClass:"ac-config__row--sub"},[e("div",{staticClass:"ac-config__label"},[t._v("设置给分框样式")]),e("div",{staticClass:"ac-config__item"},[e("el-radio-group",{model:{value:t.readType,callback:function(e){t.readType=e},expression:"readType"}},[e("el-radio",{attrs:{label:"hand"}},[t._v("手写")]),e("el-radio",{attrs:{label:"graffiti"}},[t._v("涂点")])],1)],1)]):t._e()]):t._e(),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("添加页脚")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isAddFooter,callback:function(e){t.isAddFooter=e},expression:"isAddFooter"}})],1)]):t._e(),0!==t.answerSheetMode&&"graffiti"!==t.readType||1!==t.layout?t._e():e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("答题卡拼凑打印")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isPatchwork,callback:function(e){t.isPatchwork=e},expression:"isPatchwork"}})],1)]),0===t.answerSheetMode?e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("中高考答题卡样式")]),e("div",{staticClass:"ac-config__item"},[e("el-switch",{model:{value:t.isEntranceExams,callback:function(e){t.isEntranceExams=e},expression:"isEntranceExams"}})],1)]):t._e()],2)]),e("ac-preview",{attrs:{visible:t.previewVisible,selector:".ac-panel .ac-piece__wrapper"},on:{"update:visible":function(e){t.previewVisible=e}}}),e("el-dialog",{staticClass:"download-dialog",attrs:{title:"下载提示",visible:t.showDownloadModal,width:"520px",center:"","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.showDownloadModal=e}}},[0===t.answerSheetMode?[e("p",{staticClass:"message"},[t._v(" 选择导出以下内容 "),e("span",{staticClass:"redTip"},[t._v("(为了保证下载内容的质量,建议使用chrome进行下载)")])]),e("div",{staticClass:"tip"},[e("el-radio",{attrs:{label:"sweep"},model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[t._v("答题卡")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadType,callback:function(e){t.downloadType=e},expression:"downloadType"}},[e("el-option",{attrs:{label:"PDF",value:"PDF"}}),e("el-option",{attrs:{label:"PNG",value:"PNG"}})],1)],1),e("div",{staticClass:"paper-type_selector"},[e("span",{staticClass:"label"},[t._v("请选择纸张大小")]),e("el-select",{attrs:{placeholder:"请选择"},model:{value:t.downloadSize,callback:function(e){t.downloadSize=e},expression:"downloadSize"}},[e("el-option",{attrs:{label:1===t.layout?"A4":"A3",value:1===t.layout?"A4":"A3"}}),e("el-option",{attrs:{label:1===t.layout?"16K":"8K",value:1===t.layout?"16K":"8K"}})],1)],1)]:t._e(),e("div",{staticClass:"static-info"},[e("p",{staticClass:"static-info__title"},[t._v("请确认以下答题卡设置信息")]),1===t.answerSheetMode?e("p",{staticClass:"static-info__item"},[t._v(t._s("答题卡模式:".concat(t.sizeLabel)))]):t._e(),1===t.answerSheetMode?e("p",{staticClass:"static-info__item"},[t._v(t._s("是否填写教育ID:".concat(t.isShowEducationId?"是":"否")))]):t._e(),0===t.answerSheetMode||t.isShowEducationId?[e("p",{staticClass:"static-info__item"},[t._v(t._s("教育ID位数:".concat(t.educationIdValue,"位")))]),e("p",{staticClass:"static-info__item"},[t._v(" "+t._s("考号板式:".concat(1===t.registrationNumberType?"教育ID":"条形码"))+" ")])]:t._e(),e("p",{staticClass:"static-info__item"},[t._v(t._s("是否手工批阅:".concat(t.handRead?"是":"否")))]),1===t.answerSheetMode&&t.handRead?e("p",{staticClass:"static-info__item"},[t._v(t._s("手工批阅形式:".concat("hand"===t.readType?"手写":"涂点")))]):t._e()],2),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.showDownloadModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmDownload}},[t._v("确 定")])],1)],2)],1)},r=[],a=(n("14d9"),function(){var t=this,e=t._self._c;return e("div",{staticClass:"ac-config__row"},[e("div",{staticClass:"ac-config__label"},[t._v("选择答题卡模式")]),e("div",{staticClass:"ac-config__item answer-mode-other"},[e("p",{staticClass:"ac-card-config__sublabel"},[t._v("适用于"+t._s(t.subLabel)+"纸张")]),e("div",{staticClass:"layout-config"},[e("div",{class:["layout-config-item",t.disableOneLayout&&"disable-style"],attrs:{"aria-disabled":t.disableOneLayout},on:{click:function(e){return t.changeAnswerCardLayout(1)}}},[e("div",{class:["layout-image",1===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("d09a"),alt:"一栏"}})]),e("p",{staticClass:"layout-name"},[t._v("一栏")])]),e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(2)}}},[e("div",{class:["layout-image",2===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("eb33"),alt:"两栏"}})]),e("p",{staticClass:"layout-name"},[t._v("两栏")])]),0===t.mode?e("div",{staticClass:"layout-config-item",on:{click:function(e){return t.changeAnswerCardLayout(3)}}},[e("div",{class:["layout-image",3===t.layout?"is-selected":null]},[e("img",{attrs:{src:n("f714"),alt:"三栏"}})]),e("p",{staticClass:"layout-name"},[t._v("三栏")])]):t._e()]),1===t.mode?e("el-radio-group",{model:{value:t.sizeType,callback:function(e){t.sizeType=e},expression:"sizeType"}},[e("el-radio",{attrs:{label:"A"}},[t._v(t._s(1===t.layout?"A4":"A3"))]),e("el-radio",{attrs:{label:"K"}},[t._v(t._s(1===t.layout?"16K":"8K"))])],1):t._e()],1)])}),o=[],s={name:"ChangeLayout",components:{},props:{mode:{type:Number,default:0}},computed:{sizeType:{get:function(){return this.$store.getters["AC/sizeType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setSizeType",t),this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},disableOneLayout:function(){return this.$store.getters["AC/disableOneLayout"]},subLabel:function(){return 0===this.mode?1===this.layout?"A4、16K":"A3、8K":"A"===this.sizeType?1===this.layout?"A4":"A3":1===this.layout?"16K":"8K"}},watch:{},mounted:function(){},data:function(){return{}},methods:{changeAnswerCardLayout:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardLayout",t),t>1&&this.$store.dispatch("AC/answerConfig/setPatchwork",!1),this.$store.dispatch("AC/paper/resetPanel")}}},c=s,l=n("2877"),u=Object(l["a"])(c,a,o,!1,null,null,null),h=u.exports,d=n("2b16"),f={name:"AcAnswerConfig",components:{changeLayout:h,AcPreview:d["default"]},props:{modeChangeable:{type:Boolean,default:!0},layoutChangeable:{type:Boolean,default:!0},titleSwitchable:{type:Boolean,default:!0},graffitiDisable:{type:Boolean,default:!1}},inject:["showStudentInfo"],computed:{answerSheetMode:{get:function(){return this.$store.getters["AC/answerCardMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAnswerCardMode",t),0===t&&this.$store.dispatch("AC/answerConfig/setSizeType","A")}},isShowAttention:{get:function(){return this.$store.getters["AC/showAttention"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAttention",t),this.$store.dispatch("AC/paper/resetPanel")}},studentInfoArr:function(){return this.$store.getters["AC/studentInfo"]},isShowEducationId:{get:function(){return this.$store.getters["AC/showEducationId"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},educationIdValue:{get:function(){return this.$store.getters["AC/educationIdValue"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEducationId",t),this.$store.dispatch("AC/paper/resetPanel")}},registrationNumberType:{get:function(){return this.$store.getters["AC/registrationNumberType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setRegistrationNumberType",t),this.$store.dispatch("AC/paper/resetPanel")}},objectiveOrder:{get:function(){return this.$store.getters["AC/objectiveOrder"]},set:function(t){this.$store.dispatch("AC/answerConfig/setObjectiveOrder",t),this.$store.dispatch("AC/paper/resetPanel")}},judgmentMode:{get:function(){return this.$store.getters["AC/judgmentMode"]},set:function(t){this.$store.dispatch("AC/answerConfig/setJudgmentMode",t)}},isShowQuestion:{get:function(){return this.$store.getters["AC/showQuestion"]},set:function(t){this.$store.dispatch("AC/answerConfig/setShowQuestion",t),this.$store.dispatch("AC/paper/resetEditTitle")}},handRead:{get:function(){return!!this.readType},set:function(t){this.readType=t?"graffiti":""}},readType:{get:function(){return this.$store.getters["AC/readType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setReadType",t),this.$store.dispatch("AC/paper/resetPanel")}},isAddFooter:{get:function(){return this.$store.getters["AC/addFooter"]},set:function(t){this.$store.dispatch("AC/answerConfig/setAddFooter",t)}},isPatchwork:{get:function(){return this.$store.getters["AC/patchwork"]},set:function(t){this.$store.dispatch("AC/answerConfig/setPatchwork",t),this.$store.dispatch("AC/paper/resetPanel")}},isEntranceExams:{get:function(){return this.$store.getters["AC/entranceExams"]},set:function(t){this.$store.dispatch("AC/answerConfig/setEntranceExams",t),"graffiti"===this.readType?this.handRead=!1:this.$store.dispatch("AC/paper/resetPanel")}},layout:function(){return this.$store.getters["AC/layout"]},sizeType:function(){return this.$store.getters["AC/sizeType"]},sizeLabel:function(){var t="",e="";switch(this.layout){case 1:t="一栏",e="A"===this.sizeType?"A4":"16K";break;case 2:t="二栏",e="A"===this.sizeType?"A3":"8K";break}return"".concat(t," ").concat(e)},downloadType:{get:function(){return this.$store.getters["AC/downloadType"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadType",t)}},downloadSize:{get:function(){return this.$store.getters["AC/downloadSize"]},set:function(t){this.$store.dispatch("AC/answerConfig/setDownloadSize",t)}},acMode:function(){return this.$store.getters["AC/answerCardMode"]}},watch:{studentInfoArr:function(){this.studentInfoTags=this.studentInfoArr}},mounted:function(){this.studentInfoTags=this.studentInfoArr},data:function(){return{studentInfoTags:[],inputVisible:!1,inputValue:"",showConfig:!0,previewVisible:!1,showDownloadModal:!1,radio:"sweep"}},methods:{handleClose:function(t){this.studentInfoTags.splice(this.studentInfoTags.indexOf(t),1),this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},showInput:function(){var t=this;this.inputVisible=!0,this.$nextTick((function(e){t.$refs.saveTagInput.$refs.input.focus()}))},handleInputConfirm:function(){var t=this.inputValue;t&&-1===this.studentInfoTags.indexOf(t)&&this.studentInfoTags.push(t),this.inputVisible=!1,this.inputValue="",this.$store.dispatch("AC/answerConfig/setStudentInfo",this.studentInfoTags),this.$store.dispatch("AC/paper/resetPanel")},download:function(){this.acMode?this.isShowEducationId||this.handRead?this.showDownloadModal=!0:this.$emit("download"):(this.showDownloadModal=!0,this.$store.dispatch("AC/answerConfig/setDownloadSize",1===this.layout?"A4":"A3"))},confirmDownload:function(){this.showDownloadModal=!1,this.$emit("download")},save:function(){this.$emit("save")},viewPaper:function(){this.$emit("view-paper")}}},p=f,g=Object(l["a"])(p,i,r,!1,null,null,null),m=g.exports;m.install=function(t){t.component(m.name,m)};e["default"]=m},"69f3":function(t,e,n){var i,r,a,o=n("cdce"),s=n("da84"),c=n("861d"),l=n("9112"),u=n("1a2d"),h=n("c6cd"),d=n("f772"),f=n("d012"),p="Object already initialized",g=s.TypeError,m=s.WeakMap,y=function(t){return a(t)?r(t):i(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(o||h.state){var _=h.state||(h.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,i=function(t,e){if(_.has(t))throw g(p);return e.facade=t,_.set(t,e),e},r=function(t){return _.get(t)||{}},a=function(t){return _.has(t)}}else{var b=d("state");f[b]=!0,i=function(t,e){if(u(t,b))throw g(p);return e.facade=t,l(t,b,e),e},r=function(t){return u(t,b)?t[b]:{}},a=function(t){return u(t,b)}}t.exports={set:i,get:r,has:a,enforce:y,getterFor:v}},"6bdf":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{"custom-class":"ac-editor",visible:t.currentVisible,title:t.title,top:"10vh",width:"868px","close-on-click-modal":!1},on:{"update:visible":function(e){t.currentVisible=e},open:t.handleOpen}},[e("textarea",{attrs:{id:t.editorId}}),e("div",{staticClass:"ac-editor__footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.close}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirm}},[t._v("确定")])],1)])},r=[],a=n("d4ec"),o=n("bee2"),s={name:"AcEditor",props:{title:{type:String,default:"编辑标题"},content:{type:String,default:""},visible:{type:Boolean,default:!1},editorId:{type:String,default:"ac-editor"},editorConstructor:{type:Function,default:function(){}}},inject:["uploadOss","ClassicEditor"],data:function(){return{editor:null}},computed:{currentVisible:{get:function(){return this.visible},set:function(t){this.$emit("update:visible",t)}},uploadAdapter:function(){var t=this.uploadOss;return function(){function e(t){Object(a["a"])(this,e),this.loader=t}return Object(o["a"])(e,[{key:"upload",value:function(){var e=this;return new Promise((function(n,i){e.loader.file.then((function(e){return t(e,n)}))}))}}]),e}()},createFn:function(){return this.ClassicEditor||this.editorConstructor}},methods:{handleOpen:function(){var t=this;this.$nextTick((function(){return t.initEditor()}))},close:function(){this.currentVisible=!1},confirm:function(){this.close(),this.editor&&this.$emit("submit",this.editor.getData())},initEditor:function(){var t=this;this.editor?(""===this.content||this.content)&&this.editor.setData(this.content):this.createFn.create(document.querySelector("#".concat(this.editorId)),{isReadOnly:!0,placeholder:"请输入~",image:{resizeUnit:"px",toolbar:[{name:"imageStyle:pictures",items:["imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight"],defaultItem:"imageStyle:alignCenter"},"|","toggleImageCaption","imageStyle:inline"]}}).then((function(e){t.editor=e,t.content&&t.editor.setData(t.content),t.addSpecialCharacters(e),e.plugins.get("FileRepository").createUploadAdapter=function(e){return new t.uploadAdapter(e)},e.on("instanceReady",(function(t){t.editor.execCommand("toolbarCollapse")}))}))},addSpecialCharacters:function(t){t.plugins.get("SpecialCharacters").addItems("编号",[{title:"①",character:"①"},{title:"②",character:"②"},{title:"③",character:"③"},{title:"④",character:"④"},{title:"⑤",character:"⑤"},{title:"⑥",character:"⑥"},{title:"⑦",character:"⑦"},{title:"⑧",character:"⑧"},{title:"⑨",character:"⑨"},{title:"⑩",character:"⑩"},{title:"(1)",character:"(1)"},{title:"(2)",character:"(2)"},{title:"(3)",character:"(3)"},{title:"(4)",character:"(4)"},{title:"(5)",character:"(5)"},{title:"(6)",character:"(6)"},{title:"(7)",character:"(7)"},{title:"(8)",character:"(8)"},{title:"(9)",character:"(9)"},{title:"(10)",character:"(10)"},{title:"1)",character:"1)"},{title:"2)",character:"2)"},{title:"3)",character:"3)"},{title:"4)",character:"4)"},{title:"5)",character:"5)"},{title:"6)",character:"6)"},{title:"7)",character:"7)"},{title:"8)",character:"8)"},{title:"9)",character:"9)"},{title:"10)",character:"10)"},{title:"一",character:"一"},{title:"二",character:"二"},{title:"三",character:"三"},{title:"四",character:"四"},{title:"五",character:"五"},{title:"六",character:"六"},{title:"七",character:"七"},{title:"八",character:"八"},{title:"九",character:"九"},{title:"十",character:"十"},{title:"(一)",character:"(一)"},{title:"(二)",character:"(二)"},{title:"(三)",character:"(三)"},{title:"(四)",character:"(四)"},{title:"(五)",character:"(五)"},{title:"(六)",character:"(六)"},{title:"(七)",character:"(七)"},{title:"(八)",character:"(八)"},{title:"(九)",character:"(九)"},{title:"(十)",character:"(十)"}])}}},c=s,l=n("2877"),u=Object(l["a"])(c,i,r,!1,null,null,null),h=u.exports;h.install=function(t){t.component(h.name,h)};e["default"]=h},"6ce5":function(t,e,n){"use strict";var i=n("df7e"),r=n("ebb5"),a=r.aTypedArray,o=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;o("toReversed",(function(){return i(a(this),s(this))}))},"6f19":function(t,e,n){var i=n("9112"),r=n("0d26"),a=n("b980"),o=Error.captureStackTrace;t.exports=function(t,e,n,s){a&&(o?o(t,e):i(t,"stack",r(n,s)))}},7156:function(t,e,n){var i=n("1626"),r=n("861d"),a=n("d2bb");t.exports=function(t,e,n){var o,s;return a&&i(o=e.constructor)&&o!==n&&r(s=o.prototype)&&s!==n.prototype&&a(t,s),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7282:function(t,e,n){var i=n("e330"),r=n("59ed");t.exports=function(t,e,n){try{return i(r(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(a){}}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var i=n("1d80"),r=Object;t.exports=function(t){return r(i(t))}},"825a":function(t,e,n){var i=n("861d"),r=String,a=TypeError;t.exports=function(t){if(i(t))return t;throw a(r(t)+" is not an object")}},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var i=n("1626"),r=n("8ea1"),a=r.all;t.exports=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:i(t)||t===a}:function(t){return"object"==typeof t?null!==t:i(t)}},8925:function(t,e,n){var i=n("e330"),r=n("1626"),a=n("c6cd"),o=i(Function.toString);r(a.inspectSource)||(a.inspectSource=function(t){return o(t)}),t.exports=a.inspectSource},"8ea1":function(t,e){var n="object"==typeof document&&document.all,i="undefined"==typeof n&&void 0!==n;t.exports={all:n,IS_HTMLDDA:i}},"8f60":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{class:["ac-graffiti__wrapper",t.hidePadding&&"is-hide-padding"]},[e("div",{class:["ac-graffiti",t.hideBottomBorder&&"is-hide-bottom",t.hideTopBorder&&"is-hide-top"],attrs:{"data-scan-type":"review","data-scan-name":t.scanName,"data-scan-score":t.score}},t._l(Array(21).fill(""),(function(n,i){return e("span",{key:i,staticClass:"ac-graffiti__item"},[t._v(" "+t._s(t.getItem(i))+" ")])})),0)])},r=[],a={name:"AcGraffiti",props:{score:{type:Number,required:!0},scanName:{type:String},hidePadding:{type:Boolean,required:!1},hideBottomBorder:{type:Boolean,required:!1},hideTopBorder:{type:Boolean,required:!1}},methods:{getItem:function(t){if(20===t)return.5;if(this.score>=20)return t>9||10*t<=this.score?t%10:"";var e=20-this.score-1;return t>=e?20-t-1:""}}},o=a,s=n("2877"),c=Object(s["a"])(o,i,r,!1,null,null,null),l=c.exports;l.install=function(t){t.component(l.name,l)};e["default"]=l},"907a":function(t,e,n){"use strict";var i=n("ebb5"),r=n("07fa"),a=n("5926"),o=i.aTypedArray,s=i.exportTypedArrayMethod;s("at",(function(t){var e=o(this),n=r(e),i=a(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},"90e3":function(t,e,n){var i=n("e330"),r=0,a=Math.random(),o=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++r+a,36)}},9112:function(t,e,n){var i=n("83ab"),r=n("9bf2"),a=n("5c6c");t.exports=i?function(t,e,n){return r.f(t,e,a(1,n))}:function(t,e,n){return t[e]=n,t}},9152:function(t,e){
4
4
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
5
5
  e.read=function(t,e,n,i,r){var a,o,s=8*r-i-1,c=(1<<s)-1,l=c>>1,u=-7,h=n?r-1:0,d=n?-1:1,f=t[e+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+t[e+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+t[e+h],h+=d,u-=8);if(0===a)a=1-l;else{if(a===c)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=l}return(f?-1:1)*o*Math.pow(2,a-i)},e.write=function(t,e,n,i,r,a){var o,s,c,l=8*a-r-1,u=(1<<l)-1,h=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:a-1,p=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),e+=o+h>=1?d/c:d*Math.pow(2,1-h),e*c>=2&&(o++,c/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*c-1)*Math.pow(2,r),o+=h):(s=e*Math.pow(2,h-1)*Math.pow(2,r),o=0));r>=8;t[n+f]=255&s,f+=p,s/=256,r-=8);for(o=o<<r|s,l+=r;l>0;t[n+f]=255&o,f+=p,o/=256,l-=8);t[n+f-p]|=128*g}},"94ca":function(t,e,n){var i=n("d039"),r=n("1626"),a=/#|\.prototype\./,o=function(t,e){var n=c[s(t)];return n==u||n!=l&&(r(e)?i(e):!!e)},s=o.normalize=function(t){return String(t).replace(a,".").toLowerCase()},c=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},"986a":function(t,e,n){"use strict";var i=n("ebb5"),r=n("a258").findLast,a=i.aTypedArray,o=i.exportTypedArrayMethod;o("findLast",(function(t){return r(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"9bf2":function(t,e,n){var i=n("83ab"),r=n("0cfb"),a=n("aed9"),o=n("825a"),s=n("a04b"),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",f="writable";e.f=i?a?function(t,e,n){if(o(t),e=s(e),o(n),"function"===typeof t&&"prototype"===e&&"value"in n&&f in n&&!n[f]){var i=u(t,e);i&&i[f]&&(t[e]=n.value,n={configurable:d in n?n[d]:i[d],enumerable:h in n?n[h]:i[h],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(o(t),e=s(e),o(n),r)try{return l(t,e,n)}catch(i){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},a04b:function(t,e,n){var i=n("c04e"),r=n("d9b5");t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},a258:function(t,e,n){var i=n("0366"),r=n("44ad"),a=n("7b0b"),o=n("07fa"),s=function(t){var e=1==t;return function(n,s,c){var l,u,h=a(n),d=r(h),f=i(s,c),p=o(d);while(p-- >0)if(l=d[p],u=f(l,p,h),u)switch(t){case 0:return l;case 1:return p}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},a38e:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("53ca");n("d9e2");function r(t,e){if("object"!==Object(i["a"])(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==Object(i["a"])(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function a(t){var e=r(t,"string");return"symbol"===Object(i["a"])(e)?e:String(e)}},a640:function(t,e,n){"use strict";var i=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},ab36:function(t,e,n){var i=n("861d"),r=n("9112");t.exports=function(t,e){i(e)&&"cause"in e&&r(t,"cause",e.cause)}},aeb0:function(t,e,n){var i=n("9bf2").f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},aed9:function(t,e,n){var i=n("83ab"),r=n("d039");t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},b42e:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var e=+t;return(e>0?i:n)(e)}},b622:function(t,e,n){var i=n("da84"),r=n("5692"),a=n("1a2d"),o=n("90e3"),s=n("04f8"),c=n("fdbf"),l=i.Symbol,u=r("wks"),h=c?l["for"]||l:l&&l.withoutSetter||o;t.exports=function(t){return a(u,t)||(u[t]=s&&a(l,t)?l[t]:h("Symbol."+t)),u[t]}},b639:function(t,e,n){"use strict";(function(t){
6
6
  /*!