;ELC   
;;; Compiled
;;; in Emacs version 29.3
;;; with all optimizations.



(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\207" [require cl-lib map ement-lib ement-room ement-notify] 2)#@77 compiler-macro for inlining `ement-notification-p'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'ement-notification-p--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ement-notification-p (and (memq (type-of cl-x) cl-struct-ement-notification-tags) t)) nil] 9 (#$ . 220)])
(byte-code "\300\301\302\303#\300\207" [define-symbol-prop ement-notification-p compiler-macro ement-notification-p--cmacro] 4)#@13 

(fn CL-X)
(defalias 'ement-notification-p #[257 "\301!>\205	 \302\207" [cl-struct-ement-notification-tags type-of t] 3 (#$ . 654)])
(byte-code "\300\301\302\303#\300\301\304\305#\306\307\310\301#\300\207" [function-put ement-notification-p side-effect-free error-free pure t define-symbol-prop ement-notification cl-deftype-satisfies] 6)#@83 compiler-macro for inlining `ement-notification-room-id'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'ement-notification-room-id--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ement-notification-room-id (progn (or (ement-notification-p cl-x) (signal 'wrong-type-argument (list 'ement-notification cl-x))) (aref cl-x 1))) nil] 9 (#$ . 1001)])
(byte-code "\300\301\302\303#\300\207" [define-symbol-prop ement-notification-room-id compiler-macro ement-notification-room-id--cmacro] 4)#@71 Access slot "room-id" of `ement-notification' struct CL-X.

(fn CL-X)
(defalias 'ement-notification-room-id #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ement-notification-tags type-of signal wrong-type-argument ement-notification 1] 5 (#$ . 1519)])
(byte-code "\300\301\302\303#\300\207" [function-put ement-notification-room-id side-effect-free t] 4)#@81 compiler-macro for inlining `ement-notification-event'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'ement-notification-event--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ement-notification-event (progn (or (ement-notification-p cl-x) (signal 'wrong-type-argument (list 'ement-notification cl-x))) (aref cl-x 2))) nil] 9 (#$ . 1899)])
(byte-code "\300\301\302\303#\300\207" [define-symbol-prop ement-notification-event compiler-macro ement-notification-event--cmacro] 4)#@69 Access slot "event" of `ement-notification' struct CL-X.

(fn CL-X)
(defalias 'ement-notification-event #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ement-notification-tags type-of signal wrong-type-argument ement-notification 2] 5 (#$ . 2407)])
(byte-code "\300\301\302\303#\300\207" [function-put ement-notification-event side-effect-free t] 4)#@81 compiler-macro for inlining `ement-notification-readp'.

(fn CL-WHOLE-ARG CL-X)
(defalias 'ement-notification-readp--cmacro #[514 "\300\301\302\303\211\211&\207" [cl--defsubst-expand (cl-x) (cl-block ement-notification-readp (progn (or (ement-notification-p cl-x) (signal 'wrong-type-argument (list 'ement-notification cl-x))) (aref cl-x 3))) nil] 9 (#$ . 2781)])
(byte-code "\300\301\302\303#\300\207" [define-symbol-prop ement-notification-readp compiler-macro ement-notification-readp--cmacro] 4)#@69 Access slot "readp" of `ement-notification' struct CL-X.

(fn CL-X)
(defalias 'ement-notification-readp #[257 "\301!>\204 \302\303\304D\"\210\211\305H\207" [cl-struct-ement-notification-tags type-of signal wrong-type-argument ement-notification 3] 5 (#$ . 3289)])
(byte-code "\300\301\302\303#\304\305\306\"\207" [function-put ement-notification-readp side-effect-free t defalias copy-ement-notification copy-sequence] 4)#@106 compiler-macro for inlining `make-ement-notification'.

(fn CL-WHOLE &cl-quote &key ROOM-ID EVENT READP)
(defalias 'make-ement-notification--cmacro #[385 "\300\301\"A@\300\302\"A@\300\303\"A@\211\203H \211@\304>\2031 \211A\204) \305\306@\"\210\211AA\262\202 \307>A@\203? \310\262\202 \305\311@\"\210\202 \210\312\313\314\310\310&\207" [plist-member :room-id :event :readp (:room-id :event :readp :allow-other-keys) error "Missing argument for %s" :allow-other-keys nil "Keyword argument %s not one of (:room-id :event :readp)" cl--defsubst-expand (room-id event readp) (cl-block make-ement-notification (record 'ement-notification room-id event readp))] 14 (#$ . 3721)])
(byte-code "\300\301\302\303#\300\207" [define-symbol-prop make-ement-notification compiler-macro make-ement-notification--cmacro] 4)#@86 Constructor for objects of type `ement-notification'.

(fn &key ROOM-ID EVENT READP)
(defalias 'make-ement-notification #[128 "\300\301\"A@\300\302\"A@\300\303\"A@\211\203H \211@\304>\2031 \211A\204) \305\306@\"\210\211AA\262\202 \307>A@\203? \310\262\202 \305\311@\"\210\202 \210\312\313$\207" [plist-member :room-id :event :readp (:room-id :event :readp :allow-other-keys) error "Missing argument for %s" :allow-other-keys nil "Keyword argument %s not one of (:room-id :event :readp)" record ement-notification] 9 (#$ . 4552)])
(byte-code "\300\301\302\303#\304\305\306\307\310\311\312\313\305\303&	\207" [function-put make-ement-notification side-effect-free t cl-struct-define ement-notification "Represents a Matrix notification." cl-structure-object record nil ((cl-tag-slot) (room-id) (event) (readp)) cl-struct-ement-notification-tags] 11)#@239 Return an `ement-notification' struct for NOTIFICATION.
NOTIFICATION is an alist representing a notification returned
from the "/notifications" endpoint.  The notification's event
is passed through `ement--make-event'.

(fn NOTIFICATION)
(defalias 'ement-notifications--make #[257 "\300!\210\301\302\"\301\303\"\301\304\"\301\305\"\301\306\"\307\211\310\311\312\313\314\n!&\207" [mapp map-elt room_id _actions _ts event read nil make-ement-notification :room-id :readp :event ement--make-event] 16 (#$ . 5421)])#@37 Map for Ement notification buffers.
(defvar ement-notifications-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\305#\210\301\307\310#\210\301\311\312#\210\301\313\314#\210\301\315\316#\210\301\317\320#\210\301\321\322#\210\323C\324\"\207" [make-sparse-keymap define-key [return] ement-notifications-jump [mouse-1] ement-notifications-jump-mouse [mouse-2] [S-return] ement-notify-reply [134217831 134217836] ement-room-list [134217831 134217837] ement-notify-switch-to-mentions-buffer [134217831 134217838] ement-notify-switch-to-notifications-buffer [remap scroll-down-command] ement-notifications-scroll-down-command [remap mwheel-scroll] ement-notifications-mwheel-scroll make-composed-keymap view-mode-map] 5) (#$ . 5950))#@60 Jump to Matrix event at POS.

(fn &optional (POS (point)))
(defalias 'ement-notifications-jump #[128 "\211\203 \211A\262\242\202 `\203 \300\301\302GTD\"\210\303\304\"\303\305\"\303\306\"\307\"\210\310!\207" [signal wrong-number-of-arguments ement-notifications-jump get-text-property session room event ement-view-room ement-room-goto-event] 8 (#$ . 6712) nil])#@44 Jump to Matrix event at EVENT.

(fn EVENT)
(defalias 'ement-notifications-jump-mouse #[257 "\300\301!!\302!\203 \303!\207\304!\207" [posn-point event-start button-at push-button ement-notifications-jump] 4 (#$ . 7092) "e"])#@152 Functions called for `ement-notifications' notifications.
Each function is called with two arguments, the session and the
`ement-notification' struct.
(defvar ement-notifications-hook '(ement-notifications-log-to-buffer) (#$ . 7327))#@85 Non-nil when earlier messages are being loaded.
Used to avoid overlapping requests.
(defvar ement-notifications-retro-loading nil (#$ . 7566))
(make-variable-buffer-local 'ement-notifications-retro-loading)#@45 Metadata for `ement-notifications' buffers.
(defvar ement-notifications-metadata nil (#$ . 7778))
(make-variable-buffer-local 'ement-notifications-metadata)#@425 Show the notifications buffer for SESSION.
FROM may be a "next_token" token from a previous request.
LIMIT may be a maximum number of events to return.  ONLY may be
the string "highlight" to only return notifications that have
the highlight tweak set.  THEN and ELSE may be callbacks passed
to `ement-api', which see.

(fn SESSION &key FROM LIMIT ONLY (THEN (apply-partially #\='ement-notifications-callback session)) ELSE)
(defalias 'ement-notifications #[385 "\302\303\"A@\302\304\"A@\302\305\"A@\302\306\"\206  \307\310\311\"DA@\302\312\"A@\211\203_ \211@\313>\203G \211A\204? \314\315@\"\210\211AA\262\202) \316>A@\203V \307\262\202) \314\317@\"\210\202) \210\320\321!\211\203k \322!\207\323\307\205v \324D\205\201 \325\326	!D\205\212 \327DE\"\330	\331\332\306	\312\n&\210\333\334\335\211\f!>\204\257 \336\337\340D\"\210\341H!	>\204\324 \336\337\342\335!>\204\315 \336\337\340D\"\210\341HD\"\210\335!>\204\345 \336\337\340D\"\210\n\341H\341H\"\207" [cl-struct-ement-session-tags cl-struct-ement-user-tags plist-member :from :limit :only :then nil apply-partially ement-notifications-callback :else (:from :limit :only :then :else :allow-other-keys) error "Missing argument for %s" :allow-other-keys "Keyword argument %s not one of (:from :limit :only :then :else)" get-buffer "*Ement Notifications*" switch-to-buffer remq "from" "limit" number-to-string "only" ement-api "notifications" :params ement-message "Fetching notifications for <%s>..." type-of signal wrong-type-argument ement-session 1 ement-user] 18 (#$ . 7941) (byte-code "\301 \302\205 \303E\207" [current-prefix-arg ement-complete-session :only "highlight"] 3)])#@135 Callback for `ement-notifications' on SESSION which receives DATA.

(fn SESSION DATA &key (BUFFER (ement-notifications--log-buffer)))
(defalias 'ement-notifications-callback #[642 "\301\302\"\206 \303\304 DA@\211\203C \211@\305>\203, \211A\204$ \306\307@\"\210\211AA\262\202 \310>A@\203: \303\262\202 \306\311@\"\210\202 \210\312!\210\313\314\"\313\315\"rq\210\3161c \317\320\303$0\210\202j \210\321\320#\322\303T\262GW\203\210 H\262\323\324	\325!#\210\202l \266\326 \210\327p!)\207" [ement-notifications-metadata plist-member :buffer nil ement-notifications--log-buffer (:buffer :allow-other-keys) error "Missing argument for %s" :allow-other-keys "Keyword argument %s not one of (:buffer)" mapp map-elt notifications next_token (map-not-inplace) map-put! :next-token map-insert -1 run-hook-with-args ement-notifications-hook ement-notifications--make ement-room--insert-ts-headers switch-to-buffer] 13 (#$ . 9631)])#@60 Scroll down, and load NUMBER earlier messages when at top.
(defalias 'ement-notifications-scroll-down-command #[0 "\3001	 \301\302!0\207\303\304!\207" [(beginning-of-buffer) scroll-down nil call-interactively ement-notifications-retro] 3 (#$ . 10584) nil])#@78 Scroll according to EVENT, loading earlier messages when at top.

(fn EVENT)
(defalias 'ement-notifications-mwheel-scroll #[257 "\300\301!\211@\262!r\302\303\"\216\304@\305\"\210\306!\210e\307 U\205# \310\311!*\207" [internal--before-with-selected-window event-start make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord mwheel-scroll window-start call-interactively ement-notifications-retro] 5 (#$ . 10846) "e"])#@70 Retrieve NUMBER older notifications on SESSION.

(fn SESSION NUMBER)
(defalias 'ement-notifications-retro #[514 "\306=\204\n \307\310!\210\311	\312\"\204] \307\313\314\315\316\211\n!>\204% \317\320\302\nD\"\210\n\321H!\f>\204F \317\320\322\316\n!>\204@ \317\320\302\nD\"\210\n\321HD\"\210\316\n!>\204U \317\320\302\nD\"\210\n\321H\321HC$\210p?\205\205 \323\324\325\311	\312\"\326\327\330	\f#\331\327\332\"&	\210\333\334\"\210\335\211\207" [major-mode ement-notifications-metadata ement-session cl-struct-ement-session-tags cl-struct-ement-user-tags ement-notifications-retro-loading ement-notifications-mode cl--assertion-failed (eq 'ement-notifications-mode major-mode) map-elt :next-token (map-elt ement-notifications-metadata :next-token) "No more notifications for %s" nil type-of signal wrong-type-argument 1 ement-user ement-notifications :limit :from :then make-closure #[257 "\302\303\300\"\216\304\301\305\300$)\207" [V0 V1 make-closure #[0 "r\300q\210\302\301!\210\303\211)\207" [V0 ement-notifications-retro-loading make-local-variable nil] 2] ement-notifications-callback :buffer] 6 "\n\n(fn DATA)"] :else #[257 "r\300q\210\302\301!\210\303)\304!\207" [V0 ement-notifications-retro-loading make-local-variable nil ement-api-error] 3 "\n\n(fn PLZ-ERROR)"] ement-message "Loading %s earlier messages..." t] 15 (#$ . 11318) (byte-code "\301 \204\n \302\202 <\203 \303\304!\202 \247\205 D\207" [current-prefix-arg ement-complete-session 100 read-number "Number of messages: "] 3)])#@135 Log EVENT in ROOM on SESSION to "*Ement NOTIFICATIONS*" buffer.

(fn SESSION NOTIFICATION &key (BUFFER-NAME "*Ement Notifications*"))
(defalias 'ement-notifications-log-to-buffer #[642 "\306\307\"\206 \310A@\211\203@ \211@\311>\203) \211A\204! \312\313@\"\210\211AA\262\202 \314>A@\2037 \315\262\202 \312\316@\"\210\202 \210\3171r\320\321\"q\210\322 \323\324\"\216\325p!\211\203^ \326!\210\210\327 \323\330\"\216\212\331!>\210\332H\333H\334\331\n!\n>\204\211 \335\336\301\fD\"\210	\337H\340\341\342\343&\206\232 \312\344\"\315\345\346!\347;\315\211\350<\"\210`\262\212\351\352!)\262\353\354#\210\212\355<\"\211\203\315 \356!\202\316 d)\262\262\353\357\360\361\257#\210\362\363\364$\210=\205\371 \365\366\367!\370\347F#-\266\205,\262\2620\207\371\372\"\210\315\207" [cl-struct-ement-notification-tags ement-session cl-struct-ement-session-tags ement-room ement-room-sender-in-left-margin ement-room-message-format-spec plist-member :buffer-name (nil "*Ement Notifications*") (:buffer-name :allow-other-keys) error "Missing argument for %s" :allow-other-keys nil "Keyword argument %s not one of (:buffer-name)" (debug error) ement-notifications--log-buffer :name current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] get-buffer-window select-window save-mark-and-excursion--save #[0 "\301\300!\207" [V0 save-mark-and-excursion--restore] 2] type-of 1 2 cl-find signal wrong-type-argument 5 :key ement-room-id :test equal "ement-notifications-log-to-buffer: Can't find room <%s>; discarding notification" "%o%O »%W %S> %B%R%t" ement-room--insert-event t ewoc-goto-node re-search-forward "> " add-text-properties (button (t) category default-button action ement-notify-button-action) ewoc-next ewoc-location session room event alter-text-property face #[257 "\211\300=\203 \301\207\211<\203 \302\300\"\207\207" [button nil remq] 4 "\n\n(fn FACE)"] add-face-text-property :background ement-notifications--room-background-color :extend message "ement-notifications-log-to-buffer: %S" inhibit-read-only ement-ewoc ement-notify-prism-background] 20 (#$ . 12839)])#@75 Return a background color on which to display ROOM's messages.

(fn ROOM)
(defalias 'ement-notifications--room-background-color #[257 "\301\302\303!>\204 \304\305\306D\"\210\307H\"\206z \303!>\204' \304\305\306D\"\210\302\307H\236\310\311\303!>\204> \304\305\306D\"\210\312H\313\314\315!#\316\"\317\320\321\315!!!\203Y \322\323\"\202] \324\323\"\262\203j \241\210\202x \307\302B\211\262\307HBI\210\262\207" [cl-struct-ement-room-tags alist-get notify-background-color type-of signal wrong-type-argument ement-room 18 color-desaturate-name ement--prism-color 1 :contrast-with face-foreground default 50 ement--color-dark-p color-name-to-rgb face-background color-darken-name 25 color-lighten-name] 8 (#$ . 15007)])#@92 Return an Ement notifications buffer named NAME.

(fn &key (NAME "*Ement Notifications*"))
(defalias 'ement-notifications--log-buffer #[128 "\300\301\"\206 \302A@\211\203@ \211@\303>\203) \211A\204! \304\305@\"\210\211AA\262\202 \306>A@\2037 \307\262\202 \304\310@\"\210\202 \210\311!\206R r\312!q\210\313 \210p)\207" [plist-member :name (nil "*Ement Notifications*") (:name :allow-other-keys) error "Missing argument for %s" :allow-other-keys nil "Keyword argument %s not one of (:name)" get-buffer get-buffer-create ement-notifications-mode] 6 (#$ . 15751)])
(defvar ement-notifications-mode-hook nil)
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [ement-notifications-mode-hook variable-documentation put "Hook run after entering Ement Notifications mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" boundp ement-notifications-mode-map definition-name ement-notifications-mode] 4)
(defvar ement-notifications-mode-map (make-sparse-keymap))
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204* \303\307\310\311#\210\312\307\306\307!\203& \313\202( \314 \"\210\307\302N\2048 \303\307\302\304\315!#\210\306\300!\204X \303\300\310\311#\210\312\300\306\300!\203P \313\202V \316\300\313\"\210\"\210\300\302N\204f \303\300\302\304\317!#\210\303\311\320\321#\207" [ement-notifications-mode-abbrev-table ement-notifications-mode-map variable-documentation put purecopy "Keymap for `ement-notifications-mode'." boundp ement-notifications-mode-syntax-table definition-name ement-notifications-mode defvar-1 nil make-syntax-table "Syntax table for `ement-notifications-mode'." define-abbrev-table "Abbrev table for `ement-notifications-mode'." derived-mode-parent ement-room-mode] 5)#@558 Major mode derived from `ement-room-mode' by `define-derived-mode'.
It inherits all of the parent's attributes, but has its own keymap,
abbrev table and syntax table:

  `ement-notifications-mode-map', `ement-notifications-mode-abbrev-table' and
`ement-notifications-mode-syntax-table'

which more-or-less shadow ement-room-mode's corresponding tables.

In addition to any hooks its parent mode might have run, this mode runs the hook
`ement-notifications-mode-hook', as the final or penultimate step during initialization.

\{ement-notifications-mode-map}
(defalias 'ement-notifications-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204' \316\317 \"\210\320\f!\211\2035 \211\321 =\203; \322\f\323 \"\210\210\324\325\"\204R \"=\204R \326\325\"C#\210\327!\210\330\f!\210\"\331#\332$\333%\306\334!\210\335\306\336!\210\337)\340\341!\207" [delay-mode-hooks major-mode mode-name ement-notifications-mode-map ement-notifications-mode-syntax-table ement-notifications-mode-abbrev-table make-local-variable t ement-room-mode ement-notifications-mode "Ement Notifications" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table nil 0 8 ement-room-message-format-spec "[%o%O] %S> %B%R%t" bookmark-make-record-function ement-notifications-bookmark-make-record run-mode-hooks ement-notifications-mode-hook local-abbrev-table ement-room-sender-in-left-margin left-margin-width right-margin-width] 5 (#$ . 17594) nil])
(require 'bookmark)#@72 Return a bookmark record for the current `ement-notifications' buffer.
(defalias 'ement-notifications-bookmark-make-record #[0 "\300 \300\211 B\301\302BE\207" [buffer-name handler ement-notifications-bookmark-handler] 4 (#$ . 19249)])#@64 Show `ement-notifications' buffer for BOOKMARK.

(fn BOOKMARK)
(defalias 'ement-notifications-bookmark-handler #[257 "\300\301 !\207" [ement-notifications ement-complete-session] 3 (#$ . 19489)])
(provide 'ement-notifications)
