PageSourceSearch

https://cdn2.tenchat.ru/tenchat-main-ssr-nuxt/CJTU6cqY.js

js tenchat.ru collected 2026-09-24 08:45:42 UTC 6,802 bytes, 1 lines download raw bytes

1import{e as $,z as g,c as h,o as u,m as z,g as m,aG as T,i as k,aa as E,l as O,w,E as A,A as L,B as G,a1 as _,a4 as x,j,G as y,W as F,n as B,b as H,a as b,F as q,t as I,a$ as W,f as Y,b0 as J,ar as D}from"./Bhvy1f66.js";import{g as K}from"./D460Q2PR.js";import{e as Q,g as X}from"./qc6BGF8g.js";import{F as Z}from"./BoYnVdb1.js";import{u as ee}from"./Czk0X5cX.js";import{S as te}from"./DEvdqoEt.js";import{k as oe}from"./Upb3eSYt.js";import{w as ne,d as se}from"./CDr1IRf9.js";const ae=$({__name:"ElementLightShape",props:{x:{},y:{},blur:{default:100},size:{},color:{default:"white"}},setup(e){const t=e,c=g(()=>({left:t.x&&`${t.x}px`,top:t.y&&`${t.y}px`,width:t.size&&`${t.size}px`,height:t.size&&`${t.size}px`})),s=g(()=>({"background-color":t.color,filter:`blur(${t.blur}px)`}));return(n,d)=>(u(),h("span",{class:"pointer-events-none block rounded-full will-change-[filter]",style:z([m(s),m(c)])},null,4))}}),Ie=Object.assign(ae,{__name:"ElementLightShape"}),Pe={country:"Россия",code:"643",format:"(ххх) ххх-хх-хх",phonePrefix:"7",voiceSms:!1,regionCode:"RU",imgSrc:K("RU")},le=$({__name:"Dropdown",props:{placement:{default:"bottom-end"},popperClass:{type:[Boolean,String,Object,Array]},theme:{default:"default"},triggers:{default:()=>["click"]},overflowVisible:{type:Boolean},transition:{}},setup(e){const t=e,c=g(()=>{switch(t.theme){case"default":return"tc-dropdown";default:return t.theme}}),s={"slide-up":"tc-slide-up-popper"},n=g(()=>{const r=t.transition?s[t.transition]:void 0;return[t.overflowVisible&&"show-overflow",t.popperClass,r]}),{ariaId:d}=ee();return(r,v)=>{const p=T("VDropdown");return u(),k(p,{"aria-id":m(d),placement:e.placement,"popper-class":n.value,theme:c.value,triggers:e.triggers},E({default:w(()=>[A(r.$slots,"default")]),_:2},[O(r.$slots,(i,a)=>({name:a,fn:w(C=>[A(r.$slots,a,L(G(C)))])}))]),1032,["aria-id","placement","popper-class","theme","triggers"])}}}),re=Object.assign(le,{__name:"UiDropdown"}),ie=["disabled"],ue=["src","alt"],ce={class:"min-w-45 list-none gap-1.5 text-sm","data-cy":"countries-list"},de=["data-cy","onClick"],pe=["src","alt"],me=["textContent"],fe=["textContent"],he=$({__name:"InputSelectCountry",props:_({countries:{default:()=>[]},dropdownPlacement:{default:"bottom-start"},dropdownDistance:{default:28},dropdownSkidding:{default:-16},dropdownDelay:{default:()=>({show:0,hide:100})},disabled:{type:Boolean},hideCaretIcon:{type:Boolean},selectCountryBtnClass:{type:[Boolean,String,Object,Array]}},{modelValue:{},modelModifiers:{}}),emits:_(["update:model-value","show","hide"],["update:modelValue"]),setup(e,{emit:t}){const c=t,s=x(e,"modelValue"),n=j(!1);function d(){n.value=!0,c("show")}function r(){n.value=!1,c("hide")}return(v,p)=>(u(),k(re,{triggers:[],placement:e.dropdownPlacement,skidding:e.dropdownSkidding,distance:e.dropdownDistance,delay:e.dropdownDelay,shown:n.value,"auto-hide":"",onApplyShow:d,onApplyHide:r},{popper:w(({hide:i})=>[H(te,{class:"visible-scroll m-2 max-h-62"},{default:w(()=>[b("ul",ce,[(u(!0),h(q,null,O(e.countries,a=>(u(),h("li",{key:a.code},[b("button",{type:"button",class:"flex h-9 w-full items-center justify-start whitespace-nowrap px-2 py-1.5 pr-0.5 tracking-smallest outline-hidden hover:bg-gray-20 focus-visible:bg-gray-20 rounded-lg","data-cy":`country-${a.code}`,onClick:C=>{s.value=a,i()}},[a.imgSrc?(u(),h("img",{key:0,width:"28",height:"28",src:a.imgSrc,alt:a.regionCode},null,8,pe)):y("",!0),b("span",{class:"ml-2.5",textContent:I(a.country)},null,8,me),b("span",{class:"ml-1 text-gray-100",textContent:I(`+${a.phonePrefix}`)},null,8,fe)],8,de)]))),128))])]),_:2},1024)]),default:w(()=>[s.value?.imgSrc?(u(),h("button",{key:0,type:"button",class:B(["flex h-full items-center",e.selectCountryBtnClass]),disabled:e.disabled,onClick:p[0]||(p[0]=F(i=>n.value=!n.value,["stop"]))},[s.value.imgSrc?(u(),h("img",{key:0,width:"28",height:"28",class:"h-6 object-cover",src:s.value.imgSrc,alt:s.value.regionCode},null,8,ue)):y("",!0),e.hideCaretIcon?y("",!0):(u(),k(m(Z),{key:1,icon:n.value?m(Q):m(X),class:"ml-2.5 text-gray-200"},null,8,["icon"]))],10,ie)):y("",!0)]),_:1},8,["placement","skidding","distance","delay","shown"]))}}),ge=Object.assign(he,{__name:"UiInputSelectCountry"}),ye={class:"flex items-center"},be=["for"],ve=["id"],Ce=$({__name:"SharedInputPhoneForm",props:_({countries:{},phone:{},inputId:{},disableCountrySelection:{type:Boolean},labelClass:{type:[Boolean,String,Object,Array]},inputClass:{type:[Boolean,String,Object,Array]}},{completed:{type:Boolean},completedModifiers:{},phone:{required:!0},phoneModifiers:{},country:{},countryModifiers:{}}),emits:_(["submit","updatePhone","updateCountry","focus","blur"],["update:completed","update:phone","update:country"]),setup(e,{expose:t,emit:c}){const s=c,n=W({mask:"",tokens:{х:{pattern:/\d/}}}),d=j(),r=x(e,"completed");function v(o){i.value=o,M()}const p=x(e,"phone",{get:o=>o?.substring(N.value),set:o=>`${a.value}${o}`}),i=x(e,"country",{set:o=>(V(o),o)}),a=g(()=>`+${i.value?.phonePrefix||"7"}${P.value}`),C=o=>o[0]==="(",P=g(()=>C(i.value?.format||"")?" (":" ");function V(o){o?.format&&(n.mask=C(o.format)?o.format.substring(1):o.format)}const N=g(()=>(i.value?.phonePrefix?.length||1)+P.value.length+1);function U(o){const l=o.clipboardData?.getData("text/plain").replace(/\D/g,"")??"",S=n.mask?.replace(/[^х]/g,"").length??0;l.length<S||(o.preventDefault(),p.value=l.slice(-S))}function M(){d.value?.focus()}function R({detail:o}){r.value=o.completed}return V(i.value),t({focus:M}),(o,l)=>{const S=ge;return u(),h("div",ye,[i.value?(u(),k(S,{key:0,modelValue:i.value,"onUpdate:modelValue":[l[0]||(l[0]=f=>i.value=f),v],countries:e.countries,disabled:e.disableCountrySelection,"hide-caret-icon":e.disableCountrySelection,"select-country-btn-class":{"cursor-default":e.disableCountrySelection},"data-cy":"country-code",class:"shrink-0"},null,8,["modelValue","countries","disabled","hide-caret-icon","select-country-btn-class"])):y("",!0),b("label",{for:e.inputId,class:B(e.labelClass)},I(m(a)),11,be),b("form",{onSubmit:l[4]||(l[4]=F(f=>s("submit"),["prevent"]))}
1,[m(n).mask?Y((u(),h("input",{key:0,id:e.inputId,ref_key:"inputPhoneRef",ref:d,"onUpdate:modelValue":l[1]||(l[1]=f=>p.value=f),class:B(["w-full max-w-full bg-transparent text-lg font-medium outline-hidden",e.inputClass]),onPaste:U,onMaska:R,onFocus:l[2]||(l[2]=f=>s("focus",f)),onBlur:l[3]||(l[3]=f=>s("blur",f))},null,42,ve)),[[J,p.value],[m(oe),m(n)]]):y("",!0)],32)])}}}),Ve=Object.assign(Ce,{__name:"SharedInputPhoneForm"}),Me=()=>{function e(t,c,s){const n=D(t),d=D(c),r=D(s);if(n&&d&&r?.code){const v=d.replace(/\D/g,""),p=new URLSearchParams({phone:v,code:r.code});window.open(`${ne}?${p.toString()}`,"_self","noreferrer")}else window.open(se,"_self","noreferrer")}return{redirectToAuth:e}};export{Pe as C,Ie as _,Ve as a,Me as u};

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.