maxserver 2.0.0 → 2.2.0
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.
- package/devdocs/maxserver-docs.css +1 -1
- package/devdocs/maxserver-docs.js +6 -5
- package/package.json +3 -2
- package/src/cors.js +19 -8
- package/src/docs.js +11 -9
- package/src/errors.js +1 -1
- package/src/headers.js +13 -4
- package/src/index.js +9 -5
- package/src/routes.js +70 -31
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
._bar_18yta_1{padding:12px 12px 4px}._input_18yta_5{border:var(--hairline);background:var(--surface);width:100%;height:30px;color:var(--text-muted);font-family:var(--font-mono);border-radius:6px;padding:0 8px;font-size:12px;display:block}._input_18yta_5:focus{outline:2px solid var(--accent);outline-offset:-1px;background:var(--background);color:var(--text)}._badge_687h8_1{font-family:var(--font-mono);text-transform:uppercase;color:var(--text-muted);font-size:14px}._short_687h8_8{margin-left:8px;font-size:10px;font-weight:600;line-height:14px}._get_687h8_15{color:var(--method-get)}._post_687h8_16{color:var(--method-post)}._put_687h8_17{color:var(--method-put)}._patch_687h8_18{color:var(--method-patch)}._delete_687h8_19{color:var(--method-delete)}._dark_687h8_21._get_687h8_15{color:var(--method-get-dark)}._dark_687h8_21._post_687h8_16{color:var(--method-post-dark)}._dark_687h8_21._put_687h8_17{color:var(--method-put-dark)}._dark_687h8_21._patch_687h8_18{color:var(--method-patch-dark)}._dark_687h8_21._delete_687h8_19{color:var(--method-delete-dark)}._group_313i3_1{flex-direction:column;gap:1px;display:flex}._header_313i3_7{width:100%;min-height:32px;color:var(--text-muted);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:space-between;align-items:center;padding:8px;font-size:14px;line-height:16px;display:flex}._header_313i3_7:hover{color:var(--text);background:var(--surface)}._header_313i3_7[aria-expanded=true]{color:var(--text)}._chevron_313i3_34{color:var(--text-muted)}._items_313i3_38{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex;position:relative}._items_313i3_38:before{content:"";border-left:var(--hairline);position:absolute;top:0;bottom:0;left:12px}._item_313i3_38{min-height:32px;color:var(--text-muted);border-radius:3px;justify-content:space-between;align-items:center;padding:8px 8px 8px 28px;font-size:14px;line-height:16px;text-decoration:none;display:flex}._item_313i3_38:hover{color:var(--text);background:var(--surface)}._active_313i3_75{color:var(--text);background:var(--surface);font-weight:500}._label_313i3_81{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._header_313i3_7:focus-visible,._item_313i3_38:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._sidebar_oqs2u_1{flex:1;min-height:0;padding:8px 12px 12px;overflow-y:auto}._list_oqs2u_8{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}._link_oqs2u_17{min-height:32px;color:var(--text-muted);border-radius:3px;justify-content:space-between;align-items:center;padding:8px;font-size:14px;line-height:16px;text-decoration:none;display:flex}._link_oqs2u_17:hover{color:var(--text);background:var(--surface)}._active_oqs2u_35{color:var(--text);background:var(--surface);font-weight:500}._label_oqs2u_41{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._link_oqs2u_17:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._markdown_1u8a2_1{color:var(--text);font-size:16px;line-height:26px}._markdown_1u8a2_1 p,._markdown_1u8a2_1 ul,._markdown_1u8a2_1 ol,._pre_1u8a2_10{margin:0 0 12px}._markdown_1u8a2_1>:last-child{margin-bottom:0}._markdown_1u8a2_1 ul,._markdown_1u8a2_1 ol{padding-left:22px}._muted_1u8a2_23{color:var(--text-muted);font-size:14px;line-height:22px}._heading_1u8a2_29{font-weight:600}._code_1u8a2_33{background:var(--surface);border-radius:3px;padding:0 3px;font-size:12px}._link_1u8a2_40{color:var(--text);text-underline-offset:4px;-webkit-text-decoration:underline #1b1b1b4d;text-decoration:underline #1b1b1b4d}._link_1u8a2_40:hover{-webkit-text-decoration-color:var(--text);text-decoration-color:var(--text)}._pre_1u8a2_10{background:var(--surface);font-family:var(--font-mono);border-radius:8px;padding:8px 12px;font-size:13px;line-height:19px;overflow:auto}._field_opijr_1{align-items:center;gap:6px;min-height:36px;padding:0 8px 0 12px;font-size:14px;display:flex}._label_opijr_10{color:var(--text);flex:none}._input_opijr_15{min-width:0;height:32px;color:var(--text);font-family:var(--font-mono);background:0 0;border:0;flex:1;font-size:13px}._input_opijr_15::placeholder{font-family:var(--font-body);color:var(--text-faint);font-size:14px}._input_opijr_15:focus{outline:none}._field_opijr_1:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}._eye_opijr_40{width:28px;height:28px;color:var(--text-muted);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;padding:0;display:inline-flex}._eye_opijr_40:hover{color:var(--text)}._intro_1jvp6_1{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px 48px;padding:90px 0;display:grid}._auth_1jvp6_9{border:var(--hairline);border-radius:8px;align-self:end;overflow:hidden}._authTitle_1jvp6_16{border-bottom:var(--hairline);background:var(--surface);padding:8px 12px;font-size:14px;font-weight:500;line-height:20px}@media (max-width:1100px){._intro_1jvp6_1{grid-template-columns:minmax(0,1fr)}}._pills_1jvp6_31{gap:6px;margin-bottom:2px;display:flex}._pill_1jvp6_31{border:var(--hairline);background:var(--surface);color:var(--text-muted);border-radius:12px;padding:2px 6px;font-size:13px;line-height:15px;display:inline-block}._title_1jvp6_48{margin:0 0 9px;font-size:24px;font-weight:600;line-height:34.8px}._download_1jvp6_55{text-underline-offset:4px;font-size:16px;font-weight:500;line-height:26px;-webkit-text-decoration:underline #1b1b1b4d;text-decoration:underline #1b1b1b4d}._download_1jvp6_55:hover{-webkit-text-decoration-color:var(--text);text-decoration-color:var(--text)}._tag_wuduw_1{border-top:var(--hairline);grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 48px;padding:90px 0;display:grid}._title_wuduw_10{margin:0 0 12px;font-size:24px;font-weight:600;line-height:34.8px}._card_wuduw_17{border:var(--hairline);background:var(--surface);border-radius:8px;align-self:start}._cardTitle_wuduw_24{border-bottom:var(--hairline);padding:7px 12px;font-size:14px;font-weight:500;line-height:22px}._list_wuduw_32{margin:0;padding:10px 12px;list-style:none}._item_wuduw_38{align-items:baseline;line-height:22px;text-decoration:none;display:flex}._item_wuduw_38:hover ._path_wuduw_45{text-underline-offset:3px;text-decoration:underline}._method_wuduw_50{text-align:right;flex:none;width:62px}._path_wuduw_45{color:var(--text);overflow-wrap:anywhere;margin-left:12px;font-size:14px}@media (max-width:1100px){._tag_wuduw_1{grid-template-columns:minmax(0,1fr);padding:56px 0}}._pill_fi44x_1{border:var(--hairline);white-space:nowrap;color:var(--text-muted);border-radius:16px;align-items:center;padding:2px 8px;font-size:12px;line-height:14px;display:inline-flex}._required_fi44x_13{color:var(--required)}._section_1lkso_1{margin-top:24px}._header_1lkso_5{border-bottom:var(--hairline);justify-content:space-between;align-items:center;gap:8px;padding-bottom:12px;display:flex}._title_1lkso_14{margin:0;font-size:16px;font-weight:500;line-height:18.4px}._badges_1lkso_21{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}._fields_1lkso_28{padding-top:0}._type_tj3j8_1{font-family:var(--font-mono);color:var(--text-muted);font-size:13px}._model_tj3j8_7{font-family:var(--font-mono);color:var(--text-muted);text-underline-offset:3px;font-size:13px;-webkit-text-decoration:underline #75757580;text-decoration:underline #75757580}._model_tj3j8_7:hover{color:var(--text)}._foldable_lceok_1{position:relative}._row_lceok_5{cursor:pointer;align-items:center;gap:10px;min-height:32px;padding:6px 0;display:flex;position:relative}._tall_lceok_15{min-height:36px;padding:10px 0;line-height:16px}._toggle_lceok_21{width:20px;height:20px;color:var(--text-muted);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;margin-top:-10px;padding:0;display:inline-flex;position:absolute;top:50%;left:-25px}._row_lceok_5:hover ._toggle_lceok_21{color:var(--text)}._toggle_lceok_21:focus-visible{outline:2px solid var(--accent);outline-offset:1px}._title_lceok_48{flex:1;min-width:0}._right_lceok_53{flex:none}._body_lceok_57{border-left:var(--hairline);margin-bottom:6px;padding-left:16px}._field_pv3dl_1{display:block}._row_pv3dl_5{padding:6px 0}._head_pv3dl_9{flex-wrap:wrap;align-items:baseline;gap:2px 9px;min-height:20px;font-size:13px;line-height:20px;display:flex}._name_pv3dl_20{font-family:var(--font-mono);color:var(--text);word-break:break-word;font-size:13px;font-weight:600}._meta_pv3dl_28{color:var(--text-muted);font-size:13px}._required_pv3dl_33{color:var(--required);font-size:13px}._example_pv3dl_38{color:var(--text-faint);text-underline-offset:3px;cursor:help;font-size:13px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}._preview_pv3dl_46{font-family:var(--font-mono);color:var(--text);font-size:13px}._description_pv3dl_52{margin:-2px 0 6px}._fields_bqq45_1{display:block}._type_bqq45_5{padding:6px 0 4px;line-height:20px}._responses_f1ur8_1{margin-top:24px}._title_f1ur8_5{border-bottom:var(--hairline);margin:0;padding-bottom:12px;font-size:16px;font-weight:500;line-height:23px}._head_f1ur8_14{align-items:baseline;gap:6px;font-size:13px;line-height:16px;display:flex}._status_f1ur8_22{font-family:var(--font-mono);font-weight:600}._summary_f1ur8_27{color:var(--text-muted)}._empty_f1ur8_31{color:var(--text-muted);margin:4px 0 6px;font-size:14px}._description_f1ur8_37{margin-top:4px}._button_fispn_1{height:26px;font-family:var(--font-body);white-space:nowrap;cursor:pointer;border:0;border-radius:4px;align-items:center;gap:5px;padding:0 10px;font-size:13px;font-weight:600;line-height:16px;display:inline-flex}._dark_fispn_17{background:var(--text);color:#fff}._dark_fispn_17:hover{background:#000}._dark_fispn_17:disabled{opacity:.6;cursor:default}._light_fispn_31{color:#1a1a1a;background:#fff;border-radius:3px;height:24px;padding:1px 8px 1px 6px;font-size:14px;font-weight:500;box-shadow:inset 0 0 0 1px #0000001a}._light_fispn_31:hover{background:#f0f0f0}._button_fispn_1:focus-visible{outline:2px solid var(--accent);outline-offset:2px}._bar_2kn4o_1{border:.5px solid var(--endpoint-border);background:var(--endpoint-background);border-radius:8px;align-items:center;min-height:41px;padding:8px 8px 8px 12px;display:flex;overflow-x:auto}._bar_2kn4o_1>span{margin-right:6px;line-height:19px}._path_2kn4o_18{min-width:0;color:var(--endpoint-path);white-space:nowrap;flex:1;font-size:14px;font-weight:500;line-height:19px}._param_2kn4o_28{color:var(--endpoint-param)}._test_2kn4o_32{flex:none;margin-left:8px}._tabs_1vlyl_1{align-self:stretch;gap:8px;min-width:0;display:flex;overflow-x:auto}._tab_1vlyl_1{font-family:var(--font-body);color:var(--text-muted);cursor:pointer;background:0 0;border:0;padding:0 1px;font-size:14px;line-height:22px;position:relative}._tab_1vlyl_1:hover{color:var(--text)}._active_1vlyl_25{color:var(--text);font-weight:500}._active_1vlyl_25:after{content:"";background:var(--text);height:1px;position:absolute;bottom:0;left:0;right:0}._tab_1vlyl_1:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._checkbox_1ecj6_1{min-height:36px;color:var(--text-muted);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;padding:7px 12px 7px 6px;font-size:14px;line-height:22px;display:inline-flex;position:relative}._checkbox_1ecj6_1:hover{color:var(--text)}._checkbox_1ecj6_1 input{opacity:0;width:1px;height:1px;position:absolute}._box_1ecj6_26{background:var(--surface-hover);width:16px;height:16px;color:var(--background);border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._checkbox_1ecj6_1 input:checked+._box_1ecj6_26{background:var(--text)}._checkbox_1ecj6_1 input:focus-visible+._box_1ecj6_26{outline:2px solid var(--accent);outline-offset:2px}._code_pk0oo_1{font-family:var(--font-mono);color:var(--json-punct);tab-size:2;margin:0;padding:0;font-size:14px;line-height:19.6px;overflow:auto}._key_pk0oo_12{color:var(--text)}._string_pk0oo_13{color:var(--json-string)}._number_pk0oo_14{color:var(--json-number)}._literal_pk0oo_15{color:var(--json-literal)}._button_lse6e_1{width:24px;height:36px;color:var(--text-faint);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;margin-right:8px;padding:0;display:inline-flex}._button_lse6e_1:hover{color:var(--text)}._button_lse6e_1:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}._card_1xtgd_1{border:var(--hairline);background:var(--surface);border-radius:8px;margin-top:12px;overflow:hidden}._header_1xtgd_9{border-bottom:var(--hairline);justify-content:space-between;align-items:center;gap:12px;min-height:36px;padding-left:12px;display:flex}._actions_1xtgd_19{flex:none;align-items:center;display:flex}._body_1xtgd_25{max-height:440px;padding:8px;overflow:auto}._empty_1xtgd_31{color:var(--text-muted);margin:0;padding:0 4px;font-size:14px;line-height:20px}._footer_1xtgd_39{border-top:var(--hairline);padding:7px 12px;font-size:14px;font-weight:500;line-height:22px}._overlay_pjga8_1{z-index:100;background:#1b1b1b59;position:fixed;inset:0}._dialog_pjga8_11{border:var(--hairline);background:var(--background);border-radius:8px;flex-direction:column;display:flex;position:absolute;inset:60px 24px;overflow:hidden;box-shadow:0 10px 40px #0000002e}._dialog_pjga8_11:focus{outline:none}._close_pjga8_30{background:var(--background);width:32px;height:32px;color:var(--text);cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;display:inline-flex;position:absolute;top:14px;right:16px}._close_pjga8_30:focus-visible{outline:2px solid var(--accent)}@media (max-width:900px){._dialog_pjga8_11{border-radius:0;inset:0}._close_pjga8_30{z-index:1;top:8px;right:8px}}._section_16tu7_1{border-bottom:var(--hairline)}._heading_16tu7_5{margin:0}._header_16tu7_9{background:var(--surface);width:100%;min-height:36px;color:var(--text);font-family:var(--font-body);text-align:left;cursor:pointer;border:0;align-items:center;gap:8px;padding:8px 12px;font-size:14px;font-weight:500;line-height:20px;display:flex}._header_16tu7_9:hover{background:var(--surface-hover)}._header_16tu7_9:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._chevron_16tu7_36{color:var(--text-muted);flex:none}._title_16tu7_41{flex:none}._note_16tu7_45{color:var(--text-muted);font-weight:400}._right_16tu7_50{color:var(--text-muted);margin-left:auto;font-weight:400}._body_16tu7_56{border-top:var(--hairline)}._table_rhk4n_1{border-collapse:collapse;table-layout:fixed;width:100%}._table_rhk4n_1 tr+tr td{border-top:var(--hairline)}._check_rhk4n_11{border-right:var(--hairline);text-align:center;width:32px;padding:0}._cell_rhk4n_18{padding:0}._cell_rhk4n_18+._cell_rhk4n_18{border-left:var(--hairline)}._input_rhk4n_26{width:100%;height:32px;color:var(--text);font-family:var(--font-body);background:0 0;border:0;padding:0 8px;font-size:14px;display:block}._input_rhk4n_26::placeholder{color:var(--text-faint)}._input_rhk4n_26:read-only{color:var(--text-muted)}._input_rhk4n_26:focus{outline:2px solid var(--accent);outline-offset:-2px}._box_rhk4n_51{cursor:pointer;justify-content:center;align-items:center;width:32px;height:32px;display:inline-flex;position:relative}._box_rhk4n_51 input{opacity:0;width:1px;height:1px;position:absolute}._box_rhk4n_51 span{width:16px;height:16px;color:var(--text);border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._box_rhk4n_51 input:focus-visible+span{outline:2px solid var(--accent)}._empty_k0qvo_1{color:var(--text-muted);text-align:center;margin:0;padding:48px 24px;font-size:14px}._error_k0qvo_9{color:var(--text-muted);padding:16px 12px;font-size:14px;line-height:20px}._error_k0qvo_9 strong{color:var(--method-delete)}._error_k0qvo_9 p{margin:6px 0 0}._summary_k0qvo_24{border-bottom:var(--hairline);min-height:40px;color:var(--text);align-items:center;gap:8px;padding:0 12px;font-size:14px;display:flex}._status_k0qvo_35{text-underline-offset:3px;text-decoration:underline}._dot_k0qvo_40{border-radius:50%;width:7px;height:7px}._ok_k0qvo_46{background:var(--method-post)}._bad_k0qvo_50{background:var(--method-delete)}._headers_k0qvo_54{margin:0;font-size:13px}._headerRow_k0qvo_59{grid-template-columns:minmax(0,2fr) minmax(0,3fr);display:grid}._headerRow_k0qvo_59+._headerRow_k0qvo_59{border-top:var(--hairline)}._headerRow_k0qvo_59 dt,._headerRow_k0qvo_59 dd{overflow-wrap:anywhere;margin:0;padding:7px 12px}._headerRow_k0qvo_59 dt{color:var(--text-muted);border-right:var(--hairline)}._views_k0qvo_80{justify-content:flex-end;gap:2px;padding:6px 12px 0;display:flex}._view_k0qvo_80{color:var(--text-muted);font-family:var(--font-body);cursor:pointer;background:0 0;border:0;border-radius:3px;padding:2px 8px;font-size:13px}._viewActive_k0qvo_98{background:var(--surface);color:var(--text)}._body_k0qvo_103{padding:8px 12px 12px}._raw_k0qvo_107{font-family:var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:19px}._noBody_k0qvo_116{color:var(--text-muted);margin:0;font-size:14px}._top_dnzw1_1{border-bottom:var(--hairline);justify-content:center;padding:8px 12px;display:flex}._urlBar_dnzw1_8{width:100%;max-width:768px;min-height:32px;box-shadow:inset 0 0 0 .5px var(--border);background:#fafafa;border-radius:6px;align-items:center;gap:4px;padding:3px;display:flex}._method_dnzw1_21{padding:0 4px 0 8px}._method_dnzw1_21 span{font-size:12px;font-weight:600}._url_dnzw1_8{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);color:var(--text-muted);flex:1;padding:0 4px;font-size:14px;line-height:16px;overflow:hidden}._urlBar_dnzw1_8 button:last-child{flex:none}._panes_dnzw1_47{flex:1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:0;display:grid}._pane_dnzw1_47{flex-direction:column;min-height:0;display:flex;position:relative;overflow-y:auto}._pane_dnzw1_47+._pane_dnzw1_47{border-left:var(--hairline)}._paneTitle_dnzw1_66{border-bottom:var(--hairline);margin:0;padding:12px;font-size:14px;font-weight:500;line-height:16px}._body_dnzw1_75{resize:vertical;background:var(--background);width:100%;color:var(--text);font-family:var(--font-mono);tab-size:2;border:0;padding:10px 12px;font-size:13px;line-height:19px;display:block}._body_dnzw1_75:focus{outline:2px solid var(--accent);outline-offset:-2px}._hint_dnzw1_94{color:var(--text-faint);text-align:right;margin:auto 0 0;padding:12px;font-size:13px}._hint_dnzw1_94 kbd{font-family:var(--font-body)}@media (max-width:900px){._top_dnzw1_1{padding-right:52px}._panes_dnzw1_47{grid-template-columns:minmax(0,1fr);overflow-y:auto}._pane_dnzw1_47{overflow:visible}._pane_dnzw1_47+._pane_dnzw1_47{border-left:0;border-top:var(--hairline)}}._operation_yif9z_1{border-top:var(--hairline);grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:48px;padding:90px 0;display:grid}._left_yif9z_9{min-width:0}._title_yif9z_13{margin:0 0 9px;font-size:24px;font-weight:600;line-height:34.8px}._right_yif9z_20{min-width:0}._sticky_yif9z_24{position:sticky;top:24px}._actions_yif9z_29{min-height:34px;color:var(--text);justify-content:flex-end;align-items:center;gap:6px;margin-bottom:11px;font-size:14px;display:flex}._actions_yif9z_29 svg{color:var(--text-muted)}@media (max-width:1100px){._operation_yif9z_1{grid-template-columns:minmax(0,1fr);row-gap:28px;padding:56px 0}._sticky_yif9z_24{position:static}._actions_yif9z_29{min-height:0;margin-bottom:8px}}._models_jw02e_1{border-top:1px solid var(--hairline);max-width:760px;padding:72px 0}._title_jw02e_7{margin:0 0 24px;font-size:24px;font-weight:600}._model_jw02e_1{border:1px solid var(--border);border-radius:8px;margin-bottom:16px;scroll-margin-top:24px}._name_jw02e_20{border-bottom:1px solid var(--border);background:var(--surface);font-family:var(--font-mono);border-radius:8px 8px 0 0;margin:0;padding:10px 16px;font-size:14px;font-weight:600}._body_jw02e_31{padding:4px 16px 6px 34px}._app_vr0g8_1{min-height:100vh}._sidebar_vr0g8_5{z-index:20;width:var(--sidebar-width);border-right:var(--hairline);background:var(--background);flex-direction:column;display:flex;position:fixed;top:0;bottom:0;left:0}._content_vr0g8_18{margin-left:var(--sidebar-width);max-width:calc(var(--sidebar-width) + 1152px);padding:0 60px 120px}._topbar_vr0g8_24,._backdrop_vr0g8_28{display:none}._message_vr0g8_32{max-width:560px;color:var(--text-muted);margin:80px auto;padding:0 24px;line-height:1.6}._message_vr0g8_32 strong{color:var(--text)}@media (max-width:900px){._topbar_vr0g8_24{z-index:30;border-bottom:var(--hairline);background:var(--background);align-items:center;gap:10px;height:52px;padding:0 12px;display:flex;position:sticky;top:0}._topbarTitle_vr0g8_58{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}._menuButton_vr0g8_65{width:36px;height:36px;color:var(--text);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._menuButton_vr0g8_65:hover{background:var(--surface)}._sidebar_vr0g8_5{transition:transform .2s;top:52px;transform:translate(-100%)}._sidebarOpen_vr0g8_88{transform:none}._backdrop_vr0g8_28{z-index:10;background:#1b1b1b4d;display:block;position:fixed;inset:52px 0 0}._content_vr0g8_18{margin-left:0;padding:0 28px 80px}._content_vr0g8_18 section[id]{scroll-margin-top:52px}}:root{--accent:#0082d0;--background:#fff;--surface:#f6f6f6;--surface-hover:#e7e7e7;--border:#dfdfdf;--hairline:.5px solid #dfdfdf;--text:#1b1b1b;--text-muted:#757575;--text-faint:#8e8e8e;--font-body:ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--required:#ff6605;--method-get:#0082d0;--method-post:#069061;--method-put:#ff6605;--method-patch:#edbe20;--method-delete:#ef0006;--method-get-dark:#1ea7ff;--method-post-dark:#00b648;--method-put-dark:#ff8c3a;--method-patch-dark:#ffc93d;--method-delete-dark:#ff4d4f;--endpoint-background:#1a1a1a;--endpoint-border:#2d2d2d;--endpoint-path:#a4a4a4;--endpoint-param:#e7e7e7;--json-string:#0082d0;--json-number:#069061;--json-literal:#ff6605;--json-punct:#757575;--sidebar-width:288px}html{-webkit-text-size-adjust:100%}body{background:var(--background);color:var(--text);font-family:var(--font-body);-webkit-font-smoothing:antialiased;margin:0;font-size:16px;line-height:1.15}a{color:inherit}code{font-family:var(--font-mono)}*,:before,:after{box-sizing:border-box}
|
|
1
|
+
._bar_18yta_1{padding:12px 12px 4px}._input_18yta_5{border:var(--hairline);background:var(--surface);width:100%;height:30px;color:var(--text-muted);font-family:var(--font-mono);border-radius:6px;padding:0 8px;font-size:12px;display:block}._input_18yta_5:focus{outline:2px solid var(--accent);outline-offset:-1px;background:var(--background);color:var(--text)}._bar_df4bj_1{padding:12px 12px 4px}._field_df4bj_5{border:var(--hairline);background:var(--surface);border-radius:6px;align-items:center;height:30px;display:flex}._field_df4bj_5:focus-within{outline:2px solid var(--accent);outline-offset:-1px;background:var(--background)}._label_df4bj_20{color:var(--text-faint);flex:none;padding:0 6px 0 8px;font-size:11px;font-weight:600}._input_df4bj_28{min-width:0;height:100%;color:var(--text);font-family:var(--font-mono);background:0 0;border:0;flex:1;padding:0 8px 0 0;font-size:12px}._input_df4bj_28:focus{outline:none}._segmented_19288_1{background:var(--surface);box-shadow:inset 0 0 0 .5px var(--border);border-radius:7px;gap:2px;padding:2px;display:flex}._option_19288_10{height:28px;color:var(--text-muted);font-family:var(--font-body);cursor:pointer;background:0 0;border:0;border-radius:5px;flex:1;padding:0 8px;font-size:13px;font-weight:500}._option_19288_10:hover{color:var(--text)}._active_19288_28{background:var(--background);color:var(--text);box-shadow:0 0 0 .5px var(--border), 0 1px 2px var(--shadow-soft)}._option_19288_10:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._badge_2r80x_1{font-family:var(--font-mono);text-transform:uppercase;color:var(--text-muted);font-size:14px}._short_2r80x_8{margin-left:8px;font-size:10px;font-weight:600;line-height:14px}._get_2r80x_15{color:var(--method-get)}._post_2r80x_16{color:var(--method-post)}._put_2r80x_17{color:var(--method-put)}._patch_2r80x_18{color:var(--method-patch)}._delete_2r80x_19{color:var(--method-delete)}._tool_2r80x_20{color:var(--method-tool)}._dark_2r80x_22._get_2r80x_15{color:var(--method-get-dark)}._dark_2r80x_22._post_2r80x_16{color:var(--method-post-dark)}._dark_2r80x_22._put_2r80x_17{color:var(--method-put-dark)}._dark_2r80x_22._patch_2r80x_18{color:var(--method-patch-dark)}._dark_2r80x_22._delete_2r80x_19{color:var(--method-delete-dark)}._dark_2r80x_22._tool_2r80x_20{color:var(--method-tool-dark)}._link_yhq87_1{min-height:32px;color:var(--text-muted);border-radius:3px;justify-content:space-between;align-items:center;padding:8px;font-size:14px;line-height:16px;text-decoration:none;display:flex}._nested_yhq87_14{padding-left:28px}._link_yhq87_1:hover{color:var(--text);background:var(--surface)}._active_yhq87_23{color:var(--text);background:var(--surface);font-weight:500}._label_yhq87_29{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._link_yhq87_1:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._group_1me2b_1{flex-direction:column;gap:1px;display:flex}._header_1me2b_7{width:100%;min-height:32px;color:var(--text-muted);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:space-between;align-items:center;padding:8px;font-size:14px;line-height:16px;display:flex}._header_1me2b_7:hover{color:var(--text);background:var(--surface)}._header_1me2b_7[aria-expanded=true]{color:var(--text)}._current_1me2b_34{color:var(--text);font-weight:600}._chevron_1me2b_39{color:var(--text-muted)}._items_1me2b_43{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex;position:relative}._items_1me2b_43:before{content:"";border-left:var(--hairline);position:absolute;top:0;bottom:0;left:12px}._header_1me2b_7:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._sidebar_nv8xl_1{flex:1;min-height:0;padding:8px 12px 12px;overflow-y:auto}._list_nv8xl_8{flex-direction:column;gap:1px;margin:0;padding:0;list-style:none;display:flex}._overlay_1xiao_1{z-index:100;background:var(--overlay);position:fixed;inset:0}._dialog_1xiao_11{border:var(--hairline);background:var(--background);box-shadow:0 10px 40px var(--shadow);border-radius:8px;flex-direction:column;display:flex;position:absolute;inset:60px 24px;overflow:hidden}._dialog_1xiao_11:focus{outline:none}._close_1xiao_30{background:var(--background);width:32px;height:32px;color:var(--text);cursor:pointer;border:0;border-radius:50%;justify-content:center;align-items:center;display:inline-flex;position:absolute;top:14px;right:16px}._close_1xiao_30:focus-visible{outline:2px solid var(--accent)}@media (max-width:900px){._dialog_1xiao_11{border-radius:0;inset:0}._close_1xiao_30{z-index:1;top:8px;right:8px}}._small_1xiao_67{border-radius:8px;width:380px;max-width:calc(100% - 32px);inset:50% auto auto 50%;transform:translate(-50%,-50%)}._small_1xiao_67 ._close_1xiao_30{top:10px;right:10px}._settings_11ql4_1{flex-direction:column;gap:18px;padding:18px 20px 22px;display:flex}._title_11ql4_8{margin:0;font-size:16px;font-weight:600;line-height:24px}._row_11ql4_15{flex-direction:column;gap:8px;display:flex}._label_11ql4_21{color:var(--text-muted);font-size:13px;font-weight:500}._zoom_11ql4_27{align-items:center;gap:8px;display:flex}._range_11ql4_33{min-width:0;accent-color:var(--accent);flex:1}._number_11ql4_39{border:var(--hairline);background:var(--surface);width:64px;height:28px;color:var(--text);font-family:var(--font-mono);text-align:right;border-radius:5px;padding:0 6px;font-size:13px}._number_11ql4_39:focus{outline:2px solid var(--accent);outline-offset:-1px}._unit_11ql4_57{color:var(--text-muted);font-size:13px}._reset_11ql4_62{color:var(--text-muted);font-family:var(--font-body);text-underline-offset:3px;cursor:pointer;background:0 0;border:0;padding:0;font-size:13px;text-decoration:underline}._reset_11ql4_62:disabled{opacity:.4;cursor:default}._note_11ql4_79{color:var(--text-muted);margin:0;font-size:13px}._footer_5n2b3_1{border-top:var(--hairline);justify-content:space-between;align-items:center;gap:8px;padding:8px 12px;display:flex}._toggle_5n2b3_10,._icon_5n2b3_11{height:32px;color:var(--text-muted);font-family:var(--font-body);cursor:pointer;background:0 0;border:0;border-radius:3px;align-items:center;gap:8px;padding:0 8px;font-size:14px;display:inline-flex}._icon_5n2b3_11{justify-content:center;width:32px;padding:0}._toggle_5n2b3_10:hover,._icon_5n2b3_11:hover{color:var(--text);background:var(--surface)}._toggle_5n2b3_10:focus-visible,._icon_5n2b3_11:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._resizer_17389_1{z-index:1;cursor:col-resize;touch-action:none;width:8px;position:absolute;top:0;bottom:0;right:-4px}._resizer_17389_1:after{content:"";background:0 0;width:2px;transition:background .15s;position:absolute;top:0;bottom:0;left:3px}._resizer_17389_1:hover:after,._resizer_17389_1:focus-visible:after{background:var(--accent)}._resizer_17389_1:focus-visible{outline:none}@media (max-width:900px){._resizer_17389_1{display:none}}._markdown_cv2jz_1{color:var(--text);font-size:16px;line-height:26px}._markdown_cv2jz_1 p,._markdown_cv2jz_1 ul,._markdown_cv2jz_1 ol,._pre_cv2jz_10{margin:0 0 12px}._markdown_cv2jz_1>:last-child{margin-bottom:0}._markdown_cv2jz_1 ul,._markdown_cv2jz_1 ol{padding-left:22px}._muted_cv2jz_23{color:var(--text-muted);font-size:14px;line-height:22px}._heading_cv2jz_29{font-weight:600}._code_cv2jz_33{background:var(--surface);border-radius:3px;padding:0 3px;font-size:12px}._link_cv2jz_40{color:var(--text);text-decoration:underline;-webkit-text-decoration-color:var(--underline);text-decoration-color:var(--underline);text-underline-offset:4px}._link_cv2jz_40:hover{-webkit-text-decoration-color:var(--text);text-decoration-color:var(--text)}._pre_cv2jz_10{background:var(--surface);font-family:var(--font-mono);border-radius:8px;padding:8px 12px;font-size:13px;line-height:19px;overflow:auto}._field_opijr_1{align-items:center;gap:6px;min-height:36px;padding:0 8px 0 12px;font-size:14px;display:flex}._label_opijr_10{color:var(--text);flex:none}._input_opijr_15{min-width:0;height:32px;color:var(--text);font-family:var(--font-mono);background:0 0;border:0;flex:1;font-size:13px}._input_opijr_15::placeholder{font-family:var(--font-body);color:var(--text-faint);font-size:14px}._input_opijr_15:focus{outline:none}._field_opijr_1:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}._eye_opijr_40{width:28px;height:28px;color:var(--text-muted);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;padding:0;display:inline-flex}._eye_opijr_40:hover{color:var(--text)}._pills_eceyt_1{gap:6px;margin-bottom:2px;display:flex}._pill_eceyt_1{border:var(--hairline);background:var(--surface);color:var(--text-muted);border-radius:12px;padding:2px 6px;font-size:13px;line-height:15px;display:inline-block}._title_eceyt_18{margin:0 0 9px;font-size:24px;font-weight:600;line-height:34.8px}._intro_m5lye_1{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px 48px;padding:90px 0;display:grid}._auth_m5lye_9{border:var(--hairline);border-radius:8px;align-self:end;overflow:hidden}._authTitle_m5lye_16{border-bottom:var(--hairline);background:var(--surface);padding:8px 12px;font-size:14px;font-weight:500;line-height:20px}@media (max-width:1100px){._intro_m5lye_1{grid-template-columns:minmax(0,1fr)}}._download_m5lye_31{text-decoration:underline;-webkit-text-decoration-color:var(--underline);text-decoration-color:var(--underline);text-underline-offset:4px;font-size:16px;font-weight:500;line-height:26px}._download_m5lye_31:hover{-webkit-text-decoration-color:var(--text);text-decoration-color:var(--text)}._tag_wuduw_1{border-top:var(--hairline);grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 48px;padding:90px 0;display:grid}._title_wuduw_10{margin:0 0 12px;font-size:24px;font-weight:600;line-height:34.8px}._card_wuduw_17{border:var(--hairline);background:var(--surface);border-radius:8px;align-self:start}._cardTitle_wuduw_24{border-bottom:var(--hairline);padding:7px 12px;font-size:14px;font-weight:500;line-height:22px}._list_wuduw_32{margin:0;padding:10px 12px;list-style:none}._item_wuduw_38{align-items:baseline;line-height:22px;text-decoration:none;display:flex}._item_wuduw_38:hover ._path_wuduw_45{text-underline-offset:3px;text-decoration:underline}._method_wuduw_50{text-align:right;flex:none;width:62px}._path_wuduw_45{color:var(--text);overflow-wrap:anywhere;margin-left:12px;font-size:14px}@media (max-width:1100px){._tag_wuduw_1{grid-template-columns:minmax(0,1fr);padding:56px 0}}._pill_fi44x_1{border:var(--hairline);white-space:nowrap;color:var(--text-muted);border-radius:16px;align-items:center;padding:2px 8px;font-size:12px;line-height:14px;display:inline-flex}._required_fi44x_13{color:var(--required)}._section_1lkso_1{margin-top:24px}._header_1lkso_5{border-bottom:var(--hairline);justify-content:space-between;align-items:center;gap:8px;padding-bottom:12px;display:flex}._title_1lkso_14{margin:0;font-size:16px;font-weight:500;line-height:18.4px}._badges_1lkso_21{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}._fields_1lkso_28{padding-top:0}._type_27k8m_1{font-family:var(--font-mono);color:var(--text-muted);font-size:13px}._model_27k8m_7{font-family:var(--font-mono);color:var(--text-muted);text-decoration:underline;-webkit-text-decoration-color:var(--underline-muted);text-decoration-color:var(--underline-muted);text-underline-offset:3px;font-size:13px}._model_27k8m_7:hover{color:var(--text)}._foldable_lceok_1{position:relative}._row_lceok_5{cursor:pointer;align-items:center;gap:10px;min-height:32px;padding:6px 0;display:flex;position:relative}._tall_lceok_15{min-height:36px;padding:10px 0;line-height:16px}._toggle_lceok_21{width:20px;height:20px;color:var(--text-muted);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;margin-top:-10px;padding:0;display:inline-flex;position:absolute;top:50%;left:-25px}._row_lceok_5:hover ._toggle_lceok_21{color:var(--text)}._toggle_lceok_21:focus-visible{outline:2px solid var(--accent);outline-offset:1px}._title_lceok_48{flex:1;min-width:0}._right_lceok_53{flex:none}._body_lceok_57{border-left:var(--hairline);margin-bottom:6px;padding-left:16px}._field_pv3dl_1{display:block}._row_pv3dl_5{padding:6px 0}._head_pv3dl_9{flex-wrap:wrap;align-items:baseline;gap:2px 9px;min-height:20px;font-size:13px;line-height:20px;display:flex}._name_pv3dl_20{font-family:var(--font-mono);color:var(--text);word-break:break-word;font-size:13px;font-weight:600}._meta_pv3dl_28{color:var(--text-muted);font-size:13px}._required_pv3dl_33{color:var(--required);font-size:13px}._example_pv3dl_38{color:var(--text-faint);text-underline-offset:3px;cursor:help;font-size:13px;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}._preview_pv3dl_46{font-family:var(--font-mono);color:var(--text);font-size:13px}._description_pv3dl_52{margin:-2px 0 6px}._fields_bqq45_1{display:block}._type_bqq45_5{padding:6px 0 4px;line-height:20px}._responses_f1ur8_1{margin-top:24px}._title_f1ur8_5{border-bottom:var(--hairline);margin:0;padding-bottom:12px;font-size:16px;font-weight:500;line-height:23px}._head_f1ur8_14{align-items:baseline;gap:6px;font-size:13px;line-height:16px;display:flex}._status_f1ur8_22{font-family:var(--font-mono);font-weight:600}._summary_f1ur8_27{color:var(--text-muted)}._empty_f1ur8_31{color:var(--text-muted);margin:4px 0 6px;font-size:14px}._description_f1ur8_37{margin-top:4px}._button_5b1t0_1{height:26px;font-family:var(--font-body);white-space:nowrap;cursor:pointer;border:0;border-radius:4px;align-items:center;gap:5px;padding:0 10px;font-size:13px;font-weight:600;line-height:16px;display:inline-flex}._dark_5b1t0_17{background:var(--button);color:var(--button-text)}._dark_5b1t0_17:hover{background:var(--button-hover)}._dark_5b1t0_17:disabled{opacity:.6;cursor:default}._light_5b1t0_31{background:var(--button-light);height:24px;color:var(--button-light-text);box-shadow:inset 0 0 0 1px var(--button-light-border);border-radius:3px;padding:1px 8px 1px 6px;font-size:14px;font-weight:500}._light_5b1t0_31:hover{background:var(--button-light-hover)}._button_5b1t0_1:focus-visible{outline:2px solid var(--accent);outline-offset:2px}._bar_2kn4o_1{border:.5px solid var(--endpoint-border);background:var(--endpoint-background);border-radius:8px;align-items:center;min-height:41px;padding:8px 8px 8px 12px;display:flex;overflow-x:auto}._bar_2kn4o_1>span{margin-right:6px;line-height:19px}._path_2kn4o_18{min-width:0;color:var(--endpoint-path);white-space:nowrap;flex:1;font-size:14px;font-weight:500;line-height:19px}._param_2kn4o_28{color:var(--endpoint-param)}._test_2kn4o_32{flex:none;margin-left:8px}._tabs_1vlyl_1{align-self:stretch;gap:8px;min-width:0;display:flex;overflow-x:auto}._tab_1vlyl_1{font-family:var(--font-body);color:var(--text-muted);cursor:pointer;background:0 0;border:0;padding:0 1px;font-size:14px;line-height:22px;position:relative}._tab_1vlyl_1:hover{color:var(--text)}._active_1vlyl_25{color:var(--text);font-weight:500}._active_1vlyl_25:after{content:"";background:var(--text);height:1px;position:absolute;bottom:0;left:0;right:0}._tab_1vlyl_1:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._checkbox_1ecj6_1{min-height:36px;color:var(--text-muted);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:6px;padding:7px 12px 7px 6px;font-size:14px;line-height:22px;display:inline-flex;position:relative}._checkbox_1ecj6_1:hover{color:var(--text)}._checkbox_1ecj6_1 input{opacity:0;width:1px;height:1px;position:absolute}._box_1ecj6_26{background:var(--surface-hover);width:16px;height:16px;color:var(--background);border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._checkbox_1ecj6_1 input:checked+._box_1ecj6_26{background:var(--text)}._checkbox_1ecj6_1 input:focus-visible+._box_1ecj6_26{outline:2px solid var(--accent);outline-offset:2px}._code_pk0oo_1{font-family:var(--font-mono);color:var(--json-punct);tab-size:2;margin:0;padding:0;font-size:14px;line-height:19.6px;overflow:auto}._key_pk0oo_12{color:var(--text)}._string_pk0oo_13{color:var(--json-string)}._number_pk0oo_14{color:var(--json-number)}._literal_pk0oo_15{color:var(--json-literal)}._button_lse6e_1{width:24px;height:36px;color:var(--text-faint);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;margin-right:8px;padding:0;display:inline-flex}._button_lse6e_1:hover{color:var(--text)}._button_lse6e_1:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}._card_1xtgd_1{border:var(--hairline);background:var(--surface);border-radius:8px;margin-top:12px;overflow:hidden}._header_1xtgd_9{border-bottom:var(--hairline);justify-content:space-between;align-items:center;gap:12px;min-height:36px;padding-left:12px;display:flex}._actions_1xtgd_19{flex:none;align-items:center;display:flex}._body_1xtgd_25{max-height:440px;padding:8px;overflow:auto}._empty_1xtgd_31{color:var(--text-muted);margin:0;padding:0 4px;font-size:14px;line-height:20px}._footer_1xtgd_39{border-top:var(--hairline);padding:7px 12px;font-size:14px;font-weight:500;line-height:22px}._entry_1ib12_1{border-top:var(--hairline);grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:48px;padding:90px 0;display:grid}._left_1ib12_9,._right_1ib12_10{min-width:0}._title_1ib12_14{margin:0 0 9px;font-size:24px;font-weight:600;line-height:34.8px}._sticky_1ib12_21{position:sticky;top:24px}@media (max-width:1100px){._entry_1ib12_1{grid-template-columns:minmax(0,1fr);row-gap:28px;padding:56px 0}._sticky_1ib12_21{position:static}}._top_qk0c2_1{border-bottom:var(--hairline);justify-content:center;padding:8px 12px;display:flex}._urlBar_qk0c2_8{background:var(--surface);width:100%;max-width:768px;min-height:32px;box-shadow:inset 0 0 0 .5px var(--border);border-radius:6px;align-items:center;gap:4px;padding:3px;display:flex}._method_qk0c2_21{padding:0 4px 0 8px}._method_qk0c2_21 span{font-size:12px;font-weight:600}._url_qk0c2_8{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-family:var(--font-mono);color:var(--text-muted);flex:1;padding:0 4px;font-size:14px;line-height:16px;overflow:hidden}._urlBar_qk0c2_8 button:last-child{flex:none}._panes_qk0c2_47{flex:1;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:0;display:grid}._pane_qk0c2_47{flex-direction:column;min-height:0;display:flex;position:relative;overflow-y:auto}._pane_qk0c2_47+._pane_qk0c2_47{border-left:var(--hairline)}._paneTitle_qk0c2_66{border-bottom:var(--hairline);margin:0;padding:12px;font-size:14px;font-weight:500;line-height:16px}._hint_qk0c2_75{color:var(--text-faint);text-align:right;margin:auto 0 0;padding:12px;font-size:13px}._hint_qk0c2_75 kbd{font-family:var(--font-body)}@media (max-width:900px){._top_qk0c2_1{padding-right:52px}._panes_qk0c2_47{grid-template-columns:minmax(0,1fr);overflow-y:auto}._pane_qk0c2_47{overflow:visible}._pane_qk0c2_47+._pane_qk0c2_47{border-left:0;border-top:var(--hairline)}}._section_16tu7_1{border-bottom:var(--hairline)}._heading_16tu7_5{margin:0}._header_16tu7_9{background:var(--surface);width:100%;min-height:36px;color:var(--text);font-family:var(--font-body);text-align:left;cursor:pointer;border:0;align-items:center;gap:8px;padding:8px 12px;font-size:14px;font-weight:500;line-height:20px;display:flex}._header_16tu7_9:hover{background:var(--surface-hover)}._header_16tu7_9:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}._chevron_16tu7_36{color:var(--text-muted);flex:none}._title_16tu7_41{flex:none}._note_16tu7_45{color:var(--text-muted);font-weight:400}._right_16tu7_50{color:var(--text-muted);margin-left:auto;font-weight:400}._body_16tu7_56{border-top:var(--hairline)}._table_rhk4n_1{border-collapse:collapse;table-layout:fixed;width:100%}._table_rhk4n_1 tr+tr td{border-top:var(--hairline)}._check_rhk4n_11{border-right:var(--hairline);text-align:center;width:32px;padding:0}._cell_rhk4n_18{padding:0}._cell_rhk4n_18+._cell_rhk4n_18{border-left:var(--hairline)}._input_rhk4n_26{width:100%;height:32px;color:var(--text);font-family:var(--font-body);background:0 0;border:0;padding:0 8px;font-size:14px;display:block}._input_rhk4n_26::placeholder{color:var(--text-faint)}._input_rhk4n_26:read-only{color:var(--text-muted)}._input_rhk4n_26:focus{outline:2px solid var(--accent);outline-offset:-2px}._box_rhk4n_51{cursor:pointer;justify-content:center;align-items:center;width:32px;height:32px;display:inline-flex;position:relative}._box_rhk4n_51 input{opacity:0;width:1px;height:1px;position:absolute}._box_rhk4n_51 span{width:16px;height:16px;color:var(--text);border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._box_rhk4n_51 input:focus-visible+span{outline:2px solid var(--accent)}._editor_x7ojz_1{resize:vertical;background:var(--background);width:100%;color:var(--text);font-family:var(--font-mono);tab-size:2;border:0;padding:10px 12px;font-size:13px;line-height:19px;display:block}._editor_x7ojz_1:focus{outline:2px solid var(--accent);outline-offset:-2px}._summary_19jq9_1{border-bottom:var(--hairline);min-height:40px;color:var(--text);align-items:center;gap:8px;padding:0 12px;font-size:14px;display:flex}._status_19jq9_12{text-underline-offset:3px;text-decoration:underline}._dot_19jq9_17{border-radius:50%;width:7px;height:7px}._ok_19jq9_23{background:var(--method-post)}._bad_19jq9_27{background:var(--method-delete)}._note_19jq9_31{color:var(--method-delete);margin-left:auto;font-weight:500}._empty_sbxea_1{color:var(--text-muted);text-align:center;margin:0;padding:48px 24px;font-size:14px}._error_sbxea_9{color:var(--text-muted);padding:16px 12px;font-size:14px;line-height:20px}._error_sbxea_9 strong{color:var(--method-delete)}._error_sbxea_9 p{margin:6px 0 0}._headers_sbxea_24{margin:0;font-size:13px}._headerRow_sbxea_29{grid-template-columns:minmax(0,2fr) minmax(0,3fr);display:grid}._headerRow_sbxea_29+._headerRow_sbxea_29{border-top:var(--hairline)}._headerRow_sbxea_29 dt,._headerRow_sbxea_29 dd{overflow-wrap:anywhere;margin:0;padding:7px 12px}._headerRow_sbxea_29 dt{color:var(--text-muted);border-right:var(--hairline)}._views_sbxea_50{justify-content:flex-end;gap:2px;padding:6px 12px 0;display:flex}._view_sbxea_50{color:var(--text-muted);font-family:var(--font-body);cursor:pointer;background:0 0;border:0;border-radius:3px;padding:2px 8px;font-size:13px}._viewActive_sbxea_68{background:var(--surface);color:var(--text)}._body_sbxea_73{padding:8px 12px 12px}._raw_sbxea_77{font-family:var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:19px}._noBody_sbxea_86{color:var(--text-muted);margin:0;font-size:14px}._actions_6r90o_1{min-height:34px;color:var(--text);justify-content:flex-end;align-items:center;gap:6px;margin-bottom:11px;font-size:14px;display:flex}._actions_6r90o_1 svg{color:var(--text-muted)}@media (max-width:1100px){._actions_6r90o_1{min-height:0;margin-bottom:8px}}._server_b7pis_1{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 48px;padding:90px 0;display:grid}._endpoint_b7pis_9{flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px;font-size:14px;display:flex}._muted_b7pis_18{color:var(--text-muted);font-size:14px;line-height:20px}._error_b7pis_24{color:var(--method-delete);margin:0 0 8px;font-size:14px;line-height:20px}._auth_b7pis_31{border:var(--hairline);border-radius:8px;max-width:420px;margin:0 0 12px;overflow:hidden}._cards_b7pis_39{flex-direction:column;gap:16px;min-width:0;display:flex}._card_b7pis_39{border:var(--hairline);background:var(--surface);border-radius:8px}._cardTitle_b7pis_52{border-bottom:var(--hairline);padding:7px 12px;font-size:14px;font-weight:500;line-height:22px}._token_b7pis_60{background:var(--background);border-radius:0 0 8px 8px}._count_b7pis_65{color:var(--text-faint);margin-left:4px;font-weight:400}._list_b7pis_71{max-height:320px;margin:0;padding:10px 12px;font-size:13px;line-height:22px;list-style:none;overflow-y:auto}._list_b7pis_71 li{overflow-wrap:anywhere}._list_b7pis_71 a{text-decoration:none}._list_b7pis_71 a:hover{text-underline-offset:3px;text-decoration:underline}@media (max-width:1100px){._server_b7pis_1{grid-template-columns:minmax(0,1fr);padding:56px 0}}._list_1tiry_1{margin:0;padding:0;list-style:none}._item_1tiry_7{border-bottom:var(--hairline);padding:8px 12px 12px}._type_1tiry_12{color:var(--text-faint);margin-bottom:6px;font-size:12px}._text_1tiry_18{font-family:var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:19px}._image_1tiry_27{max-width:100%}._file_1tiry_31{flex-wrap:wrap;align-items:center;gap:8px;display:flex}._uri_1tiry_38{overflow-wrap:anywhere;font-size:13px}._meta_1tiry_43{color:var(--text-muted);margin:0;font-size:13px}._empty_1tiry_49{color:var(--text-muted);margin:0;padding:12px;font-size:14px}._frame_14sap_1{background:var(--background);border:0;width:100%;min-height:80px;display:block}._uri_14sap_9{border-top:var(--hairline);font-family:var(--font-mono);color:var(--text-faint);padding:6px 12px;font-size:12px}._log_14sap_17{border-top:var(--hairline);font-family:var(--font-mono);color:var(--text-muted);overflow-wrap:anywhere;margin:0;padding:6px 12px 10px;font-size:12px;line-height:18px;list-style:none}._note_14sap_29,._error_14sap_30{color:var(--text-muted);margin:0;padding:16px 12px;font-size:14px}._error_14sap_30{color:var(--method-delete)}._error_uzkha_1{border-bottom:var(--hairline);color:var(--method-delete);margin:0;padding:12px;font-size:14px;line-height:20px}._tabs_uzkha_10{border-bottom:var(--hairline);height:36px;padding:0 12px;display:flex}._body_uzkha_17{padding:8px 12px 12px}._empty_uzkha_21{color:var(--text-muted);margin:0;font-size:14px}._footer_1s0qh_1{border-top:var(--hairline);align-items:baseline;gap:12px;padding:6px 12px 10px;font-size:13px;line-height:18px;display:flex}._invalid_1s0qh_11{color:var(--method-delete);flex:1}._reset_1s0qh_16{color:var(--text-muted);font-family:var(--font-body);text-underline-offset:3px;cursor:pointer;background:0 0;border:0;flex:none;padding:0;font-size:13px;text-decoration:underline}._reset_1s0qh_16:hover{color:var(--text)}._pills_1wymm_1{flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:12px;display:flex}._view_1wymm_9{color:var(--text-faint);font-size:12px}._empty_1wymm_14{color:var(--text-muted);margin:0;padding:12px 0;font-size:14px}._models_jw02e_1{border-top:1px solid var(--hairline);max-width:760px;padding:72px 0}._title_jw02e_7{margin:0 0 24px;font-size:24px;font-weight:600}._model_jw02e_1{border:1px solid var(--border);border-radius:8px;margin-bottom:16px;scroll-margin-top:24px}._name_jw02e_20{border-bottom:1px solid var(--border);background:var(--surface);font-family:var(--font-mono);border-radius:8px 8px 0 0;margin:0;padding:10px 16px;font-size:14px;font-weight:600}._body_jw02e_31{padding:4px 16px 6px 34px}._app_11f9k_1{min-height:100vh}._sidebar_11f9k_5{z-index:20;width:var(--sidebar-width);border-right:var(--hairline);background:var(--background);flex-direction:column;display:flex;position:fixed;top:0;bottom:0;left:0}._mode_11f9k_18{padding:12px 12px 0}._content_11f9k_22>:first-child{border-top:0}._content_11f9k_22>:last-child{min-height:calc(100vh / var(--zoom,1))}._content_11f9k_22{margin-left:var(--sidebar-width);max-width:calc(var(--sidebar-width) + 1152px);padding:0 60px 120px}._topbar_11f9k_37,._backdrop_11f9k_41{display:none}._message_11f9k_45{max-width:560px;color:var(--text-muted);margin:80px auto;padding:0 24px;line-height:1.6}._message_11f9k_45 strong{color:var(--text)}@media (max-width:900px){._topbar_11f9k_37{z-index:30;border-bottom:var(--hairline);background:var(--background);align-items:center;gap:10px;height:52px;padding:0 12px;display:flex;position:sticky;top:0}._topbarTitle_11f9k_71{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}._menuButton_11f9k_78{width:36px;height:36px;color:var(--text);cursor:pointer;background:0 0;border:0;border-radius:3px;justify-content:center;align-items:center;display:inline-flex}._menuButton_11f9k_78:hover{background:var(--surface)}._sidebar_11f9k_5{width:288px;max-width:85%;transition:transform .2s;top:52px;transform:translate(-100%)}._sidebarOpen_11f9k_103{transform:none}._backdrop_11f9k_41{z-index:10;background:var(--overlay);display:block;position:fixed;inset:52px 0 0}._mode_11f9k_18{padding:12px 12px 0}._content_11f9k_22{margin-left:0;padding:0 28px 80px}._content_11f9k_22 section[id]{scroll-margin-top:52px}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--accent:#0082d0;--background:#fff;--surface:#f6f6f6;--surface-hover:#e7e7e7;--border:#dfdfdf;--hairline:.5px solid #dfdfdf;--text:#1b1b1b;--text-muted:#757575;--text-faint:#8e8e8e;--font-body:ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--required:#ff6605;--method-get:#0082d0;--method-post:#069061;--method-put:#ff6605;--method-patch:#edbe20;--method-delete:#ef0006;--method-tool:#7c3aed;--method-get-dark:#1ea7ff;--method-post-dark:#00b648;--method-put-dark:#ff8c3a;--method-patch-dark:#ffc93d;--method-delete-dark:#ff4d4f;--method-tool-dark:#b794ff;--endpoint-background:#1a1a1a;--endpoint-border:#2d2d2d;--endpoint-path:#a4a4a4;--endpoint-param:#e7e7e7;--json-string:#0082d0;--json-number:#069061;--json-literal:#ff6605;--json-punct:#757575;--button:#1b1b1b;--button-hover:#000;--button-text:#fff;--button-light:#fff;--button-light-hover:#f0f0f0;--button-light-text:#1a1a1a;--button-light-border:#0000001a;--overlay:#1b1b1b59;--shadow:#0000002e;--shadow-soft:#0000000f;--underline:#1b1b1b4d;--underline-muted:#75757580;--sidebar-width:288px}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--accent:#3aa0ff;--background:#141414;--surface:#1e1e1e;--surface-hover:#2a2a2a;--border:#363636;--hairline:.5px solid #3a3a3a;--text:#ececec;--text-muted:#a3a3a3;--text-faint:#7c7c7c;--required:#ff8c3a;--method-get:#1ea7ff;--method-post:#00b648;--method-put:#ff8c3a;--method-patch:#ffc93d;--method-delete:#ff4d4f;--method-tool:#b794ff;--endpoint-background:#0c0c0c;--endpoint-border:#303030;--json-string:#4fb3ff;--json-number:#3ccf7a;--json-literal:#ff9a4d;--json-punct:#9a9a9a;--button:#ececec;--button-hover:#fff;--button-text:#141414;--button-light:#2a2a2a;--button-light-hover:#333;--button-light-text:#ececec;--button-light-border:#ffffff1f;--overlay:#0009;--shadow:#00000080;--shadow-soft:#0000004d;--underline:#ececec4d;--underline-muted:#a3a3a380}html{-webkit-text-size-adjust:100%}body{background:var(--background);color:var(--text);font-family:var(--font-body);-webkit-font-smoothing:antialiased;margin:0;font-size:16px;line-height:1.15}a{color:inherit}code{font-family:var(--font-mono)}*,:before,:after{box-sizing:border-box}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function ee(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(t,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),typeof t==`function`&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return x(t,s,i,a,null)}function x(e,r,i,a,o){var s={type:e,props:r,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++n,__i:-1,__u:0};return o==null&&t.vnode!=null&&t.vnode(s),s}function S(e){return e.children}function te(e,t){this.props=e,this.context=t}function C(e,t){if(t==null)return e.__?C(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?C(e):null}function w(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=y({},n);o.__v=n.__v+1,t.vnode&&t.vnode(o),se(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??C(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,le(i,o,a),n.__e=n.__=null,o.__e!=r&&T(o)}}function T(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),T(e)}function E(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!D.__r++||i!=t.debounceRendering)&&((i=t.debounceRendering)||a)(D)}function D(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(o),e=r.shift(),t=r.length,w(e)}finally{r.length=D.__r=0}}function ne(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y=r&&r.__k||g,ee=t.length;for(c=O(n,t,y,c,ee),d=0;d<ee;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&y[p.__i]||h,p.__i=d,v=se(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&fe(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),4&p.__u?(c=re(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function O(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=x(null,o,null,null,null):v(o)?o=e.__k[a]=x(S,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=ie(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=C(s)),pe(s,s));return r}function re(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=re(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=C(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ie(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function ae(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function k(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ae(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ae(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(u,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[l]=r[l]:(n[l]=d,e.addEventListener(t,a?p:f,a)):e.removeEventListener(t,a?p:f,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function oe(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[c]==null)n[c]=d++;else if(n[c]<r[l])return;return r(t.event?t.event(n):n)}}}function se(e,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,_,b,x,w,T,E,D,O,re,ie,ae,k=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=n.__e=r.__e]),(d=t.__b)&&d(n);n:if(typeof k==`function`){f=s.length;try{if(w=n.props,T=k.prototype&&k.prototype.render,E=(d=k.contextType)&&i[d.__c],D=d?E?E.props.value:d.__:i,r.__c?x=(p=n.__c=r.__c).__=p.__E:(T?n.__c=p=new k(w,D):(n.__c=p=new te(w,D),p.constructor=k,p.render=me),E&&E.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),T&&p.__s==null&&(p.__s=p.state),T&&k.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,k.getDerivedStateFromProps(w,p.__s))),h=p.props,_=p.state,p.__v=n,m)T&&k.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),T&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(T&&k.getDerivedStateFromProps==null&&w!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(w,D),n.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(w,p.__s,D)){n.__v!=r.__v&&(p.props=w,p.state=p.__s,p.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),g.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=C(r);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(w,p.__s,D),T&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,_,b)})}if(p.context=D,p.props=w,p.__P=e,p.__e=!1,O=t.__r,re=0,T)p.state=p.__s,p.__d=!1,O&&O(n),d=p.render(p.props,p.state,p.context),g.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,O&&O(n),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++re<25);p.state=p.__s,p.getChildContext!=null&&(i=y(y({},i),p.getChildContext())),T&&!m&&p.getSnapshotBeforeUpdate!=null&&(b=p.getSnapshotBeforeUpdate(h,_)),ie=d!=null&&d.type===S&&d.key==null?ue(d.props.children):d,c=ne(e,v(ie)?ie:[ie],n,r,i,a,o,s,c,l,u),p.base=n.__e,n.__u&=-161,p.__h.length&&s.push(p),x&&(p.__E=p.__=null)}catch(e){if(s.length=f,n.__v=null,l||o!=null){if(e.then){for(n.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),n.__e=c}else if(o!=null)for(ae=o.length;ae--;)ee(o[ae])}else n.__e=r.__e;n.__k??=r.__k||[],e.then||ce(n),t.__e(e,n,r)}}else o==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):c=n.__e=de(r.__e,n,r,i,a,o,s,l,u);return(d=t.diffed)&&d(n),128&n.__u?void 0:c}function ce(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ce))}function le(e,n,r){for(var i=0;i<r.length;i++)fe(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function ue(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(ue):e.constructor===void 0?y({},e):null}function de(n,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,b=i.props||h,x=r.props,S=r.type;if(S==`svg`?o=`http://www.w3.org/2000/svg`:S==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!S&&(S?g.localName==S:g.nodeType==3)){n=g,s[d]=null;break}}if(n==null){if(S==null)return document.createTextNode(x);n=document.createElementNS(o,S,x.is&&x),l&&=(t.__m&&t.__m(r,s),!1),s=null}if(S==null)b===x||l&&n.data==x||(n.data=x);else{if(s=S==`textarea`&&x.defaultValue!=null?null:s&&e.call(n.childNodes),!l&&s!=null)for(b={},d=0;d<n.attributes.length;d++)b[(g=n.attributes[d]).name]=g.value;for(d in b)g=b[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in x||d==`value`&&`defaultValue`in x||d==`checked`&&`defaultChecked`in x||k(n,d,null,g,o);for(d in x)g=x[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||b[d]===g||k(n,d,g,b[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(p&&(n.innerHTML=``),ne(r.type==`template`?n.content:n,v(m)?m:[m],r,i,a,S==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&C(i,0),l,u),s!=null)for(d=s.length;d--;)ee(s[d]);l&&S!=`textarea`||(d=`value`,S==`progress`&&_==null?n.removeAttribute(`value`):_!=null&&(_!==n[d]||S==`progress`&&!_||S==`option`&&_!=b[d])&&k(n,d,_,b[d],o),d=`checked`,y!=null&&y!=n[d]&&k(n,d,y,b[d],o))}return n}function fe(e,n,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function pe(e,n,r){var i,a;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||fe(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&pe(i[a],n,r||typeof e.type!=`function`);r||ee(e.__e),e.__c=e.__=e.__e=void 0}function me(e,t,n){return this.constructor(e,n)}function he(n,r,i){var a,o,s,c;r==document&&(r=document.documentElement),t.__&&t.__(n,r),o=(a=typeof i==`function`)?null:i&&i.__k||r.__k,s=[],c=[],se(r,n=(!a&&i||r).__k=b(S,null,[n]),o||h,h,r.namespaceURI,!a&&i?[i]:o?null:r.firstChild?e.call(r.childNodes):null,s,!a&&i?i:o?o.__e:r.firstChild,a,c),le(s,n,c),n.props.children=null}function ge(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=g.slice,t={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},n=0,te.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),E(this))},te.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},te.prototype.render=S,r=[],a=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(e,t){return e.__v.__b-t.__v.__b},D.__r=0,s=Math.random().toString(8),c=`__d`+s,l=`__a`+s,u=/(PointerCapture)$|Capture$/i,d=0,f=oe(!1),p=oe(!0),m=0;var A,j,_e,ve,ye=0,be=[],M=t,xe=M.__b,Se=M.__r,Ce=M.diffed,we=M.__c,Te=M.unmount,Ee=M.__;function De(e,t){M.__h&&M.__h(j,e,ye||t),ye=0;var n=j.__H||(j.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function N(e){return ye=1,Oe(ze,e)}function Oe(e,t,n){var r=De(A++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ze(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=j,!j.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};j.__f=!0;var a=j.shouldComponentUpdate,o=j.componentWillUpdate;j.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},j.shouldComponentUpdate=i}return r.__N||r.__}function ke(e,t){var n=De(A++,3);!M.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,j.__H.__h.push(n))}function Ae(e){return ye=5,je(function(){return{current:e}},[])}function je(e,t){var n=De(A++,7);return Re(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Me(e){var t=j.context[e.__c],n=De(A++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(j)),t.props.value):e.__}function Ne(){for(var e;e=be.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ie),t.__h.some(Le),t.__h=[]}catch(n){t.__h=[],M.__e(n,e.__v)}}}M.__b=function(e){j=null,xe&&xe(e)},M.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ee&&Ee(e,t)},M.__r=function(e){Se&&Se(e),A=0;var t=(j=e.__c).__H;t&&(_e===j?(t.__h=[],j.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Ie),t.__h.some(Le),t.__h=[],A=0)),_e=j},M.diffed=function(e){Ce&&Ce(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(be.push(t)!==1&&ve===M.requestAnimationFrame||((ve=M.requestAnimationFrame)||Fe)(Ne)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),_e=j=null},M.__c=function(e,t){t.some(function(e){try{e.__h.some(Ie),e.__h=e.__h.filter(function(e){return!e.__||Le(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],M.__e(n,e.__v)}}),we&&we(e,t)},M.unmount=function(e){Te&&Te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Ie(e)}catch(e){t=e}}),n.__H=void 0,t&&M.__e(t,n.__v))};var Pe=typeof requestAnimationFrame==`function`;function Fe(e){var t,n=function(){clearTimeout(r),Pe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Pe&&(t=requestAnimationFrame(n))}function Ie(e){var t=j,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),j=t}function Le(e){var t=j;e.__c=e.__(),j=t}function Re(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ze(e,t){return typeof t==`function`?t(e):t}var Be=[`get`,`put`,`post`,`delete`,`options`,`head`,`patch`,`trace`],Ve=/^#\/components\/schemas\/([^/]+)$/;function He(e,t){if(typeof t!=`string`||!t.startsWith(`#/`))return;let n=e;for(let e of t.slice(2).split(`/`)){let t=decodeURIComponent(e).replace(/~1/g,`/`).replace(/~0/g,`~`);if(typeof n!=`object`||!n)return;n=n[t]}return n}function Ue(e){let t=typeof e==`string`&&e.match(Ve);return t?decodeURIComponent(t[1]):null}function We(e,t,n=new Set){if(!t||typeof t!=`object`||!t.$ref||n.has(t.$ref))return t;n.add(t.$ref);let{$ref:r,...i}=t,a=We(e,He(e,r),n);return a&&typeof a==`object`?{...a,...i}:i}function Ge(e){return String(e).trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`default`}function Ke(e){if(!e||typeof e!=`object`)return null;let t=e[`application/json`]?`application/json`:Object.keys(e)[0];return t?{contentType:t,schema:e[t]?.schema??null}:null}function qe(e,t,n){let r=new Map;for(let i of[...t.parameters||[],...n.parameters||[]]){let t=We(e,i);t?.name&&t.in&&r.set(`${t.in}:${t.name}`,{name:t.name,in:t.in,required:t.in===`path`||!!t.required,description:t.description||``,schema:t.schema||{}})}let i={path:[],query:[],header:[],cookie:[]};for(let e of r.values())i[e.in]?.push(e);return i}function Je(e,t){let n=We(e,t.requestBody),r=n&&Ke(n.content);return r?{...r,required:!!n.required,description:n.description||``}:null}function Ye(e,t){return Object.entries(t.responses||{}).map(([t,n])=>{let r=We(e,n)||{},i=Ke(r.content);return{status:t,description:r.description||``,contentType:i?.contentType??null,schema:i?.schema??null}})}function Xe(e,t){return(t.security??e.security??[]).some(e=>e&&Object.keys(e).length>0)}function Ze(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`The document is not a JSON object.`);if(!e.openapi&&!e.swagger)throw Error(`The document has no "openapi" version field.`);if(e.paths&&typeof e.paths!=`object`)throw Error(`"paths" must be an object.`);let t=[];for(let[n,r]of Object.entries(e.paths||{}))if(r&&typeof r==`object`)for(let i of Object.keys(r).filter(e=>Be.includes(e))){let a=r[i];a&&typeof a==`object`&&t.push({method:i.toUpperCase(),path:n,tag:Array.isArray(a.tags)&&a.tags[0]?String(a.tags[0]):null,summary:a.summary||``,description:a.description||``,auth:Xe(e,a),params:qe(e,r,a),body:Je(e,a),responses:Ye(e,a)})}let n=new Map((e.tags||[]).filter(e=>e?.name).map(e=>[e.name,e])),r=[...n.keys()];for(let e of t)e.tag&&!r.includes(e.tag)&&r.push(e.tag);let i=r.map(e=>({name:e,id:`tag/${Ge(e)}`,description:n.get(e)?.description||``,operations:t.filter(t=>t.tag===e)})).filter(e=>e.operations.length);for(let e of t)e.id=e.tag?`tag/${Ge(e.tag)}/${e.method}${e.path}`:`operation/${e.method}${e.path}`,e.label=e.summary||`${e.method} ${e.path}`;let a=Object.entries(e.components?.schemas||{}).map(([e,t])=>({name:e,id:`model/${e}`,schema:t}));return{info:{title:e.info?.title||`API`,version:e.info?.version||``,description:e.info?.description||``},openapi:String(e.openapi||e.swagger),untagged:t.filter(e=>!e.tag),groups:i,models:a,operations:t}}var Qe=ge({}),$e=ge({base:``,token:``,setToken:()=>{}});function et(e,t){if(!t||typeof t!=`object`||!t.$ref)return{schema:t||{},model:null};let{$ref:n,...r}=t;return{schema:{...He(e,n)||{},...r},model:Ue(n)}}function tt(e,t){if(!Array.isArray(t?.allOf))return t;let{allOf:n,...r}=t,i={...r,properties:{...r.properties},required:[...r.required||[]]};for(let t of n){let n=tt(e,et(e,t).schema);Object.assign(i.properties,n.properties),i.required.push(...n.required||[]),!i.type&&n.type&&(i.type=n.type),!i.description&&n.description&&(i.description=n.description)}return Object.keys(i.properties).length||delete i.properties,i.required.length||delete i.required,i}function nt(e){let t=Array.isArray(e.type)?e.type:e.type?[e.type]:[],n=t.filter(e=>e!==`null`).join(` | `);return!n&&e.properties&&(n=`object`),!n&&e.items&&(n=`array`),!n&&e.enum&&(n=typeof e.enum[0]),{type:n,nullable:t.includes(`null`)||e.nullable===!0}}function rt(e){let t=[],n=(n,r)=>e[n]!==void 0&&t.push(`${r}: ${e[n]}`);return n(`minLength`,`min length`),n(`maxLength`,`max length`),n(`minimum`,`min`),n(`maximum`,`max`),n(`exclusiveMinimum`,`greater than`),n(`exclusiveMaximum`,`less than`),n(`minItems`,`min items`),n(`maxItems`,`max items`),n(`minProperties`,`min properties`),n(`maxProperties`,`max properties`),n(`pattern`,`pattern`),e.default!==void 0&&t.push(`default: ${JSON.stringify(e.default)}`),t}function it(e){if(Array.isArray(e.examples)&&e.examples.length)return e.examples[0];if(e.example!==void 0)return e.example}function at(e,t,n=new Set){let{schema:r,model:i}=et(e,t),a=tt(e,r),{type:o,nullable:s}=nt(a),c=!!i&&n.has(i),l=null;if(o===`array`&&a.items){let t=et(e,a.items);l={model:t.model,schema:tt(e,t.schema)}}let u=l?.schema.properties?l.schema:a.properties?a:null,d=a.oneOf||a.anyOf||null,f=l?.model||i,p=f?new Set([...n,f]):n;return{schema:a,model:i,type:o,nullable:s,items:l,inner:c?null:u,variants:c?null:d,nextSeen:p}}function ot(e){let{schema:t,nullable:n}=e,r=[];return t.format&&r.push(t.format),n&&r.push(`nullable`),r.push(...rt(t)),Array.isArray(t.enum)&&r.push(`enum: ${t.enum.map(e=>JSON.stringify(e)).join(`, `)}`),r}function st(e){let t=Object.keys(e?.properties||{});return t.length?`{ ${t.slice(0,4).join(`, `)}${t.length>4?`, …`:``} }`:``}var ct={"date-time":`2026-01-01T00:00:00Z`,date:`2026-01-01`,time:`00:00:00Z`,email:`user@example.com`,uri:`https://example.com`,url:`https://example.com`,uuid:`123e4567-e89b-12d3-a456-426614174000`,ipv4:`127.0.0.1`,ipv6:`::1`,hostname:`example.com`},lt=8;function P(e,t,n=0,r=new Set){let{schema:i,model:a}=et(e,t);if(a&&r.has(a))return{};let o=a?new Set([...r,a]):r,s=tt(e,i),c=it(s);if(c!==void 0)return c;if(s.default!==void 0)return s.default;if(s.const!==void 0)return s.const;if(Array.isArray(s.enum)&&s.enum.length)return s.enum[0];let l=s.oneOf||s.anyOf;if(Array.isArray(l)&&l.length)return P(e,l[0],n,o);if(n>lt)return null;let{type:u}=nt(s);if(u===`object`||s.properties){let t={};for(let[r,i]of Object.entries(s.properties||{}))t[r]=P(e,i,n+1,o);return t}return u===`array`?s.items?[P(e,s.items,n+1,o)]:[]:u===`string`?ct[s.format]??``:u===`integer`||u===`number`?s.minimum??1:u===`boolean`||null}function ut(e,t){let n=e.servers?.[0]?.url;return(n?new URL(n,t).href:new URL(t).origin).replace(/\/+$/,``)}function dt(e){return e==null?``:typeof e==`string`?e:JSON.stringify(e)}function ft(e,t){let n=(t,n)=>({key:t.name,value:dt(P(e,t.schema)),enabled:n}),r=[{key:`accept`,value:`application/json`,enabled:!0}];t.body&&r.push({key:`content-type`,value:t.body.contentType,enabled:!0}),r.push(...t.params.header.map(e=>n(e,e.required)));let i=t.body?t.body.contentType.includes(`json`)?JSON.stringify(P(e,t.body.schema),null,2):dt(P(e,t.body.schema)):null;return{path:t.params.path.map(e=>n(e,!0)),query:t.params.query.map(e=>n(e,e.required)),headers:r,body:i}}function pt(e,t,n,r){let i=Object.fromEntries(n.map(e=>[e.key,e.value])),a=t.replace(/\{([^}]+)\}/g,(e,t)=>i[t]?encodeURIComponent(i[t]):e),o=new URLSearchParams;for(let e of r)e.enabled&&e.key&&o.append(e.key,e.value);let s=o.toString();return e+a+(s?`?${s}`:``)}function mt({op:e,base:t,inputs:n,token:r}){let i=n.headers.filter(e=>e.enabled&&e.key).map(e=>[e.key,e.value]),a=i.some(([e])=>e.toLowerCase()===`authorization`);e.auth&&r&&!a&&i.push([`authorization`,`Bearer ${r}`]);let o=n.body!==null&&![`GET`,`HEAD`].includes(e.method);return{method:e.method,url:pt(t,e.path,n.path,n.query),headers:i,body:o?n.body:void 0}}function ht(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function gt(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return null}}var _t={200:`OK`,201:`Created`,202:`Accepted`,204:`No Content`,301:`Moved Permanently`,302:`Found`,304:`Not Modified`,400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,413:`Payload Too Large`,415:`Unsupported Media Type`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`};function vt(e,t){return t||_t[e]||``}var yt=`maxserver-docs:token`;function bt(){try{return localStorage.getItem(yt)||``}catch{return``}}function xt(){let[e,t]=N(bt);return[e,e=>{t(e);try{e?localStorage.setItem(yt,e):localStorage.removeItem(yt)}catch{}}]}var St=`maxserver-docs:specs`,Ct=5;function wt(e=globalThis.localStorage){try{let t=JSON.parse(e.getItem(St)||`[]`);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function Tt(e,t=globalThis.localStorage){try{let n=[e,...wt(t).filter(t=>t!==e)].slice(0,Ct);t.setItem(St,JSON.stringify(n))}catch{}}var Et={bar:`_bar_18yta_1`,input:`_input_18yta_5`},Dt=0;Array.isArray;function F(e,n,r,i,a,o){n||={};var s,c,l=n;if(`ref`in l)for(c in l={},n)c==`ref`?s=n[c]:l[c]=n[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Dt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return t.vnode&&t.vnode(u),u}function Ot({url:e}){return F(`form`,{class:Et.bar,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`spec`).trim();t&&location.assign(`?spec=${encodeURIComponent(t)}`)},children:[F(`input`,{class:Et.input,name:`spec`,type:`url`,defaultValue:e,list:`maxserver-docs-recent-specs`,"aria-label":`OpenAPI spec URL`,placeholder:`https://…/openapi.json`,spellcheck:!1}),F(`datalist`,{id:`maxserver-docs-recent-specs`,children:wt().map(e=>F(`option`,{value:e},e))})]})}var kt=120;function At(e){let[t,n]=N(()=>decodeURIComponent(location.hash.slice(1))||`introduction`);return ke(()=>{if(!e)return;let t=decodeURIComponent(location.hash.slice(1));t&&document.getElementById(t)?.scrollIntoView({behavior:`instant`,block:`start`});let r=[...document.querySelectorAll(`[data-anchor]`)],i=0,a=()=>{i=0;let e=r[0]?.id;for(let t of r)if(t.getBoundingClientRect().top-kt<=0)e=t.id;else break;e&&(n(e),decodeURIComponent(location.hash.slice(1))!==e&&history.replaceState(null,``,`#${e}`))},o=()=>{i||=requestAnimationFrame(a)};return addEventListener(`scroll`,o,{passive:!0}),()=>{removeEventListener(`scroll`,o),cancelAnimationFrame(i)}},[e]),t}var jt={plus:`M8 3v10M3 8h10`,minus:`M3 8h10`,chevronRight:`M6 3l5 5-5 5`,chevronDown:`M3 6l5 5 5-5`,lock:`M4.5 7V5a3.5 3.5 0 0 1 7 0v2M3.5 7h9v6.5h-9z`,copy:`M5.5 5.5h7v7h-7zM3.5 10.5v-7h7`,check:`M3 8.5l3 3 7-7`,menu:`M2.5 4h11M2.5 8h11M2.5 12h11`,close:`M4 4l8 8M12 4l-8 8`,download:`M8 2.5v8M4.5 7L8 10.5 11.5 7M3 13.5h10`,play:`M5 3.5v9l7-4.5z`,eye:`M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z`,eyeOff:`M2 2l12 12M6.5 4a6.6 6.6 0 0 1 1.5-.5c4 0 6.5 4.5 6.5 4.5a11 11 0 0 1-1.7 2.2M10 12.1a6.3 6.3 0 0 1-2 .4c-4 0-6.5-4.5-6.5-4.5a11 11 0 0 1 2.4-2.8`};function I({name:e,size:t=16,class:n}){return F(`svg`,{class:n,width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:F(`path`,{d:jt[e]})})}var Mt={badge:`_badge_687h8_1`,short:`_short_687h8_8`,get:`_get_687h8_15`,post:`_post_687h8_16`,put:`_put_687h8_17`,patch:`_patch_687h8_18`,delete:`_delete_687h8_19`,dark:`_dark_687h8_21`},Nt={DELETE:`DEL`,OPTIONS:`OPT`};function Pt({method:e,short:t=!1,dark:n=!1}){let r=e.toUpperCase();return F(`span`,{class:`${Mt.badge} ${Mt[r.toLowerCase()]||``} ${n?Mt.dark:``} ${t?Mt.short:``}`,children:t&&Nt[r]||r})}var L={group:`_group_313i3_1`,header:`_header_313i3_7`,chevron:`_chevron_313i3_34`,items:`_items_313i3_38`,item:`_item_313i3_38`,active:`_active_313i3_75`,label:`_label_313i3_81`};function Ft({title:e,items:t,open:n,onToggle:r,activeId:i,onNavigate:a}){return F(`li`,{class:L.group,children:[F(`button`,{type:`button`,class:L.header,"aria-expanded":n,onClick:r,children:[F(`span`,{children:e}),F(I,{name:n?`chevronDown`:`chevronRight`,size:14,class:L.chevron})]}),n&&F(`ul`,{class:L.items,children:t.map(e=>F(`li`,{children:F(`a`,{href:`#${e.id}`,onClick:a,class:`${L.item} ${e.id===i?L.active:``}`,"aria-current":e.id===i?`location`:void 0,children:[F(`span`,{class:L.label,children:e.label}),e.method&&F(Pt,{method:e.method,short:!0})]})},e.id))})]})}var It={sidebar:`_sidebar_oqs2u_1`,list:`_list_oqs2u_8`,link:`_link_oqs2u_17`,active:`_active_oqs2u_35`,label:`_label_oqs2u_41`};function Lt({model:e,activeId:t,onNavigate:n}){let[r,i]=N(()=>new Set),a=t?.startsWith(`model/`)?`models`:e.groups.find(e=>t===e.id||t?.startsWith(`${e.id}/`))?.id;ke(()=>{a&&!r.has(a)&&i(new Set([...r,a]))},[a]);let o=e=>{let t=new Set(r);t.has(e)?t.delete(e):t.add(e),i(t)},s=(e,r,i)=>F(`li`,{children:F(`a`,{href:`#${e}`,onClick:n,class:`${It.link} ${e===t?It.active:``}`,"aria-current":e===t?`location`:void 0,children:[F(`span`,{class:It.label,children:r}),i&&F(Pt,{method:i,short:!0})]})},e);return F(`nav`,{class:It.sidebar,"aria-label":`API reference`,children:F(`ul`,{class:It.list,children:[s(`introduction`,`Introduction`),e.untagged.map(e=>s(e.id,e.label,e.method)),e.groups.map(e=>F(Ft,{title:e.name,open:r.has(e.id),onToggle:()=>o(e.id),items:e.operations.map(e=>({id:e.id,label:e.label,method:e.method})),activeId:t,onNavigate:n},e.id)),e.models.length>0&&F(Ft,{title:`Models`,open:r.has(`models`),onToggle:()=>o(`models`),items:e.models.map(e=>({id:e.id,label:e.name})),activeId:t,onNavigate:n})]})})}var Rt=/^(https?:|mailto:|#|\/|\.{0,2}\/|[^:]*$)/i;function zt(e){let t=String(e).trim();return Rt.test(t)?t:null}function R(e){let t=[],n=/`([^`]+)`|\*\*([^*]+)\*\*|\*([^*]+)\*|\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<)]+)|([\w.+-]+@[\w-]+\.[\w.-]*\w)/g,r=0,i;for(;i=n.exec(e);){if(i.index>r&&t.push({type:`text`,text:e.slice(r,i.index)}),i[1]!==void 0)t.push({type:`code`,text:i[1]});else if(i[2]!==void 0)t.push({type:`strong`,children:R(i[2])});else if(i[3]!==void 0)t.push({type:`em`,children:R(i[3])});else if(i[4]!==void 0){let e=zt(i[5]);t.push(e?{type:`link`,href:e,children:R(i[4])}:{type:`text`,text:i[4]})}else i[6]===void 0?t.push({type:`link`,href:`mailto:${i[7]}`,children:[{type:`text`,text:i[7]}]}):t.push({type:`link`,href:i[6],children:[{type:`text`,text:i[6]}]});r=n.lastIndex}return r<e.length&&t.push({type:`text`,text:e.slice(r)}),t}function Bt(e){let t=String(e||``).replace(/\r\n?/g,`
|
|
1
|
+
var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h={},g=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function y(e,t){for(var n in t)e[n]=t[n];return e}function ee(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function b(t,n,r){var i,a,o,s={};for(o in n)o==`key`?i=n[o]:o==`ref`?a=n[o]:s[o]=n[o];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),typeof t==`function`&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return x(t,s,i,a,null)}function x(e,r,i,a,o){var s={type:e,props:r,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++n,__i:-1,__u:0};return o==null&&t.vnode!=null&&t.vnode(s),s}function S(e){return e.children}function te(e,t){this.props=e,this.context=t}function C(e,t){if(t==null)return e.__?C(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?C(e):null}function w(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,i=[],a=[],o=y({},n);o.__v=n.__v+1,t.vnode&&t.vnode(o),ce(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,r??C(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,ue(i,o,a),n.__e=n.__=null,o.__e!=r&&T(o)}}function T(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),T(e)}function E(e){(!e.__d&&(e.__d=!0)&&r.push(e)&&!D.__r++||i!=t.debounceRendering)&&((i=t.debounceRendering)||a)(D)}function D(){try{for(var e,t=1;r.length;)r.length>t&&r.sort(o),e=r.shift(),t=r.length,w(e)}finally{r.length=D.__r=0}}function ne(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,_,v,y=r&&r.__k||g,ee=t.length;for(c=re(n,t,y,c,ee),d=0;d<ee;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&y[p.__i]||h,p.__i=d,v=ce(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&pe(f.ref,null,p),u.push(p.ref,p.__c||m,p)),_==null&&m!=null&&(_=m),4&p.__u?(c=ie(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&v!==void 0?c=v:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=_,c}function re(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=x(null,o,null,null,null):v(o)?o=e.__k[a]=x(S,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=ae(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=C(s)),me(s,s));return r}function ie(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=ie(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=C(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ae(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function oe(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||_.test(t)?n:n+`px`}function O(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||oe(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||oe(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(u,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[l]=r[l]:(n[l]=d,e.addEventListener(t,a?p:f,a)):e.removeEventListener(t,a?p:f,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function se(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[c]==null)n[c]=d++;else if(n[c]<r[l])return;return r(t.event?t.event(n):n)}}}function ce(e,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,_,b,x,w,T,E,D,re,ie,ae,oe,O=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[c=n.__e=r.__e]),(d=t.__b)&&d(n);n:if(typeof O==`function`){f=s.length;try{if(w=n.props,T=O.prototype&&O.prototype.render,E=(d=O.contextType)&&i[d.__c],D=d?E?E.props.value:d.__:i,r.__c?x=(p=n.__c=r.__c).__=p.__E:(T?n.__c=p=new O(w,D):(n.__c=p=new te(w,D),p.constructor=O,p.render=he),E&&E.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),T&&p.__s==null&&(p.__s=p.state),T&&O.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,O.getDerivedStateFromProps(w,p.__s))),h=p.props,_=p.state,p.__v=n,m)T&&O.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),T&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(T&&O.getDerivedStateFromProps==null&&w!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(w,D),n.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(w,p.__s,D)){n.__v!=r.__v&&(p.props=w,p.state=p.__s,p.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(e){e&&(e.__=n)}),g.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=C(r);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(w,p.__s,D),T&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,_,b)})}if(p.context=D,p.props=w,p.__P=e,p.__e=!1,re=t.__r,ie=0,T)p.state=p.__s,p.__d=!1,re&&re(n),d=p.render(p.props,p.state,p.context),g.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,re&&re(n),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++ie<25);p.state=p.__s,p.getChildContext!=null&&(i=y(y({},i),p.getChildContext())),T&&!m&&p.getSnapshotBeforeUpdate!=null&&(b=p.getSnapshotBeforeUpdate(h,_)),ae=d!=null&&d.type===S&&d.key==null?de(d.props.children):d,c=ne(e,v(ae)?ae:[ae],n,r,i,a,o,s,c,l,u),p.base=n.__e,n.__u&=-161,p.__h.length&&s.push(p),x&&(p.__E=p.__=null)}catch(e){if(s.length=f,n.__v=null,l||o!=null){if(e.then){for(n.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),n.__e=c}else if(o!=null)for(oe=o.length;oe--;)ee(o[oe])}else n.__e=r.__e;n.__k??=r.__k||[],e.then||le(n),t.__e(e,n,r)}}else o==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):c=n.__e=fe(r.__e,n,r,i,a,o,s,l,u);return(d=t.diffed)&&d(n),128&n.__u?void 0:c}function le(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(le))}function ue(e,n,r){for(var i=0;i<r.length;i++)pe(r[i],r[++i],r[++i]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function de(e){return typeof e!=`object`||!e||e.__b>0?e:v(e)?e.map(de):e.constructor===void 0?y({},e):null}function fe(n,r,i,a,o,s,c,l,u){var d,f,p,m,g,_,y,b=i.props||h,x=r.props,S=r.type;if(S==`svg`?o=`http://www.w3.org/2000/svg`:S==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((g=s[d])&&`setAttribute`in g==!!S&&(S?g.localName==S:g.nodeType==3)){n=g,s[d]=null;break}}if(n==null){if(S==null)return document.createTextNode(x);n=document.createElementNS(o,S,x.is&&x),l&&=(t.__m&&t.__m(r,s),!1),s=null}if(S==null)b===x||l&&n.data==x||(n.data=x);else{if(s=S==`textarea`&&x.defaultValue!=null?null:s&&e.call(n.childNodes),!l&&s!=null)for(b={},d=0;d<n.attributes.length;d++)b[(g=n.attributes[d]).name]=g.value;for(d in b)g=b[d],d==`dangerouslySetInnerHTML`?p=g:d==`children`||d in x||d==`value`&&`defaultValue`in x||d==`checked`&&`defaultChecked`in x||O(n,d,null,g,o);for(d in x)g=x[d],d==`children`?m=g:d==`dangerouslySetInnerHTML`?f=g:d==`value`?_=g:d==`checked`?y=g:l&&typeof g!=`function`||b[d]===g||O(n,d,g,b[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(p&&(n.innerHTML=``),ne(r.type==`template`?n.content:n,v(m)?m:[m],r,i,a,S==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&C(i,0),l,u),s!=null)for(d=s.length;d--;)ee(s[d]);l&&S!=`textarea`||(d=`value`,S==`progress`&&_==null?n.removeAttribute(`value`):_!=null&&(_!==n[d]||S==`progress`&&!_||S==`option`&&_!=b[d])&&O(n,d,_,b[d],o),d=`checked`,y!=null&&y!=n[d]&&O(n,d,y,b[d],o))}return n}function pe(e,n,r){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&n==null||(e.__u=e(n))}else e.current=n}catch(e){t.__e(e,r)}}function me(e,n,r){var i,a;if(t.unmount&&t.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||pe(i,null,n)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){t.__e(e,n)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&me(i[a],n,r||typeof e.type!=`function`);r||ee(e.__e),e.__c=e.__=e.__e=void 0}function he(e,t,n){return this.constructor(e,n)}function ge(n,r,i){var a,o,s,c;r==document&&(r=document.documentElement),t.__&&t.__(n,r),o=(a=typeof i==`function`)?null:i&&i.__k||r.__k,s=[],c=[],ce(r,n=(!a&&i||r).__k=b(S,null,[n]),o||h,h,r.namespaceURI,!a&&i?[i]:o?null:r.firstChild?e.call(r.childNodes):null,s,!a&&i?i:o?o.__e:r.firstChild,a,c),ue(s,n,c),n.props.children=null}function _e(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,E(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=g.slice,t={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},n=0,te.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=y({},this.state);typeof e==`function`&&(e=e(y({},n),this.props)),e&&y(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),E(this))},te.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},te.prototype.render=S,r=[],a=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(e,t){return e.__v.__b-t.__v.__b},D.__r=0,s=Math.random().toString(8),c=`__d`+s,l=`__a`+s,u=/(PointerCapture)$|Capture$/i,d=0,f=se(!1),p=se(!0),m=0;var k,A,ve,ye,be=0,xe=[],j=t,Se=j.__b,Ce=j.__r,we=j.diffed,Te=j.__c,Ee=j.unmount,De=j.__;function Oe(e,t){j.__h&&j.__h(A,e,be||t),be=0;var n=A.__H||(A.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function M(e){return be=1,ke(ze,e)}function ke(e,t,n){var r=Oe(k++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ze(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=A,!A.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};A.__f=!0;var a=A.shouldComponentUpdate,o=A.componentWillUpdate;A.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},A.shouldComponentUpdate=i}return r.__N||r.__}function N(e,t){var n=Oe(k++,3);!j.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,A.__H.__h.push(n))}function Ae(e,t){var n=Oe(k++,4);!j.__s&&Re(n.__H,t)&&(n.__=e,n.u=t,A.__h.push(n))}function je(e){return be=5,Me(function(){return{current:e}},[])}function Me(e,t){var n=Oe(k++,7);return Re(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function P(e){var t=A.context[e.__c],n=Oe(k++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(A)),t.props.value):e.__}function Ne(){for(var e;e=xe.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ie),t.__h.some(Le),t.__h=[]}catch(n){t.__h=[],j.__e(n,e.__v)}}}j.__b=function(e){A=null,Se&&Se(e)},j.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),De&&De(e,t)},j.__r=function(e){Ce&&Ce(e),k=0;var t=(A=e.__c).__H;t&&(ve===A?(t.__h=[],A.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Ie),t.__h.some(Le),t.__h=[],k=0)),ve=A},j.diffed=function(e){we&&we(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xe.push(t)!==1&&ye===j.requestAnimationFrame||((ye=j.requestAnimationFrame)||Fe)(Ne)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),ve=A=null},j.__c=function(e,t){t.some(function(e){try{e.__h.some(Ie),e.__h=e.__h.filter(function(e){return!e.__||Le(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],j.__e(n,e.__v)}}),Te&&Te(e,t)},j.unmount=function(e){Ee&&Ee(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Ie(e)}catch(e){t=e}}),n.__H=void 0,t&&j.__e(t,n.__v))};var Pe=typeof requestAnimationFrame==`function`;function Fe(e){var t,n=function(){clearTimeout(r),Pe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Pe&&(t=requestAnimationFrame(n))}function Ie(e){var t=A,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),A=t}function Le(e){var t=A;e.__c=e.__(),A=t}function Re(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ze(e,t){return typeof t==`function`?t(e):t}var Be=/^#\/components\/schemas\/([^/]+)$/;function Ve(e,t){if(typeof t!=`string`||!t.startsWith(`#/`))return;let n=e;for(let e of t.slice(2).split(`/`)){let t=decodeURIComponent(e).replace(/~1/g,`/`).replace(/~0/g,`~`);if(typeof n!=`object`||!n)return;n=n[t]}return n}function He(e){let t=typeof e==`string`&&e.match(Be);return t?decodeURIComponent(t[1]):null}function Ue(e,t){if(!t||typeof t!=`object`||!t.$ref)return{schema:t||{},model:null};let{$ref:n,...r}=t;return{schema:{...Ve(e,n)||{},...r},model:He(n)}}function We(e,t){if(!Array.isArray(t?.allOf))return t;let{allOf:n,...r}=t,i={...r,properties:{...r.properties},required:[...r.required||[]]};for(let t of n){let n=We(e,Ue(e,t).schema);Object.assign(i.properties,n.properties),i.required.push(...n.required||[]),!i.type&&n.type&&(i.type=n.type),!i.description&&n.description&&(i.description=n.description)}return Object.keys(i.properties).length||delete i.properties,i.required.length||delete i.required,i}function Ge(e){let t=Array.isArray(e.type)?e.type:e.type?[e.type]:[],n=t.filter(e=>e!==`null`).join(` | `);return!n&&e.properties&&(n=`object`),!n&&e.items&&(n=`array`),!n&&e.enum&&(n=typeof e.enum[0]),{type:n,nullable:t.includes(`null`)||e.nullable===!0}}function Ke(e){let t=[],n=(n,r)=>e[n]!==void 0&&t.push(`${r}: ${e[n]}`);return n(`minLength`,`min length`),n(`maxLength`,`max length`),n(`minimum`,`min`),n(`maximum`,`max`),n(`exclusiveMinimum`,`greater than`),n(`exclusiveMaximum`,`less than`),n(`minItems`,`min items`),n(`maxItems`,`max items`),n(`minProperties`,`min properties`),n(`maxProperties`,`max properties`),n(`pattern`,`pattern`),e.default!==void 0&&t.push(`default: ${JSON.stringify(e.default)}`),t}function qe(e){if(Array.isArray(e.examples)&&e.examples.length)return e.examples[0];if(e.example!==void 0)return e.example}function Je(e,t,n=new Set){let{schema:r,model:i}=Ue(e,t),a=We(e,r),{type:o,nullable:s}=Ge(a),c=!!i&&n.has(i),l=null;if(o===`array`&&a.items){let t=Ue(e,a.items);l={model:t.model,schema:We(e,t.schema)}}let u=l?.schema.properties?l.schema:a.properties?a:null,d=a.oneOf||a.anyOf||null,f=l?.model||i,p=f?new Set([...n,f]):n;return{schema:a,model:i,type:o,nullable:s,items:l,inner:c?null:u,variants:c?null:d,nextSeen:p}}function Ye(e){let{schema:t,nullable:n}=e,r=[];return t.format&&r.push(t.format),n&&r.push(`nullable`),r.push(...Ke(t)),Array.isArray(t.enum)&&r.push(`enum: ${t.enum.map(e=>JSON.stringify(e)).join(`, `)}`),r}function Xe(e){let t=Object.keys(e?.properties||{});return t.length?`{ ${t.slice(0,4).join(`, `)}${t.length>4?`, …`:``} }`:``}function Ze(e){return String(e).trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`default`}var Qe=[`get`,`put`,`post`,`delete`,`options`,`head`,`patch`,`trace`];function $e(e,t,n=new Set){if(!t||typeof t!=`object`||!t.$ref||n.has(t.$ref))return t;n.add(t.$ref);let{$ref:r,...i}=t,a=$e(e,Ve(e,r),n);return a&&typeof a==`object`?{...a,...i}:i}function et(e){if(!e||typeof e!=`object`)return null;let t=e[`application/json`]?`application/json`:Object.keys(e)[0];return t?{contentType:t,schema:e[t]?.schema??null}:null}function tt(e,t,n){let r=new Map;for(let i of[...t.parameters||[],...n.parameters||[]]){let t=$e(e,i);t?.name&&t.in&&r.set(`${t.in}:${t.name}`,{name:t.name,in:t.in,required:t.in===`path`||!!t.required,description:t.description||``,schema:t.schema||{}})}let i={path:[],query:[],header:[],cookie:[]};for(let e of r.values())i[e.in]?.push(e);return i}function nt(e,t){let n=$e(e,t.requestBody),r=n&&et(n.content);return r?{...r,required:!!n.required,description:n.description||``}:null}function rt(e,t){return Object.entries(t.responses||{}).map(([t,n])=>{let r=$e(e,n)||{},i=et(r.content);return{status:t,description:r.description||``,contentType:i?.contentType??null,schema:i?.schema??null}})}function it(e,t){return(t.security??e.security??[]).some(e=>e&&Object.keys(e).length>0)}function at(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`The document is not a JSON object.`);if(!e.openapi&&!e.swagger)throw Error(`The document has no "openapi" version field.`);if(e.paths&&typeof e.paths!=`object`)throw Error(`"paths" must be an object.`);let t=[];for(let[n,r]of Object.entries(e.paths||{}))if(r&&typeof r==`object`)for(let i of Object.keys(r).filter(e=>Qe.includes(e))){let a=r[i];a&&typeof a==`object`&&t.push({method:i.toUpperCase(),path:n,tag:Array.isArray(a.tags)&&a.tags[0]?String(a.tags[0]):null,summary:a.summary||``,description:a.description||``,auth:it(e,a),params:tt(e,r,a),body:nt(e,a),responses:rt(e,a)})}let n=new Map((e.tags||[]).filter(e=>e?.name).map(e=>[e.name,e])),r=[...n.keys()];for(let e of t)e.tag&&!r.includes(e.tag)&&r.push(e.tag);let i=r.map(e=>({name:e,id:`tag/${Ze(e)}`,description:n.get(e)?.description||``,operations:t.filter(t=>t.tag===e)})).filter(e=>e.operations.length);for(let e of t)e.id=e.tag?`tag/${Ze(e.tag)}/${e.method}${e.path}`:`operation/${e.method}${e.path}`,e.label=e.summary||`${e.method} ${e.path}`;let a=Object.entries(e.components?.schemas||{}).map(([e,t])=>({name:e,id:`model/${e}`,schema:t}));return{info:{title:e.info?.title||`API`,version:e.info?.version||``,description:e.info?.description||``},openapi:String(e.openapi||e.swagger),untagged:t.filter(e=>!e.tag),groups:i,models:a,operations:t}}var ot=_e({}),st=_e({base:``,token:``,setToken:()=>{}}),ct=_e(`light`),lt={"date-time":`2026-01-01T00:00:00Z`,date:`2026-01-01`,time:`00:00:00Z`,email:`user@example.com`,uri:`https://example.com`,url:`https://example.com`,uuid:`123e4567-e89b-12d3-a456-426614174000`,ipv4:`127.0.0.1`,ipv6:`::1`,hostname:`example.com`},ut=8;function F(e,t,n=0,r=new Set){let{schema:i,model:a}=Ue(e,t);if(a&&r.has(a))return{};let o=a?new Set([...r,a]):r,s=We(e,i),c=qe(s);if(c!==void 0)return c;if(s.default!==void 0)return s.default;if(s.const!==void 0)return s.const;if(Array.isArray(s.enum)&&s.enum.length)return s.enum[0];let l=s.oneOf||s.anyOf;if(Array.isArray(l)&&l.length)return F(e,l[0],n,o);if(n>ut)return null;let{type:u}=Ge(s);if(u===`object`||s.properties){let t={};for(let[r,i]of Object.entries(s.properties||{}))t[r]=F(e,i,n+1,o);return t}return u===`array`?s.items?[F(e,s.items,n+1,o)]:[]:u===`string`?lt[s.format]??``:u===`integer`||u===`number`?s.minimum??1:u===`boolean`||null}function dt(e,t){let n=e.servers?.[0]?.url;return(n?new URL(n,t).href:new URL(t).origin).replace(/\/+$/,``)}function ft(e){return e==null?``:typeof e==`string`?e:JSON.stringify(e)}function pt(e,t){let n=(t,n)=>({key:t.name,value:ft(F(e,t.schema)),enabled:n}),r=[{key:`accept`,value:`application/json`,enabled:!0}];t.body&&r.push({key:`content-type`,value:t.body.contentType,enabled:!0}),r.push(...t.params.header.map(e=>n(e,e.required)));let i=t.body?t.body.contentType.includes(`json`)?JSON.stringify(F(e,t.body.schema),null,2):ft(F(e,t.body.schema)):null;return{path:t.params.path.map(e=>n(e,!0)),query:t.params.query.map(e=>n(e,e.required)),headers:r,body:i}}function mt(e,t,n,r){let i=Object.fromEntries(n.map(e=>[e.key,e.value])),a=t.replace(/\{([^}]+)\}/g,(e,t)=>i[t]?encodeURIComponent(i[t]):e),o=new URLSearchParams;for(let e of r)e.enabled&&e.key&&o.append(e.key,e.value);let s=o.toString();return e+a+(s?`?${s}`:``)}function ht({op:e,base:t,inputs:n,token:r}){let i=n.headers.filter(e=>e.enabled&&e.key).map(e=>[e.key,e.value]),a=i.some(([e])=>e.toLowerCase()===`authorization`);e.auth&&r&&!a&&i.push([`authorization`,`Bearer ${r}`]);let o=n.body!==null&&![`GET`,`HEAD`].includes(e.method);return{method:e.method,url:mt(t,e.path,n.path,n.query),headers:i,body:o?n.body:void 0}}function gt(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function _t(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return null}}var vt={200:`OK`,201:`Created`,202:`Accepted`,204:`No Content`,301:`Moved Permanently`,302:`Found`,304:`Not Modified`,400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,413:`Payload Too Large`,415:`Unsupported Media Type`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`};function yt(e,t){return t||vt[e]||``}var bt=`2025-06-18`,xt={name:`maxserver-docs`,version:`3`},St=50,Ct=1;function wt(e,t){return/^https?:\/\//i.test(t)?t:`${e}/${t.replace(/^\/+/,``)}`}function Tt({token:e,sessionId:t,protocolVersion:n}){let r=[[`accept`,`application/json, text/event-stream`],[`content-type`,`application/json`]];return e&&r.push([`authorization`,`Bearer ${e}`]),t&&r.push([`mcp-session-id`,t]),n&&r.push([`mcp-protocol-version`,n]),r}function Et(e,t,n){if(!t.includes(`text/event-stream`))try{return JSON.parse(e)}catch{return null}for(let t of e.split(/\r?\n\r?\n/)){let e=t.split(/\r?\n/).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trimStart()).join(`
|
|
2
|
+
`);try{let t=e&&JSON.parse(e);if(t?.id===n)return t}catch{}}return null}async function Dt(e,t,n){let r=t.startsWith(`notifications/`),i={jsonrpc:`2.0`,...!r&&{id:Ct++},method:t,...n&&{params:n}},a=Tt(e),o=performance.now(),s=await fetch(e.url,{method:`POST`,headers:a,body:JSON.stringify(i),credentials:`include`}),c=await s.arrayBuffer(),l=new TextDecoder().decode(c),u=s.headers.get(`content-type`)||``;return{code:s.status,statusText:yt(s.status,s.statusText),time:performance.now()-o,size:c.byteLength,text:l,reply:r?null:Et(l,u,i.id),sessionId:s.headers.get(`mcp-session-id`),requestHeaders:a,responseHeaders:[...s.headers]}}function Ot(e){let{code:t,statusText:n,reply:r}=e;return t===401?Object.assign(Error(`The MCP server needs a Bearer token (401 Unauthorized).`),{unauthorized:!0}):r?.error?Error(`${r.error.message} (JSON-RPC error ${r.error.code})`):t>=400?Error(`HTTP ${t} ${n}`.trim()):!r||!(`result`in r)?Error(`The server sent no JSON-RPC reply.`):null}async function kt(e,t,n){let r=await Dt(e,t,n),i=Ot(r);if(i)throw i;return{result:r.reply.result,sessionId:r.sessionId}}async function At(e,t,n){let r=[],i;for(let a=0;a<St;a++){let{result:a}=await kt(e,t,i?{cursor:i}:void 0);if(r.push(...a[n]||[]),i=a.nextCursor,!i)break}return r}async function jt(e,t){let n=await kt({url:e,token:t},`initialize`,{protocolVersion:bt,capabilities:{},clientInfo:xt}),r=n.result,i={url:e,sessionId:n.sessionId||null,protocolVersion:r.protocolVersion||`2025-06-18`};await Dt({...i,token:t},`notifications/initialized`);let a=r.capabilities||{};return{session:i,server:r.serverInfo||{},protocolVersion:i.protocolVersion,instructions:r.instructions||``,tools:a.tools?await At({...i,token:t},`tools/list`,`tools`):[],resources:a.resources?await At({...i,token:t},`resources/list`,`resources`):[]}}var I=e=>`mcp/tool/${e.name}`;function Mt(e){let t=new Map;for(let n of e){let e=typeof n._meta?.group==`string`&&n._meta.group.trim()||`Tools`;t.has(e)||t.set(e,{id:`mcp/group/${Ze(e)}`,name:e,tools:[]}),t.get(e).tools.push(n)}return[...t.values()]}var Nt=e=>e.title||e.annotations?.title||e.name;function Pt(e){return e._meta?.ui?.resourceUri||e._meta?.[`openai/outputTemplate`]||null}function Ft(e){let t=e.annotations||{},n=[];return t.readOnlyHint?n.push(`read-only`):t.destructiveHint&&n.push(`destructive`),t.idempotentHint&&n.push(`idempotent`),Pt(e)&&n.push(`view`),n}function It(e){try{return localStorage.getItem(e)||``}catch{return``}}function L(e){let[t,n]=M(()=>It(e));return[t,t=>{n(t);try{t?localStorage.setItem(e,t):localStorage.removeItem(e)}catch{}}]}function Lt(e,t){let[n,r]=M({status:e?`loading`:`off`}),[i,a]=M(0);return N(()=>{if(!e){r({status:`off`});return}let n=!0;return r({status:`loading`}),jt(e,t).then(e=>n&&r({status:`ready`,server:e})).catch(e=>n&&r({status:`error`,message:e.message,unauthorized:!!e.unauthorized})),()=>{n=!1}},[e,i]),[n,()=>a(i+1)]}var Rt={theme:`maxserver-docs:theme`,zoom:`maxserver-docs:zoom`,width:`maxserver-docs:sidebar`},R={min:50,max:200,default:100},zt={min:200,max:480,default:288},Bt=({min:e,max:t,default:n},r)=>{let i=Math.round(Number(r));return r===``||r==null||!Number.isFinite(i)?n:Math.min(t,Math.max(e,i))},Vt=e=>Bt(R,e),Ht=e=>Bt(zt,e),Ut=e=>[`light`,`dark`].includes(e)?e:`auto`;function Wt(e,t){return e===`auto`?t?`dark`:`light`:e}var Gt=()=>typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches,Kt=()=>typeof CSS<`u`&&CSS.supports(`zoom`,`1.5`);function qt({theme:e,zoom:t,width:n}){let r=document.documentElement;r.dataset.theme=e;let i=t!==R.default&&Kt();r.style.zoom=i?String(t/100):``,r.style.setProperty(`--zoom`,i?String(t/100):`1`),r.style.setProperty(`--sidebar-width`,`${n}px`)}function Jt(e=globalThis.localStorage){let t=t=>{try{return e.getItem(t)}catch{return null}};return{theme:Ut(t(Rt.theme)),zoom:Vt(t(Rt.zoom)),width:Ht(t(Rt.width))}}function Yt(){let[e,t]=L(Rt.theme),[n,r]=L(Rt.zoom),[i,a]=L(Rt.width),[o,s]=M(Gt);N(()=>{let e=typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`);if(!e?.addEventListener)return;let t=e=>s(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let c=Ut(e),l=Wt(c,o),u=Vt(n),d=Ht(i),f=je(u);return Ae(()=>{qt({theme:l,zoom:u,width:d}),f.current!==u&&document.getElementById(decodeURIComponent(location.hash.slice(1)))?.scrollIntoView({behavior:`instant`,block:`start`}),f.current=u},[l,u,d]),{theme:c,shown:l,zoom:u,width:d,setTheme:e=>t(e===`auto`?``:e),setZoom:e=>r(String(Vt(e))),setWidth:e=>a(String(Ht(e)))}}var Xt=()=>decodeURIComponent(location.hash.slice(1));function Zt(){let[e,t]=M(Xt);return N(()=>{let e=()=>t(Xt());return addEventListener(`hashchange`,e),()=>removeEventListener(`hashchange`,e)},[]),e}var Qt=e=>e===`mcp`||e.startsWith(`mcp/`);function $t(e,t){return e===`models`||e.startsWith(`model/`)?`models`:t.groups.find(t=>e===t.id||e.startsWith(`${t.id}/`))?.id||`introduction`}function en(e,t){return t.find(t=>e===t.id||t.tools.some(t=>I(t)===e))?.id||`mcp`}function tn(e,t,n){let r=(e,t)=>({id:e,last:t.at(-1)??e});return e===`mcp`?[r(`mcp`,[]),...n.map(e=>r(e.id,e.tools.map(I)))]:[r(`introduction`,t.untagged.map(e=>e.id)),...t.groups.map(e=>r(e.id,e.operations.map(e=>e.id))),...t.models.length?[r(`models`,t.models.map(e=>e.id))]:[]]}var nn=`maxserver-docs:specs`,rn=5;function an(e=globalThis.localStorage){try{let t=JSON.parse(e.getItem(nn)||`[]`);return Array.isArray(t)?t.filter(e=>typeof e==`string`):[]}catch{return[]}}function on(e,t=globalThis.localStorage){try{let n=[e,...an(t).filter(t=>t!==e)].slice(0,rn);t.setItem(nn,JSON.stringify(n))}catch{}}var sn={bar:`_bar_18yta_1`,input:`_input_18yta_5`},cn=0;Array.isArray;function z(e,n,r,i,a,o){n||={};var s,c,l=n;if(`ref`in l)for(c in l={},n)c==`ref`?s=n[c]:l[c]=n[c];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--cn,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return t.vnode&&t.vnode(u),u}function ln({url:e}){return z(`form`,{class:sn.bar,onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`spec`).trim();t&&location.assign(`?spec=${encodeURIComponent(t)}`)},children:[z(`input`,{class:sn.input,name:`spec`,type:`url`,defaultValue:e,list:`maxserver-docs-recent-specs`,"aria-label":`OpenAPI spec URL`,placeholder:`https://…/openapi.json`,spellcheck:!1}),z(`datalist`,{id:`maxserver-docs-recent-specs`,children:an().map(e=>z(`option`,{value:e},e))})]})}var un={bar:`_bar_df4bj_1`,field:`_field_df4bj_5`,label:`_label_df4bj_20`,input:`_input_df4bj_28`};function dn({path:e,onSubmit:t}){return z(`form`,{class:un.bar,onSubmit:e=>{e.preventDefault(),t(new FormData(e.currentTarget).get(`mcp`).trim())},children:z(`label`,{class:un.field,children:[z(`span`,{class:un.label,children:`MCP`}),z(`input`,{class:un.input,name:`mcp`,defaultValue:e,placeholder:`/mcp`,"aria-label":`MCP endpoint path or URL`,autocomplete:`off`,spellcheck:!1})]})})}var fn=120;function pn(e,t,n,r){let[i,a]=M(()=>n||`introduction`),o=je(null),s=je(null),c=je(null),l=je(r);return l.current=r,N(()=>{if(!e)return;let t=()=>[...document.querySelectorAll(`[data-anchor]`)],r=e=>{s.current=e,a(e),decodeURIComponent(location.hash.slice(1))!==e&&history.replaceState(null,``,`#${e}`)},i=e=>{e.scrollIntoView({behavior:`instant`,block:`start`}),c.current=scrollY,r(e.id)},u=()=>scrollY!==c.current,d=n&&document.getElementById(n);o.current!==n&&(d||!n)&&(d?i(d):(scrollTo(0,0),c.current=scrollY,t()[0]&&r(t()[0].id)),o.current=n);let f=0,p=()=>{if(f=0,!u())return;o.current=n;let e=null;for(let n of t())(!e||n.getBoundingClientRect().top-fn<=0)&&(e=n.id);e&&r(e)},m=()=>{f||=requestAnimationFrame(p)},h=e=>{let n=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0;if(!n||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.target.closest?.(`input, textarea, select, [contenteditable]`)||document.querySelector(`[role=dialog]`))return;e.preventDefault();let r=t(),a=r.findIndex(e=>e.id===s.current),o=!u()&&a>=0?r[a+n]:n>0?r.find(e=>e.getBoundingClientRect().top>2):r.findLast(e=>e.getBoundingClientRect().top<-2);o?i(o):l.current?.(n)};return addEventListener(`scroll`,m,{passive:!0}),addEventListener(`keydown`,h),()=>{removeEventListener(`scroll`,m),removeEventListener(`keydown`,h),cancelAnimationFrame(f)}},[e,t,n]),i}var mn={plus:`M8 3v10M3 8h10`,minus:`M3 8h10`,chevronRight:`M6 3l5 5-5 5`,chevronDown:`M3 6l5 5 5-5`,lock:`M4.5 7V5a3.5 3.5 0 0 1 7 0v2M3.5 7h9v6.5h-9z`,copy:`M5.5 5.5h7v7h-7zM3.5 10.5v-7h7`,check:`M3 8.5l3 3 7-7`,menu:`M2.5 4h11M2.5 8h11M2.5 12h11`,close:`M4 4l8 8M12 4l-8 8`,download:`M8 2.5v8M4.5 7L8 10.5 11.5 7M3 13.5h10`,play:`M5 3.5v9l7-4.5z`,eye:`M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z`,eyeOff:`M2 2l12 12M6.5 4a6.6 6.6 0 0 1 1.5-.5c4 0 6.5 4.5 6.5 4.5a11 11 0 0 1-1.7 2.2M10 12.1a6.3 6.3 0 0 1-2 .4c-4 0-6.5-4.5-6.5-4.5a11 11 0 0 1 2.4-2.8`,sun:`M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM8 1.5V3M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1.1 1.1M11.5 11.5l1.1 1.1M3.4 12.6l1.1-1.1M11.5 4.5l1.1-1.1`,moon:`M13.5 9.5a5.5 5.5 0 0 1-7-7 5.5 5.5 0 1 0 7 7z`,settings:`M2.5 4.5h7M12.5 4.5h1M2.5 11.5h1M6.5 11.5h7M11 3v3M5 10v3`};function B({name:e,size:t=16,class:n}){return z(`svg`,{class:n,width:t,height:t,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`,children:z(`path`,{d:mn[e]})})}var hn={segmented:`_segmented_19288_1`,option:`_option_19288_10`,active:`_active_19288_28`};function gn({options:e,value:t,onChange:n,label:r}){return z(`div`,{class:hn.segmented,role:`radiogroup`,"aria-label":r,children:e.map(([e,r])=>z(`button`,{type:`button`,role:`radio`,"aria-checked":e===t,class:`${hn.option} ${e===t?hn.active:``}`,onClick:()=>n(e),children:r},e))})}var _n={badge:`_badge_2r80x_1`,short:`_short_2r80x_8`,get:`_get_2r80x_15`,post:`_post_2r80x_16`,put:`_put_2r80x_17`,patch:`_patch_2r80x_18`,delete:`_delete_2r80x_19`,tool:`_tool_2r80x_20`,dark:`_dark_2r80x_22`},vn={DELETE:`DEL`,OPTIONS:`OPT`};function yn({method:e,short:t=!1,dark:n=!1}){let r=e.toUpperCase();return z(`span`,{class:`${_n.badge} ${_n[r.toLowerCase()]||``} ${n?_n.dark:``} ${t?_n.short:``}`,children:t&&vn[r]||r})}var bn={link:`_link_yhq87_1`,nested:`_nested_yhq87_14`,active:`_active_yhq87_23`,label:`_label_yhq87_29`};function xn({id:e,label:t,method:n,activeId:r,nested:i=!1,onNavigate:a}){return z(`li`,{children:z(`a`,{href:`#${e}`,onClick:a,class:`${bn.link} ${i?bn.nested:``} ${e===r?bn.active:``}`,"aria-current":e===r?`location`:void 0,children:[z(`span`,{class:bn.label,children:t}),n&&z(yn,{method:n,short:!0})]})})}var Sn={group:`_group_1me2b_1`,header:`_header_1me2b_7`,current:`_current_1me2b_34`,chevron:`_chevron_1me2b_39`,items:`_items_1me2b_43`};function Cn({title:e,items:t,open:n,active:r=!1,onToggle:i,activeId:a,onNavigate:o}){return z(`li`,{class:Sn.group,children:[z(`button`,{type:`button`,class:`${Sn.header} ${r?Sn.current:``}`,"aria-expanded":n,onClick:i,children:[z(`span`,{children:e}),z(B,{name:n?`chevronDown`:`chevronRight`,size:14,class:Sn.chevron})]}),n&&z(`ul`,{class:Sn.items,children:t.map(e=>z(xn,{...e,activeId:a,nested:!0,onNavigate:o},e.id))})]})}var wn={sidebar:`_sidebar_nv8xl_1`,list:`_list_nv8xl_8`};function Tn({model:e,mcp:t,activeId:n,onNavigate:r}){let[i,a]=M(()=>new Set),o=t?.status===`ready`?Mt(t.server.tools):[],s=t?o.find(e=>n===e.id||e.tools.some(e=>I(e)===n))?.id:n?.startsWith(`model/`)?`models`:e.groups.find(e=>n===e.id||n?.startsWith(`${e.id}/`))?.id;N(()=>{s&&a(new Set([s]))},[s]);let c=e=>{let t=new Set(i);t.has(e)?t.delete(e):(t.add(e),location.hash=e),a(t)},l=(e,t,i)=>z(xn,{id:e,label:t,method:i,activeId:n,onNavigate:r},e);return t?z(`nav`,{class:wn.sidebar,"aria-label":`MCP server`,children:z(`ul`,{class:wn.list,children:[l(`mcp`,`Server`),o.map(e=>z(Cn,{title:e.name,open:i.has(e.id),active:s===e.id,onToggle:()=>c(e.id),items:e.tools.map(e=>({id:I(e),label:Nt(e),method:`TOOL`})),activeId:n,onNavigate:r},e.id))]})}):z(`nav`,{class:wn.sidebar,"aria-label":`API reference`,children:z(`ul`,{class:wn.list,children:[l(`introduction`,`Introduction`),e.untagged.map(e=>l(e.id,e.label,e.method)),e.groups.map(e=>z(Cn,{title:e.name,open:i.has(e.id),active:s===e.id,onToggle:()=>c(e.id),items:e.operations.map(e=>({id:e.id,label:e.label,method:e.method})),activeId:n,onNavigate:r},e.id)),e.models.length>0&&z(Cn,{title:`Models`,open:i.has(`models`),active:s===`models`,onToggle:()=>c(`models`),items:e.models.map(e=>({id:e.id,label:e.name})),activeId:n,onNavigate:r})]})})}var En={overlay:`_overlay_1xiao_1`,dialog:`_dialog_1xiao_11`,close:`_close_1xiao_30`,small:`_small_1xiao_67`};function Dn({label:e,onClose:t,onKeyDown:n,small:r=!1,children:i}){let a=je(null);N(()=>{let e=document.activeElement,t=document.documentElement.style.overflow;return document.documentElement.style.overflow=`hidden`,a.current?.focus({preventScroll:!0}),()=>{document.documentElement.style.overflow=t,e?.focus?.({preventScroll:!0})}},[]);let o=e=>{if(e.key===`Escape`){e.stopPropagation(),t();return}n?.(e)},s=z(`button`,{type:`button`,class:En.close,"aria-label":`Close`,onClick:t,children:z(B,{name:`close`,size:16})});return z(`div`,{class:En.overlay,onClick:e=>e.target===e.currentTarget&&t(),children:[!r&&s,z(`div`,{ref:a,class:`${En.dialog} ${r?En.small:``}`,role:`dialog`,"aria-modal":`true`,"aria-label":e,tabIndex:-1,onKeyDown:o,children:[r&&s,i]})]})}var V={settings:`_settings_11ql4_1`,title:`_title_11ql4_8`,row:`_row_11ql4_15`,label:`_label_11ql4_21`,zoom:`_zoom_11ql4_27`,range:`_range_11ql4_33`,number:`_number_11ql4_39`,unit:`_unit_11ql4_57`,reset:`_reset_11ql4_62`,note:`_note_11ql4_79`},On=[[`auto`,`Auto`],[`light`,`Light`],[`dark`,`Dark`]];function kn({appearance:e,onClose:t}){let{theme:n,zoom:r,setTheme:i,setZoom:a}=e;return z(Dn,{label:`Settings`,onClose:t,small:!0,children:z(`div`,{class:V.settings,children:[z(`h2`,{class:V.title,children:`Settings`}),z(`div`,{class:V.row,children:[z(`span`,{class:V.label,children:`Theme`}),z(gn,{options:On,value:n,onChange:i,label:`Theme`})]}),z(`div`,{class:V.row,children:[z(`label`,{class:V.label,for:`maxserver-docs-zoom`,children:`Zoom`}),Kt()?z(`div`,{class:V.zoom,children:[z(`input`,{class:V.range,type:`range`,min:R.min,max:R.max,step:1,value:r,"aria-label":`Zoom`,onInput:e=>a(e.currentTarget.value)}),z(`input`,{id:`maxserver-docs-zoom`,class:V.number,type:`number`,min:R.min,max:R.max,step:1,value:r,onChange:e=>a(e.currentTarget.value)}),z(`span`,{class:V.unit,children:`%`}),z(`button`,{type:`button`,class:V.reset,disabled:r===R.default,onClick:()=>a(R.default),children:`Reset`})]}):z(`p`,{class:V.note,children:`This browser cannot zoom the page here; use its own zoom.`})]})]})})}var An={footer:`_footer_5n2b3_1`,toggle:`_toggle_5n2b3_10`,icon:`_icon_5n2b3_11`};function jn({appearance:e}){let[t,n]=M(!1),r=e.shown===`dark`?`light`:`dark`;return z(`div`,{class:An.footer,children:[z(`button`,{type:`button`,class:An.toggle,onClick:()=>e.setTheme(r),children:[z(B,{name:r===`dark`?`moon`:`sun`,size:15}),r===`dark`?`Dark mode`:`Light mode`]}),z(`button`,{type:`button`,class:An.icon,"aria-label":`Settings`,title:`Settings`,onClick:()=>n(!0),children:z(B,{name:`settings`,size:16})}),t&&z(kn,{appearance:e,onClose:()=>n(!1)})]})}var Mn={resizer:`_resizer_17389_1`},Nn=16;function Pn({width:e,zoom:t,onChange:n}){return z(`div`,{class:Mn.resizer,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Sidebar width`,"aria-valuenow":e,"aria-valuemin":zt.min,"aria-valuemax":zt.max,tabIndex:0,onPointerDown:r=>{r.preventDefault();let i=r.currentTarget,a=r.clientX,o=e;i.setPointerCapture(r.pointerId);let s=n=>{o=Ht(e+(n.clientX-a)/(t/100)),document.documentElement.style.setProperty(`--sidebar-width`,`${o}px`)},c=()=>{i.removeEventListener(`pointermove`,s),i.removeEventListener(`pointerup`,c),i.removeEventListener(`pointercancel`,c),n(o)};i.addEventListener(`pointermove`,s),i.addEventListener(`pointerup`,c),i.addEventListener(`pointercancel`,c)},onKeyDown:t=>{let r=t.key===`ArrowLeft`?-16:t.key===`ArrowRight`?Nn:0;r&&(t.preventDefault(),n(e+r))},onDblClick:()=>n(zt.default)})}var Fn=/^(https?:|mailto:|#|\/|\.{0,2}\/|[^:]*$)/i;function In(e){let t=String(e).trim();return Fn.test(t)?t:null}function Ln(e,t){return t||/[A-Z]{5}/.test(e)?{type:`strong`,children:[{type:`text`,text:e}]}:{type:`text`,text:e}}function Rn(e){let t=[],n=/`([^`]+)`|\*\*([^*]+)\*\*|\*([^*]+)\*|\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<)]+)|([\w.+-]+@[\w-]+\.[\w.-]*\w)|\b([A-Z]{2,}(?: [A-Z]{2,})*)\b/g,r=0,i;for(;i=n.exec(e);){if(i.index>r&&t.push({type:`text`,text:e.slice(r,i.index)}),i[1]!==void 0)t.push({type:`code`,text:i[1]});else if(i[2]!==void 0)t.push({type:`strong`,children:Rn(i[2])});else if(i[3]!==void 0)t.push({type:`em`,children:Rn(i[3])});else if(i[4]!==void 0){let e=In(i[5]);t.push(e?{type:`link`,href:e,children:Rn(i[4])}:{type:`text`,text:i[4]})}else i[6]===void 0?i[7]===void 0?t.push(Ln(i[8],i.index===0&&/^[.:]/.test(e.slice(n.lastIndex)))):t.push({type:`link`,href:`mailto:${i[7]}`,children:[{type:`text`,text:i[7]}]}):t.push({type:`link`,href:i[6],children:[{type:`text`,text:i[6]}]});r=n.lastIndex}return r<e.length&&t.push({type:`text`,text:e.slice(r)}),t}function zn(e){let t=String(e||``).replace(/\r\n?/g,`
|
|
2
3
|
`).split(`
|
|
3
4
|
`),n=[],r=0;for(;r<t.length;){let e=t[r];if(!e.trim()){r++;continue}if(/^```/.test(e.trim())){let e=[];for(r++;r<t.length&&!/^```/.test(t[r].trim());)e.push(t[r++]);r++,n.push({type:`codeblock`,text:e.join(`
|
|
4
|
-
`)});continue}let i=e.match(/^(#{1,6})\s+(.*)$/);if(i){n.push({type:`heading`,level:i[1].length,children:
|
|
5
|
-
`)[0]})]}),right:t=>t&&e.contentType&&
|
|
6
|
-
`)[0]})]})}var
|
|
7
|
-
`).length+1)),onInput:e=>l(`body`)(e.currentTarget.value)})})]}),F(`div`,{class:Q.pane,children:[F(`h2`,{class:Q.paneTitle,children:`Response`}),F(Sn,{result:s}),F(`p`,{class:Q.hint,children:[`Send Request `,F(`kbd`,{children:Cn?`⌘`:`Ctrl`}),` `,F(`kbd`,{children:`↵`})]})]})]})]})}var Tn={operation:`_operation_yif9z_1`,left:`_left_yif9z_9`,title:`_title_yif9z_13`,right:`_right_yif9z_20`,sticky:`_sticky_yif9z_24`,actions:`_actions_yif9z_29`},En=[[`path`,`Path Parameters`],[`query`,`Query Parameters`],[`header`,`Headers`],[`cookie`,`Cookies`]];function Dn({op:e}){let[t,n]=N(!1);return F(`section`,{id:e.id,"data-anchor":!0,class:Tn.operation,children:[F(`div`,{class:Tn.left,children:[F(`h3`,{class:Tn.title,children:e.label}),F(V,{text:e.description}),En.map(([t,n])=>e.params[t].length>0&&F(Jt,{title:n,children:e.params[t].map(e=>F($t,{name:e.name,required:e.required,schema:e.description?{...e.schema,description:e.description}:e.schema},e.name))},t)),e.body&&F(Jt,{title:`Body`,badges:F(S,{children:[e.body.required&&F(Kt,{tone:`required`,children:`required`}),F(Kt,{children:e.body.contentType})]}),children:[F(V,{text:e.body.description,muted:!0}),F(tn,{schema:e.body.schema})]}),F(nn,{responses:e.responses})]}),F(`div`,{class:Tn.right,children:F(`div`,{class:Tn.sticky,children:[F(`div`,{class:Tn.actions,children:e.auth&&F(S,{children:[F(I,{name:`lock`,size:14}),` Auth Required`]})}),F(sn,{method:e.method,path:e.path,onTest:()=>n(!0)}),F(_n,{responses:e.responses})]})}),t&&F(wn,{op:e,onClose:()=>n(!1)})]})}var On={models:`_models_jw02e_1`,title:`_title_jw02e_7`,model:`_model_jw02e_1`,name:`_name_jw02e_20`,body:`_body_jw02e_31`};function kn({models:e}){return e.length?F(`section`,{id:`models`,"data-anchor":!0,class:On.models,children:[F(`h2`,{class:On.title,children:`Models`}),e.map(e=>F(`article`,{id:e.id,"data-anchor":!0,class:On.model,children:[F(`h3`,{class:On.name,children:e.name}),F(`div`,{class:On.body,children:[F(V,{text:e.schema?.description,muted:!0}),F(tn,{schema:e.schema})]})]},e.id))]}):null}var $={app:`_app_vr0g8_1`,sidebar:`_sidebar_vr0g8_5`,content:`_content_vr0g8_18`,topbar:`_topbar_vr0g8_24`,backdrop:`_backdrop_vr0g8_28`,message:`_message_vr0g8_32`,topbarTitle:`_topbarTitle_vr0g8_58`,menuButton:`_menuButton_vr0g8_65`,sidebarOpen:`_sidebarOpen_vr0g8_88`};function An({url:e,specField:t=!0}){let[n,r]=N({status:`loading`}),[i,a]=N(!1),[o,s]=xt(),c=At(n.status===`ready`);if(ke(()=>{fetch(e).then(t=>{if(!t.ok)throw Error(`Could not load ${e} (HTTP ${t.status}).`);return t.json().catch(()=>{throw Error(`${e} is not valid JSON.`)})}).then(t=>{let n=Ze(t);Tt(e),document.title=`${n.info.title} – API Docs`,r({status:`ready`,doc:t,model:n})}).catch(e=>r({status:`error`,message:e.message}))},[e]),n.status===`loading`)return F(`p`,{class:$.message,children:`Loading API docs…`});if(n.status===`error`)return F(`div`,{class:$.message,role:`alert`,children:[F(`strong`,{children:`The API docs could not be shown.`}),F(`p`,{children:n.message}),t&&F(Ot,{url:e})]});let{doc:l,model:u}=n,d=()=>a(!1),f={base:ut(l,e),token:o,setToken:s};return F(Qe.Provider,{value:l,children:F($e.Provider,{value:f,children:F(`div`,{class:$.app,children:[F(`header`,{class:$.topbar,children:[F(`button`,{type:`button`,class:$.menuButton,"aria-label":i?`Close menu`:`Open menu`,"aria-expanded":i,onClick:()=>a(!i),children:F(I,{name:i?`close`:`menu`,size:18})}),F(`span`,{class:$.topbarTitle,children:u.info.title})]}),F(`aside`,{class:`${$.sidebar} ${i?$.sidebarOpen:``}`,children:[t&&F(Ot,{url:e}),F(Lt,{model:u,activeId:c,onNavigate:d})]}),i&&F(`div`,{class:$.backdrop,onClick:d}),F(`main`,{class:$.content,children:[F(Ut,{info:u.info,openapi:u.openapi,url:e,auth:u.operations.some(e=>e.auth)}),u.untagged.map(e=>F(Dn,{op:e},e.id)),u.groups.map(e=>F(`div`,{children:[F(Wt,{group:e}),e.operations.map(e=>F(Dn,{op:e},e.id))]},e.id)),F(kn,{models:u.models})]})]})})})}function jn(e,t,n){let r=new URLSearchParams(e.search).get(`spec`)||t?.dataset?.spec||n||t?.dataset?.defaultSpec||`./openapi.json`;return new URL(r,e.href).href}var Mn=document.getElementById(`app`)||document.body.appendChild(document.createElement(`div`));he(F(An,{url:jn(window.location,Mn,wt()[0]),specField:!Mn.dataset.spec}),Mn);
|
|
5
|
+
`)});continue}let i=e.match(/^(#{1,6})\s+(.*)$/);if(i){n.push({type:`heading`,level:i[1].length,children:Rn(i[2])}),r++;continue}let a=/^\s*([-*+]|\d+[.)])\s+/;if(a.test(e)){let i=/^\s*\d/.test(e),o=[];for(;r<t.length&&a.test(t[r]);)o.push(Rn(t[r++].replace(a,``)));n.push({type:`list`,ordered:i,items:o});continue}let o=[];for(;r<t.length&&t[r].trim()&&!a.test(t[r])&&!/^(#{1,6}\s|```)/.test(t[r].trim());)o.push(t[r++].trim());n.push({type:`paragraph`,children:Rn(o.join(` `))})}return n}var Bn={markdown:`_markdown_cv2jz_1`,pre:`_pre_cv2jz_10`,muted:`_muted_cv2jz_23`,heading:`_heading_cv2jz_29`,code:`_code_cv2jz_33`,link:`_link_cv2jz_40`};function Vn(e){return e.map((e,t)=>{if(e.type===`text`)return e.text;if(e.type===`code`)return z(`code`,{class:Bn.code,children:e.text},t);if(e.type===`strong`)return z(`strong`,{children:Vn(e.children)},t);if(e.type===`em`)return z(`em`,{children:Vn(e.children)},t);let n=/^https?:/.test(e.href);return z(`a`,{href:e.href,class:Bn.link,...n&&{target:`_blank`,rel:`noopener noreferrer`},children:Vn(e.children)},t)})}function H({text:e,muted:t=!1}){return e?z(`div`,{class:`${Bn.markdown} ${t?Bn.muted:``}`,children:zn(e).map((e,t)=>e.type===`paragraph`?z(`p`,{children:Vn(e.children)},t):e.type===`heading`?z(`p`,{class:Bn.heading,children:Vn(e.children)},t):e.type===`codeblock`?z(`pre`,{class:Bn.pre,children:e.text},t):z(e.ordered?`ol`:`ul`,{children:e.items.map((e,t)=>z(`li`,{children:Vn(e)},t))},t))}):null}var Hn={field:`_field_opijr_1`,label:`_label_opijr_10`,input:`_input_opijr_15`,eye:`_eye_opijr_40`};function Un(){let{token:e,setToken:t}=P(st),[n,r]=M(!1);return z(`label`,{class:Hn.field,children:[z(`span`,{class:Hn.label,children:`Bearer Token:`}),z(`input`,{class:Hn.input,type:n?`text`:`password`,value:e,placeholder:`Token`,autocomplete:`off`,spellcheck:!1,onInput:e=>t(e.currentTarget.value.trim())}),z(`button`,{type:`button`,class:Hn.eye,"aria-label":n?`Hide token`:`Show token`,onClick:()=>r(!n),children:z(B,{name:n?`eyeOff`:`eye`,size:15})})]})}var Wn={pills:`_pills_eceyt_1`,pill:`_pill_eceyt_1`,title:`_title_eceyt_18`};function Gn({pills:e=[],title:t,as:n=`h2`}){let r=e.filter(Boolean);return z(S,{children:[r.length>0&&z(`div`,{class:Wn.pills,children:r.map(e=>z(`span`,{class:Wn.pill,children:e},e))}),z(n,{class:Wn.title,children:t})]})}var Kn={intro:`_intro_m5lye_1`,auth:`_auth_m5lye_9`,authTitle:`_authTitle_m5lye_16`,download:`_download_m5lye_31`};function qn({info:e,openapi:t,url:n,auth:r}){return z(`section`,{id:`introduction`,"data-anchor":!0,class:Kn.intro,children:[z(`div`,{class:Kn.left,children:[z(Gn,{pills:[e.version&&`v${e.version}`,`OpenAPI ${t}`],title:e.title,as:`h1`}),z(H,{text:e.description}),z(`a`,{class:Kn.download,href:n,download:`openapi.json`,children:`Download OpenAPI Document`})]}),r&&z(`div`,{class:Kn.auth,children:[z(`div`,{class:Kn.authTitle,children:`Authentication`}),z(Un,{})]})]})}var U={tag:`_tag_wuduw_1`,title:`_title_wuduw_10`,card:`_card_wuduw_17`,cardTitle:`_cardTitle_wuduw_24`,list:`_list_wuduw_32`,item:`_item_wuduw_38`,path:`_path_wuduw_45`,method:`_method_wuduw_50`};function Jn({group:e,cardTitle:t=`Operations`}){return z(`section`,{id:e.id,"data-anchor":!0,class:U.tag,children:[z(`div`,{class:U.left,children:[z(`h2`,{class:U.title,children:e.name}),z(H,{text:e.description})]}),z(`div`,{class:U.card,children:[z(`div`,{class:U.cardTitle,children:t}),z(`ul`,{class:U.list,children:e.operations.map(e=>z(`li`,{children:z(`a`,{class:U.item,href:`#${e.id}`,children:[z(`span`,{class:U.method,children:z(yn,{method:e.method})}),z(`code`,{class:U.path,children:e.path})]})},e.id))})]})]})}var Yn={pill:`_pill_fi44x_1`,required:`_required_fi44x_13`};function Xn({children:e,tone:t=`plain`}){return z(`span`,{class:`${Yn.pill} ${Yn[t]}`,children:e})}var Zn={section:`_section_1lkso_1`,header:`_header_1lkso_5`,title:`_title_1lkso_14`,badges:`_badges_1lkso_21`,fields:`_fields_1lkso_28`};function Qn({title:e,badges:t,children:n}){return z(`section`,{class:Zn.section,children:[z(`header`,{class:Zn.header,children:[z(`h4`,{class:Zn.title,children:e}),t&&z(`span`,{class:Zn.badges,children:t})]}),z(`div`,{class:Zn.fields,children:n})]})}var $n={type:`_type_27k8m_1`,model:`_model_27k8m_7`};function er({info:e}){let{model:t,type:n,items:r,variants:i}=e,a=e=>z(`a`,{class:$n.model,href:`#model/${e}`,children:e});if(n===`array`){let e=r?.model?a(r.model):Ge(r?.schema||{}).type||`any`;return z(`span`,{class:$n.type,children:[`array `,e,`[]`]})}return t?a(t):z(`span`,{class:$n.type,children:n||(i?`one of`:`any`)})}function tr({info:e}){if(e.variants)return e.variants.map((t,n)=>z(ir,{name:`option ${n+1}`,schema:t,seen:e.nextSeen},n));let t=e.inner.required||[];return Object.entries(e.inner.properties||{}).map(([n,r])=>z(ir,{name:n,schema:r,required:t.includes(n),seen:e.nextSeen},n))}var nr={foldable:`_foldable_lceok_1`,row:`_row_lceok_5`,tall:`_tall_lceok_15`,toggle:`_toggle_lceok_21`,title:`_title_lceok_48`,right:`_right_lceok_53`,body:`_body_lceok_57`};function rr({title:e,right:t,children:n,defaultOpen:r=!1,label:i,tall:a=!1}){let[o,s]=M(r),c=()=>s(!o);return z(`div`,{class:nr.foldable,children:[z(`div`,{class:`${nr.row} ${a?nr.tall:``}`,onClick:e=>{e.target.closest(`a, button`)||c()},children:[z(`button`,{type:`button`,class:nr.toggle,"aria-expanded":o,"aria-label":i,onClick:c,children:z(B,{name:o?`minus`:`plus`,size:14})}),z(`span`,{class:nr.title,children:typeof e==`function`?e(o):e}),t&&z(`span`,{class:nr.right,children:typeof t==`function`?t(o):t})]}),o&&z(`div`,{class:nr.body,children:n})]})}var W={field:`_field_pv3dl_1`,row:`_row_pv3dl_5`,head:`_head_pv3dl_9`,name:`_name_pv3dl_20`,meta:`_meta_pv3dl_28`,required:`_required_pv3dl_33`,example:`_example_pv3dl_38`,preview:`_preview_pv3dl_46`,description:`_description_pv3dl_52`};function ir({name:e,schema:t,required:n,seen:r=new Set}){let i=Je(P(ot),t,r),a=qe(i.schema),o=Xe(i.inner),s=z(`span`,{class:W.head,children:[e&&z(`span`,{class:W.name,children:e}),z(er,{info:i}),Ye(i).map((e,t)=>z(`span`,{class:W.meta,children:[`· `,e]},t)),n&&z(`span`,{class:W.required,children:`required`}),a!==void 0&&z(`span`,{class:W.example,title:JSON.stringify(a,null,2),children:`Example`}),o&&z(`span`,{class:W.preview,children:o})]}),c=i.schema.description&&z(`div`,{class:W.description,children:z(H,{text:i.schema.description,muted:!0})});return!i.inner&&!i.variants?z(`div`,{class:W.field,children:[z(`div`,{class:W.row,children:s}),c]}):z(`div`,{class:W.field,children:[z(rr,{title:s,label:`${e||`value`} fields`,children:z(tr,{info:i})}),c]})}var ar={fields:`_fields_bqq45_1`,type:`_type_bqq45_5`};function or({schema:e,showType:t=!1}){let n=P(ot);if(!e)return null;let r=Je(n,e,new Set),i=r.type===`object`&&!r.model&&!r.items;return z(`div`,{class:ar.fields,children:[(t||!i)&&z(`div`,{class:ar.type,children:z(er,{info:r})}),(r.inner||r.variants)&&z(tr,{info:r})]})}var G={responses:`_responses_f1ur8_1`,title:`_title_f1ur8_5`,head:`_head_f1ur8_14`,status:`_status_f1ur8_22`,summary:`_summary_f1ur8_27`,empty:`_empty_f1ur8_31`,description:`_description_f1ur8_37`};function sr({responses:e}){return e.length?z(`section`,{class:G.responses,children:[z(`h4`,{class:G.title,children:`Responses`}),e.map(e=>z(`div`,{class:G.response,children:z(rr,{tall:!0,label:`Response ${e.status}`,title:t=>z(`span`,{class:G.head,children:[z(`span`,{class:G.status,children:e.status}),!t&&z(`span`,{class:G.summary,children:e.description.split(`
|
|
6
|
+
`)[0]})]}),right:t=>t&&e.contentType&&z(Xn,{children:e.contentType}),children:[z(`div`,{class:G.description,children:z(H,{text:e.description,muted:!0})}),e.schema?z(or,{schema:e.schema,showType:!0}):z(`p`,{class:G.empty,children:`No body`})]})},e.status))]}):null}var cr={button:`_button_5b1t0_1`,dark:`_dark_5b1t0_17`,light:`_light_5b1t0_31`};function lr({variant:e=`dark`,children:t,...n}){return z(`button`,{type:`button`,class:`${cr.button} ${cr[e]}`,...n,children:t})}var ur={bar:`_bar_2kn4o_1`,path:`_path_2kn4o_18`,param:`_param_2kn4o_28`,test:`_test_2kn4o_32`};function dr({method:e,path:t,onTest:n}){let r=t.split(/(\{[^}]+\})/);return z(`div`,{class:ur.bar,children:[z(yn,{method:e,dark:!0}),z(`code`,{class:ur.path,children:r.map((e,t)=>e.startsWith(`{`)?z(`span`,{class:ur.param,children:e},t):e)}),n&&z(`span`,{class:ur.test,children:z(lr,{variant:`light`,onClick:n,children:[z(B,{name:`play`,size:10}),` Test Request`]})})]})}var fr={tabs:`_tabs_1vlyl_1`,tab:`_tab_1vlyl_1`,active:`_active_1vlyl_25`};function pr({tabs:e,active:t,onChange:n,label:r}){return z(`div`,{class:fr.tabs,role:`tablist`,"aria-label":r,children:e.map(e=>z(`button`,{type:`button`,role:`tab`,"aria-selected":e===t,class:`${fr.tab} ${e===t?fr.active:``}`,onClick:()=>n(e),children:e},e))})}var mr={checkbox:`_checkbox_1ecj6_1`,box:`_box_1ecj6_26`};function hr({label:e,checked:t,onChange:n}){return z(`label`,{class:mr.checkbox,children:[z(`span`,{children:e}),z(`input`,{type:`checkbox`,checked:t,onChange:e=>n(e.currentTarget.checked)}),z(`span`,{class:mr.box,"aria-hidden":`true`,children:t&&z(B,{name:`check`,size:12})})]})}function gr(e){let t=[],n=/("(?:\\.|[^"\\])*")(\s*:)?|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)|\b(true|false|null)\b/g,r=0,i;for(;i=n.exec(e);)i.index>r&&t.push({type:`punct`,text:e.slice(r,i.index)}),i[1]===void 0?i[3]===void 0?t.push({type:`literal`,text:i[4]}):t.push({type:`number`,text:i[3]}):(t.push({type:i[2]?`key`:`string`,text:i[1]}),i[2]&&t.push({type:`punct`,text:i[2]})),r=n.lastIndex;return r<e.length&&t.push({type:`punct`,text:e.slice(r)}),t}var _r={code:`_code_pk0oo_1`,key:`_key_pk0oo_12`,string:`_string_pk0oo_13`,number:`_number_pk0oo_14`,literal:`_literal_pk0oo_15`};function vr({value:e}){let t=typeof e==`string`?e:JSON.stringify(e,null,2);return z(`pre`,{class:_r.code,children:z(`code`,{children:gr(t).map((e,t)=>e.type===`punct`?e.text:z(`span`,{class:_r[e.type],children:e.text},t))})})}var yr={button:`_button_lse6e_1`};function br({text:e,label:t=`Copy`}){let[n,r]=M(!1);async function i(){try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),1200)}catch{}}return z(`button`,{type:`button`,class:yr.button,onClick:i,"aria-label":t,title:t,children:z(B,{name:n?`check`:`copy`,size:15})})}var xr={card:`_card_1xtgd_1`,header:`_header_1xtgd_9`,actions:`_actions_1xtgd_19`,body:`_body_1xtgd_25`,empty:`_empty_1xtgd_31`,footer:`_footer_1xtgd_39`};function Sr({responses:e}){let t=P(ot),[n,r]=M(e[0]?.status),[i,a]=M(!1);if(!e.length)return null;let o=e.find(e=>e.status===n)||e[0],s=o.schema?i?o.schema:F(o.doc||t,o.schema):null,c=s===null?``:JSON.stringify(s,null,2);return z(`div`,{class:xr.card,children:[z(`div`,{class:xr.header,children:[z(pr,{tabs:e.map(e=>e.status),active:o.status,onChange:r,label:`Response status`}),z(`span`,{class:xr.actions,children:[c&&z(br,{text:c,label:`Copy example`}),o.schema&&z(hr,{label:`Show Schema`,checked:i,onChange:a})]})]}),z(`div`,{class:xr.body,children:c?z(vr,{value:c}):z(`p`,{class:xr.empty,children:`No body`})}),o.description&&z(`div`,{class:xr.footer,children:o.description.split(`
|
|
7
|
+
`)[0]})]})}var Cr={entry:`_entry_1ib12_1`,left:`_left_1ib12_9`,right:`_right_1ib12_10`,title:`_title_1ib12_14`,sticky:`_sticky_1ib12_21`};function wr({id:e,title:t,aside:n,panel:r,children:i}){return z(`section`,{id:e,"data-anchor":!0,class:Cr.entry,children:[z(`div`,{class:Cr.left,children:[z(`h3`,{class:Cr.title,children:t}),i]}),z(`div`,{class:Cr.right,children:z(`div`,{class:Cr.sticky,children:n})}),r]})}var K={top:`_top_qk0c2_1`,urlBar:`_urlBar_qk0c2_8`,method:`_method_qk0c2_21`,url:`_url_qk0c2_8`,panes:`_panes_qk0c2_47`,pane:`_pane_qk0c2_47`,paneTitle:`_paneTitle_qk0c2_66`,hint:`_hint_qk0c2_75`},Tr=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform);function Er({label:e,method:t,target:n,copyText:r,onSend:i,sending:a,onClose:o,title:s,resultTitle:c,result:l,children:u}){return z(Dn,{label:e,onClose:o,onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),i())},children:[z(`header`,{class:K.top,children:z(`div`,{class:K.urlBar,children:[z(`span`,{class:K.method,children:z(yn,{method:t})}),z(`span`,{class:K.url,title:r,children:n}),z(br,{text:r,label:`Copy`}),z(lr,{onClick:i,disabled:a,children:[z(B,{name:`play`,size:10}),` Send`]})]})}),z(`div`,{class:K.panes,children:[z(`div`,{class:K.pane,children:[z(`h2`,{class:K.paneTitle,children:s}),u]}),z(`div`,{class:K.pane,children:[z(`h2`,{class:K.paneTitle,children:c}),l,z(`p`,{class:K.hint,children:[`Send `,z(`kbd`,{children:Tr?`⌘`:`Ctrl`}),` `,z(`kbd`,{children:`↵`})]})]})]})]})}var q={section:`_section_16tu7_1`,heading:`_heading_16tu7_5`,header:`_header_16tu7_9`,chevron:`_chevron_16tu7_36`,title:`_title_16tu7_41`,note:`_note_16tu7_45`,right:`_right_16tu7_50`,body:`_body_16tu7_56`};function J({title:e,note:t,right:n,defaultOpen:r=!0,children:i}){let[a,o]=M(r);return z(`section`,{class:q.section,children:[z(`h3`,{class:q.heading,children:z(`button`,{type:`button`,class:q.header,"aria-expanded":a,onClick:()=>o(!a),children:[z(B,{name:a?`chevronDown`:`chevronRight`,size:12,class:q.chevron}),z(`span`,{class:q.title,children:e}),t!==void 0&&z(`span`,{class:q.note,children:t}),n&&z(`span`,{class:q.right,children:n})]})}),a&&z(`div`,{class:q.body,children:i})]})}var Y={table:`_table_rhk4n_1`,check:`_check_rhk4n_11`,cell:`_cell_rhk4n_18`,input:`_input_rhk4n_26`,box:`_box_rhk4n_51`};function Dr({rows:e,onChange:t,fixedKeys:n=!1,label:r}){let i=n?e:[...e,{key:``,value:``,enabled:!1}],a=(r,a)=>{let o=i.map((e,t)=>t===r?{...e,...a}:e);!n&&r===e.length&&(`key`in a||`value`in a)&&(o[r].enabled=!0),t(o.filter((t,n)=>n<e.length||t.key||t.value))};return z(`table`,{class:Y.table,"aria-label":r,children:z(`tbody`,{children:i.map((e,t)=>z(`tr`,{children:[z(`td`,{class:Y.check,children:!n&&z(`label`,{class:Y.box,children:[z(`input`,{type:`checkbox`,checked:e.enabled,"aria-label":`Send ${e.key||`row`}`,onChange:e=>a(t,{enabled:e.currentTarget.checked})}),z(`span`,{"aria-hidden":`true`,children:e.enabled&&z(B,{name:`check`,size:12})})]})}),z(`td`,{class:Y.cell,children:z(`input`,{class:Y.input,value:e.key,placeholder:`Key`,readOnly:n,"aria-label":`Key`,onInput:e=>a(t,{key:e.currentTarget.value})})}),z(`td`,{class:Y.cell,children:z(`input`,{class:Y.input,value:e.value,placeholder:`Value`,"aria-label":`${e.key||`Row`} value`,onInput:e=>a(t,{value:e.currentTarget.value})})})]},t))})})}var Or={editor:`_editor_x7ojz_1`};function kr({value:e,onChange:t,label:n}){return z(`textarea`,{class:Or.editor,value:e,spellcheck:!1,"aria-label":n,rows:Math.min(20,Math.max(6,e.split(`
|
|
8
|
+
`).length+1)),onInput:e=>t(e.currentTarget.value)})}var Ar={summary:`_summary_19jq9_1`,status:`_status_19jq9_12`,dot:`_dot_19jq9_17`,ok:`_ok_19jq9_23`,bad:`_bad_19jq9_27`,note:`_note_19jq9_31`};function jr({result:e,ok:t=e.code<400,note:n}){return z(`div`,{class:Ar.summary,"aria-live":`polite`,children:[z(`span`,{children:[Math.round(e.time),`ms`]}),z(`span`,{children:gt(e.size)}),z(`span`,{class:Ar.status,children:[e.code,` `,e.statusText]}),z(`span`,{class:`${Ar.dot} ${t?Ar.ok:Ar.bad}`,"aria-hidden":`true`}),n&&z(`span`,{class:Ar.note,children:n})]})}var X={empty:`_empty_sbxea_1`,error:`_error_sbxea_9`,headers:`_headers_sbxea_24`,headerRow:`_headerRow_sbxea_29`,views:`_views_sbxea_50`,view:`_view_sbxea_50`,viewActive:`_viewActive_sbxea_68`,body:`_body_sbxea_73`,raw:`_raw_sbxea_77`,noBody:`_noBody_sbxea_86`};function Mr(e){return z(`dl`,{class:X.headers,children:e.map(([e,t],n)=>z(`div`,{class:X.headerRow,children:[z(`dt`,{children:e}),z(`dd`,{children:t})]},n))})}function Nr({result:e,summary:t=!0}){let[n,r]=M(!1);if(!e)return z(`p`,{class:X.empty,children:`Send the request to see the response.`});if(e.state===`loading`)return z(`p`,{class:X.empty,children:`Sending…`});if(e.state===`error`)return z(`div`,{class:X.error,role:`alert`,children:[z(`strong`,{children:`The request failed.`}),z(`p`,{children:e.message}),z(`p`,{children:`The server may be down, or it does not allow this page's origin (CORS).`})]});let i=_t(e.text),a=n||i===null?e.text:i;return z(`div`,{children:[t&&z(jr,{result:e}),z(J,{title:`Request Headers`,note:e.requestHeaders.length,defaultOpen:!1,children:Mr(e.requestHeaders)}),z(J,{title:`Response Headers`,note:e.responseHeaders.length,defaultOpen:!1,children:Mr(e.responseHeaders)}),z(J,{title:`Body`,right:e.contentType,children:[i!==null&&z(`div`,{class:X.views,children:[z(`button`,{type:`button`,class:`${X.view} ${n?``:X.viewActive}`,onClick:()=>r(!1),children:`Preview`}),z(`button`,{type:`button`,class:`${X.view} ${n?X.viewActive:``}`,onClick:()=>r(!0),children:`Raw`})]}),z(`div`,{class:X.body,children:e.text?i!==null&&!n?z(vr,{value:a}):z(`pre`,{class:X.raw,children:a}):z(`p`,{class:X.noBody,children:`No body`})})]})]})}function Pr({op:e,onClose:t}){let n=P(ot),{base:r,token:i}=P(st),[a,o]=M(()=>pt(n,e)),[s,c]=M(null),l=e=>t=>o({...a,[e]:t}),u=mt(r,e.path,a.path,a.query),d=u.startsWith(r)?u.slice(r.length)||`/`:u;async function f(){let t=ht({op:e,base:r,inputs:a,token:i});c({state:`loading`});let n=performance.now();try{let e=await fetch(t.url,{method:t.method,headers:t.headers,body:t.body,credentials:`include`}),r=await e.arrayBuffer();c({state:`done`,code:e.status,statusText:yt(e.status,e.statusText),time:performance.now()-n,size:r.byteLength,text:new TextDecoder().decode(r),contentType:e.headers.get(`content-type`)||``,requestHeaders:t.headers,responseHeaders:[...e.headers]})}catch(e){c({state:`error`,message:e.message})}}return z(Er,{label:`Test request: ${e.label}`,method:e.method,target:d,copyText:u,onSend:f,sending:s?.state===`loading`,onClose:t,title:e.label,resultTitle:`Response`,result:z(Nr,{result:s}),children:[e.auth&&z(J,{title:`Authentication`,note:`Required`,right:`Bearer`,children:z(Un,{})}),a.path.length>0&&z(J,{title:`Path Parameters`,children:z(Dr,{rows:a.path,onChange:l(`path`),fixedKeys:!0,label:`Path parameters`})}),z(J,{title:`Query Parameters`,children:z(Dr,{rows:a.query,onChange:l(`query`),label:`Query parameters`})}),z(J,{title:`Headers`,children:z(Dr,{rows:a.headers,onChange:l(`headers`),label:`Headers`})}),a.body!==null&&z(J,{title:`Request Body`,right:e.body.contentType,children:z(kr,{value:a.body,onChange:l(`body`),label:`Request body`})})]})}var Fr={actions:`_actions_6r90o_1`},Ir=[[`path`,`Path Parameters`],[`query`,`Query Parameters`],[`header`,`Headers`],[`cookie`,`Cookies`]];function Lr({op:e}){let[t,n]=M(!1),r=z(S,{children:[z(`div`,{class:Fr.actions,children:e.auth&&z(S,{children:[z(B,{name:`lock`,size:14}),` Auth Required`]})}),z(dr,{method:e.method,path:e.path,onTest:()=>n(!0)}),z(Sr,{responses:e.responses})]});return z(wr,{id:e.id,title:e.label,aside:r,panel:t&&z(Pr,{op:e,onClose:()=>n(!1)}),children:[z(H,{text:e.description}),Ir.map(([t,n])=>e.params[t].length>0&&z(Qn,{title:n,children:e.params[t].map(e=>z(ir,{name:e.name,required:e.required,schema:e.description?{...e.schema,description:e.description}:e.schema},e.name))},t)),e.body&&z(Qn,{title:`Body`,badges:z(S,{children:[e.body.required&&z(Xn,{tone:`required`,children:`required`}),z(Xn,{children:e.body.contentType})]}),children:[z(H,{text:e.body.description,muted:!0}),z(or,{schema:e.body.schema})]}),z(sr,{responses:e.responses})]})}var Z={server:`_server_b7pis_1`,endpoint:`_endpoint_b7pis_9`,muted:`_muted_b7pis_18`,error:`_error_b7pis_24`,auth:`_auth_b7pis_31`,cards:`_cards_b7pis_39`,card:`_card_b7pis_39`,cardTitle:`_cardTitle_b7pis_52`,token:`_token_b7pis_60`,count:`_count_b7pis_65`,list:`_list_b7pis_71`};function Rr({state:e,url:t,onReload:n}){let r=z(lr,{variant:`light`,onClick:n,children:`Reload`});if(e.status!==`ready`)return z(`section`,{id:`mcp`,"data-anchor":!0,class:Z.server,children:z(`div`,{children:[z(Gn,{title:`MCP Server`}),z(`p`,{class:Z.endpoint,children:[z(yn,{method:`POST`}),` `,z(`code`,{children:t})]}),e.status===`loading`&&z(`p`,{class:Z.muted,children:`Connecting…`}),e.status===`error`&&z(`div`,{role:`alert`,children:[z(`p`,{class:Z.error,children:e.message}),e.unauthorized&&z(`p`,{class:Z.muted,children:`Paste a Bearer token, like one from a sign-in route above, then Reload.`}),e.unauthorized&&z(`div`,{class:Z.auth,children:z(Un,{})}),r]})]})});let{server:i,protocolVersion:a,instructions:o,tools:s,resources:c}=e.server;return z(`section`,{id:`mcp`,"data-anchor":!0,class:Z.server,children:[z(`div`,{children:[z(Gn,{pills:[i.version&&`v${i.version}`,`MCP ${a}`],title:i.title||i.name||`MCP Server`}),z(`p`,{class:Z.endpoint,children:[z(yn,{method:`POST`}),` `,z(`code`,{children:t}),` `,r]}),z(H,{text:o})]}),z(`div`,{class:Z.cards,children:[z(`div`,{class:Z.card,children:[z(`div`,{class:Z.cardTitle,children:`Authentication`}),z(`div`,{class:Z.token,children:z(Un,{})})]}),z(`div`,{class:Z.card,children:[z(`div`,{class:Z.cardTitle,children:[`Tools `,z(`span`,{class:Z.count,children:s.length})]}),z(`ul`,{class:Z.list,children:s.map(e=>z(`li`,{children:z(`a`,{href:`#${I(e)}`,children:z(`code`,{children:e.name})})},e.name))})]}),c.length>0&&z(`div`,{class:Z.card,children:[z(`div`,{class:Z.cardTitle,children:[`Resources `,z(`span`,{class:Z.count,children:c.length})]}),z(`ul`,{class:Z.list,children:c.map(e=>z(`li`,{title:e.description,children:[z(`code`,{children:e.uri}),` `,z(`span`,{class:Z.muted,children:e.mimeType})]},e.uri))})]})]})]})}var zr=/^[\w.:/*-]+$/;function Br(e={}){let t=t=>(e[t]||[]).filter(e=>zr.test(e)).join(` `),n=t(`resourceDomains`);return[`default-src 'none'`,`script-src 'unsafe-inline' ${n}`,`style-src 'unsafe-inline' ${n}`,`img-src data: blob: ${n}`,`font-src data: ${n}`,`media-src data: blob: ${n}`,`connect-src ${t(`connectDomains`)||`'none'`}`].map(e=>e.trim()).join(`; `)}function Vr(e,t){let n=`<meta http-equiv="Content-Security-Policy" content="${Br(t)}">`;return/<head[^>]*>/i.test(e)?e.replace(/<head[^>]*>/i,e=>e+n):n+e}function Hr(e){return typeof e.blob==`string`?Uint8Array.from(atob(e.blob),e=>e.charCodeAt(0)):new TextEncoder().encode(e.text||``)}function Ur(e){return typeof e.text==`string`?e.text:new TextDecoder().decode(Hr(e))}function Wr(e){let t=String(e||``).split(/[/:]/).filter(Boolean).pop();try{return t?decodeURIComponent(t):`download`}catch{return t}}function Gr(e){let t=new Blob([Hr(e)],{type:e.mimeType||`application/octet-stream`}),n=URL.createObjectURL(t);Object.assign(document.createElement(`a`),{href:n,download:Wr(e.uri)}).click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}var Q={list:`_list_1tiry_1`,item:`_item_1tiry_7`,type:`_type_1tiry_12`,text:`_text_1tiry_18`,image:`_image_1tiry_27`,file:`_file_1tiry_31`,uri:`_uri_1tiry_38`,meta:`_meta_1tiry_43`,empty:`_empty_1tiry_49`};function Kr({item:e}){if(e.type===`text`){let t=_t(e.text);return t===null?z(`pre`,{class:Q.text,children:e.text}):z(vr,{value:t})}if(e.type===`image`)return z(`img`,{class:Q.image,src:`data:${e.mimeType};base64,${e.data}`,alt:``});if(e.type===`resource`&&e.resource){let{uri:t,mimeType:n}=e.resource;return z(`div`,{class:Q.file,children:[z(`code`,{class:Q.uri,children:t}),z(`span`,{class:Q.meta,children:[n,` · `,gt(Hr(e.resource).length)]}),z(lr,{variant:`light`,onClick:()=>Gr(e.resource),children:[z(B,{name:`download`,size:12}),` Save`]})]})}return e.type===`resource_link`?z(`code`,{class:Q.uri,children:e.uri}):z(`p`,{class:Q.meta,children:[e.type,` content`]})}function qr({items:e}){return e.length?z(`ol`,{class:Q.list,children:e.map((e,t)=>z(`li`,{class:Q.item,children:[z(`div`,{class:Q.type,children:e.type}),z(Kr,{item:e})]},t))}):z(`p`,{class:Q.empty,children:`No content`})}var Jr={frame:`_frame_14sap_1`,uri:`_uri_14sap_9`,log:`_log_14sap_17`,note:`_note_14sap_29`,error:`_error_14sap_30`},Yr={name:`maxserver-docs`,version:`3`},Xr=[`tools/call`,`resources/read`];function Zr({tool:e,args:t,result:n,session:r}){let{token:i}=P(st),a=P(ct),o=je(null),[s,c]=M({status:`loading`}),[l,u]=M(160),[d,f]=M([]),p=Pt(e),m=e=>f(t=>[e,...t].slice(0,50)),h=e=>o.current?.contentWindow?.postMessage({jsonrpc:`2.0`,...e},`*`);return N(()=>{let e=!0;return kt({...r,token:i},`resources/read`,{uri:p}).then(({result:t})=>{let n=t.contents?.find(e=>e.uri===p)||t.contents?.[0];if(!n)throw Error(`${p} has no contents.`);e&&c({status:`ready`,html:Vr(Ur(n),n._meta?.ui?.csp)})}).catch(t=>e&&c({status:`error`,message:t.message})),()=>{e=!1}},[p]),N(()=>h({method:`ui/notifications/host-context-changed`,params:{theme:a}}),[a]),N(()=>{let s=(e,t)=>h({id:e,result:t});async function c({id:o,method:c,params:l={}}){if(c===`ui/initialize`)return s(o,{protocolVersion:l.protocolVersion,hostInfo:Yr,hostCapabilities:{serverTools:{},serverResources:{},openLinks:{},downloadFile:{},logging:{}},hostContext:{theme:a,displayMode:`inline`,availableDisplayModes:[`inline`],platform:`web`,toolInfo:{tool:e}}});if(c===`ui/notifications/initialized`)return h({method:`ui/notifications/tool-input`,params:{arguments:t}}),h({method:`ui/notifications/tool-result`,params:n});if(c===`ui/notifications/size-changed`)return l.height>0&&u(Math.ceil(l.height));if(Xr.includes(c)){let e=`${c} ${l.name||l.uri||``}`;try{let t=await kt({...r,token:i},c,l);return m(`${e}: ${t.result?.isError?`tool error`:`ok`}`),s(o,t.result)}catch(t){return m(`${e}: ${t.message}`),h({id:o,error:{code:-32603,message:t.message}})}}if(c===`ui/open-link`)return/^https?:\/\//i.test(l.url)&&window.open(l.url,`_blank`,`noopener,noreferrer`),m(`open-link ${l.url}`),s(o,{});if(c===`ui/download-file`){for(let e of l.contents||[])e.resource&&Gr(e.resource);return m(`download-file ${(l.contents||[]).map(e=>e.resource?.uri||e.uri).join(`, `)}`),s(o,{})}if(c===`ui/message`)return m(`message: ${(l.content||[]).map(e=>e.text).join(` `)}`),s(o,{});if(c===`ui/update-model-context`||c===`notifications/message`)return m(`${c}: ${JSON.stringify(l).slice(0,200)}`),o!==void 0&&s(o,{});if(c===`ui/request-display-mode`)return s(o,{mode:`inline`});m(`unsupported ${c}`),o!==void 0&&h({id:o,error:{code:-32601,message:`Method not found: ${c}`}})}let l=e=>{o.current&&e.source===o.current.contentWindow&&e.data?.jsonrpc===`2.0`&&typeof e.data.method==`string`&&c(e.data)};return addEventListener(`message`,l),()=>removeEventListener(`message`,l)},[s,i,a]),s.status===`loading`?z(`p`,{class:Jr.note,children:[`Loading `,p,`…`]}):s.status===`error`?z(`p`,{class:Jr.error,role:`alert`,children:[`The view could not be loaded: `,s.message]}):z(`div`,{children:[z(`iframe`,{ref:o,class:Jr.frame,style:{height:`${l}px`},title:`View ${p}`,sandbox:`allow-scripts`,srcdoc:s.html}),z(`div`,{class:Jr.uri,children:p}),d.length>0&&z(`ol`,{class:Jr.log,"aria-label":`View requests`,children:d.map((e,t)=>z(`li`,{children:e},d.length-t))})]})}var Qr={error:`_error_uzkha_1`,tabs:`_tabs_uzkha_10`,body:`_body_uzkha_17`,empty:`_empty_uzkha_21`};function $r({tool:e,session:t,result:n}){let[r,i]=M(null);if(n?.state!==`done`)return z(Nr,{result:n});let a=Ot(n),o=a?null:n.reply.result,s=o&&!o.isError,c=a?.message||!s&&(o.content?.find(e=>e.type===`text`)?.text||`The tool failed.`),l=[s&&Pt(e)&&`View`,s&&`Result`,o&&`Content`,`Raw`].filter(Boolean),u=l.includes(r)?r:l[0];return z(`div`,{children:[z(jr,{result:n,ok:s,note:a?`Error`:!s&&`Tool error`}),c&&z(`p`,{class:Qr.error,role:`alert`,children:c}),z(`div`,{class:Qr.tabs,children:z(pr,{tabs:l,active:u,onChange:i,label:`Result views`})}),u===`View`&&z(Zr,{tool:e,args:n.args,result:o,session:t},n.time),u===`Result`&&z(`div`,{class:Qr.body,children:o.structuredContent===void 0?z(`p`,{class:Qr.empty,children:`No structuredContent`}):z(vr,{value:o.structuredContent})}),u===`Content`&&z(qr,{items:o.content||[]}),u===`Raw`&&z(Nr,{result:n,summary:!1})]})}var ei={footer:`_footer_1s0qh_1`,invalid:`_invalid_1s0qh_11`,reset:`_reset_1s0qh_16`},ti=e=>JSON.stringify(F(e.inputSchema||{},e.inputSchema||{}),null,2);function ni({tool:e,session:t,onClose:n}){let{token:r}=P(st),[i,a]=L(`maxserver-docs:args:${e.name}`),[o,s]=M(()=>i||ti(e)),[c,l]=M(``),[u,d]=M(null);async function f(){let n;try{if(n=JSON.parse(o.trim()||`{}`),!n||typeof n!=`object`||Array.isArray(n))throw Error(`Arguments must be a JSON object.`)}catch(e){l(e.message);return}l(``),a(o),d({state:`loading`});try{let i=await Dt({...t,token:r},`tools/call`,{name:e.name,arguments:n});d({state:`done`,args:n,...i})}catch(e){d({state:`error`,message:e.message})}}return z(Er,{label:`Test tool: ${Nt(e)}`,method:`TOOL`,target:e.name,copyText:t.url,onSend:f,sending:u?.state===`loading`,onClose:n,title:Nt(e),resultTitle:`Result`,result:z($r,{tool:e,session:t,result:u}),children:[z(J,{title:`Authentication`,right:`Bearer`,children:z(Un,{})}),z(J,{title:`Arguments`,right:`JSON`,children:[z(kr,{value:o,onChange:s,label:`Arguments`}),z(`div`,{class:ei.footer,children:[z(`span`,{class:ei.invalid,role:`alert`,children:c}),z(`button`,{type:`button`,class:ei.reset,onClick:()=>{s(ti(e)),a(``)},children:`Reset to example`})]})]})]})}var ri={pills:`_pills_1wymm_1`,view:`_view_1wymm_9`,empty:`_empty_1wymm_14`};function ii({schema:e,empty:t}){return!e?.properties||!Object.keys(e.properties).length?z(`p`,{class:ri.empty,children:t}):z(ot.Provider,{value:e,children:z(or,{schema:e})})}function ai({tool:e,session:t}){let[n,r]=M(!1),i=Pt(e),a=Ft(e),o=[{status:`Arguments`,schema:e.inputSchema,doc:e.inputSchema},...e.outputSchema?[{status:`Result`,schema:e.outputSchema,doc:e.outputSchema,description:`structuredContent`}]:[]],s=z(S,{children:[z(dr,{method:`TOOL`,path:e.name,onTest:()=>r(!0)}),z(Sr,{responses:o})]});return z(wr,{id:I(e),title:Nt(e),aside:s,panel:n&&z(ni,{tool:e,session:t,onClose:()=>r(!1)}),children:[a.length>0&&z(`div`,{class:ri.pills,children:[a.map(e=>z(Xn,{children:e},e)),i&&z(`code`,{class:ri.view,children:i})]}),z(H,{text:e.description||``}),z(Qn,{title:`Arguments`,children:z(ii,{schema:e.inputSchema,empty:`No arguments`})}),z(Qn,{title:`Result`,children:z(ii,{schema:e.outputSchema,empty:`No outputSchema: the result is its content items`})})]})}var oi={models:`_models_jw02e_1`,title:`_title_jw02e_7`,model:`_model_jw02e_1`,name:`_name_jw02e_20`,body:`_body_jw02e_31`};function si({models:e}){return e.length?z(`section`,{id:`models`,"data-anchor":!0,class:oi.models,children:[z(`h2`,{class:oi.title,children:`Models`}),e.map(e=>z(`article`,{id:e.id,"data-anchor":!0,class:oi.model,children:[z(`h3`,{class:oi.name,children:e.name}),z(`div`,{class:oi.body,children:[z(H,{text:e.schema?.description,muted:!0}),z(or,{schema:e.schema})]})]},e.id))]}):null}var $={app:`_app_11f9k_1`,sidebar:`_sidebar_11f9k_5`,mode:`_mode_11f9k_18`,content:`_content_11f9k_22`,topbar:`_topbar_11f9k_37`,backdrop:`_backdrop_11f9k_41`,message:`_message_11f9k_45`,topbarTitle:`_topbarTitle_11f9k_71`,menuButton:`_menuButton_11f9k_78`,sidebarOpen:`_sidebarOpen_11f9k_103`},ci=[[`rest`,`REST API`],[`mcp`,`MCP`]];function li({url:e,specField:t=!0}){let[n,r]=M({status:`loading`}),[i,a]=M(!1),o=Yt(),[s,c]=L(`maxserver-docs:token`),l=Zt(),[u,d]=L(`maxserver-docs:mode`),[f,p]=L(`maxserver-docs:mcp`),m=f||`/mcp`,h=l?Qt(l)?`mcp`:`rest`:u||`rest`,[g,_]=M(h===`mcp`);N(()=>{h===`mcp`&&_(!0)},[h]);let v=n.status===`ready`&&g?wt(dt(n.doc,e),m):``,[y,ee]=Lt(v,s),b=y.status===`ready`?Mt(y.server.tools):[],x=n.status===`ready`?h===`mcp`?en(l,b):$t(l,n.model):``,S=pn(n.status===`ready`,`${h}/${y.status}/${x}`,l,e=>{let t=tn(h,n.model,b),r=t[t.findIndex(e=>e.id===x)+e];r&&(location.hash=e>0?r.id:r.last)});if(N(()=>{fetch(e).then(t=>{if(!t.ok)throw Error(`Could not load ${e} (HTTP ${t.status}).`);return t.json().catch(()=>{throw Error(`${e} is not valid JSON.`)})}).then(t=>{let n=at(t);on(e),document.title=`${n.info.title} – API Docs`,r({status:`ready`,doc:t,model:n})}).catch(e=>r({status:`error`,message:e.message}))},[e]),n.status===`loading`)return z(`p`,{class:$.message,children:`Loading API docs…`});if(n.status===`error`)return z(`div`,{class:$.message,role:`alert`,children:[z(`strong`,{children:`The API docs could not be shown.`}),z(`p`,{children:n.message}),t&&z(ln,{url:e})]});let{doc:te,model:C}=n,w=()=>a(!1),T={base:dt(te,e),token:s,setToken:c},E=C.groups.find(e=>e.id===x),D=b.find(e=>e.id===x);return z(ct.Provider,{value:o.shown,children:z(ot.Provider,{value:te,children:z(st.Provider,{value:T,children:z(`div`,{class:$.app,children:[z(`header`,{class:$.topbar,children:[z(`button`,{type:`button`,class:$.menuButton,"aria-label":i?`Close menu`:`Open menu`,"aria-expanded":i,onClick:()=>a(!i),children:z(B,{name:i?`close`:`menu`,size:18})}),z(`span`,{class:$.topbarTitle,children:C.info.title})]}),z(`aside`,{class:`${$.sidebar} ${i?$.sidebarOpen:``}`,children:[z(`div`,{class:$.mode,children:z(gn,{options:ci,value:h,onChange:e=>{d(e===`mcp`?`mcp`:``),location.hash=e===`mcp`?`mcp`:`introduction`},label:`Documentation`})}),h===`rest`&&t&&z(ln,{url:e}),h===`mcp`&&z(dn,{path:m,onSubmit:e=>{(e||`/mcp`)===m?ee():p(e),location.hash=`mcp`,scrollTo(0,0)}}),z(Tn,{model:C,mcp:h===`mcp`?y:null,activeId:S,onNavigate:w}),z(jn,{appearance:o}),z(Pn,{width:o.width,zoom:o.zoom,onChange:o.setWidth})]}),i&&z(`div`,{class:$.backdrop,onClick:w}),z(`main`,{class:$.content,children:[x===`introduction`&&z(qn,{info:C.info,openapi:C.openapi,url:e,auth:C.operations.some(e=>e.auth)}),x===`introduction`&&C.untagged.map(e=>z(Lr,{op:e},e.id)),E&&z(Jn,{group:E}),E?.operations.map(e=>z(Lr,{op:e},e.id)),x===`models`&&z(si,{models:C.models}),x===`mcp`&&z(Rr,{state:y,url:v,onReload:ee}),D&&z(Jn,{cardTitle:`Tools`,group:{id:D.id,name:D.name,operations:D.tools.map(e=>({id:I(e),method:`TOOL`,path:e.name}))}}),D?.tools.map(e=>z(ai,{tool:e,session:y.server.session},e.name))]})]})})})})}function ui(e,t,n){let r=new URLSearchParams(e.search).get(`spec`)||t?.dataset?.spec||n||t?.dataset?.defaultSpec||`./openapi.json`;return new URL(r,e.href).href}var di=Jt();qt({...di,theme:Wt(di.theme,Gt())});var fi=document.getElementById(`app`)||document.body.appendChild(document.createElement(`div`));ge(z(li,{url:ui(window.location,fi,an()[0]),specField:!fi.dataset.spec}),fi);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maxserver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Bun server setup",
|
|
5
5
|
"author": "Max Matinpalo",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"devdocs"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"test": "bun test ./test"
|
|
30
|
+
"test": "bun test ./test",
|
|
31
|
+
"bench": "bun test/bench/run.js"
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"ajv": "^8",
|
package/src/cors.js
CHANGED
|
@@ -21,20 +21,31 @@ export function setupCors(cors = "*", production) {
|
|
|
21
21
|
* CORS headers for a request, as in v1 (@fastify/cors with credentials).
|
|
22
22
|
*/
|
|
23
23
|
export function corsHeaders(req, cors) {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
return { ...fixedCorsHeaders(cors), ...originHeaders(req, cors) };
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
// 1. Allowed origin
|
|
28
|
-
if (cors.any && !cors.reflect) headers["Access-Control-Allow-Origin"] = "*";
|
|
29
|
-
else if (origin && (cors.any || cors.list.includes(origin))) {
|
|
30
|
-
headers["Access-Control-Allow-Origin"] = origin;
|
|
31
|
-
headers["Vary"] = "Origin";
|
|
32
|
-
}
|
|
33
27
|
|
|
28
|
+
/**
|
|
29
|
+
* CORS headers that are the same for every request.
|
|
30
|
+
*/
|
|
31
|
+
export function fixedCorsHeaders(cors) {
|
|
32
|
+
const headers = { "Access-Control-Allow-Credentials": "true" };
|
|
33
|
+
if (cors.any && !cors.reflect) headers["Access-Control-Allow-Origin"] = "*";
|
|
34
34
|
return headers;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* CORS headers for the request's origin (reflected or listed), null if none.
|
|
40
|
+
*/
|
|
41
|
+
export function originHeaders(req, cors) {
|
|
42
|
+
if (cors.any && !cors.reflect) return null;
|
|
43
|
+
const origin = req.headers.get("origin");
|
|
44
|
+
if (!origin || !(cors.any || cors.list.includes(origin))) return null;
|
|
45
|
+
return { "Access-Control-Allow-Origin": origin, "Vary": "Origin" };
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
38
49
|
/**
|
|
39
50
|
* Answers OPTIONS preflight requests.
|
|
40
51
|
*/
|
package/src/docs.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
|
|
3
|
-
const SECURITY = [{ bearerAuth: [] }, { cookieAuth: [] }];
|
|
4
3
|
const NOT_SCHEMA = ["$id", "auth", "order", "tags", "summary"];
|
|
5
4
|
|
|
6
5
|
|
|
@@ -54,7 +53,7 @@ function parameters(route, schema) {
|
|
|
54
53
|
}
|
|
55
54
|
|
|
56
55
|
|
|
57
|
-
function operation(route) {
|
|
56
|
+
function operation(route, security) {
|
|
58
57
|
const s = route.schema;
|
|
59
58
|
const op = {};
|
|
60
59
|
|
|
@@ -73,7 +72,7 @@ function operation(route) {
|
|
|
73
72
|
? { description: r.description || "Default Response", content: { "application/json": { schema: fixRefs(r) } } }
|
|
74
73
|
: { description: "Default Response" };
|
|
75
74
|
|
|
76
|
-
if (s.auth) op.security =
|
|
75
|
+
if (s.auth) op.security = security;
|
|
77
76
|
return op;
|
|
78
77
|
}
|
|
79
78
|
|
|
@@ -95,16 +94,19 @@ function sortRoutes(routes) {
|
|
|
95
94
|
|
|
96
95
|
/**
|
|
97
96
|
* OpenAPI 3.1 document from routes with a schema and all models.
|
|
97
|
+
* The built-in JWT accepts a Bearer header or a cookie; an app's authenticate only Bearer.
|
|
98
98
|
*/
|
|
99
|
-
export function buildOpenApi(routes, models, info) {
|
|
99
|
+
export function buildOpenApi(routes, models, info, customAuth = false) {
|
|
100
|
+
const securitySchemes = customAuth
|
|
101
|
+
? { bearerAuth: { type: "http", scheme: "bearer" } }
|
|
102
|
+
: { bearerAuth: { type: "http", scheme: "bearer" }, cookieAuth: { type: "apiKey", in: "cookie", name: "token" } };
|
|
103
|
+
const security = Object.keys(securitySchemes).map(name => ({ [name]: [] }));
|
|
104
|
+
|
|
100
105
|
const doc = {
|
|
101
106
|
openapi: "3.1.0",
|
|
102
107
|
info: info || { title: "API", version: "1.0.0" },
|
|
103
108
|
components: {
|
|
104
|
-
securitySchemes
|
|
105
|
-
bearerAuth: { type: "http", scheme: "bearer" },
|
|
106
|
-
cookieAuth: { type: "apiKey", in: "cookie", name: "token" },
|
|
107
|
-
},
|
|
109
|
+
securitySchemes,
|
|
108
110
|
schemas: {},
|
|
109
111
|
},
|
|
110
112
|
paths: {},
|
|
@@ -115,7 +117,7 @@ export function buildOpenApi(routes, models, info) {
|
|
|
115
117
|
for (const r of sortRoutes(routes.filter(r => r.schema && Object.keys(r.schema).length))) {
|
|
116
118
|
const p = r.path.replace(/:(\w+)/g, "{$1}");
|
|
117
119
|
doc.paths[p] ||= {};
|
|
118
|
-
doc.paths[p][r.method.toLowerCase()] = operation(r);
|
|
120
|
+
doc.paths[p][r.method.toLowerCase()] = operation(r, security);
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
return doc;
|
package/src/errors.js
CHANGED
|
@@ -45,7 +45,7 @@ export function errorResponse(err, production) {
|
|
|
45
45
|
function appLocation(err) {
|
|
46
46
|
const cwd = process.cwd() + "/";
|
|
47
47
|
for (const line of String(err?.stack || "").split("\n").slice(1)) {
|
|
48
|
-
const match = line.match(/(?:file:\/\/)?(\/[
|
|
48
|
+
const match = line.match(/(?:file:\/\/)?(\/[^()]+):(\d+):\d+\)?$/);
|
|
49
49
|
if (match && match[1].startsWith(cwd) && !match[1].includes("/node_modules/"))
|
|
50
50
|
return `${match[1].slice(cwd.length)}:${match[2]}`;
|
|
51
51
|
}
|
package/src/headers.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Security headers,
|
|
3
|
-
*
|
|
2
|
+
* Security headers for JSON (handler data, errors): the only helmet headers
|
|
3
|
+
* that matter for JSON. Each header costs Bun time on every response.
|
|
4
|
+
*/
|
|
5
|
+
export const API_HEADERS = {
|
|
6
|
+
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
|
7
|
+
"X-Content-Type-Options": "nosniff",
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Security headers for everything else (static files, /docs, returned Responses),
|
|
13
|
+
* same as v1 helmet config: helmet defaults without CSP and frameguard, CORP cross-origin.
|
|
4
14
|
*/
|
|
5
15
|
export const SECURITY_HEADERS = {
|
|
16
|
+
...API_HEADERS,
|
|
6
17
|
"Cross-Origin-Opener-Policy": "same-origin",
|
|
7
18
|
"Cross-Origin-Resource-Policy": "cross-origin",
|
|
8
19
|
"Origin-Agent-Cluster": "?1",
|
|
9
20
|
"Referrer-Policy": "no-referrer",
|
|
10
|
-
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
|
11
|
-
"X-Content-Type-Options": "nosniff",
|
|
12
21
|
"X-DNS-Prefetch-Control": "off",
|
|
13
22
|
"X-Download-Options": "noopen",
|
|
14
23
|
"X-Permitted-Cross-Domain-Policies": "none",
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { setupCors } from "./cors.js";
|
|
|
4
4
|
import { setupStatic } from "./static.js";
|
|
5
5
|
import { createValidators } from "./validate.js";
|
|
6
6
|
import { buildOpenApi, docsRoutes } from "./docs.js";
|
|
7
|
-
import { buildRoutes, fallback, finish } from "./routes.js";
|
|
7
|
+
import { buildRoutes, defaultHeaders, fallback, finish } from "./routes.js";
|
|
8
8
|
|
|
9
9
|
export { createError } from "./errors.js";
|
|
10
10
|
export { signJwt, verifyJwt } from "./jwt.js";
|
|
@@ -44,6 +44,7 @@ export default async function maxserver(config = {}) {
|
|
|
44
44
|
static: staticDir = process.env.STATIC,
|
|
45
45
|
public: isPublic = process.env.PUBLIC === "true",
|
|
46
46
|
openapiInfo,
|
|
47
|
+
authenticate,
|
|
47
48
|
routesDir,
|
|
48
49
|
...bunOptions
|
|
49
50
|
} = config;
|
|
@@ -51,8 +52,8 @@ export default async function maxserver(config = {}) {
|
|
|
51
52
|
if (routesDir !== undefined)
|
|
52
53
|
throw new Error("maxserver: routesDir is read by the generator, set ROUTESDIR in .env instead");
|
|
53
54
|
|
|
54
|
-
if (!secret)
|
|
55
|
-
throw new Error("maxserver: secret is required, set secret in maxserver() or SECRET in .env");
|
|
55
|
+
if (!secret && !authenticate)
|
|
56
|
+
throw new Error("maxserver: secret is required, set secret in maxserver() or SECRET in .env (or pass authenticate)");
|
|
56
57
|
if (!registry.routes)
|
|
57
58
|
throw new Error("maxserver: no routes registered. Start with `maxserver dev`, or `maxserver build` and `bun dist/bundle.js` (running server.js directly skips the generated setup.js)");
|
|
58
59
|
|
|
@@ -64,11 +65,14 @@ export default async function maxserver(config = {}) {
|
|
|
64
65
|
// 3. Shared context for all requests
|
|
65
66
|
const dev = env !== "production";
|
|
66
67
|
configureJwt(secret);
|
|
68
|
+
const corsConfig = setupCors(cors, !dev);
|
|
67
69
|
|
|
68
70
|
const ctx = {
|
|
69
71
|
dev,
|
|
70
72
|
secret,
|
|
71
|
-
|
|
73
|
+
authenticate,
|
|
74
|
+
cors: corsConfig,
|
|
75
|
+
headers: defaultHeaders(corsConfig),
|
|
72
76
|
static: setupStatic(staticDir),
|
|
73
77
|
ajvs: createValidators(models),
|
|
74
78
|
};
|
|
@@ -76,7 +80,7 @@ export default async function maxserver(config = {}) {
|
|
|
76
80
|
// 4. Routes: user routes + docs
|
|
77
81
|
const routes = buildRoutes(registry.routes, ctx);
|
|
78
82
|
if (docs) {
|
|
79
|
-
const openapi = buildOpenApi(registry.routes, models, openapiInfo);
|
|
83
|
+
const openapi = buildOpenApi(registry.routes, models, openapiInfo, !!authenticate);
|
|
80
84
|
for (const [path, handler] of Object.entries(await docsRoutes(openapi, dev)))
|
|
81
85
|
routes[path] = { GET: req => finish(req, handler(), ctx) };
|
|
82
86
|
}
|
package/src/routes.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { authenticate } from "./jwt.js";
|
|
2
|
-
import { corsHeaders, preflight } from "./cors.js";
|
|
1
|
+
import { authenticate as authenticateJwt } from "./jwt.js";
|
|
2
|
+
import { corsHeaders, fixedCorsHeaders, originHeaders, preflight } from "./cors.js";
|
|
3
3
|
import { errorResponse, logError } from "./errors.js";
|
|
4
|
-
import { SECURITY_HEADERS, setHeaders } from "./headers.js";
|
|
4
|
+
import { API_HEADERS, SECURITY_HEADERS, setHeaders } from "./headers.js";
|
|
5
5
|
import { compileRoute, validatePart, checkResponse } from "./validate.js";
|
|
6
6
|
import { serveStatic } from "./static.js";
|
|
7
7
|
|
|
@@ -9,8 +9,17 @@ import { serveStatic } from "./static.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Common end of every response: CORS + security headers.
|
|
11
11
|
*/
|
|
12
|
-
export function finish(req, response, ctx) {
|
|
13
|
-
return setHeaders(response, { ...corsHeaders(req, ctx.cors), ...
|
|
12
|
+
export function finish(req, response, ctx, security = SECURITY_HEADERS) {
|
|
13
|
+
return setHeaders(response, { ...corsHeaders(req, ctx.cors), ...security });
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Headers of every handler response, built once: Bun copies a Headers
|
|
19
|
+
* object much faster than it sets headers one by one.
|
|
20
|
+
*/
|
|
21
|
+
export function defaultHeaders(cors) {
|
|
22
|
+
return new Headers({ ...fixedCorsHeaders(cors), ...API_HEADERS });
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
|
|
@@ -19,7 +28,9 @@ export function finish(req, response, ctx) {
|
|
|
19
28
|
*/
|
|
20
29
|
function parseQuery(url) {
|
|
21
30
|
const query = {};
|
|
22
|
-
|
|
31
|
+
const i = url.indexOf("?");
|
|
32
|
+
if (i < 0) return query;
|
|
33
|
+
for (const [k, v] of new URLSearchParams(url.slice(i + 1))) {
|
|
23
34
|
if (!Object.hasOwn(query, k)) setProp(query, k, v);
|
|
24
35
|
else if (Array.isArray(query[k])) query[k].push(v);
|
|
25
36
|
else query[k] = [query[k], v];
|
|
@@ -28,6 +39,20 @@ function parseQuery(url) {
|
|
|
28
39
|
}
|
|
29
40
|
|
|
30
41
|
|
|
42
|
+
/**
|
|
43
|
+
* req.query parsed on first use, because reading req.url is slow in Bun.
|
|
44
|
+
*/
|
|
45
|
+
function lazyQuery(req) {
|
|
46
|
+
let query;
|
|
47
|
+
Object.defineProperty(req, "query", {
|
|
48
|
+
get: () => query ??= parseQuery(req.url),
|
|
49
|
+
set: value => { query = value; },
|
|
50
|
+
configurable: true,
|
|
51
|
+
enumerable: true,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
31
56
|
function badRequest(message) {
|
|
32
57
|
return Object.assign(new Error(message), { statusCode: 400 });
|
|
33
58
|
}
|
|
@@ -50,8 +75,6 @@ function safeParse(text) {
|
|
|
50
75
|
* Parses the body: JSON and text, else left unread.
|
|
51
76
|
*/
|
|
52
77
|
async function parseBody(req) {
|
|
53
|
-
if (req.method === "GET" || req.method === "HEAD") return undefined;
|
|
54
|
-
|
|
55
78
|
const type = (req.headers.get("content-type") || "").toLowerCase();
|
|
56
79
|
if (type.includes("application/json")) {
|
|
57
80
|
const text = await req.text();
|
|
@@ -74,13 +97,15 @@ function setProp(obj, key, value) {
|
|
|
74
97
|
|
|
75
98
|
/**
|
|
76
99
|
* Handler response object: collects status and headers.
|
|
100
|
+
* Headers are a copy of the defaults, made only when a handler sets one.
|
|
77
101
|
*/
|
|
78
|
-
function createRes() {
|
|
102
|
+
function createRes(ctx) {
|
|
79
103
|
const res = {
|
|
80
104
|
statusCode: 200,
|
|
81
|
-
headers:
|
|
105
|
+
headers: null,
|
|
82
106
|
status(code) { res.statusCode = code; return res; },
|
|
83
107
|
header(name, value) {
|
|
108
|
+
res.headers ||= new Headers(ctx.headers);
|
|
84
109
|
if (name.toLowerCase() === "set-cookie") res.headers.append(name, value);
|
|
85
110
|
else res.headers.set(name, value);
|
|
86
111
|
return res;
|
|
@@ -90,15 +115,27 @@ function createRes() {
|
|
|
90
115
|
}
|
|
91
116
|
|
|
92
117
|
|
|
93
|
-
|
|
94
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Handler result -> Response with default, handler and CORS origin headers.
|
|
120
|
+
*/
|
|
121
|
+
function toResponse(data, res, req, ctx) {
|
|
122
|
+
if (data instanceof Response) return finish(req, data, ctx);
|
|
123
|
+
|
|
124
|
+
// 1. Headers: the prebuilt defaults unless something is added
|
|
125
|
+
let headers = res.headers || ctx.headers;
|
|
126
|
+
const origin = originHeaders(req, ctx.cors);
|
|
127
|
+
if (origin) {
|
|
128
|
+
if (headers === ctx.headers) headers = new Headers(headers);
|
|
129
|
+
for (const [k, v] of Object.entries(origin)) headers.set(k, v);
|
|
130
|
+
}
|
|
95
131
|
|
|
132
|
+
// 2. Body
|
|
96
133
|
if (data === undefined) {
|
|
97
134
|
const status = res.statusCode === 200 ? 204 : res.statusCode;
|
|
98
|
-
return new Response(null, { status, headers
|
|
135
|
+
return new Response(null, { status, headers });
|
|
99
136
|
}
|
|
100
137
|
|
|
101
|
-
return Response.json(data, { status: res.statusCode, headers
|
|
138
|
+
return Response.json(data, { status: res.statusCode, headers });
|
|
102
139
|
}
|
|
103
140
|
|
|
104
141
|
|
|
@@ -111,44 +148,46 @@ function wrap(route, ctx) {
|
|
|
111
148
|
const name = `${route.method} ${route.path}`;
|
|
112
149
|
|
|
113
150
|
return async function (req) {
|
|
114
|
-
let response;
|
|
115
151
|
try {
|
|
116
152
|
|
|
117
|
-
// 1. Auth
|
|
118
|
-
if (schema.auth
|
|
153
|
+
// 1. Auth: the app's authenticate (its result is req.auth), else the built-in JWT
|
|
154
|
+
if (schema.auth && ctx.authenticate) {
|
|
155
|
+
const auth = await ctx.authenticate(req);
|
|
156
|
+
if (!auth) throw Object.assign(new Error("Unauthorized"), { statusCode: 401 });
|
|
157
|
+
setProp(req, "auth", auth);
|
|
158
|
+
} else if (schema.auth) authenticateJwt(req, ctx.secret);
|
|
119
159
|
|
|
120
|
-
// 2. Parse
|
|
121
|
-
const
|
|
122
|
-
const query = parseQuery(req.url);
|
|
123
|
-
const body = await parseBody(req);
|
|
160
|
+
// 2. Parse (Bun's req.params is kept and validated in place)
|
|
161
|
+
const body = req.method === "GET" || req.method === "HEAD" ? undefined : await parseBody(req);
|
|
124
162
|
|
|
125
163
|
// 3. Validate (may coerce, add defaults, remove extras)
|
|
126
|
-
if (v.request.params) validatePart(v.request.params, "params", params);
|
|
127
|
-
if (v.request.querystring)
|
|
164
|
+
if (v.request.params) validatePart(v.request.params, "params", req.params);
|
|
165
|
+
if (v.request.querystring) {
|
|
166
|
+
const query = parseQuery(req.url);
|
|
167
|
+
validatePart(v.request.querystring, "querystring", query);
|
|
168
|
+
setProp(req, "query", query);
|
|
169
|
+
} else lazyQuery(req);
|
|
128
170
|
if (v.request.headers) validatePart(v.request.headers, "headers", Object.fromEntries(req.headers));
|
|
129
171
|
if (v.request.body) validatePart(v.request.body, "body", body);
|
|
130
172
|
|
|
131
|
-
setProp(req, "params", params);
|
|
132
|
-
setProp(req, "query", query);
|
|
133
173
|
setProp(req, "body", body);
|
|
134
174
|
|
|
135
175
|
// 4. Handler
|
|
136
|
-
const res = createRes();
|
|
176
|
+
const res = createRes(ctx);
|
|
137
177
|
const data = await route.handler(req, res);
|
|
138
|
-
response = toResponse(data, res);
|
|
178
|
+
const response = toResponse(data, res, req, ctx);
|
|
139
179
|
|
|
140
180
|
// 5. Development: check response against schema
|
|
141
181
|
if (ctx.dev && !(data instanceof Response)) {
|
|
142
182
|
const problem = checkResponse(v.response, response.status, data);
|
|
143
183
|
if (problem) console.warn(`⚠️ Response mismatch ${name} ${response.status} (${route.file}): ${problem}`);
|
|
144
184
|
}
|
|
185
|
+
return response;
|
|
145
186
|
|
|
146
187
|
} catch (err) {
|
|
147
188
|
logError(err, req, ctx.dev);
|
|
148
|
-
|
|
189
|
+
return finish(req, errorResponse(err, !ctx.dev), ctx, API_HEADERS);
|
|
149
190
|
}
|
|
150
|
-
|
|
151
|
-
return finish(req, response, ctx);
|
|
152
191
|
};
|
|
153
192
|
}
|
|
154
193
|
|
|
@@ -182,6 +221,6 @@ export function fallback(ctx) {
|
|
|
182
221
|
|
|
183
222
|
const { pathname } = new URL(req.url);
|
|
184
223
|
const err = Object.assign(new Error(`Route ${req.method}:${pathname} not found`), { statusCode: 404 });
|
|
185
|
-
return finish(req, errorResponse(err, !ctx.dev), ctx);
|
|
224
|
+
return finish(req, errorResponse(err, !ctx.dev), ctx, API_HEADERS);
|
|
186
225
|
};
|
|
187
226
|
}
|