1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6496],{6496:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var a=i(821),r={class:"py-2"},o={key:0,class:"text-center"},n={class:"mb-0 small text-muted"},s={key:1,class:"text-center"},l={key:2},d={class:"row align-items-center"},c={class:"col-sm-6"},f=["disabled","min"],u={class:"col-sm-6"},p=["disabled"],m={class:"col-sm-6"},v=["disabled"],$={class:"col-12 text-right"},g=["disabled"];var w=i(5585),h=i(6204),b=i(3697),y=i(673),x=i(9582);const _={name:"ProvisionWiFi",props:{application:Object},mixins:[w.Z],emits:["reload"],setup:function(){return{v$:(0,h.ZP)()}},data:function(){return{isLoading:!1,showForm:!1,form:{effective_date:null,wifi_ssid:null,wifi_password:null}}},components:{ProgressBar:y.Z,DateFormat:x.Z},computed:{todaysDate:function(){return(new Date).toISOString().split("T")[0]}},validations:function(){return{form:{effective_date:{required:b.BM.withMessage("The effective date is required",b.C1)},wifi_ssid:{required:b.BM.withMessage("The SSID field is required",b.C1)},wifi_password:{required:b.BM.withMessage("The password field is required",b.C1),minLength:b.BM.withMessage("The password must be at least 8 characters",(0,b.Ei)(8))}}}},created:function(){this.form.effective_date=this.application.so_effective_date,this.form.wifi_ssid=this.application.wifi_ssid,this.form.wifi_password=this.application.wifi_password,this.application.address&&this.application.address.rg_fsan&&this.application.wifi_ssid&&(this.application.logs.calix_provision_wifi&&!this.application.logs.calix_provision_wifi.success||!this.application.logs.calix_provision_wifi)&&!this.application.wifi_pending&&(this.show
1Form=!0)},methods:{saveData:function(){var e=this;this.isLoading=!0,axios.post("/admin/applications/".concat(this.application.id,"/wifi"),this.form).then((function(t){e.isLoading=!1,e.application.wifi_ssid=t.data.wifi_ssid,e.application.wifi_password=t.data.wifi_password,e.application.wifi_pending=t.data.wifi_pending,e.application.logs=t.data.logs,e.showForm=!1,e.$notify({title:"Success",type:"success",text:"WiFi provisioned successfully!"})})).catch((function(t){e.isLoading=!1,swal("Error","An error has occurred while trying to provision wifi for this application. Please try again later.","error")}))},deleteWiFiJob:function(){var e=this;swal({title:"Are you sure?",text:"Are you sure you want to cancel this pending job?",icon:"warning",buttons:!0,dangerMode:!0}).then((function(t){t&&(e.isLoading=!0,axios.delete("/admin/applications/".concat(e.application.id,"/wifi/").concat(e.application.wifi_pending)).then((function(t){e.isLoading=!1,e.$notify({title:"Success",type:"success",text:"Job deleted successfully!"}),e.application.wifi_pending=t.data.wifi_pending,e.showForm=!0})).catch((function(t){e.isLoading=!1,swal("Error","An error occurred while trying to delete this job. Please try again later","error")})))}))}}};const E=(0,i(3744).Z)(_,[["render",function(e,t,i,w,h,b){var y=(0,a.resolveComponent)("DateFormat"),x=(0,a.resolveComponent)("ProgressBar");return(0,a.openBlock)(),(0,a.createElementBlock)("div",r,[i.application.wifi_pending?((0,a.openBlock)(),(0,a.createElementBlock)("div",o,[t[8]||(t[8]=(0,a.createElementVNode)("p",{class:"mb-0"},[(0,a.createElementVNode)("b",null,"WiFi Provisioning Pending")],-1)),(0,a.createElementVNode)("p",n,[t[7]||(t[7]=(0,a.createTextVNode)("Effective Date: ",-1)),(0,a.createVNode)(y,{date:i.application.so_effective_date,format:"L",local:!0},null,8,["date"])]),(0,a.createElementVNode)("button",{onClick:t[0]||(t[0]=function(){return b.deleteWiFiJob&&b.deleteWiFiJob.apply(b,arguments)}),type:"button",class:"mx-auto mt-2 btn btn-outline-danger d-block font-weight-bold"},"Cancel Pending Provisioning Job")])):!h.showForm&&i.application.logs.calix_provision_wifi&&i.application.logs.calix_provision_wifi.success?((0,a.openBlock)(),(0,a.createElementBlock)("div",s,[t[9]||(t[9]=(0,a.createElementVNode)("p",{class:"mb-0"},[(0,a.createElementVNode)("b",null,"WiFi Provisioned Successfully")],-1)),(0,a.createElementVNode)("button",{onClick:t[1]||(t[1]=function(e){return h.showForm=!0}),type:"button",class:"mx-auto mt-2 btn btn-outline-dark d-block font-weight-bold"},"Reprovision")])):(0,a.createCommentVNode)("",!0),h.showForm?((0,a.openBlock)(),(0,a.createElementBlock)("div",l,[(0,a.createElementVNode)("form",{novalidate:"",onSubmit:t[6]||(t[6]=(0,a.withModifiers)((function(){return e.validateForm&&e.validateForm.apply(e,arguments)}),["prevent"]))},[(0,a.createElementVNode)("div",d,[(0,a.createElementVNode)("div",c,[(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)(["form-group",e.getValidationClass("effective_date")])},[t[10]||(t[10]=(0,a.createElementVNode)("label",{class:"form-label"},[(0,a.createElementVNode)("strong",null,"Effective Date")],-1)),(0,a.withDirectives)((0,a.createElementVNode)("input",{class:"form-control","onUpdate:modelValue":t[2]||(t[2]=function(e){return h.form.effective_date=e}),disabled:h.isLoading,id:"effective_date",name:"effective_date",min:b.todaysDate,type:"date"},null,8,f),[[a.vModelText,h.form.effective_date]]),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.v$.form.effective_date.$errors,(function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("div",{class:"invalid-feedback",key:e.$uid},(0,a.toDisplayString)(e.$message),1)})),128))],2)]),t[14]||(t[14]=(0,a.createElementVNode)("div",{class:"col-6"},null,-1)),(0,a.createElementVNode)("div",u,[(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)(["form-group",e.getValidationClass("wifi_ssid")])},[t[11]||(t[11]=(0,a.createElementVNode)("label",{class:"form-label"},[(0,a.createElementVNode)("strong",null,"WiFi SSID")],-1)),(0,a.withDirectives)((0,a.createElementVNode)("input",{class:"form-control","onUpdate:modelValue":t[3]||(t[3]=function(e){return h.form.wifi_ssid=e}),id:"wifi_ssid",disabled:h.isLoading,name:"wifi_ssid",type:"text"},null,8,p),[[a.vModelText,h.form.wifi_ssid]]),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.v$.form.wifi_ssid.$errors,(function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("div",{class:"invalid-feedback",key:e.$uid},(0,a.toDisplayString)(e.$message),1)})),128))],2)]),(0,a.createElementVNode)("div",m,[(0,a.createElementVNode)("div",{class:(0,a.normalizeClass)(["form-group",e.getValidationClass("wifi_password")])},[t[12]||(t[12]=(0,a.createElementVNode)("label",{class:"form-label"},[(0,a.createElementVNode)("strong",null,"WiFi Password")],-1)),(0,a.withDirectives)((0,a.createElementVNode)("input",{class:"form-control","onUpdate:modelValue":t[4]||(t[4]=function(e){return h.form.wifi_password=e}),id:"wifi_password",disabled:h.isLoading,name:"wifi_password",type:"text"},null,8,v),[[a.vModelText,h.form.wifi_password]]),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)(e.v$.form.wifi_password.$errors,(function(e){return(0,a.openBlock)(),(0,a.createElementBlock)("div",{class:"invalid-feedback",key:e.$uid},(0,a.toDisplayString)(e.$message),1)})),128))],2)]),(0,a.createElementVNode)("div",$,[(0,a.createElementVNode)("button",{type:"button",onClick:t[5]||(t[5]=function(){return e.validateForm&&e.validateForm.a
1pply(e,arguments)}),disabled:h.isLoading,class:"btn btn-primary"},t[13]||(t[13]=[(0,a.createElementVNode)("span",null,[(0,a.createElementVNode)("i",{class:"fa fa-wifi"}),(0,a.createTextVNode)(" Provision WiFi ")],-1)]),8,g)])])],32)])):(0,a.createCommentVNode)("",!0),h.isLoading?((0,a.openBlock)(),(0,a.createBlock)(x,{key:3})):(0,a.createCommentVNode)("",!0)])}]])},3697:(e,t,i)=>{i.d(t,{Do:()=>w,BM:()=>g,BS:()=>h,Ei:()=>b,C1:()=>y,CF:()=>_,sH:()=>V});var a=i(821);function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function s(e){return"function"==typeof e}function l(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function d(e){return s(e.$validator)?o({},e):{$validator:e}}function c(e){return"object"==typeof e?e.$valid:e}function f(e){return e.$validator||e}function u(e,t){if(!l(e))throw new Error('[@vuelidate/validators]: First parameter to "withParams" should be an object, provided '+typeof e);if(!l(t)&&!s(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const i=d(t);return i.$params=o(o({},i.$params||{}),e),i}function p(e,t){if(!s(e)&&"string"!=typeof(0,a.unref)(e))throw new Error('[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided '+typeof e);if(!l(t)&&!s(t))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const i=d(t);return i.$message=e,i}const m=e=>{if(e=(0,a.unref)(e),Array.isArray(e))return!!e.length;if(null==e)return!1;if(!1===e)return!0;if(e instanceof Date)return!isNaN(e.getTime());if("object"==typeof e){for(let t in e)return!0;return!1}return!!String(e).length},v=e=>(e=(0,a.unref)(e),Array.isArray(e)?e.length:"object"==typeof e?Object.keys(e).length:String(e).length);function $(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return e=>(e=(0,a.unref)(e),!m(e)||t.every((t=>(t.lastIndex=0,t.test(e)))))}var g=Object.freeze({__proto__:null,forEach:function(e){return{$validator(t){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return(0,a.unref)(t).reduce(((t,i,a)=>{const o=Object.entries(i).reduce(((t,o)=>{let[n,s]=o;const l=e[n]||{},d=Object.entries(l).reduce(((e,t)=>{let[o,l]=t;const d=f(l).call(this,s,i,a,...r),u=c(d);if(e.$data[o]=d,e.$data.$invalid=!u||!!e.$data.$invalid,e.$data.$error=e.$data.$invalid,!u){let t=l.$message||"";const i=l.$params||{};"function"==typeof t&&(t=t({$pending:!1,$invalid:!u,$params:i,$model:s,$response:d})),e.$errors.push({$property:n,$message:t,$params:i,$response:d,$model:s,$pending:!1,$validator:o})}return{$valid:e.$valid&&u,$data:e.$data,$errors:e.$errors}}),{$valid:!0,$data:{},$errors:[]});return t.$data[n]=d.$data,t.$errors[n]=d.$errors,{$valid:t.$valid&&d.$valid,$data:t.$data,$errors:t.$errors}}),{$valid:!0,$data:{},$errors:{}});return{$valid:t.$valid&&o.$valid,$data:t.$data.concat(o.$data),$errors:t.$errors.concat(o.$errors)}}),{$valid:!0,$data:[],$errors:[]})},$message:e=>{let{$response:t}=e;return t?t.$errors.map((e=>Object.values(e).map((e=>e.map((e=>e.$message)))).reduce(((e,t)=>e.concat(t)),[]))):[]}}},len:v,normalizeValidatorObject:d,regex:$,req:m,unwrap:a.unref,unwrapNormalizedValidator:f,unwrapValidatorResponse:c,withAsync:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return o(o({},d(e)),{},{$async:!0,$watchTargets:t})},withMessage:p,withParams:u});$(/^[a-zA-Z]*$/),$(/^[a-zA-Z0-9]*$/),$(/^\d*(\.\d+)?$/);var w={$validator:$(/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i),$message:"Value is not a valid email address",$params:{type:"email"}};function h(e){return{$validator:(t=e,e=>!m(e)||v(e)<=(0,a.unref)(t)),$message:e=>{let{$params:t}=e;return`The maximum length allowed is ${t.max}`},$params:{max:e,type:"maxLength"}};var t}function b(e){return{$validator:(t=e,e=>!m(e)||v(e)>=(0,a.unref)(t)),$message:e=>{let{$params:t}=e;return`This field should be at least ${t.min} characters long`},$params:{min:e,type:"minLength"}};var t}var y={$validator:function(e){return"string"==typeof e&&(e=e.trim()),m(e)},$message:"Value is required",$params:{type:"required"}};const x=(e,t)=>!e||m("string"==typeof t?t.trim():t);function _(e){return{$validator:(t=e,function(e,i){if("function"!=typeof t)return x((0,a.unref)(t),e);const r=t.call(this,e,i);return x(r,e)}),$message:"The value is required",$params:{type:"requiredIf",prop:e}};var t}function E(e){return t=>(0,a.unref)(t)===(0,a.unref)(e)}function V(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"other";return{$validator:E(e),$message:e=>`The value must be equal to the ${t} value`,$params:{equalTo:e,otherName:t,type:"sameAs"}}}
1$(/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);$(/(^[0-9]*$)|(^-[0-9]+$)/),$(/^[-]?\d*(\.\d+)?$/)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.