datocms-plugin-alt-text-ai 0.5.14 → 0.5.15
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._form_hqp8e_1{margin-bottom:1rem}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:700;src:url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff2"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:700;src:url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff2"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:500;src:url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff2"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:500;src:url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff2"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:400;src:url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("woff2"),url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("woff"),url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:400;src:url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("woff2"),url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("woff"),url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("opentype")}html{font-size:16px;height:auto}body,html{margin:0;padding:0}@layer datocms-react-ui{html{scrollbar-color:var(--color--scrollbar--fill) transparent}}._button_nnl9b_1{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;border-radius:4px;box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:inline-block;font-family:inherit;font-weight:var(--font-weight-bold);line-height:inherit;opacity:1;text-decoration:none;transition:all .3s var(--material-ease);vertical-align:middle;white-space:nowrap}._button_nnl9b_1:focus,._button_nnl9b_1:hover{opacity:.8}._button_nnl9b_1:active{opacity:.7}._disabled_nnl9b_30{cursor:not-allowed}._buttonType-muted_nnl9b_34{background-color:var(--color--primary-soft--surface);color:var(--color--primary-soft--ink)}._buttonType-muted_nnl9b_34._disabled_nnl9b_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonType-muted_nnl9b_34._disabled_nnl9b_30:active,._buttonType-muted_nnl9b_34._disabled_nnl9b_30:focus,._buttonType-muted_nnl9b_34._disabled_nnl9b_30:hover{color:var(--color--disabled--ink)}._buttonType-primary_nnl9b_50{background-color:var(--color--primary--surface)}._buttonType-primary_nnl9b_50,._buttonType-primary_nnl9b_50:active,._buttonType-primary_nnl9b_50:focus,._buttonType-primary_nnl9b_50:hover{color:var(--color--primary--ink)}._buttonType-primary_nnl9b_50:hover{background-color:var(--color--primary--surface-hover)}._buttonType-primary_nnl9b_50:active,._buttonType-primary_nnl9b_50:focus{background-color:var(--color--primary--surface-active)}._buttonType-primary_nnl9b_50._disabled_nnl9b_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonType-primary_nnl9b_50._disabled_nnl9b_30:active,._buttonType-primary_nnl9b_50._disabled_nnl9b_30:focus,._buttonType-primary_nnl9b_50._disabled_nnl9b_30:hover{color:var(--color--disabled--ink)}._buttonType-negative_nnl9b_80,._buttonType-negative_nnl9b_80:active,._buttonType-negative_nnl9b_80:focus,._buttonType-negative_nnl9b_80:hover{background-color:var(--color--danger--surface);color:var(--color--danger--ink)}._buttonType-negative_nnl9b_80._disabled_nnl9b_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonSize-xxs_nnl9b_97{font-size:.9em;padding:.4em .8em}._buttonSize-xs_nnl9b_102{font-size:1em;padding:.6em .8em}._buttonSize-s_nnl9b_107{font-size:1em;padding:.7em 1em}._buttonSize-m_nnl9b_112{font-size:1.1em;padding:.7em 1em}._buttonSize-l_nnl9b_117{font-size:1.2em;padding:.7em 1em}._buttonSize-xl_nnl9b_122{font-size:1.2em;padding:1em}._fullWidth_nnl9b_127{display:block;text-align:center;width:100%}._button__leftIcon_nnl9b_133,._button__rightIcon_nnl9b_134{display:inline-block;line-height:.6;vertical-align:middle}._button__leftIcon_nnl9b_133 svg,._button__rightIcon_nnl9b_134 svg{fill:var(--color--ink-link);color:var(--color--ink-link)}._button__leftIcon_nnl9b_133{margin-right:.5em}._button__leftIcon_nnl9b_133:last-child{margin-right:0}._button__rightIcon_nnl9b_134{margin-left:.5em}._button__rightIcon_nnl9b_134:first-child{margin-left:0}._Button_a50of_1{justify-column:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:var(--color--surface);border:0;border:1px solid var(--color--border);box-sizing:border-box;color:var(--color--ink);color:var(--color--ink-subtle);cursor:pointer;display:flex;font-family:inherit;font-size:inherit;line-height:inherit;padding:7px 13px}._Button_a50of_1:hover{background-color:var(--color--surface-hover)}._Button_a50of_1 svg{fill:var(--color--ink-subtle);color:var(--color--ink-subtle)}._Button--s_a50of_31{padding:3px 10px}._Button--disabled_a50of_35{color:var(--color--disabled--ink);cursor:not-allowed}._Button--disabled_a50of_35:hover{background:var(--color--surface)}._Button--selected_a50of_44{background-color:var(--color--primary--surface-secondary);color:var(--color--primary--ink)}._Button--selected_a50of_44 svg{fill:var(--color--primary--ink);color:var(--color--primary--ink)}._Button--selected_a50of_44._Button--disabled_a50of_35,._Button--selected_a50of_44:hover{background-color:var(--color--primary--surface-secondary)}._Button_a50of_1:first-child{border-left-width:1px;border-radius:4px 0 0 4px}._Button_a50of_1:last-child{border-radius:0 4px 4px 0}._Group_1b5yn_1{align-items:stretch;background-color:var(--color--surface);display:flex;overflow:hidden}._themeVariables_11af8_1{--base-body-color-rgb-components:52,54,58;--base-body-color:var(--color--ink);--light-body-color-rgb-components:132,132,132;--light-body-color:var(--color--ink-subtle);--placeholder-body-color-rgb-components:198,198,198;--placeholder-body-color:var(--color--ink-placeholder);--light-bg-color-rgb-components:245,245,245;--light-bg-color:var(--color--surface-muted);--lighter-bg-color-rgb-components:248,248,248;--lighter-bg-color:var(--color--surface-muted);--disabled-bg-color-rgb-components:237,237,237;--disabled-bg-color:var(--color--disabled--surface);--border-color-rgb-components:240,240,240;--border-color:var(--color--border);--darker-border-color-rgb-components:215,215,215;--darker-border-color:var(--color--border-hover);--alert-color-rgb-components:255,94,73;--alert-color:var(--color--ink-danger);--warning-color-rgb-components:255,215,0;--warning-color:var(--color--ink-warning);--notice-color-rgb-components:70,215,0;--notice-color:var(--color--ink-success);--warning-bg-color-rgb-components:255,255,229;--warning-bg-color:var(--color--warning-soft--surface);--add-color-rgb-components:76,176,109;--add-color:var(--color--diff-added--surface);--remove-color-rgb-components:235,87,106;--remove-color:var(--color--diff-removed--surface);--base-font-family:"colfax-web","Roboto","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;--monospaced-font-family:"Roboto Mono","Menlo","Bitstream Vera Sans Mono",Consolas,Courier,monospace;--font-weight-bold:500;--spacing-xs:.1875rem;--spacing-s:.375rem;--spacing-m:.75rem;--spacing-l:1.5rem;--spacing-xl:2.25rem;--spacing-xxl:3.75rem;--spacing-xxxl:6rem;--negative-spacing-xs:-.1875rem;--negative-spacing-s:-.375rem;--negative-spacing-m:-.75rem;--negative-spacing-l:-1.5rem;--negative-spacing-xl:-2.25rem;--negative-spacing-xxl:-3.75rem;--negative-spacing-xxxl:-6rem;--font-size-xxs:.6875rem;--font-size-xs:.75rem;--font-size-s:.875rem;--font-size-m:.9375rem;--font-size-l:1.0625rem;--font-size-xl:1.1875rem;--font-size-xxl:1.5625rem;--font-size-xxxl:1.875rem;--material-ease:cubic-bezier(.55,0,.1,1);--inertial-ease:cubic-bezier(.19,1,.22,1)}._canvas_11af8_85{-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility;color:var(--color--ink);font-family:var(--base-font-family);font-size:var(--font-size-m);line-height:1.5}._inspector_4pnoo_1{margin:var(--spacing-l) 0}._panel_4pnoo_5{border-bottom:1px solid var(--color--border)}._panelHandle_4pnoo_9{all:inherit;background:var(--color--surface-muted);border:0;box-sizing:border-box;cursor:pointer;display:block;font-weight:var(--font-weight-bold);padding:5px 10px;width:100%}._panelHandle_4pnoo_9:hover{background:var(--color--surface-hover)}._panelBody_4pnoo_25{border-left:1px solid var(--color--border);border-right:1px solid var(--color--border);padding:20px}._groupDescription_4pnoo_31{font-size:var(--font-size-s);line-height:1.2;margin-bottom:20px}._propertyGroup_4pnoo_37{border:1px solid var(--color--border);border-radius:5px}._propertyOrMethod_4pnoo_42{border-bottom:1px solid var(--color--border);line-height:1.2}._propertyOrMethod_4pnoo_42 p{margin:0}._propertyOrMethodBody_4pnoo_51{padding:15px}._propertyOrMethodExample_4pnoo_55{position:relative}._propertyOrMethodExample_4pnoo_55 pre{background:var(--color--surface-muted);font-size:.8em;margin:0;max-height:240px;overflow:auto;padding:15px}._propertyOrMethodName_4pnoo_68{color:var(--color--ink-subtle);display:block;font-family:var(--monospaced-font-family);font-size:.9em;font-weight:700;margin-bottom:5px;text-decoration:none}._propertyOrMethodName_4pnoo_68:hover{text-decoration:underline}._propertyOrMethodExampleActions_4pnoo_82{background:var(--color--surface);display:flex;padding:15px}._propertyOrMethodExampleActions_4pnoo_82>*{margin-right:10px}._fieldError_kqzsn_1{color:var(--color--ink-danger);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._FieldGroup_uz9ju_1{display:block}._FieldGroup__item_uz9ju_5{display:block;margin-bottom:var(--spacing-l)}._FieldGroup__item_uz9ju_5:last-child{margin-bottom:0}._fieldHint_1q1d1_1{color:var(--color--ink-subtle);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._fieldHint_1q1d1_1 a{color:inherit}._fieldHint_1q1d1_1 a:hover{text-decoration:none}._Form_5qspp_1,._Form__item_5qspp_5{display:block}._Form__item_5qspp_5:last-child{margin-bottom:0}._Form__item--default_5qspp_13{margin-bottom:var(--spacing-l)}._Form__item--condensed_5qspp_17{margin-bottom:var(--spacing-m)}._formLabel_12h4v_1{align-items:center;color:var(--color--ink-subtle);display:flex;margin-bottom:var(--spacing-s)}._formLabel_12h4v_1:hover ._formLabel__code_12h4v_8{opacity:1}._formLabel--error_12h4v_14{color:var(--color--ink-danger)}._formLabel__label_12h4v_18{flex:1}._formLabel__code_12h4v_8{font-family:var(--monospaced-font-family);font-size:.95em;opacity:0;position:absolute;transition:opacity .2s var(--material-ease)}._hotKey_17bh5_1{align-items:center;display:inline-flex;gap:15px}._label_17bh5_7{align-items:center;display:flex}._keys_17bh5_12{align-items:center;display:inline-flex;gap:4px}._hotKeyKey_17bh5_18{background:var(--color--primary-soft--surface);border-radius:3px;padding:5px 8px}._Section_12uz1_1{display:flex;flex-direction:column;gap:var(--spacing-m);position:relative}._Section--highlighted_12uz1_8:before{animation:_pageContentSectionHighligh_12uz1_1 4s ease-in-out .25s forwards;border-radius:4px;box-shadow:0 0 0 4px var(--color--focus--border);content:"";inset:-20px -30px;pointer-events:none;position:absolute;z-index:10}._Section__header_12uz1_22{margin-left:var(--negative-spacing-l);margin-right:var(--negative-spacing-l)}._Section__header--clickable_12uz1_27{cursor:pointer;-webkit-user-select:none;user-select:none}._Section__header--clickable_12uz1_27:hover ._Section__arrow_12uz1_31:before{opacity:.7}._Section__title_12uz1_36{align-items:center;display:flex;gap:var(--spacing-m)}._Section__title_12uz1_36:after,._Section__title_12uz1_36:before{background-color:var(--color--border);content:"";height:1px}._Section__title_12uz1_36:before{width:calc(var(--spacing-l) - var(--spacing-m))}._Section__title_12uz1_36:after{flex:1;margin-right:var(--spacing-l)}._Section__title__content_12uz1_58{align-items:center;display:inline-flex;flex-shrink:0;font-size:var(--font-size-l);font-weight:var(--font-weight-bold)}._Section__arrow_12uz1_31{align-self:stretch;margin-right:.3em;position:relative;width:15px}._Section__arrow_12uz1_31:before{border-bottom:6px solid transparent;border-left:6px solid var(--color--ink);border-top:6px solid transparent;content:"";height:0;left:6px;margin-top:-6px;position:absolute;top:50%;transform-origin:50% 50%;transition:transform .2s ease-out;width:0}._Section__arrow--is-open_12uz1_88:before{transform:rotate(90deg)}@keyframes _pageContentSectionHighligh_12uz1_1{0%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 4px var(--color--focus--outline)}15%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 80px transparent}75%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 80px transparent}to{box-shadow:0 0 0 4px transparent,0 0 0 80px transparent}}._SidebarPanel_a4c7y_1{border-bottom:1px solid var(--color--border)}._SidebarPanel__header_a4c7y_5{align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:var(--color--surface);background-color:var(--color--surface-muted);border:0;box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:flex;font-family:inherit;font-size:inherit;line-height:inherit;padding:0;text-align:left;-webkit-user-select:none;user-select:none;width:100%}._SidebarPanel__header_a4c7y_5:focus,._SidebarPanel__header_a4c7y_5:hover{background-color:var(--color--surface-hover)}._SidebarPanel__header__title_a4c7y_30{flex:1;font-weight:500;padding:0 20px}._SidebarPanel__header__chevron_a4c7y_36{align-items:center;display:flex;padding:13px 15px}._SidebarPanel__content_a4c7y_42{padding:20px}._SidebarPanel__content--no-padding_a4c7y_46{padding:0}._Spinner--inline_1u42l_1{display:inline-block;position:relative;vertical-align:middle}._Spinner--centered_1u42l_7{left:50%;position:absolute;top:50%}._Spinner__bar_1u42l_13{animation:_Spinner__spin_1u42l_1 1.2s linear infinite;background-color:var(--color--ink-subtle);height:14%;left:-20%;position:absolute;top:0;width:40%}@keyframes _Spinner__spin_1u42l_1{0%{opacity:1}to{opacity:.15}}._switchField__flex_ietsf_1{align-items:center;display:flex}._switchField__switchInput_ietsf_6{width:55px}._switchField__label_ietsf_10{color:var(--color--ink);flex:1;line-height:1.1;line-height:20px;margin-bottom:0;pointer-events:none;-moz-user-select:text;-ms-user-select:text;-webkit-user-select:text;user-select:text}._switchField__below_ietsf_22{margin-left:55px;margin-top:var(--spacing-s)}._switchInput__inner_vh6pt_1{color:var(--color--primary--ink);font-size:12px;left:24px;position:absolute;transition:left .3s cubic-bezier(.35,0,.25,1)}._switchInput_vh6pt_1{background-color:var(--color--ink-muted);border:1px solid var(--color--border);border-radius:20px;box-sizing:border-box;cursor:pointer;display:inline-block;height:22px;line-height:20px;position:relative;transition:all .3s cubic-bezier(.35,0,.25,1);vertical-align:middle;width:44px}._switchInput_vh6pt_1:after{animation-duration:.3s;animation-name:_switchInput__off_vh6pt_1;animation-timing-function:cubic-bezier(.35,0,.25,1);background-color:var(--color--surface);border-radius:50%;box-shadow:var(--shadow--raised);content:" ";cursor:pointer;height:18px;left:2px;position:absolute;top:1px;transform:scale(1);transition:left .3s cubic-bezier(.35,0,.25,1),transform .3s cubic-bezier(.35,0,.25,1);width:18px}._switchInput_vh6pt_1:focus:after,._switchInput_vh6pt_1:hover:after{animation-name:_switchInput__on_vh6pt_1;transform:scale(1.1)}._switchInput__checked_vh6pt_50{background-color:var(--color--primary--surface);border-color:var(--color--primary--surface)}._switchInput__checked_vh6pt_50 ._switchInput__inner_vh6pt_1{left:6px}._switchInput__checked_vh6pt_50:after{left:22px}._switchInput__disabled_vh6pt_63{background:var(--color--disabled--surface);border-color:var(--color--border);cursor:no-drop}._switchInput__disabled_vh6pt_63:after{animation-name:_none_vh6pt_1;background:var(--color--disabled--ink);cursor:no-drop}._switchInput__disabled_vh6pt_63:focus:after,._switchInput__disabled_vh6pt_63:hover:after{animation-name:_none_vh6pt_1;transform:scale(1)}@keyframes _switchInput__on_vh6pt_1{0%{transform:scale(1)}50%{transform:scale(1.25)}to{transform:scale(1.1)}}@keyframes _switchInput__off_vh6pt_1{0%{transform:scale(1.1)}to{transform:scale(1)}}._TextInput_1kqkh_1{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:0;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size-m);padding:10px;resize:none;transition:border .2s var(--material-ease);width:100%}._TextInput_1kqkh_1::placeholder{color:var(--color--ink-placeholder)}._TextInput_1kqkh_1:hover{border-color:var(--color--border-hover)}._TextInput_1kqkh_1:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._TextInput--monospaced_1kqkh_32{font-family:var(--monospaced-font-family);font-size:var(--font-size-s)}._TextInput--disabled_1kqkh_37{background:var(--color--disabled--surface);border-color:var(--color--border);color:var(--color--disabled--ink)}._TextInput--error_1kqkh_43,._TextInput--error_1kqkh_43:focus,._TextInput--error_1kqkh_43:hover{border-color:var(--color--danger-soft--border)}._TextInput--error_1kqkh_43:focus{box-shadow:0 0 0 4px var(--color--danger-soft--outline)}._TextareaInput_1xr0a_1{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:0;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size-m);padding:10px;resize:none;transition:border .2s var(--material-ease);width:100%}._TextareaInput_1xr0a_1::placeholder{color:var(--color--ink-placeholder)}._TextareaInput_1xr0a_1:hover{border-color:var(--color--border-hover)}._TextareaInput_1xr0a_1:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._TextareaInput--monospaced_1xr0a_32{font-family:var(--monospaced-font-family);font-size:var(--font-size-s)}._TextareaInput--disabled_1xr0a_37{background:var(--color--disabled--surface);border-color:var(--color--border);color:var(--color--disabled--ink)}._TextareaInput--error_1xr0a_43,._TextareaInput--error_1xr0a_43:focus,._TextareaInput--error_1xr0a_43:hover{border-color:var(--color--danger-soft--border)}._TextareaInput--error_1xr0a_43:focus{box-shadow:0 0 0 4px var(--color--danger-soft--outline)}._Button_36kvr_1{align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;border-left:1px solid var(--color--border);border-right:1px solid var(--color--border);box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:flex;font-family:inherit;justify-content:center;line-height:inherit;min-height:49px;padding:0;width:49px}._Button_36kvr_1:focus,._Button_36kvr_1:hover{background-color:var(--color--surface-hover)}._Button_36kvr_1:first-child{border-left:0}._Button_36kvr_1:last-child{border-right:0}@media screen and (min-width:380px){._Button_36kvr_1{min-height:59px;width:59px}._Button_36kvr_1 svg{font-size:20px}}._Stack_1nnzo_1{align-items:center;display:flex;flex:1;flex-direction:row;justify-content:center;padding:10px 15px}._Stack--s_1nnzo_10{padding-bottom:var(--spacing-s);padding-top:var(--spacing-s)}._Stack--l_1nnzo_15{padding-left:var(--spacing-xl);padding-right:var(--spacing-xl)}._Title_1dx5n_1{font-size:var(--font-size-l);font-weight:500;line-height:1.1;margin-right:15px}@media screen and (min-width:380px){._Title_1dx5n_1{font-size:var(--font-size-xl)}}._Toolbar_50246_1{align-items:stretch;border-bottom:1px solid var(--color--border);border-top:1px solid var(--color--border);display:flex;position:relative}._Toolbar_50246_1:first-child{border-top-width:0}._Toolbar_50246_1:last-child{border-bottom-width:0}._tooltip_6pcmg_1{word-wrap:break-word;background:var(--color--tooltip--surface);border-radius:4px;box-shadow:var(--shadow--floating);color:var(--color--tooltip--ink);-webkit-hyphens:auto;hyphens:auto;max-width:400px;overflow-wrap:break-word;padding:10px 15px}._Dropdown_1051c_1{position:relative}._Dropdown__spacer_1051c_5{inset:0;pointer-events:none;position:absolute}._Dropdown__menu__search_1051c_11{border-bottom:1px solid var(--color--border);padding:7px}._Dropdown__menu__search__input_1051c_16{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:3px;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:.9em;padding:8px;resize:none;transition:border .2s var(--material-ease);width:100%}._Dropdown__menu__search__input_1051c_16::placeholder{color:var(--color--ink-placeholder)}._Dropdown__menu__search__input_1051c_16:hover{border-color:var(--color--border-hover)}._Dropdown__menu__search__input_1051c_16:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._Dropdown__menu-container_1051c_47{position:fixed;visibility:hidden}._Dropdown__menu_1051c_11{background-color:var(--color--surface-raised);border-radius:4px;box-shadow:var(--shadow--floating);margin-bottom:var(--spacing-xl);margin-top:10px;min-width:200px;padding:1px 0;text-align:initial}._Dropdown__menu__inner_1051c_63{margin:7px 0}._Dropdown__menu__group__title_1051c_67{background-color:var(--color--surface-muted);color:var(--color--ink-subtle);font-size:var(--font-size-xs);padding:5px 15px 3px;text-transform:uppercase}._Dropdown__menu__group__content_1051c_75{margin:8px 0}._Dropdown__menu__text_1051c_79{color:var(--color--ink-subtle);display:block;line-height:1.2;padding:4px 15px;position:relative;text-align:left}._Dropdown__menu__option_1051c_88{align-items:center;color:var(--color--ink);display:flex;padding:4px 15px;position:relative;text-align:left;text-decoration:none;white-space:nowrap}._Dropdown__menu__option_1051c_88:focus,._Dropdown__menu__option_1051c_88:hover{background-color:var(--color--surface-hover)}._Dropdown__menu__option_1051c_88>a{color:inherit;display:block;text-decoration:none}._Dropdown__menu__option--is-selected_1051c_110{background-color:var(--color--selected--surface)}._Dropdown__menu__option--is-disabled_1051c_114{opacity:.5}._Dropdown__menu__option--is-disabled_1051c_114 ._Dropdown__menu__option__content_1051c_117{cursor:not-allowed}._Dropdown__menu__option--is-dangerous_1051c_122:focus,._Dropdown__menu__option--is-dangerous_1051c_122:hover{background-color:var(--color--danger--surface);color:var(--color--danger--ink)}._Dropdown__menu__option--is-dangerous_1051c_122:focus svg,._Dropdown__menu__option--is-dangerous_1051c_122:hover svg{fill:var(--color--danger--ink);color:var(--color--danger--ink)}._Dropdown__menu__option--is-active_1051c_135{font-weight:500}._Dropdown__menu__option--is-active_1051c_135:focus,._Dropdown__menu__option--is-active_1051c_135:hover{background-color:none}._Dropdown__menu__option--is-invalid_1051c_148,._Dropdown__menu__option--is-valid_1051c_144{padding-left:35px}._Dropdown__menu__option--is-invalid_1051c_148:before{background-color:var(--color--danger--surface);border-radius:4px;content:"";font-size:12px;height:8px;left:15px;position:absolute;top:50%;transform:translateY(-50%);width:8px}._Dropdown__menu__option__content_1051c_117{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:inherit;cursor:pointer;flex:1;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0;text-align:left}._Dropdown__menu__option__content_1051c_117>svg{fill:var(--color--ink-subtle);color:var(--color--ink-subtle);display:inline-block;font-size:13px;padding-right:8px;vertical-align:middle}._Dropdown__menu__option__icons_1051c_191{align-items:center;display:flex;padding-left:15px}._Dropdown__menu__option__icon_1051c_191{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:var(--color--ink);color:var(--color--ink-subtle);cursor:pointer;display:inline-block;font-family:inherit;font-size:inherit;font-size:13px;line-height:inherit;line-height:10px;opacity:0;padding:3px;position:relative;top:-1px;transition:transform .1s ease-in-out;width:100%;width:auto}._Dropdown__menu__option_1051c_88:focus ._Dropdown__menu__option__icon_1051c_191,._Dropdown__menu__option_1051c_88:hover ._Dropdown__menu__option__icon_1051c_191{opacity:1}._Dropdown__menu__option__icon_1051c_191:focus,._Dropdown__menu__option__icon_1051c_191:hover{transform:scale(1.2)}._Dropdown__menu__option__icon_1051c_191 svg{fill:var(--color--ink-subtle);color:var(--color--ink-subtle)}._Dropdown__menu__option__icon--delete_1051c_239{color:var(--color--danger--ink)}._Dropdown__menu__option__icon--delete_1051c_239 svg{fill:var(--color--danger--ink);color:var(--color--danger--ink)}._Dropdown__menu__separator_1051c_247{background-color:var(--color--border);height:1px;margin:8px 0}._Dropdown__menu_1051c_11{overflow-y:auto}._SplitViewPane_1cl1f_1{height:100%;overflow-y:auto;position:absolute;width:100%}._SplitViewSash_9ds0h_1{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;position:absolute;top:0;transition:background-color .2s .15s;width:100%;z-index:2}._SplitViewSash--dragging_9ds0h_15,._SplitViewSash_9ds0h_1:hover{background-color:var(--color--primary-soft--surface)}._SplitViewSash--dragging_9ds0h_15:has(._SplitViewSash__content_9ds0h_19:hover),._SplitViewSash_9ds0h_1:hover:has(._SplitViewSash__content_9ds0h_19:hover){background-color:transparent}._SplitViewSash--no-resize_9ds0h_24{pointer-events:none}._SplitViewSash--vertical_9ds0h_28{cursor:col-resize}._SplitViewSash--horizontal_9ds0h_32{cursor:row-resize}._SplitViewSash__content_9ds0h_19{cursor:pointer;left:50%;padding:15px 0;pointer-events:auto;position:absolute;top:50%;transform:translate(-50%,-50%)}._SplitViewSash__content__button_9ds0h_46{align-items:center;background:var(--color--surface);border:1px solid var(--color--border);border-radius:6px;color:var(--color--ink-subtle);display:flex;font-size:10px;height:20px;justify-content:center;width:20px;z-index:2}._SplitViewSash__content__button_9ds0h_46 svg{fill:currentColor;display:block}._SplitViewSash__content_9ds0h_19:hover ._SplitViewSash__content__button_9ds0h_46{background:var(--color--surface-hover);color:var(--color--ink)}._SplitView_1oi17_1{flex:1;height:100%;position:relative;width:100%}._SplitView--dragging_1oi17_8._SplitView--vertical_1oi17_8{cursor:col-resize}._SplitView--dragging_1oi17_8._SplitView--horizontal_1oi17_12{cursor:row-resize}._SplitView--disable-select_1oi17_16{-webkit-user-select:none;user-select:none}._SplitView--disable-select_1oi17_16 ._SplitViewPane_1oi17_20{pointer-events:none}._VerticalSplitPane__expand_28erb_1{background:var(--color--surface);cursor:pointer;inset:0;position:absolute;transition:all .3s cubic-bezier(.55,0,.1,1)}._VerticalSplitPane__expand_28erb_1:hover{animation:_VerticalSplitPane__expand_28erb_1 .6s cubic-bezier(.55,0,.1,1);background:var(--color--surface-hover)}._VerticalSplitPane__expand_28erb_1._VerticalSplitPane__expand_28erb_1{border-right:1px solid var(--color--border);transform-origin:left}._VerticalSplitPane__expand_28erb_1._VerticalSplitPane__expand--right_28erb_25{border-left:1px solid var(--color--border);transform-origin:right}@keyframes _VerticalSplitPane__expand_28erb_1{0%{transform:scaleX(1)}50%{transform:scaleX(2)}to{transform:scaleX(1)}}._VerticalSplitPaneOverlay_28erb_42{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:var(--color--backdrop--surface);height:100%;inset:0;overflow:hidden;position:absolute;z-index:12}._VerticalSplitPaneOverlay__primary_28erb_55{inset:0;position:absolute;z-index:1}._VerticalSplitPaneOverlay__primary--left_28erb_64{margin-right:20px}._VerticalSplitPaneOverlay__primary--right_28erb_68{margin-left:20px}._VerticalSplitPaneOverlay__secondary_28erb_72{background:var(--color--surface);bottom:0;box-shadow:var(--shadow--ambient);position:absolute;top:0}._VerticalSplitPaneOverlay__secondary--left_28erb_80{left:0}._VerticalSplitPaneOverlay__secondary--right_28erb_84{right:0}._VerticalSplitPaneOverlay__sash_28erb_88{height:100%;position:absolute;top:0}._VerticalSplitPaneOverlay__secondary--left_28erb_80 ._VerticalSplitPaneOverlay__sash_28erb_88{right:0}._VerticalSplitPaneOverlay__secondary--right_28erb_84 ._VerticalSplitPaneOverlay__sash_28erb_88{left:0}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function u(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=u(d);fetch(d.href,f)}})();var Ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var sc={exports:{}},Fl={};var Nm;function ab(){if(Nm)return Fl;Nm=1;var r=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function u(c,d,f){var h=null;if(f!==void 0&&(h=""+f),d.key!==void 0&&(h=""+d.key),"key"in d){f={};for(var v in d)v!=="key"&&(f[v]=d[v])}else f=d;return d=f.ref,{$$typeof:r,type:c,key:h,ref:d!==void 0?d:null,props:f}}return Fl.Fragment=l,Fl.jsx=u,Fl.jsxs=u,Fl}var jm;function lb(){return jm||(jm=1,sc.exports=ab()),sc.exports}var cn=lb(),cc={exports:{}};var Lm;function ub(){return Lm||(Lm=1,(function(r){(function(){var l={}.hasOwnProperty;function u(){for(var f="",h=0;h<arguments.length;h++){var v=arguments[h];v&&(f=d(f,c(v)))}return f}function c(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return u.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var h="";for(var v in f)l.call(f,v)&&f[v]&&(h=d(h,v));return h}function d(f,h){return h?f?f+" "+h:f+h:f}r.exports?(u.default=u,r.exports=u):window.classNames=u})()})(cc)),cc.exports}var ib=ub();const au=Bi(ib);var fc={exports:{}},I={};var Gm;function rb(){if(Gm)return I;Gm=1;var r=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),p=Symbol.iterator;function R(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,W={};function k(T,L,B){this.props=T,this.context=L,this.refs=W,this.updater=B||x}k.prototype.isReactComponent={},k.prototype.setState=function(T,L){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,L,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function oe(){}oe.prototype=k.prototype;function ae(T,L,B){this.props=T,this.context=L,this.refs=W,this.updater=B||x}var P=ae.prototype=new oe;P.constructor=ae,G(P,k.prototype),P.isPureReactComponent=!0;var me=Array.isArray;function re(){}var Y={H:null,A:null,T:null,S:null},Ae=Object.prototype.hasOwnProperty;function Ue(T,L,B){var Q=B.ref;return{$$typeof:r,type:T,key:L,ref:Q!==void 0?Q:null,props:B}}function Ut(T,L){return Ue(T.type,L,T.props)}function Ie(T){return typeof T=="object"&&T!==null&&T.$$typeof===r}function xe(T){var L={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(B){return L[B]})}var ye=/\/+/g;function Pe(T,L){return typeof T=="object"&&T!==null&&T.key!=null?xe(""+T.key):L.toString(36)}function nt(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(re,re):(T.status="pending",T.then(function(L){T.status==="pending"&&(T.status="fulfilled",T.value=L)},function(L){T.status==="pending"&&(T.status="rejected",T.reason=L)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function U(T,L,B,Q,ee){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var _e=!1;if(T===null)_e=!0;else switch(le){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(T.$$typeof){case r:case l:_e=!0;break;case _:return _e=T._init,U(_e(T._payload),L,B,Q,ee)}}if(_e)return ee=ee(T),_e=Q===""?"."+Pe(T,0):Q,me(ee)?(B="",_e!=null&&(B=_e.replace(ye,"$&/")+"/"),U(ee,L,B,"",function(al){return al})):ee!=null&&(Ie(ee)&&(ee=Ut(ee,B+(ee.key==null||T&&T.key===ee.key?"":(""+ee.key).replace(ye,"$&/")+"/")+_e)),L.push(ee)),1;_e=0;var et=Q===""?".":Q+":";if(me(T))for(var Ne=0;Ne<T.length;Ne++)Q=T[Ne],le=et+Pe(Q,Ne),_e+=U(Q,L,B,le,ee);else if(Ne=R(T),typeof Ne=="function")for(T=Ne.call(T),Ne=0;!(Q=T.next()).done;)Q=Q.value,le=et+Pe(Q,Ne++),_e+=U(Q,L,B,le,ee);else if(le==="object"){if(typeof T.then=="function")return U(nt(T),L,B,Q,ee);throw L=String(T),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return _e}function H(T,L,B){if(T==null)return T;var Q=[],ee=0;return U(T,Q,"","",function(le){return L.call(B,le,ee++)}),Q}function $(T){if(T._status===-1){var L=T._result;L=L(),L.then(function(B){(T._status===0||T._status===-1)&&(T._status=1,T._result=B)},function(B){(T._status===0||T._status===-1)&&(T._status=2,T._result=B)}),T._status===-1&&(T._status=0,T._result=L)}if(T._status===1)return T._result.default;throw T._result}var be=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Oe={map:H,forEach:function(T,L,B){H(T,function(){L.apply(this,arguments)},B)},count:function(T){var L=0;return H(T,function(){L++}),L},toArray:function(T){return H(T,function(L){return L})||[]},only:function(T){if(!Ie(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return I.Activity=S,I.Children=Oe,I.Component=k,I.Fragment=u,I.Profiler=d,I.PureComponent=ae,I.StrictMode=c,I.Suspense=g,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,I.__COMPILER_RUNTIME={__proto__:null,c:function(T){return Y.H.useMemoCache(T)}},I.cache=function(T){return function(){return T.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(T,L,B){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=G({},T.props),ee=T.key;if(L!=null)for(le in L.key!==void 0&&(ee=""+L.key),L)!Ae.call(L,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&L.ref===void 0||(Q[le]=L[le]);var le=arguments.length-2;if(le===1)Q.children=B;else if(1<le){for(var _e=Array(le),et=0;et<le;et++)_e[et]=arguments[et+2];Q.children=_e}return Ue(T.type,ee,Q)},I.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},I.createElement=function(T,L,B){var Q,ee={},le=null;if(L!=null)for(Q in L.key!==void 0&&(le=""+L.key),L)Ae.call(L,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=L[Q]);var _e=arguments.length-2;if(_e===1)ee.children=B;else if(1<_e){for(var et=Array(_e),Ne=0;Ne<_e;Ne++)et[Ne]=arguments[Ne+2];ee.children=et}if(T&&T.defaultProps)for(Q in _e=T.defaultProps,_e)ee[Q]===void 0&&(ee[Q]=_e[Q]);return Ue(T,le,ee)},I.createRef=function(){return{current:null}},I.forwardRef=function(T){return{$$typeof:v,render:T}},I.isValidElement=Ie,I.lazy=function(T){return{$$typeof:_,_payload:{_status:-1,_result:T},_init:$}},I.memo=function(T,L){return{$$typeof:y,type:T,compare:L===void 0?null:L}},I.startTransition=function(T){var L=Y.T,B={};Y.T=B;try{var Q=T(),ee=Y.S;ee!==null&&ee(B,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(re,be)}catch(le){be(le)}finally{L!==null&&B.types!==null&&(L.types=B.types),Y.T=L}},I.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},I.use=function(T){return Y.H.use(T)},I.useActionState=function(T,L,B){return Y.H.useActionState(T,L,B)},I.useCallback=function(T,L){return Y.H.useCallback(T,L)},I.useContext=function(T){return Y.H.useContext(T)},I.useDebugValue=function(){},I.useDeferredValue=function(T,L){return Y.H.useDeferredValue(T,L)},I.useEffect=function(T,L){return Y.H.useEffect(T,L)},I.useEffectEvent=function(T){return Y.H.useEffectEvent(T)},I.useId=function(){return Y.H.useId()},I.useImperativeHandle=function(T,L,B){return Y.H.useImperativeHandle(T,L,B)},I.useInsertionEffect=function(T,L){return Y.H.useInsertionEffect(T,L)},I.useLayoutEffect=function(T,L){return Y.H.useLayoutEffect(T,L)},I.useMemo=function(T,L){return Y.H.useMemo(T,L)},I.useOptimistic=function(T,L){return Y.H.useOptimistic(T,L)},I.useReducer=function(T,L,B){return Y.H.useReducer(T,L,B)},I.useRef=function(T){return Y.H.useRef(T)},I.useState=function(T){return Y.H.useState(T)},I.useSyncExternalStore=function(T,L,B){return Y.H.useSyncExternalStore(T,L,B)},I.useTransition=function(){return Y.H.useTransition()},I.version="19.2.4",I}var Hm;function wf(){return Hm||(Hm=1,fc.exports=rb()),fc.exports}var Hn=wf();const Me=Bi(Hn),sb="_button_18hrg_1",cb="_disabled_18hrg_30",fb="_fullWidth_18hrg_127",ob="_button__leftIcon_18hrg_133",db="_button__rightIcon_18hrg_134",ua={button:sb,disabled:cb,"buttonType-muted":"_buttonType-muted_18hrg_34","buttonType-primary":"_buttonType-primary_18hrg_50","buttonType-negative":"_buttonType-negative_18hrg_80","buttonSize-xxs":"_buttonSize-xxs_18hrg_97","buttonSize-xs":"_buttonSize-xs_18hrg_102","buttonSize-s":"_buttonSize-s_18hrg_107","buttonSize-m":"_buttonSize-m_18hrg_112","buttonSize-l":"_buttonSize-l_18hrg_117","buttonSize-xl":"_buttonSize-xl_18hrg_122",fullWidth:fb,button__leftIcon:ob,button__rightIcon:db};function hb(r){var l,u=r.children,c=r.className,d=r.disabled,f=r.buttonType,h=f===void 0?"muted":f,v=r.buttonSize,g=v===void 0?"m":v,y=r.fullWidth,_=r.onClick,S=r.style,p=r.leftIcon,R=r.rightIcon,x=r.type,G=x===void 0?"button":x;return Me.createElement("button",{type:G,className:au(ua.button,ua["buttonType-".concat(h)],ua["buttonSize-".concat(g)],(l={},l[ua.disabled]=d,l[ua.fullWidth]=y,l),c),disabled:d,onClick:_,style:S},p&&Me.createElement("span",{className:ua.button__leftIcon},p),u&&Me.createElement("span",null,u),R&&Me.createElement("span",{className:ua.button__rightIcon},R))}var Gi=function(){return Gi=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Gi.apply(this,arguments)};function Bm(r){return r===r.toLowerCase()?r:r.replace(/[A-Z]/g,function(l){return"-".concat(l.toLowerCase())})}function mb(r,l){return l===void 0&&(l=!1),Gi(Gi({padding:l?void 0:r.bodyPadding.map(function(u){return"".concat(u,"px")}).join(" ")},Object.fromEntries(Object.entries(r.theme).flatMap(function(u){var c,d=u[0],f=u[1];return[["--".concat(Bm(d)),f],["--".concat(Bm("".concat(d,"RgbComponents"))),((c=f.match(/rgb\((\d+, \d+, \d+)\)/))===null||c===void 0?void 0:c[1])||void 0]]}))),r.cssDesignTokens)}const yb="_themeVariables_1oghx_1",vb="_canvas_1oghx_85",Ym={themeVariables:yb,canvas:vb};var _b=Hn.createContext(null);function pb(r){var l=r.ctx,u=r.children,c=r.noAutoResizer,d=l.mode;Hn.useEffect(function(){if(!c&&"startAutoResizer"in l){var h=l;return h.startAutoResizer(),function(){h.stopAutoResizer()}}},[d,c]);var f=l.cssDesignTokens["--color--scrollbar--fill"];return Hn.useEffect(function(){if(!(typeof document>"u"||!f)){var h="--color--scrollbar--fill",v=document.documentElement,g=v.style.getPropertyValue(h);return v.style.setProperty(h,f),function(){g?v.style.setProperty(h,g):v.style.removeProperty(h)}}},[f]),Me.createElement(_b.Provider,{value:l},Me.createElement("div",{className:au(Ym.themeVariables,Ym.canvas),style:mb(l)},u))}var Oi={exports:{}},Ve={},Xm;function Af(){if(Xm)return Ve;Xm=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.DATA_CLONE_ERROR=Ve.MESSAGE=Ve.REJECTED=Ve.FULFILLED=Ve.REPLY=Ve.CALL=Ve.HANDSHAKE_REPLY=Ve.HANDSHAKE=void 0;const r="handshake";Ve.HANDSHAKE=r;const l="handshake-reply";Ve.HANDSHAKE_REPLY=l;const u="call";Ve.CALL=u;const c="reply";Ve.REPLY=c;const d="fulfilled";Ve.FULFILLED=d;const f="rejected";Ve.REJECTED=f;const h="message";Ve.MESSAGE=h;const v="DataCloneError";return Ve.DATA_CLONE_ERROR=v,Ve}var Lt={},Vm;function pv(){if(Vm)return Lt;Vm=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.ERR_NO_IFRAME_SRC=Lt.ERR_NOT_IN_IFRAME=Lt.ERR_CONNECTION_TIMEOUT=Lt.ERR_CONNECTION_DESTROYED=void 0;const r="ConnectionDestroyed";Lt.ERR_CONNECTION_DESTROYED=r;const l="ConnectionTimeout";Lt.ERR_CONNECTION_TIMEOUT=l;const u="NotInIframe";Lt.ERR_NOT_IN_IFRAME=u;const c="NoIframeSrc";return Lt.ERR_NO_IFRAME_SRC=c,Lt}var wi={exports:{}},Qm;function gb(){return Qm||(Qm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=()=>{const c=[];let d=!1;return{destroy(){d=!0,c.forEach(f=>{f()})},onDestroy(f){d?f():c.push(f)}}};l.default=u,r.exports=l.default})(wi,wi.exports)),wi.exports}var Ai={exports:{}},ia={},Zm;function gv(){if(Zm)return ia;Zm=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.deserializeError=ia.serializeError=void 0;const r=u=>{let c=u.name,d=u.message,f=u.stack;return{name:c,message:d,stack:f}};ia.serializeError=r;const l=u=>{const c=new Error;return Object.keys(u).forEach(d=>c[d]=u[d]),c};return ia.deserializeError=l,ia}var Km;function bb(){return Km||(Km=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=gv(),d=(f,h,v)=>{const g=f.localName,y=f.local,_=f.remote,S=f.originForSending,p=f.originForReceiving;let R=!1;v(`${g}: Connecting call receiver`);const x=G=>{if(G.source!==_||G.data.penpal!==u.CALL)return;if(G.origin!==p){v(`${g} received message from origin ${G.origin} which did not match expected origin ${p}`);return}const W=G.data,k=W.methodName,oe=W.args,ae=W.id;v(`${g}: Received ${k}() call`);const P=me=>re=>{if(v(`${g}: Sending ${k}() reply`),R){v(`${g}: Unable to send ${k}() reply due to destroyed connection`);return}const Y={penpal:u.REPLY,id:ae,resolution:me,returnValue:re};me===u.REJECTED&&re instanceof Error&&(Y.returnValue=(0,c.serializeError)(re),Y.returnValueIsError=!0);try{_.postMessage(Y,S)}catch(Ae){throw Ae.name===u.DATA_CLONE_ERROR&&_.postMessage({penpal:u.REPLY,id:ae,resolution:u.REJECTED,returnValue:(0,c.serializeError)(Ae),returnValueIsError:!0},S),Ae}};new Promise(me=>me(h[k].apply(h,oe))).then(P(u.FULFILLED),P(u.REJECTED))};return y.addEventListener(u.MESSAGE,x),()=>{R=!0,y.removeEventListener(u.MESSAGE,x)}};l.default=d,r.exports=l.default})(Ai,Ai.exports)),Ai.exports}var qi={exports:{}},Ci={exports:{}},Jm;function Sb(){return Jm||(Jm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;let u=0;var c=()=>++u;l.default=c,r.exports=l.default})(Ci,Ci.exports)),Ci.exports}var $m;function Eb(){return $m||($m=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=pv(),d=h(Sb()),f=gv();function h(g){return g&&g.__esModule?g:{default:g}}var v=(g,y,_,S,p)=>{const R=y.localName,x=y.local,G=y.remote,W=y.originForSending,k=y.originForReceiving;let oe=!1;p(`${R}: Connecting call sender`);const ae=P=>function(){for(var me=arguments.length,re=new Array(me),Y=0;Y<me;Y++)re[Y]=arguments[Y];p(`${R}: Sending ${P}() call`);let Ae;try{G.closed&&(Ae=!0)}catch{Ae=!0}if(Ae&&S(),oe){const Ue=new Error(`Unable to send ${P}() call due to destroyed connection`);throw Ue.code=c.ERR_CONNECTION_DESTROYED,Ue}return new Promise((Ue,Ut)=>{const Ie=(0,d.default)(),xe=ye=>{if(ye.source!==G||ye.data.penpal!==u.REPLY||ye.data.id!==Ie)return;if(ye.origin!==k){p(`${R} received message from origin ${ye.origin} which did not match expected origin ${k}`);return}p(`${R}: Received ${P}() reply`),x.removeEventListener(u.MESSAGE,xe);let Pe=ye.data.returnValue;ye.data.returnValueIsError&&(Pe=(0,f.deserializeError)(Pe)),(ye.data.resolution===u.FULFILLED?Ue:Ut)(Pe)};x.addEventListener(u.MESSAGE,xe),G.postMessage({penpal:u.CALL,id:Ie,methodName:P,args:re},W)})};return _.reduce((P,me)=>(P[me]=ae(me),P),g),()=>{oe=!0}};l.default=v,r.exports=l.default})(qi,qi.exports)),qi.exports}var zi={exports:{}},km;function Tb(){return km||(km=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=c=>function(){if(c){for(var d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];console.log("[Penpal]",...f)}};l.default=u,r.exports=l.default})(zi,zi.exports)),zi.exports}var Fm;function Ob(){return Fm||(Fm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=pv(),d=g(gb()),f=g(bb()),h=g(Eb()),v=g(Tb());function g(_){return _&&_.__esModule?_:{default:_}}var y=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=S.parentOrigin,R=p===void 0?"*":p,x=S.methods,G=x===void 0?{}:x,W=S.timeout,k=S.debug;const oe=(0,v.default)(k);if(window===window.top){const Ue=new Error("connectToParent() must be called within an iframe");throw Ue.code=c.ERR_NOT_IN_IFRAME,Ue}const ae=(0,d.default)(),P=ae.destroy,me=ae.onDestroy,re=window,Y=re.parent;return{promise:new Promise((Ue,Ut)=>{let Ie;W!==void 0&&(Ie=setTimeout(()=>{const ye=new Error(`Connection to parent timed out after ${W}ms`);ye.code=c.ERR_CONNECTION_TIMEOUT,Ut(ye),P()},W));const xe=ye=>{try{clearTimeout()}catch{return}if(ye.source!==Y||ye.data.penpal!==u.HANDSHAKE_REPLY)return;if(R!=="*"&&R!==ye.origin){oe(`Child received handshake reply from origin ${ye.origin} which did not match expected origin ${R}`);return}oe("Child: Received handshake reply"),re.removeEventListener(u.MESSAGE,xe);const Pe={localName:"Child",local:re,remote:Y,originForSending:ye.origin==="null"?"*":ye.origin,originForReceiving:ye.origin},nt={},U=(0,f.default)(Pe,G,oe);me(U);const H=(0,h.default)(nt,Pe,ye.data.methodNames,P,oe);me(H),clearTimeout(Ie),Ue(nt)};re.addEventListener(u.MESSAGE,xe),me(()=>{re.removeEventListener(u.MESSAGE,xe);const ye=new Error("Connection destroyed");ye.code=c.ERR_CONNECTION_DESTROYED,Ut(ye)}),oe("Child: Sending handshake"),Y.postMessage({penpal:u.HANDSHAKE,methodNames:Object.keys(G)},R)}),destroy:P}};l.default=y,r.exports=l.default})(Oi,Oi.exports)),Oi.exports}var wb=Ob();const Ab=Bi(wb);var Vt=function(){return Vt=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Vt.apply(this,arguments)};function Im(r,l){for(var u=Vt({},r),c=0,d=l;c<d.length;c++){var f=d[c];delete u[f]}return u}function oc(r){return function(l,u){if(r){for(var c={},d=0,f=l;d<f.length;d++){var h=f[d],v=u.itemTypes[h.relationships.item_type.data.id];c[h.id]=r(h,Vt(Vt({},u),{itemType:v}))}return c}}}function fn(r,l){var u=function(c,d,f){if(f.mode===r){var h=Cb(d),v=function(g){l(c,Vt(Vt(Vt({},d),g),h))};return v(f),v}};return u.mode=r,u}function lu(r,l){var u=function(c,d,f){if(f.mode===r){var h=function(v){l(c,Vt(Vt({},d),v))};return h(f),h}};return u.mode=r,u}function qb(){for(var r=document.querySelectorAll("body *"),l=0,u=0;u<r.length;u++)l=Math.max(r[u].getBoundingClientRect().bottom,l);return l}var Cb=function(r){var l=null,u=function(y){var _=y===void 0?Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.getBoundingClientRect().height,qb()):y;_!==l&&(r.setHeight(_),l=_)},c=null,d=null,f=function(){return u()},h=function(){u(),c||(c=new ResizeObserver(f),c.observe(document.documentElement)),d||(d=new MutationObserver(f),d.observe(window.document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))},v=function(){c&&(c.disconnect(),c=null),d&&(d.disconnect(),d=null)},g=function(){return!!c};return{updateHeight:u,startAutoResizer:h,stopAutoResizer:v,isAutoResizerActive:g}},zb=fn("renderAssetSource",function(r,l){r.renderAssetSource&&r.renderAssetSource(l.assetSourceId,l)}),Db=fn("renderConfigScreen",function(r,l){r.renderConfigScreen&&r.renderConfigScreen(l)}),Rb=fn("renderFieldExtension",function(r,l){r.renderFieldExtension&&r.renderFieldExtension(l.fieldExtensionId,l)}),Mb=lu("renderInspector",function(r,l){r.renderInspector&&r.renderInspector(l.inspectorId,l)}),Ub=lu("renderInspectorPanel",function(r,l){r.renderInspectorPanel&&r.renderInspectorPanel(l.panelId,l)}),xb=fn("renderItemCollectionOutlet",function(r,l){r.renderItemCollectionOutlet&&r.renderItemCollectionOutlet(l.itemCollectionOutletId,l)}),Nb=fn("renderItemFormOutlet",function(r,l){r.renderItemFormOutlet&&r.renderItemFormOutlet(l.itemFormOutletId,l)}),jb=lu("renderItemFormSidebar",function(r,l){r.renderItemFormSidebar&&r.renderItemFormSidebar(l.sidebarId,l)}),Lb=fn("renderItemFormSidebarPanel",function(r,l){r.renderItemFormSidebarPanel&&r.renderItemFormSidebarPanel(l.sidebarPaneId,l)}),Gb=fn("renderManualFieldExtensionConfigScreen",function(r,l){r.renderManualFieldExtensionConfigScreen&&r.renderManualFieldExtensionConfigScreen(l.fieldExtensionId,l)}),Hb=fn("renderModal",function(r,l){r.renderModal&&r.renderModal(l.modalId,l)}),Bb=lu("renderPage",function(r,l){r.renderPage&&r.renderPage(l.pageId,l)}),Yb=lu("renderUploadSidebar",function(r,l){r.renderUploadSidebar&&r.renderUploadSidebar(l.sidebarId,l)}),Xb=fn("renderUploadSidebarPanel",function(r,l){r.renderUploadSidebarPanel&&r.renderUploadSidebarPanel(l.sidebarPaneId,l)}),Dt=function(){return Dt=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Dt.apply(this,arguments)},Vb=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})},Qb=function(r,l){var u={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},c,d,f,h=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return h.next=v(0),h.throw=v(1),h.return=v(2),typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function v(y){return function(_){return g([y,_])}}function g(y){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,y[0]&&(u=0)),u;)try{if(c=1,d&&(f=y[0]&2?d.return:y[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,y[1])).done)return f;switch(d=0,f&&(y=[y[0]&2,f.value]),y[0]){case 0:case 1:f=y;break;case 4:return u.label++,{value:y[1],done:!1};case 5:u.label++,d=y[1],y=[0];continue;case 7:y=u.ops.pop(),u.trys.pop();continue;default:if(f=u.trys,!(f=f.length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){u=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){u.label=y[1];break}if(y[0]===6&&u.label<f[1]){u.label=f[1],f=y;break}if(f&&u.label<f[2]){u.label=f[2],u.ops.push(y);break}f[2]&&u.ops.pop(),u.trys.pop();continue}y=l.call(r,u)}catch(_){y=[6,_],d=0}finally{c=f=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}},Pm=function(r,l,u){if(u||arguments.length===2)for(var c=0,d=l.length,f;c<d;c++)(f||!(c in l))&&(f||(f=Array.prototype.slice.call(l,0,c)),f[c]=l[c]);return r.concat(f||Array.prototype.slice.call(l))};function Wm(r){if(!(typeof document>"u")){var l=r?.colorScheme;l!=="light"&&l!=="dark"||document.documentElement.dataset.colorScheme!==l&&(document.documentElement.dataset.colorScheme=l,document.documentElement.style.colorScheme=l)}}function Zb(){return Vb(this,arguments,void 0,function(r){var l,u,c,d,f,h,v,g,y,_,S,p;return r===void 0&&(r={}),Qb(this,function(R){switch(R.label){case 0:return l=null,u=null,c=Dt(Dt({},r),{overrideFieldExtensions:oc(r.overrideFieldExtensions),customMarksForStructuredTextField:oc(r.customMarksForStructuredTextField),customBlockStylesForStructuredTextField:oc(r.customBlockStylesForStructuredTextField)}),d=Ab({methods:Dt(Dt({sdkVersion:function(){return"0.3.1"},implementedHooks:function(){return Object.fromEntries(Object.keys(r).map(function(x){return[x,!0]}))}},Object.fromEntries(Object.entries(c).filter(function(x){var G=x[0];return!G.startsWith("render")}))),{onChange:function(x){Wm(x),l&&l(x)},callMethodMergingBootCtx:function(x,G,W,k,oe){return u?u(x,G,W,k,oe):null}})}),[4,d.promise];case 1:return f=R.sent(),[4,f.getSettings()];case 2:for(h=R.sent(),Wm(h),h.mode==="onBoot"&&(v=h,l=function(x){v=x},u=function(x,G,W,k,oe){var ae;if(x in c)return(ae=c)[x].apply(ae,Pm(Pm([],G,!1),[Dt(Dt(Dt(Dt({},Im(f,["getSettings","setHeight"])),Im(v,["mode","bodyPadding"])),Object.fromEntries(k.map(function(P){return[P,function(){for(var re=[],Y=0;Y<arguments.length;Y++)re[Y]=arguments[Y];return f.callAdditionalCtxMethod(oe,P,re)}]}))),W)],!1))},c.onBoot&&c.onBoot(Dt(Dt({},f),v))),g={renderAssetSource:zb,renderConfigScreen:Db,renderFieldExtension:Rb,renderItemCollectionOutlet:xb,renderItemFormOutlet:Nb,renderItemFormSidebar:jb,renderItemFormSidebarPanel:Lb,renderManualFieldExtensionConfigScreen:Gb,renderModal:Hb,renderPage:Bb,renderInspector:Mb,renderInspectorPanel:Ub,renderUploadSidebar:Yb,renderUploadSidebarPanel:Xb},y=0,_=Object.values(g);y<_.length;y++)if(S=_[y],p=S(c,f,h),p){l=p;break}return[2]}})})}var dc={exports:{}},We={};var ey;function Kb(){if(ey)return We;ey=1;var r=wf();function l(g){var y="https://react.dev/errors/"+g;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)y+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+g+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(l(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,y,_){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:g,containerInfo:y,implementation:_}}var h=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,y){if(g==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,We.createPortal=function(g,y){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(l(299));return f(g,y,null,_)},We.flushSync=function(g){var y=h.T,_=c.p;try{if(h.T=null,c.p=2,g)return g()}finally{h.T=y,c.p=_,c.d.f()}},We.preconnect=function(g,y){typeof g=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(g,y))},We.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},We.preinit=function(g,y){if(typeof g=="string"&&y&&typeof y.as=="string"){var _=y.as,S=v(_,y.crossOrigin),p=typeof y.integrity=="string"?y.integrity:void 0,R=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;_==="style"?c.d.S(g,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:S,integrity:p,fetchPriority:R}):_==="script"&&c.d.X(g,{crossOrigin:S,integrity:p,fetchPriority:R,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},We.preinitModule=function(g,y){if(typeof g=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var _=v(y.as,y.crossOrigin);c.d.M(g,{crossOrigin:_,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(g)},We.preload=function(g,y){if(typeof g=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var _=y.as,S=v(_,y.crossOrigin);c.d.L(g,_,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},We.preloadModule=function(g,y){if(typeof g=="string")if(y){var _=v(y.as,y.crossOrigin);c.d.m(g,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:_,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(g)},We.requestFormReset=function(g){c.d.r(g)},We.unstable_batchedUpdates=function(g,y){return g(y)},We.useFormState=function(g,y,_){return h.H.useFormState(g,y,_)},We.useFormStatus=function(){return h.H.useHostTransitionStatus()},We.version="19.2.4",We}var ty;function Jb(){if(ty)return dc.exports;ty=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(l){console.error(l)}}return r(),dc.exports=Kb(),dc.exports}const $b="_fieldError_kqzsn_1",kb={fieldError:$b};function Fb(r){var l=r.children;return Me.createElement("div",{className:kb.fieldError},l)}const Ib="_fieldHint_1q1d1_1",Pb={fieldHint:Ib};function Wb(r){var l=r.children;return Me.createElement("div",{className:Pb.fieldHint},l)}var pf=function(){return pf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},pf.apply(this,arguments)};function e0(r){var l=r.id,u=r.label,c=r.hint,d=r.error,f=r.required,h=r.formLabelProps,v=r.children;return Me.createElement(Me.Fragment,null,Me.createElement(i0,pf({},h,{htmlFor:l,required:f,error:!!d}),u),v,d&&Me.createElement(Fb,null,d),c&&Me.createElement(Wb,null,c))}const t0="_formLabel_12h4v_1",n0="_formLabel__code_12h4v_8",a0="_formLabel__label_12h4v_18",l0="_formLabel__required_12h4v_30",Il={formLabel:t0,formLabel__code:n0,"formLabel--error":"_formLabel--error_12h4v_14",formLabel__label:a0,formLabel__required:l0};var gf=function(){return gf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},gf.apply(this,arguments)},u0=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u},i0=function(r){var l,u=r.children,c=r.className,d=r.htmlFor,f=r.code,h=r.required,v=h===void 0?!1:h,g=r.error,y=g===void 0?!1:g,_=u0(r,["children","className","htmlFor","code","required","error"]),S=au(Il.formLabel,c,(l={},l[Il["formLabel--error"]]=y,l));return Me.createElement("label",gf({className:S,htmlFor:d},_),Me.createElement("span",{className:Il.formLabel__label},u,v&&Me.createElement("span",{className:Il.formLabel__required},"*")),f&&Me.createElement("span",{className:Il.formLabel__code},f))};const r0="_Spinner__bar_1u42l_13",hc={"Spinner--inline":"_Spinner--inline_1u42l_1","Spinner--centered":"_Spinner--centered_1u42l_7",Spinner__bar:r0};var Hi=function(){return Hi=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Hi.apply(this,arguments)};function s0(r){for(var l,u=r.size,c=u===void 0?32:u,d=r.placement,f=d===void 0?"inline":d,h=r.style,v=h===void 0?{}:h,g=[],y=0;y<12;y+=1){var _={};_.animationDelay="".concat((y-12)/10,"s"),_.transform="rotate(".concat(y*30,"deg) translate(146%)"),g.push(Me.createElement("div",{style:_,className:hc.Spinner__bar,key:y}))}var S={width:c*.5,height:c*.5};return f==="inline"&&(S.marginLeft=c*.5,S.transform="translateY(33%)"),Me.createElement("div",{className:au((l={},l[hc["Spinner--inline"]]=f==="inline",l[hc["Spinner--centered"]]=f==="centered",l)),style:Hi(Hi({},v),S)},g)}var bf=function(){return bf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},bf.apply(this,arguments)};function c0(r){var l=r.id,u=r.name,c=r.label,d=r.hint,f=r.error,h=r.required,v=r.placeholder,g=r.formLabelProps,y=r.value,_=r.onChange,S=r.textInputProps;return Me.createElement(e0,{formLabelProps:g,id:l,required:h,error:f,hint:d,label:c},Me.createElement(d0,bf({},S,{id:l,name:u,value:y,placeholder:v,onChange:_,error:!!f})))}const f0="_TextInput_1kqkh_1",Di={TextInput:f0,"TextInput--monospaced":"_TextInput--monospaced_1kqkh_32","TextInput--disabled":"_TextInput--disabled_1kqkh_37","TextInput--error":"_TextInput--error_1kqkh_43"};var Sf=function(){return Sf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Sf.apply(this,arguments)},o0=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u},d0=function(r){var l,u=r.className,c=r.disabled,d=c===void 0?!1:c,f=r.error,h=r.id,v=r.inputRef,g=r.maxLength,y=r.name,_=r.labelText,S=r.onBlur,p=r.onChange,R=r.placeholder,x=r.required,G=x===void 0?!1:x,W=r.type,k=r.value,oe=r.monospaced,ae=o0(r,["className","disabled","error","id","inputRef","maxLength","name","labelText","onBlur","onChange","placeholder","required","type","value","monospaced"]),P=Hn.useCallback(function(re){p&&p(re.target.value,re)},[p]),me=au(Di.TextInput,u,(l={},l[Di["TextInput--disabled"]]=d,l[Di["TextInput--error"]]=f,l[Di["TextInput--monospaced"]]=oe,l));return Me.createElement("input",Sf({className:me,"aria-label":_,id:h,name:y,required:G,placeholder:R,maxLength:g,disabled:d,onBlur:S,onChange:P,value:k,type:W,ref:v},ae))};const h0="_form_hqp8e_1",m0={form:h0},ny="https://alttext.ai/account/api_keys",y0="API key saved!",v0="Failed to save API key:";function _0(r){const u=r.plugin.attributes.parameters.apiKey;return typeof u=="string"?u:""}async function p0(r,l,u){u(!0);try{await r.updatePluginParameters({apiKey:l.trim()}),r.customToast({type:"notice",message:y0,dismissOnPageChange:!0,dismissAfterTimeout:5e3})}catch(c){const d=c instanceof Error?c.message:String(c??"Unknown error");await r.alert(`${v0} ${d}`)}finally{u(!1)}}function g0({ctx:r}){const[l,u]=Hn.useState(_0(r)),[c,d]=Hn.useState(!1);return cn.jsxs(pb,{ctx:r,children:[cn.jsxs("div",{className:m0.form,children:[cn.jsx(c0,{required:!0,name:"altTextAPIKey",id:"altTextAPIKey",label:"Alt Text API Key",value:l,onChange:f=>u(f)}),cn.jsxs("p",{children:["You can get your API key by going to"," ",cn.jsx("a",{href:ny,target:"_blank",rel:"noreferrer",children:ny})]})]}),cn.jsxs(hb,{disabled:c||l.trim()==="",fullWidth:!0,onClick:()=>{p0(r,l,d)},children:["Save ",c&&cn.jsx(s0,{size:24})]})]})}var mc={exports:{}},Pl={},yc={exports:{}},vc={};var ay;function b0(){return ay||(ay=1,(function(r){function l(U,H){var $=U.length;U.push(H);e:for(;0<$;){var be=$-1>>>1,Oe=U[be];if(0<d(Oe,H))U[be]=H,U[$]=Oe,$=be;else break e}}function u(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var H=U[0],$=U.pop();if($!==H){U[0]=$;e:for(var be=0,Oe=U.length,T=Oe>>>1;be<T;){var L=2*(be+1)-1,B=U[L],Q=L+1,ee=U[Q];if(0>d(B,$))Q<Oe&&0>d(ee,B)?(U[be]=ee,U[Q]=$,be=Q):(U[be]=B,U[L]=$,be=L);else if(Q<Oe&&0>d(ee,$))U[be]=ee,U[Q]=$,be=Q;else break e}}return H}function d(U,H){var $=U.sortIndex-H.sortIndex;return $!==0?$:U.id-H.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;r.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();r.unstable_now=function(){return h.now()-v}}var g=[],y=[],_=1,S=null,p=3,R=!1,x=!1,G=!1,W=!1,k=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function P(U){for(var H=u(y);H!==null;){if(H.callback===null)c(y);else if(H.startTime<=U)c(y),H.sortIndex=H.expirationTime,l(g,H);else break;H=u(y)}}function me(U){if(G=!1,P(U),!x)if(u(g)!==null)x=!0,re||(re=!0,xe());else{var H=u(y);H!==null&&nt(me,H.startTime-U)}}var re=!1,Y=-1,Ae=5,Ue=-1;function Ut(){return W?!0:!(r.unstable_now()-Ue<Ae)}function Ie(){if(W=!1,re){var U=r.unstable_now();Ue=U;var H=!0;try{e:{x=!1,G&&(G=!1,oe(Y),Y=-1),R=!0;var $=p;try{t:{for(P(U),S=u(g);S!==null&&!(S.expirationTime>U&&Ut());){var be=S.callback;if(typeof be=="function"){S.callback=null,p=S.priorityLevel;var Oe=be(S.expirationTime<=U);if(U=r.unstable_now(),typeof Oe=="function"){S.callback=Oe,P(U),H=!0;break t}S===u(g)&&c(g),P(U)}else c(g);S=u(g)}if(S!==null)H=!0;else{var T=u(y);T!==null&&nt(me,T.startTime-U),H=!1}}break e}finally{S=null,p=$,R=!1}H=void 0}}finally{H?xe():re=!1}}}var xe;if(typeof ae=="function")xe=function(){ae(Ie)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Pe=ye.port2;ye.port1.onmessage=Ie,xe=function(){Pe.postMessage(null)}}else xe=function(){k(Ie,0)};function nt(U,H){Y=k(function(){U(r.unstable_now())},H)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ae=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return p},r.unstable_next=function(U){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var $=p;p=H;try{return U()}finally{p=$}},r.unstable_requestPaint=function(){W=!0},r.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var $=p;p=U;try{return H()}finally{p=$}},r.unstable_scheduleCallback=function(U,H,$){var be=r.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?be+$:be):$=be,U){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=$+Oe,U={id:_++,callback:H,priorityLevel:U,startTime:$,expirationTime:Oe,sortIndex:-1},$>be?(U.sortIndex=$,l(y,U),u(g)===null&&U===u(y)&&(G?(oe(Y),Y=-1):G=!0,nt(me,$-be))):(U.sortIndex=Oe,l(g,U),x||R||(x=!0,re||(re=!0,xe()))),U},r.unstable_shouldYield=Ut,r.unstable_wrapCallback=function(U){var H=p;return function(){var $=p;p=H;try{return U.apply(this,arguments)}finally{p=$}}}})(vc)),vc}var ly;function S0(){return ly||(ly=1,yc.exports=b0()),yc.exports}var uy;function E0(){if(uy)return Pl;uy=1;var r=S0(),l=wf(),u=Jb();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return g(i),e;if(s===a)return g(i),t;s=s.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=s;else{for(var o=!1,m=i.child;m;){if(m===n){o=!0,n=i,a=s;break}if(m===a){o=!0,a=i,n=s;break}m=m.sibling}if(!o){for(m=s.child;m;){if(m===n){o=!0,n=s,a=i;break}if(m===a){o=!0,a=s,n=i;break}m=m.sibling}if(!o)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,p=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),Ue=Symbol.for("react.activity"),Ut=Symbol.for("react.memo_cache_sentinel"),Ie=Symbol.iterator;function xe(e){return e===null||typeof e!="object"?null:(e=Ie&&e[Ie]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function Pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case k:return"Profiler";case W:return"StrictMode";case me:return"Suspense";case re:return"SuspenseList";case Ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case ae:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Pe(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return Pe(e(t))}catch{}}return null}var nt=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},be=[],Oe=-1;function T(e){return{current:e}}function L(e){0>Oe||(e.current=be[Oe],be[Oe]=null,Oe--)}function B(e,t){Oe++,be[Oe]=e.current,e.current=t}var Q=T(null),ee=T(null),le=T(null),_e=T(null);function et(e,t){switch(B(le,t),B(ee,e),B(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lm(t),e=um(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(Q),B(Q,e)}function Ne(){L(Q),L(ee),L(le)}function al(e){e.memoizedState!==null&&B(_e,e);var t=Q.current,n=um(t,e.type);t!==n&&(B(ee,e),B(Q,n))}function uu(e){ee.current===e&&(L(Q),L(ee)),_e.current===e&&(L(_e),Kl._currentValue=$)}var Qi,Uf;function Bn(e){if(Qi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qi=t&&t[1]||"",Uf=-1<n.stack.indexOf(`
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function u(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function c(d){if(d.ep)return;d.ep=!0;const f=u(d);fetch(d.href,f)}})();var Ti=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var sc={exports:{}},Fl={};var Nm;function ab(){if(Nm)return Fl;Nm=1;var r=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function u(c,d,f){var h=null;if(f!==void 0&&(h=""+f),d.key!==void 0&&(h=""+d.key),"key"in d){f={};for(var v in d)v!=="key"&&(f[v]=d[v])}else f=d;return d=f.ref,{$$typeof:r,type:c,key:h,ref:d!==void 0?d:null,props:f}}return Fl.Fragment=l,Fl.jsx=u,Fl.jsxs=u,Fl}var jm;function lb(){return jm||(jm=1,sc.exports=ab()),sc.exports}var cn=lb(),cc={exports:{}};var Lm;function ub(){return Lm||(Lm=1,(function(r){(function(){var l={}.hasOwnProperty;function u(){for(var f="",h=0;h<arguments.length;h++){var v=arguments[h];v&&(f=d(f,c(v)))}return f}function c(f){if(typeof f=="string"||typeof f=="number")return f;if(typeof f!="object")return"";if(Array.isArray(f))return u.apply(null,f);if(f.toString!==Object.prototype.toString&&!f.toString.toString().includes("[native code]"))return f.toString();var h="";for(var v in f)l.call(f,v)&&f[v]&&(h=d(h,v));return h}function d(f,h){return h?f?f+" "+h:f+h:f}r.exports?(u.default=u,r.exports=u):window.classNames=u})()})(cc)),cc.exports}var ib=ub();const au=Bi(ib);var fc={exports:{}},I={};var Gm;function rb(){if(Gm)return I;Gm=1;var r=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),p=Symbol.iterator;function R(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,W={};function k(T,L,B){this.props=T,this.context=L,this.refs=W,this.updater=B||x}k.prototype.isReactComponent={},k.prototype.setState=function(T,L){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,L,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function oe(){}oe.prototype=k.prototype;function ae(T,L,B){this.props=T,this.context=L,this.refs=W,this.updater=B||x}var P=ae.prototype=new oe;P.constructor=ae,G(P,k.prototype),P.isPureReactComponent=!0;var me=Array.isArray;function re(){}var Y={H:null,A:null,T:null,S:null},Ae=Object.prototype.hasOwnProperty;function Ue(T,L,B){var Q=B.ref;return{$$typeof:r,type:T,key:L,ref:Q!==void 0?Q:null,props:B}}function Ut(T,L){return Ue(T.type,L,T.props)}function Ie(T){return typeof T=="object"&&T!==null&&T.$$typeof===r}function xe(T){var L={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(B){return L[B]})}var ye=/\/+/g;function Pe(T,L){return typeof T=="object"&&T!==null&&T.key!=null?xe(""+T.key):L.toString(36)}function nt(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(re,re):(T.status="pending",T.then(function(L){T.status==="pending"&&(T.status="fulfilled",T.value=L)},function(L){T.status==="pending"&&(T.status="rejected",T.reason=L)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function U(T,L,B,Q,ee){var le=typeof T;(le==="undefined"||le==="boolean")&&(T=null);var _e=!1;if(T===null)_e=!0;else switch(le){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(T.$$typeof){case r:case l:_e=!0;break;case _:return _e=T._init,U(_e(T._payload),L,B,Q,ee)}}if(_e)return ee=ee(T),_e=Q===""?"."+Pe(T,0):Q,me(ee)?(B="",_e!=null&&(B=_e.replace(ye,"$&/")+"/"),U(ee,L,B,"",function(al){return al})):ee!=null&&(Ie(ee)&&(ee=Ut(ee,B+(ee.key==null||T&&T.key===ee.key?"":(""+ee.key).replace(ye,"$&/")+"/")+_e)),L.push(ee)),1;_e=0;var et=Q===""?".":Q+":";if(me(T))for(var Ne=0;Ne<T.length;Ne++)Q=T[Ne],le=et+Pe(Q,Ne),_e+=U(Q,L,B,le,ee);else if(Ne=R(T),typeof Ne=="function")for(T=Ne.call(T),Ne=0;!(Q=T.next()).done;)Q=Q.value,le=et+Pe(Q,Ne++),_e+=U(Q,L,B,le,ee);else if(le==="object"){if(typeof T.then=="function")return U(nt(T),L,B,Q,ee);throw L=String(T),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return _e}function H(T,L,B){if(T==null)return T;var Q=[],ee=0;return U(T,Q,"","",function(le){return L.call(B,le,ee++)}),Q}function $(T){if(T._status===-1){var L=T._result;L=L(),L.then(function(B){(T._status===0||T._status===-1)&&(T._status=1,T._result=B)},function(B){(T._status===0||T._status===-1)&&(T._status=2,T._result=B)}),T._status===-1&&(T._status=0,T._result=L)}if(T._status===1)return T._result.default;throw T._result}var be=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Oe={map:H,forEach:function(T,L,B){H(T,function(){L.apply(this,arguments)},B)},count:function(T){var L=0;return H(T,function(){L++}),L},toArray:function(T){return H(T,function(L){return L})||[]},only:function(T){if(!Ie(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return I.Activity=S,I.Children=Oe,I.Component=k,I.Fragment=u,I.Profiler=d,I.PureComponent=ae,I.StrictMode=c,I.Suspense=g,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,I.__COMPILER_RUNTIME={__proto__:null,c:function(T){return Y.H.useMemoCache(T)}},I.cache=function(T){return function(){return T.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(T,L,B){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=G({},T.props),ee=T.key;if(L!=null)for(le in L.key!==void 0&&(ee=""+L.key),L)!Ae.call(L,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&L.ref===void 0||(Q[le]=L[le]);var le=arguments.length-2;if(le===1)Q.children=B;else if(1<le){for(var _e=Array(le),et=0;et<le;et++)_e[et]=arguments[et+2];Q.children=_e}return Ue(T.type,ee,Q)},I.createContext=function(T){return T={$$typeof:h,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},I.createElement=function(T,L,B){var Q,ee={},le=null;if(L!=null)for(Q in L.key!==void 0&&(le=""+L.key),L)Ae.call(L,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ee[Q]=L[Q]);var _e=arguments.length-2;if(_e===1)ee.children=B;else if(1<_e){for(var et=Array(_e),Ne=0;Ne<_e;Ne++)et[Ne]=arguments[Ne+2];ee.children=et}if(T&&T.defaultProps)for(Q in _e=T.defaultProps,_e)ee[Q]===void 0&&(ee[Q]=_e[Q]);return Ue(T,le,ee)},I.createRef=function(){return{current:null}},I.forwardRef=function(T){return{$$typeof:v,render:T}},I.isValidElement=Ie,I.lazy=function(T){return{$$typeof:_,_payload:{_status:-1,_result:T},_init:$}},I.memo=function(T,L){return{$$typeof:y,type:T,compare:L===void 0?null:L}},I.startTransition=function(T){var L=Y.T,B={};Y.T=B;try{var Q=T(),ee=Y.S;ee!==null&&ee(B,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(re,be)}catch(le){be(le)}finally{L!==null&&B.types!==null&&(L.types=B.types),Y.T=L}},I.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},I.use=function(T){return Y.H.use(T)},I.useActionState=function(T,L,B){return Y.H.useActionState(T,L,B)},I.useCallback=function(T,L){return Y.H.useCallback(T,L)},I.useContext=function(T){return Y.H.useContext(T)},I.useDebugValue=function(){},I.useDeferredValue=function(T,L){return Y.H.useDeferredValue(T,L)},I.useEffect=function(T,L){return Y.H.useEffect(T,L)},I.useEffectEvent=function(T){return Y.H.useEffectEvent(T)},I.useId=function(){return Y.H.useId()},I.useImperativeHandle=function(T,L,B){return Y.H.useImperativeHandle(T,L,B)},I.useInsertionEffect=function(T,L){return Y.H.useInsertionEffect(T,L)},I.useLayoutEffect=function(T,L){return Y.H.useLayoutEffect(T,L)},I.useMemo=function(T,L){return Y.H.useMemo(T,L)},I.useOptimistic=function(T,L){return Y.H.useOptimistic(T,L)},I.useReducer=function(T,L,B){return Y.H.useReducer(T,L,B)},I.useRef=function(T){return Y.H.useRef(T)},I.useState=function(T){return Y.H.useState(T)},I.useSyncExternalStore=function(T,L,B){return Y.H.useSyncExternalStore(T,L,B)},I.useTransition=function(){return Y.H.useTransition()},I.version="19.2.4",I}var Hm;function wf(){return Hm||(Hm=1,fc.exports=rb()),fc.exports}var Hn=wf();const Me=Bi(Hn),sb="_button_nnl9b_1",cb="_disabled_nnl9b_30",fb="_fullWidth_nnl9b_127",ob="_button__leftIcon_nnl9b_133",db="_button__rightIcon_nnl9b_134",ua={button:sb,disabled:cb,"buttonType-muted":"_buttonType-muted_nnl9b_34","buttonType-primary":"_buttonType-primary_nnl9b_50","buttonType-negative":"_buttonType-negative_nnl9b_80","buttonSize-xxs":"_buttonSize-xxs_nnl9b_97","buttonSize-xs":"_buttonSize-xs_nnl9b_102","buttonSize-s":"_buttonSize-s_nnl9b_107","buttonSize-m":"_buttonSize-m_nnl9b_112","buttonSize-l":"_buttonSize-l_nnl9b_117","buttonSize-xl":"_buttonSize-xl_nnl9b_122",fullWidth:fb,button__leftIcon:ob,button__rightIcon:db};function hb(r){var l,u=r.children,c=r.className,d=r.disabled,f=r.buttonType,h=f===void 0?"muted":f,v=r.buttonSize,g=v===void 0?"m":v,y=r.fullWidth,_=r.onClick,S=r.style,p=r.leftIcon,R=r.rightIcon,x=r.type,G=x===void 0?"button":x;return Me.createElement("button",{type:G,className:au(ua.button,ua["buttonType-".concat(h)],ua["buttonSize-".concat(g)],(l={},l[ua.disabled]=d,l[ua.fullWidth]=y,l),c),disabled:d,onClick:_,style:S},p&&Me.createElement("span",{className:ua.button__leftIcon},p),u&&Me.createElement("span",null,u),R&&Me.createElement("span",{className:ua.button__rightIcon},R))}var Gi=function(){return Gi=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Gi.apply(this,arguments)};function Bm(r){return r===r.toLowerCase()?r:r.replace(/[A-Z]/g,function(l){return"-".concat(l.toLowerCase())})}function mb(r,l){return l===void 0&&(l=!1),Gi(Gi({padding:l?void 0:r.bodyPadding.map(function(u){return"".concat(u,"px")}).join(" ")},Object.fromEntries(Object.entries(r.theme).flatMap(function(u){var c,d=u[0],f=u[1];return[["--".concat(Bm(d)),f],["--".concat(Bm("".concat(d,"RgbComponents"))),((c=f.match(/rgb\((\d+, \d+, \d+)\)/))===null||c===void 0?void 0:c[1])||void 0]]}))),r.cssDesignTokens)}const yb="_themeVariables_11af8_1",vb="_canvas_11af8_85",Ym={themeVariables:yb,canvas:vb};var _b=Hn.createContext(null);function pb(r){var l=r.ctx,u=r.children,c=r.noAutoResizer,d=l.mode;Hn.useEffect(function(){if(!c&&"startAutoResizer"in l){var h=l;return h.startAutoResizer(),function(){h.stopAutoResizer()}}},[d,c]);var f=l.cssDesignTokens["--color--scrollbar--fill"];return Hn.useEffect(function(){if(!(typeof document>"u"||!f)){var h="--color--scrollbar--fill",v=document.documentElement,g=v.style.getPropertyValue(h);return v.style.setProperty(h,f),function(){g?v.style.setProperty(h,g):v.style.removeProperty(h)}}},[f]),Me.createElement(_b.Provider,{value:l},Me.createElement("div",{className:au(Ym.themeVariables,Ym.canvas),style:mb(l)},u))}var Oi={exports:{}},Ve={},Xm;function Af(){if(Xm)return Ve;Xm=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.DATA_CLONE_ERROR=Ve.MESSAGE=Ve.REJECTED=Ve.FULFILLED=Ve.REPLY=Ve.CALL=Ve.HANDSHAKE_REPLY=Ve.HANDSHAKE=void 0;const r="handshake";Ve.HANDSHAKE=r;const l="handshake-reply";Ve.HANDSHAKE_REPLY=l;const u="call";Ve.CALL=u;const c="reply";Ve.REPLY=c;const d="fulfilled";Ve.FULFILLED=d;const f="rejected";Ve.REJECTED=f;const h="message";Ve.MESSAGE=h;const v="DataCloneError";return Ve.DATA_CLONE_ERROR=v,Ve}var Lt={},Vm;function pv(){if(Vm)return Lt;Vm=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.ERR_NO_IFRAME_SRC=Lt.ERR_NOT_IN_IFRAME=Lt.ERR_CONNECTION_TIMEOUT=Lt.ERR_CONNECTION_DESTROYED=void 0;const r="ConnectionDestroyed";Lt.ERR_CONNECTION_DESTROYED=r;const l="ConnectionTimeout";Lt.ERR_CONNECTION_TIMEOUT=l;const u="NotInIframe";Lt.ERR_NOT_IN_IFRAME=u;const c="NoIframeSrc";return Lt.ERR_NO_IFRAME_SRC=c,Lt}var wi={exports:{}},Qm;function gb(){return Qm||(Qm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=()=>{const c=[];let d=!1;return{destroy(){d=!0,c.forEach(f=>{f()})},onDestroy(f){d?f():c.push(f)}}};l.default=u,r.exports=l.default})(wi,wi.exports)),wi.exports}var Ai={exports:{}},ia={},Zm;function gv(){if(Zm)return ia;Zm=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.deserializeError=ia.serializeError=void 0;const r=u=>{let c=u.name,d=u.message,f=u.stack;return{name:c,message:d,stack:f}};ia.serializeError=r;const l=u=>{const c=new Error;return Object.keys(u).forEach(d=>c[d]=u[d]),c};return ia.deserializeError=l,ia}var Km;function bb(){return Km||(Km=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=gv(),d=(f,h,v)=>{const g=f.localName,y=f.local,_=f.remote,S=f.originForSending,p=f.originForReceiving;let R=!1;v(`${g}: Connecting call receiver`);const x=G=>{if(G.source!==_||G.data.penpal!==u.CALL)return;if(G.origin!==p){v(`${g} received message from origin ${G.origin} which did not match expected origin ${p}`);return}const W=G.data,k=W.methodName,oe=W.args,ae=W.id;v(`${g}: Received ${k}() call`);const P=me=>re=>{if(v(`${g}: Sending ${k}() reply`),R){v(`${g}: Unable to send ${k}() reply due to destroyed connection`);return}const Y={penpal:u.REPLY,id:ae,resolution:me,returnValue:re};me===u.REJECTED&&re instanceof Error&&(Y.returnValue=(0,c.serializeError)(re),Y.returnValueIsError=!0);try{_.postMessage(Y,S)}catch(Ae){throw Ae.name===u.DATA_CLONE_ERROR&&_.postMessage({penpal:u.REPLY,id:ae,resolution:u.REJECTED,returnValue:(0,c.serializeError)(Ae),returnValueIsError:!0},S),Ae}};new Promise(me=>me(h[k].apply(h,oe))).then(P(u.FULFILLED),P(u.REJECTED))};return y.addEventListener(u.MESSAGE,x),()=>{R=!0,y.removeEventListener(u.MESSAGE,x)}};l.default=d,r.exports=l.default})(Ai,Ai.exports)),Ai.exports}var qi={exports:{}},Ci={exports:{}},Jm;function Sb(){return Jm||(Jm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;let u=0;var c=()=>++u;l.default=c,r.exports=l.default})(Ci,Ci.exports)),Ci.exports}var $m;function Eb(){return $m||($m=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=pv(),d=h(Sb()),f=gv();function h(g){return g&&g.__esModule?g:{default:g}}var v=(g,y,_,S,p)=>{const R=y.localName,x=y.local,G=y.remote,W=y.originForSending,k=y.originForReceiving;let oe=!1;p(`${R}: Connecting call sender`);const ae=P=>function(){for(var me=arguments.length,re=new Array(me),Y=0;Y<me;Y++)re[Y]=arguments[Y];p(`${R}: Sending ${P}() call`);let Ae;try{G.closed&&(Ae=!0)}catch{Ae=!0}if(Ae&&S(),oe){const Ue=new Error(`Unable to send ${P}() call due to destroyed connection`);throw Ue.code=c.ERR_CONNECTION_DESTROYED,Ue}return new Promise((Ue,Ut)=>{const Ie=(0,d.default)(),xe=ye=>{if(ye.source!==G||ye.data.penpal!==u.REPLY||ye.data.id!==Ie)return;if(ye.origin!==k){p(`${R} received message from origin ${ye.origin} which did not match expected origin ${k}`);return}p(`${R}: Received ${P}() reply`),x.removeEventListener(u.MESSAGE,xe);let Pe=ye.data.returnValue;ye.data.returnValueIsError&&(Pe=(0,f.deserializeError)(Pe)),(ye.data.resolution===u.FULFILLED?Ue:Ut)(Pe)};x.addEventListener(u.MESSAGE,xe),G.postMessage({penpal:u.CALL,id:Ie,methodName:P,args:re},W)})};return _.reduce((P,me)=>(P[me]=ae(me),P),g),()=>{oe=!0}};l.default=v,r.exports=l.default})(qi,qi.exports)),qi.exports}var zi={exports:{}},km;function Tb(){return km||(km=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=c=>function(){if(c){for(var d=arguments.length,f=new Array(d),h=0;h<d;h++)f[h]=arguments[h];console.log("[Penpal]",...f)}};l.default=u,r.exports=l.default})(zi,zi.exports)),zi.exports}var Fm;function Ob(){return Fm||(Fm=1,(function(r,l){Object.defineProperty(l,"__esModule",{value:!0}),l.default=void 0;var u=Af(),c=pv(),d=g(gb()),f=g(bb()),h=g(Eb()),v=g(Tb());function g(_){return _&&_.__esModule?_:{default:_}}var y=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=S.parentOrigin,R=p===void 0?"*":p,x=S.methods,G=x===void 0?{}:x,W=S.timeout,k=S.debug;const oe=(0,v.default)(k);if(window===window.top){const Ue=new Error("connectToParent() must be called within an iframe");throw Ue.code=c.ERR_NOT_IN_IFRAME,Ue}const ae=(0,d.default)(),P=ae.destroy,me=ae.onDestroy,re=window,Y=re.parent;return{promise:new Promise((Ue,Ut)=>{let Ie;W!==void 0&&(Ie=setTimeout(()=>{const ye=new Error(`Connection to parent timed out after ${W}ms`);ye.code=c.ERR_CONNECTION_TIMEOUT,Ut(ye),P()},W));const xe=ye=>{try{clearTimeout()}catch{return}if(ye.source!==Y||ye.data.penpal!==u.HANDSHAKE_REPLY)return;if(R!=="*"&&R!==ye.origin){oe(`Child received handshake reply from origin ${ye.origin} which did not match expected origin ${R}`);return}oe("Child: Received handshake reply"),re.removeEventListener(u.MESSAGE,xe);const Pe={localName:"Child",local:re,remote:Y,originForSending:ye.origin==="null"?"*":ye.origin,originForReceiving:ye.origin},nt={},U=(0,f.default)(Pe,G,oe);me(U);const H=(0,h.default)(nt,Pe,ye.data.methodNames,P,oe);me(H),clearTimeout(Ie),Ue(nt)};re.addEventListener(u.MESSAGE,xe),me(()=>{re.removeEventListener(u.MESSAGE,xe);const ye=new Error("Connection destroyed");ye.code=c.ERR_CONNECTION_DESTROYED,Ut(ye)}),oe("Child: Sending handshake"),Y.postMessage({penpal:u.HANDSHAKE,methodNames:Object.keys(G)},R)}),destroy:P}};l.default=y,r.exports=l.default})(Oi,Oi.exports)),Oi.exports}var wb=Ob();const Ab=Bi(wb);var Vt=function(){return Vt=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Vt.apply(this,arguments)};function Im(r,l){for(var u=Vt({},r),c=0,d=l;c<d.length;c++){var f=d[c];delete u[f]}return u}function oc(r){return function(l,u){if(r){for(var c={},d=0,f=l;d<f.length;d++){var h=f[d],v=u.itemTypes[h.relationships.item_type.data.id];c[h.id]=r(h,Vt(Vt({},u),{itemType:v}))}return c}}}function fn(r,l){var u=function(c,d,f){if(f.mode===r){var h=Cb(d),v=function(g){l(c,Vt(Vt(Vt({},d),g),h))};return v(f),v}};return u.mode=r,u}function lu(r,l){var u=function(c,d,f){if(f.mode===r){var h=function(v){l(c,Vt(Vt({},d),v))};return h(f),h}};return u.mode=r,u}function qb(){for(var r=document.querySelectorAll("body *"),l=0,u=0;u<r.length;u++)l=Math.max(r[u].getBoundingClientRect().bottom,l);return l}var Cb=function(r){var l=null,u=function(y){var _=y===void 0?Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.getBoundingClientRect().height,qb()):y;_!==l&&(r.setHeight(_),l=_)},c=null,d=null,f=function(){return u()},h=function(){u(),c||(c=new ResizeObserver(f),c.observe(document.documentElement)),d||(d=new MutationObserver(f),d.observe(window.document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))},v=function(){c&&(c.disconnect(),c=null),d&&(d.disconnect(),d=null)},g=function(){return!!c};return{updateHeight:u,startAutoResizer:h,stopAutoResizer:v,isAutoResizerActive:g}},zb=fn("renderAssetSource",function(r,l){r.renderAssetSource&&r.renderAssetSource(l.assetSourceId,l)}),Db=fn("renderConfigScreen",function(r,l){r.renderConfigScreen&&r.renderConfigScreen(l)}),Rb=fn("renderFieldExtension",function(r,l){r.renderFieldExtension&&r.renderFieldExtension(l.fieldExtensionId,l)}),Mb=lu("renderInspector",function(r,l){r.renderInspector&&r.renderInspector(l.inspectorId,l)}),Ub=lu("renderInspectorPanel",function(r,l){r.renderInspectorPanel&&r.renderInspectorPanel(l.panelId,l)}),xb=fn("renderItemCollectionOutlet",function(r,l){r.renderItemCollectionOutlet&&r.renderItemCollectionOutlet(l.itemCollectionOutletId,l)}),Nb=fn("renderItemFormOutlet",function(r,l){r.renderItemFormOutlet&&r.renderItemFormOutlet(l.itemFormOutletId,l)}),jb=lu("renderItemFormSidebar",function(r,l){r.renderItemFormSidebar&&r.renderItemFormSidebar(l.sidebarId,l)}),Lb=fn("renderItemFormSidebarPanel",function(r,l){r.renderItemFormSidebarPanel&&r.renderItemFormSidebarPanel(l.sidebarPaneId,l)}),Gb=fn("renderManualFieldExtensionConfigScreen",function(r,l){r.renderManualFieldExtensionConfigScreen&&r.renderManualFieldExtensionConfigScreen(l.fieldExtensionId,l)}),Hb=fn("renderModal",function(r,l){r.renderModal&&r.renderModal(l.modalId,l)}),Bb=lu("renderPage",function(r,l){r.renderPage&&r.renderPage(l.pageId,l)}),Yb=lu("renderUploadSidebar",function(r,l){r.renderUploadSidebar&&r.renderUploadSidebar(l.sidebarId,l)}),Xb=fn("renderUploadSidebarPanel",function(r,l){r.renderUploadSidebarPanel&&r.renderUploadSidebarPanel(l.sidebarPaneId,l)}),Dt=function(){return Dt=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Dt.apply(this,arguments)},Vb=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})},Qb=function(r,l){var u={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},c,d,f,h=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return h.next=v(0),h.throw=v(1),h.return=v(2),typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function v(y){return function(_){return g([y,_])}}function g(y){if(c)throw new TypeError("Generator is already executing.");for(;h&&(h=0,y[0]&&(u=0)),u;)try{if(c=1,d&&(f=y[0]&2?d.return:y[0]?d.throw||((f=d.return)&&f.call(d),0):d.next)&&!(f=f.call(d,y[1])).done)return f;switch(d=0,f&&(y=[y[0]&2,f.value]),y[0]){case 0:case 1:f=y;break;case 4:return u.label++,{value:y[1],done:!1};case 5:u.label++,d=y[1],y=[0];continue;case 7:y=u.ops.pop(),u.trys.pop();continue;default:if(f=u.trys,!(f=f.length>0&&f[f.length-1])&&(y[0]===6||y[0]===2)){u=0;continue}if(y[0]===3&&(!f||y[1]>f[0]&&y[1]<f[3])){u.label=y[1];break}if(y[0]===6&&u.label<f[1]){u.label=f[1],f=y;break}if(f&&u.label<f[2]){u.label=f[2],u.ops.push(y);break}f[2]&&u.ops.pop(),u.trys.pop();continue}y=l.call(r,u)}catch(_){y=[6,_],d=0}finally{c=f=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}},Pm=function(r,l,u){if(u||arguments.length===2)for(var c=0,d=l.length,f;c<d;c++)(f||!(c in l))&&(f||(f=Array.prototype.slice.call(l,0,c)),f[c]=l[c]);return r.concat(f||Array.prototype.slice.call(l))};function Wm(r){if(!(typeof document>"u")){var l=r?.colorScheme;l!=="light"&&l!=="dark"||document.documentElement.dataset.colorScheme!==l&&(document.documentElement.dataset.colorScheme=l,document.documentElement.style.colorScheme=l)}}function Zb(){return Vb(this,arguments,void 0,function(r){var l,u,c,d,f,h,v,g,y,_,S,p;return r===void 0&&(r={}),Qb(this,function(R){switch(R.label){case 0:return l=null,u=null,c=Dt(Dt({},r),{overrideFieldExtensions:oc(r.overrideFieldExtensions),customMarksForStructuredTextField:oc(r.customMarksForStructuredTextField),customBlockStylesForStructuredTextField:oc(r.customBlockStylesForStructuredTextField)}),d=Ab({methods:Dt(Dt({sdkVersion:function(){return"0.3.1"},implementedHooks:function(){return Object.fromEntries(Object.keys(r).map(function(x){return[x,!0]}))}},Object.fromEntries(Object.entries(c).filter(function(x){var G=x[0];return!G.startsWith("render")}))),{onChange:function(x){Wm(x),l&&l(x)},callMethodMergingBootCtx:function(x,G,W,k,oe){return u?u(x,G,W,k,oe):null}})}),[4,d.promise];case 1:return f=R.sent(),[4,f.getSettings()];case 2:for(h=R.sent(),Wm(h),h.mode==="onBoot"&&(v=h,l=function(x){v=x},u=function(x,G,W,k,oe){var ae;if(x in c)return(ae=c)[x].apply(ae,Pm(Pm([],G,!1),[Dt(Dt(Dt(Dt({},Im(f,["getSettings","setHeight"])),Im(v,["mode","bodyPadding"])),Object.fromEntries(k.map(function(P){return[P,function(){for(var re=[],Y=0;Y<arguments.length;Y++)re[Y]=arguments[Y];return f.callAdditionalCtxMethod(oe,P,re)}]}))),W)],!1))},c.onBoot&&c.onBoot(Dt(Dt({},f),v))),g={renderAssetSource:zb,renderConfigScreen:Db,renderFieldExtension:Rb,renderItemCollectionOutlet:xb,renderItemFormOutlet:Nb,renderItemFormSidebar:jb,renderItemFormSidebarPanel:Lb,renderManualFieldExtensionConfigScreen:Gb,renderModal:Hb,renderPage:Bb,renderInspector:Mb,renderInspectorPanel:Ub,renderUploadSidebar:Yb,renderUploadSidebarPanel:Xb},y=0,_=Object.values(g);y<_.length;y++)if(S=_[y],p=S(c,f,h),p){l=p;break}return[2]}})})}var dc={exports:{}},We={};var ey;function Kb(){if(ey)return We;ey=1;var r=wf();function l(g){var y="https://react.dev/errors/"+g;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)y+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+g+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(l(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,y,_){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:g,containerInfo:y,implementation:_}}var h=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,y){if(g==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,We.createPortal=function(g,y){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(l(299));return f(g,y,null,_)},We.flushSync=function(g){var y=h.T,_=c.p;try{if(h.T=null,c.p=2,g)return g()}finally{h.T=y,c.p=_,c.d.f()}},We.preconnect=function(g,y){typeof g=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(g,y))},We.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},We.preinit=function(g,y){if(typeof g=="string"&&y&&typeof y.as=="string"){var _=y.as,S=v(_,y.crossOrigin),p=typeof y.integrity=="string"?y.integrity:void 0,R=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;_==="style"?c.d.S(g,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:S,integrity:p,fetchPriority:R}):_==="script"&&c.d.X(g,{crossOrigin:S,integrity:p,fetchPriority:R,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},We.preinitModule=function(g,y){if(typeof g=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var _=v(y.as,y.crossOrigin);c.d.M(g,{crossOrigin:_,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&c.d.M(g)},We.preload=function(g,y){if(typeof g=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var _=y.as,S=v(_,y.crossOrigin);c.d.L(g,_,{crossOrigin:S,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},We.preloadModule=function(g,y){if(typeof g=="string")if(y){var _=v(y.as,y.crossOrigin);c.d.m(g,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:_,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else c.d.m(g)},We.requestFormReset=function(g){c.d.r(g)},We.unstable_batchedUpdates=function(g,y){return g(y)},We.useFormState=function(g,y,_){return h.H.useFormState(g,y,_)},We.useFormStatus=function(){return h.H.useHostTransitionStatus()},We.version="19.2.4",We}var ty;function Jb(){if(ty)return dc.exports;ty=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(l){console.error(l)}}return r(),dc.exports=Kb(),dc.exports}const $b="_fieldError_kqzsn_1",kb={fieldError:$b};function Fb(r){var l=r.children;return Me.createElement("div",{className:kb.fieldError},l)}const Ib="_fieldHint_1q1d1_1",Pb={fieldHint:Ib};function Wb(r){var l=r.children;return Me.createElement("div",{className:Pb.fieldHint},l)}var pf=function(){return pf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},pf.apply(this,arguments)};function e0(r){var l=r.id,u=r.label,c=r.hint,d=r.error,f=r.required,h=r.formLabelProps,v=r.children;return Me.createElement(Me.Fragment,null,Me.createElement(i0,pf({},h,{htmlFor:l,required:f,error:!!d}),u),v,d&&Me.createElement(Fb,null,d),c&&Me.createElement(Wb,null,c))}const t0="_formLabel_12h4v_1",n0="_formLabel__code_12h4v_8",a0="_formLabel__label_12h4v_18",l0="_formLabel__required_12h4v_30",Il={formLabel:t0,formLabel__code:n0,"formLabel--error":"_formLabel--error_12h4v_14",formLabel__label:a0,formLabel__required:l0};var gf=function(){return gf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},gf.apply(this,arguments)},u0=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u},i0=function(r){var l,u=r.children,c=r.className,d=r.htmlFor,f=r.code,h=r.required,v=h===void 0?!1:h,g=r.error,y=g===void 0?!1:g,_=u0(r,["children","className","htmlFor","code","required","error"]),S=au(Il.formLabel,c,(l={},l[Il["formLabel--error"]]=y,l));return Me.createElement("label",gf({className:S,htmlFor:d},_),Me.createElement("span",{className:Il.formLabel__label},u,v&&Me.createElement("span",{className:Il.formLabel__required},"*")),f&&Me.createElement("span",{className:Il.formLabel__code},f))};const r0="_Spinner__bar_1u42l_13",hc={"Spinner--inline":"_Spinner--inline_1u42l_1","Spinner--centered":"_Spinner--centered_1u42l_7",Spinner__bar:r0};var Hi=function(){return Hi=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Hi.apply(this,arguments)};function s0(r){for(var l,u=r.size,c=u===void 0?32:u,d=r.placement,f=d===void 0?"inline":d,h=r.style,v=h===void 0?{}:h,g=[],y=0;y<12;y+=1){var _={};_.animationDelay="".concat((y-12)/10,"s"),_.transform="rotate(".concat(y*30,"deg) translate(146%)"),g.push(Me.createElement("div",{style:_,className:hc.Spinner__bar,key:y}))}var S={width:c*.5,height:c*.5};return f==="inline"&&(S.marginLeft=c*.5,S.transform="translateY(33%)"),Me.createElement("div",{className:au((l={},l[hc["Spinner--inline"]]=f==="inline",l[hc["Spinner--centered"]]=f==="centered",l)),style:Hi(Hi({},v),S)},g)}var bf=function(){return bf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},bf.apply(this,arguments)};function c0(r){var l=r.id,u=r.name,c=r.label,d=r.hint,f=r.error,h=r.required,v=r.placeholder,g=r.formLabelProps,y=r.value,_=r.onChange,S=r.textInputProps;return Me.createElement(e0,{formLabelProps:g,id:l,required:h,error:f,hint:d,label:c},Me.createElement(d0,bf({},S,{id:l,name:u,value:y,placeholder:v,onChange:_,error:!!f})))}const f0="_TextInput_1kqkh_1",Di={TextInput:f0,"TextInput--monospaced":"_TextInput--monospaced_1kqkh_32","TextInput--disabled":"_TextInput--disabled_1kqkh_37","TextInput--error":"_TextInput--error_1kqkh_43"};var Sf=function(){return Sf=Object.assign||function(r){for(var l,u=1,c=arguments.length;u<c;u++){l=arguments[u];for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(r[d]=l[d])}return r},Sf.apply(this,arguments)},o0=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u},d0=function(r){var l,u=r.className,c=r.disabled,d=c===void 0?!1:c,f=r.error,h=r.id,v=r.inputRef,g=r.maxLength,y=r.name,_=r.labelText,S=r.onBlur,p=r.onChange,R=r.placeholder,x=r.required,G=x===void 0?!1:x,W=r.type,k=r.value,oe=r.monospaced,ae=o0(r,["className","disabled","error","id","inputRef","maxLength","name","labelText","onBlur","onChange","placeholder","required","type","value","monospaced"]),P=Hn.useCallback(function(re){p&&p(re.target.value,re)},[p]),me=au(Di.TextInput,u,(l={},l[Di["TextInput--disabled"]]=d,l[Di["TextInput--error"]]=f,l[Di["TextInput--monospaced"]]=oe,l));return Me.createElement("input",Sf({className:me,"aria-label":_,id:h,name:y,required:G,placeholder:R,maxLength:g,disabled:d,onBlur:S,onChange:P,value:k,type:W,ref:v},ae))};const h0="_form_hqp8e_1",m0={form:h0},ny="https://alttext.ai/account/api_keys",y0="API key saved!",v0="Failed to save API key:";function _0(r){const u=r.plugin.attributes.parameters.apiKey;return typeof u=="string"?u:""}async function p0(r,l,u){u(!0);try{await r.updatePluginParameters({apiKey:l.trim()}),r.customToast({type:"notice",message:y0,dismissOnPageChange:!0,dismissAfterTimeout:5e3})}catch(c){const d=c instanceof Error?c.message:String(c??"Unknown error");await r.alert(`${v0} ${d}`)}finally{u(!1)}}function g0({ctx:r}){const[l,u]=Hn.useState(_0(r)),[c,d]=Hn.useState(!1);return cn.jsxs(pb,{ctx:r,children:[cn.jsxs("div",{className:m0.form,children:[cn.jsx(c0,{required:!0,name:"altTextAPIKey",id:"altTextAPIKey",label:"Alt Text API Key",value:l,onChange:f=>u(f)}),cn.jsxs("p",{children:["You can get your API key by going to"," ",cn.jsx("a",{href:ny,target:"_blank",rel:"noreferrer",children:ny})]})]}),cn.jsxs(hb,{disabled:c||l.trim()==="",fullWidth:!0,onClick:()=>{p0(r,l,d)},children:["Save ",c&&cn.jsx(s0,{size:24})]})]})}var mc={exports:{}},Pl={},yc={exports:{}},vc={};var ay;function b0(){return ay||(ay=1,(function(r){function l(U,H){var $=U.length;U.push(H);e:for(;0<$;){var be=$-1>>>1,Oe=U[be];if(0<d(Oe,H))U[be]=H,U[$]=Oe,$=be;else break e}}function u(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var H=U[0],$=U.pop();if($!==H){U[0]=$;e:for(var be=0,Oe=U.length,T=Oe>>>1;be<T;){var L=2*(be+1)-1,B=U[L],Q=L+1,ee=U[Q];if(0>d(B,$))Q<Oe&&0>d(ee,B)?(U[be]=ee,U[Q]=$,be=Q):(U[be]=B,U[L]=$,be=L);else if(Q<Oe&&0>d(ee,$))U[be]=ee,U[Q]=$,be=Q;else break e}}return H}function d(U,H){var $=U.sortIndex-H.sortIndex;return $!==0?$:U.id-H.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;r.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();r.unstable_now=function(){return h.now()-v}}var g=[],y=[],_=1,S=null,p=3,R=!1,x=!1,G=!1,W=!1,k=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function P(U){for(var H=u(y);H!==null;){if(H.callback===null)c(y);else if(H.startTime<=U)c(y),H.sortIndex=H.expirationTime,l(g,H);else break;H=u(y)}}function me(U){if(G=!1,P(U),!x)if(u(g)!==null)x=!0,re||(re=!0,xe());else{var H=u(y);H!==null&&nt(me,H.startTime-U)}}var re=!1,Y=-1,Ae=5,Ue=-1;function Ut(){return W?!0:!(r.unstable_now()-Ue<Ae)}function Ie(){if(W=!1,re){var U=r.unstable_now();Ue=U;var H=!0;try{e:{x=!1,G&&(G=!1,oe(Y),Y=-1),R=!0;var $=p;try{t:{for(P(U),S=u(g);S!==null&&!(S.expirationTime>U&&Ut());){var be=S.callback;if(typeof be=="function"){S.callback=null,p=S.priorityLevel;var Oe=be(S.expirationTime<=U);if(U=r.unstable_now(),typeof Oe=="function"){S.callback=Oe,P(U),H=!0;break t}S===u(g)&&c(g),P(U)}else c(g);S=u(g)}if(S!==null)H=!0;else{var T=u(y);T!==null&&nt(me,T.startTime-U),H=!1}}break e}finally{S=null,p=$,R=!1}H=void 0}}finally{H?xe():re=!1}}}var xe;if(typeof ae=="function")xe=function(){ae(Ie)};else if(typeof MessageChannel<"u"){var ye=new MessageChannel,Pe=ye.port2;ye.port1.onmessage=Ie,xe=function(){Pe.postMessage(null)}}else xe=function(){k(Ie,0)};function nt(U,H){Y=k(function(){U(r.unstable_now())},H)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ae=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return p},r.unstable_next=function(U){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var $=p;p=H;try{return U()}finally{p=$}},r.unstable_requestPaint=function(){W=!0},r.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var $=p;p=U;try{return H()}finally{p=$}},r.unstable_scheduleCallback=function(U,H,$){var be=r.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?be+$:be):$=be,U){case 1:var Oe=-1;break;case 2:Oe=250;break;case 5:Oe=1073741823;break;case 4:Oe=1e4;break;default:Oe=5e3}return Oe=$+Oe,U={id:_++,callback:H,priorityLevel:U,startTime:$,expirationTime:Oe,sortIndex:-1},$>be?(U.sortIndex=$,l(y,U),u(g)===null&&U===u(y)&&(G?(oe(Y),Y=-1):G=!0,nt(me,$-be))):(U.sortIndex=Oe,l(g,U),x||R||(x=!0,re||(re=!0,xe()))),U},r.unstable_shouldYield=Ut,r.unstable_wrapCallback=function(U){var H=p;return function(){var $=p;p=H;try{return U.apply(this,arguments)}finally{p=$}}}})(vc)),vc}var ly;function S0(){return ly||(ly=1,yc.exports=b0()),yc.exports}var uy;function E0(){if(uy)return Pl;uy=1;var r=S0(),l=wf(),u=Jb();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return g(i),e;if(s===a)return g(i),t;s=s.sibling}throw Error(c(188))}if(n.return!==a.return)n=i,a=s;else{for(var o=!1,m=i.child;m;){if(m===n){o=!0,n=i,a=s;break}if(m===a){o=!0,a=i,n=s;break}m=m.sibling}if(!o){for(m=s.child;m;){if(m===n){o=!0,n=s,a=i;break}if(m===a){o=!0,a=s,n=i;break}m=m.sibling}if(!o)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,p=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),Ue=Symbol.for("react.activity"),Ut=Symbol.for("react.memo_cache_sentinel"),Ie=Symbol.iterator;function xe(e){return e===null||typeof e!="object"?null:(e=Ie&&e[Ie]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Symbol.for("react.client.reference");function Pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case k:return"Profiler";case W:return"StrictMode";case me:return"Suspense";case re:return"SuspenseList";case Ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case ae:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Pe(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return Pe(e(t))}catch{}}return null}var nt=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},be=[],Oe=-1;function T(e){return{current:e}}function L(e){0>Oe||(e.current=be[Oe],be[Oe]=null,Oe--)}function B(e,t){Oe++,be[Oe]=e.current,e.current=t}var Q=T(null),ee=T(null),le=T(null),_e=T(null);function et(e,t){switch(B(le,t),B(ee,e),B(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?lm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=lm(t),e=um(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(Q),B(Q,e)}function Ne(){L(Q),L(ee),L(le)}function al(e){e.memoizedState!==null&&B(_e,e);var t=Q.current,n=um(t,e.type);t!==n&&(B(ee,e),B(Q,n))}function uu(e){ee.current===e&&(L(Q),L(ee)),_e.current===e&&(L(_e),Kl._currentValue=$)}var Qi,Uf;function Bn(e){if(Qi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qi=t&&t[1]||"",Uf=-1<n.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+Qi+e+Uf}var Zi=!1;function Ki(e,t){if(!e||Zi)return"";Zi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(z){var C=z}Reflect.construct(e,[],j)}else{try{j.call()}catch(z){C=z}e.call(j.prototype)}}else{try{throw Error()}catch(z){C=z}(j=e())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(z){if(z&&C&&typeof z.stack=="string")return[z.stack,C.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),o=s[0],m=s[1];if(o&&m){var b=o.split(`
|
|
4
4
|
`),q=m.split(`
|
|
@@ -12,6 +12,6 @@ ${this.preCallStack}`)}}class ca extends Error{constructor(l){super("API Error!"
|
|
|
12
12
|
|
|
13
13
|
${JSON.stringify(this.errors,null,2)}`),this.message=u,this.preCallStack&&(this.stack+=`
|
|
14
14
|
Caused By:
|
|
15
|
-
${this.preCallStack}`)}get errors(){return _S(this.response.body)?this.response.body.data:[]}findError(l,u){const c=Array.isArray(l)?l:[l];return this.errors.find(d=>c.includes(d.attributes.code)&&(!u||(typeof u=="function"?u(d.attributes.details):Object.entries(u).every(([f,h])=>d.attributes.details[f]===h))))}}class tu extends Error{constructor(){super("Promise canceled!"),Object.setPrototypeOf(this,new.target.prototype)}}function nu(r,l){let u=null;const c=new Promise((d,f)=>{u=()=>{try{l&&l(),f(new tu)}catch(v){f(v)}},(typeof r=="function"?r():r).then(d,f)});return u&&(c.cancel=u),c}function Ni(r){return new Promise(l=>{setTimeout(l,r)})}var gS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function bS(r){return gS(this,void 0,void 0,function*(){let l,u=0;do try{u+=1,yield Ni(u*1e3),l=yield r()}catch(c){if(!(c instanceof ca)||c.response.status!==404)throw c}while(!l);return l})}var Wl={},Gn={},vf={},uv;function qv(){return uv||(uv=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TaskCollisionStrategy=void 0,(function(l){l[l.DEFAULT=0]="DEFAULT",l[l.KEEP_THIS=1]="KEEP_THIS",l[l.KEEP_OTHER=2]="KEEP_OTHER",l[l.KEEP_BOTH=3]="KEEP_BOTH",l[l.RESOLVE_THIS=4]="RESOLVE_THIS",l[l.RESOLVE_OTHER=5]="RESOLVE_OTHER"})(r.TaskCollisionStrategy||(r.TaskCollisionStrategy={}))})(vf)),vf}var Ri={},iv;function Cv(){if(iv)return Ri;iv=1,Object.defineProperty(Ri,"__esModule",{value:!0});let r=class{constructor(u,c){this._code=u,this._message=c}get code(){return this._code}get message(){return this._message}};return Ri.default=r,Ri}var ra={},rv;function zv(){if(rv)return ra;rv=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.mutexEquality=ra.mutexBitwiseAnd=void 0;function r(u,c){return(u&c)!==0}ra.mutexBitwiseAnd=r;function l(u,c){return u===c}return ra.mutexEquality=l,ra}var Mi={},sv;function SS(){if(sv)return Mi;sv=1,Object.defineProperty(Mi,"__esModule",{value:!0});let r=class{constructor(u,c){this._meta=void 0,this._task=u,this._scheduler=c}withDescriptor(u){return this._descriptor=u,this}withMutex(u){return this._mutex=u,this}withMeta(u){return this._meta=u,this}runBeforeExecuting(u){return this._onPreExecute=u,this}handleCollisions(u){return this._onTaskCollision=u,this}execute(u){return this._scheduler.enqueue({priority:u,mutex:this._mutex,descriptor:this._descriptor,meta:this._meta,execute:this._task,onPreExecute:this._onPreExecute,onTaskCollision:this._onTaskCollision})}};return Mi.default=r,Mi}var cv;function ES(){if(cv)return Gn;cv=1;var r=Gn&&Gn.__awaiter||function(y,_,S,p){function R(x){return x instanceof S?x:new S(function(G){G(x)})}return new(S||(S=Promise))(function(x,G){function W(ae){try{oe(p.next(ae))}catch(P){G(P)}}function k(ae){try{oe(p.throw(ae))}catch(P){G(P)}}function oe(ae){ae.done?x(ae.value):R(ae.value).then(W,k)}oe((p=p.apply(y,_||[])).next())})},l=Gn&&Gn.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Gn,"__esModule",{value:!0});const u=qv(),c=l(Cv()),d=zv(),f=l(SS());var h;(function(y){y[y.PENDING=0]="PENDING",y[y.EXECUTING=1]="EXECUTING",y[y.TERMINATED=2]="TERMINATED"})(h||(h={}));function v(y,_){for(let S of y.listeners)S.reject(_)}let g=class{constructor(_,S={}){this._queue=[],this._isExecuting=!1,this._idleListeners=[],this._maxConcurrentTasks=_,this._samePriorityMutex=!!S.samePriorityMutex,this._mutexStrategy=S.mutexStrategy||d.mutexEquality,S.disableLogging?this._errorLog=()=>{}:this._errorLog=console.error}enqueue(_){return new Promise((S,p)=>{typeof _=="function"&&(_={priority:0,execute:_});const R=this._checkMutexes(_,S,p);R.task?this._addTask(R.task):R.canceled&&p(this.createCanceledError())})}prepare(_){return new f.default(_,this)}_addTask(_){this._queue.push(_),this._applyPriorities(),this._isExecuting||(this._isExecuting=!0,setTimeout(this._executeNextTasks.bind(this)))}get executingTasks(){return this._queue.reduce((_,S)=>S.state===h.EXECUTING?_+1:_,0)}createCanceledError(){return new c.default(50,"Task has been canceled in favor of another task")}_findFirstPendingTask(){return this._queue.find(_=>_.state===h.PENDING)}_isIdle(){return this._queue.length===0||!this._queue.find(_=>_.state!==h.TERMINATED)}_removeTaskAt(_){this._queue.splice(_,1)}_executeTask(_){return r(this,void 0,void 0,function*(){try{return _.task.onPreExecute&&_.task.onPreExecute(),yield _.task.execute()}catch(S){throw S}finally{_.state=h.TERMINATED;let S=this._queue.indexOf(_);this._removeTaskAt(S),this._executeNextTasks()}})}_executeNextTasks(){let _=this.executingTasks;if(_>=this._maxConcurrentTasks)return;let S=this._maxConcurrentTasks-_;for(let p=0;p<S;p++){const R=this._findFirstPendingTask();if(!R){this._isIdle()&&this._switchToIdle();return}R.state=h.EXECUTING,this._executeTask(R).then(x=>{for(const{resolve:G}of R.listeners)try{G(x)}catch(W){this._errorLog("An error occurred while resolving listener",W)}}).catch(x=>{for(const{reject:G}of R.listeners)try{G(x)}catch(W){this._errorLog("An error occurred while rejecting listener",W)}})}}_switchToIdle(){this._isExecuting=!1;const _=this._idleListeners;this._idleListeners=[];for(const{resolve:S}of _)try{S()}catch{}}waitForIdle(){return this._isExecuting?new Promise((_,S)=>{this._idleListeners.push({resolve:_,reject:S})}):Promise.resolve()}_applyPriorities(){this._queue.sort((_,S)=>S.task.priority-_.task.priority)}_checkMutexes(_,S,p){for(let R=0;R<this._queue.length;R++){let x=this._queue[R];if(x.state===h.TERMINATED||this._samePriorityMutex&&x.task.priority!=_.priority||!x.task.mutex||!_.mutex||!this._mutexStrategy(x.task.mutex,_.mutex))continue;let G,W;if(x.task.onTaskCollision)if(G=x.task.onTaskCollision(_),G===u.TaskCollisionStrategy.KEEP_OTHER&&x.state!==h.EXECUTING){this._removeTaskAt(R--),v(x,this.createCanceledError());continue}else{if(G===u.TaskCollisionStrategy.KEEP_THIS)return{canceled:!0};if(G===u.TaskCollisionStrategy.RESOLVE_OTHER)return this._removeTaskAt(R--),{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p},...x.listeners]}};if(G===u.TaskCollisionStrategy.RESOLVE_THIS)return x.listeners=[...x.listeners,{resolve:S,reject:p}],{canceled:!1}}if(_.onTaskCollision){if(W=_.onTaskCollision(x.task),W===u.TaskCollisionStrategy.KEEP_OTHER)return{canceled:!0};if(W===u.TaskCollisionStrategy.KEEP_THIS){this._removeTaskAt(R--),v(x,this.createCanceledError());continue}else{if(W===u.TaskCollisionStrategy.RESOLVE_OTHER)return x.listeners=[...x.listeners,{resolve:S,reject:p}],{canceled:!1};if(W===u.TaskCollisionStrategy.RESOLVE_THIS)return this._removeTaskAt(R--),{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p},...x.listeners]}}}}if(!(G===u.TaskCollisionStrategy.KEEP_BOTH&&W===u.TaskCollisionStrategy.KEEP_BOTH))return{canceled:!0}}return{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p}]}}}};return Gn.default=g,Gn}var fv;function TS(){return fv||(fv=1,(function(r){var l=Wl&&Wl.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.mutexEquality=r.mutexBitwiseAnd=r.SchedulerError=r.TaskCollisionStrategy=r.Scheduler=void 0;const u=l(ES());r.Scheduler=u.default;const c=qv();Object.defineProperty(r,"TaskCollisionStrategy",{enumerable:!0,get:function(){return c.TaskCollisionStrategy}});const d=l(Cv());r.SchedulerError=d.default;const f=zv();Object.defineProperty(r,"mutexBitwiseAnd",{enumerable:!0,get:function(){return f.mutexBitwiseAnd}}),Object.defineProperty(r,"mutexEquality",{enumerable:!0,get:function(){return f.mutexEquality}})})(Wl)),Wl}var OS=TS(),sa=function(r){return this instanceof sa?(this.v=r,this):new sa(r)},wS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof sa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};function on(r,l,u,c){return wS(this,arguments,function*(){const f=u?.perPage||r.defaultLimit;if(f>r.maxLimit)throw new Error(`perPage option cannot exceed maximum value of ${r.maxLimit}`);const h=u?.concurrency||1;if(h>10)throw new Error("concurrency option cannot exceed maximum value of 10");const v=yield sa(l({limit:f,offset:0}));for(const S of v.data)yield yield sa(S);const g=v.meta.total_count,y=new OS.Scheduler(h),_=[];for(let S=f;S<g;S+=f)_.push(y.enqueue(()=>l({limit:f,offset:S})));for(;_.length>0;){const S=yield sa(_.shift());for(const p of S.data)yield yield sa(c?eu(p):p)}})}function dn(r){r&&"page"in r&&console.warn("Passing a `page` query param on paged iterators has no effect: use the `perPage` option instead.")}const Dv="__ARRAY_INDEX__";function AS(r){return r.reduce((l,u,c)=>c===0?u:u===Dv?`${l}[]`:`${l}[${u}]`,"")}function qS(r){if(typeof r=="number"||typeof r=="string")return r.toString();if(r===!0)return"true";if(r===!1)return"false";throw`Don't know how to serialize param value ${JSON.stringify(r)}`}function Tf(r,l=[]){const u=[];if(typeof r=="number"||typeof r=="string"||typeof r=="boolean")u.push([AS(l),qS(r)]);else if(typeof r=="object"){if(Array.isArray(r))for(const c of r)for(const d of Tf(c,[...l,Dv]))u.push(d);else if(r)for(const[c,d]of Object.entries(r))for(const f of Tf(d,[...l,c]))u.push(f)}return u}var CS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};const zS=typeof window<"u"&&typeof window.document<"u",DS=5;var Rt;(function(r){r[r.NONE=0]="NONE",r[r.BASIC=1]="BASIC",r[r.BODY=2]="BODY",r[r.BODY_AND_HEADERS=3]="BODY_AND_HEADERS"})(Rt||(Rt={}));function RS(r){const l={};return r.forEach((u,c)=>{l[c]=u}),l}function ov(r,l,u,c,d,f,h){return{request:{url:l,method:r,headers:u,body:c},response:{status:d.status,statusText:d.statusText,headers:RS(d.headers),body:f},preCallStack:h}}function MS(r,l,u,c,d){return{request:{url:l,method:r,headers:u,body:c},preCallStack:d}}function US(r,l,u,c,d,f,h){return{request:{url:l,method:r,headers:u,body:c},response:{status:d,statusText:"N/A",headers:{},body:f},preCallStack:h}}function xS(r){return typeof r=="object"&&!!r&&"code"in r}function NS(r){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l.toLowerCase(),u]))}let dv=1;function jS(r){const l=r||(typeof fetch>"u"?void 0:fetch)||(typeof globalThis>"u"?void 0:globalThis.fetch);if(typeof l>"u")throw new Error("fetch() is not available: either polyfill it globally, or provide it as fetchFn option.");return l}function ji(r){var l;return CS(this,void 0,void 0,function*(){const u=dv;dv+=1;const c=jS(r.fetchFn),d=r.preCallStack,f=r.userAgent||"@datocms/rest-client-utils",h=r.retryCount||1,v=r.logLevel||Rt.NONE,g="autoRetry"in r?r.autoRetry:!0,y=r.logFn||(()=>!0),_=Object.assign({"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r.apiToken}`,"user-agent":f},r.extraHeaders?NS(r.extraHeaders):{});zS&&delete _["user-agent"];const S=r.baseUrl.replace(/\/$/,""),p=r.body?JSON.stringify(r.body,null,2):void 0,R=r.queryParams&&Object.keys(r.queryParams).length>0?`?${new URLSearchParams(Tf(r.queryParams)).toString()}`:"",x=`${S}${r.url}${R}`;if(v>=Rt.BASIC){if(y(`[${u}] ${r.method} ${x}`),v>=Rt.BODY_AND_HEADERS)for(const[G,W]of Object.entries(_||{}))y(`[${u}] ${G}: ${W}`);v>=Rt.BODY&&p&&y(`[${u}] ${p}`)}try{const G=nu(c(x,{method:r.method,headers:_,body:p})),W=setTimeout(()=>{G.cancel()},r.requestTimeout||3e4),k=yield G;clearTimeout(W);const oe=k.headers.get("Content-Type"),ae=oe&&!oe.includes("application/json");if(k.status===429||ae){if(!g||ae&&r.method!=="GET")throw new ca(ov(r.method,x,_,r.body,k,void 0,d));const Y=k.headers.has("X-RateLimit-Reset")?Number.parseInt(k.headers.get("X-RateLimit-Reset"),10):h;return v>=Rt.BASIC&&(k.status===429?y(`[${u}] Rate limit exceeded, wait ${Y} seconds then retry...`):y(`[${u}] Invalid response content type "${oe}" (status ${k.status}). Wait ${Y} seconds then retry...`)),yield Ni(Y*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}))}if(v>=Rt.BASIC&&(y(`[${u}] Status: ${k.status} (${k.statusText})`),v>=Rt.BODY_AND_HEADERS))for(const Y of["x-api-version","x-environment","x-queue-time","x-ratelimit-remaining","x-request-id","cf-ray"]){const Ae=k.headers.get(Y);Ae&&y(`[${u}] ${Y}: ${Ae}`)}let P=k.status===204?void 0:yield k.json();if(v>=Rt.BODY&&P&&y(`[${u}] ${JSON.stringify(P,null,2)}`),k.status===202){const Y=yield r.fetchJobResult(P.data.id);if(Y.status<200||Y.status>=300)throw new ca(US(r.method,x,_,r.body,Y.status,Y.payload,d));P=Y.payload}if(k.status>=200&&k.status<300)return P;const me=new ca(ov(r.method,x,_,r.body,k,P,d)),re=(l=me.errors.find(Y=>Y.attributes.transient))===null||l===void 0?void 0:l.attributes.code;if(g&&re)return v>=Rt.BASIC&&y(`[${u}] ${re}, wait ${h} seconds then retry...`),yield Ni(h*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}));throw me}catch(G){if(G instanceof tu||xS(G)&&G.code.includes("ETIMEDOUT")){if(g&&h<DS)return v>=Rt.BASIC&&y(`[${u}] Timeout error, wait ${h} seconds then retry...`),yield Ni(h*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}));throw new pS(MS(r.method,x,_,r.body,d))}throw G}})}var Rv=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u};function Li(r){return typeof r=="object"&&!!r&&"id"in r&&"type"in r}function _f(r){return Array.isArray(r)&&r.every(Li)}function X(r,l){if(typeof r!="object"||!r)throw new Error("Invalid body!");if(Array.isArray(r))return{data:r.map(y=>{var _;return(_=X(y,l))===null||_===void 0?void 0:_.data})};const u=r,{id:c,type:d,meta:f}=u,h=Rv(u,["id","type","meta"]),v={},g={};if(l.attributes==="*")for(const[y,_]of Object.entries(h))if(l.relationships.includes(y))if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};else v[y]=_;else if(l.relationships==="*")for(const[y,_]of Object.entries(h))if(l.attributes.includes(y))v[y]=_;else if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};else{for(const[y,_]of Object.entries(h))if(l.attributes.includes(y))v[y]=_;else if(l.relationships.includes(y))if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};l.attributes.includes("type")&&(v.type=d)}return{data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c||l.id?{id:c||l.id}:{}),{type:l.type}),Object.keys(v).length>0?{attributes:v}:{}),Object.keys(g).length>0?{relationships:g}:{}),f?{meta:f}:{})}}function Of(r){if(Array.isArray(r))return r.map(Of);if(r&&typeof r=="object"){const l={};for(const[u,c]of Object.entries(r))u!=="__itemTypeId"&&(l[u]=Of(c));return l}return r}function hv(r){if(!r||typeof r!="object")return r;const{__itemTypeId:l}=r,u=Rv(r,["__itemTypeId"]),c={};for(const[d,f]of Object.entries(u))c[d]=Of(f);return c}function Ui(r){return!r||!("data"in r)?r:Array.isArray(r.data)?Object.assign(Object.assign({},r),{data:r.data.map(hv)}):Object.assign(Object.assign({},r),{data:hv(r.data)})}function D(r){return typeof r=="string"?r:r.id}class F{constructor(l){this.client=l}}class Mv extends F{create(l){return this.rawCreate(X(l,{type:"role",attributes:["name","can_edit_favicon","can_edit_site","can_edit_schema","can_manage_menu","can_edit_environment","can_promote_environments","environments_access","can_manage_users","can_manage_shared_filters","can_manage_search_indexes","can_manage_upload_collections","can_manage_build_triggers","can_manage_webhooks","can_manage_environments","can_manage_sso","can_access_audit_log","can_manage_workflows","can_manage_access_tokens","can_perform_site_search","can_access_build_events_log","can_access_search_index_events_log","positive_item_type_permissions","negative_item_type_permissions","positive_upload_permissions","negative_upload_permissions","positive_build_trigger_permissions","negative_build_trigger_permissions","positive_search_index_permissions","negative_search_index_permissions"],relationships:["inherits_permissions_from"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/roles",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"role",attributes:["name","can_edit_favicon","can_edit_site","can_edit_schema","can_manage_menu","can_edit_environment","can_promote_environments","environments_access","can_manage_users","can_manage_shared_filters","can_manage_search_indexes","can_manage_upload_collections","can_manage_build_triggers","can_manage_webhooks","can_manage_environments","can_manage_sso","can_access_audit_log","can_manage_workflows","can_manage_access_tokens","can_perform_site_search","can_access_build_events_log","can_access_search_index_events_log","positive_item_type_permissions","negative_item_type_permissions","positive_upload_permissions","negative_upload_permissions","positive_build_trigger_permissions","negative_build_trigger_permissions","positive_search_index_permissions","negative_search_index_permissions"],relationships:["inherits_permissions_from"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/roles/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/roles"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/roles/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/roles/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/roles/${l}/duplicate`})}}Mv.TYPE="role";var LS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function mv(r,l){return r==null&&l==null?!0:r===l}function GS(r,l){for(const u in r)if(!mv(r[u],l[u]))return!1;for(const u in l)if(!mv(r[u],l[u]))return!1;return!0}function xi(r,l,u,c){if(!l)return r;const{add:d,remove:f}=l;return[...f?f.reduce((h,v)=>{const g=Object.assign(Object.assign({},v),{environment:u}),y=h.find(_=>GS(_,g));if(!y)throw new Error(`Cannot find rule ${JSON.stringify(g)} to remove in ${c}!`);return h.filter(_=>_!==y)},r):r,...d?d.map(h=>Object.assign({environment:u},h)):[]]}class HS extends Mv{updateCurrentEnvironmentPermissions(l,u){return LS(this,void 0,void 0,function*(){const c=this.client.config.environment||(yield this.client.environments.list()).find(g=>g.meta.primary).id,d=yield this.find(l),f=!!(u.positive_item_type_permissions||u.negative_item_type_permissions),h=!!(u.positive_upload_permissions||u.negative_upload_permissions),v=Object.assign(Object.assign({},f?{positive_item_type_permissions:xi(d.positive_item_type_permissions,u.positive_item_type_permissions,c,"positive_item_type_permissions"),negative_item_type_permissions:xi(d.negative_item_type_permissions,u.negative_item_type_permissions,c,"negative_item_type_permissions")}:{}),h?{positive_upload_permissions:xi(d.positive_upload_permissions,u.positive_upload_permissions,c,"positive_upload_permissions"),negative_upload_permissions:xi(d.negative_upload_permissions,u.negative_upload_permissions,c,"negative_upload_permissions")}:{});return this.update(l,v)})}}class Uv extends F{update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"user",attributes:["is_active"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/users/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/users"})}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/users/${l}`,queryParams:u})}findMe(l){return this.rawFindMe(l).then(u=>O(u))}rawFindMe(l){return this.client.request({method:"GET",url:"/users/me",queryParams:l})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/users/${l}`,queryParams:u})}}Uv.TYPE="user";class xv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/sso-users"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/sso-users/${l}`})}copyUsers(){return this.rawCopyUsers().then(l=>O(l))}rawCopyUsers(){return this.client.request({method:"POST",url:"/sso-users/copy-users"})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/sso-users/${l}`,queryParams:u})}}xv.TYPE="sso_user";class Nv extends F{query(l){return this.rawQuery(X(l,{type:"audit_log_query",attributes:["filter","next_token","detailed_log"],relationships:[]})).then(u=>O(u))}rawQuery(l){return this.client.request({method:"POST",url:"/audit-log-events/query",body:l})}}Nv.TYPE="audit_log_event";class jv extends F{create(l){return this.rawCreate(X(l,{type:"menu_item",attributes:["label","external_url","position","open_in_new_tab"],relationships:["item_type","item_type_filter","parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/menu-items",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"menu_item",attributes:["label","external_url","position","open_in_new_tab"],relationships:["item_type","item_type_filter","parent"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/menu-items/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/menu-items",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/menu-items/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/menu-items/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"menu_item",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/menu-items/reorder",body:l})}}jv.TYPE="menu_item";class Lv extends F{create(l){return this.rawCreate(X(l,{type:"schema_menu_item",attributes:["label","position","kind"],relationships:["item_type","parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/schema-menu-items",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"schema_menu_item",attributes:["label","position","kind"],relationships:["item_type","parent","children"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/schema-menu-items/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/schema-menu-items",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/schema-menu-items/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/schema-menu-items/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"schema_menu_item",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/schema-menu-items/reorder",body:l})}}Lv.TYPE="schema_menu_item";class Gv extends F{create(l){return this.rawCreate(X(l,{type:"upload_collection",attributes:["label","position"],relationships:["parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-collections",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload_collection",attributes:["label","position"],relationships:["parent","children"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/upload-collections/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-collections",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/upload-collections/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/upload-collections/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"upload_collection",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/upload-collections/reorder",body:l})}}Gv.TYPE="upload_collection";class Hv extends F{create(l,u){return this.rawCreate(X(l,{type:"item_type",attributes:["name","api_key","singleton","all_locales_required","sortable","modular_block","draft_mode_active","draft_saving_active","tree","ordering_direction","ordering_meta","collection_appeareance","collection_appearance","hint","inverse_relationships_enabled"],relationships:["ordering_field","presentation_title_field","presentation_image_field","title_field","image_preview_field","excerpt_field","workflow"]}),u).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:"/item-types",body:l,queryParams:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item_type",attributes:["name","api_key","collection_appeareance","collection_appearance","singleton","all_locales_required","sortable","modular_block","draft_mode_active","draft_saving_active","tree","ordering_direction","ordering_meta","has_singleton_item","hint","inverse_relationships_enabled"],relationships:["ordering_field","presentation_title_field","presentation_image_field","title_field","image_preview_field","excerpt_field","workflow"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/item-types/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/item-types"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/item-types/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/item-types/${l}/duplicate`})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/item-types/${l}`,queryParams:u})}referencing(l){return this.rawReferencing(D(l)).then(u=>O(u))}rawReferencing(l){return this.client.request({method:"GET",url:`/item-types/${l}/referencing`})}rawReorderFieldsAndFieldsets(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/reorder-fields-and-fieldsets`,body:u})}}Hv.TYPE="item_type";class Bv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"field",attributes:["label","field_type","api_key","localized","validators","appeareance","appearance","position","hint","default_value","deep_filtering_enabled"],relationships:["fieldset"]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/fields`,body:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"field",attributes:["default_value","label","api_key","localized","validators","appeareance","appearance","position","field_type","hint","deep_filtering_enabled"],relationships:["fieldset"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/fields/${l}`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields`})}referencing(l){return this.rawReferencing(D(l)).then(u=>O(u))}rawReferencing(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields/referencing`})}related(l){return this.rawRelated(D(l)).then(u=>O(u))}rawRelated(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields/related`})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/fields/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/fields/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/fields/${l}/duplicate`})}}Bv.TYPE="field";class Yv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"fieldset",attributes:["title","hint","position","collapsible","start_collapsed"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/fieldsets`,body:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"fieldset",attributes:["title","hint","position","collapsible","start_collapsed"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/fieldsets/${l}`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/item-types/${l}/fieldsets`})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/fieldsets/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/fieldsets/${l}`})}}Yv.TYPE="fieldset";class Xv extends F{create(l){return this.rawCreate(X(l,{type:"email_credentials",attributes:["email","password","otp_code"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/sessions",body:l})}}Xv.TYPE="session";class Vv extends F{create(l){return this.rawCreate(X(l,{type:"access_token",attributes:["name","can_access_cda","can_access_cda_preview","can_access_cma"],relationships:["role"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/access_tokens",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"access_token",attributes:["name","can_access_cda","can_access_cda_preview","can_access_cma"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/access_tokens/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/access_tokens"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/access_tokens/${l}`})}regenerateToken(l){return this.rawRegenerateToken(D(l)).then(u=>O(u))}rawRegenerateToken(l){return this.client.request({method:"POST",url:`/access_tokens/${l}/regenerate_token`})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/access_tokens/${l}`,queryParams:u})}}Vv.TYPE="access_token";class Qv extends F{create(l){return this.rawCreate(X(l,{type:"plugin",attributes:["package_name","name","description","url","permissions","plugin_type","field_types","parameter_definitions","package_version"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/plugins",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"plugin",attributes:["name","description","url","parameters","package_version","permissions"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/plugins/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/plugins"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/plugins/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/plugins/${l}`})}fields(l){return this.rawFields(D(l)).then(u=>O(u))}rawFields(l){return this.client.request({method:"GET",url:`/plugins/${l}/fields`})}}Qv.TYPE="plugin";class Zv extends F{find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/job-results/${l}`})}}Zv.TYPE="job_result";class Kv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/subscription-limits"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/subscription-limits/${l}`})}}Kv.TYPE="subscription_limit";class Jv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/subscription-features"})}}Jv.TYPE="subscription_feature";var BS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},$a=function(r){return this instanceof $a?(this.v=r,this):new $a(r)},YS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof $a?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class $v extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/build-events",queryParams:l})}listPagedIterator(l,u){return YS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=BS(this.rawListPagedIterator(l,u)),_;_=yield $a(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield $a(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield $a(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/build-events/${l}`})}}$v.TYPE="build_event";var XS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},ka=function(r){return this instanceof ka?(this.v=r,this):new ka(r)},VS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof ka?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class kv extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/search-index-events",queryParams:l})}listPagedIterator(l,u){return VS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=XS(this.rawListPagedIterator(l,u)),_;_=yield ka(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield ka(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield ka(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/search-index-events/${l}`})}}kv.TYPE="search_index_event";var QS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Fa=function(r){return this instanceof Fa?(this.v=r,this):new Fa(r)},ZS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Fa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class Fv extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/items",queryParams:l}).then(Mt)}listPagedIterator(l,u){return ZS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=QS(this.rawListPagedIterator(l,u)),_;_=yield Fa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Fa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Fa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u,!0)}validateExisting(l,u){return this.rawValidateExisting(D(l),X(u,{id:D(l),type:"item",attributes:"*",relationships:["item_type","creator"]}))}rawValidateExisting(l,u){return this.client.request({method:"POST",url:`/items/${l}/validate`,body:Ui(u)})}validateNew(l){return this.rawValidateNew(X(l,{type:"item",attributes:"*",relationships:["item_type","creator"]}))}rawValidateNew(l){return this.client.request({method:"POST",url:"/items/validate",body:Ui(l)})}create(l){return this.rawCreate(X(l,{type:"item",attributes:"*",relationships:["item_type","creator"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/items",body:Ui(l)}).then(Mt)}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/items/${l}/duplicate`}).then(Mt)}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item",attributes:"*",relationships:["item_type","creator"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/items/${l}`,body:Ui(u)}).then(Mt)}references(l,u){return this.rawReferences(D(l),u).then(c=>O(c))}rawReferences(l,u){return this.client.request({method:"GET",url:`/items/${l}/references`,queryParams:u}).then(Mt)}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/items/${l}`,queryParams:u}).then(Mt)}currentVsPublishedState(l){return this.rawCurrentVsPublishedState(D(l)).then(u=>O(u))}rawCurrentVsPublishedState(l){return this.client.request({method:"GET",url:`/items/${l}/current-vs-published-state`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}`}).then(Mt)}publish(l,u,c){return this.rawPublish(D(l),u?X(u,{type:"selective_publish_operation",attributes:["content_in_locales","non_localized_content"],relationships:[]}):null,c).then(d=>O(d))}rawPublish(l,u,c){return this.client.request({method:"PUT",url:`/items/${l}/publish`,body:u,queryParams:c}).then(Mt)}unpublish(l,u,c){return this.rawUnpublish(D(l),u?X(u,{type:"selective_unpublish_operation",attributes:["content_in_locales"],relationships:[]}):null,c).then(d=>O(d))}rawUnpublish(l,u,c){return this.client.request({method:"PUT",url:`/items/${l}/unpublish`,body:u,queryParams:c}).then(Mt)}bulkPublish(l){return this.rawBulkPublish(X(l,{type:"item_bulk_publish_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkPublish(l){return this.client.request({method:"POST",url:"/items/bulk/publish",body:l})}bulkUnpublish(l){return this.rawBulkUnpublish(X(l,{type:"item_bulk_unpublish_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkUnpublish(l){return this.client.request({method:"POST",url:"/items/bulk/unpublish",body:l})}bulkDestroy(l){return this.rawBulkDestroy(X(l,{type:"item_bulk_destroy_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkDestroy(l){return this.client.request({method:"POST",url:"/items/bulk/destroy",body:l})}bulkMoveToStage(l){return this.rawBulkMoveToStage(X(l,{type:"item_bulk_move_to_stage_operation",attributes:["stage"],relationships:["items"]})).then(u=>O(u))}rawBulkMoveToStage(l){return this.client.request({method:"POST",url:"/items/bulk/move-to-stage",body:l})}}Fv.TYPE="item";var KS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Ia=function(r){return this instanceof Ia?(this.v=r,this):new Ia(r)},JS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Ia?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class Iv extends F{restore(l){return this.rawRestore(D(l)).then(u=>O(u))}rawRestore(l){return this.client.request({method:"POST",url:`/versions/${l}/restore`})}list(l,u){return this.rawList(D(l),u).then(c=>O(c))}rawList(l,u){return this.client.request({method:"GET",url:`/items/${l}/versions`,queryParams:u})}listPagedIterator(l,u,c){return JS(this,arguments,function*(){var f,h,v,g;try{for(var y=!0,_=KS(this.rawListPagedIterator(D(l),u,c)),S;S=yield Ia(_.next()),f=S.done,!f;){g=S.value,y=!1;try{yield yield Ia(Gt(g))}finally{y=!0}}}catch(p){h={error:p}}finally{try{!y&&!f&&(v=_.return)&&(yield Ia(v.call(_)))}finally{if(h)throw h.error}}})}rawListPagedIterator(l,u,c){return dn(u),on({defaultLimit:15,maxLimit:50},d=>this.rawList(l,Object.assign(Object.assign({},u),{page:d})),c)}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/versions/${l}`,queryParams:u})}}Iv.TYPE="item_version";var $S=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Pa=function(r){return this instanceof Pa?(this.v=r,this):new Pa(r)},kS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Pa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};let Rf=class extends F{create(l){return this.rawCreate(X(l,{type:"upload",attributes:["path","copyright","author","notes","default_field_metadata","tags"],relationships:["upload_collection"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/uploads",body:l})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/uploads",queryParams:l})}listPagedIterator(l,u){return kS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=$S(this.rawListPagedIterator(l,u)),_;_=yield Pa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Pa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Pa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/uploads/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/uploads/${l}`})}update(l,u,c){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload",attributes:["path","basename","copyright","author","notes","tags","default_field_metadata"],relationships:["creator","upload_collection"]}),c).then(d=>O(d))}rawUpdate(l,u,c){return this.client.request({method:"PUT",url:`/uploads/${l}`,body:u,queryParams:c})}references(l,u){return this.rawReferences(D(l),u).then(c=>O(c))}rawReferences(l,u){return this.client.request({method:"GET",url:`/uploads/${l}/references`,queryParams:u}).then(Mt)}bulkTag(l){return this.rawBulkTag(X(l,{type:"upload_bulk_tag_operation",attributes:["tags"],relationships:["uploads"]})).then(u=>O(u))}rawBulkTag(l){return this.client.request({method:"POST",url:"/uploads/bulk/tag",body:l})}bulkSetUploadCollection(l){return this.rawBulkSetUploadCollection(X(l,{type:"upload_bulk_set_upload_collection_operation",attributes:[],relationships:["upload_collection","uploads"]})).then(u=>O(u))}rawBulkSetUploadCollection(l){return this.client.request({method:"POST",url:"/uploads/bulk/set-upload-collection",body:l})}bulkDestroy(l){return this.rawBulkDestroy(X(l,{type:"upload_bulk_destroy_operation",attributes:[],relationships:["uploads"]})).then(u=>O(u))}rawBulkDestroy(l){return this.client.request({method:"POST",url:"/uploads/bulk/destroy",body:l})}};Rf.TYPE="upload";class Pv extends F{create(l){return this.rawCreate(X(l,{type:"upload_request",attributes:["filename"],relationships:["upload_collection"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-requests",body:l})}}Pv.TYPE="upload_request";class Wv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"upload_track",attributes:["url_or_upload_request_id","type","name","language_code","closed_captions"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/uploads/${l}/tracks`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/uploads/${l}/tracks`})}destroy(l,u){return this.rawDestroy(D(l),D(u)).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/uploads/${l}/tracks/${u}`})}generateSubtitles(l,u){return this.rawGenerateSubtitles(D(l),X(u,{type:"upload_track",attributes:["name","language_code"],relationships:[]})).then(c=>O(c))}rawGenerateSubtitles(l,u){return this.client.request({method:"POST",url:`/uploads/${l}/tracks/generate-subtitles`,body:u})}}Wv.TYPE="upload_track";class e_ extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"scheduled_publication",attributes:["publication_scheduled_at","selective_publication"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/items/${l}/scheduled-publication`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}/scheduled-publication`}).then(Mt)}}e_.TYPE="scheduled_publication";class t_ extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"scheduled_unpublishing",attributes:["unpublishing_scheduled_at","content_in_locales"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/items/${l}/scheduled-unpublishing`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}/scheduled-unpublishing`}).then(Mt)}}t_.TYPE="scheduled_unpublishing";var FS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Wa=function(r){return this instanceof Wa?(this.v=r,this):new Wa(r)},IS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Wa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class n_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/search-results",queryParams:l})}listPagedIterator(l,u){return IS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=FS(this.rawListPagedIterator(l,u)),_;_=yield Wa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Wa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Wa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:20,maxLimit:100},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}}n_.TYPE="search_result";class a_ extends F{fork(l,u,c){return this.rawFork(D(l),X(u,{id:D(l),type:"environment",attributes:[],relationships:[]}),c).then(d=>O(d))}rawFork(l,u,c){return this.client.request({method:"POST",url:`/environments/${l}/fork`,body:u,queryParams:c})}promote(l){return this.rawPromote(D(l)).then(u=>O(u))}rawPromote(l){return this.client.request({method:"PUT",url:`/environments/${l}/promote`})}rename(l,u){return this.rawRename(D(l),X(u,{id:D(l),type:"environment",attributes:[],relationships:[]})).then(c=>O(c))}rawRename(l,u){return this.client.request({method:"PUT",url:`/environments/${l}/rename`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/environments"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/environments/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/environments/${l}`})}}a_.TYPE="environment";class l_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/maintenance-mode"})}activate(l){return this.rawActivate(l).then(u=>O(u))}rawActivate(l){return this.client.request({method:"PUT",url:"/maintenance-mode/activate",queryParams:l})}deactivate(){return this.rawDeactivate().then(l=>O(l))}rawDeactivate(){return this.client.request({method:"PUT",url:"/maintenance-mode/deactivate"})}}l_.TYPE="maintenance_mode";class u_ extends F{create(l){return this.rawCreate(X(l,{type:"webhook",attributes:["name","url","custom_payload","headers","events","http_basic_user","http_basic_password","enabled","payload_api_version","nested_items_in_payload","auto_retry"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/webhooks",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"webhook",attributes:["name","url","custom_payload","headers","events","http_basic_user","http_basic_password","enabled","payload_api_version","nested_items_in_payload","auto_retry"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/webhooks/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/webhooks"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/webhooks/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/webhooks/${l}`})}}u_.TYPE="webhook";var PS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},el=function(r){return this instanceof el?(this.v=r,this):new el(r)},WS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof el?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class i_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/webhook_calls",queryParams:l})}listPagedIterator(l,u){return WS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=PS(this.rawListPagedIterator(l,u)),_;_=yield el(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield el(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield el(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/webhook_calls/${l}`})}resendWebhook(l){return this.rawResendWebhook(D(l))}rawResendWebhook(l){return this.client.request({method:"POST",url:`/webhook_calls/${l}/resend_webhook`})}}i_.TYPE="webhook_call";class r_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/build-triggers"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/build-triggers/${l}`})}create(l){return this.rawCreate(X(l,{type:"build_trigger",attributes:["name","webhook_token","adapter","indexing_enabled","enabled","frontend_url","autotrigger_on_scheduled_publications","adapter_settings"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/build-triggers",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"build_trigger",attributes:["name","adapter","indexing_enabled","enabled","frontend_url","autotrigger_on_scheduled_publications","adapter_settings"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/build-triggers/${l}`,body:u})}trigger(l){return this.rawTrigger(D(l))}rawTrigger(l){return this.client.request({method:"POST",url:`/build-triggers/${l}/trigger`})}abort(l){return this.rawAbort(D(l))}rawAbort(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}/abort`})}abortIndexing(l){return this.rawAbortIndexing(D(l))}rawAbortIndexing(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}/abort_indexing`})}reindex(l){return this.rawReindex(D(l))}rawReindex(l){return this.client.request({method:"PUT",url:`/build-triggers/${l}/reindex`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}`})}}r_.TYPE="build_trigger";class s_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/search-indexes"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/search-indexes/${l}`})}create(l){return this.rawCreate(X(l,{type:"search_index",attributes:["name","enabled","frontend_url","user_agent_suffix"],relationships:["build_triggers"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/search-indexes",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"search_index",attributes:["name","enabled","frontend_url","user_agent_suffix"],relationships:["build_triggers"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/search-indexes/${l}`,body:u})}trigger(l){return this.rawTrigger(D(l))}rawTrigger(l){return this.client.request({method:"POST",url:`/search-indexes/${l}/trigger`})}abort(l){return this.rawAbort(D(l))}rawAbort(l){return this.client.request({method:"DELETE",url:`/search-indexes/${l}/abort`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/search-indexes/${l}`})}}s_.TYPE="search_index";class c_ extends F{create(l){return this.rawCreate(X(l,{type:"item_type_filter",attributes:["name","filter","columns","order_by","shared"],relationships:["item_type"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/item-type-filters",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item_type_filter",attributes:["name","columns","order_by","shared","filter"],relationships:["item_type"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/item-type-filters/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/item-type-filters"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/item-type-filters/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/item-type-filters/${l}`})}}c_.TYPE="item_type_filter";class f_ extends F{create(l){return this.rawCreate(X(l,{type:"upload_filter",attributes:["name","filter","shared"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-filters",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload_filter",attributes:["name","shared","filter"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/upload-filters/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/upload-filters"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/upload-filters/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/upload-filters/${l}`})}}f_.TYPE="upload_filter";class o_ extends F{create(l){return this.rawCreate(X(l,{type:"site_invitation",attributes:["email"],relationships:["role"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/site-invitations",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"site_invitation",attributes:[],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/site-invitations/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/site-invitations"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/site-invitations/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/site-invitations/${l}`})}resend(l){return this.rawResend(D(l)).then(u=>O(u))}rawResend(l){return this.client.request({method:"POST",url:`/site-invitations/${l}/resend`})}}o_.TYPE="site_invitation";class d_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/editing-sessions"})}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/editing-sessions/${l}`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/editing-sessions/${l}`})}}d_.TYPE="editing_session";class h_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/sso-groups"})}copyRoles(l){return this.rawCopyRoles(D(l)).then(u=>O(u))}rawCopyRoles(l){return this.client.request({method:"POST",url:`/sso-groups/${l}/copy-roles`})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"sso_group",attributes:["priority"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/sso-groups/${l}`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/sso-groups/${l}`})}}h_.TYPE="sso_group";class m_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/sso-settings"})}generateToken(){return this.rawGenerateToken().then(l=>O(l))}rawGenerateToken(){return this.client.request({method:"PUT",url:"/sso-settings/generate-token"})}update(l){return this.rawUpdate(X(l,{type:"sso_settings",attributes:["idp_saml_metadata_url","idp_saml_metadata_xml"],relationships:["default_role"]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/sso-settings",body:l})}}m_.TYPE="sso_settings";class y_ extends F{find(l){return this.rawFind(l).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:"/emoji-suggestions",queryParams:l})}}y_.TYPE="emoji_suggestions";class v_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/white-label-settings"})}update(l){return this.rawUpdate(X(l,{type:"white_label_settings",attributes:["custom_i18n_messages_template_url"],relationships:[]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/white-label-settings",body:l})}}v_.TYPE="white_label_settings";class __ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/public-info"})}}__.TYPE="public_info";class p_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/daily-site-usages"})}}p_.TYPE="daily_usage";class g_ extends F{find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/usage-log-counters/${l}`,queryParams:u})}}g_.TYPE="usage_counter";var e1=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},tl=function(r){return this instanceof tl?(this.v=r,this):new tl(r)},t1=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof tl?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class b_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-tags",queryParams:l})}listPagedIterator(l,u){return t1(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=e1(this.rawListPagedIterator(l,u)),_;_=yield tl(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield tl(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield tl(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:50,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}create(l){return this.rawCreate(X(l,{type:"upload_tag",attributes:["name"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-tags",body:l})}}b_.TYPE="upload_tag";var n1=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},nl=function(r){return this instanceof nl?(this.v=r,this):new nl(r)},a1=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof nl?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class S_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-smart-tags",queryParams:l})}listPagedIterator(l,u){return a1(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=n1(this.rawListPagedIterator(l,u)),_;_=yield nl(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield nl(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield nl(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:50,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}}S_.TYPE="upload_smart_tag";class E_ extends F{find(l){return this.rawFind(l).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:"/site",queryParams:l})}update(l){return this.rawUpdate(X(l,{type:"site",attributes:["no_index","favicon","global_seo","name","theme","locales","timezone","require_2fa","ip_tracking_enabled","force_use_of_sandbox_environments"],relationships:["sso_default_role"]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/site",body:l})}activateImprovedTimezoneManagement(){return this.rawActivateImprovedTimezoneManagement().then(l=>O(l))}rawActivateImprovedTimezoneManagement(){return this.client.request({method:"PUT",url:"/site/activate-improved-timezone-management"})}activateImprovedHexManagement(){return this.rawActivateImprovedHexManagement().then(l=>O(l))}rawActivateImprovedHexManagement(){return this.client.request({method:"PUT",url:"/site/activate-improved-hex-management"})}activateImprovedGqlMultilocaleFields(){return this.rawActivateImprovedGqlMultilocaleFields().then(l=>O(l))}rawActivateImprovedGqlMultilocaleFields(){return this.client.request({method:"PUT",url:"/site/activate-improved-gql-multilocale-fields"})}activateImprovedGqlVisibilityControl(){return this.rawActivateImprovedGqlVisibilityControl().then(l=>O(l))}rawActivateImprovedGqlVisibilityControl(){return this.client.request({method:"PUT",url:"/site/activate-improved-gql-visibility-control"})}activateImprovedBooleanFields(){return this.rawActivateImprovedBooleanFields().then(l=>O(l))}rawActivateImprovedBooleanFields(){return this.client.request({method:"PUT",url:"/site/activate-improved-boolean-fields"})}activateDraftModeAsDefault(){return this.rawActivateDraftModeAsDefault().then(l=>O(l))}rawActivateDraftModeAsDefault(){return this.client.request({method:"PUT",url:"/site/activate-draft-mode-as-default"})}activateImprovedValidationAtPublishing(){return this.rawActivateImprovedValidationAtPublishing().then(l=>O(l))}rawActivateImprovedValidationAtPublishing(){return this.client.request({method:"PUT",url:"/site/activate-improved-validation-at-publishing"})}activateImprovedExposureOfInlineBlocksInCda(){return this.rawActivateImprovedExposureOfInlineBlocksInCda().then(l=>O(l))}rawActivateImprovedExposureOfInlineBlocksInCda(){return this.client.request({method:"PUT",url:"/site/activate-improved-exposure-of-inline-blocks-in-cda"})}activateImprovedItemsListing(){return this.rawActivateImprovedItemsListing().then(l=>O(l))}rawActivateImprovedItemsListing(){return this.client.request({method:"PUT",url:"/site/activate-improved-items-listing"})}activateMillisecondsInDatetime(){return this.rawActivateMillisecondsInDatetime().then(l=>O(l))}rawActivateMillisecondsInDatetime(){return this.client.request({method:"PUT",url:"/site/activate-milliseconds-in-datetime"})}updateAssetsCdnDefaultSettings(l){return this.rawUpdateAssetsCdnDefaultSettings(X(l,{type:"assets-cdn-default-settings",attributes:["assets_cdn_default_settings"],relationships:[]})).then(u=>O(u))}rawUpdateAssetsCdnDefaultSettings(l){return this.client.request({method:"PUT",url:"/site/assets-cdn-default-settings",body:l})}}E_.TYPE="site";class T_ extends F{create(l){return this.rawCreate(X(l,{type:"workflow",attributes:["name","api_key","stages"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/workflows",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"workflow",attributes:["name","api_key","stages"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/workflows/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/workflows"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/workflows/${l}`})}destroy(l){return this.rawDestroy(D(l))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/workflows/${l}`})}}T_.TYPE="workflow";var l1=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};let O_=class w_{constructor(l){this.config=l,this.roles=new HS(this),this.users=new Uv(this),this.ssoUsers=new xv(this),this.auditLogEvents=new Nv(this),this.menuItems=new jv(this),this.schemaMenuItems=new Lv(this),this.uploadCollections=new Gv(this),this.itemTypes=new Hv(this),this.fields=new Bv(this),this.fieldsets=new Yv(this),this.session=new Xv(this),this.accessTokens=new Vv(this),this.plugins=new Qv(this),this.jobResults=new Zv(this),this.subscriptionLimits=new Kv(this),this.subscriptionFeatures=new Jv(this),this.buildEvents=new $v(this),this.searchIndexEvents=new kv(this),this.items=new Fv(this),this.itemVersions=new Iv(this),this.uploads=new Rf(this),this.uploadRequest=new Pv(this),this.uploadTracks=new Wv(this),this.scheduledPublication=new e_(this),this.scheduledUnpublishing=new t_(this),this.searchResults=new n_(this),this.environments=new a_(this),this.maintenanceMode=new l_(this),this.webhooks=new u_(this),this.webhookCalls=new i_(this),this.buildTriggers=new r_(this),this.searchIndexes=new s_(this),this.itemTypeFilters=new c_(this),this.uploadFilters=new f_(this),this.siteInvitations=new o_(this),this.editingSessions=new d_(this),this.ssoGroups=new h_(this),this.ssoSettings=new m_(this),this.emojiSuggestions=new y_(this),this.whiteLabelSettings=new v_(this),this.publicInfo=new __(this),this.dailyUsages=new p_(this),this.usageCounters=new g_(this),this.uploadTags=new b_(this),this.uploadSmartTags=new S_(this),this.site=new E_(this),this.workflows=new T_(this)}get baseUrl(){return this.config.baseUrl||w_.defaultBaseUrl}request(l){return ji(Object.assign(Object.assign(Object.assign({},this.config),l),{logFn:this.config.logFn||console.log,userAgent:"@datocms/cma-client v5.3.0",baseUrl:this.baseUrl,preCallStack:new Error().stack,extraHeaders:Object.assign(Object.assign(Object.assign({},this.config.extraHeaders||{}),this.config.environment?{"X-Environment":this.config.environment}:{}),{"X-API-Version":"3"}),fetchJobResult:u=>this.jobResultsFetcher?this.jobResultsFetcher(u):bS(()=>this.jobResults.find(u))}))}eventsChannelName(){return l1(this,void 0,void 0,function*(){if(this.cachedEventsChannelName)return this.cachedEventsChannelName;const{data:l}=yield this.site.rawFind();return this.cachedEventsChannelName=this.config.environment?`private-site-${l.id}-environment-${this.config.environment}`:`private-site-${l.id}`,this.cachedEventsChannelName})}};O_.defaultBaseUrl="https://site-api.datocms.com";function u1(r,l,{onProgress:u,additionalHeaders:c}={}){const d=new XMLHttpRequest;return nu(new Promise((f,h)=>{if(u&&d.upload&&(d.upload.onprogress=v=>{v.lengthComputable&&u({type:"UPLOADING_FILE",payload:{progress:Math.round(v.loaded/v.total*100)}})}),d.onreadystatechange=()=>{d.readyState===4&&(d.status===200?f():h(new Error(`Status ${d.status}`)))},d.addEventListener("error",h,!1),d.open("PUT",l,!0),c)for(const[v,g]of Object.entries(c))d.setRequestHeader(v,g);d.send(r)}),()=>{d.onreadystatechange=null,d.abort()})}var i1=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function yv(r,l,u={}){const c=u.filename||("name"in l?l.name:void 0);if(!c)throw new Error("Missing filename, please provide it as an option!");let d=!1,f;return nu(()=>i1(this,void 0,void 0,function*(){u.onProgress&&u?.onProgress({type:"REQUESTING_UPLOAD_URL",payload:{filename:c}});const{id:h,url:v,request_headers:g}=yield r.uploadRequest.create({filename:c});if(d)throw new tu;return u.onProgress&&u.onProgress({type:"UPLOADING_FILE",payload:{progress:0}}),f=u1(l,v,Object.assign(Object.assign({},u),{additionalHeaders:g})),yield f,h}),()=>{f?f.cancel():d=!0})}var vv=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})},_v=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u};class r1 extends Rf{createFromFileOrBlob(l){let u=!1,c;return nu(()=>vv(this,void 0,void 0,function*(){if(u)throw new tu;const{fileOrBlob:d,filename:f,onProgress:h}=l,v=_v(l,["fileOrBlob","filename","onProgress"]);c=yv(this.client,d,{filename:f,onProgress:h});const g=yield c;return h&&h({type:"CREATING_UPLOAD_OBJECT"}),this.create(Object.assign(Object.assign({},v),{path:g}))}),()=>{c?c.cancel():u=!0})}updateFromFileOrBlob(l,u){let c=!1,d;return nu(()=>vv(this,void 0,void 0,function*(){if(c)throw new tu;const{fileOrBlob:f,filename:h,onProgress:v}=u,g=_v(u,["fileOrBlob","filename","onProgress"]);d=yv(this.client,f,{filename:h,onProgress:v});const y=yield d;return v&&v({type:"CREATING_UPLOAD_OBJECT"}),this.update(l,Object.assign(Object.assign({},g),{path:y}))}),()=>{d?d.cancel():c=!0})}}class s1 extends O_{constructor(l){super(l),this.uploads=new r1(this)}}function c1(r){return new s1(r)}const f1="https://alttext.ai/api/v1/images",o1="jpeg",d1="1024",h1="datocms",m1="Unknown error";function A_(r){return r instanceof Error?r.message:String(r??m1)}function q_(r){const l=r.error_code??"unknown_error",u=r.errors?.base?.[0];return u?`${l}: ${u}`:l}function y1(r){const l=new URL(r);return l.searchParams.set("fm",o1),l.searchParams.set("w",d1),l.toString()}function v1(r){const l=r.plugin.attributes.parameters.apiKey;return typeof l!="string"||l.trim()===""?null:l.trim()}function _1(r){return typeof r=="string"&&r.trim().length>0}function C_(r,l){return l==="overwrite-all"?!0:!_1(r.alt)}function Mf(r){return typeof r=="object"&&r!==null&&typeof r.upload_id=="string"}function z_(r){return Array.isArray(r)&&r.every(l=>Mf(l))}function p1(r){return Ov(r.formValues,r.fieldPath)}function D_(r){return Mf(r)?!0:z_(r)&&r.length>0}async function R_(r,l,u,c){const{url:d}=await l.uploads.find(u.upload_id),f=await fetch(f1,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":r,"X-Client":h1},body:JSON.stringify({image:{url:y1(d),asset_id:`dato-${u.upload_id}`},lang:c})});let h;try{h=await f.json()}catch{}return f.ok?h||{error_code:"invalid_response",errors:{base:["Could not parse AltText.ai response"]}}:{error_code:`http_${f.status}`,errors:{base:[h?.errors?.base?.[0]||h?.error_code||f.statusText||"Request failed"]}}}async function g1(r,l,u,c,d){if(!C_(r,d)){await c.notice("Alt text already exists for this asset.");return}const f=await R_(l,u,r,c.locale);if(f.error_code){await c.alert(`Error fetching alt text: ${q_(f)}`);return}await c.setFieldValue(c.fieldPath,{...r,alt:f.alt_text??r.alt})}async function b1(r,l,u,c,d){const f=r.map((_,S)=>({asset:_,index:S})).filter(({asset:_})=>C_(_,d));if(f.length===0){await c.notice("No assets need alt text generation.");return}const h=await Promise.allSettled(f.map(({asset:_})=>R_(l,u,_,c.locale)));let v=!1;const g=[...r],y=[];f.forEach(({asset:_,index:S},p)=>{const R=h[p];if(R.status==="rejected"){y.push(`Image ${_.upload_id}: request_failed: ${A_(R.reason)}`);return}const x=R.value;if(x.error_code){y.push(`Image ${_.upload_id}: ${q_(x)}`);return}g[S]={..._,alt:x.alt_text??_.alt},v=!0}),y.length>0&&await c.alert(`Alt text errors:
|
|
15
|
+
${this.preCallStack}`)}get errors(){return _S(this.response.body)?this.response.body.data:[]}findError(l,u){const c=Array.isArray(l)?l:[l];return this.errors.find(d=>c.includes(d.attributes.code)&&(!u||(typeof u=="function"?u(d.attributes.details):Object.entries(u).every(([f,h])=>d.attributes.details[f]===h))))}}class tu extends Error{constructor(){super("Promise canceled!"),Object.setPrototypeOf(this,new.target.prototype)}}function nu(r,l){let u=null;const c=new Promise((d,f)=>{u=()=>{try{l&&l(),f(new tu)}catch(v){f(v)}},(typeof r=="function"?r():r).then(d,f)});return u&&(c.cancel=u),c}function Ni(r){return new Promise(l=>{setTimeout(l,r)})}var gS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function bS(r){return gS(this,void 0,void 0,function*(){let l,u=0;do try{u+=1,yield Ni(u*1e3),l=yield r()}catch(c){if(!(c instanceof ca)||c.response.status!==404)throw c}while(!l);return l})}var Wl={},Gn={},vf={},uv;function qv(){return uv||(uv=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.TaskCollisionStrategy=void 0,(function(l){l[l.DEFAULT=0]="DEFAULT",l[l.KEEP_THIS=1]="KEEP_THIS",l[l.KEEP_OTHER=2]="KEEP_OTHER",l[l.KEEP_BOTH=3]="KEEP_BOTH",l[l.RESOLVE_THIS=4]="RESOLVE_THIS",l[l.RESOLVE_OTHER=5]="RESOLVE_OTHER"})(r.TaskCollisionStrategy||(r.TaskCollisionStrategy={}))})(vf)),vf}var Ri={},iv;function Cv(){if(iv)return Ri;iv=1,Object.defineProperty(Ri,"__esModule",{value:!0});let r=class{constructor(u,c){this._code=u,this._message=c}get code(){return this._code}get message(){return this._message}};return Ri.default=r,Ri}var ra={},rv;function zv(){if(rv)return ra;rv=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.mutexEquality=ra.mutexBitwiseAnd=void 0;function r(u,c){return(u&c)!==0}ra.mutexBitwiseAnd=r;function l(u,c){return u===c}return ra.mutexEquality=l,ra}var Mi={},sv;function SS(){if(sv)return Mi;sv=1,Object.defineProperty(Mi,"__esModule",{value:!0});let r=class{constructor(u,c){this._meta=void 0,this._task=u,this._scheduler=c}withDescriptor(u){return this._descriptor=u,this}withMutex(u){return this._mutex=u,this}withMeta(u){return this._meta=u,this}runBeforeExecuting(u){return this._onPreExecute=u,this}handleCollisions(u){return this._onTaskCollision=u,this}execute(u){return this._scheduler.enqueue({priority:u,mutex:this._mutex,descriptor:this._descriptor,meta:this._meta,execute:this._task,onPreExecute:this._onPreExecute,onTaskCollision:this._onTaskCollision})}};return Mi.default=r,Mi}var cv;function ES(){if(cv)return Gn;cv=1;var r=Gn&&Gn.__awaiter||function(y,_,S,p){function R(x){return x instanceof S?x:new S(function(G){G(x)})}return new(S||(S=Promise))(function(x,G){function W(ae){try{oe(p.next(ae))}catch(P){G(P)}}function k(ae){try{oe(p.throw(ae))}catch(P){G(P)}}function oe(ae){ae.done?x(ae.value):R(ae.value).then(W,k)}oe((p=p.apply(y,_||[])).next())})},l=Gn&&Gn.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Gn,"__esModule",{value:!0});const u=qv(),c=l(Cv()),d=zv(),f=l(SS());var h;(function(y){y[y.PENDING=0]="PENDING",y[y.EXECUTING=1]="EXECUTING",y[y.TERMINATED=2]="TERMINATED"})(h||(h={}));function v(y,_){for(let S of y.listeners)S.reject(_)}let g=class{constructor(_,S={}){this._queue=[],this._isExecuting=!1,this._idleListeners=[],this._maxConcurrentTasks=_,this._samePriorityMutex=!!S.samePriorityMutex,this._mutexStrategy=S.mutexStrategy||d.mutexEquality,S.disableLogging?this._errorLog=()=>{}:this._errorLog=console.error}enqueue(_){return new Promise((S,p)=>{typeof _=="function"&&(_={priority:0,execute:_});const R=this._checkMutexes(_,S,p);R.task?this._addTask(R.task):R.canceled&&p(this.createCanceledError())})}prepare(_){return new f.default(_,this)}_addTask(_){this._queue.push(_),this._applyPriorities(),this._isExecuting||(this._isExecuting=!0,setTimeout(this._executeNextTasks.bind(this)))}get executingTasks(){return this._queue.reduce((_,S)=>S.state===h.EXECUTING?_+1:_,0)}createCanceledError(){return new c.default(50,"Task has been canceled in favor of another task")}_findFirstPendingTask(){return this._queue.find(_=>_.state===h.PENDING)}_isIdle(){return this._queue.length===0||!this._queue.find(_=>_.state!==h.TERMINATED)}_removeTaskAt(_){this._queue.splice(_,1)}_executeTask(_){return r(this,void 0,void 0,function*(){try{return _.task.onPreExecute&&_.task.onPreExecute(),yield _.task.execute()}catch(S){throw S}finally{_.state=h.TERMINATED;let S=this._queue.indexOf(_);this._removeTaskAt(S),this._executeNextTasks()}})}_executeNextTasks(){let _=this.executingTasks;if(_>=this._maxConcurrentTasks)return;let S=this._maxConcurrentTasks-_;for(let p=0;p<S;p++){const R=this._findFirstPendingTask();if(!R){this._isIdle()&&this._switchToIdle();return}R.state=h.EXECUTING,this._executeTask(R).then(x=>{for(const{resolve:G}of R.listeners)try{G(x)}catch(W){this._errorLog("An error occurred while resolving listener",W)}}).catch(x=>{for(const{reject:G}of R.listeners)try{G(x)}catch(W){this._errorLog("An error occurred while rejecting listener",W)}})}}_switchToIdle(){this._isExecuting=!1;const _=this._idleListeners;this._idleListeners=[];for(const{resolve:S}of _)try{S()}catch{}}waitForIdle(){return this._isExecuting?new Promise((_,S)=>{this._idleListeners.push({resolve:_,reject:S})}):Promise.resolve()}_applyPriorities(){this._queue.sort((_,S)=>S.task.priority-_.task.priority)}_checkMutexes(_,S,p){for(let R=0;R<this._queue.length;R++){let x=this._queue[R];if(x.state===h.TERMINATED||this._samePriorityMutex&&x.task.priority!=_.priority||!x.task.mutex||!_.mutex||!this._mutexStrategy(x.task.mutex,_.mutex))continue;let G,W;if(x.task.onTaskCollision)if(G=x.task.onTaskCollision(_),G===u.TaskCollisionStrategy.KEEP_OTHER&&x.state!==h.EXECUTING){this._removeTaskAt(R--),v(x,this.createCanceledError());continue}else{if(G===u.TaskCollisionStrategy.KEEP_THIS)return{canceled:!0};if(G===u.TaskCollisionStrategy.RESOLVE_OTHER)return this._removeTaskAt(R--),{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p},...x.listeners]}};if(G===u.TaskCollisionStrategy.RESOLVE_THIS)return x.listeners=[...x.listeners,{resolve:S,reject:p}],{canceled:!1}}if(_.onTaskCollision){if(W=_.onTaskCollision(x.task),W===u.TaskCollisionStrategy.KEEP_OTHER)return{canceled:!0};if(W===u.TaskCollisionStrategy.KEEP_THIS){this._removeTaskAt(R--),v(x,this.createCanceledError());continue}else{if(W===u.TaskCollisionStrategy.RESOLVE_OTHER)return x.listeners=[...x.listeners,{resolve:S,reject:p}],{canceled:!1};if(W===u.TaskCollisionStrategy.RESOLVE_THIS)return this._removeTaskAt(R--),{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p},...x.listeners]}}}}if(!(G===u.TaskCollisionStrategy.KEEP_BOTH&&W===u.TaskCollisionStrategy.KEEP_BOTH))return{canceled:!0}}return{canceled:!1,task:{task:_,state:h.PENDING,listeners:[{resolve:S,reject:p}]}}}};return Gn.default=g,Gn}var fv;function TS(){return fv||(fv=1,(function(r){var l=Wl&&Wl.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.mutexEquality=r.mutexBitwiseAnd=r.SchedulerError=r.TaskCollisionStrategy=r.Scheduler=void 0;const u=l(ES());r.Scheduler=u.default;const c=qv();Object.defineProperty(r,"TaskCollisionStrategy",{enumerable:!0,get:function(){return c.TaskCollisionStrategy}});const d=l(Cv());r.SchedulerError=d.default;const f=zv();Object.defineProperty(r,"mutexBitwiseAnd",{enumerable:!0,get:function(){return f.mutexBitwiseAnd}}),Object.defineProperty(r,"mutexEquality",{enumerable:!0,get:function(){return f.mutexEquality}})})(Wl)),Wl}var OS=TS(),sa=function(r){return this instanceof sa?(this.v=r,this):new sa(r)},wS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof sa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};function on(r,l,u,c){return wS(this,arguments,function*(){const f=u?.perPage||r.defaultLimit;if(f>r.maxLimit)throw new Error(`perPage option cannot exceed maximum value of ${r.maxLimit}`);const h=u?.concurrency||1;if(h>10)throw new Error("concurrency option cannot exceed maximum value of 10");const v=yield sa(l({limit:f,offset:0}));for(const S of v.data)yield yield sa(S);const g=v.meta.total_count,y=new OS.Scheduler(h),_=[];for(let S=f;S<g;S+=f)_.push(y.enqueue(()=>l({limit:f,offset:S})));for(;_.length>0;){const S=yield sa(_.shift());for(const p of S.data)yield yield sa(c?eu(p):p)}})}function dn(r){r&&"page"in r&&console.warn("Passing a `page` query param on paged iterators has no effect: use the `perPage` option instead.")}const Dv="__ARRAY_INDEX__";function AS(r){return r.reduce((l,u,c)=>c===0?u:u===Dv?`${l}[]`:`${l}[${u}]`,"")}function qS(r){if(typeof r=="number"||typeof r=="string")return r.toString();if(r===!0)return"true";if(r===!1)return"false";throw`Don't know how to serialize param value ${JSON.stringify(r)}`}function Tf(r,l=[]){const u=[];if(typeof r=="number"||typeof r=="string"||typeof r=="boolean")u.push([AS(l),qS(r)]);else if(typeof r=="object"){if(Array.isArray(r))for(const c of r)for(const d of Tf(c,[...l,Dv]))u.push(d);else if(r)for(const[c,d]of Object.entries(r))for(const f of Tf(d,[...l,c]))u.push(f)}return u}var CS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};const zS=typeof window<"u"&&typeof window.document<"u",DS=5;var Rt;(function(r){r[r.NONE=0]="NONE",r[r.BASIC=1]="BASIC",r[r.BODY=2]="BODY",r[r.BODY_AND_HEADERS=3]="BODY_AND_HEADERS"})(Rt||(Rt={}));function RS(r){const l={};return r.forEach((u,c)=>{l[c]=u}),l}function ov(r,l,u,c,d,f,h){return{request:{url:l,method:r,headers:u,body:c},response:{status:d.status,statusText:d.statusText,headers:RS(d.headers),body:f},preCallStack:h}}function MS(r,l,u,c,d){return{request:{url:l,method:r,headers:u,body:c},preCallStack:d}}function US(r,l,u,c,d,f,h){return{request:{url:l,method:r,headers:u,body:c},response:{status:d,statusText:"N/A",headers:{},body:f},preCallStack:h}}function xS(r){return typeof r=="object"&&!!r&&"code"in r}function NS(r){return Object.fromEntries(Object.entries(r).map(([l,u])=>[l.toLowerCase(),u]))}let dv=1;function jS(r){const l=r||(typeof fetch>"u"?void 0:fetch)||(typeof globalThis>"u"?void 0:globalThis.fetch);if(typeof l>"u")throw new Error("fetch() is not available: either polyfill it globally, or provide it as fetchFn option.");return l}function ji(r){var l;return CS(this,void 0,void 0,function*(){const u=dv;dv+=1;const c=jS(r.fetchFn),d=r.preCallStack,f=r.userAgent||"@datocms/rest-client-utils",h=r.retryCount||1,v=r.logLevel||Rt.NONE,g="autoRetry"in r?r.autoRetry:!0,y=r.logFn||(()=>!0),_=Object.assign({"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r.apiToken}`,"user-agent":f},r.extraHeaders?NS(r.extraHeaders):{});zS&&delete _["user-agent"];const S=r.baseUrl.replace(/\/$/,""),p=r.body?JSON.stringify(r.body,null,2):void 0,R=r.queryParams&&Object.keys(r.queryParams).length>0?`?${new URLSearchParams(Tf(r.queryParams)).toString()}`:"",x=`${S}${r.url}${R}`;if(v>=Rt.BASIC){if(y(`[${u}] ${r.method} ${x}`),v>=Rt.BODY_AND_HEADERS)for(const[G,W]of Object.entries(_||{}))y(`[${u}] ${G}: ${W}`);v>=Rt.BODY&&p&&y(`[${u}] ${p}`)}try{const G=nu(c(x,{method:r.method,headers:_,body:p})),W=setTimeout(()=>{G.cancel()},r.requestTimeout||3e4),k=yield G;clearTimeout(W);const oe=k.headers.get("Content-Type"),ae=oe&&!oe.includes("application/json");if(k.status===429||ae){if(!g||ae&&r.method!=="GET")throw new ca(ov(r.method,x,_,r.body,k,void 0,d));const Y=k.headers.has("X-RateLimit-Reset")?Number.parseInt(k.headers.get("X-RateLimit-Reset"),10):h;return v>=Rt.BASIC&&(k.status===429?y(`[${u}] Rate limit exceeded, wait ${Y} seconds then retry...`):y(`[${u}] Invalid response content type "${oe}" (status ${k.status}). Wait ${Y} seconds then retry...`)),yield Ni(Y*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}))}if(v>=Rt.BASIC&&(y(`[${u}] Status: ${k.status} (${k.statusText})`),v>=Rt.BODY_AND_HEADERS))for(const Y of["x-api-version","x-environment","x-queue-time","x-ratelimit-remaining","x-request-id","cf-ray"]){const Ae=k.headers.get(Y);Ae&&y(`[${u}] ${Y}: ${Ae}`)}let P=k.status===204?void 0:yield k.json();if(v>=Rt.BODY&&P&&y(`[${u}] ${JSON.stringify(P,null,2)}`),k.status===202){const Y=yield r.fetchJobResult(P.data.id);if(Y.status<200||Y.status>=300)throw new ca(US(r.method,x,_,r.body,Y.status,Y.payload,d));P=Y.payload}if(k.status>=200&&k.status<300)return P;const me=new ca(ov(r.method,x,_,r.body,k,P,d)),re=(l=me.errors.find(Y=>Y.attributes.transient))===null||l===void 0?void 0:l.attributes.code;if(g&&re)return v>=Rt.BASIC&&y(`[${u}] ${re}, wait ${h} seconds then retry...`),yield Ni(h*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}));throw me}catch(G){if(G instanceof tu||xS(G)&&G.code.includes("ETIMEDOUT")){if(g&&h<DS)return v>=Rt.BASIC&&y(`[${u}] Timeout error, wait ${h} seconds then retry...`),yield Ni(h*1e3),ji(Object.assign(Object.assign({},r),{retryCount:h+1}));throw new pS(MS(r.method,x,_,r.body,d))}throw G}})}var Rv=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u};function Li(r){return typeof r=="object"&&!!r&&"id"in r&&"type"in r}function _f(r){return Array.isArray(r)&&r.every(Li)}function X(r,l){if(typeof r!="object"||!r)throw new Error("Invalid body!");if(Array.isArray(r))return{data:r.map(y=>{var _;return(_=X(y,l))===null||_===void 0?void 0:_.data})};const u=r,{id:c,type:d,meta:f}=u,h=Rv(u,["id","type","meta"]),v={},g={};if(l.attributes==="*")for(const[y,_]of Object.entries(h))if(l.relationships.includes(y))if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};else v[y]=_;else if(l.relationships==="*")for(const[y,_]of Object.entries(h))if(l.attributes.includes(y))v[y]=_;else if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};else{for(const[y,_]of Object.entries(h))if(l.attributes.includes(y))v[y]=_;else if(l.relationships.includes(y))if(Li(_)){const{id:S,type:p}=_;g[y]={data:{id:S,type:p}}}else _f(_)?g[y]={data:_.map(({id:S,type:p})=>({id:S,type:p}))}:g[y]={data:null};l.attributes.includes("type")&&(v.type=d)}return{data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c||l.id?{id:c||l.id}:{}),{type:l.type}),Object.keys(v).length>0?{attributes:v}:{}),Object.keys(g).length>0?{relationships:g}:{}),f?{meta:f}:{})}}function Of(r){if(Array.isArray(r))return r.map(Of);if(r&&typeof r=="object"){const l={};for(const[u,c]of Object.entries(r))u!=="__itemTypeId"&&(l[u]=Of(c));return l}return r}function hv(r){if(!r||typeof r!="object")return r;const{__itemTypeId:l}=r,u=Rv(r,["__itemTypeId"]),c={};for(const[d,f]of Object.entries(u))c[d]=Of(f);return c}function Ui(r){return!r||!("data"in r)?r:Array.isArray(r.data)?Object.assign(Object.assign({},r),{data:r.data.map(hv)}):Object.assign(Object.assign({},r),{data:hv(r.data)})}function D(r){return typeof r=="string"?r:r.id}class F{constructor(l){this.client=l}}class Mv extends F{create(l){return this.rawCreate(X(l,{type:"role",attributes:["name","can_edit_favicon","can_edit_site","can_edit_schema","can_manage_menu","can_edit_environment","can_promote_environments","environments_access","can_manage_users","can_manage_shared_filters","can_manage_search_indexes","can_manage_upload_collections","can_manage_build_triggers","can_manage_webhooks","can_manage_environments","can_manage_sso","can_access_audit_log","can_manage_workflows","can_manage_access_tokens","can_perform_site_search","can_access_build_events_log","can_access_search_index_events_log","positive_item_type_permissions","negative_item_type_permissions","positive_upload_permissions","negative_upload_permissions","positive_build_trigger_permissions","negative_build_trigger_permissions","positive_search_index_permissions","negative_search_index_permissions"],relationships:["inherits_permissions_from"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/roles",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"role",attributes:["name","can_edit_favicon","can_edit_site","can_edit_schema","can_manage_menu","can_edit_environment","can_promote_environments","environments_access","can_manage_users","can_manage_shared_filters","can_manage_search_indexes","can_manage_upload_collections","can_manage_build_triggers","can_manage_webhooks","can_manage_environments","can_manage_sso","can_access_audit_log","can_manage_workflows","can_manage_access_tokens","can_perform_site_search","can_access_build_events_log","can_access_search_index_events_log","positive_item_type_permissions","negative_item_type_permissions","positive_upload_permissions","negative_upload_permissions","positive_build_trigger_permissions","negative_build_trigger_permissions","positive_search_index_permissions","negative_search_index_permissions"],relationships:["inherits_permissions_from"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/roles/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/roles"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/roles/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/roles/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/roles/${l}/duplicate`})}}Mv.TYPE="role";var LS=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function mv(r,l){return r==null&&l==null?!0:r===l}function GS(r,l){for(const u in r)if(!mv(r[u],l[u]))return!1;for(const u in l)if(!mv(r[u],l[u]))return!1;return!0}function xi(r,l,u,c){if(!l)return r;const{add:d,remove:f}=l;return[...f?f.reduce((h,v)=>{const g=Object.assign(Object.assign({},v),{environment:u}),y=h.find(_=>GS(_,g));if(!y)throw new Error(`Cannot find rule ${JSON.stringify(g)} to remove in ${c}!`);return h.filter(_=>_!==y)},r):r,...d?d.map(h=>Object.assign({environment:u},h)):[]]}class HS extends Mv{updateCurrentEnvironmentPermissions(l,u){return LS(this,void 0,void 0,function*(){const c=this.client.config.environment||(yield this.client.environments.list()).find(g=>g.meta.primary).id,d=yield this.find(l),f=!!(u.positive_item_type_permissions||u.negative_item_type_permissions),h=!!(u.positive_upload_permissions||u.negative_upload_permissions),v=Object.assign(Object.assign({},f?{positive_item_type_permissions:xi(d.positive_item_type_permissions,u.positive_item_type_permissions,c,"positive_item_type_permissions"),negative_item_type_permissions:xi(d.negative_item_type_permissions,u.negative_item_type_permissions,c,"negative_item_type_permissions")}:{}),h?{positive_upload_permissions:xi(d.positive_upload_permissions,u.positive_upload_permissions,c,"positive_upload_permissions"),negative_upload_permissions:xi(d.negative_upload_permissions,u.negative_upload_permissions,c,"negative_upload_permissions")}:{});return this.update(l,v)})}}class Uv extends F{update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"user",attributes:["is_active"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/users/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/users"})}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/users/${l}`,queryParams:u})}findMe(l){return this.rawFindMe(l).then(u=>O(u))}rawFindMe(l){return this.client.request({method:"GET",url:"/users/me",queryParams:l})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/users/${l}`,queryParams:u})}}Uv.TYPE="user";class xv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/sso-users"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/sso-users/${l}`})}copyUsers(){return this.rawCopyUsers().then(l=>O(l))}rawCopyUsers(){return this.client.request({method:"POST",url:"/sso-users/copy-users"})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/sso-users/${l}`,queryParams:u})}}xv.TYPE="sso_user";class Nv extends F{query(l){return this.rawQuery(X(l,{type:"audit_log_query",attributes:["filter","next_token","detailed_log"],relationships:[]})).then(u=>O(u))}rawQuery(l){return this.client.request({method:"POST",url:"/audit-log-events/query",body:l})}}Nv.TYPE="audit_log_event";class jv extends F{create(l){return this.rawCreate(X(l,{type:"menu_item",attributes:["label","external_url","position","open_in_new_tab"],relationships:["item_type","item_type_filter","parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/menu-items",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"menu_item",attributes:["label","external_url","position","open_in_new_tab"],relationships:["item_type","item_type_filter","parent"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/menu-items/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/menu-items",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/menu-items/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/menu-items/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"menu_item",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/menu-items/reorder",body:l})}}jv.TYPE="menu_item";class Lv extends F{create(l){return this.rawCreate(X(l,{type:"schema_menu_item",attributes:["label","position","kind"],relationships:["item_type","parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/schema-menu-items",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"schema_menu_item",attributes:["label","position","kind"],relationships:["item_type","parent","children"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/schema-menu-items/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/schema-menu-items",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/schema-menu-items/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/schema-menu-items/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"schema_menu_item",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/schema-menu-items/reorder",body:l})}}Lv.TYPE="schema_menu_item";class Gv extends F{create(l){return this.rawCreate(X(l,{type:"upload_collection",attributes:["label","position"],relationships:["parent"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-collections",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload_collection",attributes:["label","position"],relationships:["parent","children"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/upload-collections/${l}`,body:u})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-collections",queryParams:l})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/upload-collections/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/upload-collections/${l}`})}reorder(l){return this.rawReorder(X(l,{type:"upload_collection",attributes:["position"],relationships:["parent"]})).then(u=>O(u))}rawReorder(l){return this.client.request({method:"POST",url:"/upload-collections/reorder",body:l})}}Gv.TYPE="upload_collection";class Hv extends F{create(l,u){return this.rawCreate(X(l,{type:"item_type",attributes:["name","api_key","singleton","all_locales_required","sortable","modular_block","draft_mode_active","draft_saving_active","tree","ordering_direction","ordering_meta","collection_appeareance","collection_appearance","hint","inverse_relationships_enabled"],relationships:["ordering_field","presentation_title_field","presentation_image_field","title_field","image_preview_field","excerpt_field","workflow"]}),u).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:"/item-types",body:l,queryParams:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item_type",attributes:["name","api_key","collection_appeareance","collection_appearance","singleton","all_locales_required","sortable","modular_block","draft_mode_active","draft_saving_active","tree","ordering_direction","ordering_meta","has_singleton_item","hint","inverse_relationships_enabled"],relationships:["ordering_field","presentation_title_field","presentation_image_field","title_field","image_preview_field","excerpt_field","workflow"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/item-types/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/item-types"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/item-types/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/item-types/${l}/duplicate`})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/item-types/${l}`,queryParams:u})}referencing(l){return this.rawReferencing(D(l)).then(u=>O(u))}rawReferencing(l){return this.client.request({method:"GET",url:`/item-types/${l}/referencing`})}rawReorderFieldsAndFieldsets(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/reorder-fields-and-fieldsets`,body:u})}}Hv.TYPE="item_type";class Bv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"field",attributes:["label","field_type","api_key","localized","validators","appeareance","appearance","position","hint","default_value","deep_filtering_enabled"],relationships:["fieldset"]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/fields`,body:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"field",attributes:["default_value","label","api_key","localized","validators","appeareance","appearance","position","field_type","hint","deep_filtering_enabled"],relationships:["fieldset"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/fields/${l}`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields`})}referencing(l){return this.rawReferencing(D(l)).then(u=>O(u))}rawReferencing(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields/referencing`})}related(l){return this.rawRelated(D(l)).then(u=>O(u))}rawRelated(l){return this.client.request({method:"GET",url:`/item-types/${l}/fields/related`})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/fields/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/fields/${l}`})}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/fields/${l}/duplicate`})}}Bv.TYPE="field";class Yv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"fieldset",attributes:["title","hint","position","collapsible","start_collapsed"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/item-types/${l}/fieldsets`,body:u})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"fieldset",attributes:["title","hint","position","collapsible","start_collapsed"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/fieldsets/${l}`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/item-types/${l}/fieldsets`})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/fieldsets/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/fieldsets/${l}`})}}Yv.TYPE="fieldset";class Xv extends F{create(l){return this.rawCreate(X(l,{type:"email_credentials",attributes:["email","password","otp_code"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/sessions",body:l})}}Xv.TYPE="session";class Vv extends F{create(l){return this.rawCreate(X(l,{type:"access_token",attributes:["name","can_access_cda","can_access_cda_preview","can_access_cma"],relationships:["role"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/access_tokens",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"access_token",attributes:["name","can_access_cda","can_access_cda_preview","can_access_cma"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/access_tokens/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/access_tokens"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/access_tokens/${l}`})}regenerateToken(l){return this.rawRegenerateToken(D(l)).then(u=>O(u))}rawRegenerateToken(l){return this.client.request({method:"POST",url:`/access_tokens/${l}/regenerate_token`})}destroy(l,u){return this.rawDestroy(D(l),u).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/access_tokens/${l}`,queryParams:u})}}Vv.TYPE="access_token";class Qv extends F{create(l){return this.rawCreate(X(l,{type:"plugin",attributes:["package_name","name","description","url","permissions","plugin_type","field_types","parameter_definitions","package_version"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/plugins",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"plugin",attributes:["name","description","url","parameters","package_version","permissions"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/plugins/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/plugins"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/plugins/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/plugins/${l}`})}fields(l){return this.rawFields(D(l)).then(u=>O(u))}rawFields(l){return this.client.request({method:"GET",url:`/plugins/${l}/fields`})}}Qv.TYPE="plugin";class Zv extends F{find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/job-results/${l}`})}}Zv.TYPE="job_result";class Kv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/subscription-limits"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/subscription-limits/${l}`})}}Kv.TYPE="subscription_limit";class Jv extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/subscription-features"})}}Jv.TYPE="subscription_feature";var BS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},$a=function(r){return this instanceof $a?(this.v=r,this):new $a(r)},YS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof $a?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class $v extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/build-events",queryParams:l})}listPagedIterator(l,u){return YS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=BS(this.rawListPagedIterator(l,u)),_;_=yield $a(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield $a(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield $a(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/build-events/${l}`})}}$v.TYPE="build_event";var XS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},ka=function(r){return this instanceof ka?(this.v=r,this):new ka(r)},VS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof ka?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class kv extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/search-index-events",queryParams:l})}listPagedIterator(l,u){return VS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=XS(this.rawListPagedIterator(l,u)),_;_=yield ka(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield ka(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield ka(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/search-index-events/${l}`})}}kv.TYPE="search_index_event";var QS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Fa=function(r){return this instanceof Fa?(this.v=r,this):new Fa(r)},ZS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Fa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class Fv extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/items",queryParams:l}).then(Mt)}listPagedIterator(l,u){return ZS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=QS(this.rawListPagedIterator(l,u)),_;_=yield Fa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Fa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Fa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u,!0)}validateExisting(l,u){return this.rawValidateExisting(D(l),X(u,{id:D(l),type:"item",attributes:"*",relationships:["item_type","creator"]}))}rawValidateExisting(l,u){return this.client.request({method:"POST",url:`/items/${l}/validate`,body:Ui(u)})}validateNew(l){return this.rawValidateNew(X(l,{type:"item",attributes:"*",relationships:["item_type","creator"]}))}rawValidateNew(l){return this.client.request({method:"POST",url:"/items/validate",body:Ui(l)})}create(l){return this.rawCreate(X(l,{type:"item",attributes:"*",relationships:["item_type","creator"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/items",body:Ui(l)}).then(Mt)}duplicate(l){return this.rawDuplicate(D(l)).then(u=>O(u))}rawDuplicate(l){return this.client.request({method:"POST",url:`/items/${l}/duplicate`}).then(Mt)}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item",attributes:"*",relationships:["item_type","creator"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/items/${l}`,body:Ui(u)}).then(Mt)}references(l,u){return this.rawReferences(D(l),u).then(c=>O(c))}rawReferences(l,u){return this.client.request({method:"GET",url:`/items/${l}/references`,queryParams:u}).then(Mt)}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/items/${l}`,queryParams:u}).then(Mt)}currentVsPublishedState(l){return this.rawCurrentVsPublishedState(D(l)).then(u=>O(u))}rawCurrentVsPublishedState(l){return this.client.request({method:"GET",url:`/items/${l}/current-vs-published-state`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}`}).then(Mt)}publish(l,u,c){return this.rawPublish(D(l),u?X(u,{type:"selective_publish_operation",attributes:["content_in_locales","non_localized_content"],relationships:[]}):null,c).then(d=>O(d))}rawPublish(l,u,c){return this.client.request({method:"PUT",url:`/items/${l}/publish`,body:u,queryParams:c}).then(Mt)}unpublish(l,u,c){return this.rawUnpublish(D(l),u?X(u,{type:"selective_unpublish_operation",attributes:["content_in_locales"],relationships:[]}):null,c).then(d=>O(d))}rawUnpublish(l,u,c){return this.client.request({method:"PUT",url:`/items/${l}/unpublish`,body:u,queryParams:c}).then(Mt)}bulkPublish(l){return this.rawBulkPublish(X(l,{type:"item_bulk_publish_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkPublish(l){return this.client.request({method:"POST",url:"/items/bulk/publish",body:l})}bulkUnpublish(l){return this.rawBulkUnpublish(X(l,{type:"item_bulk_unpublish_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkUnpublish(l){return this.client.request({method:"POST",url:"/items/bulk/unpublish",body:l})}bulkDestroy(l){return this.rawBulkDestroy(X(l,{type:"item_bulk_destroy_operation",attributes:[],relationships:["items"]})).then(u=>O(u))}rawBulkDestroy(l){return this.client.request({method:"POST",url:"/items/bulk/destroy",body:l})}bulkMoveToStage(l){return this.rawBulkMoveToStage(X(l,{type:"item_bulk_move_to_stage_operation",attributes:["stage"],relationships:["items"]})).then(u=>O(u))}rawBulkMoveToStage(l){return this.client.request({method:"POST",url:"/items/bulk/move-to-stage",body:l})}}Fv.TYPE="item";var KS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Ia=function(r){return this instanceof Ia?(this.v=r,this):new Ia(r)},JS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Ia?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class Iv extends F{restore(l){return this.rawRestore(D(l)).then(u=>O(u))}rawRestore(l){return this.client.request({method:"POST",url:`/versions/${l}/restore`})}list(l,u){return this.rawList(D(l),u).then(c=>O(c))}rawList(l,u){return this.client.request({method:"GET",url:`/items/${l}/versions`,queryParams:u})}listPagedIterator(l,u,c){return JS(this,arguments,function*(){var f,h,v,g;try{for(var y=!0,_=KS(this.rawListPagedIterator(D(l),u,c)),S;S=yield Ia(_.next()),f=S.done,!f;){g=S.value,y=!1;try{yield yield Ia(Gt(g))}finally{y=!0}}}catch(p){h={error:p}}finally{try{!y&&!f&&(v=_.return)&&(yield Ia(v.call(_)))}finally{if(h)throw h.error}}})}rawListPagedIterator(l,u,c){return dn(u),on({defaultLimit:15,maxLimit:50},d=>this.rawList(l,Object.assign(Object.assign({},u),{page:d})),c)}find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/versions/${l}`,queryParams:u})}}Iv.TYPE="item_version";var $S=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Pa=function(r){return this instanceof Pa?(this.v=r,this):new Pa(r)},kS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Pa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};let Rf=class extends F{create(l){return this.rawCreate(X(l,{type:"upload",attributes:["path","copyright","author","notes","default_field_metadata","tags"],relationships:["upload_collection"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/uploads",body:l})}list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/uploads",queryParams:l})}listPagedIterator(l,u){return kS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=$S(this.rawListPagedIterator(l,u)),_;_=yield Pa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Pa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Pa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/uploads/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/uploads/${l}`})}update(l,u,c){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload",attributes:["path","basename","copyright","author","notes","tags","default_field_metadata"],relationships:["creator","upload_collection"]}),c).then(d=>O(d))}rawUpdate(l,u,c){return this.client.request({method:"PUT",url:`/uploads/${l}`,body:u,queryParams:c})}references(l,u){return this.rawReferences(D(l),u).then(c=>O(c))}rawReferences(l,u){return this.client.request({method:"GET",url:`/uploads/${l}/references`,queryParams:u}).then(Mt)}bulkTag(l){return this.rawBulkTag(X(l,{type:"upload_bulk_tag_operation",attributes:["tags"],relationships:["uploads"]})).then(u=>O(u))}rawBulkTag(l){return this.client.request({method:"POST",url:"/uploads/bulk/tag",body:l})}bulkSetUploadCollection(l){return this.rawBulkSetUploadCollection(X(l,{type:"upload_bulk_set_upload_collection_operation",attributes:[],relationships:["upload_collection","uploads"]})).then(u=>O(u))}rawBulkSetUploadCollection(l){return this.client.request({method:"POST",url:"/uploads/bulk/set-upload-collection",body:l})}bulkDestroy(l){return this.rawBulkDestroy(X(l,{type:"upload_bulk_destroy_operation",attributes:[],relationships:["uploads"]})).then(u=>O(u))}rawBulkDestroy(l){return this.client.request({method:"POST",url:"/uploads/bulk/destroy",body:l})}};Rf.TYPE="upload";class Pv extends F{create(l){return this.rawCreate(X(l,{type:"upload_request",attributes:["filename"],relationships:["upload_collection"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-requests",body:l})}}Pv.TYPE="upload_request";class Wv extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"upload_track",attributes:["url_or_upload_request_id","type","name","language_code","closed_captions"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/uploads/${l}/tracks`,body:u})}list(l){return this.rawList(D(l)).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:`/uploads/${l}/tracks`})}destroy(l,u){return this.rawDestroy(D(l),D(u)).then(c=>O(c))}rawDestroy(l,u){return this.client.request({method:"DELETE",url:`/uploads/${l}/tracks/${u}`})}generateSubtitles(l,u){return this.rawGenerateSubtitles(D(l),X(u,{type:"upload_track",attributes:["name","language_code"],relationships:[]})).then(c=>O(c))}rawGenerateSubtitles(l,u){return this.client.request({method:"POST",url:`/uploads/${l}/tracks/generate-subtitles`,body:u})}}Wv.TYPE="upload_track";class e_ extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"scheduled_publication",attributes:["publication_scheduled_at","selective_publication"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/items/${l}/scheduled-publication`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}/scheduled-publication`}).then(Mt)}}e_.TYPE="scheduled_publication";class t_ extends F{create(l,u){return this.rawCreate(D(l),X(u,{type:"scheduled_unpublishing",attributes:["unpublishing_scheduled_at","content_in_locales"],relationships:[]})).then(c=>O(c))}rawCreate(l,u){return this.client.request({method:"POST",url:`/items/${l}/scheduled-unpublishing`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/items/${l}/scheduled-unpublishing`}).then(Mt)}}t_.TYPE="scheduled_unpublishing";var FS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},Wa=function(r){return this instanceof Wa?(this.v=r,this):new Wa(r)},IS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof Wa?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class n_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/search-results",queryParams:l})}listPagedIterator(l,u){return IS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=FS(this.rawListPagedIterator(l,u)),_;_=yield Wa(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield Wa(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield Wa(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:20,maxLimit:100},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}}n_.TYPE="search_result";class a_ extends F{fork(l,u,c){return this.rawFork(D(l),X(u,{id:D(l),type:"environment",attributes:[],relationships:[]}),c).then(d=>O(d))}rawFork(l,u,c){return this.client.request({method:"POST",url:`/environments/${l}/fork`,body:u,queryParams:c})}promote(l){return this.rawPromote(D(l)).then(u=>O(u))}rawPromote(l){return this.client.request({method:"PUT",url:`/environments/${l}/promote`})}rename(l,u){return this.rawRename(D(l),X(u,{id:D(l),type:"environment",attributes:[],relationships:[]})).then(c=>O(c))}rawRename(l,u){return this.client.request({method:"PUT",url:`/environments/${l}/rename`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/environments"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/environments/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/environments/${l}`})}}a_.TYPE="environment";class l_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/maintenance-mode"})}activate(l){return this.rawActivate(l).then(u=>O(u))}rawActivate(l){return this.client.request({method:"PUT",url:"/maintenance-mode/activate",queryParams:l})}deactivate(){return this.rawDeactivate().then(l=>O(l))}rawDeactivate(){return this.client.request({method:"PUT",url:"/maintenance-mode/deactivate"})}}l_.TYPE="maintenance_mode";class u_ extends F{create(l){return this.rawCreate(X(l,{type:"webhook",attributes:["name","url","custom_payload","headers","events","http_basic_user","http_basic_password","enabled","payload_api_version","nested_items_in_payload","auto_retry"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/webhooks",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"webhook",attributes:["name","url","custom_payload","headers","events","http_basic_user","http_basic_password","enabled","payload_api_version","nested_items_in_payload","auto_retry"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/webhooks/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/webhooks"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/webhooks/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/webhooks/${l}`})}}u_.TYPE="webhook";var PS=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},el=function(r){return this instanceof el?(this.v=r,this):new el(r)},WS=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof el?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class i_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/webhook_calls",queryParams:l})}listPagedIterator(l,u){return WS(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=PS(this.rawListPagedIterator(l,u)),_;_=yield el(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield el(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield el(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:30,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/webhook_calls/${l}`})}resendWebhook(l){return this.rawResendWebhook(D(l))}rawResendWebhook(l){return this.client.request({method:"POST",url:`/webhook_calls/${l}/resend_webhook`})}}i_.TYPE="webhook_call";class r_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/build-triggers"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/build-triggers/${l}`})}create(l){return this.rawCreate(X(l,{type:"build_trigger",attributes:["name","webhook_token","adapter","indexing_enabled","enabled","frontend_url","autotrigger_on_scheduled_publications","adapter_settings"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/build-triggers",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"build_trigger",attributes:["name","adapter","indexing_enabled","enabled","frontend_url","autotrigger_on_scheduled_publications","adapter_settings"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/build-triggers/${l}`,body:u})}trigger(l){return this.rawTrigger(D(l))}rawTrigger(l){return this.client.request({method:"POST",url:`/build-triggers/${l}/trigger`})}abort(l){return this.rawAbort(D(l))}rawAbort(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}/abort`})}abortIndexing(l){return this.rawAbortIndexing(D(l))}rawAbortIndexing(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}/abort_indexing`})}reindex(l){return this.rawReindex(D(l))}rawReindex(l){return this.client.request({method:"PUT",url:`/build-triggers/${l}/reindex`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/build-triggers/${l}`})}}r_.TYPE="build_trigger";class s_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/search-indexes"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/search-indexes/${l}`})}create(l){return this.rawCreate(X(l,{type:"search_index",attributes:["name","enabled","frontend_url","user_agent_suffix"],relationships:["build_triggers"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/search-indexes",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"search_index",attributes:["name","enabled","frontend_url","user_agent_suffix"],relationships:["build_triggers"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/search-indexes/${l}`,body:u})}trigger(l){return this.rawTrigger(D(l))}rawTrigger(l){return this.client.request({method:"POST",url:`/search-indexes/${l}/trigger`})}abort(l){return this.rawAbort(D(l))}rawAbort(l){return this.client.request({method:"DELETE",url:`/search-indexes/${l}/abort`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/search-indexes/${l}`})}}s_.TYPE="search_index";class c_ extends F{create(l){return this.rawCreate(X(l,{type:"item_type_filter",attributes:["name","filter","columns","order_by","shared"],relationships:["item_type"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/item-type-filters",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"item_type_filter",attributes:["name","columns","order_by","shared","filter"],relationships:["item_type"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/item-type-filters/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/item-type-filters"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/item-type-filters/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/item-type-filters/${l}`})}}c_.TYPE="item_type_filter";class f_ extends F{create(l){return this.rawCreate(X(l,{type:"upload_filter",attributes:["name","filter","shared"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-filters",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"upload_filter",attributes:["name","shared","filter"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/upload-filters/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/upload-filters"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/upload-filters/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/upload-filters/${l}`})}}f_.TYPE="upload_filter";class o_ extends F{create(l){return this.rawCreate(X(l,{type:"site_invitation",attributes:["email"],relationships:["role"]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/site-invitations",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"site_invitation",attributes:[],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/site-invitations/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/site-invitations"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/site-invitations/${l}`})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/site-invitations/${l}`})}resend(l){return this.rawResend(D(l)).then(u=>O(u))}rawResend(l){return this.client.request({method:"POST",url:`/site-invitations/${l}/resend`})}}o_.TYPE="site_invitation";class d_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/editing-sessions"})}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/editing-sessions/${l}`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/editing-sessions/${l}`})}}d_.TYPE="editing_session";class h_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/sso-groups"})}copyRoles(l){return this.rawCopyRoles(D(l)).then(u=>O(u))}rawCopyRoles(l){return this.client.request({method:"POST",url:`/sso-groups/${l}/copy-roles`})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"sso_group",attributes:["priority"],relationships:["role"]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/sso-groups/${l}`,body:u})}destroy(l){return this.rawDestroy(D(l)).then(u=>O(u))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/sso-groups/${l}`})}}h_.TYPE="sso_group";class m_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/sso-settings"})}generateToken(){return this.rawGenerateToken().then(l=>O(l))}rawGenerateToken(){return this.client.request({method:"PUT",url:"/sso-settings/generate-token"})}update(l){return this.rawUpdate(X(l,{type:"sso_settings",attributes:["idp_saml_metadata_url","idp_saml_metadata_xml"],relationships:["default_role"]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/sso-settings",body:l})}}m_.TYPE="sso_settings";class y_ extends F{find(l){return this.rawFind(l).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:"/emoji-suggestions",queryParams:l})}}y_.TYPE="emoji_suggestions";class v_ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/white-label-settings"})}update(l){return this.rawUpdate(X(l,{type:"white_label_settings",attributes:["custom_i18n_messages_template_url"],relationships:[]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/white-label-settings",body:l})}}v_.TYPE="white_label_settings";class __ extends F{find(){return this.rawFind().then(l=>O(l))}rawFind(){return this.client.request({method:"GET",url:"/public-info"})}}__.TYPE="public_info";class p_ extends F{list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/daily-site-usages"})}}p_.TYPE="daily_usage";class g_ extends F{find(l,u){return this.rawFind(D(l),u).then(c=>O(c))}rawFind(l,u){return this.client.request({method:"GET",url:`/usage-log-counters/${l}`,queryParams:u})}}g_.TYPE="usage_counter";var eE=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},tl=function(r){return this instanceof tl?(this.v=r,this):new tl(r)},tE=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof tl?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class b_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-tags",queryParams:l})}listPagedIterator(l,u){return tE(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=eE(this.rawListPagedIterator(l,u)),_;_=yield tl(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield tl(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield tl(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:50,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}create(l){return this.rawCreate(X(l,{type:"upload_tag",attributes:["name"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/upload-tags",body:l})}}b_.TYPE="upload_tag";var nE=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=r[Symbol.asyncIterator],u;return l?l.call(r):(r=typeof __values=="function"?__values(r):r[Symbol.iterator](),u={},c("next"),c("throw"),c("return"),u[Symbol.asyncIterator]=function(){return this},u);function c(f){u[f]=r[f]&&function(h){return new Promise(function(v,g){h=r[f](h),d(v,g,h.done,h.value)})}}function d(f,h,v,g){Promise.resolve(g).then(function(y){f({value:y,done:v})},h)}},nl=function(r){return this instanceof nl?(this.v=r,this):new nl(r)},aE=function(r,l,u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=u.apply(r,l||[]),d,f=[];return d={},h("next"),h("throw"),h("return"),d[Symbol.asyncIterator]=function(){return this},d;function h(p){c[p]&&(d[p]=function(R){return new Promise(function(x,G){f.push([p,R,x,G])>1||v(p,R)})})}function v(p,R){try{g(c[p](R))}catch(x){S(f[0][3],x)}}function g(p){p.value instanceof nl?Promise.resolve(p.value.v).then(y,_):S(f[0][2],p)}function y(p){v("next",p)}function _(p){v("throw",p)}function S(p,R){p(R),f.shift(),f.length&&v(f[0][0],f[0][1])}};class S_ extends F{list(l){return this.rawList(l).then(u=>O(u))}rawList(l){return this.client.request({method:"GET",url:"/upload-smart-tags",queryParams:l})}listPagedIterator(l,u){return aE(this,arguments,function*(){var d,f,h,v;try{for(var g=!0,y=nE(this.rawListPagedIterator(l,u)),_;_=yield nl(y.next()),d=_.done,!d;){v=_.value,g=!1;try{yield yield nl(Gt(v))}finally{g=!0}}}catch(S){f={error:S}}finally{try{!g&&!d&&(h=y.return)&&(yield nl(h.call(y)))}finally{if(f)throw f.error}}})}rawListPagedIterator(l,u){return dn(l),on({defaultLimit:50,maxLimit:500},c=>this.rawList(Object.assign(Object.assign({},l),{page:c})),u)}}S_.TYPE="upload_smart_tag";class E_ extends F{find(l){return this.rawFind(l).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:"/site",queryParams:l})}update(l){return this.rawUpdate(X(l,{type:"site",attributes:["no_index","favicon","global_seo","name","theme","locales","timezone","require_2fa","ip_tracking_enabled","force_use_of_sandbox_environments"],relationships:["sso_default_role"]})).then(u=>O(u))}rawUpdate(l){return this.client.request({method:"PUT",url:"/site",body:l})}activateImprovedTimezoneManagement(){return this.rawActivateImprovedTimezoneManagement().then(l=>O(l))}rawActivateImprovedTimezoneManagement(){return this.client.request({method:"PUT",url:"/site/activate-improved-timezone-management"})}activateImprovedHexManagement(){return this.rawActivateImprovedHexManagement().then(l=>O(l))}rawActivateImprovedHexManagement(){return this.client.request({method:"PUT",url:"/site/activate-improved-hex-management"})}activateImprovedGqlMultilocaleFields(){return this.rawActivateImprovedGqlMultilocaleFields().then(l=>O(l))}rawActivateImprovedGqlMultilocaleFields(){return this.client.request({method:"PUT",url:"/site/activate-improved-gql-multilocale-fields"})}activateImprovedGqlVisibilityControl(){return this.rawActivateImprovedGqlVisibilityControl().then(l=>O(l))}rawActivateImprovedGqlVisibilityControl(){return this.client.request({method:"PUT",url:"/site/activate-improved-gql-visibility-control"})}activateImprovedBooleanFields(){return this.rawActivateImprovedBooleanFields().then(l=>O(l))}rawActivateImprovedBooleanFields(){return this.client.request({method:"PUT",url:"/site/activate-improved-boolean-fields"})}activateDraftModeAsDefault(){return this.rawActivateDraftModeAsDefault().then(l=>O(l))}rawActivateDraftModeAsDefault(){return this.client.request({method:"PUT",url:"/site/activate-draft-mode-as-default"})}activateImprovedValidationAtPublishing(){return this.rawActivateImprovedValidationAtPublishing().then(l=>O(l))}rawActivateImprovedValidationAtPublishing(){return this.client.request({method:"PUT",url:"/site/activate-improved-validation-at-publishing"})}activateImprovedExposureOfInlineBlocksInCda(){return this.rawActivateImprovedExposureOfInlineBlocksInCda().then(l=>O(l))}rawActivateImprovedExposureOfInlineBlocksInCda(){return this.client.request({method:"PUT",url:"/site/activate-improved-exposure-of-inline-blocks-in-cda"})}activateImprovedItemsListing(){return this.rawActivateImprovedItemsListing().then(l=>O(l))}rawActivateImprovedItemsListing(){return this.client.request({method:"PUT",url:"/site/activate-improved-items-listing"})}activateMillisecondsInDatetime(){return this.rawActivateMillisecondsInDatetime().then(l=>O(l))}rawActivateMillisecondsInDatetime(){return this.client.request({method:"PUT",url:"/site/activate-milliseconds-in-datetime"})}updateAssetsCdnDefaultSettings(l){return this.rawUpdateAssetsCdnDefaultSettings(X(l,{type:"assets-cdn-default-settings",attributes:["assets_cdn_default_settings"],relationships:[]})).then(u=>O(u))}rawUpdateAssetsCdnDefaultSettings(l){return this.client.request({method:"PUT",url:"/site/assets-cdn-default-settings",body:l})}}E_.TYPE="site";class T_ extends F{create(l){return this.rawCreate(X(l,{type:"workflow",attributes:["name","api_key","stages"],relationships:[]})).then(u=>O(u))}rawCreate(l){return this.client.request({method:"POST",url:"/workflows",body:l})}update(l,u){return this.rawUpdate(D(l),X(u,{id:D(l),type:"workflow",attributes:["name","api_key","stages"],relationships:[]})).then(c=>O(c))}rawUpdate(l,u){return this.client.request({method:"PUT",url:`/workflows/${l}`,body:u})}list(){return this.rawList().then(l=>O(l))}rawList(){return this.client.request({method:"GET",url:"/workflows"})}find(l){return this.rawFind(D(l)).then(u=>O(u))}rawFind(l){return this.client.request({method:"GET",url:`/workflows/${l}`})}destroy(l){return this.rawDestroy(D(l))}rawDestroy(l){return this.client.request({method:"DELETE",url:`/workflows/${l}`})}}T_.TYPE="workflow";var lE=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};let O_=class w_{constructor(l){this.config=l,this.roles=new HS(this),this.users=new Uv(this),this.ssoUsers=new xv(this),this.auditLogEvents=new Nv(this),this.menuItems=new jv(this),this.schemaMenuItems=new Lv(this),this.uploadCollections=new Gv(this),this.itemTypes=new Hv(this),this.fields=new Bv(this),this.fieldsets=new Yv(this),this.session=new Xv(this),this.accessTokens=new Vv(this),this.plugins=new Qv(this),this.jobResults=new Zv(this),this.subscriptionLimits=new Kv(this),this.subscriptionFeatures=new Jv(this),this.buildEvents=new $v(this),this.searchIndexEvents=new kv(this),this.items=new Fv(this),this.itemVersions=new Iv(this),this.uploads=new Rf(this),this.uploadRequest=new Pv(this),this.uploadTracks=new Wv(this),this.scheduledPublication=new e_(this),this.scheduledUnpublishing=new t_(this),this.searchResults=new n_(this),this.environments=new a_(this),this.maintenanceMode=new l_(this),this.webhooks=new u_(this),this.webhookCalls=new i_(this),this.buildTriggers=new r_(this),this.searchIndexes=new s_(this),this.itemTypeFilters=new c_(this),this.uploadFilters=new f_(this),this.siteInvitations=new o_(this),this.editingSessions=new d_(this),this.ssoGroups=new h_(this),this.ssoSettings=new m_(this),this.emojiSuggestions=new y_(this),this.whiteLabelSettings=new v_(this),this.publicInfo=new __(this),this.dailyUsages=new p_(this),this.usageCounters=new g_(this),this.uploadTags=new b_(this),this.uploadSmartTags=new S_(this),this.site=new E_(this),this.workflows=new T_(this)}get baseUrl(){return this.config.baseUrl||w_.defaultBaseUrl}request(l){return ji(Object.assign(Object.assign(Object.assign({},this.config),l),{logFn:this.config.logFn||console.log,userAgent:"@datocms/cma-client v5.3.0",baseUrl:this.baseUrl,preCallStack:new Error().stack,extraHeaders:Object.assign(Object.assign(Object.assign({},this.config.extraHeaders||{}),this.config.environment?{"X-Environment":this.config.environment}:{}),{"X-API-Version":"3"}),fetchJobResult:u=>this.jobResultsFetcher?this.jobResultsFetcher(u):bS(()=>this.jobResults.find(u))}))}eventsChannelName(){return lE(this,void 0,void 0,function*(){if(this.cachedEventsChannelName)return this.cachedEventsChannelName;const{data:l}=yield this.site.rawFind();return this.cachedEventsChannelName=this.config.environment?`private-site-${l.id}-environment-${this.config.environment}`:`private-site-${l.id}`,this.cachedEventsChannelName})}};O_.defaultBaseUrl="https://site-api.datocms.com";function uE(r,l,{onProgress:u,additionalHeaders:c}={}){const d=new XMLHttpRequest;return nu(new Promise((f,h)=>{if(u&&d.upload&&(d.upload.onprogress=v=>{v.lengthComputable&&u({type:"UPLOADING_FILE",payload:{progress:Math.round(v.loaded/v.total*100)}})}),d.onreadystatechange=()=>{d.readyState===4&&(d.status===200?f():h(new Error(`Status ${d.status}`)))},d.addEventListener("error",h,!1),d.open("PUT",l,!0),c)for(const[v,g]of Object.entries(c))d.setRequestHeader(v,g);d.send(r)}),()=>{d.onreadystatechange=null,d.abort()})}var iE=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})};function yv(r,l,u={}){const c=u.filename||("name"in l?l.name:void 0);if(!c)throw new Error("Missing filename, please provide it as an option!");let d=!1,f;return nu(()=>iE(this,void 0,void 0,function*(){u.onProgress&&u?.onProgress({type:"REQUESTING_UPLOAD_URL",payload:{filename:c}});const{id:h,url:v,request_headers:g}=yield r.uploadRequest.create({filename:c});if(d)throw new tu;return u.onProgress&&u.onProgress({type:"UPLOADING_FILE",payload:{progress:0}}),f=uE(l,v,Object.assign(Object.assign({},u),{additionalHeaders:g})),yield f,h}),()=>{f?f.cancel():d=!0})}var vv=function(r,l,u,c){function d(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function v(_){try{y(c.next(_))}catch(S){h(S)}}function g(_){try{y(c.throw(_))}catch(S){h(S)}}function y(_){_.done?f(_.value):d(_.value).then(v,g)}y((c=c.apply(r,l||[])).next())})},_v=function(r,l){var u={};for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&l.indexOf(c)<0&&(u[c]=r[c]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,c=Object.getOwnPropertySymbols(r);d<c.length;d++)l.indexOf(c[d])<0&&Object.prototype.propertyIsEnumerable.call(r,c[d])&&(u[c[d]]=r[c[d]]);return u};class rE extends Rf{createFromFileOrBlob(l){let u=!1,c;return nu(()=>vv(this,void 0,void 0,function*(){if(u)throw new tu;const{fileOrBlob:d,filename:f,onProgress:h}=l,v=_v(l,["fileOrBlob","filename","onProgress"]);c=yv(this.client,d,{filename:f,onProgress:h});const g=yield c;return h&&h({type:"CREATING_UPLOAD_OBJECT"}),this.create(Object.assign(Object.assign({},v),{path:g}))}),()=>{c?c.cancel():u=!0})}updateFromFileOrBlob(l,u){let c=!1,d;return nu(()=>vv(this,void 0,void 0,function*(){if(c)throw new tu;const{fileOrBlob:f,filename:h,onProgress:v}=u,g=_v(u,["fileOrBlob","filename","onProgress"]);d=yv(this.client,f,{filename:h,onProgress:v});const y=yield d;return v&&v({type:"CREATING_UPLOAD_OBJECT"}),this.update(l,Object.assign(Object.assign({},g),{path:y}))}),()=>{d?d.cancel():c=!0})}}class sE extends O_{constructor(l){super(l),this.uploads=new rE(this)}}function cE(r){return new sE(r)}const fE="https://alttext.ai/api/v1/images",oE="jpeg",dE="1024",hE="datocms",mE="Unknown error";function A_(r){return r instanceof Error?r.message:String(r??mE)}function q_(r){const l=r.error_code??"unknown_error",u=r.errors?.base?.[0];return u?`${l}: ${u}`:l}function yE(r){const l=new URL(r);return l.searchParams.set("fm",oE),l.searchParams.set("w",dE),l.toString()}function vE(r){const l=r.plugin.attributes.parameters.apiKey;return typeof l!="string"||l.trim()===""?null:l.trim()}function _E(r){return typeof r=="string"&&r.trim().length>0}function C_(r,l){return l==="overwrite-all"?!0:!_E(r.alt)}function Mf(r){return typeof r=="object"&&r!==null&&typeof r.upload_id=="string"}function z_(r){return Array.isArray(r)&&r.every(l=>Mf(l))}function pE(r){return Ov(r.formValues,r.fieldPath)}function D_(r){return Mf(r)?!0:z_(r)&&r.length>0}async function R_(r,l,u,c){const{url:d}=await l.uploads.find(u.upload_id),f=await fetch(fE,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":r,"X-Client":hE},body:JSON.stringify({image:{url:yE(d),asset_id:`dato-${u.upload_id}`},lang:c})});let h;try{h=await f.json()}catch{}return f.ok?h||{error_code:"invalid_response",errors:{base:["Could not parse AltText.ai response"]}}:{error_code:`http_${f.status}`,errors:{base:[h?.errors?.base?.[0]||h?.error_code||f.statusText||"Request failed"]}}}async function gE(r,l,u,c,d){if(!C_(r,d)){await c.notice("Alt text already exists for this asset.");return}const f=await R_(l,u,r,c.locale);if(f.error_code){await c.alert(`Error fetching alt text: ${q_(f)}`);return}await c.setFieldValue(c.fieldPath,{...r,alt:f.alt_text??r.alt})}async function bE(r,l,u,c,d){const f=r.map((_,S)=>({asset:_,index:S})).filter(({asset:_})=>C_(_,d));if(f.length===0){await c.notice("No assets need alt text generation.");return}const h=await Promise.allSettled(f.map(({asset:_})=>R_(l,u,_,c.locale)));let v=!1;const g=[...r],y=[];f.forEach(({asset:_,index:S},p)=>{const R=h[p];if(R.status==="rejected"){y.push(`Image ${_.upload_id}: request_failed: ${A_(R.reason)}`);return}const x=R.value;if(x.error_code){y.push(`Image ${_.upload_id}: ${q_(x)}`);return}g[S]={..._,alt:x.alt_text??_.alt},v=!0}),y.length>0&&await c.alert(`Alt text errors:
|
|
16
16
|
${y.join(`
|
|
17
|
-
`)}`),v&&await c.setFieldValue(c.fieldPath,g)}async function
|
|
17
|
+
`)}`),v&&await c.setFieldValue(c.fieldPath,g)}async function SE(r,l){if(!r.currentUserAccessToken){await r.alert("This plugin needs the currentUserAccessToken to function. Please give it that permission and try again.");return}const u=vE(r);if(!u){await r.alert("Please configure your AltText.ai API key in the plugin settings.");return}const c=pE(r);if(!D_(c)){await r.notice("No asset selected in this field.");return}try{const d=cE({apiToken:r.currentUserAccessToken,environment:r.environment,baseUrl:r.cmaBaseUrl});if(z_(c)){await bE(c,u,d,r,l);return}if(Mf(c)){await gE(c,u,d,r,l);return}await r.notice("No asset selected in this field.")}catch(d){console.error(d),await r.alert(`Unexpected error while generating alt text: ${A_(d)}`)}}const M_="generate-missing-alts",U_="regenerate-all-alts",EE={[M_]:"missing-only",[U_]:"overwrite-all"};function TE(r){return r.attributes.field_type==="gallery"||r.attributes.field_type==="file"}Zb({renderConfigScreen(r){return A0(cn.jsx(g0,{ctx:r}))},fieldDropdownActions(r,l){if(!TE(r))return[];const u=Ov(l.formValues,l.fieldPath),c=D_(u);return[{id:M_,label:"Generate missing alt texts",icon:"magic",disabled:!c},{id:U_,label:"Generate Alt Texts",icon:"images",disabled:!c}]},async executeFieldDropdownAction(r,l){const u=EE[r];u&&await SE(l,u)}});
|
package/dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Alt Text AI</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-BuufTvJt.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BaVl9tgU.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datocms-plugin-alt-text-ai",
|
|
3
3
|
"homepage": "https://github.com/datocms/plugins/blob/addMarceloPlugins/alt-text-ai/README.md",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.15",
|
|
5
5
|
"author": "DatoCMS <support@datocms.com>",
|
|
6
6
|
"description": "Generate alt texts for your assets in a single click",
|
|
7
7
|
"keywords": [
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@datocms/cma-client-browser": "^5.3.0",
|
|
31
|
-
"datocms-plugin-sdk": "2.2.
|
|
32
|
-
"datocms-react-ui": "2.2.
|
|
31
|
+
"datocms-plugin-sdk": "^2.2.2",
|
|
32
|
+
"datocms-react-ui": "^2.2.4",
|
|
33
33
|
"lodash": "^4.17.23",
|
|
34
34
|
"react": "^19.2.4",
|
|
35
35
|
"react-dom": "^19.2.4"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._form_hqp8e_1{margin-bottom:1rem}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:700;src:url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff2"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:700;src:url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff2"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:500;src:url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff2"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("woff"),url(https://use.typekit.net/af/522c51/00000000000000003b9acde6/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:500;src:url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff2"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("woff"),url(https://use.typekit.net/af/4e71b3/00000000000000003b9acde7/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i5&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:normal;font-weight:400;src:url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("woff2"),url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("woff"),url(https://use.typekit.net/af/bac079/00000000000000003b9acde4/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=n4&v=3) format("opentype")}@font-face{font-display:auto;font-family:colfax-web;font-style:italic;font-weight:400;src:url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/l?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("woff2"),url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/d?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("woff"),url(https://use.typekit.net/af/c1cc04/00000000000000003b9acde5/27/a?primer=f592e0a4b9356877842506ce344308576437e4f677d7c9b78ca2162e6cad991a&fvd=i4&v=3) format("opentype")}html{font-size:16px;height:auto}body,html{margin:0;padding:0}@layer datocms-react-ui{html{scrollbar-color:var(--color--scrollbar--fill) transparent}}._button_18hrg_1{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;border-radius:4px;box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:inline-block;font-family:inherit;font-weight:var(--font-weight-bold);line-height:inherit;opacity:1;text-decoration:none;transition:all .3s var(--material-ease);vertical-align:middle;white-space:nowrap}._button_18hrg_1:focus,._button_18hrg_1:hover{opacity:.8}._button_18hrg_1:active{opacity:.7}._disabled_18hrg_30{cursor:not-allowed}._buttonType-muted_18hrg_34{background-color:var(--color--primary-soft--surface);color:var(--color--primary-soft--ink)}._buttonType-muted_18hrg_34._disabled_18hrg_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonType-muted_18hrg_34._disabled_18hrg_30:active,._buttonType-muted_18hrg_34._disabled_18hrg_30:focus,._buttonType-muted_18hrg_34._disabled_18hrg_30:hover{color:var(--color--disabled--ink)}._buttonType-primary_18hrg_50{background-color:var(--color--primary--surface)}._buttonType-primary_18hrg_50,._buttonType-primary_18hrg_50:active,._buttonType-primary_18hrg_50:focus,._buttonType-primary_18hrg_50:hover{color:var(--color--primary--ink)}._buttonType-primary_18hrg_50:hover{background-color:var(--color--primary--surface-hover)}._buttonType-primary_18hrg_50:active,._buttonType-primary_18hrg_50:focus{background-color:var(--color--primary--surface-active)}._buttonType-primary_18hrg_50._disabled_18hrg_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonType-primary_18hrg_50._disabled_18hrg_30:active,._buttonType-primary_18hrg_50._disabled_18hrg_30:focus,._buttonType-primary_18hrg_50._disabled_18hrg_30:hover{color:var(--color--disabled--ink)}._buttonType-negative_18hrg_80,._buttonType-negative_18hrg_80:active,._buttonType-negative_18hrg_80:focus,._buttonType-negative_18hrg_80:hover{background-color:var(--color--danger--surface);color:var(--color--danger--ink)}._buttonType-negative_18hrg_80._disabled_18hrg_30{background-color:var(--color--disabled--surface);color:var(--color--disabled--ink)}._buttonSize-xxs_18hrg_97{font-size:1em;padding:.5em .8em}._buttonSize-xs_18hrg_102{font-size:1em;padding:.6em .8em}._buttonSize-s_18hrg_107{font-size:1em;padding:.7em 1em}._buttonSize-m_18hrg_112{font-size:1.1em;padding:.7em 1em}._buttonSize-l_18hrg_117{font-size:1.2em;padding:.7em 1em}._buttonSize-xl_18hrg_122{font-size:1.2em;padding:1em}._fullWidth_18hrg_127{display:block;text-align:center;width:100%}._button__leftIcon_18hrg_133,._button__rightIcon_18hrg_134{display:inline-block;line-height:.6;vertical-align:middle}._button__leftIcon_18hrg_133 svg,._button__rightIcon_18hrg_134 svg{fill:var(--color--ink-link)}._button__leftIcon_18hrg_133{margin-right:.5em}._button__leftIcon_18hrg_133:last-child{margin-right:0}._button__rightIcon_18hrg_134{margin-left:.5em}._button__rightIcon_18hrg_134:first-child{margin-left:0}._Button_1653r_1{justify-column:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:var(--color--surface);border:0;border:1px solid var(--color--border);box-sizing:border-box;color:var(--color--ink);color:var(--color--ink-subtle);cursor:pointer;display:flex;font-family:inherit;font-size:inherit;line-height:inherit;padding:7px 13px}._Button_1653r_1:hover{background-color:var(--color--surface-hover)}._Button_1653r_1 svg{fill:var(--color--ink-subtle)}._Button--s_1653r_30{padding:3px 10px}._Button--disabled_1653r_34{color:var(--color--disabled--ink);cursor:not-allowed}._Button--disabled_1653r_34:hover{background:var(--color--surface)}._Button--selected_1653r_43{background-color:var(--color--primary--surface-secondary);color:var(--color--primary--ink)}._Button--selected_1653r_43 svg{fill:var(--color--primary--ink)}._Button--selected_1653r_43._Button--disabled_1653r_34,._Button--selected_1653r_43:hover{background-color:var(--color--primary--surface-secondary)}._Button_1653r_1:first-child{border-left-width:1px;border-radius:4px 0 0 4px}._Button_1653r_1:last-child{border-radius:0 4px 4px 0}._Group_1b5yn_1{align-items:stretch;background-color:var(--color--surface);display:flex;overflow:hidden}._themeVariables_1oghx_1{--base-body-color-rgb-components:52,54,58;--base-body-color:var(--color--ink);--light-body-color-rgb-components:132,132,132;--light-body-color:var(--color--ink-subtle);--placeholder-body-color-rgb-components:198,198,198;--placeholder-body-color:var(--color--ink-placeholder);--light-bg-color-rgb-components:245,245,245;--light-bg-color:var(--color--surface-muted);--lighter-bg-color-rgb-components:248,248,248;--lighter-bg-color:var(--color--surface-muted);--disabled-bg-color-rgb-components:237,237,237;--disabled-bg-color:var(--color--disabled--surface);--border-color-rgb-components:240,240,240;--border-color:var(--color--border);--darker-border-color-rgb-components:215,215,215;--darker-border-color:var(--color--border-hover);--alert-color-rgb-components:255,94,73;--alert-color:var(--color--ink-danger);--warning-color-rgb-components:255,215,0;--warning-color:var(--color--ink-warning);--notice-color-rgb-components:70,215,0;--notice-color:var(--color--ink-success);--warning-bg-color-rgb-components:255,255,229;--warning-bg-color:var(--color--warning-soft--surface);--add-color-rgb-components:76,176,109;--add-color:var(--color--diff-added--surface);--remove-color-rgb-components:235,87,106;--remove-color:var(--color--diff-removed--surface);--base-font-family:"colfax-web","Roboto","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;--monospaced-font-family:"Roboto Mono","Menlo","Bitstream Vera Sans Mono",Consolas,Courier,monospace;--font-weight-bold:500;--spacing-xs:.1875rem;--spacing-s:.375rem;--spacing-m:.75rem;--spacing-l:1.5rem;--spacing-xl:2.25rem;--spacing-xxl:3.75rem;--spacing-xxxl:6rem;--negative-spacing-xs:-.1875rem;--negative-spacing-s:-.375rem;--negative-spacing-m:-.75rem;--negative-spacing-l:-1.5rem;--negative-spacing-xl:-2.25rem;--negative-spacing-xxl:-3.75rem;--negative-spacing-xxxl:-6rem;--font-size-xxs:.6875rem;--font-size-xs:.75rem;--font-size-s:.875rem;--font-size-m:.9375rem;--font-size-l:1.0625rem;--font-size-xl:1.1875rem;--font-size-xxl:1.5625rem;--font-size-xxxl:1.875rem;--material-ease:cubic-bezier(.55,0,.1,1);--inertial-ease:cubic-bezier(.19,1,.22,1)}._canvas_1oghx_85{-webkit-text-size-adjust:100%;text-rendering:optimizeLegibility;background:var(--color--surface);color:var(--color--ink);font-family:var(--base-font-family);font-size:var(--font-size-m);line-height:1.5}._inspector_4pnoo_1{margin:var(--spacing-l) 0}._panel_4pnoo_5{border-bottom:1px solid var(--color--border)}._panelHandle_4pnoo_9{all:inherit;background:var(--color--surface-muted);border:0;box-sizing:border-box;cursor:pointer;display:block;font-weight:var(--font-weight-bold);padding:5px 10px;width:100%}._panelHandle_4pnoo_9:hover{background:var(--color--surface-hover)}._panelBody_4pnoo_25{border-left:1px solid var(--color--border);border-right:1px solid var(--color--border);padding:20px}._groupDescription_4pnoo_31{font-size:var(--font-size-s);line-height:1.2;margin-bottom:20px}._propertyGroup_4pnoo_37{border:1px solid var(--color--border);border-radius:5px}._propertyOrMethod_4pnoo_42{border-bottom:1px solid var(--color--border);line-height:1.2}._propertyOrMethod_4pnoo_42 p{margin:0}._propertyOrMethodBody_4pnoo_51{padding:15px}._propertyOrMethodExample_4pnoo_55{position:relative}._propertyOrMethodExample_4pnoo_55 pre{background:var(--color--surface-muted);font-size:.8em;margin:0;max-height:240px;overflow:auto;padding:15px}._propertyOrMethodName_4pnoo_68{color:var(--color--ink-subtle);display:block;font-family:var(--monospaced-font-family);font-size:.9em;font-weight:700;margin-bottom:5px;text-decoration:none}._propertyOrMethodName_4pnoo_68:hover{text-decoration:underline}._propertyOrMethodExampleActions_4pnoo_82{background:var(--color--surface);display:flex;padding:15px}._propertyOrMethodExampleActions_4pnoo_82>*{margin-right:10px}._fieldError_kqzsn_1{color:var(--color--ink-danger);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._FieldGroup_uz9ju_1{display:block}._FieldGroup__item_uz9ju_5{display:block;margin-bottom:var(--spacing-l)}._FieldGroup__item_uz9ju_5:last-child{margin-bottom:0}._fieldHint_1q1d1_1{color:var(--color--ink-subtle);font-size:var(--font-size-xs);line-height:1.2;margin-top:var(--spacing-s)}._fieldHint_1q1d1_1 a{color:inherit}._fieldHint_1q1d1_1 a:hover{text-decoration:none}._Form_5qspp_1,._Form__item_5qspp_5{display:block}._Form__item_5qspp_5:last-child{margin-bottom:0}._Form__item--default_5qspp_13{margin-bottom:var(--spacing-l)}._Form__item--condensed_5qspp_17{margin-bottom:var(--spacing-m)}._formLabel_12h4v_1{align-items:center;color:var(--color--ink-subtle);display:flex;margin-bottom:var(--spacing-s)}._formLabel_12h4v_1:hover ._formLabel__code_12h4v_8{opacity:1}._formLabel--error_12h4v_14{color:var(--color--ink-danger)}._formLabel__label_12h4v_18{flex:1}._formLabel__code_12h4v_8{font-family:var(--monospaced-font-family);font-size:.95em;opacity:0;position:absolute;transition:opacity .2s var(--material-ease)}._hotKey_17bh5_1{align-items:center;display:inline-flex;gap:15px}._label_17bh5_7{align-items:center;display:flex}._keys_17bh5_12{align-items:center;display:inline-flex;gap:4px}._hotKeyKey_17bh5_18{background:var(--color--primary-soft--surface);border-radius:3px;padding:5px 8px}._Section_12uz1_1{display:flex;flex-direction:column;gap:var(--spacing-m);position:relative}._Section--highlighted_12uz1_8:before{animation:_pageContentSectionHighligh_12uz1_1 4s ease-in-out .25s forwards;border-radius:4px;box-shadow:0 0 0 4px var(--color--focus--border);content:"";inset:-20px -30px;pointer-events:none;position:absolute;z-index:10}._Section__header_12uz1_22{margin-left:var(--negative-spacing-l);margin-right:var(--negative-spacing-l)}._Section__header--clickable_12uz1_27{cursor:pointer;-webkit-user-select:none;user-select:none}._Section__header--clickable_12uz1_27:hover ._Section__arrow_12uz1_31:before{opacity:.7}._Section__title_12uz1_36{align-items:center;display:flex;gap:var(--spacing-m)}._Section__title_12uz1_36:after,._Section__title_12uz1_36:before{background-color:var(--color--border);content:"";height:1px}._Section__title_12uz1_36:before{width:calc(var(--spacing-l) - var(--spacing-m))}._Section__title_12uz1_36:after{flex:1;margin-right:var(--spacing-l)}._Section__title__content_12uz1_58{align-items:center;display:inline-flex;flex-shrink:0;font-size:var(--font-size-l);font-weight:var(--font-weight-bold)}._Section__arrow_12uz1_31{align-self:stretch;margin-right:.3em;position:relative;width:15px}._Section__arrow_12uz1_31:before{border-bottom:6px solid transparent;border-left:6px solid var(--color--ink);border-top:6px solid transparent;content:"";height:0;left:6px;margin-top:-6px;position:absolute;top:50%;transform-origin:50% 50%;transition:transform .2s ease-out;width:0}._Section__arrow--is-open_12uz1_88:before{transform:rotate(90deg)}@keyframes _pageContentSectionHighligh_12uz1_1{0%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 4px var(--color--focus--outline)}15%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 80px transparent}75%{box-shadow:0 0 0 4px var(--color--focus--border),0 0 0 80px transparent}to{box-shadow:0 0 0 4px transparent,0 0 0 80px transparent}}._SidebarPanel_a4c7y_1{border-bottom:1px solid var(--color--border)}._SidebarPanel__header_a4c7y_5{align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:var(--color--surface);background-color:var(--color--surface-muted);border:0;box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:flex;font-family:inherit;font-size:inherit;line-height:inherit;padding:0;text-align:left;-webkit-user-select:none;user-select:none;width:100%}._SidebarPanel__header_a4c7y_5:focus,._SidebarPanel__header_a4c7y_5:hover{background-color:var(--color--surface-hover)}._SidebarPanel__header__title_a4c7y_30{flex:1;font-weight:500;padding:0 20px}._SidebarPanel__header__chevron_a4c7y_36{align-items:center;display:flex;padding:13px 15px}._SidebarPanel__content_a4c7y_42{padding:20px}._SidebarPanel__content--no-padding_a4c7y_46{padding:0}._Spinner--inline_1u42l_1{display:inline-block;position:relative;vertical-align:middle}._Spinner--centered_1u42l_7{left:50%;position:absolute;top:50%}._Spinner__bar_1u42l_13{animation:_Spinner__spin_1u42l_1 1.2s linear infinite;background-color:var(--color--ink-subtle);height:14%;left:-20%;position:absolute;top:0;width:40%}@keyframes _Spinner__spin_1u42l_1{0%{opacity:1}to{opacity:.15}}._switchField__flex_ietsf_1{align-items:center;display:flex}._switchField__switchInput_ietsf_6{width:55px}._switchField__label_ietsf_10{color:var(--color--ink);flex:1;line-height:1.1;line-height:20px;margin-bottom:0;pointer-events:none;-moz-user-select:text;-ms-user-select:text;-webkit-user-select:text;user-select:text}._switchField__below_ietsf_22{margin-left:55px;margin-top:var(--spacing-s)}._switchInput__inner_vh6pt_1{color:var(--color--primary--ink);font-size:12px;left:24px;position:absolute;transition:left .3s cubic-bezier(.35,0,.25,1)}._switchInput_vh6pt_1{background-color:var(--color--ink-muted);border:1px solid var(--color--border);border-radius:20px;box-sizing:border-box;cursor:pointer;display:inline-block;height:22px;line-height:20px;position:relative;transition:all .3s cubic-bezier(.35,0,.25,1);vertical-align:middle;width:44px}._switchInput_vh6pt_1:after{animation-duration:.3s;animation-name:_switchInput__off_vh6pt_1;animation-timing-function:cubic-bezier(.35,0,.25,1);background-color:var(--color--surface);border-radius:50%;box-shadow:var(--shadow--raised);content:" ";cursor:pointer;height:18px;left:2px;position:absolute;top:1px;transform:scale(1);transition:left .3s cubic-bezier(.35,0,.25,1),transform .3s cubic-bezier(.35,0,.25,1);width:18px}._switchInput_vh6pt_1:focus:after,._switchInput_vh6pt_1:hover:after{animation-name:_switchInput__on_vh6pt_1;transform:scale(1.1)}._switchInput__checked_vh6pt_50{background-color:var(--color--primary--surface);border-color:var(--color--primary--surface)}._switchInput__checked_vh6pt_50 ._switchInput__inner_vh6pt_1{left:6px}._switchInput__checked_vh6pt_50:after{left:22px}._switchInput__disabled_vh6pt_63{background:var(--color--disabled--surface);border-color:var(--color--border);cursor:no-drop}._switchInput__disabled_vh6pt_63:after{animation-name:_none_vh6pt_1;background:var(--color--disabled--ink);cursor:no-drop}._switchInput__disabled_vh6pt_63:focus:after,._switchInput__disabled_vh6pt_63:hover:after{animation-name:_none_vh6pt_1;transform:scale(1)}@keyframes _switchInput__on_vh6pt_1{0%{transform:scale(1)}50%{transform:scale(1.25)}to{transform:scale(1.1)}}@keyframes _switchInput__off_vh6pt_1{0%{transform:scale(1.1)}to{transform:scale(1)}}._TextInput_1kqkh_1{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:0;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size-m);padding:10px;resize:none;transition:border .2s var(--material-ease);width:100%}._TextInput_1kqkh_1::placeholder{color:var(--color--ink-placeholder)}._TextInput_1kqkh_1:hover{border-color:var(--color--border-hover)}._TextInput_1kqkh_1:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._TextInput--monospaced_1kqkh_32{font-family:var(--monospaced-font-family);font-size:var(--font-size-s)}._TextInput--disabled_1kqkh_37{background:var(--color--disabled--surface);border-color:var(--color--border);color:var(--color--disabled--ink)}._TextInput--error_1kqkh_43,._TextInput--error_1kqkh_43:focus,._TextInput--error_1kqkh_43:hover{border-color:var(--color--danger-soft--border)}._TextInput--error_1kqkh_43:focus{box-shadow:0 0 0 4px var(--color--danger-soft--outline)}._TextareaInput_1xr0a_1{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:0;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size-m);padding:10px;resize:none;transition:border .2s var(--material-ease);width:100%}._TextareaInput_1xr0a_1::placeholder{color:var(--color--ink-placeholder)}._TextareaInput_1xr0a_1:hover{border-color:var(--color--border-hover)}._TextareaInput_1xr0a_1:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._TextareaInput--monospaced_1xr0a_32{font-family:var(--monospaced-font-family);font-size:var(--font-size-s)}._TextareaInput--disabled_1xr0a_37{background:var(--color--disabled--surface);border-color:var(--color--border);color:var(--color--disabled--ink)}._TextareaInput--error_1xr0a_43,._TextareaInput--error_1xr0a_43:focus,._TextareaInput--error_1xr0a_43:hover{border-color:var(--color--danger-soft--border)}._TextareaInput--error_1xr0a_43:focus{box-shadow:0 0 0 4px var(--color--danger-soft--outline)}._Button_36kvr_1{align-items:center;-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;border-left:1px solid var(--color--border);border-right:1px solid var(--color--border);box-sizing:border-box;color:var(--color--ink);cursor:pointer;display:flex;font-family:inherit;justify-content:center;line-height:inherit;min-height:49px;padding:0;width:49px}._Button_36kvr_1:focus,._Button_36kvr_1:hover{background-color:var(--color--surface-hover)}._Button_36kvr_1:first-child{border-left:0}._Button_36kvr_1:last-child{border-right:0}@media screen and (min-width:380px){._Button_36kvr_1{min-height:59px;width:59px}._Button_36kvr_1 svg{font-size:20px}}._Stack_1nnzo_1{align-items:center;display:flex;flex:1;flex-direction:row;justify-content:center;padding:10px 15px}._Stack--s_1nnzo_10{padding-bottom:var(--spacing-s);padding-top:var(--spacing-s)}._Stack--l_1nnzo_15{padding-left:var(--spacing-xl);padding-right:var(--spacing-xl)}._Title_1dx5n_1{font-size:var(--font-size-l);font-weight:500;line-height:1.1;margin-right:15px}@media screen and (min-width:380px){._Title_1dx5n_1{font-size:var(--font-size-xl)}}._Toolbar_50246_1{align-items:stretch;border-bottom:1px solid var(--color--border);border-top:1px solid var(--color--border);display:flex;position:relative}._Toolbar_50246_1:first-child{border-top-width:0}._Toolbar_50246_1:last-child{border-bottom-width:0}._tooltip_6pcmg_1{word-wrap:break-word;background:var(--color--tooltip--surface);border-radius:4px;box-shadow:var(--shadow--floating);color:var(--color--tooltip--ink);-webkit-hyphens:auto;hyphens:auto;max-width:400px;overflow-wrap:break-word;padding:10px 15px}._Dropdown_1mqss_1{position:relative}._Dropdown__spacer_1mqss_5{inset:0;pointer-events:none;position:absolute}._Dropdown__menu__search_1mqss_11{border-bottom:1px solid var(--color--border);padding:7px}._Dropdown__menu__search__input_1mqss_16{appearance:none;background-color:var(--color--surface);background-image:none;border:1px solid var(--color--border);border-radius:3px;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:.9em;padding:8px;resize:none;transition:border .2s var(--material-ease);width:100%}._Dropdown__menu__search__input_1mqss_16::placeholder{color:var(--color--ink-placeholder)}._Dropdown__menu__search__input_1mqss_16:hover{border-color:var(--color--border-hover)}._Dropdown__menu__search__input_1mqss_16:focus{border-color:var(--color--focus--border);box-shadow:0 0 0 4px var(--color--focus--outline);outline:0}._Dropdown__menu-container_1mqss_47{position:fixed;visibility:hidden}._Dropdown__menu_1mqss_11{background-color:var(--color--surface-raised);border-radius:4px;box-shadow:var(--shadow--floating);margin-bottom:var(--spacing-xl);margin-top:10px;min-width:200px;padding:1px 0;text-align:initial}._Dropdown__menu__inner_1mqss_63{margin:7px 0}._Dropdown__menu__group__title_1mqss_67{background-color:var(--color--surface-muted);color:var(--color--ink-subtle);font-size:var(--font-size-xs);padding:5px 15px 3px;text-transform:uppercase}._Dropdown__menu__group__content_1mqss_75{margin:8px 0}._Dropdown__menu__text_1mqss_79{color:var(--color--ink-subtle);display:block;line-height:1.2;padding:4px 15px;position:relative;text-align:left}._Dropdown__menu__option_1mqss_88{align-items:center;color:var(--color--ink);display:flex;padding:4px 15px;position:relative;text-align:left;text-decoration:none;white-space:nowrap}._Dropdown__menu__option_1mqss_88:focus,._Dropdown__menu__option_1mqss_88:hover{background-color:var(--color--surface-hover)}._Dropdown__menu__option_1mqss_88>a{color:inherit;display:block;text-decoration:none}._Dropdown__menu__option--is-selected_1mqss_110{background-color:var(--color--selected--surface)}._Dropdown__menu__option--is-disabled_1mqss_114{opacity:.5}._Dropdown__menu__option--is-disabled_1mqss_114 ._Dropdown__menu__option__content_1mqss_117{cursor:not-allowed}._Dropdown__menu__option--is-dangerous_1mqss_122{color:var(--color--danger--ink)}._Dropdown__menu__option--is-dangerous_1mqss_122 svg{fill:var(--color--danger--ink)}._Dropdown__menu__option--is-dangerous_1mqss_122:focus,._Dropdown__menu__option--is-dangerous_1mqss_122:hover{background-color:var(--color--danger--surface);color:var(--color--danger--ink)}._Dropdown__menu__option--is-dangerous_1mqss_122:focus svg,._Dropdown__menu__option--is-dangerous_1mqss_122:hover svg{fill:var(--color--danger--ink)}._Dropdown__menu__option--is-active_1mqss_140{font-weight:500}._Dropdown__menu__option--is-active_1mqss_140:focus,._Dropdown__menu__option--is-active_1mqss_140:hover{background-color:none}._Dropdown__menu__option--is-invalid_1mqss_153,._Dropdown__menu__option--is-valid_1mqss_149{padding-left:35px}._Dropdown__menu__option--is-invalid_1mqss_153:before{background-color:var(--color--danger--surface);border-radius:4px;content:"";font-size:12px;height:8px;left:15px;position:absolute;top:50%;transform:translateY(-50%);width:8px}._Dropdown__menu__option__content_1mqss_117{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:inherit;cursor:pointer;flex:1;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;padding:0;text-align:left}._Dropdown__menu__option__content_1mqss_117>svg{fill:var(--color--ink-subtle);color:var(--color--ink-subtle);display:inline-block;font-size:13px;padding-right:8px;vertical-align:middle}._Dropdown__menu__option__icons_1mqss_196{align-items:center;display:flex;padding-left:15px}._Dropdown__menu__option__icon_1mqss_196{-webkit-appearance:none;-moz-appearance:none;background-color:transparent;border:0;box-sizing:border-box;color:var(--color--ink);color:var(--color--ink-subtle);cursor:pointer;display:inline-block;font-family:inherit;font-size:inherit;font-size:13px;line-height:inherit;line-height:10px;opacity:0;padding:3px;position:relative;top:-1px;transition:transform .1s ease-in-out;width:100%;width:auto}._Dropdown__menu__option_1mqss_88:focus ._Dropdown__menu__option__icon_1mqss_196,._Dropdown__menu__option_1mqss_88:hover ._Dropdown__menu__option__icon_1mqss_196{opacity:1}._Dropdown__menu__option__icon_1mqss_196:focus,._Dropdown__menu__option__icon_1mqss_196:hover{transform:scale(1.2)}._Dropdown__menu__option__icon_1mqss_196 svg{fill:var(--color--ink-subtle)}._Dropdown__menu__option__icon--delete_1mqss_243{color:var(--color--danger--ink)}._Dropdown__menu__option__icon--delete_1mqss_243 svg{fill:var(--color--danger--ink)}._Dropdown__menu__separator_1mqss_250{background-color:var(--color--border);height:1px;margin:8px 0}._Dropdown__menu_1mqss_11{overflow-y:auto}._SplitViewPane_1cl1f_1{height:100%;overflow-y:auto;position:absolute;width:100%}._SplitViewSash_9ds0h_1{align-items:center;background-color:transparent;display:flex;height:100%;justify-content:center;position:absolute;top:0;transition:background-color .2s .15s;width:100%;z-index:2}._SplitViewSash--dragging_9ds0h_15,._SplitViewSash_9ds0h_1:hover{background-color:var(--color--primary-soft--surface)}._SplitViewSash--dragging_9ds0h_15:has(._SplitViewSash__content_9ds0h_19:hover),._SplitViewSash_9ds0h_1:hover:has(._SplitViewSash__content_9ds0h_19:hover){background-color:transparent}._SplitViewSash--no-resize_9ds0h_24{pointer-events:none}._SplitViewSash--vertical_9ds0h_28{cursor:col-resize}._SplitViewSash--horizontal_9ds0h_32{cursor:row-resize}._SplitViewSash__content_9ds0h_19{cursor:pointer;left:50%;padding:15px 0;pointer-events:auto;position:absolute;top:50%;transform:translate(-50%,-50%)}._SplitViewSash__content__button_9ds0h_46{align-items:center;background:var(--color--surface);border:1px solid var(--color--border);border-radius:6px;color:var(--color--ink-subtle);display:flex;font-size:10px;height:20px;justify-content:center;width:20px;z-index:2}._SplitViewSash__content__button_9ds0h_46 svg{fill:currentColor;display:block}._SplitViewSash__content_9ds0h_19:hover ._SplitViewSash__content__button_9ds0h_46{background:var(--color--surface-hover);color:var(--color--ink)}._SplitView_1oi17_1{flex:1;height:100%;position:relative;width:100%}._SplitView--dragging_1oi17_8._SplitView--vertical_1oi17_8{cursor:col-resize}._SplitView--dragging_1oi17_8._SplitView--horizontal_1oi17_12{cursor:row-resize}._SplitView--disable-select_1oi17_16{-webkit-user-select:none;user-select:none}._SplitView--disable-select_1oi17_16 ._SplitViewPane_1oi17_20{pointer-events:none}._VerticalSplitPane__expand_28erb_1{background:var(--color--surface);cursor:pointer;inset:0;position:absolute;transition:all .3s cubic-bezier(.55,0,.1,1)}._VerticalSplitPane__expand_28erb_1:hover{animation:_VerticalSplitPane__expand_28erb_1 .6s cubic-bezier(.55,0,.1,1);background:var(--color--surface-hover)}._VerticalSplitPane__expand_28erb_1._VerticalSplitPane__expand_28erb_1{border-right:1px solid var(--color--border);transform-origin:left}._VerticalSplitPane__expand_28erb_1._VerticalSplitPane__expand--right_28erb_25{border-left:1px solid var(--color--border);transform-origin:right}@keyframes _VerticalSplitPane__expand_28erb_1{0%{transform:scaleX(1)}50%{transform:scaleX(2)}to{transform:scaleX(1)}}._VerticalSplitPaneOverlay_28erb_42{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:var(--color--backdrop--surface);height:100%;inset:0;overflow:hidden;position:absolute;z-index:12}._VerticalSplitPaneOverlay__primary_28erb_55{inset:0;position:absolute;z-index:1}._VerticalSplitPaneOverlay__primary--left_28erb_64{margin-right:20px}._VerticalSplitPaneOverlay__primary--right_28erb_68{margin-left:20px}._VerticalSplitPaneOverlay__secondary_28erb_72{background:var(--color--surface);bottom:0;box-shadow:var(--shadow--ambient);position:absolute;top:0}._VerticalSplitPaneOverlay__secondary--left_28erb_80{left:0}._VerticalSplitPaneOverlay__secondary--right_28erb_84{right:0}._VerticalSplitPaneOverlay__sash_28erb_88{height:100%;position:absolute;top:0}._VerticalSplitPaneOverlay__secondary--left_28erb_80 ._VerticalSplitPaneOverlay__sash_28erb_88{right:0}._VerticalSplitPaneOverlay__secondary--right_28erb_84 ._VerticalSplitPaneOverlay__sash_28erb_88{left:0}
|