(self.webpackChunk_client_app_store=self.webpackChunk_client_app_store||[]).push([[3965],{17457:function(t,e,n){"use strict";n.d(e,{Z:function(){return s}});var r=function(){return(0,this._self._c)("span",{staticClass:"app_priceInfo_text",class:{app_priceInfo_text_warn:this.isUserOverflow}},[this._v("\n  "+n(11974).nI().t("已选{0}人",[this.userCount])+"\n  "),this.showVerison?[this.isUserOverflow?[this._v(" "+n(11974).nI().t("，超过购买人数")+" ")]:this.paidInfo.paid_user_count?[this._v("\n      "+n(11974).nI().t("，可用人数{0}",[this._f("formatUserCount")(this.paidInfo)])+"\n    ")]:[1===this.curPriceInfo.priceinfo_type&&this.versions.length>=1?[this._v("\n        "+n(11974).nI().t("，{0}",[this.curPriceInfo.priceText.rule])+"\n      ")]:this._e(),this._v(" "),2===this.curPriceInfo.priceinfo_type&&this.curPriceInfo.price_rule&&1!==this.curPriceInfo.price_rule.rule_type?[this._v("\n        "+n(11974).nI().t("，可用人数{0}",[this._f("formatUserCount")(this.priceInfo)])+"\n      ")]:this._e()]]:this._e()],2)};r._withStripped=!0;var i=n(40217),o=n(2271),s=(0,n(6080).Z)({name:"AppPriceInfoText",components:{},filters:{formatUserCount:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.paid_user_count===i.Aj?n(11974).nI().t("无限制"):n(11974).nI().t("{0}人",[t.paid_user_count])}},props:{versions:{type:Array,default:function(){return[]}},priceInfo:{type:Object,default:function(){}},paidInfo:{type:Object,default:function(){}},userCount:{type:Number},showVerison:{type:Boolean,default:!0}},data:function(){return{}},computed:{curPriceInfo:function(){return(0,o.Ig)(this.priceInfo)},paidUserCount:function(){return this.paidInfo?this.paidInfo.paid_user_count:i.Aj},isUserOverflow:function(){return this.userCount>this.paidUserCount}}},r,[],!1,null,"795bf238",null).exports},43965:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return E}});var r=function(){var t=this,e=t._self._c;return t.isCommonCase&&t.showBatchSelect?e("AppBatchSelect",{attrs:{"app-list":t.caseApps,"batch-select-apps":t.batchSelectApps,title:t.promotionCaseInfo.title,"batch-pre-check":t.batchPreCheck,"batch-price-info":t.batchPriceInfo,"is-admin-auth":""},on:{submit:t.batchSelectSubmit}}):t.isCommonCase&&t.showBatchFail?e("AuthBatchFail",{attrs:{"app-list":t.authApps,"batch-err-info":t.batchErrInfo,tel:t.telephone},on:{submit:t.navCaseDetail}}):e("AuthLayout",[e("div",{staticClass:"industry_adminAuth_top"},[e("div",{staticClass:"title"},[t._v("\n      "+t._s(t.promotionCaseInfo.title)+"\n    ")]),t._v(" "),e("PriceInfo",{attrs:{versions:t.displayIndustryVersions,"case-id":t.promotionCaseInfo.open_case_id,"price-info":t.industryCurrentVersion,"paid-info":t.industryPaidAppInfo}})],1),t._v(" "),e("AuthDesc",{attrs:{"text-list":t.authDesc}}),t._v(" "),t.batchRangeMode&&t.isCommonCase?[e("CntSection",[e("div",{staticClass:"industry_batch_title"},[t._v(n(11974).nI().t("应用"))]),t._v(" "),t._l(t.authApps,function(n){return e("div",{key:n.thirdapp_id,staticClass:"industry_batch_appItem"},[e("img",{attrs:{src:n.logo}}),t._v(" "),e("span",[t._v(t._s(n.app_name))])])})],2),t._v(" "),e("AppRange",{attrs:{title:n(11974).nI().t("可见范围")},on:{headClick:function(e){return t.selectContact("batch")}}},[e("AuthRangeText",{attrs:{slot:"head_right",scope:t.batchAppScope.scope,"user-count":t.batchAppScope.count},slot:"head_right"}),t._v(" "),e("div",{staticClass:"industry_range_info",attrs:{slot:"content"},slot:"content"},[e("AppPriceInfoText",{attrs:{"user-count":t.batchAppScope.count,"show-verison":!1}})],1)],1)]:t._l(t.authApps,function(r){return e("AppRange",{key:r.thirdapp_id,attrs:{title:n(11974).nI().t("可见范围")},on:{headClick:function(e){return t.selectContact(r.thirdapp_id)}}},[e("div",{staticClass:"industry_range_top",attrs:{slot:"head_top"},slot:"head_top"},[e("img",{attrs:{src:r.logo}}),t._v(" "),e("span",[t._v(t._s(r.app_name))])]),t._v(" "),e("AuthRangeText",{attrs:{slot:"head_right",scope:t.appScope[r.thirdapp_id].scope,"user-count":t.appScope[r.thirdapp_id].count},slot:"head_right"}),t._v(" "),e("div",{staticClass:"industry_range_info",attrs:{slot:"content"},slot:"content"},[e("AppPriceInfoText",{attrs:{"user-count":t.appScope[r.thirdapp_id].count,versions:t.getAppVersions(r.thirdapp_id),"price-info":t.getAppCurrentVersion(r.thirdapp_id),"paid-info":t.getPaidAppInfo(r.thirdapp_id)}})],1)],1)}),t._v(" "),t.isCommonCase&&t.canChangeMode?e("div",{staticClass:"industry_app_batchInfo"},[t._v("\n    "+n(11974).nI().t("当前为{0}可见范围",[t.batchRangeMode?n(11974).nI().t("批量选择"):n(11974).nI().t("单独选择")])+"\n    "),e("div",{staticClass:"actionWrap",on:{click:function(e){t.batchRangeMode=!t.batchRangeMode}}},[e("a",{attrs:{href:"javascript:;"}},[t._v(n(11974).nI().t("改为{0}",[t.batchRangeMode?n(11974).nI().t("单独选择"):n(11974).nI().t("批量选择")]))]),t._v(" "),e("IconBlueArrow")],1)]):t._e(),t._v(" "),e("PermissionInfo",{attrs:{config:t.privilegeConfig,apps:t.authApps,"brand-name":t.brandName,"auth-mode":t.authMode,"oper-table":t.operTable}}),t._v(" "),e("PermissionCheck",{ref:"permissionCheck",attrs:{"case-info":t.promotionCaseInfo,apps:t.authApps,config:t.privilegeConfig,"brand-name":t.brandName}}),t._v(" "),e("AuthFooter",{attrs:{agreements:t.agreements,submitting:t.btnDisabled,"btn-disabled":t.btnDisabled},on:{submit:t.authSubmit}})],2)};r._withStripped=!0;var i=n(34108),o=n(87879),s=n(79394),a=n(97161),c=n(58092),u=n(85131),p=n.n(u),l=n(40217),f=n(93646),h=n(79736),d=n(86055),m=n(38425),v=n(23768),b=n(17457),_=n(72945),y=n(2777),g=n(89536),I=n(17272),w=n(51786),C=n(82483),A=n(6497),S=n(61899),P=n(62330);function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function k(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(u){n(u);return}a.done?e(c):Promise.resolve(c).then(r,i)}function x(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function s(t){k(o,r,i,s,a,"next",t)}function a(t){k(o,r,i,s,a,"throw",t)}s(void 0)})}}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}function Z(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}function q(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n,r,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(c){a=!0,r=c}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(t,e)}}(t,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n(3082);var T=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},D={components:{AppBatchSelect:v.Z,AuthBatchFail:y.Z,AuthLayout:f.Z,AuthFooter:I.Z,PriceInfo:P.Z,CntSection:C.Z,AuthDesc:g.Z,AppRange:_.Z,PermissionInfo:S.Z,PermissionCheck:A.Z,IconBlueArrow:p(),AppPriceInfoText:b.Z,AuthRangeText:w.Z},mixins:[h.aC,h.BG],asyncData:function(t){return x(function(){var e,n,r,i,o,s,a,u,p,l,f,d;return T(this,function(m){switch(m.label){case 0:return e=t.query.id||t.query.open_case_id,[4,Promise.all([t.$request(c.v4,{open_case_id:e}),t.$request(c.Gi)])];case 1:return i=(r=(n=q.apply(void 0,[m.sent(),2]))[0]).authCaseInfo,o=r.authPriceInfo,s=r.isPayAccountRegisted,a=n[1].authMember,p=(u=(null==i?void 0:i.promotion_case_info)||{}).app_item||[],l=0===u.case_type,f={},p.forEach(function(t){f[t.thirdapp_id]={scope:{members:[a],parties:[],tags:[]},app_perm:{vid_item:[a.vid]},scopeStr:a.name,count:1}}),d=[{},{promotionCaseInfo:u,caseApps:p,authPriceInfo:o,authCaseInfo:i,appScope:f,batchAppScope:{scope:{members:[a],parties:[],tags:[]},app_perm:{vid_item:[a.vid]},scopeStr:a.name,count:1},isCommonCase:l,isPayAccountRegisted:s}],[4,(0,h.Gy)(t,p)];case 2:return[2,j.apply(void 0,d.concat([m.sent()]))]}})})()},data:function(){return{btnDisabled:!1,showContactsSelect:!1,contactsConfig:{},showPriceInfoList:!1}},head:function(){return{title:n(11974).nI().t("使用方案")}},computed:{ctrl:function(){return this.$ctrl.auth},authApps:function(){return this.isCommonCase?this.batchSelectApps:this.caseApps},installApps:function(){var t=this;return this.authApps.map(function(e){var n=t.appScope[e.thirdapp_id].app_perm;return t.batchRangeMode&&t.isCommonCase&&(n=t.batchAppScope.app_perm),j({thirdapp_id:e.thirdapp_id},n)})},brandName:function(){var t;return null===(t=this.authCaseInfo.servicecorp_info)||void 0===t?void 0:t.brand_name},servicecorpInfo:function(){return this.authCaseInfo.servicecorp_info},strcorpid:function(){var t;return null===(t=this.authCaseInfo.servicecorp_info)||void 0===t?void 0:t.servicecorp_id},authMode:function(){return d.vB.AuthMode_Manager},operTable:function(){return"eSuiteOpTableNormal"},privilegeConfig:function(){var t;return null===(t=this.authCaseInfo.app_config_list)||void 0===t?void 0:t.config},authDesc:function(){return this.isCommonCase?[n(11974).nI().t("添加后，以下应用将出现在可见范围员工的工作台")]:[n(11974).nI().t('添加后，行业方案"{0}"中的全部应用将出现在可见范围员工的工作台。',[this.promotionCaseInfo.title])]},agreements:function(){return(0,a.map)(this.authApps,function(t){return t.agreement_entry_control})},installScene:function(){return l.j2[this.$route.query.from]}},mounted:function(){this.$reportStat({key:this.$clientEnv.statKey,item:"admin_addapp_page_show"}),this.contactPicker=(0,i.G)({config:{allowEmpty:!0,needCount:!0,title:n(11974).nI().t("设置可见范围"),searchTab:!0,selectable:{parties:!0,members:!0,tags:!0},searchable:{parties:!0,members:!0,tags:!0}}})},methods:{authSubmit:function(){return x(function(){var t,e,r,i,a,u,p,l,f,h;return T(this,function(d){switch(d.label){case 0:this.$reportStat({key:this.$clientEnv.statKey,item:"admin_addapp_auth_click"}),this.btnDisabled=!0,e={install_app_item:this.installApps,opt:(null===(t=this.$refs.permissionCheck)||void 0===t?void 0:t.getOpt())||[],scene:this.installScene},this.isCommonCase||(e.open_case_id=this.promotionCaseInfo.open_case_id),d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,this.$request(c.dk,e,{silent:!0})];case 2:return i=d.sent(),(null==(a=(0,m.tr)(this,{caseInfo:this.promotionCaseInfo,installRes:i}))?void 0:a.type)==="modal"&&s.Vq.alert({title:a.title,message:a.body}),(null==a?void 0:a.type)==="toast"&&(0,o.Z)({message:a.message,position:"middle"}),this.$router.replace({name:"/industryCase",query:{case_id:null===(r=this.promotionCaseInfo)||void 0===r?void 0:r.open_case_id}}),[2,(0,o.Z)({message:n(11974).nI().t("已添加"),position:"middle"})];case 3:return h=(null==(u=d.sent())?void 0:null===(p=u.data)||void 0===p?void 0:null===(l=p.result)||void 0===l?void 0:l.humanMessage)||n(11974).nI().t("错误码：{0}",[null==u?void 0:null===(f=u.data)||void 0===f?void 0:f.result.errcode]),(0,o.Z)({message:h,position:"middle"}),[3,5];case 4:return this.btnDisabled=!1,[7];case 5:return[2]}})}).apply(this)},selectContact:function(t){return x(function(){var e,r,i,a,c,u,p;return T(this,function(l){switch(l.label){case 0:var f;return r=(e="batch"===t)?this.batchAppScope.scope:this.appScope[t].scope,a=1===(i=this.getAppCurrentVersion(t)).priceinfo_type,[4,this.contactPicker.select({checked:r,validate:(f=x(function(t){var r;return T(this,function(c){switch(c.label){case 0:if(!t.count)return(0,o.Z)({message:n(11974).nI().t("请至少选择一个部门/成员"),position:"top"}),[2,!1];if(!(a&&t.hasRoot))return[3,2];return[4,s.Vq.confirm({title:n(11974).nI().t("已选择企业全部通讯录"),message:n(11974).nI().t("确认后，应用服务商将获得企业全部的部门和成员信息 (不含手机号和邮箱地址)。"),confirmText:n(11974).nI().t("重新选择可见范围"),cancelText:n(11974).nI().t("确认选择"),zIndex:2e3})];case 1:return[2,!c.sent()];case 2:if(a&&!e&&(null==i?void 0:null===(r=i.try_rule_info)||void 0===r?void 0:r.try_rule_type)!==0&&t.count>i.try_rule_info.limit_user)return[2,s.Vq.confirm({title:n(11974).nI().t("你已选择{0}人",[t.count]),message:n(11974).nI().t("安装后将可试用应用{0}天",[i.try_rule_info.try_time]),zIndex:2e3})];if(t.count>50)return[2,s.Vq.confirm({title:n(11974).nI().t("你已选择{0}人",[t.count]),message:n(11974).nI().t("确认后，应用服务商将获得可见范围的部门和成员信息(不含手机号与邮箱地址)。若为体验试用，建议缩小通讯录的可见范围。"),zIndex:2e3})];return[2,!0]}})}),function(t){return f.apply(this,arguments)})})];case 1:if(!(c=l.sent()))return[2];return u=c.vptids,p={scopeStr:c.scopeStr,count:c.count,scope:c.scope,app_perm:{vid_item:u.vids,pid_item:u.pids,tag_item:u.tids}},e?this.batchAppScope=p:this.appScope[t]=p,[2]}})}).apply(this)},batchSelectSubmit:function(t){this.batchSelectApps=t,this.$router.push({name:"/auth/industry/admin",query:Z(j({},this.$route.query),{open_case_id:this.promotionCaseInfo.open_case_id,selected:"1"})})},navCaseDetail:function(){return x(function(){return T(this,function(t){switch(t.label){case 0:return this.$router.replace({name:"/industryCase",query:Z(j({},this.$route.query),{case_id:this.promotionCaseInfo.open_case_id})}),[4,this.$nextTick()];case 1:return t.sent(),this.batchErrInfo=void 0,[2]}})}).apply(this)},onContactsCancel:function(){this.showContactsSelect=!1},showPriceList:function(){var t;(null===(t=this.industryPaidAppInfo)||void 0===t||!t.cur_priceinfoid)&&(this.industryVerisons.length<2||(this.showPriceInfoList=!0))}}},E=(0,n(6080).Z)(D,r,[],!1,null,"1d84b9e8",null).exports},85131:function(t){t.exports={functional:!0,render:function(t,e){var n=e._c,r=(e._v,e.data),i=e.children,o=r.class,s=r.staticClass,a=r.style,c=r.staticStyle,u=r.attrs,p=function(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}(r,["class","staticClass","style","staticStyle","attrs"]);return n("svg",function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){var r,i;r=t,i=n[e],e in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i})}return t}({class:[o,s],style:[a,c],attrs:Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0===u?{}:u)},p),(void 0===i?[]:i).concat([n("path",{attrs:{d:"M6 3l5 5-5 5",stroke:"#267EF0"}})]))}}},34108:function(t,e,n){"use strict";n.d(e,{G:function(){return a}});var r={body:"style-module__body--iiSdm",picker:"style-module__picker--aZPS1",show:"style-module__show--F2P_9","fade-in":"style-module__fade-in--VZueY"};function i(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(u){n(u);return}a.done?e(c):Promise.resolve(c).then(r,i)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var s=t.apply(e,n);function a(t){i(s,r,o,a,c,"next",t)}function c(t){i(s,r,o,a,c,"throw",t)}a(void 0)})}}var s=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};function a(t){var e,n,i,a,u,p=function(){c(v,{type:"show",data:t.config}),i()},l=function(){a()},f=function(t){u(t)},h=function(){u(null)},d=function(){if(!v.classList.contains(r.show)){var t,e;t=document.body,e=r.body,t.className+=" ".concat(e),v.classList.add(r.show)}},m=function(){if(v.classList.contains(r.show)){var t,e,n,i;v.classList.remove(r.show),t=document.body,e=r.body,(i=(n=t.className.split(/\s/g)).indexOf(e))<0||(n.splice(i,1),t.className=n.join(" "))}},v=document.createElement("iframe"),b=!1,_=new Promise(function(t){i=t}),y=(e=function(t){var e;switch(null===(e=t.data)||void 0===e?void 0:e.type){case"uicontacts:ready":p();break;case"uicontacts:checkSetReady":l();break;case"uicontacts:submit":f(t.data.data);break;case"uicontacts:cancel":h()}},n=function(t){t.source===v.contentWindow&&e(t)},window.addEventListener("message",n),function(){window.removeEventListener("message",n)});return v.src="https://work.weixin.qq.com/wework_admin/third/selectContacts",v.setAttribute("frameborder","0"),v.setAttribute("allowtransparency","true"),v.setAttribute("scrolling","no"),null!=t.zIndex&&(v.style.zIndex=String(t.zIndex)),v.className=r.picker,document.body.appendChild(v),{select:function(t){return o(function(){var e;return s(this,function(n){switch(n.label){case 0:if(b)return[2];return[4,_];case 1:var r;return n.sent(),[4,(r=t.checked,new Promise(function(t){a=t,c(v,{type:"check",data:r})}))];case 2:if(n.sent(),b)return[2];return d(),[4,new Promise(function(e){var n;n=o(function(n){var r;return s(this,function(i){switch(i.label){case 0:if(r=!n||!t.validate)return[3,2];return[4,t.validate(n)];case 1:r=i.sent(),i.label=2;case 2:return r&&e(n),[2]}})}),u=function(t){return n.apply(this,arguments)}})];case 3:return e=n.sent(),m(),[2,e]}})})()},dispose:function(){b=!0,y(),document.body.removeChild(v)}}}function c(t,e){t.contentWindow.postMessage(e,"https://work.weixin.qq.com")}}}]);