PageSourceSearch

https://kindredly.ai/js/appHandoffGuestC-3-OP66.js

js kindredly.ai collected 2026-10-02 01:11:29 UTC 31,222 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/refresh.storeCM69jM7x.js","js/chunkReloadRecoveryrjuMb-b8.js","js/vue-runtimeBHGad_ZB.js","js/cjs-helpersC4iS2aBk.js","js/bootstrap-vue-nextDXY4qsO1.js","assets/bootstrap-vue-nexthA7rx8St.css","js/dexie2jmnBxhj.js","assets/chunkReloadRecoveryUbLNi8xK.css","js/OperationQueueKzEpmh-u.js","js/item-name.utilsBH3paGZr.js","js/item.typesx7Q7rrX9.js","js/content.typesyje91KzF.js","js/constantsDW26WJ6H.js","js/extraction.pure.utilsDQPW8yIh.js","js/url.utils3SlYVg-c.js","js/file_utilsBvAXo0vA.js","js/agentParentalGrantCz4Xs1Ac.js","js/trackCl4T-c2s.js","js/LoggingOutDtYOx7kR.js","js/common.storeDJ22K8d0.js","js/adminsite.storeDFHoYU-A.js","js/useSignoutCSew4U4G.js","js/kinbota7TUa1rp.js","js/updateClientCVUSlUeE.js","js/PublicProfileCo4J3Tje.js","js/TIIconDefaultBy4qT9Q2.js","assets/TIIconDefaultD6shC4v8.css","js/PublishedCollectionsByUserC1JbHyjy.js","js/flickingArrowsDKnYXOiB.js","assets/flickingArrowsBMFAkM1K.css","js/main.mixinBLnF4qNw.js","js/modal.mixinD4dgi5bV.js","js/browserTabsCpW6SD42.js","js/scopedSettings39hV2RLq.js","js/subscription.storeCcIX6Rgu.js","assets/PublishedCollectionsByUserDuM_Xqim.css","js/ProfileImageDs00sQxK.js","assets/ProfileImagebpRtxUlA.css","js/UserShowcaseBz-z7T3n.js","js/ReviewItemBJOy2qyZ.js","js/PublicProfileEditcsNZifsx.js","js/ReviewsForItemBWmz3IJ2.js","js/PublishedItemDetailsB980K9Ax.js","js/AddPublishedToLibraryB5Ep1UtI.js","js/useBgEventsC6VPqwnW.js","js/PopCollectionSelectorC4IQxUjk.js","js/CreateCollectiont5QN9dBi.js","js/useCollectiond3yJTXwp.js","js/UserCardCk5KhpXQ.js","assets/UserCardatkTTXlH.css","js/CollectionDiscoverabilitySelector.vue_vue_type_script_setup_true_langCt_NHsnK.js","js/EditorModalSurface.vue_vue_type_script_setup_true_langXQyT7WJl.js","js/EditorAdvancedSection.vue_vue_type_script_setup_true_langC_B38uzE.js","js/AISuggesterC2Y6fJSm.js","js/ai_lookup_utilszDX_hcwM.js","js/kindTemplateInstancesCVTFZDuI.js","assets/CreateCollectionCojD92Jc.css","js/ItemImageB_r-DJOg.js","js/itemImageSourcesCubmTdva.js","js/imageRenditionsYS3BoGkH.js","assets/ItemImageeRi6K8en.css","js/CollectionOwnerBadgeB2uArIPD.js","assets/CollectionOwnerBadgeHNaKfthg.css","js/PlaceholderListBKUIYOi_.js","js/PermissionOverrideBanner.vue_vue_type_script_setup_true_langB_fvaHxk.js","assets/PopCollectionSelectorDDQZMY6e.css","js/SelectAccountUsersBcyv-3Pr.js","assets/SelectAccountUsersCtBSckde.css","js/useItemB-SXBnkF.js","js/urlDuplicateMatchingB9T_GhRn.js","js/CategoryChip.vue_vue_type_script_setup_true_langCaAWeNbi.js","js/categoryVariantCiW43gKi.js","js/categoryExplorerSetsCylUBCaq.js","assets/PublishedItemDetailsCJuAwVZ3.css","js/CurationInfoDRD0iC4R.js","js/curation.checklistBh-vEtOa.js","js/publish.rulesBEnVNBMf.js","assets/CurationInfozb4z-zGx.css","js/CurationQueuevdojHjrV.js","js/curationReviewBbaL8f40.js","assets/CurationQueueBr7ovWoj.css","js/CurateItemoYmkIQ1P.js","js/CategoryTreePicker.vue_vue_type_script_setup_true_langCoj1lZxT.js","js/ItemTargetAudiences.vue_vue_type_style_index_0_langBprEevuI.js","assets/ItemEduValueDkcNos54.css","js/ItemEduValue.vue_vue_type_style_index_0_langDm1w_jkm.js","js/ItemAdsAndCostTags.vue_vue_type_script_setup_true_langPg7z0kER.js","js/ItemIntentB5zBHlug.js","js/adminTypedApiB9GY7Gef.js","js/SelectImageGshroVdE.js","js/uploadFileTypesHFyYK7Fg.js","assets/SelectImageCOSCVibT.css","js/SegmentedSubnav9dSMVvIO.js","js/useEdgeScrollBP6Ug0-R.js","assets/SegmentedSubnavl1ei8e9M.css","assets/CurateItemBu68v1te.css","js/OrderCheckoutDG9b82j5.js","js/orderPlanSelectionCFEjGv92.js","assets/OrderCheckoutDgt5MOT1.css","js/OrderSummaryC8CCAo-N.js","js/OrderCompleteCi424fND.js"])))=>i.map(i=>d[i]);
2var We=Object.defineProperty;var Qe=(t,e,n)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _=(t,e,n)=>Qe(t,typeof e!="symbol"?e+"":e,n);import{d as ee,c as f,b as N,o as V,n as Re,e as A,r as Xe,l as te,a1 as Le,z as Oe,j as Pe,v as Ze,a4 as je,u as v,ab as fe}from"./vue-runtimeBHGad_ZB.js";import{_ as Ke,t as y,f as E,o as et,am as p,cS as $,ab as xe,cT as Y,a as tt,cU as nt,c as X,a$ as b,b0 as at,P as st,cV as rt,cW as De,bQ as ne,bR as ae,cX as it,cY as ot}from"./chunkReloadRecoveryrjuMb-b8.js";import{g as k,j as dt}from"./item-name.utilsBH3paGZr.js";import{aw as ut,a4 as lt}
2from"./OperationQueueKzEpmh-u.js";import{g as Z}from"./urlDuplicateMatchingB9T_GhRn.js";const ct=["viewBox","aria-label"],ft=["r","stroke-width"],pt=["r","stroke-width","stroke-dasharray","stroke-dashoffset"],mt={class:"knd-ring-readout"},ht={class:"knd-ring-value"},D=100,gt=ee({__name:"ProgressRing",props:{value:{},max:{default:1},label:{default:void 0},size:{default:"md"},tone:{default:void 0},ariaLabel:{default:void 0}},setup(t){const e=t,n=D/2,a=f(()=>e.size==="sm"?11:9),s=f(()=>(D-a.value)/2),r=f(()=>2*Math.PI*s.value),i=f(()=>{const l=Number.isFinite(e.max)&&e.max>0?e.max:1,m=Number.isFinite(e.value)?e.value/l:0;return Math.min(1,Math.max(0,m))}),o=f(()=>r.value*(1-i.value)),d=f(()=>e.label??`${Math.round(i.value*100)}%`),u=f(()=>[`knd-ring-wrap--${e.size}`,e.tone?`knd-ring-wrap--${e.tone}`:""]);return(l,m)=>(V(),N("div",{class:Re(["knd-ring-wrap",u.value])},[(V(),N("svg",{class:"knd-ring-svg",viewBox:`0 0 ${D} ${D}`,role:"img","aria-label":t.ariaLabel},[A("circle",{class:"knd-ring-track",cx:n,cy:n,r:s.value,fill:"none","stroke-width":a.value},null,8,ft),A("circle",{class:"knd-ring-arc",cx:n,cy:n,r:s.value,fill:"none","stroke-width":a.value,"stroke-linecap":"round","stroke-dasharray":r.value,"stroke-dashoffset":o.value},null,8,pt)],8,ct)),A("div",mt,[Xe(l.$slots,"default",{},()=>[A("span",ht,te(d.value),1)],!0)])],2))}}),yt=Ke(gt,[["__scopeId","data-v-6cf83d1c"]]);function K(t){return t==="queued"||t==="running"||t==="paused"}function P(t){return!K(t)}function wt(t){return t.totalCount?Math.min(100,Math.round(t.completedCount/t.totalCount*100)):0}const O=Math.floor(Math.random()*1e9),_t=3e3,It=15e3,Et=1e4,St=6e4,vt=25,pe="job",me="index",he="job";function bt(t){return`${String(t.createdAtMs).padStart(15,"0")}_${t.id}`}function Mt(t){return{schemaVersion:1,id:t.id,kind:t.kind,label:t.label,status:t.status,totalCount:t.totalCount,completedCount:t.completedCount,importedCount:t.importedCount,failedCount:t.failedCount,createdAtMs:t.createdAtMs,startedAtMs:t.startedAtMs,finishedAtMs:t.finishedAtMs,lease:{procId:t.ownerProcId,lastSeenMs:t.leaseLastSeenMs},recentFailures:t.steps.filter(e=>e.status==="failed"&&e.error).slice(-3).map(e=>({stepKey:e.key,error:String(e.error).slice(0,300)}))}}const q=class q{constructor(){_(this,"stepsSinceMirror",new Map)}static get instance(){return this._staticInstance||(this._staticInstance=new q),this._staticInstance}mutex(e){return ut.getMutex(`job:${e}`)}async list(){const e=await k();return e?await e.jobs.orderBy("createdAtMs").reverse().toArray():[]}async get(e){const n=await k();if(n)return await n.jobs.get(e)}async create(e){const n=await k();if(!n)throw new Error("No account database — cannot queue a background job");const a=Date.now(),s={id:`job_${a}_${lt(8)}`,kind:e.kind,status:"queued",label:e.label,accountId:e.accountId,ownerUserId:e.ownerUserId,targetUserIds:e.targetUserIds,payload:e.payload,steps:e.steps.map(r=>({...r,status:"pending",attempts:0})),totalCount:e.steps.length,completedCount:0,importedCount:0,failedCount:0,createdAtMs:a,ownerProcId:0,leaseLastSeenMs:0,lastMirrorAtMs:0};return await n.jobs.put(s),this.emit(s),await this.mirror(s,{force:!0}),s}async update(e,n){const a=this.mutex(e);await a.acquire();try{const s=await k();if(!s)return null;const r=await s.jobs.get(e);if(!r)return null;const i=n(r);return i?(await s.jobs.put(i),i):null}finally{a.release()}}async claim(e,n=Date.now()){return await this.update(e,a=>P(a.status)||a.ownerProcId!==0&&a.ownerProcId!==O&&n-a.leaseLastSeenMs<It?null:{...a,status:"running",ownerProcId:O,leaseLastSeenMs:n,startedAtMs:a.startedAtMs??n})}async heartbeat(e,n=Date.now()){const a=await this.update(e,s=>s.ownerProcId!==O?null:{...s,leaseLastSeenMs:n});a&&await this.mirror(a)}async release(e){const n=await this.update(e,a=>a.ownerProcId!==O?null:{...a,status:a.status==="running"?"paused":a.status,ownerProcId:0,leaseLastSeenMs:0});n&&(this.emit(n),await this.mirror(n,{force:!0}))}async markStep(e,n,a){const s=await this.update(e,r=>{const i=r.steps.map(o=>o.key===n?{...o,status:a.status,attempts:o.attempts+1,error:a.error,childFailures:a.childFailures}:o);return{...r,steps:i,completedCount:i.filter(o=>o.status!=="pending").length,failedCount:i.filter(o=>o.status==="failed").length,importedCount:r.importedCount+(a.imported?1:0),leaseLastSeenMs:Date.now()}});
2if(s){this.emit(s);const r=(this.stepsSinceMirror.get(e)??0)+1;this.stepsSinceMirror.set(e,r),await this.mirror(s,{force:r>=vt})}return s}async setStatus(e,n){const a=await this.update(e,s=>({...s,status:n,finishedAtMs:P(n)?Date.now():s.finishedAtMs,ownerProcId:P(n)?0:s.ownerProcId}));return a&&(this.emit(a),await this.mirror(a,{force:!0})),a}async retryFailedSteps(e){const n=await this.update(e,a=>{const s=a.steps.map(r=>r.status==="failed"?{...r,status:"pending",error:void 0,childFailures:void 0}:r);return{...a,steps:s,status:"queued",finishedAtMs:void 0,ownerProcId:0,leaseLastSeenMs:0,completedCount:s.filter(r=>r.status!=="pending").length,failedCount:0}});return n&&(this.emit(n),await this.mirror(n,{force:!0})),n}async dismiss(e){await this.update(e,n=>P(n.status)?{...n,dismissedAtMs:Date.now()}:n)}async mirror(e,n={}){const a=Date.now();if(!(!n.force&&a-e.lastMirrorAtMs<Et))try{await y("/ref_state/user/upsert",{refType:pe,refId:me,stateKey:he,stateSubKey:bt(e),ownerId:e.ownerUserId,data:Mt(e)}),this.stepsSinceMirror.set(e.id,0);const s=await k();await(s==null?void 0:s.jobs.update(e.id,{lastMirrorAtMs:a}))}catch(s){E("[JOBS] mirror failed",{jobId:e.id,error:s})}}async hydrateFromServer(e,n){var r;const a=await k();if(!a)return;let s=[];try{const i=await y("/ref_state/user/list",{refType:pe,refId:me,stateKey:he,ownerId:e,limit:50});s=(i==null?void 0:i.entries)||((r=i==null?void 0:i.result)==null?void 0:r.entries)||[]}catch(i){E("[JOBS] hydrate failed",i);return}for(const i of s){const o=i==null?void 0:i.data;if(!(o!=null&&o.id)||o.schemaVersion!==1)continue;const d=await a.jobs.get(o.id);d&&(d.ownerProcId===O||d.completedCount>=o.completedCount)||await a.jobs.put({id:o.id,kind:o.kind,status:o.status,label:o.label,accountId:n,ownerUserId:e,targetUserIds:(d==null?void 0:d.targetUserIds)??[],payload:(d==null?void 0:d.payload)??null,steps:(d==null?void 0:d.steps)??[],totalCount:o.totalCount,completedCount:o.completedCount,importedCount:o.importedCount,failedCount:o.failedCount,createdAtMs:o.createdAtMs,startedAtMs:o.startedAtMs,finishedAtMs:o.finishedAtMs,ownerProcId:0,leaseLastSeenMs:Date.now()-o.lease.lastSeenMs<St?o.lease.lastSeenMs:0,lastMirrorAtMs:Date.now(),dismissedAtMs:d==null?void 0:d.dismissedAtMs})}}emit(e,n){try{et.emit("job-updated",{jobId:e.id,kind:e.kind,status:e.status,label:e.label,total:e.totalCount,completed:e.completedCount,failed:e.failedCount,currentLabel:n,startedAtMs:e.startedAtMs})}catch(a){E("[JOBS] emit failed",a)}}};_(q,"_staticInstance",null);let g=q;const ge=4,Ct="starterContent.appliedEntries",kt="starterContent.appliedContentKeys",At={entryIdsKey:Ct,contentKeysKey:kt};function Fe(t){if(!t)return null;try{const e=new URL(t);return e.protocol!=="http:"&&e.protocol!=="https:"?null:e.toString()}catch{return null}}function Tt(t,e){return`${t.bundleId}:${e.entryId}`}function ye(t){return new Set(Array.isArray(t)?t.filter(e=>typeof e=="string"&&e.length>0):[])}async function Rt(t,e){var a,s;const n=await y("/user/prefs/get",{userId:t,keys:[e.entryIdsKey,e.contentKeysKey]});return{entryIds:ye((a=n==null?void 0:n.result)==null?void 0:a[e.entryIdsKey]),contentKeys:ye((s=n==null?void 0:n.result)==null?void 0:s[e.contentKeysKey])}}async function Lt(t,e,n){await y("/user/prefs/update",{userId:t,updates:{[n.entryIdsKey]:[...e.entryIds],[n.contentKeysKey]:[...e.contentKeys]}})}function we(t){return t.importKind==="published_collection"||t.publishedType==="col"}function Ot(t){if(t.kind==="published")return t.itemId?`published:${t.itemId}`:null;const e=Z(t.url||"");return e?`link:${e}`:null}function Pt(t,e,n){let a=!1;return t.entryIds.has(e)||(t.entryIds.add(e),a=!0),n&&!t.contentKeys.has(n)&&(t.contentKeys.add(n),a=!0),a}async function Kt(t,e,n={}){const a=await y("/item/findWithPublishId",{publishId:e,targetUserId:t});return(a==null?void 0:a.success)!==!0||!Array.isArray(a.result)?!1:n.requireCollection?a.result.some(s=>{var r;return((r=s==null?void 0:s.details)==null?void 0:r.type)==="col"}):a.result.length>0}async function xt(t,e){const n=await y("/item/similar/byURL",{url:e,targetUserId:t});if((n==null?void 0:n.success)!==!0||!Array.isArray(n.result))return!1;const a=Z(e);return n.result.some(s=>{var r;return(s==null?void 0:s.matchType)==="exact"?!0:!!a&&Z(((r=s==null?void 0:s.details)==null?void 0:r.url)||"")===a})}function Dt(t){return t.map(e=>{const n=[...new Map(((e==null?void 0:e.selectedEntries)||[]).filter(a=>!!(a!=null&&a.entryId)&&!!(a!=null&&a.kind)).map(a=>[a.entryId,a])).values()].filter(a=>a.kind==="published"?!!a.itemId:!!Fe(a.url));return!(e!=null&&e.userId)||n.length===0?null:{...e,selectedEntries:n}}).filter(e=>!!e)}async function Ft(t,e={}){const n=Dt(t),a=e.statePrefKeys||At,s=e.pinToHome!==!1,r=n.reduce((u,l)=>u+l.selectedEntries.length,0);let i=0;const o=new Map,d=[];for(const u of n){let l=o.get(u.userId);l||(l=await Rt(u.userId,a),o.set(u.userId,l));const m=new Set;let ie=!1,R=null;const Ye=async c=>{var ue,le,ce;const de=Tt(u,c),h=Ot(c),z=new Set;h&&!m.has(h)&&(m.add(h),z.add(h));let G,L=0;
2try{const w=!!h&&m.has(h)&&!z.has(h);if(!(l.entryIds.has(de)||!!h&&l.contentKeys.has(h)||w)){let x=!1;if(c.kind==="published"&&c.itemId){if(x=await Kt(u.userId,c.itemId,{requireCollection:we(c)}),!x)if(we(c)){const S=await y("/published/subscribe",{collectionId:c.itemId,userIds:[u.userId],forceClientImport:!0,pinToHome:s,reportChildFailures:!0});L=Number((ue=S==null?void 0:S.result)==null?void 0:ue.childFailures)||0}else await y("/published/item/importFromPublished",{itemId:c.itemId,userIds:[u.userId],targetUserId:u.userId,forceClientImport:!0,pinToHome:!1})}else if(c.kind==="link"&&c.url){const S=Fe(c.url);if(!S)throw new Error("Invalid starter content link URL");x=await xt(u.userId,S),x||await y("/item/save",{isNew:!0,targetUserId:u.userId,details:{name:c.title,description:c.description,url:S,type:"link",subType:"website"}})}if(L>0)throw new Error(`${L} item${L===1?"":"s"} in this collection could not be added`);Pt(l,de,h)&&(ie=!0)}}catch(w){G=(w==null?void 0:w.message)||"Failed to apply starter content entry",d.push({userId:u.userId,entryId:c.entryId,entryKind:c.kind,itemId:c.itemId,url:c.url,error:(w==null?void 0:w.message)||"Failed to apply starter content entry"}),!e.continueOnError&&!R&&(R=w)}finally{h&&z.has(h)&&m.delete(h),i+=1,(le=e.onEntrySettled)==null||le.call(e,{userId:u.userId,bundleId:u.bundleId,entryId:c.entryId,ok:!G,childFailures:L,error:G}),(ce=e.onProgress)==null||ce.call(e,{total:r,completed:i,percent:r>0?Math.round(i/r*100):100,userId:u.userId,bundleTitle:u.bundleTitle,entryId:c.entryId,entryKind:c.kind,itemId:c.itemId,url:c.url})}},oe=u.selectedEntries;for(let c=0;c<oe.length&&(await Promise.all(oe.slice(c,c+ge).map(Ye)),!R);c+=ge);if(ie&&await Lt(u.userId,l,a),R)throw R}return{total:r,completed:i,failed:d}}const Ut="content_bundle_import";function Ue(t,e,n){return`${t}:${e}:${n}`}function $t(t,e){const n=new Set(e.filter(a=>a.status==="pending").map(a=>a.key));return n.size?(t||[]).map(a=>({...a,selectedEntries:((a==null?void 0:a.selectedEntries)||[]).filter(s=>n.has(Ue(a.bundleId,s.entryId,a.userId)))})).filter(a=>a.selectedEntries.length>0):[]}async function Bt(t,e){const n=t.payload,a=$t((n==null?void 0:n.selections)||[],t.steps);a.length&&await Ft(a,{continueOnError:!0,pinToHome:(n==null?void 0:n.pinToHome)!==!1,onEntrySettled:s=>{e.markStep(Ue(s.bundleId,s.entryId,s.userId),{status:s.ok?"done":"failed",error:s.error,childFailures:s.childFailures,imported:s.ok})}})}const _e=new Map([[Ut,Bt]]);function Nt(t){const e=(t==null?void 0:t.name)||"";return e==="DatabaseClosedError"||e==="InvalidStateError"}let F=null;function Vt(){F&&clearTimeout(F),F=setTimeout(()=>{F=null,(async()=>{try{const{refresh:t}=await p(async()=>{const{refresh:e}=await import("./refresh.storeCM69jM7x.js").then(n=>n.a$);return{refresh:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]));await t.syncIndex({quick:!1,rebuild:!0})}catch(t){E("[JOBS] reindex after job failed",t)}})()},2e3)}class Ht{constructor(){_(this,"running",!1);_(this,"stopped",!1);_(this,"cancelledJobIds",new Set);_(this,"heartbeatTimer",null);_(this,"currentJobId",null);_(this,"unloadBound",!1)}cancel(e){this.cancelledJobIds.add(e)}async start(){}async stop(){this.stopped=!0,this.clearHeartbeat(),this.currentJobId&&(await g.instance.release(this.currentJobId).catch(()=>{}),this.currentJobId=null)}bindUnload(){this.unloadBound||typeof window>"u"||(this.unloadBound=!0,window.addEventListener("pagehide",()=>{this.currentJobId&&g.instance.release(this.currentJobId)}))}clearHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}async drain(){for(;!this.stopped;){const n=(await g.instance.list()).filter(s=>K(s.status)&&_e.has(s.kind)).filter(s=>!!s.payload).sort((s,r)=>s.createdAtMs-r.createdAtMs)[0];if(!n)return;const a=await g.instance.claim(n.id);if(!a)return;await this.runOne(a)}}async runOne(e){const n=g.instance;this.currentJobId=e.id,this.clearHeartbeat(),this.heartbeatTimer=setInterval(()=>{n.heartbeat(e.id)},_t);const a={markStep:async(s,r)=>{await n.markStep(e.id,s,r)},isCancelled:()=>this.cancelledJobIds.has(e.id)||this.stopped};try{if(!await this.targetsStillExist(e)){await n.setStatus(e.id,"cancelled");return}const s=_e.get(e.kind);if(!s)return;if(await s(e,a),this.cancelledJobIds.has(e.id)){await n.setStatus(e.id,"cancelled"),this.cancelledJobIds.delete(e.id);return}const r=await n.get(e.id),i=((r==null?void 0:r.steps)||[]).some(d=>d.status==="pending"),o=((r==null?void 0:r.failedCount)??0)>0;await n.setStatus(e.id,i?"paused":o?"failed":"completed"),((r==null?void 0:r.importedCount)??0)>0&&Vt()}
2catch(s){if(Nt(s)){E("[JOBS] database closed mid-job; pausing",{jobId:e.id}),await n.setStatus(e.id,"paused").catch(()=>{}),this.stopped=!0;return}E("[JOBS] job threw",{jobId:e.id,error:s}),await n.setStatus(e.id,"failed").catch(()=>{})}finally{this.clearHeartbeat(),this.currentJobId=null}}async targetsStillExist(e){var n,a;if(!((n=e.targetUserIds)!=null&&n.length))return!0;try{const{authStore:s}=await p(async()=>{const{authStore:i}=await import("./chunkReloadRecoveryrjuMb-b8.js").then(o=>o.eb);return{authStore:i}},__vite__mapDeps([1,2,3,4,5,6,7]));if(!s.usersLoaded||!((a=s.users)!=null&&a.length))return!0;const r=new Set(s.users.map(i=>i==null?void 0:i._id));return e.targetUserIds.every(i=>r.has(i))}catch{return!0}}}const $e=new Ht,I=Le({jobs:[],loaded:!1,panelOpen:!1}),Jt={active:f(()=>I.jobs.filter(t=>K(t.status))),recent:f(()=>I.jobs.filter(t=>P(t.status)&&!t.dismissedAtMs).slice(0,10)),hasActive:f(()=>I.jobs.some(t=>K(t.status))),visible:f(()=>I.jobs.filter(t=>K(t.status)||!t.dismissedAtMs))};async function se(){try{I.jobs=await g.instance.list(),I.loaded=!0}catch(t){E("[JOBS] refresh failed",t)}}async function vn(t,e={}){return null}async function bn(t){await g.instance.retryFailedSteps(t),await se(),$e.start()}async function Mn(t){$e.cancel(t),await g.instance.setStatus(t,"cancelled"),await se()}async function Cn(t){await g.instance.dismiss(t),await se()}function qt(){I.panelOpen=!0}function kn(){I.panelOpen=!1}const zt=["aria-label"],Gt={class:"knd-chip__text text-truncate"},An=ee({__name:"JobStatusChip",setup(t){const e=f(()=>Jt.active.value),n=f(()=>I.jobs.filter(l=>l.status==="failed"&&!l.dismissedAtMs)),a=f(()=>e.value.length>0||n.value.length>0),s=f(()=>e.value[0]??n.value[0]??null),r=f(()=>s.value?wt(s.value):0),i=f(()=>e.value.length===0&&n.value.length?"warn":void 0),o=f(()=>{const l=s.value;if(!l)return"";if(l.status==="failed")return"Some content failed";const m=e.value.length>1?` +${e.value.length-1}`:"";return`${l.label} ${l.completedCount}/${l.totalCount}${m}`}),d=f(()=>`${o.value}. Open background jobs.`);function u(){qt()}return(l,m)=>a.value?(V(),N("button",{key:0,type:"button",class:"knd-chip d-inline-flex align-items-center flex-gap-xs","aria-label":d.value,onClick:u},[Pe(yt,{value:r.value,max:100,size:"sm",tone:i.value},null,8,["value","tone"]),A("span",Gt,te(o.value),1)],8,zt)):Oe("",!0)}}),Yt=5e3,Ie=[1e3,2e3,4e3,8e3,16e3,3e4],Wt=.2,Qt=6,Xt="Uh oh — I can’t reach the server right now. 📡 If you're online, it may be restarting. Try again in a moment.";let Ee=!1,C=null,H=0,B=!1;const J=Ze(0);function re(){C&&(clearTimeout(C),C=null)}function Se(){re(),H=0,J.value=0}function Be(){re();const t=Ie[Math.min(H,Ie.length-1)];H+=1;const e=Math.round(t*(1+(Math.random()*2-1)*Wt));C=setTimeout(()=>{C=null,Ne()},e)}async function Ne(){if(!B){B=!0;try{if(xe()){Y(!0),Se();return}const t=await tt();await dt(`${t.apiURL}/system/version`,{method:"GET",mode:"cors",credentials:"omit",cache:"no-store",timeout:Yt}),J.value=0,Y(!0),Se()}catch{J.value+=1,Y(!1,Xt),Be()}finally{B=!1}}}function Zt(){C||B||Be()}function ve(){return $.disconnected||C!==null}function j(){H=0,re(),Ne()}function jt(){Ee||(Ee=!0,nt(Zt),typeof window<"u"&&window.addEventListener("online",()=>{ve()&&j()}),typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&ve()&&j()}))}let W=null;function en(){return W||(W=tn()),W}function tn(){const t=f(()=>$.disconnected&&!xe()),e=f(()=>$.lastKind),n=f(()=>e.value==="offline"?"Offline":J.value>=Qt?"Can't reach server":"Reconnecting…"),a=f(()=>e.value==="offline"?"wifi-off":"arrow-repeat"),s=f(()=>$.lastMessage||"Connection problem — retrying…");return{visible:t,kind:e,label:n,icon:a,detail:s,retryNow:j,startConnectionWatch:jt}}const nn=["title","aria-label"],an={class:"knd-chip__text text-truncate"},sn=ee({__name:"ConnectionStatusChip",setup(t){const{visible:e,label:n,icon:a,detail:s,retryNow:r}=en(),i=f(()=>`${s.value} Select to retry now.`);return(o,d)=>{const u=je("b-icon");return v(e)?(V(),N("button",{key:0,type:"button",class:"knd-chip knd-chip--warn d-inline-flex align-items-center flex-gap-xs",title:v(s),"aria-label":i.value,"data-test-id":"
2connectionStatusChip",onClick:d[0]||(d[0]=(...l)=>v(r)&&v(r)(...l))},[Pe(u,{icon:v(a),class:Re({connChip__spin:v(a)==="arrow-repeat"}),"aria-hidden":"true"},null,8,["icon","class"]),A("span",an,te(v(n)),1)],8,nn)):Oe("",!0)}}}),Tn=Ke(sn,[["__scopeId","data-v-1708679b"]]),M=at.ui.mode,rn=["light","dark","neon","pastel","primary"],Ve=X.appType=="android"?"dark":"light",T=Le({uiMode:Ve});function on(t){return t==="dark"?"#121212":t==="neon"?"#0a0a15":t==="pastel"?"#fff5f0":t==="primary"?"#ffffff":"#f9f9f9"}function dn(t){if(typeof document>"u"||!document.body||!document.documentElement)return;const e=t==="dark"||t==="neon",n=document.documentElement,a=document.body,s=on(t);n.setAttribute("data-bs-theme",e?"dark":"light"),n.classList.remove("knd-pretheme-dark","knd-pretheme-light"),n.classList.add(e?"knd-pretheme-dark":"knd-pretheme-light"),n.style.colorScheme=e?"dark":"light",n.style.backgroundColor=s,a.style.backgroundColor=s,window.__KND_BOOT_THEME__=t}function be(t){return t==="true"?"dark":t==="false"?"light":t&&rn.includes(t)?t:null}async function He(){if(typeof document>"u"||!document.body||!document.documentElement)return;const t=T.uiMode;document.body.classList.remove("light","dark"),document.body.classList.remove("theme-dark","theme-neon","theme-pastel","theme-primary"),t==="light"?document.body.classList.add("light"):t==="dark"?document.body.classList.add("dark","theme-dark"):t==="neon"?document.body.classList.add("dark","theme-neon"):t==="pastel"?document.body.classList.add("light","theme-pastel"):t==="primary"&&document.body.classList.add("light","theme-primary"),dn(t)}const un=async()=>{const t=await b.persistentGetString(M),e=be(t);e&&e!==t&&await b.persistentSetString(M,e);const n=await b.localGetString(M),a=be(n);a&&a!==n&&await b.localSetString(M,a);const s=e||a||Ve;T.uiMode=s,await b.localSetString(M,s)},ln=async t=>{T.uiMode=t,await b.persistentSetString(M,t),await b.localSetString(M,t)};async function Je(){if(!(!X.isMobileApp||X.appType!=="ios"))try{await st.sendAppRequest({action:"SET_COLOR_SCHEME_PREF",value:{scheme:qe()?"dark":"light"}})}catch(t){console.warn("[KND_THEME] failed to push color scheme to native",t)}}async function Rn(){await un(),He(),await Je()}async function Ln(t){await ln(t),await He(),await Je()}const qe=()=>T.uiMode==="dark"||T.uiMode==="neon",On=()=>T.uiMode,Pn={darkMode:qe},Kn=[{path:"/loggingOut",name:"LoggingOut",component:()=>p(()=>import("./LoggingOutDtYOx7kR.js"),__vite__mapDeps([18,2,3,1,4,5,6,7,19,20,21])),meta:{guest:!0,isKindred:!0,title:"Logging out"}},{path:"/helpdocs/kinbot",name:"Kinbot - Help",component:()=>p(()=>import("./kinbota7TUa1rp.js"),__vite__mapDeps([22,2,3]))},{path:"/helpdocs/updateClient",name:"Update Client - Help",component:()=>p(()=>import("./updateClientCVUSlUeE.js"),__vite__mapDeps([23,2,3,1,4,5,6,7]))},{path:"/profile/:userId",name:"ViewUser",component:()=>p(()=>import("./PublicProfileCo4J3Tje.js"),__vite__mapDeps([24,25,2,3,1,4,5,6,7,26,27,28,29,30,0,8,9,10,11,12,13,14,15,16,17,19,20,31,32,33,34,35,36,37])),meta:{isKindred:!0,guest:!0,title:"Public User Profile"}},{path:"/user/:userId/showcase",name:"ViewUserShowcase",component:()=>p(()=>import("./UserShowcaseBz-z7T3n.js"),__vite__mapDeps([38,2,3,1,4,5,6,7])),meta:{isKindred:!0,guest:!1,title:"Showcase"}},{path:"/review/:itemId",name:"ReviewItem",component:()=>p(()=>import("./ReviewItemBJOy2qyZ.js"),__vite__mapDeps([39,8,9,6,1,2,3,4,5,7,10,11,12,13,14,40,30,0,15,16,17,19,20,31,32,33,34])),meta:{isKindred:!0,title:"Reviews"}},{path:"/reviewlist/:itemId",name:"ReviewList",component:()=>p(()=>import("./ReviewsForItemBWmz3IJ2.js"),__vite__mapDeps([41,8,9,6,1,2,3,4,5,7,10,11,12,13,14,40,30,0,15,16,17,19,20,31,32,33,34,42,43,44,45,46,47,36,37,48,49,50,51,52,53,54,55,56,57,58,25,26,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73])),meta:{isKindred:!0}},{path:"/curationInfo",name:"CurationInfo",component:()=>p(()=>import("./CurationInfoDRD0iC4R.js"),__vite__mapDeps([74,75,11,12,76,2,3,1,4,5,6,7,77])),meta:{isKindred:!0,guest:!0,title:"Curation Info - Kindredly"}},{path:"/curate",name:"CurationQueue",component:fe(()=>p(()=>
2import("./CurationQueuevdojHjrV.js"),__vite__mapDeps([78,1,2,3,4,5,6,7,79,75,11,12,76,80]))),meta:{isKindred:!0,title:"Curation queue - Kindredly"}},{path:"/curate/:itemId",name:"Curate",component:fe(()=>p(()=>import("./CurateItemoYmkIQ1P.js"),__vite__mapDeps([81,8,9,6,1,2,3,4,5,7,10,11,12,13,14,82,83,84,85,19,20,86,87,72,88,89,15,90,91,30,0,16,17,31,32,33,34,42,43,44,45,46,47,36,37,48,49,50,51,52,53,54,55,56,57,58,25,26,59,60,61,62,63,64,65,66,67,68,69,70,71,73,79,75,76,92,93,94,95]))),meta:{isKindred:!0,title:"Curate - Kindredly"}},{path:"/order/checkout",name:"OrderCheckout",component:()=>p(()=>import("./OrderCheckoutDG9b82j5.js"),__vite__mapDeps([96,30,1,2,3,4,5,6,7,0,8,9,10,11,12,13,14,15,16,17,19,20,31,32,33,34,97,98])),meta:{guest:!1,isKindred:!0}},{path:"/order/summary",name:"OrderSummary",component:()=>p(()=>import("./OrderSummaryC8CCAo-N.js"),__vite__mapDeps([99,30,1,2,3,4,5,6,7,0,8,9,10,11,12,13,14,15,16,17,19,20,31,32,33,34,97,98])),meta:{guest:!1,isKindred:!0}},{path:"/order/complete",name:"OrderComplete",component:()=>p(()=>import("./OrderCompleteCi424fND.js"),__vite__mapDeps([100,2,3,1,4,5,6,7,98])),meta:{guest:!1,isKindred:!0}}];function Me(t){if(typeof t=="string"&&t.length>0)return t;if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.length>0)return e}return null}function cn(t){if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function Ce(t,e){const n=cn(t);if(!n||!n.includes("="))return null;for(const a of n.split(",")){const[s,...r]=a.split("=");if(!(!s||r.length===0)&&decodeURIComponent(s)===e)return decodeURIComponent(r.join("="))}return null}function xn(t){var s,r,i;if(!((s=t.path)!=null&&s.startsWith("/register")))return!1;const e=Me((r=t.query)==null?void 0:r.state),n=Me((i=t.query)==null?void 0:i.sourceId)||Ce(e,"sourceId"),a=Ce(e,"authType");return n==="extension"&&a==="register"}const fn=250,ze=8e3;async function Dn(){var e;const t=rt();if(!t||typeof window>"u"||window.parent===window)return!1;try{const n=await hn(t);if(!n)return console.warn("[handoff][guest] no grant received before timeout",{expectedHostOrigin:De(),timeoutMs:ze}),U(t,!1,"The extension did not answer the sign-in handshake.","no-grant"),!1;const a=await y("/auth/handoffImport",{token:n.token,encPassword:n.encPassword??null,userId:n.userId,userSnapshot:n.userSnapshot});if(!((e=a==null?void 0:a.result)!=null&&e.success)){const s=pn(a),r=(a==null?void 0:a.message)||"Handoff import failed";return console.warn("[handoff][guest] import failed",{reason:s,message:r,status:a==null?void 0:a.status}),U(t,!1,r,s),!1}return U(t,!0),E("[handoff][guest] import complete"),!0}catch(n){const a=n instanceof Error?n.message:String(n);return console.warn("[handoff][guest] import threw",a),U(t,!1,a,mn(n)),!1}}function pn(t){return Ge(t==null?void 0:t.message)?"storage-blocked":(t==null?void 0:t.status)===401||(t==null?void 0:t.errorType)==="AUTH"?"no-session":t!=null&&t.message?"import-failed":"unknown"}function mn(t){const e=t instanceof Error?t.message:String(t);return Ge(e)?"storage-blocked":"import-failed"}function Ge(t){if(!t)return!1;const e=t.toLowerCase();return e.includes("indexeddb")||e.includes("securityerror")||e.includes("database")&&e.includes("blocked")}function hn(t){return new Promise(e=>{const n=De();let a=!1,s=null;const r=()=>{window.removeEventListener("message",o),s&&clearInterval(s)},i=d=>{a||(a=!0,r(),e(d))},o=d=>{var u,l,m;if(!n||d.origin!==n){ke(d.data)&&Q("grant-origin-mismatch","[handoff][guest] ignored grant from unexpected origin",{eventOrigin:d.origin,expectedHostOrigin:n});return}if(!it(d.origin)){Q("grant-untrusted-host","[handoff][guest] ignored grant from untrusted host origin",{eventOrigin:d.origin});return}if(!ot(d.data,t)){ke(d.data)&&Q("grant-shape-mismatch","[handoff][guest] ignored malformed grant",{v:(u=d.data)==null?void 0:u.v,expectedV:ne,nonceMatches:((l=d.data)==null?void 0:l.nonce)===t,hasPayload:!!((m=d.data)!=null&&m.payload)});return}i(d.data.payload)};window.addEventListener("message",o),Te(t),s=setInterval(()=>Te(t),fn),setTimeout(()=>i(null),ze)})}function ke(t){return!!t&&typeof t=="object"&&t.type===ae.GRANT}const Ae=new Set;
2function Q(t,e,n){Ae.has(t)||(Ae.add(t),console.warn(e,n))}function Te(t){var e;(e=window.parent)==null||e.postMessage({type:ae.READY,v:ne,nonce:t},"*")}function U(t,e,n,a){var s;(s=window.parent)==null||s.postMessage({type:ae.ACK,v:ne,nonce:t,ok:e,error:n,reason:a},"*")}export{Tn as C,ze as H,An as _,I as a,wt as b,Rn as c,kn as d,Mn as e,bn as f,Pn as g,Cn as h,K as i,Jt as j,Ft as k,vn as l,en as m,jt as n,Kn as o,xn as p,Dn as q,se as r,Ln as s,On as t,He as u,rn as v,T as w,qe as x};

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.