k2-im 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import {p as p$1}from'./chunk-2R5T6ZOX.js';import {e,a as a$1}from'./chunk-CLEJGY6F.js';import {j,h}from'./chunk-7HTZ3OXY.js';import {ca}from'./chunk-KZM3GLRL.js';import {a}from'./chunk-WOT6VMZA.js';var N=p$1();function H(e$1,n){let t=n.suppressDraft===true?null:e$1.draft,i=t?.text.trim()??"",r,a="",s="";return t!==null?r=i===""?[]:G(e$1,i,n.locale):$(e$1)?r=y(K(e$1,n)):e$1.lastMessageSummary?.kind==="channel-moderation-deleted"||e$1.lastMessageDeletedForEveryone!==void 0?r=y(x(e$1,e$1.lastMessageSummary?.kind==="channel-moderation-deleted"?e$1.lastMessageSummary:{kind:"channel-moderation-deleted",by:e$1.lastMessageDeletedForEveryone?.by??""},n)):e$1.lastMessageSummary?.kind==="recalled"||e$1.lastMessageRecalled!==void 0?r=y(x(e$1,e$1.lastMessageSummary?.kind==="recalled"?e$1.lastMessageSummary:{kind:"recalled",by:e$1.lastMessageRecalled?.by??""},n)):(a=z(e$1,n),s=e$1.mentionUnreadCount>0?n.labels.mentionBadge:"",r=W(e$1,n)),{preview:`${s}${a}${r.map(l=>l.text).join("")}`||(t===null?n.labels.emptyPreview:""),previewSegments:r,senderPrefix:a,mentionBadge:s,time:e(a$1(t?.updatedAt,e$1.timestamp),{locale:n.locale,...n.now===void 0?{}:{now:n.now}}),hasDraft:t!==null}}function y(e){return [{kind:"text",text:e}]}function O(e){return e.map(n=>n.kind==="emoji"?{kind:"emoji",text:n.text,code:n.code}:{kind:n.kind,text:n.text})}function G(e,n,t){let i=e.draft?.mentions??[],r=[],a={},s=false;for(let l of i){if(l.userId==="0"){s=true;continue}r.includes(l.userId)||r.push(l.userId),l.displayName.trim()!==""&&(a[l.userId]=l.displayName);}let o=s||r.length>0?{atAll:s,atUserIds:r,...Object.keys(a).length===0?{}:{atUsersName:a}}:void 0;return O(ca(n,{mention:o,resolveName:l=>a[l]??l,atAllDisplay:j(t),matchers:[N]}))}function W(e,n){let t=e.lastMessageSummary;if(t!==void 0&&t.kind!=="text")return y(x(e,t,n));let i=(t?.kind==="text"?t.text:e.lastMessagePreview).trim();if(i==="")return y(n.labels.emptyPreview);let r=e.lastMessageMention?.atUsersName;return O(ca(i,{mention:e.lastMessageMention===void 0?void 0:{...e.lastMessageMention,atUserIds:[...e.lastMessageMention.atUserIds]},resolveName:a=>n.resolveName(e.ref,a,r?.[a]),selfId:n.accountId,atAllDisplay:j(n.locale),matchers:[N]}))}function x(e,n,t){return h(Q(n),{locale:t.locale,selfId:t.accountId,resolveName:i=>t.resolveName(e.ref,i)})}function $(e){return e.lastMessageSummary?.kind==="system"||e.lastMessageSenderId==="system"||e.lastMessageSystemEvent!==void 0}function K(e,n){return e.lastMessageSummary?.kind==="system"?x(e,e.lastMessageSummary,n):e.lastMessageSystemEvent===void 0?e.lastMessagePreview.trim()||n.labels.emptyPreview:x(e,{kind:"system",system:{eventType:e.lastMessageSystemEvent,...e.lastMessageSystemTargetsSelf===true?{targetUserIds:[n.accountId]}:{},...e.lastMessagePreview.trim()===""?{}:{fallbackText:e.lastMessagePreview.trim()}}},n)}function z(e,n){let t=e.lastMessageSenderId;return e.ref.conversationType!=="group"&&e.ref.conversationType!=="channel"||t===void 0||t===""||t==="system"?"":`${t===n.accountId?n.labels.selfSender:n.resolveName(e.ref,t)}: `}function Q(e){return e.kind!=="system"?e:{kind:"system",system:{eventType:e.system.eventType,...e.system.operatorId===void 0?{}:{operatorId:e.system.operatorId},...e.system.targetUserIds===void 0?{}:{targetUserIds:[...e.system.targetUserIds]},...e.system.fallbackText===void 0?{}:{fallbackText:e.system.fallbackText}}}}var q=160,J=220;function Y(e){let n=Math.max(0,e.showDelayMs??160),t=Math.max(0,e.minimumVisibleMs??220),i=e.now??Date.now,r=e.setTimer??((d,M)=>setTimeout(d,M)),a=e.clearTimer??(d=>clearTimeout(d)),s="",o=false,l=false,v=0,c,u,f=false;function g(){c!==void 0&&a(c),c=void 0;}function m(){u!==void 0&&a(u),u=void 0;}function h(d){l!==d&&(l=d,v=d?i():0,e.onVisibleChange(d));}function I(d){g(),c=r(()=>{c=void 0,!(f||!o||s!==d)&&h(true);},n);}function j(){if(g(),!l)return;let d=t-Math.max(0,i()-v);if(d<=0){h(false);return}m(),u=r(()=>{u=void 0,!(f||o)&&h(false);},d);}return {update(d,M){if(f)return;if(s!==M){s=M,o=d,g(),m(),h(false),d&&I(M);return}if(o=d,d){m(),!l&&c===void 0&&I(M);return}j();},dispose(){f||(f=true,o=false,g(),m(),h(false));}}}var S={placeholder:0,thumbnail:1,local:2,original:3};function X(e){let n;for(let t of e)t.value!==void 0&&(n===void 0||S[t.quality]>S[n.quality])&&(n=t);return n}function Z(e,n){return S[n]>=S[e]}function ee(e){let n=e.getGeneration();return Object.freeze({isCurrent:()=>e.getGeneration()===n})}function T(e){let n=e.getClient();if(n===null)return null;let t=e.getGeneration();return Object.freeze({client:n,isCurrent:()=>e.getGeneration()===t&&e.getClient()===n})}var _={};a(_,{acquireMediaBlob:()=>te,detectImageMime:()=>D,detectVideoMime:()=>F,loadCachedImageObjectUrl:()=>ae,loadCachedVideoObjectUrl:()=>ie,loadFileObjectUrl:()=>se,loadImageObjectUrl:()=>oe,loadVideoObjectUrl:()=>re,loadVoiceBytes:()=>ne});function A(e){if(e.conversationType!=="supergroup")return {conversation:{conversationType:e.conversationType,conversationId:e.conversationId},messageId:e.id}}async function C(e,n,t){let i=e.getClient(),r=A(n);if(i===null||r===void 0)throw new Error("media download unavailable");let a=t===void 0?void 0:i.media.subscribe(s=>{let o=s.find(l=>l.direction==="download"&&l.messageId===r.messageId&&l.ref.conversationType===r.conversation.conversationType&&l.ref.conversationId===r.conversation.conversationId);o!==void 0&&t(o.percent);});try{return await i.media.download(r)}finally{a?.();}}function D(e){return e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255?"image/jpeg":e.length>=8&&e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?"image/png":e.length>=6&&e[0]===71&&e[1]===73&&e[2]===70?"image/gif":e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?"image/webp":null}async function U(e){let n=new Uint8Array(await e.slice(0,12).arrayBuffer()),t=D(n);return t===null?null:URL.createObjectURL(e.type===t?e:e.slice(0,e.size,t))}function F(e){return e.length>=4&&e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?"video/webm":(e.length>=8&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112,"video/mp4")}function te(e,n){return e.acquireMediaBlob({conversationType:n.conversationType,conversationId:n.conversationId,messageId:n.id})}async function ne(e,n,t){let i=e.getClient(),r=n.body.voice;if(i===null||r===void 0)return null;let a=e.getSelfVoiceBytes(n.id);if(a!==void 0)return a;let s=e.getGeneration();try{let o=new Uint8Array(await(await C(e,n)).arrayBuffer());return o.length===0?(e.getGeneration()===s&&t.setNote(t.t("media.voiceLoadEmpty")),null):o}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.voiceLoadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}async function re(e,n,t,i){let r=e.getClient(),a=n.body.video;if(r===null||a===void 0)return null;let s=e.getGeneration();try{let o=await C(e,n,i);if(o.size===0)return e.getGeneration()===s&&t.setNote(t.t("media.videoOpenEmpty")),null;let l=URL.createObjectURL(o);return e.getGeneration()!==s?(URL.revokeObjectURL(l),null):l}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.videoLoadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}async function ie(e,n){let t=e.getClient(),i=A(n);if(t===null||i===void 0||n.body.video===void 0)return null;let r=e.getGeneration();try{let a=await t.media.getCached(i);if(a===null||a.size===0||e.getGeneration()!==r)return null;let s=new Uint8Array(await a.slice(0,12).arrayBuffer()),o=a.type||F(s);return e.getGeneration()!==r?null:URL.createObjectURL(a.type===o?a:a.slice(0,a.size,o))}catch{return null}}async function oe(e,n,t){let i=e.getClient(),r=n.body.image;if(i===null||r===void 0)return null;let a=e.getGeneration();try{let s=await C(e,n),o=await U(s);return o===null?(e.getGeneration()===a&&t.setNote(t.t("media.imageInvalid",{size:s.size})),null):e.getGeneration()!==a?(URL.revokeObjectURL(o),null):o}catch(s){return e.getGeneration()===a&&t.setNote(t.t("media.imageLoadFailed",{reason:s instanceof Error?s.message:String(s)})),null}}async function ae(e,n){let t=e.getClient(),i=A(n);if(t===null||i===void 0||n.body.image===void 0)return null;let r=e.getGeneration();try{let a=await t.media.getCached(i);if(a===null||a.size===0||e.getGeneration()!==r)return null;let s=await U(a);return s===null?null:e.getGeneration()!==r?(URL.revokeObjectURL(s),null):s}catch{return null}}async function se(e,n,t,i){let r=e.getClient(),a=n.body.file;if(r===null||a===void 0)return null;let s=e.getGeneration();try{let o=await C(e,n,i);if(o.size===0)return e.getGeneration()===s&&t.setNote(t.t("media.fileDownloadEmpty")),null;let l=URL.createObjectURL(o);return e.getGeneration()!==s?(URL.revokeObjectURL(l),null):l}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.fileDownloadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}var B={};a(B,{markReadUpTo:()=>le});function le(e,n,t,i){let r=T(e);if(r===null||n.conversationId===""||t==="")return;let a=r.client.conversations.list().find(o=>o.id===n.conversationId&&o.type===n.conversationType);if(a?.manuallyUnread===true&&a.unreadCount<=0){r.client.conversations.markConversationRead(n).catch(o=>{r.isCurrent()&&e.getDiagnostics().record("warn","chat-kit","conversation","clear-manual-unread-skipped",()=>({conversation:n,error:{message:"\u6E05\u9664\u624B\u5DE5\u672A\u8BFB\u63D0\u9192\u5931\u8D25",data:o}}));});return}if(a?.type==="group"&&a.unreadCount<=0)return;let s=i.getConversationHandle();s===void 0||s.ref.conversationId!==n.conversationId||s.ref.conversationType!==n.conversationType||s.markRead(t).catch(o=>{r.isCurrent()&&i.getConversationHandle()===s&&e.getDiagnostics().record("warn","chat-kit","message","mark-read-skipped",()=>({conversation:n,data:{messageId:t},error:{message:"markRead \u8DF3\u8FC7",data:o}}));});}function de(e){return e.deletedForEveryone!==void 0?"hidden":e.recalled!==void 0?"recalled":"content"}function ce(e,n){if(n.length===0)return [{text:e,hit:false}];let t=[],i=0;for(let[r,a]of n)r>i&&t.push({text:e.slice(i,r),hit:false}),t.push({text:e.slice(r,a),hit:true}),i=a;return i<e.length&&t.push({text:e.slice(i),hit:false}),t}var me=/\b(?:https?:\/\/|www\.)[^\s<>"')】]+/gi,ue=/\b(?:https?:\/\/|www\.)/i,fe=/[),.!?;:,。!?;:、)】]+$/u;function V(e){let n=/^www\./i.test(e)?`https://${e}`:e;try{let t=new URL(n);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function pe(e){return ue.test(e)}function ge(){return e=>{let n=[];for(let t of e.matchAll(me)){if(t.index===void 0)continue;let i=t[0].replace(fe,"");if(i==="")continue;let r=V(i);r!==void 0&&n.push({start:t.index,end:t.index+i.length-1,segment:{kind:"link",text:i,href:r}});}return n}}function p(e,n){if(!Number.isFinite(e)||e<=0)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${n} \u5FC5\u987B\u662F\u5927\u4E8E 0 \u7684\u6709\u9650\u6570`)}function he(e){if(p(e.fallbackAspectRatio,"fallbackAspectRatio"),!Array.isArray(e.rules)||e.rules.length===0)throw new Error("\u5A92\u4F53\u5C55\u793A\u7B56\u7565 rules \u4E0D\u80FD\u4E3A\u7A7A");let n=new Set;e.rules.forEach((t,i)=>{let r=`rules[${i}]`;if(t.id.trim()==="")throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.id \u4E0D\u80FD\u4E3A\u7A7A`);if(n.has(t.id))throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565\u89C4\u5219 id \u91CD\u590D\uFF1A${t.id}`);if(n.add(t.id),t.minAspectRatio!==void 0&&(!Number.isFinite(t.minAspectRatio)||t.minAspectRatio<0))throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.minAspectRatio \u5FC5\u987B\u662F\u5927\u4E8E\u7B49\u4E8E 0 \u7684\u6709\u9650\u6570`);if(t.maxAspectRatio!==void 0&&p(t.maxAspectRatio,`${r}.maxAspectRatio`),t.minAspectRatio!==void 0&&t.maxAspectRatio!==void 0&&t.minAspectRatio>=t.maxAspectRatio)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r} \u7684\u5BBD\u9AD8\u6BD4\u4E0B\u754C\u5FC5\u987B\u5C0F\u4E8E\u4E0A\u754C`);if(p(t.preferredWidth,`${r}.preferredWidth`),p(t.minWidth,`${r}.minWidth`),p(t.maxWidth,`${r}.maxWidth`),p(t.minHeight,`${r}.minHeight`),p(t.maxHeight,`${r}.maxHeight`),t.minWidth>t.preferredWidth||t.preferredWidth>t.maxWidth)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.preferredWidth \u5FC5\u987B\u4F4D\u4E8E minWidth \u548C maxWidth \u4E4B\u95F4`);if(t.minHeight>t.maxHeight)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.minHeight \u4E0D\u80FD\u5927\u4E8E maxHeight`);if(typeof t.allowUpscale!="boolean")throw new TypeError(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.allowUpscale \u5FC5\u987B\u662F boolean`);if(t.fit!=="cover"&&t.fit!=="contain")throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.fit \u53EA\u652F\u6301 cover \u6216 contain`)});}function ve(e){let{intrinsicWidth:n,intrinsicHeight:t,availableWidth:i,policy:r}=e;p(i,"availableWidth"),he(r);let a=Number.isFinite(n)&&Number.isFinite(t)&&n>0&&t>0,s=a?n/t:r.fallbackAspectRatio,o=r.rules.find(m=>{let h=m.minAspectRatio===void 0||s>=m.minAspectRatio,I=m.maxAspectRatio===void 0||s<m.maxAspectRatio;return h&&I});if(o===void 0)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565\u6CA1\u6709\u5339\u914D\u5BBD\u9AD8\u6BD4 ${s}`);let l=!o.allowUpscale&&a?Math.min(o.preferredWidth,n):o.preferredWidth,v=Math.min(i,o.maxWidth,Math.max(o.minWidth,l)),c=Math.max(1,Math.round(v)),u=c/s,f=Math.min(o.maxHeight,Math.max(o.minHeight,u)),g=Math.max(1,Math.round(f));return {width:c,height:g,aspectRatio:c/g,sourceAspectRatio:s,ruleId:o.id,fit:o.fit,aspectClamped:f!==u}}function Me(e,n,t,i){if(!Number.isFinite(e)||!Number.isFinite(n)||e<=0||n<=0)return null;let r=Math.min(t/e,i/n,1);return {width:`${Math.max(1,Math.round(e*r))}px`,aspectRatio:`${e} / ${n}`}}function ye(e){if(!Number.isFinite(e)||e<=0)return "0:00";let n=Math.floor(e),t=Math.floor(n/3600),i=Math.floor(n%3600/60),r=n%60,a=s=>s.toString().padStart(2,"0");return t>0?`${t}:${a(i)}:${a(r)}`:`${i}:${a(r)}`}function xe(e){if(!Number.isFinite(e)||e<=0)return "0 B";let n=["B","KB","MB","GB","TB"],t=Math.min(n.length-1,Math.floor(Math.log(e)/Math.log(1024))),i=e/1024**t;return `${t===0?i:Math.round(i*10)/10} ${n[t]}`}function Ie(e){let n=e.lastIndexOf(".");return n>-1&&n<e.length-1?e.slice(n+1).toLowerCase():""}var Se=4;function Ce(e){let n=Math.min(Math.max(e/1e3,0)/10,1);return Math.round(22+24*n)}function be(e,n){if(e.length===0)return Array.from({length:n},()=>0);let t=[],i=(e.length-1)/Math.max(1,n-1);for(let r=0;r<n;r+=1){let a=r*i,s=Math.round(a),o=e[Math.max(0,s-1)]??0,l=e[Math.min(e.length-1,s)]??0,v=e[Math.min(e.length-1,s+1)]??0;t.push((o+l+v)/3);}return t}function we(e,n){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);let i=[];for(let r=0;r<n;r+=1)t=Math.imul(t^t>>>15,2246822519)>>>0,i.push(90+t%111);return i}
1
+ import {p as p$1}from'./chunk-GBIHVXZP.js';import {e,a as a$1}from'./chunk-VYHK4LIZ.js';import {j,h}from'./chunk-C6HKXQPW.js';import {ca}from'./chunk-KTWXKQ4J.js';import {a}from'./chunk-WOT6VMZA.js';var N=p$1();function H(e$1,n){let t=n.suppressDraft===true?null:e$1.draft,i=t?.text.trim()??"",r,a="",s="";return t!==null?r=i===""?[]:G(e$1,i,n.locale):$(e$1)?r=y(K(e$1,n)):e$1.lastMessageSummary?.kind==="channel-moderation-deleted"||e$1.lastMessageDeletedForEveryone!==void 0?r=y(x(e$1,e$1.lastMessageSummary?.kind==="channel-moderation-deleted"?e$1.lastMessageSummary:{kind:"channel-moderation-deleted",by:e$1.lastMessageDeletedForEveryone?.by??""},n)):e$1.lastMessageSummary?.kind==="recalled"||e$1.lastMessageRecalled!==void 0?r=y(x(e$1,e$1.lastMessageSummary?.kind==="recalled"?e$1.lastMessageSummary:{kind:"recalled",by:e$1.lastMessageRecalled?.by??""},n)):(a=z(e$1,n),s=e$1.mentionUnreadCount>0?n.labels.mentionBadge:"",r=W(e$1,n)),{preview:`${s}${a}${r.map(l=>l.text).join("")}`||(t===null?n.labels.emptyPreview:""),previewSegments:r,senderPrefix:a,mentionBadge:s,time:e(a$1(t?.updatedAt,e$1.timestamp),{locale:n.locale,...n.now===void 0?{}:{now:n.now}}),hasDraft:t!==null}}function y(e){return [{kind:"text",text:e}]}function O(e){return e.map(n=>n.kind==="emoji"?{kind:"emoji",text:n.text,code:n.code}:{kind:n.kind,text:n.text})}function G(e,n,t){let i=e.draft?.mentions??[],r=[],a={},s=false;for(let l of i){if(l.userId==="0"){s=true;continue}r.includes(l.userId)||r.push(l.userId),l.displayName.trim()!==""&&(a[l.userId]=l.displayName);}let o=s||r.length>0?{atAll:s,atUserIds:r,...Object.keys(a).length===0?{}:{atUsersName:a}}:void 0;return O(ca(n,{mention:o,resolveName:l=>a[l]??l,atAllDisplay:j(t),matchers:[N]}))}function W(e,n){let t=e.lastMessageSummary;if(t!==void 0&&t.kind!=="text")return y(x(e,t,n));let i=(t?.kind==="text"?t.text:e.lastMessagePreview).trim();if(i==="")return y(n.labels.emptyPreview);let r=e.lastMessageMention?.atUsersName;return O(ca(i,{mention:e.lastMessageMention===void 0?void 0:{...e.lastMessageMention,atUserIds:[...e.lastMessageMention.atUserIds]},resolveName:a=>n.resolveName(e.ref,a,r?.[a]),selfId:n.accountId,atAllDisplay:j(n.locale),matchers:[N]}))}function x(e,n,t){return h(Q(n),{locale:t.locale,selfId:t.accountId,resolveName:i=>t.resolveName(e.ref,i)})}function $(e){return e.lastMessageSummary?.kind==="system"||e.lastMessageSenderId==="system"||e.lastMessageSystemEvent!==void 0}function K(e,n){return e.lastMessageSummary?.kind==="system"?x(e,e.lastMessageSummary,n):e.lastMessageSystemEvent===void 0?e.lastMessagePreview.trim()||n.labels.emptyPreview:x(e,{kind:"system",system:{eventType:e.lastMessageSystemEvent,...e.lastMessageSystemTargetsSelf===true?{targetUserIds:[n.accountId]}:{},...e.lastMessagePreview.trim()===""?{}:{fallbackText:e.lastMessagePreview.trim()}}},n)}function z(e,n){let t=e.lastMessageSenderId;return e.ref.conversationType!=="group"&&e.ref.conversationType!=="channel"||t===void 0||t===""||t==="system"?"":`${t===n.accountId?n.labels.selfSender:n.resolveName(e.ref,t)}: `}function Q(e){return e.kind!=="system"?e:{kind:"system",system:{eventType:e.system.eventType,...e.system.operatorId===void 0?{}:{operatorId:e.system.operatorId},...e.system.targetUserIds===void 0?{}:{targetUserIds:[...e.system.targetUserIds]},...e.system.fallbackText===void 0?{}:{fallbackText:e.system.fallbackText}}}}var q=160,J=220;function Y(e){let n=Math.max(0,e.showDelayMs??160),t=Math.max(0,e.minimumVisibleMs??220),i=e.now??Date.now,r=e.setTimer??((d,M)=>setTimeout(d,M)),a=e.clearTimer??(d=>clearTimeout(d)),s="",o=false,l=false,v=0,c,u,f=false;function g(){c!==void 0&&a(c),c=void 0;}function m(){u!==void 0&&a(u),u=void 0;}function h(d){l!==d&&(l=d,v=d?i():0,e.onVisibleChange(d));}function I(d){g(),c=r(()=>{c=void 0,!(f||!o||s!==d)&&h(true);},n);}function j(){if(g(),!l)return;let d=t-Math.max(0,i()-v);if(d<=0){h(false);return}m(),u=r(()=>{u=void 0,!(f||o)&&h(false);},d);}return {update(d,M){if(f)return;if(s!==M){s=M,o=d,g(),m(),h(false),d&&I(M);return}if(o=d,d){m(),!l&&c===void 0&&I(M);return}j();},dispose(){f||(f=true,o=false,g(),m(),h(false));}}}var S={placeholder:0,thumbnail:1,local:2,original:3};function X(e){let n;for(let t of e)t.value!==void 0&&(n===void 0||S[t.quality]>S[n.quality])&&(n=t);return n}function Z(e,n){return S[n]>=S[e]}function ee(e){let n=e.getGeneration();return Object.freeze({isCurrent:()=>e.getGeneration()===n})}function T(e){let n=e.getClient();if(n===null)return null;let t=e.getGeneration();return Object.freeze({client:n,isCurrent:()=>e.getGeneration()===t&&e.getClient()===n})}var _={};a(_,{acquireMediaBlob:()=>te,detectImageMime:()=>D,detectVideoMime:()=>F,loadCachedImageObjectUrl:()=>ae,loadCachedVideoObjectUrl:()=>ie,loadFileObjectUrl:()=>se,loadImageObjectUrl:()=>oe,loadVideoObjectUrl:()=>re,loadVoiceBytes:()=>ne});function A(e){if(e.conversationType!=="supergroup")return {conversation:{conversationType:e.conversationType,conversationId:e.conversationId},messageId:e.id}}async function C(e,n,t){let i=e.getClient(),r=A(n);if(i===null||r===void 0)throw new Error("media download unavailable");let a=t===void 0?void 0:i.media.subscribe(s=>{let o=s.find(l=>l.direction==="download"&&l.messageId===r.messageId&&l.ref.conversationType===r.conversation.conversationType&&l.ref.conversationId===r.conversation.conversationId);o!==void 0&&t(o.percent);});try{return await i.media.download(r)}finally{a?.();}}function D(e){return e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255?"image/jpeg":e.length>=8&&e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?"image/png":e.length>=6&&e[0]===71&&e[1]===73&&e[2]===70?"image/gif":e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?"image/webp":null}async function U(e){let n=new Uint8Array(await e.slice(0,12).arrayBuffer()),t=D(n);return t===null?null:URL.createObjectURL(e.type===t?e:e.slice(0,e.size,t))}function F(e){return e.length>=4&&e[0]===26&&e[1]===69&&e[2]===223&&e[3]===163?"video/webm":(e.length>=8&&e[4]===102&&e[5]===116&&e[6]===121&&e[7]===112,"video/mp4")}function te(e,n){return e.acquireMediaBlob({conversationType:n.conversationType,conversationId:n.conversationId,messageId:n.id})}async function ne(e,n,t){let i=e.getClient(),r=n.body.voice;if(i===null||r===void 0)return null;let a=e.getSelfVoiceBytes(n.id);if(a!==void 0)return a;let s=e.getGeneration();try{let o=new Uint8Array(await(await C(e,n)).arrayBuffer());return o.length===0?(e.getGeneration()===s&&t.setNote(t.t("media.voiceLoadEmpty")),null):o}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.voiceLoadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}async function re(e,n,t,i){let r=e.getClient(),a=n.body.video;if(r===null||a===void 0)return null;let s=e.getGeneration();try{let o=await C(e,n,i);if(o.size===0)return e.getGeneration()===s&&t.setNote(t.t("media.videoOpenEmpty")),null;let l=URL.createObjectURL(o);return e.getGeneration()!==s?(URL.revokeObjectURL(l),null):l}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.videoLoadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}async function ie(e,n){let t=e.getClient(),i=A(n);if(t===null||i===void 0||n.body.video===void 0)return null;let r=e.getGeneration();try{let a=await t.media.getCached(i);if(a===null||a.size===0||e.getGeneration()!==r)return null;let s=new Uint8Array(await a.slice(0,12).arrayBuffer()),o=a.type||F(s);return e.getGeneration()!==r?null:URL.createObjectURL(a.type===o?a:a.slice(0,a.size,o))}catch{return null}}async function oe(e,n,t){let i=e.getClient(),r=n.body.image;if(i===null||r===void 0)return null;let a=e.getGeneration();try{let s=await C(e,n),o=await U(s);return o===null?(e.getGeneration()===a&&t.setNote(t.t("media.imageInvalid",{size:s.size})),null):e.getGeneration()!==a?(URL.revokeObjectURL(o),null):o}catch(s){return e.getGeneration()===a&&t.setNote(t.t("media.imageLoadFailed",{reason:s instanceof Error?s.message:String(s)})),null}}async function ae(e,n){let t=e.getClient(),i=A(n);if(t===null||i===void 0||n.body.image===void 0)return null;let r=e.getGeneration();try{let a=await t.media.getCached(i);if(a===null||a.size===0||e.getGeneration()!==r)return null;let s=await U(a);return s===null?null:e.getGeneration()!==r?(URL.revokeObjectURL(s),null):s}catch{return null}}async function se(e,n,t,i){let r=e.getClient(),a=n.body.file;if(r===null||a===void 0)return null;let s=e.getGeneration();try{let o=await C(e,n,i);if(o.size===0)return e.getGeneration()===s&&t.setNote(t.t("media.fileDownloadEmpty")),null;let l=URL.createObjectURL(o);return e.getGeneration()!==s?(URL.revokeObjectURL(l),null):l}catch(o){return e.getGeneration()===s&&t.setNote(t.t("media.fileDownloadFailed",{reason:o instanceof Error?o.message:String(o)})),null}}var B={};a(B,{markReadUpTo:()=>le});function le(e,n,t,i){let r=T(e);if(r===null||n.conversationId===""||t==="")return;let a=r.client.conversations.list().find(o=>o.id===n.conversationId&&o.type===n.conversationType);if(a?.manuallyUnread===true&&a.unreadCount<=0){r.client.conversations.markConversationRead(n).catch(o=>{r.isCurrent()&&e.getDiagnostics().record("warn","chat-kit","conversation","clear-manual-unread-skipped",()=>({conversation:n,error:{message:"\u6E05\u9664\u624B\u5DE5\u672A\u8BFB\u63D0\u9192\u5931\u8D25",data:o}}));});return}if(a?.type==="group"&&a.unreadCount<=0)return;let s=i.getConversationHandle();s===void 0||s.ref.conversationId!==n.conversationId||s.ref.conversationType!==n.conversationType||s.markRead(t).catch(o=>{r.isCurrent()&&i.getConversationHandle()===s&&e.getDiagnostics().record("warn","chat-kit","message","mark-read-skipped",()=>({conversation:n,data:{messageId:t},error:{message:"markRead \u8DF3\u8FC7",data:o}}));});}function de(e){return e.deletedForEveryone!==void 0?"hidden":e.recalled!==void 0?"recalled":"content"}function ce(e,n){if(n.length===0)return [{text:e,hit:false}];let t=[],i=0;for(let[r,a]of n)r>i&&t.push({text:e.slice(i,r),hit:false}),t.push({text:e.slice(r,a),hit:true}),i=a;return i<e.length&&t.push({text:e.slice(i),hit:false}),t}var me=/\b(?:https?:\/\/|www\.)[^\s<>"')】]+/gi,ue=/\b(?:https?:\/\/|www\.)/i,fe=/[),.!?;:,。!?;:、)】]+$/u;function V(e){let n=/^www\./i.test(e)?`https://${e}`:e;try{let t=new URL(n);return t.protocol==="http:"||t.protocol==="https:"?t.href:void 0}catch{return}}function pe(e){return ue.test(e)}function ge(){return e=>{let n=[];for(let t of e.matchAll(me)){if(t.index===void 0)continue;let i=t[0].replace(fe,"");if(i==="")continue;let r=V(i);r!==void 0&&n.push({start:t.index,end:t.index+i.length-1,segment:{kind:"link",text:i,href:r}});}return n}}function p(e,n){if(!Number.isFinite(e)||e<=0)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${n} \u5FC5\u987B\u662F\u5927\u4E8E 0 \u7684\u6709\u9650\u6570`)}function he(e){if(p(e.fallbackAspectRatio,"fallbackAspectRatio"),!Array.isArray(e.rules)||e.rules.length===0)throw new Error("\u5A92\u4F53\u5C55\u793A\u7B56\u7565 rules \u4E0D\u80FD\u4E3A\u7A7A");let n=new Set;e.rules.forEach((t,i)=>{let r=`rules[${i}]`;if(t.id.trim()==="")throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.id \u4E0D\u80FD\u4E3A\u7A7A`);if(n.has(t.id))throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565\u89C4\u5219 id \u91CD\u590D\uFF1A${t.id}`);if(n.add(t.id),t.minAspectRatio!==void 0&&(!Number.isFinite(t.minAspectRatio)||t.minAspectRatio<0))throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.minAspectRatio \u5FC5\u987B\u662F\u5927\u4E8E\u7B49\u4E8E 0 \u7684\u6709\u9650\u6570`);if(t.maxAspectRatio!==void 0&&p(t.maxAspectRatio,`${r}.maxAspectRatio`),t.minAspectRatio!==void 0&&t.maxAspectRatio!==void 0&&t.minAspectRatio>=t.maxAspectRatio)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r} \u7684\u5BBD\u9AD8\u6BD4\u4E0B\u754C\u5FC5\u987B\u5C0F\u4E8E\u4E0A\u754C`);if(p(t.preferredWidth,`${r}.preferredWidth`),p(t.minWidth,`${r}.minWidth`),p(t.maxWidth,`${r}.maxWidth`),p(t.minHeight,`${r}.minHeight`),p(t.maxHeight,`${r}.maxHeight`),t.minWidth>t.preferredWidth||t.preferredWidth>t.maxWidth)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.preferredWidth \u5FC5\u987B\u4F4D\u4E8E minWidth \u548C maxWidth \u4E4B\u95F4`);if(t.minHeight>t.maxHeight)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.minHeight \u4E0D\u80FD\u5927\u4E8E maxHeight`);if(typeof t.allowUpscale!="boolean")throw new TypeError(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.allowUpscale \u5FC5\u987B\u662F boolean`);if(t.fit!=="cover"&&t.fit!=="contain")throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565 ${r}.fit \u53EA\u652F\u6301 cover \u6216 contain`)});}function ve(e){let{intrinsicWidth:n,intrinsicHeight:t,availableWidth:i,policy:r}=e;p(i,"availableWidth"),he(r);let a=Number.isFinite(n)&&Number.isFinite(t)&&n>0&&t>0,s=a?n/t:r.fallbackAspectRatio,o=r.rules.find(m=>{let h=m.minAspectRatio===void 0||s>=m.minAspectRatio,I=m.maxAspectRatio===void 0||s<m.maxAspectRatio;return h&&I});if(o===void 0)throw new Error(`\u5A92\u4F53\u5C55\u793A\u7B56\u7565\u6CA1\u6709\u5339\u914D\u5BBD\u9AD8\u6BD4 ${s}`);let l=!o.allowUpscale&&a?Math.min(o.preferredWidth,n):o.preferredWidth,v=Math.min(i,o.maxWidth,Math.max(o.minWidth,l)),c=Math.max(1,Math.round(v)),u=c/s,f=Math.min(o.maxHeight,Math.max(o.minHeight,u)),g=Math.max(1,Math.round(f));return {width:c,height:g,aspectRatio:c/g,sourceAspectRatio:s,ruleId:o.id,fit:o.fit,aspectClamped:f!==u}}function Me(e,n,t,i){if(!Number.isFinite(e)||!Number.isFinite(n)||e<=0||n<=0)return null;let r=Math.min(t/e,i/n,1);return {width:`${Math.max(1,Math.round(e*r))}px`,aspectRatio:`${e} / ${n}`}}function ye(e){if(!Number.isFinite(e)||e<=0)return "0:00";let n=Math.floor(e),t=Math.floor(n/3600),i=Math.floor(n%3600/60),r=n%60,a=s=>s.toString().padStart(2,"0");return t>0?`${t}:${a(i)}:${a(r)}`:`${i}:${a(r)}`}function xe(e){if(!Number.isFinite(e)||e<=0)return "0 B";let n=["B","KB","MB","GB","TB"],t=Math.min(n.length-1,Math.floor(Math.log(e)/Math.log(1024))),i=e/1024**t;return `${t===0?i:Math.round(i*10)/10} ${n[t]}`}function Ie(e){let n=e.lastIndexOf(".");return n>-1&&n<e.length-1?e.slice(n+1).toLowerCase():""}var Se=4;function Ce(e){let n=Math.min(Math.max(e/1e3,0)/10,1);return Math.round(22+24*n)}function be(e,n){if(e.length===0)return Array.from({length:n},()=>0);let t=[],i=(e.length-1)/Math.max(1,n-1);for(let r=0;r<n;r+=1){let a=r*i,s=Math.round(a),o=e[Math.max(0,s-1)]??0,l=e[Math.min(e.length-1,s)]??0,v=e[Math.min(e.length-1,s+1)]??0;t.push((o+l+v)/3);}return t}function we(e,n){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);let i=[];for(let r=0;r<n;r+=1)t=Math.imul(t^t>>>15,2246822519)>>>0,i.push(90+t%111);return i}
2
2
  export{H as a,q as b,J as c,Y as d,X as e,Z as f,ee as g,T as h,_ as i,B as j,de as k,ce as l,V as m,pe as n,ge as o,ve as p,Me as q,ye as r,xe as s,Ie as t,Se as u,Ce as v,be as w,we as x};
@@ -1 +1 @@
1
- import {c as c$1}from'./chunk-7HTZ3OXY.js';import {o}from'./chunk-KZM3GLRL.js';var w=864e5,P=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function u(e){return e!=null&&Number.isFinite(e)&&e>0&&!Number.isNaN(new Date(e).getTime())}function v(e,n){if(u(e))return e;if(u(n))return n}function b(e,n){return v(e,n)}function m(e){if(!u(e))return "";let n=new Date(e);return `${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`}function h(e,n){return u(e)?u(n)?m(e)!==m(n):true:false}function F(e,n){return T(e,n,"conversation")}function L(e,n){return T(e,n,"separator")}function T(e,n,r){if(!u(e))return "";let t=n.now??new Date;if(Number.isNaN(t.getTime()))return "";let o=new Date(e),a=y(t)-y(o),i=c$1(n.locale);return o.getFullYear()!==t.getFullYear()?A(o):a===0?r==="conversation"?k(o):i.today:a===1?i.yesterday:a>=2&&a<=6?x(o,i):D(o)}function y(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/w}function x(e,n){return n.weekdays[P[e.getDay()]]}function k(e){return `${c(e.getHours())}:${c(e.getMinutes())}`}function A(e){return `${e.getFullYear()}/${c(e.getMonth()+1)}/${c(e.getDate())}`}function D(e){return `${c(e.getMonth()+1)}/${c(e.getDate())}`}function c(e){return String(e).padStart(2,"0")}function O(e){if(e.markers.length===0)return null;let n=e.viewportTop+e.overlayTop;if(e.markers[0].top>n+1)return null;let r=0;for(let d=0;d<e.markers.length&&!(e.markers[d].top>n+1);d+=1)r=d;let t=e.markers[r],o=n+e.overlayHeight,a=e.markers.filter(d=>d.top<o+1&&d.top+d.height>n-1).at(-1),i=a===void 0?0:Math.max(0,Math.min(a.top+a.height,o)-Math.max(a.top,n)),s=a===void 0?1:Math.max(1,Math.min(a.height,e.overlayHeight)),l=Math.min(1,i/s);return {key:t.key,label:t.label,inlineOpacity:1-l,...a===void 0?{}:{inlineDateKey:a.key}}}var C={text:"text",image:"image",video:"video",voice:"voice",file:"file",sticker:"sticker",contact:"contact",miniProgram:"miniProgram",game:"game",transfer:"transfer",redPacket:"redPacket",call:"call",system:"system",unknown:"unknown"};function S(e){switch(e.contentType){case "text":return typeof e.body.text=="string";case "image":return e.body.image!==void 0&&typeof e.body.image.url=="string";case "video":return e.body.video!==void 0&&typeof e.body.video.url=="string";case "voice":return e.body.voice!==void 0;case "file":return e.body.file!==void 0;case "sticker":return e.body.sticker!==void 0;case "contact":return e.body.contact!==void 0;case "miniProgram":return e.body.miniProgram!==void 0&&typeof e.body.miniProgram.appId=="string";case "transfer":return e.body.transfer!==void 0&&typeof e.body.transfer.serialNumber=="string";case "redPacket":{let n=e.body.redPacket;return n!==void 0&&n.packetId.trim()!==""&&(n.packetType===1||n.packetType===2||n.packetType===3||n.packetType===4)}case "call":return e.body.call!==void 0&&(e.body.call.callKind==="audio"||e.body.call.callKind==="video")&&typeof e.body.call.durationMs=="number";case "game":{let n=e.body.game;return n?.gameType==="dice"?Number.isInteger(n.value)&&n.value>=1&&n.value<=6:n?.gameType==="rock-paper-scissors"&&Number.isInteger(n.value)&&n.value>=1&&n.value<=3}case "system":return e.body.system!==void 0;case "unknown":return e.body.unknown!==void 0}}function I(e){return e.encryption.decryptFailed===true?"decrypt-failed":S(e)?e.contentType==="sticker"?o(e.body.sticker.imageType):C[e.contentType]:"unknown"}function _(e){let n=[...e.leadingItems??[]],r=e.entryUnread.state==="located"?e.entryUnread:null,t,o=null,a=false;for(let i of e.messages){let s=b(i.createdAt,i.serverTime),l=s!==void 0&&h(s,t);s!==void 0&&l&&n.push({kind:"date-separator",key:`date-${m(s)}-${i.id}`,label:e.formatDate(s)}),t=s,!a&&r!==null&&i.id===r.firstMessageId&&(n.push({kind:"entry-unread",key:`entry-unread-${i.id}`,...r.count===void 0?{}:{count:r.count}}),a=true);let d=e.beforeMessageItems?.(i)??[];if(n.push(...d),I(i)==="system"){n.push({kind:"system",key:i.id,message:i}),o=null;continue}n.push({kind:"message",key:`message-${i.id}`,message:i,firstOfRun:l||i.senderId!==o}),o=i.senderId;}return n}function U(e){let n=e.targetTop-e.viewportTop,r=e.currentScrollTop+n-(e.viewportHeight-e.targetHeight)/2,t=Math.max(0,e.scrollHeight-e.viewportHeight);return Math.min(t,Math.max(0,r))}function j(e){return e!==null&&e.clientWidth>0&&e.clientHeight>0}function G(e){return e.locatedAt<=0||e.duration<0||e.now<e.locatedAt?false:e.now-e.locatedAt<=e.duration}function q(e){return !Number.isFinite(e.topThreshold)||e.topThreshold<0?false:e.currentScrollTop<e.previousScrollTop&&e.currentScrollTop<=e.topThreshold}function H(e,n){return e.find(r=>r.bottom>n.top&&r.top<n.bottom)??e[0]}function f(e){return e.anchorTop??e.top}function B(e,n){let r=H(e,n);return r===void 0?void 0:{id:r.id,offset:f(r)-n.top}}function J(e,n,r){if(e===void 0)return;let t=n.find(o=>o.id===e.id);return t!==void 0&&t.bottom>r.top&&t.top<r.bottom?{id:e.id,offset:f(t)-r.top}:B(n,r)??e}function V(e,n,r){if(e===void 0)return;let t=n.find(o=>o.id===e.id);return t===void 0?void 0:f(t)-r.top-e.offset}function Q(e,n,r=3){return !Number.isFinite(r)||r<=0?[]:e.filter(t=>t.bottom>n.top&&t.top<n.bottom).slice(0,Math.floor(r)).map(t=>({id:t.id,offset:f(t)-n.top}))}function X(e,n,r){for(let t of e){let o=V(t,n,r);if(o!==void 0)return o}}function Z(e){return e.sameConversation&&!e.isHistoryWindow&&!e.isLocating&&!e.isLocateProtected&&e.userKeptLatestIntent}function ee(e){return e.isPageVisible&&!e.isHistoryWindow&&!e.isLocating&&!e.isLocateProtected&&(e.isOwnMessage||e.isAtBottom)}function ne(e){return e.isLoadingOlder&&e.previousTailId!==void 0&&e.previousTailId!==e.currentTailId&&e.previousMessageIds.includes(e.currentTailId)}function re(e,n){return e!==void 0&&!n.has(e)}async function te(e,n){let r=0;for(;e()&&!(await n()<=0);)r+=1;return r}function oe(e){return e.hasMoreHistory&&Number.isFinite(e.scrollHeight)&&Number.isFinite(e.clientHeight)&&e.scrollHeight>0&&e.clientHeight>0&&e.scrollHeight<=e.clientHeight}function ie(e){return e.isHistoryWindow&&!e.isPageSettling&&e.isAtBottom&&(e.currentScrollTop>e.previousScrollTop||e.allowStationaryBoundary===true)}function M(e){return !e.isPageVisible||!e.isAtBottom||e.isHistoryWindow}function ae(e){let n=Math.max(0,e.margin);return e.messageTop<e.viewportBottom-n&&e.messageBottom>e.viewportTop+n}function le(e){let n=new Set;function r(s){return s===n.size?false:(e?.(n.size),true)}function t(s){let l=n.size;for(let d of s)d!==""&&n.add(d);return r(l)}function o(s,l){return M(l)&&t(s)}function a(s){let l=n.size;for(let d of s)n.delete(d);return r(l)}function i(){let s=n.size;return n.clear(),r(s)}return {get count(){return n.size},add:t,trackRemote:o,acknowledgeVisible:a,clear:i}}export{M as A,ae as B,le as C,v as a,b,m as c,h as d,F as e,L as f,O as g,I as h,_ as i,U as j,j as k,G as l,q as m,H as n,B as o,J as p,V as q,Q as r,X as s,Z as t,ee as u,ne as v,re as w,te as x,oe as y,ie as z};
1
+ import {c as c$1}from'./chunk-C6HKXQPW.js';import {o}from'./chunk-KTWXKQ4J.js';var w=864e5,P=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function u(e){return e!=null&&Number.isFinite(e)&&e>0&&!Number.isNaN(new Date(e).getTime())}function v(e,n){if(u(e))return e;if(u(n))return n}function b(e,n){return v(e,n)}function m(e){if(!u(e))return "";let n=new Date(e);return `${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`}function h(e,n){return u(e)?u(n)?m(e)!==m(n):true:false}function F(e,n){return T(e,n,"conversation")}function L(e,n){return T(e,n,"separator")}function T(e,n,r){if(!u(e))return "";let t=n.now??new Date;if(Number.isNaN(t.getTime()))return "";let o=new Date(e),a=y(t)-y(o),i=c$1(n.locale);return o.getFullYear()!==t.getFullYear()?A(o):a===0?r==="conversation"?k(o):i.today:a===1?i.yesterday:a>=2&&a<=6?x(o,i):D(o)}function y(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/w}function x(e,n){return n.weekdays[P[e.getDay()]]}function k(e){return `${c(e.getHours())}:${c(e.getMinutes())}`}function A(e){return `${e.getFullYear()}/${c(e.getMonth()+1)}/${c(e.getDate())}`}function D(e){return `${c(e.getMonth()+1)}/${c(e.getDate())}`}function c(e){return String(e).padStart(2,"0")}function O(e){if(e.markers.length===0)return null;let n=e.viewportTop+e.overlayTop;if(e.markers[0].top>n+1)return null;let r=0;for(let d=0;d<e.markers.length&&!(e.markers[d].top>n+1);d+=1)r=d;let t=e.markers[r],o=n+e.overlayHeight,a=e.markers.filter(d=>d.top<o+1&&d.top+d.height>n-1).at(-1),i=a===void 0?0:Math.max(0,Math.min(a.top+a.height,o)-Math.max(a.top,n)),s=a===void 0?1:Math.max(1,Math.min(a.height,e.overlayHeight)),l=Math.min(1,i/s);return {key:t.key,label:t.label,inlineOpacity:1-l,...a===void 0?{}:{inlineDateKey:a.key}}}var C={text:"text",image:"image",video:"video",voice:"voice",file:"file",sticker:"sticker",contact:"contact",miniProgram:"miniProgram",game:"game",transfer:"transfer",redPacket:"redPacket",call:"call",system:"system",unknown:"unknown"};function S(e){switch(e.contentType){case "text":return typeof e.body.text=="string";case "image":return e.body.image!==void 0&&typeof e.body.image.url=="string";case "video":return e.body.video!==void 0&&typeof e.body.video.url=="string";case "voice":return e.body.voice!==void 0;case "file":return e.body.file!==void 0;case "sticker":return e.body.sticker!==void 0;case "contact":return e.body.contact!==void 0;case "miniProgram":return e.body.miniProgram!==void 0&&typeof e.body.miniProgram.appId=="string";case "transfer":return e.body.transfer!==void 0&&typeof e.body.transfer.serialNumber=="string";case "redPacket":{let n=e.body.redPacket;return n!==void 0&&n.packetId.trim()!==""&&(n.packetType===1||n.packetType===2||n.packetType===3||n.packetType===4)}case "call":return e.body.call!==void 0&&(e.body.call.callKind==="audio"||e.body.call.callKind==="video")&&typeof e.body.call.durationMs=="number";case "game":{let n=e.body.game;return n?.gameType==="dice"?Number.isInteger(n.value)&&n.value>=1&&n.value<=6:n?.gameType==="rock-paper-scissors"&&Number.isInteger(n.value)&&n.value>=1&&n.value<=3}case "system":return e.body.system!==void 0;case "unknown":return e.body.unknown!==void 0}}function I(e){return e.encryption.decryptFailed===true?"decrypt-failed":S(e)?e.contentType==="sticker"?o(e.body.sticker.imageType):C[e.contentType]:"unknown"}function _(e){let n=[...e.leadingItems??[]],r=e.entryUnread.state==="located"?e.entryUnread:null,t,o=null,a=false;for(let i of e.messages){let s=b(i.createdAt,i.serverTime),l=s!==void 0&&h(s,t);s!==void 0&&l&&n.push({kind:"date-separator",key:`date-${m(s)}-${i.id}`,label:e.formatDate(s)}),t=s,!a&&r!==null&&i.id===r.firstMessageId&&(n.push({kind:"entry-unread",key:`entry-unread-${i.id}`,...r.count===void 0?{}:{count:r.count}}),a=true);let d=e.beforeMessageItems?.(i)??[];if(n.push(...d),I(i)==="system"){n.push({kind:"system",key:i.id,message:i}),o=null;continue}n.push({kind:"message",key:`message-${i.id}`,message:i,firstOfRun:l||i.senderId!==o}),o=i.senderId;}return n}function U(e){let n=e.targetTop-e.viewportTop,r=e.currentScrollTop+n-(e.viewportHeight-e.targetHeight)/2,t=Math.max(0,e.scrollHeight-e.viewportHeight);return Math.min(t,Math.max(0,r))}function j(e){return e!==null&&e.clientWidth>0&&e.clientHeight>0}function G(e){return e.locatedAt<=0||e.duration<0||e.now<e.locatedAt?false:e.now-e.locatedAt<=e.duration}function q(e){return !Number.isFinite(e.topThreshold)||e.topThreshold<0?false:e.currentScrollTop<e.previousScrollTop&&e.currentScrollTop<=e.topThreshold}function H(e,n){return e.find(r=>r.bottom>n.top&&r.top<n.bottom)??e[0]}function f(e){return e.anchorTop??e.top}function B(e,n){let r=H(e,n);return r===void 0?void 0:{id:r.id,offset:f(r)-n.top}}function J(e,n,r){if(e===void 0)return;let t=n.find(o=>o.id===e.id);return t!==void 0&&t.bottom>r.top&&t.top<r.bottom?{id:e.id,offset:f(t)-r.top}:B(n,r)??e}function V(e,n,r){if(e===void 0)return;let t=n.find(o=>o.id===e.id);return t===void 0?void 0:f(t)-r.top-e.offset}function Q(e,n,r=3){return !Number.isFinite(r)||r<=0?[]:e.filter(t=>t.bottom>n.top&&t.top<n.bottom).slice(0,Math.floor(r)).map(t=>({id:t.id,offset:f(t)-n.top}))}function X(e,n,r){for(let t of e){let o=V(t,n,r);if(o!==void 0)return o}}function Z(e){return e.sameConversation&&!e.isHistoryWindow&&!e.isLocating&&!e.isLocateProtected&&e.userKeptLatestIntent}function ee(e){return e.isPageVisible&&!e.isHistoryWindow&&!e.isLocating&&!e.isLocateProtected&&(e.isOwnMessage||e.isAtBottom)}function ne(e){return e.isLoadingOlder&&e.previousTailId!==void 0&&e.previousTailId!==e.currentTailId&&e.previousMessageIds.includes(e.currentTailId)}function re(e,n){return e!==void 0&&!n.has(e)}async function te(e,n){let r=0;for(;e()&&!(await n()<=0);)r+=1;return r}function oe(e){return e.hasMoreHistory&&Number.isFinite(e.scrollHeight)&&Number.isFinite(e.clientHeight)&&e.scrollHeight>0&&e.clientHeight>0&&e.scrollHeight<=e.clientHeight}function ie(e){return e.isHistoryWindow&&!e.isPageSettling&&e.isAtBottom&&(e.currentScrollTop>e.previousScrollTop||e.allowStationaryBoundary===true)}function M(e){return !e.isPageVisible||!e.isAtBottom||e.isHistoryWindow}function ae(e){let n=Math.max(0,e.margin);return e.messageTop<e.viewportBottom-n&&e.messageBottom>e.viewportTop+n}function le(e){let n=new Set;function r(s){return s===n.size?false:(e?.(n.size),true)}function t(s){let l=n.size;for(let d of s)d!==""&&n.add(d);return r(l)}function o(s,l){return M(l)&&t(s)}function a(s){let l=n.size;for(let d of s)n.delete(d);return r(l)}function i(){let s=n.size;return n.clear(),r(s)}return {get count(){return n.size},add:t,trackRemote:o,acknowledgeVisible:a,clear:i}}export{M as A,ae as B,le as C,v as a,b,m as c,h as d,F as e,L as f,O as g,I as h,_ as i,U as j,j as k,G as l,q as m,H as n,B as o,J as p,V as q,Q as r,X as s,Z as t,ee as u,ne as v,re as w,te as x,oe as y,ie as z};
package/dist/i18n.js CHANGED
@@ -1 +1 @@
1
- import'./chunk-SXY56EVC.js';export{a as DEFAULT_LOCALE,k as createImI18n,f as formatFailure,h as formatLastMessageSummary,i as formatMediaPlaceholder,j as formatMentionAll,l as formatServiceText,g as formatSystemMessage,c as getImTimeCatalog,b as normalizeImLocale,d as registerImCatalogOverrides,e as resetImCatalogOverrides}from'./chunk-7HTZ3OXY.js';import'./chunk-KZM3GLRL.js';import'./chunk-WOT6VMZA.js';
1
+ import'./chunk-SXY56EVC.js';export{a as DEFAULT_LOCALE,k as createImI18n,f as formatFailure,h as formatLastMessageSummary,i as formatMediaPlaceholder,j as formatMentionAll,l as formatServiceText,g as formatSystemMessage,c as getImTimeCatalog,b as normalizeImLocale,d as registerImCatalogOverrides,e as resetImCatalogOverrides}from'./chunk-C6HKXQPW.js';import'./chunk-KTWXKQ4J.js';import'./chunk-WOT6VMZA.js';
package/dist/index.d.ts CHANGED
@@ -1345,6 +1345,13 @@ interface ImLoginContext {
1345
1345
  interface ImAuthIssue {
1346
1346
  code: number;
1347
1347
  reason: 'token_expired' | 'kicked' | 'banned' | 'unknown';
1348
+ /**
1349
+ * 服务端记录的账号上次登录时间(毫秒时间戳),用于宿主提示「你的账号于某时在其他设备登录」。
1350
+ *
1351
+ * 只有登录被拒的被踢路径(CMLoginAck.nLastLoginTime)能拿到该时间;运行期收到
1352
+ * CM_KICKOUT_NOTIFICATION 时协议不带时间,此处为 undefined,由宿主自行决定如何展示。
1353
+ */
1354
+ lastLoginTime?: number;
1348
1355
  }
1349
1356
  interface ImAuthProvider {
1350
1357
  /** 返回登录上下文;返回 null 表示当前不可登录(缺凭据)。 */
@@ -1677,6 +1684,45 @@ interface ImProfilePort {
1677
1684
  clearCache?: () => void;
1678
1685
  }
1679
1686
 
1687
+ /** 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。 */
1688
+ type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file';
1689
+ /** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
1690
+ interface ImSessionFavoriteItem$1 {
1691
+ readonly collectId: string;
1692
+ readonly msgId: string;
1693
+ readonly kind: ImSessionFavoriteKind;
1694
+ readonly senderId: string;
1695
+ readonly senderName: string;
1696
+ readonly avatarUrl: string;
1697
+ readonly createdAt: string;
1698
+ readonly text: string;
1699
+ readonly imageUrl: string;
1700
+ readonly fileName: string;
1701
+ readonly body: Readonly<Record<string, unknown>>;
1702
+ readonly conversation: ConversationRef | null;
1703
+ }
1704
+ /** 把一条会话消息写成收藏快照时所需的已校验字段。 */
1705
+ interface ImSessionFavoriteWriteInput {
1706
+ readonly messageId: string;
1707
+ readonly conversation: ConversationRef;
1708
+ readonly senderId: string;
1709
+ readonly createdAt: number;
1710
+ readonly kind: ImSessionFavoriteKind;
1711
+ readonly plainBody: Readonly<Record<string, unknown>>;
1712
+ readonly peerId: string;
1713
+ readonly hide?: boolean;
1714
+ }
1715
+ /**
1716
+ * 会话收藏 HTTP 端口。
1717
+ *
1718
+ * Browser adapter 负责 `/user/favorite/*`、收藏 TEA 和 DTO 映射;Core 不持有收藏列表副本。
1719
+ */
1720
+ interface ImSessionFavoritePort {
1721
+ list: () => Promise<readonly ImSessionFavoriteItem$1[]>;
1722
+ add: (input: ImSessionFavoriteWriteInput) => Promise<ImSessionFavoriteItem$1>;
1723
+ delete: (collectIds: readonly string[]) => Promise<void>;
1724
+ }
1725
+
1680
1726
  /** 迁移期存储会话入参;新代码使用 ref,string 仅兼容唯一命中的旧调用。 */
1681
1727
  type ImStorageConversation = ConversationRef | string;
1682
1728
  /** 打开账号库的选项。namespace = 账号隔离键(登录 userId)。 */
@@ -2095,6 +2141,10 @@ type ImEvent = {
2095
2141
  | {
2096
2142
  type: 'application:updated';
2097
2143
  application: ApplicationUpdate;
2144
+ }
2145
+ /** 其它端改了会话收藏;权威列表必须重新拉 HTTP,不携带收藏正文。 */
2146
+ | {
2147
+ type: 'session-favorites:changed';
2098
2148
  } | {
2099
2149
  type: 'sync:complete';
2100
2150
  conversations: ConversationRef[];
@@ -5704,12 +5754,16 @@ interface ImProductEventMap {
5704
5754
  'application:updated': Readonly<{
5705
5755
  application: ImProductApplicationUpdate;
5706
5756
  }>;
5757
+ /** 其它端改了会话收藏;权威列表必须重新拉 HTTP。 */
5758
+ 'session-favorites:changed': Readonly<Record<never, never>>;
5707
5759
  'sync:complete': Readonly<{
5708
5760
  conversations: readonly ConversationRef<ProductConversationListType>[];
5709
5761
  }>;
5762
+ /** `lastLoginTime` 为服务端记录的上次登录时间(毫秒),仅被踢且走登录 ACK 的路径才有值。 */
5710
5763
  'auth:invalid': Readonly<{
5711
5764
  code: string;
5712
5765
  reason: ImProductAuthInvalidReason;
5766
+ lastLoginTime?: number;
5713
5767
  }>;
5714
5768
  'error': Readonly<{
5715
5769
  error: ImProductEventError;
@@ -5995,6 +6049,31 @@ interface ImSearchApi {
5995
6049
  readonly messages: ImMessageSearchApi;
5996
6050
  }
5997
6051
 
6052
+ /**
6053
+ * 会话收藏稳定产品门面。
6054
+ *
6055
+ * 本模块不缓存服务端列表;每次 list/add/delete 都以当前账号 provider 为准。
6056
+ * 收藏快照与原聊天消息解耦:原消息删除、撤回或编辑不会回写收藏。
6057
+ */
6058
+
6059
+ type ImSessionFavoriteItem = Readonly<ImSessionFavoriteItem$1>;
6060
+ /** 产品层会话收藏 API。 */
6061
+ interface ImSessionFavoritesApi {
6062
+ list: () => Promise<readonly ImSessionFavoriteItem[]>;
6063
+ addFromMessage: (input: {
6064
+ message: ImMessageView;
6065
+ conversation: ConversationRef;
6066
+ selfId: string;
6067
+ }) => Promise<ImSessionFavoriteItem>;
6068
+ delete: (collectIds: readonly string[]) => Promise<void>;
6069
+ }
6070
+ /** 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件可收藏;表情、名片、通话等不可。 */
6071
+ declare function resolveSessionFavoriteKindFromMessage(message: ImMessageView): ImSessionFavoriteKind | null;
6072
+ /**
6073
+ * 组收藏快照明文。content 空则返回 null,对齐 iOS `collectMsg:YES` 不写空 body。
6074
+ */
6075
+ declare function buildSessionFavoritePlainBody(message: ImMessageView): Readonly<Record<string, unknown>> | null;
6076
+
5998
6077
  /**
5999
6078
  * 当前账号的 IM 本地偏好产品域。
6000
6079
  *
@@ -6231,6 +6310,8 @@ interface ImAdvancedClientOptions extends ImClientOptions {
6231
6310
  coreClient?: ApiProtocolClient;
6232
6311
  /** 高级/测试入口可注入端口替身;default 始终使用 Browser adapter。 */
6233
6312
  expressionProvider?: ImExpressionPort;
6313
+ /** 高级/测试入口可注入会话收藏端口替身;default 始终使用 Browser adapter。 */
6314
+ sessionFavoriteProvider?: ImSessionFavoritePort;
6234
6315
  }
6235
6316
  /** 产品级账号与连接生命周期;adapter、transport 和连接状态机原子不进入该接口。 */
6236
6317
  interface ImSessionApi {
@@ -6506,6 +6587,7 @@ interface ImProductClient {
6506
6587
  readonly channels: ImChannelsApi;
6507
6588
  readonly applications: ImApplicationsApi;
6508
6589
  readonly expressions: ImExpressionsApi;
6590
+ readonly sessionFavorites: ImSessionFavoritesApi;
6509
6591
  readonly outbox: ImOutboxApi;
6510
6592
  readonly drafts: ImDraftsApi;
6511
6593
  readonly search: ImSearchApi;
@@ -7348,7 +7430,7 @@ declare namespace pinnedMessage_service {
7348
7430
  }
7349
7431
 
7350
7432
  type ConversationCapabilityAction = 'conversation.openProfile' | 'conversation.readHistory' | 'conversation.listPreferences' | 'composer.send' | 'composer.mentionAll' | 'profile.edit' | 'relationship.manage' | 'members.view' | 'members.manage' | 'members.invite' | 'members.remove' | 'members.setAdmin' | 'ownership.transfer' | 'conversation.leave' | 'channel.manageMute' | 'channel.setMemberPrivateChat' | 'channel.dismiss';
7351
- type MessageCapabilityAction = 'message.reply' | 'message.recall' | 'message.edit' | 'message.pin' | 'message.unpin' | 'message.deleteLocal' | 'message.deleteForEveryone' | 'message.forward' | 'message.multiSelect';
7433
+ type MessageCapabilityAction = 'message.reply' | 'message.recall' | 'message.edit' | 'message.pin' | 'message.unpin' | 'message.deleteLocal' | 'message.deleteForEveryone' | 'message.forward' | 'message.favorite' | 'message.multiSelect';
7352
7434
  type MemberTargetCapabilityAction = 'members.removeTarget' | 'members.editNicknameTarget' | 'members.setAdminTarget' | 'members.unsetAdminTarget';
7353
7435
  interface MessageCapabilityInput {
7354
7436
  snapshot: ConversationCapabilitySnapshot;
@@ -8936,5 +9018,5 @@ declare function resampleWaveform(data: readonly number[], targetCount: number):
8936
9018
  */
8937
9019
  declare function placeholderWaveform(seed: string, count: number): number[];
8938
9020
 
8939
- export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, DEFAULT_LOCALE, EDIT_WINDOW_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, calculateMediaBox, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, classifyStickerImageType, createChatRuntime, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImTextSearchMatcher, createLinkMatcher, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isPinnedMessageProtected, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, message_service as messageService, migrateImCachePrefix, normalizeImLocale, normalizeLinkHref, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, registerImCatalogOverrides, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resetImCatalogOverrides, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelAccess, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImEmojiToken, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageTimelineTimestamp, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveTextSegments, resolveUnicodeEmoji, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortSessions, spikeCountForDuration, sumSessionsUnread, supportsConversationMention, unicodeEmojiTextFromCode, voiceErrorCodeOf };
8940
- export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
9021
+ export { DEFAULT_EMOJI_ASSET_BASE, DEFAULT_LOADING_MINIMUM_VISIBLE_MS, DEFAULT_LOADING_SHOW_DELAY_MS, DEFAULT_LOCALE, EDIT_WINDOW_MS, EMOJI_CATALOG, EMOJI_GAME_DICE_STABLE_KEY, EMOJI_GAME_RPS_STABLE_KEY, EMOJI_TOKEN_RE, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, MAX_BATCH_FILES, MAX_RECENT_EMOJI_COUNT, REACTION_SUPPORTED_CONTENT_TYPES, SPIKE_STEP, UNICODE_EMOJI_CATALOG, blockReasonForChannelSession, blockReasonForChannelState, blockReasonForGroupState, blockReasonForSession, buildSessionFavoritePlainBody, calculateMediaBox, canEditMessage, canPinChannelMessage, canPinGroupMessage, canPinMessage, canPromoteMediaPresentationSource, canReactToMessage, canRecallMessage, canTransmit, canTransmitByType, canTransmitContent, cancelMediaUpload, captureRuntimeClientOperation, captureRuntimeOperation, classifyStickerImageType, createChatRuntime, createDelayedLoadingIndicator, createEmojiMatcher, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImI18n, createImTextSearchMatcher, createLinkMatcher, createNewMessageBadgeController, createSdkDiagnosticWriter, createThreadItems, createVoicePlayer, createVoiceRecordingSession, decideConversationAction, decideMemberTargetAction, decideMessageAction, detectVoiceCapabilities, emojiAssetUrl, emojiUrlByCode, extractSearchText, fetchConversationFileBatch, fetchConversationImageBatch, fetchConversationMessageBatch, fetchConversationVideoBatch, fetchConversationVoiceBatch, fetchNextConversationSearchBatch, formatChatDateSeparator, formatConversationDisplayTime, formatFailure, formatFileSize, formatLastMessageSummary, formatMediaDuration, formatMediaPlaceholder, formatMentionAll, formatServiceText, formatSystemMessage, forward_service as forwardService, getFileExtension, getImTextSearchInitial, getImTimeCatalog, getLocalDayKey, hasEmojiCandidate, hasLinkCandidate, highlightSegments, isGifFile, isMessageLocateScrollProtected, isMessageTailChangeFromOlderWindowTrim, isMessageViewportMeasurable, isMessageVisibleForNewMessageBadge, isPinnedMessageProtected, isVoiceStorageConfigured, loadOlderUntilBoundary, mediaBatchBudgetBytes, media_service as mediaService, message_service as messageService, migrateImCachePrefix, normalizeImLocale, normalizeLinkHref, parseUnicodeEmojiCode, pinnedMessage_service as pinnedMessageService, placeholderWaveform, prependRecentEmoji, profile_service as profileService, read_service as readService, refreshPrependMessageAnchorPosition, registerImCatalogOverrides, replaceInterruptedMediaFile, requiresConversationEncryption, requiresForwardTypeConfirmation, resampleWaveform, resetImCatalogOverrides, resolveBestMediaPresentationSource, resolveCenteredMessageScrollTop, resolveChannelAccess, resolveChannelMemberAvatarUrl, resolveChannelMemberDisplayName, resolveConversationListPresentation, resolveDisplayTimestamp, resolveEmojiToken, resolveFriendDisplayName, resolveImEmojiToken, resolveImProfileAccessDestination, resolveImThreadActiveDate, resolveMediaPresentation, resolveMemberDisplayName, resolveMessageBodyKind, resolveMessageTimelineTimestamp, resolvePrependMessageAnchor, resolvePrependMessageAnchorAdjustment, resolvePrependMessageAnchorPosition, resolvePublicNickname, resolveQuotedMessagePresentation, resolveSenderAvatarUrl, resolveSessionFavoriteKindFromMessage, resolveStandaloneEmojiMessage, resolveSurvivingMessageAnchorAdjustment, resolveTextSegments, resolveUnicodeEmoji, resolveVisibleMessageAnchorPositions, retryMessage, runMediaSendBatch, sendAsFilesBatch, sendBlockReasonForDecision, sendMediaFile, sendMediaFilesBatch, sendText, sendVoice, shouldCompleteInitialViewport, shouldFillInitialHistoryViewport, shouldFollowIncomingMessage, shouldLoadNewerHistoryPage, shouldPrefetchOlderHistory, shouldRestoreMessageViewportFocus, shouldShowChatDateSeparator, shouldTrackRemoteMessageForBadge, sortSessions, spikeCountForDuration, sumSessionsUnread, supportsConversationMention, unicodeEmojiTextFromCode, voiceErrorCodeOf };
9022
+ export type { ApplySessionResult, BrowseMessagesInput, CanPinMessageInput, CapabilityAvailability, CapabilityDecision, CapabilityReason, CenteredMessageScrollInput, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ChatMediaMessageRef, ChatProfileAdapter, ChatRuntime, ChatRuntimeCredentials, ChatRuntimeFactories, ChatRuntimeHostDeps, ChatRuntimeOpResult, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilityAction, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationListPresentation, ConversationListPresentationLabels, ConversationListPresentationOptions, ConversationListPreviewSegment, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchCategory, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, CreateThreadItemsInput, DelayedLoadingIndicator, DelayedLoadingIndicatorOptions, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, EmojiEntry, EmojiRecentItem, EmojiSegment, ExpressionMessageOptions, FileMessageOptions, FormatFailureContext, FormatLastMessageContext, FormatMediaPlaceholderContext, FormatServiceTextContext, FormatSystemMessageContext, FormatTimeDisplayContext, ForwardCommandHooks, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, HighlightSegment, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImCatalog, ImCatalogOverrides, ImChannelConversationAccessSnapshot, ImChannelMemberPresentation, ImChannelMentionApi, ImChannelMentionPresentation, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelProfilePresentation, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFailureCatalog, ImFileBody, ImForwardOperationResult, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMemberPresentation, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImI18n, ImImageBody, ImLastMessageCatalog, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLocale, ImLogoutOptions, ImMediaBatchSendResult, ImMediaCatalog, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMentionCatalog, ImMessageActionResult, ImMessageBodyKind, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPartialCatalog, ImPinnedMessageActionResult, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImPinnedMessageSnapshot, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImProfileAccessDestination, ImQuotedMessagePresentation, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImServiceCatalog, ImServiceTextKey, ImSessionApi, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImSystemCatalog, ImTextResolver, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImThreadActiveDateSnapshot, ImThreadDateMarkerMetric, ImThreadDecoration, ImThreadEncryptionItem, ImThreadIntent, ImThreadItem, ImThreadPresentationAdapter, ImThreadReadActions, ImThreadReadTargetResolver, ImThreadViewportMetrics, ImTimeCatalog, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImWeekdayKey, ImageMessageOptions, ImagePreviewMetadata, IncomingMessageFollowInput, InitialHistoryViewportFillInput, InitialViewportCompletionInput, LinkSegment, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MediaBatchBudgetOptions, MediaBatchLimitInfo, MediaLimitItem, MediaObjectUrlLease, MediaPresentationFit, MediaPresentationPolicy, MediaPresentationRule, MediaPresentationSourceCandidate, MediaPresentationSourceQuality, MediaSendBatchResult, MemberTargetCapabilityAction, MemberTargetCapabilityInput, MentionCandidate, MentionCandidatePage, MentionInput, MessageCapabilityAction, MessageCapabilityInput, MessageContentType, MessageLocateScrollProtectionInput, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, NewMessageBadgeController, NewMessageBadgeCountListener, NewMessageBadgeVisibilityInput, NewerHistoryPageTriggerInput, OlderHistoryPrefetchInput, PrependAnchorCandidate, PrependAnchorViewport, PrependMessageAnchorPosition, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, RemoteMessageBadgeTrackingInput, ResolveMediaPresentationInput, ResolveTextOptions, ResolvedConversationBackground, ResolvedMediaPresentation, RichExtraSegment, RuntimeClientOperation, RuntimeOperation, SearchBatchResult, SearchFilesInput, SearchMessagesInput, SearchTextMessagesInput, SegmentMatch, SegmentMatcher, SendCapabilityMode, SendCommandHooks, SendMessageResult, SendVoicePayload, SenderProfileEntry, ServiceNoteHooks, StandaloneEmojiMessage, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnicodeEmojiEntry, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';export{c as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,b as DEFAULT_LOADING_SHOW_DELAY_MS,u as SPIKE_STEP,q as calculateMediaBox,f as canPromoteMediaPresentationSource,h as captureRuntimeClientOperation,g as captureRuntimeOperation,d as createDelayedLoadingIndicator,o as createLinkMatcher,s as formatFileSize,r as formatMediaDuration,t as getFileExtension,n as hasLinkCandidate,l as highlightSegments,i as mediaService,m as normalizeLinkHref,x as placeholderWaveform,j as readService,w as resampleWaveform,e as resolveBestMediaPresentationSource,a as resolveConversationListPresentation,p as resolveMediaPresentation,k as resolveQuotedMessagePresentation,v as spikeCountForDuration}from'./chunk-HFB7A67C.js';export{j as DEFAULT_EMOJI_ASSET_BASE,i as EMOJI_CATALOG,c as EMOJI_GAME_DICE_STABLE_KEY,b as EMOJI_GAME_RPS_STABLE_KEY,m as EMOJI_TOKEN_RE,K as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,J as blockReasonForChannelSession,I as blockReasonForChannelState,O as blockReasonForGroupState,R as blockReasonForSession,D as canEditMessage,t as canPinChannelMessage,s as canPinGroupMessage,u as canPinMessage,C as canRecallMessage,Z as cancelMediaUpload,r as createChatRuntime,p as createEmojiMatcher,F as decideConversationAction,H as decideMemberTargetAction,G as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,xa as fetchConversationFileBatch,ya as fetchConversationImageBatch,va as fetchConversationMessageBatch,za as fetchConversationVideoBatch,Aa as fetchConversationVoiceBatch,Ba as fetchNextConversationSearchBatch,aa as forwardService,o as hasEmojiCandidate,N as isGifFile,v as isPinnedMessageProtected,V as isVoiceStorageConfigured,L as mediaBatchBudgetBytes,fa as messageService,e as parseUnicodeEmojiCode,ka as pinnedMessageService,d as prependRecentEmoji,ua as profileService,U as replaceInterruptedMediaFile,P as requiresConversationEncryption,y as resolveChannelMemberAvatarUrl,x as resolveChannelMemberDisplayName,k as resolveEmojiToken,B as resolveFriendDisplayName,la as resolveImProfileAccessDestination,w as resolveMemberDisplayName,A as resolvePublicNickname,z as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,_ as retryMessage,M as runMediaSendBatch,Y as sendAsFilesBatch,E as sendBlockReasonForDecision,T as sendMediaFile,X as sendMediaFilesBatch,S as sendText,W as sendVoice,Q as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-2R5T6ZOX.js';export{C as createNewMessageBadgeController,i as createThreadItems,f as formatChatDateSeparator,e as formatConversationDisplayTime,c as getLocalDayKey,l as isMessageLocateScrollProtected,v as isMessageTailChangeFromOlderWindowTrim,k as isMessageViewportMeasurable,B as isMessageVisibleForNewMessageBadge,x as loadOlderUntilBoundary,p as refreshPrependMessageAnchorPosition,j as resolveCenteredMessageScrollTop,a as resolveDisplayTimestamp,g as resolveImThreadActiveDate,h as resolveMessageBodyKind,b as resolveMessageTimelineTimestamp,n as resolvePrependMessageAnchor,q as resolvePrependMessageAnchorAdjustment,o as resolvePrependMessageAnchorPosition,s as resolveSurvivingMessageAnchorAdjustment,r as resolveVisibleMessageAnchorPositions,t as shouldCompleteInitialViewport,y as shouldFillInitialHistoryViewport,u as shouldFollowIncomingMessage,z as shouldLoadNewerHistoryPage,m as shouldPrefetchOlderHistory,w as shouldRestoreMessageViewportFocus,d as shouldShowChatDateSeparator,A as shouldTrackRemoteMessageForBadge}from'./chunk-CLEJGY6F.js';export{a as DEFAULT_LOCALE,k as createImI18n,f as formatFailure,h as formatLastMessageSummary,i as formatMediaPlaceholder,j as formatMentionAll,l as formatServiceText,g as formatSystemMessage,c as getImTimeCatalog,b as normalizeImLocale,d as registerImCatalogOverrides,e as resetImCatalogOverrides}from'./chunk-7HTZ3OXY.js';export{j as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,d as createFaceToFaceGroupQrPayload,k as createImClient,f as createImConsoleDiagnosticSink,n as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken}from'./chunk-UY3JAQMB.js';export{Va as createVoicePlayer,Wa as createVoiceRecordingSession,Ta as detectVoiceCapabilities,Ua as voiceErrorCodeOf}from'./chunk-KBKZ27GY.js';export{ia as EDIT_WINDOW_MS,qa as REACTION_SUPPORTED_CONTENT_TYPES,ra as canReactToMessage,ma as canTransmit,ka as canTransmitByType,la as canTransmitContent,o as classifyStickerImageType,Z as createImTextSearchMatcher,X as extractSearchText,Y as getImTextSearchInitial,ja as requiresForwardTypeConfirmation,ta as resolveChannelAccess,ca as resolveTextSegments,za as sortSessions,Aa as sumSessionsUnread}from'./chunk-KZM3GLRL.js';import'./chunk-WOT6VMZA.js';
1
+ import'./chunk-IDECJJXC.js';import'./chunk-SXY56EVC.js';export{c as DEFAULT_LOADING_MINIMUM_VISIBLE_MS,b as DEFAULT_LOADING_SHOW_DELAY_MS,u as SPIKE_STEP,q as calculateMediaBox,f as canPromoteMediaPresentationSource,h as captureRuntimeClientOperation,g as captureRuntimeOperation,d as createDelayedLoadingIndicator,o as createLinkMatcher,s as formatFileSize,r as formatMediaDuration,t as getFileExtension,n as hasLinkCandidate,l as highlightSegments,i as mediaService,m as normalizeLinkHref,x as placeholderWaveform,j as readService,w as resampleWaveform,e as resolveBestMediaPresentationSource,a as resolveConversationListPresentation,p as resolveMediaPresentation,k as resolveQuotedMessagePresentation,v as spikeCountForDuration}from'./chunk-RT3IRN3M.js';export{j as DEFAULT_EMOJI_ASSET_BASE,i as EMOJI_CATALOG,c as EMOJI_GAME_DICE_STABLE_KEY,b as EMOJI_GAME_RPS_STABLE_KEY,m as EMOJI_TOKEN_RE,K as MAX_BATCH_FILES,a as MAX_RECENT_EMOJI_COUNT,g as UNICODE_EMOJI_CATALOG,J as blockReasonForChannelSession,I as blockReasonForChannelState,O as blockReasonForGroupState,R as blockReasonForSession,D as canEditMessage,t as canPinChannelMessage,s as canPinGroupMessage,u as canPinMessage,C as canRecallMessage,Z as cancelMediaUpload,r as createChatRuntime,p as createEmojiMatcher,F as decideConversationAction,H as decideMemberTargetAction,G as decideMessageAction,l as emojiAssetUrl,n as emojiUrlByCode,xa as fetchConversationFileBatch,ya as fetchConversationImageBatch,va as fetchConversationMessageBatch,za as fetchConversationVideoBatch,Aa as fetchConversationVoiceBatch,Ba as fetchNextConversationSearchBatch,aa as forwardService,o as hasEmojiCandidate,N as isGifFile,v as isPinnedMessageProtected,V as isVoiceStorageConfigured,L as mediaBatchBudgetBytes,fa as messageService,e as parseUnicodeEmojiCode,ka as pinnedMessageService,d as prependRecentEmoji,ua as profileService,U as replaceInterruptedMediaFile,P as requiresConversationEncryption,y as resolveChannelMemberAvatarUrl,x as resolveChannelMemberDisplayName,k as resolveEmojiToken,B as resolveFriendDisplayName,la as resolveImProfileAccessDestination,w as resolveMemberDisplayName,A as resolvePublicNickname,z as resolveSenderAvatarUrl,q as resolveStandaloneEmojiMessage,h as resolveUnicodeEmoji,_ as retryMessage,M as runMediaSendBatch,Y as sendAsFilesBatch,E as sendBlockReasonForDecision,T as sendMediaFile,X as sendMediaFilesBatch,S as sendText,W as sendVoice,Q as supportsConversationMention,f as unicodeEmojiTextFromCode}from'./chunk-GBIHVXZP.js';export{C as createNewMessageBadgeController,i as createThreadItems,f as formatChatDateSeparator,e as formatConversationDisplayTime,c as getLocalDayKey,l as isMessageLocateScrollProtected,v as isMessageTailChangeFromOlderWindowTrim,k as isMessageViewportMeasurable,B as isMessageVisibleForNewMessageBadge,x as loadOlderUntilBoundary,p as refreshPrependMessageAnchorPosition,j as resolveCenteredMessageScrollTop,a as resolveDisplayTimestamp,g as resolveImThreadActiveDate,h as resolveMessageBodyKind,b as resolveMessageTimelineTimestamp,n as resolvePrependMessageAnchor,q as resolvePrependMessageAnchorAdjustment,o as resolvePrependMessageAnchorPosition,s as resolveSurvivingMessageAnchorAdjustment,r as resolveVisibleMessageAnchorPositions,t as shouldCompleteInitialViewport,y as shouldFillInitialHistoryViewport,u as shouldFollowIncomingMessage,z as shouldLoadNewerHistoryPage,m as shouldPrefetchOlderHistory,w as shouldRestoreMessageViewportFocus,d as shouldShowChatDateSeparator,A as shouldTrackRemoteMessageForBadge}from'./chunk-VYHK4LIZ.js';export{a as DEFAULT_LOCALE,k as createImI18n,f as formatFailure,h as formatLastMessageSummary,i as formatMediaPlaceholder,j as formatMentionAll,l as formatServiceText,g as formatSystemMessage,c as getImTimeCatalog,b as normalizeImLocale,d as registerImCatalogOverrides,e as resetImCatalogOverrides}from'./chunk-C6HKXQPW.js';export{l as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,k as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,m as createImClient,f as createImConsoleDiagnosticSink,p as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken,j as resolveSessionFavoriteKindFromMessage}from'./chunk-FA3RKHIR.js';export{Ya as createVoicePlayer,Za as createVoiceRecordingSession,Wa as detectVoiceCapabilities,Xa as voiceErrorCodeOf}from'./chunk-K6P5ZYHG.js';export{ia as EDIT_WINDOW_MS,qa as REACTION_SUPPORTED_CONTENT_TYPES,ra as canReactToMessage,ma as canTransmit,ka as canTransmitByType,la as canTransmitContent,o as classifyStickerImageType,Z as createImTextSearchMatcher,X as extractSearchText,Y as getImTextSearchInitial,ja as requiresForwardTypeConfirmation,ta as resolveChannelAccess,ca as resolveTextSegments,za as sortSessions,Aa as sumSessionsUnread}from'./chunk-KTWXKQ4J.js';import'./chunk-WOT6VMZA.js';
package/dist/sdk.d.ts CHANGED
@@ -1212,6 +1212,13 @@ interface ImLoginContext {
1212
1212
  interface ImAuthIssue {
1213
1213
  code: number;
1214
1214
  reason: 'token_expired' | 'kicked' | 'banned' | 'unknown';
1215
+ /**
1216
+ * 服务端记录的账号上次登录时间(毫秒时间戳),用于宿主提示「你的账号于某时在其他设备登录」。
1217
+ *
1218
+ * 只有登录被拒的被踢路径(CMLoginAck.nLastLoginTime)能拿到该时间;运行期收到
1219
+ * CM_KICKOUT_NOTIFICATION 时协议不带时间,此处为 undefined,由宿主自行决定如何展示。
1220
+ */
1221
+ lastLoginTime?: number;
1215
1222
  }
1216
1223
  interface ImAuthProvider {
1217
1224
  /** 返回登录上下文;返回 null 表示当前不可登录(缺凭据)。 */
@@ -1304,6 +1311,24 @@ interface ImExpressionEmojiRecent {
1304
1311
  }
1305
1312
  type ImExpressionRecentItem$1 = ImExpressionAsset$1 | ImExpressionEmojiRecent;
1306
1313
 
1314
+ /** 会话收藏可展示的内容类型;与 iOS `isSupportCollectionMsgType` 对齐。 */
1315
+ type ImSessionFavoriteKind = 'text' | 'image' | 'video' | 'voice' | 'location' | 'file';
1316
+ /** 服务端一条会话收藏快照;列表以 HTTP 为准,不回写原消息。 */
1317
+ interface ImSessionFavoriteItem$1 {
1318
+ readonly collectId: string;
1319
+ readonly msgId: string;
1320
+ readonly kind: ImSessionFavoriteKind;
1321
+ readonly senderId: string;
1322
+ readonly senderName: string;
1323
+ readonly avatarUrl: string;
1324
+ readonly createdAt: string;
1325
+ readonly text: string;
1326
+ readonly imageUrl: string;
1327
+ readonly fileName: string;
1328
+ readonly body: Readonly<Record<string, unknown>>;
1329
+ readonly conversation: ConversationRef | null;
1330
+ }
1331
+
1307
1332
  type ImEvent = {
1308
1333
  type: 'connection:changed';
1309
1334
  state: ImConnectionState;
@@ -1416,6 +1441,10 @@ type ImEvent = {
1416
1441
  | {
1417
1442
  type: 'application:updated';
1418
1443
  application: ApplicationUpdate;
1444
+ }
1445
+ /** 其它端改了会话收藏;权威列表必须重新拉 HTTP,不携带收藏正文。 */
1446
+ | {
1447
+ type: 'session-favorites:changed';
1419
1448
  } | {
1420
1449
  type: 'sync:complete';
1421
1450
  conversations: ConversationRef[];
@@ -4376,12 +4405,16 @@ interface ImProductEventMap {
4376
4405
  'application:updated': Readonly<{
4377
4406
  application: ImProductApplicationUpdate;
4378
4407
  }>;
4408
+ /** 其它端改了会话收藏;权威列表必须重新拉 HTTP。 */
4409
+ 'session-favorites:changed': Readonly<Record<never, never>>;
4379
4410
  'sync:complete': Readonly<{
4380
4411
  conversations: readonly ConversationRef<ProductConversationListType>[];
4381
4412
  }>;
4413
+ /** `lastLoginTime` 为服务端记录的上次登录时间(毫秒),仅被踢且走登录 ACK 的路径才有值。 */
4382
4414
  'auth:invalid': Readonly<{
4383
4415
  code: string;
4384
4416
  reason: ImProductAuthInvalidReason;
4417
+ lastLoginTime?: number;
4385
4418
  }>;
4386
4419
  'error': Readonly<{
4387
4420
  error: ImProductEventError;
@@ -4667,6 +4700,31 @@ interface ImSearchApi {
4667
4700
  readonly messages: ImMessageSearchApi;
4668
4701
  }
4669
4702
 
4703
+ /**
4704
+ * 会话收藏稳定产品门面。
4705
+ *
4706
+ * 本模块不缓存服务端列表;每次 list/add/delete 都以当前账号 provider 为准。
4707
+ * 收藏快照与原聊天消息解耦:原消息删除、撤回或编辑不会回写收藏。
4708
+ */
4709
+
4710
+ type ImSessionFavoriteItem = Readonly<ImSessionFavoriteItem$1>;
4711
+ /** 产品层会话收藏 API。 */
4712
+ interface ImSessionFavoritesApi {
4713
+ list: () => Promise<readonly ImSessionFavoriteItem[]>;
4714
+ addFromMessage: (input: {
4715
+ message: ImMessageView;
4716
+ conversation: ConversationRef;
4717
+ selfId: string;
4718
+ }) => Promise<ImSessionFavoriteItem>;
4719
+ delete: (collectIds: readonly string[]) => Promise<void>;
4720
+ }
4721
+ /** 对齐 iOS Cell:文本 / 图 / 视频 / 语音 / 文件可收藏;表情、名片、通话等不可。 */
4722
+ declare function resolveSessionFavoriteKindFromMessage(message: ImMessageView): ImSessionFavoriteKind | null;
4723
+ /**
4724
+ * 组收藏快照明文。content 空则返回 null,对齐 iOS `collectMsg:YES` 不写空 body。
4725
+ */
4726
+ declare function buildSessionFavoritePlainBody(message: ImMessageView): Readonly<Record<string, unknown>> | null;
4727
+
4670
4728
  /**
4671
4729
  * 当前账号的 IM 本地偏好产品域。
4672
4730
  *
@@ -5108,6 +5166,7 @@ interface ImProductClient {
5108
5166
  readonly channels: ImChannelsApi;
5109
5167
  readonly applications: ImApplicationsApi;
5110
5168
  readonly expressions: ImExpressionsApi;
5169
+ readonly sessionFavorites: ImSessionFavoritesApi;
5111
5170
  readonly outbox: ImOutboxApi;
5112
5171
  readonly drafts: ImDraftsApi;
5113
5172
  readonly search: ImSearchApi;
@@ -5257,5 +5316,5 @@ interface ImDiagnosticMemoryBuffer extends ImDiagnosticSink {
5257
5316
  */
5258
5317
  declare function createImDiagnosticMemoryBuffer(options?: ImDiagnosticMemoryBufferOptions): ImDiagnosticMemoryBuffer;
5259
5318
 
5260
- export { EDIT_WINDOW_MS, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, REACTION_SUPPORTED_CONTENT_TYPES, canReactToMessage, canTransmit, canTransmitByType, canTransmitContent, classifyStickerImageType, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImTextSearchMatcher, createSdkDiagnosticWriter, createVoicePlayer, createVoiceRecordingSession, detectVoiceCapabilities, extractSearchText, getImTextSearchInitial, migrateImCachePrefix, requiresForwardTypeConfirmation, resolveChannelAccess, resolveImEmojiToken, resolveTextSegments, sortSessions, sumSessionsUnread, voiceErrorCodeOf };
5261
- export type { CapabilityAvailability, CapabilityDecision, CapabilityReason, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImChannelConversationAccessSnapshot, ImChannelMentionApi, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFileBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImImageBody, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLogoutOptions, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImageMessageOptions, ImagePreviewMetadata, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MentionCandidate, MentionCandidatePage, MentionInput, MessageContentType, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, ResolveTextOptions, ResolvedConversationBackground, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
5319
+ export { EDIT_WINDOW_MS, IM_CHAT_FONT_SCALES, IM_DIAGNOSTIC_CATEGORIES, IM_EMOJI_CATALOG, ImPinnedMessageOperationError, REACTION_SUPPORTED_CONTENT_TYPES, buildSessionFavoritePlainBody, canReactToMessage, canTransmit, canTransmitByType, canTransmitContent, classifyStickerImageType, createFaceToFaceGroupQrPayload, createImClient, createImConsoleDiagnosticSink, createImDiagnosticMemoryBuffer, createImTextSearchMatcher, createSdkDiagnosticWriter, createVoicePlayer, createVoiceRecordingSession, detectVoiceCapabilities, extractSearchText, getImTextSearchInitial, migrateImCachePrefix, requiresForwardTypeConfirmation, resolveChannelAccess, resolveImEmojiToken, resolveSessionFavoriteKindFromMessage, resolveTextSegments, sortSessions, sumSessionsUnread, voiceErrorCodeOf };
5320
+ export type { CapabilityAvailability, CapabilityDecision, CapabilityReason, ChannelAccessSnapshot, ChannelBaseSessionState, ChannelConversationCapabilities, ChannelConversationMessageApi, ChannelJoinApplication, ChannelJoinApplicationNotification, ChannelJoinApplicationPage, ChannelMember, ChannelMemberPage, ChannelMentionMember, ChannelMentionMemberPage, ChannelMiniProgramRel, ChannelMiniProgramRelConfigType, ChannelMuteReason, ChannelPermissionSet, ChannelProfile, ChannelRole, ChannelSessionState, ContactCardInput, ContactMessageOptions, ConversationBackgroundPreset, ConversationBackgroundSelection, ConversationCapabilitySnapshot, ConversationDraft, ConversationDraftApi, ConversationEntryUnreadSnapshot, ConversationHandle, ConversationHandleSnapshot, ConversationInitialPosition, ConversationLastMessageSummary, ConversationListItem, ConversationListMention, ConversationMessageApi, ConversationOpenOptions, ConversationRef, ConversationSearchPage, ConversationSearchResult, ConversationSystemSummary, ConversationType, DirectConversationCapabilities, DirectConversationMessageApi, DraftInput, EditTextOptions, ExpressionMessageOptions, FileMessageOptions, ForwardFailReason, ForwardItemStatus, ForwardMessageFailure, ForwardMessagesInput, ForwardMessagesResult, ForwardTarget, ForwardedMessageRef, GameMessageOptions, GifMessageOptions, GroupConversationCapabilities, GroupConversationMessageApi, GroupMemberItem, GroupProfile, ImAppearanceSettingsApi, ImApplicationItem, ImApplicationRef, ImApplicationsApi, ImAuthIssue, ImAuthProvider, ImCacheOptions, ImCachePrefixMigrationContext, ImCachePrefixMigrator, ImCallKind, ImCallOutcome, ImCallRecordBody, ImChannelConversationAccessSnapshot, ImChannelMentionApi, ImChannelMiniProgramRel, ImChannelPermissions, ImChannelPinnedMessage, ImChannelProfile, ImChannelRole, ImChannelState, ImChannelsApi, ImChatFontScale, ImClientOptions, ImConnectionState, ImContactBody, ImContactKind, ImContactProfile, ImContactRelationship, ImContactRemarkPhone, ImContactSearchResult, ImContactsApi, ImConversationBackgroundApi, ImConversationCapabilitiesApi, ImConversationListApi, ImConversationListSnapshot, ImConversationListState, ImConversationSearchApi, ImCoreApiOptions, ImCreateChannelInput, ImCreateChannelResult, ImCreateFaceToFaceGroupResult, ImCreateGroupInput, ImCreateGroupResult, ImCreatedChannel, ImCreatedGroup, ImDebugOptions, ImDiagnosticCategory, ImDiagnosticError, ImDiagnosticLayer, ImDiagnosticLevel, ImDiagnosticMemoryBuffer, ImDiagnosticMemoryBufferFilter, ImDiagnosticMemoryBufferOptions, ImDiagnosticMemoryBufferSnapshot, ImDiagnosticMessage, ImDiagnosticRecord, ImDiagnosticSink, ImDiagnosticWriter, ImDirectCallAnswerResult, ImDirectCallFailReason, ImDirectCallHangupInput, ImDirectCallHangupReason, ImDirectCallInviteInput, ImDirectCallNotifyAudioInput, ImDirectCallTargetInput, ImDirectCallsApi, ImDirectReadReceiptSettings, ImDirectoryApi, ImDirectoryFieldMatch, ImDirectoryItem, ImDirectoryKind, ImDirectoryPage, ImDirectorySearchApi, ImDirectorySearchItem, ImDirectorySearchResult, ImDraftsApi, ImEmojiCatalogEntry, ImEndpointProvider, ImEventsApi, ImExpressionAsset, ImExpressionAssetInput, ImExpressionEmojiRecentInput, ImExpressionFavoriteKind, ImExpressionOptions, ImExpressionRecentInput, ImExpressionRecentItem, ImExpressionRecentItemKind, ImExpressionsApi, ImFaceToFaceGroup, ImFileBody, ImFriendshipRequestResult, ImGameBody, ImGameType, ImGifAssetInput, ImGiphyAsset, ImGiphyPage, ImGiphyPageOptions, ImGroupCallAnswerInput, ImGroupCallBusyInput, ImGroupCallCreateInput, ImGroupCallJoinInput, ImGroupCallMeetingSnapshot, ImGroupCallMember, ImGroupCallMemberStatus, ImGroupCallStatusInput, ImGroupCallTargetInput, ImGroupCallsApi, ImGroupConversationState, ImGroupMentionApi, ImGroupPinnedMessage, ImGroupProfile, ImGroupsApi, ImImageBody, ImLifecycleSnapshot, ImLocalDataApi, ImLocalDataInfo, ImLogoutOptions, ImMediaConfig, ImMediaTask, ImMediaTasksApi, ImMembershipJoinResult, ImMessageMention, ImMessageReactionAggregate, ImMessageReactions, ImMessageRef, ImMessageSearchApi, ImMessageView, ImMessageViewBody, ImMessagesByIdResult, ImMiniProgramBody, ImMiniProgramShowType, ImOutboxApi, ImOutboxItem, ImPageToken, ImPinnedMessageErrorKind, ImPinnedMessageOperation, ImProductApplicationUpdate, ImProductAuthInvalidReason, ImProductClient, ImProductEvent, ImProductEventError, ImProductEventMap, ImProductMessage, ImReactionChangeAction, ImReactionChangeResult, ImReadReceiptSettingsApi, ImRedPacketBody, ImRedPacketType, ImSdkErrorCategory, ImSdkErrorShape, ImSearchApi, ImSessionApi, ImSessionFavoriteItem, ImSessionFavoriteKind, ImSessionFavoritesApi, ImSessionLifecycleState, ImSettingsApi, ImStickerAssetInput, ImStickerBody, ImStickerPack, ImSupportedConversationRef, ImTextSearchMatch, ImTextSearchMatchOptions, ImTextSearchMatcher, ImTextSearchRange, ImTransferBody, ImTransferSessionType, ImTransferStatus, ImVideoBody, ImVoiceBody, ImageMessageOptions, ImagePreviewMetadata, LocalConversationHistoryClearResult, LocalMessageDeletionResult, MentionCandidate, MentionCandidatePage, MentionInput, MessageContentType, MessageWindowInfo, MessageWindowPage, MessagesByIdFailure, MigrateImCachePrefixInput, MiniProgramMessageOptions, ProductConversationListType, ProductHandleConversationType, ProductMessageSearchPage, ProductMessageSearchResult, ResolveTextOptions, ResolvedConversationBackground, SegmentMatch, SegmentMatcher, SendMessageResult, StickerAssetKind, TextMessageOptions, TextSegment, TransferMessageOptions, UnknownMessageBody, UserProfile, VideoMessageOptions, VideoPreviewMetadata, VoiceCapabilities, VoiceErrorCode, VoiceMessageMetadata, VoicePlayer, VoicePlayerOptions, VoicePlayerState, VoiceRecordingResult, VoiceRecordingSession, VoiceRecordingSessionOptions, VoiceRecordingState, VoiceToggleOptions };
package/dist/sdk.js CHANGED
@@ -1 +1 @@
1
- import'./chunk-IDECJJXC.js';export{j as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,d as createFaceToFaceGroupQrPayload,k as createImClient,f as createImConsoleDiagnosticSink,n as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken}from'./chunk-UY3JAQMB.js';export{Va as createVoicePlayer,Wa as createVoiceRecordingSession,Ta as detectVoiceCapabilities,Ua as voiceErrorCodeOf}from'./chunk-KBKZ27GY.js';export{ia as EDIT_WINDOW_MS,qa as REACTION_SUPPORTED_CONTENT_TYPES,ra as canReactToMessage,ma as canTransmit,ka as canTransmitByType,la as canTransmitContent,o as classifyStickerImageType,Z as createImTextSearchMatcher,X as extractSearchText,Y as getImTextSearchInitial,ja as requiresForwardTypeConfirmation,ta as resolveChannelAccess,ca as resolveTextSegments,za as sortSessions,Aa as sumSessionsUnread}from'./chunk-KZM3GLRL.js';import'./chunk-WOT6VMZA.js';
1
+ import'./chunk-IDECJJXC.js';export{l as IM_CHAT_FONT_SCALES,e as IM_DIAGNOSTIC_CATEGORIES,h as IM_EMOJI_CATALOG,c as ImPinnedMessageOperationError,k as buildSessionFavoritePlainBody,d as createFaceToFaceGroupQrPayload,m as createImClient,f as createImConsoleDiagnosticSink,p as createImDiagnosticMemoryBuffer,g as createSdkDiagnosticWriter,a as migrateImCachePrefix,i as resolveImEmojiToken,j as resolveSessionFavoriteKindFromMessage}from'./chunk-FA3RKHIR.js';export{Ya as createVoicePlayer,Za as createVoiceRecordingSession,Wa as detectVoiceCapabilities,Xa as voiceErrorCodeOf}from'./chunk-K6P5ZYHG.js';export{ia as EDIT_WINDOW_MS,qa as REACTION_SUPPORTED_CONTENT_TYPES,ra as canReactToMessage,ma as canTransmit,ka as canTransmitByType,la as canTransmitContent,o as classifyStickerImageType,Z as createImTextSearchMatcher,X as extractSearchText,Y as getImTextSearchInitial,ja as requiresForwardTypeConfirmation,ta as resolveChannelAccess,ca as resolveTextSegments,za as sortSessions,Aa as sumSessionsUnread}from'./chunk-KTWXKQ4J.js';import'./chunk-WOT6VMZA.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "k2-im",
3
3
  "type": "module",
4
- "version": "0.1.16",
4
+ "version": "0.1.17",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "publishConfig": {