UNPKG

xc-workflow-ui

Version:

基于vant二次封装工作流组件库

1 lines 273 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue"),require("dayjs"),require("js-audio-recorder"),require("lamejs"),require("xczg-map")):"function"==typeof define&&define.amd?define(["vue",,,,],e):"object"==typeof exports?exports["xc-workflow-ui"]=e(require("vue"),require("dayjs"),require("js-audio-recorder"),require("lamejs"),require("xczg-map")):t["xc-workflow-ui"]=e(t.Vue,t.dayjs,t["js-audio-recorder"],t.lamejs,t["xczg-map"])}(self,((__WEBPACK_EXTERNAL_MODULE__1895__,__WEBPACK_EXTERNAL_MODULE__4553__,__WEBPACK_EXTERNAL_MODULE__5278__,__WEBPACK_EXTERNAL_MODULE__4130__,__WEBPACK_EXTERNAL_MODULE__1359__)=>(()=>{"use strict";var __webpack_modules__={6568:t=>{function e(){return e=Object.assign?Object.assign.bind():function(t){for(var e,n=1;n<arguments.length;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},e.apply(this,arguments)}var n=["attrs","props","domProps"],r=["class","style","directives"],i=["on","nativeOn"],o=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,a){for(var s in a)if(t[s])if(-1!==n.indexOf(s))t[s]=e({},t[s],a[s]);else if(-1!==r.indexOf(s)){var c=t[s]instanceof Array?t[s]:[t[s]],l=a[s]instanceof Array?a[s]:[a[s]];t[s]=[].concat(c,l)}else if(-1!==i.indexOf(s))for(var u in a[s])if(t[s][u]){var h=t[s][u]instanceof Array?t[s][u]:[t[s][u]],f=a[s][u]instanceof Array?a[s][u]:[a[s][u]];t[s][u]=[].concat(h,f)}else t[s][u]=a[s][u];else if("hook"===s)for(var d in a[s])t[s][d]=t[s][d]?o(t[s][d],a[s][d]):a[s][d];else t[s]=a[s];else t[s]=a[s];return t}),{})}},8219:(t,e,n)=>{function r(t){return r="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},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(o=i.key,a=void 0,a=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"),"symbol"===r(a)?a:String(a)),i)}var o,a}function o(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}function a(t,e){return function(t,e){if(e.get)return e.get.call(t);return e.value}(t,c(t,e,"get"))}function s(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,c(t,e,"set"),n),n}function c(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}n.d(e,{Q:()=>h});var l=new WeakMap,u=new WeakMap,h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),o(this,l,{writable:!0,value:void 0}),o(this,u,{writable:!0,value:function(t,e){var n=t.data,r=t.code,i=t.success,o=t.msg,a=!0;return 200===r&&i||(a=!a),!a&&console.warn(o||"response parse error while using default response handle!"),a?n:e}})}var e,n,r;return e=t,(n=[{key:"registerCustomHandle",value:function(t){var e=!1;return"function"==typeof t&&(e=!0,s(this,l,t)),e}},{key:"handleResponse",value:function(t,e){return"function"==typeof a(this,l)?a(this,l).call(this,t):a(this,u).call(this,t,e)}}])&&i(e.prototype,n),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4592:(t,e,n)=>{function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}n.d(e,{Hl:()=>d,Ih:()=>a,JT:()=>h,Jx:()=>f,TD:()=>o,an:()=>s,ey:()=>l,kl:()=>p,u7:()=>u,xd:()=>c});var o=function(t){return function(e){e.component(t.name,t)}},a=function(t){return{type:String,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||""}},s=function(t){return{type:Number,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||0}},c=function(t){return{type:Boolean,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||!1}},l=function(t){return{type:Function,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||function(){}}},u=function(t){return{type:Array,required:arguments.length>1&&void 0!==arguments[1]&&arguments[1],default:t||[]}},h=function(t){return t.sort((function(t,e){return t.propertyOrder?e.propertyOrder?t.propertyOrder-e.propertyOrder:-1:1}))},f=function(t){var e=[];return t.forEach((function(t,n){var i=r(t,1)[0],o=i.groupOrder,a=i.groupName;e.push({groupOrder:o,groupName:a})})),e.sort((function(t,e){return t.groupOrder?e.groupOrder?t.groupOrder-e.groupOrder:-1:1})).map((function(e){var n=e.groupName;return[n,h(t.get(n))]}))},d="其他信息",p="基本信息"},5891:(t,e,n)=>{n.d(e,{EX:()=>l,Eq:()=>c,JR:()=>s,ml:()=>a});var r=n(4130),i=n.n(r),o=new RegExp("[`~!@#$^&*(){}':;',\\[\\]《》/?~!@#¥……&*()|{}【】‘;:”“'。,、?]"),a=function(t){return o.test(t)},s=function(t){t=Math.round(t);var e=parseInt(t/60/60%24);e=e<10?"0"+e:e;var n=parseInt(t/60%60);n=n<10?"0"+n:n;var r=parseInt(t%60);return e+":"+n+":"+(r=r<10?"0"+r:r)},c=function(t,e){for(var n=i().WavHeader.readHeader(t),r=n.channels,o=n.sampleRate,a=new(i().Mp3Encoder)(r,o,128),s=e.getChannelData(),c=[],l=s.left&&new Int16Array(s.left.buffer,0,s.left.byteLength/2),u=s.right&&new Int16Array(s.right.buffer,0,s.right.byteLength/2),h=l.length+(u?u.length:0),f=1152,d=0;d<h;d+=f){var p=l.subarray(d,d+f),m=null,v=null;2===r?(m=u.subarray(d,d+f),(v=a.encodeBuffer(p,m)).length>0&&c.push(v)):(v=a.encodeBuffer(p)).length>0&&c.push(v)}var y=a.flush();y.length>0&&c.push(y);var g=new Blob(c,{type:"audio/mp3"});return new File([g],(new Date).getTime()+".mp3")},l=","},1380:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Co:()=>parseCompParam,fP:()=>getOrderedComponentConfig,g7:()=>getComponentProps});var _component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4592);function _typeof(t){return _typeof="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},_typeof(t)}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){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 _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _toArray(t){return _arrayWithHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableRest()}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}function _arrayWithHoles(t){if(Array.isArray(t))return t}var generateComponentName=function(t){var e=t.charAt(0).toUpperCase();return"Xc".concat(e).concat(t.slice(1))},CollectComponentName={field:generateComponentName("textarea"),linkSelect:generateComponentName("linkSelect"),actionSheet:generateComponentName("actionSheet"),datepicker:generateComponentName("datepicker"),uploader:generateComponentName("uploader"),recordAudio:generateComponentName("recordAudio"),location:generateComponentName("location"),cascader:generateComponentName("cascader"),radio:generateComponentName("radio"),checkbox:generateComponentName("checkbox"),select:generateComponentName("select"),userSelect:generateComponentName("userSelect")},parseCompParam=function(t){return t.split(";").filter(Boolean).reduce((function(t,e){var n=_slicedToArray(e.split(":"),2),r=n[0],i=n[1];switch(r){case"maxSize":i=1024*(i?Number.parseInt(i):5)*1024;break;case"maxLength":i=i?Number.parseInt(i):200;break;case"showLimit":r="showWordLimit",i="true"===i;break;case"max":i=i?Number.parseInt(i):1/0;break;case"min":i=i?Number.parseInt(i):-1/0;break;case"format":var o=_toArray(e.split(":"));o[0];i=o.slice(1).join(":")}return _objectSpread(_objectSpread({},t),{},_defineProperty({},r,i))}),{})},getComponentProps=function getComponentProps(conf,props,form){var componentType=conf.componentType,propertyName=conf.propertyName,isRequired=conf.isRequired,comment=conf.comment,validateRule=conf.validateRule,validateMessage=conf.validateMessage,required=!!isRequired,formFieldProps=_objectSpread(_objectSpread({name:propertyName,label:comment,border:!1,required},props),{},{placeholder:props.placeholder||"请".concat(["input","texterea","textarea"].includes(componentType)?"输入":"点击选择").concat(comment),rules:[{required,pattern:eval(validateRule||""),message:function(t,e){return validateMessage||"必填项"}}]}),name="",extra={};switch(componentType){case"input":case"texterea":case"textarea":name=CollectComponentName.field;var storageKey=props.storageKey,fromStorage=props.fromStorage,readonly=props.readonly;extra={fromStorage:!(!fromStorage||"1"!==fromStorage),storageKey,readonly:!!readonly};break;case"date":case"daterange":name=CollectComponentName.datepicker;var compType=props.compType,valueFormat=props.valueFormat,format=props.format,type=props.type,formatFromConf=format||valueFormat;extra={type:type||compType||"date",format:"string"==typeof formatFromConf&&formatFromConf?formatFromConf.replaceAll("y","Y").replaceAll("d","D"):"YYYY-MM-DD"};break;case"select":name=CollectComponentName.select;break;case"actionsheet":name=CollectComponentName.actionSheet;var hideSearch=props.hideSearch;extra={hideSearch:"1"===hideSearch};break;case"linkSelect":case"regionselect":name=CollectComponentName.linkSelect,"regionselect"===componentType&&(extra={selectType:!0});break;case"xc-voice":name=CollectComponentName.recordAudio;break;case"file":name=CollectComponentName.uploader,extra={id:conf.id};break;case"cascader":name=CollectComponentName.cascader;break;case"custommap":name=CollectComponentName.location;var jd=form.jd,wd=form.wd,gridApi=props.gridApi;if(jd&&wd&&(extra={jd,wd}),gridApi&&"string"==typeof gridApi){var _gridApi$split=gridApi.split("|"),_gridApi$split2=_slicedToArray(_gridApi$split,2),on=_gridApi$split2[0],outGridTip=_gridApi$split2[1];"on"===on&&(extra=_objectSpread(_objectSpread({},extra),{},{outGridTip}))}break;case"radio":name=CollectComponentName.radio;break;case"checkbox":name=CollectComponentName.checkbox,extra={selectCount:Number.parseInt(props.selectCount)};break;case"userSelect":name=CollectComponentName.userSelect;break;default:console.warn("fieldName: ".concat(propertyName," type: ").concat(componentType," not currently supported"))}return{name,propertyName,baseProps:_objectSpread(_objectSpread({},formFieldProps),extra)}},getOrderedComponentConfig=function(t){var e=t.reduce((function(t,e){var n=e.groupName;return n===_component__WEBPACK_IMPORTED_MODULE_0__.kl?t.mainGroupUnordered.push(e):n!==_component__WEBPACK_IMPORTED_MODULE_0__.Hl&&n?t.customGroupUnordered.has(n)?t.customGroupUnordered.get(n).push(e):t.customGroupUnordered.set(n,[e]):t.defaultGroupUnordered.push(e),t}),{mainGroupUnordered:[],defaultGroupUnordered:[],customGroupUnordered:new Map}),n=e.mainGroupUnordered,r=e.customGroupUnordered,i=(e.mediaGroupUnordered,e.defaultGroupUnordered);return[].concat(_toConsumableArray((0,_component__WEBPACK_IMPORTED_MODULE_0__.JT)(n)),_toConsumableArray((0,_component__WEBPACK_IMPORTED_MODULE_0__.Jx)(r).map((function(t){var e=_slicedToArray(t,2);e[0];return e[1]})).flat(1)),_toConsumableArray((0,_component__WEBPACK_IMPORTED_MODULE_0__.JT)(i)))}},4054:(t,e,n)=>{n.d(e,{o:()=>r});var r={prop:"text",event:"change"}},3456:(t,e,n)=>{n.d(e,{AL:()=>p,ak:()=>m,dk:()=>v,lC:()=>y,m7:()=>u,mo:()=>l,w2:()=>f,wn:()=>d,xB:()=>h});var r=n(4592);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)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c={required:(0,r.xd)(),placeholder:(0,r.Ih)(),label:(0,r.Ih)(),border:(0,r.xd)(!0),rules:(0,r.u7)(),name:(0,r.Ih)(),dictCode:(0,r.Ih)(),defaultValue:(0,r.Ih)(),editable:(0,r.xd)(!0,!1),text:[String,Number]},l=a(a({},c),{},{maxLength:(0,r.an)(200),rows:(0,r.an)(3),showWordLimit:(0,r.xd)(),visible:(0,r.xd)(),type:(0,r.Ih)(),min:(0,r.an)(-1/0),max:(0,r.an)(1/0),storageKey:(0,r.Ih)(""),fromStorage:(0,r.xd)(!1),readonly:(0,r.xd)(!1)}),u=a(a({},c),{},{linkComponents:(0,r.Ih)(),refer:(0,r.Ih)(),description:(0,r.Ih)(),hideSearch:(0,r.xd)()}),h=a(a({},c),{},{selectCount:(0,r.an)()}),f=a(a({},c),{},{accept:(0,r.Ih)("*"),breakChar:(0,r.Ih)(","),visible:(0,r.xd)(),maxSize:(0,r.an)(5242880),id:[String,Number],maxCount:{type:[String,Number],default:9},text:[String,Array]}),d=a(a({},c),{},{type:(0,r.Ih)("date"),title:(0,r.Ih)(),format:(0,r.Ih)(),visible:(0,r.xd)(),linkComponents:(0,r.Ih)(""),calcType:(0,r.Ih)("")}),p=a(a({},c),{},{title:(0,r.Ih)(),parentId:(0,r.Ih)(),refer:(0,r.Ih)(),companion:(0,r.Ih)(),visible:(0,r.xd)(),selectType:(0,r.xd)(),queryParam:(0,r.Ih)(),regionId:(0,r.Ih)()}),m=a(a({},c),{},{latfield:(0,r.Ih)("wd"),lngfield:(0,r.Ih)("jd"),visible:(0,r.xd)(),jd:(0,r.Ih)(),wd:(0,r.Ih)(),mode:(0,r.Ih)("locate"),category:(0,r.Ih)("cateNode"),subcategory:(0,r.Ih)("subCategory"),outGridTip:(0,r.Ih)("")}),v=a(a({},c),{},{companion:(0,r.Ih)(),visible:(0,r.xd)()}),y=a(a({},c),{},{visible:(0,r.xd)()})},8789:(t,e,n)=>{n.d(e,{s:()=>r});var r=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"value";if(!t.length||!e)return"";var i=t.findIndex((function(t){return t[n]===e}));return i<0?(console.warn("dict key: ".concat(e," value not found")),{result:""}):{result:t[i][r],curDict:t[i],curIndex:i}}},1940:(t,e,n)=>{n.d(e,{Z:()=>U});var r=n(4761),i=n(478),o=n(6900),a=n(6314),s=n(728),c=n(6836),l=n(6682),u=n(9447),h=n(3584),f=n(5944),d=n(4592),p=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-field",{class:{"xc-collect-field--elder":t.isElder,"xc-collect-field__value--hidden":!0,"xc-collect-field":!0},attrs:{value:t.result,label:t.label,placeholder:t.placeholder,required:t.required,border:t.border,rules:t.rules,name:t.name,"label-class":"xc-collect-field__label",readonly:""},on:{click:t.selectData}}),t._v(" "),n("div",{staticClass:"option__content",class:t.isElder&&"option__content--elder",style:t.gridColumnTemplate},t._l(t.actions,(function(e,r){return n("div",{key:r,staticClass:"option__item",class:t.chosenItemIndex===r&&"option__item--selected"},[n("span",{on:{click:function(n){return t.onChoose(e,r)}}},[t._v("\n "+t._s(e.name)+"\n ")])])})),0)],1)};p._withStripped=!0;n(8735);var m=n(7132),v=n(3456),y=n(8789),g=n(4054),b=n(8219);function w(t){return w="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},w(t)}var x=["dictValue"];function S(){S=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:j(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var x={};l(x,a,(function(){return this}));var k=Object.getPrototypeOf,_=k&&k(k(T([])));_&&_!==n&&r.call(_,a)&&(x=_);var C=b.prototype=y.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,o,a,s){var c=h(t[i],t,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==w(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function j(e,n,r){var i=f;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=L(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=h(e,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function L(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(w(e)+" is not iterable")}return g.prototype=b,i(C,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(C),t},e.awrap=function(t){return{__await:t}},O(E.prototype),l(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new E(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(C),l(C,c,"Generator"),l(C,a,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},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),v},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),P(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){C(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==w(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===w(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function E(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function j(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){E(o,r,i,a,s,"next",t)}function s(t){E(o,r,i,a,s,"throw",t)}a(void 0)}))}}function L(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I(t,e)}(t)||function(){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 I(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}const P={name:"XcSelect",components:{VanField:m.Z},model:g.o,props:v.m7,inject:["loadDict","isElder"],data:function(){return{visible:!1,actions:[],result:"",chosenItemIndex:-1}},computed:{gridColumnTemplate:function(){var t=this.actions.length;return t>=4||t>=4?"":{"grid-template-columns":"repeat(".concat(t,", calc(").concat(Math.floor(100/t),"% - ").concat(Math.floor(8*(t-1)/t),"px))")}}},watch:{text:function(t){t||(this.result="",this.chosenItemIndex=-1)}},methods:{onSelect:function(t){var e=t.dictValue,n=t.dictKey;this.result=e,this.$emit("change",n)},onChoose:function(t,e){this.chosenItemIndex=e,this.onSelect(t);var n=this.linkComponents;if(n){var r=n.split("|").reduce((function(t,n,r){return r===e?t.showFields=n.split(","):t.hiddenFields=[].concat(L(t.hiddenFields),L(n.split(","))),t}),{hiddenFields:[],showFields:[]}),i=r.hiddenFields,o=r.showFields;this.$emit("link-component",{showFields:o,hiddenFields:i})}},selectData:function(){this.editable&&(this.visible=!0)},loadData:function(){var t=this;return j(S().mark((function e(){var n,r,i,o,a,s,c,l;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dictCode,r=t.loadDict,i=t.defaultValue,e.t0=new b.Q,e.next=4,r(n);case 4:e.t1=e.sent,o=e.t0.handleResponse.call(e.t0,e.t1),a=(0,y.s)(o,i,"dictKey","dictValue"),s=a.result,c=a.curDict,l=a.curIndex,s&&o.length<=8&&t.onChoose(c,l),t.actions=o.map((function(t){var e=t.dictValue;return _(_({},O(t,x)),{},{dictValue:e,name:e})}));case 9:case"end":return e.stop()}}),e)})))()}},mounted:function(){var t=this;return j(S().mark((function e(){var n,r,i,o,a,s;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.loadData();case 2:if(n=t.text,r=t.actions,n){e.next=5;break}return e.abrupt("return");case 5:if(-1!==(i=r.findIndex((function(t){return t.dictKey===n})))){e.next=10;break}return t.$emit("change",""),console.warn("字典匹配失败!"),e.abrupt("return");case 10:o=r[i],a=o.dictValue,s=o.dictKey,t.result=a,t.chosenItemIndex=i,t.$emit("change",s);case 14:case"end":return e.stop()}}),e)})))()}};var A=n(1900);const T=(0,A.Z)(P,p,[],!1,null,"032bf2f4",null).exports;T.install=(0,d.TD)(T);const N=T;var D=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}]},[t.visible?n("van-field",{staticClass:"xc-collect-field",class:t.isElder&&"xc-collect-field--elder",attrs:{value:t.text,label:t.label,placeholder:t.placeholder,required:t.required,border:t.border,rules:t.rules,name:t.name,"label-class":"xc-collect-field__label",readonly:""},on:{click:function(e){t.show=!t.show}}}):t._e(),t._v(" "),n("van-popup",{staticClass:"xc-popup__container",attrs:{position:"right"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[n("div",{staticClass:"xc-popup__wrapper"},[n("van-search",{attrs:{placeholder:"搜索人员",shape:"round"},on:{input:t.getUserSelectList,clear:t.getUserSelectList},model:{value:t.query,callback:function(e){t.query=e},expression:"query"}}),t._v(" "),t.nameIndexList.length?n("van-index-bar",{attrs:{"index-list":t.nameIndexList,sticky:!1}},t._l(t.nameIndexList,(function(e,r){return n("div",{key:r},[n("van-index-anchor",{attrs:{index:e}}),t._v(" "),t._l(t.userList[r],(function(r,i){var o=r.userName,a=r.deptName,s=r.postName,c=r.id;return n("van-cell",{key:""+e+i,attrs:{title:o,label:(a?a+"|":"")+(s||"")},on:{click:function(e){return t.handleSelect(c,o)}}})}))],2)})),0):n("van-empty",{attrs:{image:"https://img01.yzcdn.cn/vant/custom-empty-image.png",description:"暂无数据","image-size":"50"}})],1)])],1)};D._withStripped=!0;n(2742);var B=n(6689),V=(n(2355),n(9233)),F=(n(3474),n(4755));function $(t){return $="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},$(t)}function M(){M=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new I(r||[]);return i(a,"_invoke",{value:O(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(P([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=b.prototype=y.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,o,a,s){var c=h(t[i],t,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==$(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var i=f;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=h(e,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function E(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function j(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError($(e)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},_(C.prototype),l(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=P,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},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),v},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),L(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}function R(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function z(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){R(o,r,i,a,s,"next",t)}function s(t){R(o,r,i,a,s,"throw",t)}a(void 0)}))}}const Z={name:"XcUserSelect",inject:["getUserTitleList","isElder"],model:g.o,props:v.dk,components:{VanField:m.Z,VanPopup:F.Z,VanCell:V.Z},data:function(){return{show:!1,nameIndexList:[],userList:[],query:"",currentId:"",timer:0}},methods:{getUserSelectList:function(){var t=this;return z(M().mark((function e(){return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.timer&&clearTimeout(t.timer),t.timer=setTimeout(z(M().mark((function e(){var n,r,i,o,a,s,c;return M().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.getUserTitleList,r=t.query,i=B.Z.loading({forbidClick:!0,duration:0,message:"加载中"}),e.t0=new b.Q,e.next=5,n(r);case 5:e.t1=e.sent,o=e.t0.handleResponse.call(e.t0,e.t1),i.clear(),a=o.reduce((function(t,e){var n=e.groupName,r=e.users;return t.nameIndexList.push(n),t.userList.push(r),t}),{nameIndexList:[],userList:[]}),s=a.nameIndexList,c=a.userList,t.nameIndexList=s,t.userList=c;case 11:case"end":return e.stop()}}),e)}))),500);case 2:case"end":return e.stop()}}),e)})))()},handleSelect:function(t,e){var n=this.companion;this.$emit("change",e),n&&this.$emit("sync-companion",{key:n,val:t}),this.show=!this.show}},mounted:function(){this.getUserSelectList()}};const G=(0,A.Z)(Z,D,[],!1,null,"3f2f7c76",null).exports;G.install=(0,d.TD)(G);const q=G,U={XcUploader:r.default,XcTextarea:i.default,XcLocation:o.default,XcDatepicker:a.default,XcActionSheet:c.default,XcLinkSelect:s.default,XcRecordAudio:l.default,XcCascader:u.default,XcRadio:h.default,XcCheckbox:f.default,XcSelect:N,XcUserSelect:q}},6836:(t,e,n)=>{n.d(e,{default:()=>$});var r=n(4592),i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-field",{staticClass:"xc-collect-field",class:{"xc-collect-field--elder":t.isElder},attrs:{value:t.result,label:t.label,placeholder:t.placeholder,required:t.required,border:t.border,rules:t.rules,name:t.name,"label-class":"xc-collect-field__label",readonly:""},on:{click:t.selectData}}),t._v(" "),n("van-action-sheet",{style:t.responsiveStyle,attrs:{actions:t.filterActions,description:t.description||t.placeholder,"cancel-text":"取消","close-on-click-action":"",round:""},on:{select:t.onSelect},model:{value:t.visible,callback:function(e){t.visible=e},expression:"visible"}},[t.hideSearch?t._e():n("van-search",{attrs:{slot:"description",placeholder:"搜索"+t.label,shape:"round"},on:{input:t.handleSearchAction,clear:t.handleSearchAction},slot:"description",model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}}),t._v(" "),t.filterActions.length||t.hideSearch?t._e():n("van-empty",{attrs:{image:"search",description:"没有找到对应的选项"}})],1)],1)};i._withStripped=!0;n(6629),n(6799),n(1383),n(2293),n(677),n(5388);var o=n(9592),a=n(6568),s=n.n(a),c=n(1895),l=n.n(c),u=n(5976),h=n(6122),f=n(9339),d=n(1392),p=n(4755),m=n(3432),v=(0,u.d)("action-sheet"),y=v[0],g=v[1];function b(t,e,n,r){var i=e.title,o=e.cancelText,a=e.closeable;function c(){(0,h.j8)(r,"input",!1),(0,h.j8)(r,"cancel")}return t(p.Z,s()([{class:g(),attrs:{position:"bottom",round:e.round,value:e.value,overlay:e.overlay,duration:e.duration,lazyRender:e.lazyRender,lockScroll:e.lockScroll,getContainer:e.getContainer,closeOnPopstate:e.closeOnPopstate,closeOnClickOverlay:e.closeOnClickOverlay,safeAreaInsetBottom:e.safeAreaInsetBottom}},(0,h.ED)(r,!0)]),[function(){if(i)return t("div",{class:g("header")},[i,a&&t(d.Z,{attrs:{name:e.closeIcon},class:g("close"),on:{click:c}})])}(),function(){var r=(null==n.description?void 0:n.description())||e.description;if(r)return t("div",{class:g("description")},[r])}(),t("div",{class:g("content")},[e.actions&&e.actions.map((function(n,i){var o=n.disabled,a=n.loading,s=n.callback;return t("button",{attrs:{type:"button"},class:[g("item",{disabled:o,loading:a}),n.className],style:{color:n.color},on:{click:function(t){t.stopPropagation(),o||a||(s&&s(n),e.closeOnClickAction&&(0,h.j8)(r,"input",!1),l().nextTick((function(){(0,h.j8)(r,"select",n,i)})))}}},[a?t(m.Z,{class:g("loading-icon")}):[t("span",{class:g("name")},[n.name]),n.subname&&t("div",{class:g("subname")},[n.subname])]])})),null==n.default?void 0:n.default()]),function(){if(o)return[t("div",{class:g("gap")}),t("button",{attrs:{type:"button"},class:g("cancel"),on:{click:c}},[o])]}()])}b.props=(0,o.Z)({},f.M,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnPopstate:Boolean,closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});const w=y(b);n(8735);var x=n(7132),S=n(3456),k=n(8789),_=n(4054),C=n(8219);function O(t){return O="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},O(t)}var E=["dictValue"];function j(){j=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(T([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=b.prototype=y.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,o,a,s){var c=h(t[i],t,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==O(u)&&r.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(u).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=f;return function(o,a){if(i===p)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=L(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var l=h(e,n,r);if("normal"===l.type){if(i=r.done?m:d,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=m,r.method="throw",r.arg=l.arg)}}}function L(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function I(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 P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(O(e)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},_(C.prototype),l(C.prototype,s,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new C(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(t