import{F as B}from"./index.d8717905.js";import{aB as V,aC as v}from"./setting.644fa418.js";import{d as S,aX as x,b as C,r as E,c as d,e as F,f as A,h as e,i as t,u as c,m as r,E as D,R as N,S as I,g as U,_ as M}from"./index.0308b213.js";const R=i=>(N("data-v-18a515d3"),i=i(),I(),i),T=R(()=>U("span",null,"\u63A5\u5165\u8BBE\u7F6E",-1)),z=r("\u751F\u6210\u65B0\u7684"),j=r("\u751F\u6210\u65B0\u7684"),q=r("\u4FDD\u5B58"),G=S({setup(i){const y=x.get("uniacid"),n=C({account_token:"",encodingaeskey:""}),p=E(window.location.protocol+"//"+window.location.host+`/addon/wechat.web.notify/index?id=${y}`),m=()=>{V().then(o=>{n.account_token=o.token,n.encodingaeskey=o.encodingaeskey})},g=()=>{v(n).then(o=>{o&&D({message:"\u4FDD\u5B58\u6210\u529F",type:"success"}),m()})},h=()=>{const o=f(32);n.account_token=o},k=()=>{const o=f(43);n.encodingaeskey=o},f=(o=32)=>{let a="qwertyuiopasdfghjklzxcvbnm1234567890",l="";for(let s=0;s<o;s++)l+=a.charAt(Math.floor(Math.random()*a.length));return l};return m(),(o,a)=>{const l=d("el-input"),s=d("el-form-item"),_=d("el-button"),w=d("el-card"),b=d("el-form");return F(),A("div",null,[e(b,{ref:"formRef",model:c(n),"label-width":"160px",size:"default","label-position":"left"},{default:t(()=>[e(w,{shadow:"always","body-style":{padding:"30px"}},{header:t(()=>[T]),default:t(()=>[e(s,{label:"URL(\u670D\u52A1\u5668\u5730\u5740)"},{default:t(()=>[e(l,{modelValue:p.value,"onUpdate:modelValue":a[0]||(a[0]=u=>p.value=u),readonly:""},null,8,["modelValue"])]),_:1}),e(s,{label:"Token(\u4EE4\u724C)"},{default:t(()=>[e(l,{modelValue:c(n).account_token,"onUpdate:modelValue":a[1]||(a[1]=u=>c(n).account_token=u)},{append:t(()=>[e(_,{type:"primary",onClick:h},{default:t(()=>[z]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"EncodingAESKey(\u6D88\u606F\u52A0\u89E3\u5BC6\u5BC6\u94A5)"},{default:t(()=>[e(l,{modelValue:c(n).encodingaeskey,"onUpdate:modelValue":a[2]||(a[2]=u=>c(n).encodingaeskey=u)},{append:t(()=>[e(_,{type:"primary",onClick:k},{default:t(()=>[j]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["model"]),e(B,null,{default:t(()=>[e(_,{type:"primary",onClick:g},{default:t(()=>[q]),_:1})]),_:1})])}}});const X=M(G,[["__scopeId","data-v-18a515d3"]]);export{X as default};
