PageSourceSearch

https://dashboard.y.uno/assets/index-DUVmkDpC.js

js y.uno collected 2026-09-24 08:54:08 UTC 2,382 bytes, 1 lines download raw bytes

1import{j as u}from"./vendor-radix-BDJ1G1Rz.js";import{r as o}from"./vendor-query-jnzAvHUk.js";import{cI as E,cJ as N,cK as v,B as I,I as O}from"./index-DU-Mv_L_.js";import"./vendor-date-CemE0fj8.js";import"./vendor-datadog-D3gwQpHA.js";import{u as b}from"./vendor-i18n-B-AdlurK.js";import"./vendor-shared-D7qeTqf-.js";const r=(e,s)=>{if(typeof window<"u"&&typeof window.Pylon=="function")try{return window.Pylon(e,s),!0}catch(l){return console.warn(`Failed to call Pylon method '${e}':`,l),!1}return!1},g=()=>typeof window<"u"&&typeof window.Pylon=="function",j=({profile:e,organization:s})=>{const[l,d]=o.useState(!1),[f,i]=o.useState(!1),[m,n]=o.useState(!1),[a,c]=o.useState(!1),{data:p}=E(a),C=()=>{const t=!f;i(t),t?(n(!1),r("show")):(n(!0),r("hide"),r("hideChatBubble"))};return o.useEffect(()=>{let t=null;if(g()){c(!0);return}return t=setInterval(()=>{g()&&(c(!0),t&&clearInterval(t))},2e3),()=>{t&&clearInterval(t)}},[]),o.useEffect(()=>{if(!a)return;let t={},P=null;try{t=JSON.parse(localStorage.getItem("user")||"{}")}catch(h){console.info("Failed to parse user data from localStorage:",h?.message)}try{P=JSON.parse(localStorage.getItem("impersonation")||"null")}catch(h){console.info("Failed to parse impersonation data from localStorage:",h?.message)}const w=P?.active===!0,y=e?.code,_=s?.code,S=w&&t?.email?t.email:e?.email;if(w){d(!1),n(!1);return}S&&e?.first_name&&y&&_&&(d(!0),n(!0),window.pylon={chat_settings:{app_id:N,email_hash:p?.data,email:S,name:e.first_name,account_external_id:y}},r("setNewIssueCustomFields",{user_code:y,user_organization_code:_}),r("onHide",function(){i(!1),n(!0)}),r("onChatBubbleHide",function(){i(!1),n(!0)}))},[a,p?.data,e?.email,e?.first_name,e?.code,s?.code]),{hasPylon:l,showPylon:m,isOpenPylon:f,isPylonReady:a,handlePylon:C}},A="animate-[pulse_pylon_1.5s_ease-in-out_infinite]",x=u.jsx(O,{name:"Headset",weight:"fill"}),B={variant:"default"},H=o.memo(({profile:e,organization:s})=>{const{t:l}=b(),d=o.useMemo(()=>window.innerHeight-96,[]),{hasPylon:f,showPylon:i,handlePylon:m,isPylonReady:n}=j({profile:e,organization:s}),a=!n,c=f&&i;return!a&&!c?null:u.jsxs(v,{customTop:d,children:[a&&u.jsx("div",{className:A,children:u.jsx(I,{...B,disabled:!0,"aria-label":l("contactSupport"),children:x})}),c&&u.jsx(I,{...B,onClick:m,"aria-label":l("contactSupport"),children:x})]})});H.displayName="PylonButton";export{H as PylonButton};

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.