import{a as Co,c as tt}from"./chunk-7GEQZPSJ.js";import{b as yo,c as Mo}from"./chunk-IDA57IE7.js";import{a as ho}from"./chunk-E4VBSH2Z.js";import{b as go}from"./chunk-5DZ4BRI5.js";import{a as It}from"./chunk-6MQGVCNA.js";import{a as Ki}from"./chunk-OMZRIN7I.js";import{a as Si,b as vi,c as yi,d as Mi,e as Ei}from"./chunk-SOZAYSLT.js";import{a as ao,b as so,c as lo,d as po,e as Ti}from"./chunk-TMQLF6TC.js";import{a as Pi}from"./chunk-GEREEIWH.js";import{g as no,h as oo}from"./chunk-A664O733.js";import{a as Ji}from"./chunk-SOYR22SS.js";import{a as fi}from"./chunk-WOMLTIDX.js";import"./chunk-CHRXNCQY.js";import{b as Oe}from"./chunk-M4Q4AVUW.js";import"./chunk-7Q3H4OPH.js";import{a as mo}from"./chunk-GLRVGQ7L.js";import{a as uo}from"./chunk-VD23GWMV.js";import{a as Le,b as Ii}from"./chunk-IAHWCINR.js";import"./chunk-EDODPOLN.js";import"./chunk-BVS6NEQZ.js";import{c as ro}from"./chunk-JXG3725G.js";import{a as Ae}from"./chunk-RV3MX6HX.js";import{a as _o}from"./chunk-Z3KO6G6F.js";import{c as eo,g as to,h as io}from"./chunk-T22HDLET.js";import"./chunk-KJLRNSCZ.js";import"./chunk-GEUQVPYE.js";import{a as Pt}from"./chunk-FUFZ726E.js";import{e as So}from"./chunk-SZDCLEBX.js";import{a as gi}from"./chunk-JXHH4R5G.js";import"./chunk-77FLT7QI.js";import{a as co}from"./chunk-L5OYEIP4.js";import{a as fe}from"./chunk-PFYLSWVL.js";import{a as Ci}from"./chunk-62DTQGP2.js";import{a as Et}from"./chunk-6WKMXLVZ.js";import{a as be}from"./chunk-ZBMVI5KO.js";import{a as jn,b as Qn,c as qi,d as Zn,e as qn,f as fo,g as Oi}from"./chunk-PQ2POBKJ.js";import{a as vo}from"./chunk-BLIFDTCH.js";import{a as Ri}from"./chunk-OET7Q3S6.js";import{a as hi,c as Vt,d as Kn}from"./chunk-DLOAMKCL.js";import"./chunk-RYLE4IHS.js";import"./chunk-C3J2N54S.js";import"./chunk-TQL5WXHI.js";import"./chunk-4L2XWRQY.js";import{c as Wn}from"./chunk-LMEGNV7R.js";import{a as Mt}from"./chunk-LIBS3JDA.js";import"./chunk-F7ZO4JQZ.js";import"./chunk-66MRKT24.js";import"./chunk-YAN73USB.js";import"./chunk-XRHDZCTT.js";import{c as Jn}from"./chunk-JZQULWZP.js";import{a as yt}from"./chunk-VSNT7HD7.js";import"./chunk-AOEDWAZX.js";import{A as mi}from"./chunk-RC2N7LYX.js";import"./chunk-54VTLZGQ.js";import"./chunk-VF2E66ZC.js";import{b as je}from"./chunk-PWA5YSBS.js";import{a as Je}from"./chunk-2KM5QYGI.js";import{a as vt}from"./chunk-JYJRU7GD.js";import"./chunk-DQVEC6QH.js";import"./chunk-MI3Y2XTP.js";import{a as Re}from"./chunk-CRKNV45X.js";import{a as Zi,d as pi}from"./chunk-ULU2WPBM.js";import{a as _i,b as ye,c as Ke}from"./chunk-W656SLW5.js";import"./chunk-POWTF5KQ.js";import{a as Yt,b as et}from"./chunk-ARKMDTQ4.js";import{a as ui}from"./chunk-KCS4FZWN.js";import{C as W,D as We,a as Ln,c as ft,g as q,h as Ge,n as Te,o as Ct,q as Nn,u as He,v as Xe}from"./chunk-UVFMJH3U.js";import{G as zn,H as Bn,a as Fn,s as kn,u as ai}from"./chunk-YIKPDULQ.js";import{a as qe}from"./chunk-XTZ2Q6VE.js";import{$h as Hn,A as Vi,Aa as Ne,Ab as le,B as Xt,Bb as E,Bc as In,Cb as yn,Cc as wt,Cd as Ue,Da as l,Db as m,Dd as te,Ec as ut,F as Sn,Fa as zi,Fc as Ie,Ff as Vn,Gc as Tn,Ha as _t,Ia as Bi,Id as An,If as Qe,Je as ji,K as Wt,Ka as Ui,Kb as Mn,Kf as $n,Kh as Gn,La as T,Lb as J,Le as wn,Lh as z,Ma as Kt,Mb as Q,Na as Jt,Nb as j,Nh as si,Oc as ee,Oh as St,P as jt,Pb as ni,Q as Ve,Qa as De,R as ct,Ra as K,Rh as Ze,S as $e,Sb as y,Sc as Rn,Tb as R,Ub as Y,X as $i,Xh as pe,Y as Pe,Yb as ue,Yd as Xi,Z as Qt,Zb as he,Zc as de,_ as at,_a as vn,_b as ge,a as rt,aa as p,ab as f,b as At,bb as C,c as A,cc as Be,ce as Wi,d as gn,db as ze,eb as ne,ec as mt,f as Yi,fa as P,fb as oe,fc as En,ga as I,gb as u,gc as k,hb as c,ib as s,id as On,ie as we,ii as li,j as Bt,ja as Lt,jb as v,ka as dt,kb as pt,ke as Dn,la as Fi,lb as Dt,le as oi,ma as Se,mb as ei,me as xt,n as lt,na as Fe,nb as $,oa as Zt,ob as F,oc as H,oi as Xn,p as Ut,pb as Gi,pc as ce,qc as ve,qe as _e,qh as Un,qi as ci,r as Gt,ra as Nt,rd as bn,rf as xn,rh as Qi,sa as ke,sc as D,se as G,sf as Yn,si as di,tb as N,th as w,u as fn,ua as qt,ub as Hi,v as Ht,vb as ti,ve as ri,vf as st,wb as ii,wc as Pn,x as Cn,xb as g,xc as X,yb as B,yc as Z,yd as ht,za as ki,zb as U,zd as gt,zh as Ar}from"./chunk-HJJWL6RD.js";import{a as ie,b as se,e as Or,g as br,i as h,l as Ye}from"./chunk-H2BCKOF6.js";var To=Or((lc,Dr)=>{Dr.exports=`<svg width="278" height="202" viewBox="0 0 278 202" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M154.004 185.78C207.06 179.326 249.514 169.528 248.829 163.895C248.144 158.262 204.579 158.927 151.523 165.381C98.4671 171.835 56.0125 181.633 56.6977 187.266C57.3829 192.899 100.948 192.233 154.004 185.78Z" fill="url(#paint0_radial_2530_45010)" fill-opacity="0.1" />
  <rect x="50.5752" y="22.3535" width="167" height="167" rx="24" transform="rotate(-7.69207 50.5752 22.3535)" fill="var(--bg)" />
  <path d="M106.941 75.79L175.903 66.4757C179.902 65.9355 184.024 69.0292 184.689 73.9578L190.119 114.161C190.785 119.09 187.632 123.166 183.632 123.706L114.671 133.02C110.671 133.561 106.55 130.467 105.884 125.538L100.454 85.335C99.7885 80.4063 102.941 76.3302 106.941 75.79Z" stroke="var(--bg-secondary-450)" stroke-width="6" />
  <path d="M115.966 52.623L137.514 70.5249" stroke="var(--bg-secondary-450)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
  <path d="M161.057 46.5332L145.03 69.5102" stroke="var(--bg-secondary-450)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" />
  <g clip-path="url(#clip0_2530_45010)">
    <rect y="8.43359" width="74" height="74" rx="37" fill="var(--bg-secondary-450)" />
    <path d="M36.9997 51.8372C44.8237 51.8372 51.1663 45.4946 51.1663 37.6706C51.1663 29.8465 44.8237 23.5039 36.9997 23.5039C29.1756 23.5039 22.833 29.8465 22.833 37.6706C22.833 45.4946 29.1756 51.8372 36.9997 51.8372Z" stroke="var(--secondary-icon-color)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M59.6663 74.5046C59.6663 68.493 57.2783 62.7276 53.0274 58.4768C48.7766 54.226 43.0112 51.8379 36.9997 51.8379C30.9881 51.8379 25.2227 54.226 20.9719 58.4768C16.7211 62.7276 14.333 68.493 14.333 74.5046" stroke="var(--secondary-icon-color)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <g clip-path="url(#clip1_2530_45010)">
    <rect x="96" y="157.424" width="44" height="44" rx="22" fill="var(--secondary-icon-color)" />
    <path d="M118 184.837C123.062 184.837 127.166 180.733 127.166 175.671C127.166 170.608 123.062 166.504 118 166.504C112.937 166.504 108.833 170.608 108.833 175.671C108.833 180.733 112.937 184.837 118 184.837Z" stroke="var(--bg-secondary-350)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M132.666 199.505C132.666 195.615 131.121 191.884 128.371 189.134C125.62 186.383 121.89 184.838 118 184.838C114.11 184.838 110.379 186.383 107.629 189.134C104.878 191.884 103.333 195.615 103.333 199.505" stroke="var(--bg-secondary-350)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <g clip-path="url(#clip2_2530_45010)">
    <rect x="218" y="77.4258" width="60" height="60" rx="30" fill="var(--fg-300)" />
    <path d="M248 115.504C254.904 115.504 260.5 109.907 260.5 103.004C260.5 96.1003 254.904 90.5039 248 90.5039C241.096 90.5039 235.5 96.1003 235.5 103.004C235.5 109.907 241.096 115.504 248 115.504Z" stroke="var(--bg-secondary-500)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M268 135.504C268 130.2 265.893 125.112 262.142 121.362C258.391 117.611 253.304 115.504 248 115.504C242.696 115.504 237.609 117.611 233.858 121.362C230.107 125.112 228 130.2 228 135.504" stroke="var(--bg-secondary-500)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <circle cx="219" cy="135.43" r="16" fill="var(--bg-secondary-500)" />
  <g clip-path="url(#clip3_2530_45010)">
    <path d="M222.334 138.763L219 135.43L215.667 138.763" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M219 135.43V142.93" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M225.992 140.755C226.805 140.311 227.447 139.61 227.817 138.762C228.187 137.913 228.264 136.966 228.035 136.069C227.807 135.171 227.286 134.376 226.556 133.807C225.825 133.239 224.926 132.93 224 132.93H222.95C222.698 131.954 222.228 131.048 221.575 130.28C220.922 129.513 220.104 128.903 219.182 128.497C218.26 128.091 217.257 127.899 216.25 127.936C215.243 127.973 214.258 128.238 213.368 128.711C212.478 129.184 211.707 129.852 211.112 130.666C210.518 131.48 210.116 132.418 209.936 133.409C209.756 134.401 209.804 135.42 210.075 136.391C210.345 137.361 210.833 138.258 211.5 139.013" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M222.334 138.763L219 135.43L215.667 138.763" stroke="var(--fg-200)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
  </g>
  <circle cx="61" cy="76.4336" r="16" fill="var(--secondary-icon-color)" />
  <path d="M60.8525 73.166C62.5743 73.1661 63.9697 74.5614 63.9697 76.2832C63.9696 78.0049 62.5742 79.4003 60.8525 79.4004C59.1307 79.4004 57.7355 78.005 57.7354 76.2832C57.7354 74.5613 59.1307 73.166 60.8525 73.166ZM60.8525 73.9736C59.5774 73.9736 58.543 75.0081 58.543 76.2832C58.5431 77.5586 59.5778 78.5908 60.8525 78.5908C62.1275 78.5907 63.1601 77.5582 63.1602 76.2832C63.1602 75.0085 62.128 73.9737 60.8525 73.9736Z" fill="black" stroke="var(--bg)" />
  <path d="M60.8516 66.7402C60.076 66.7405 59.4473 67.3692 59.4473 68.1445V68.2988C59.4472 69.0559 58.994 69.7395 58.2969 70.0352L58.2891 70.0391L58.2803 70.043C58.2589 70.0529 58.2373 70.0585 58.2139 70.0605L58.1484 70.0664L58.0869 70.0879C57.4516 70.3169 56.7454 70.1822 56.2402 69.7451L56.1416 69.6543C55.888 69.3698 55.5309 69.2009 55.1514 69.1846L55.1494 69.1836C54.7556 69.1682 54.3723 69.3204 54.0947 69.6016C53.5506 70.1489 53.5508 71.0335 54.0938 71.5811L54.1035 71.5898C54.6841 72.1443 54.8562 73.004 54.5342 73.7412L54.5293 73.751L54.5254 73.7607C54.2489 74.4732 53.5683 74.9483 52.8037 74.9609H52.7129C51.9379 74.961 51.3088 75.5893 51.3086 76.3643C51.3086 77.14 51.9374 77.7695 52.7129 77.7695H52.8633C53.5773 77.7747 54.224 78.1797 54.5449 78.8096L54.6045 78.9385C54.8987 79.6412 54.7469 80.451 54.2188 80.998C53.9309 81.2694 53.7631 81.6432 53.75 82.0361V82.0605C53.7562 82.4282 53.9053 82.7795 54.1689 83.0391V83.04C54.7164 83.5857 55.6017 83.5846 56.1494 83.04L56.1504 83.0391C56.5239 82.6655 57.0279 82.4521 57.5557 82.4443C57.8088 82.443 58.0594 82.4979 58.29 82.6055L58.3057 82.6133L58.3232 82.6201C59.0318 82.8902 59.5054 83.5638 59.5205 84.3223H59.5195V84.4229C59.5196 85.1978 60.1488 85.8261 60.9238 85.8262C61.7003 85.8262 62.328 85.1975 62.3281 84.4229V84.2715C62.3321 83.5135 62.7851 82.8298 63.4814 82.5303L63.4873 82.5273C64.1921 82.2136 65.0171 82.3665 65.5615 82.9121C65.8323 83.201 66.2085 83.3729 66.6064 83.3848H66.6221C67.1904 83.3832 67.7022 83.0388 67.917 82.5137C68.1326 81.9878 68.0099 81.3832 67.6055 80.9834L67.6016 80.9795L67.498 80.8711C67.0047 80.3141 66.8724 79.5161 67.1709 78.8242L67.1699 78.8232C67.4717 78.1329 68.1553 77.6875 68.9092 77.6875V77.6865C69.288 77.7086 69.6591 77.5787 69.9395 77.3223C70.2321 77.0544 70.3961 76.6752 70.3945 76.2812C70.3932 75.5066 69.7658 74.879 68.9912 74.8789H68.8369C68.0825 74.8789 67.401 74.4287 67.1035 73.7363C67.0885 73.6974 67.0766 73.6568 67.0703 73.6143L67.0635 73.5654L67.0459 73.5186L67.0059 73.3906C66.8248 72.7469 67.0034 72.0505 67.4814 71.5732L67.4805 71.5723C67.7617 71.319 67.9302 70.9648 67.9453 70.5869L67.9443 70.5859C67.9607 70.1941 67.8132 69.8157 67.5381 69.5391H67.5391C67.2769 69.2723 66.9179 69.1197 66.542 69.1182L66.5342 69.1191C66.162 69.1238 65.8093 69.2761 65.5508 69.5391H65.5498L65.5459 69.5439C64.9903 70.1249 64.1316 70.2966 63.3945 69.9746C62.7003 69.6714 62.2527 68.985 62.2559 68.2275L62.2549 68.2266C62.2743 67.8976 62.1798 67.5722 61.9844 67.3086L61.8896 67.1953C61.6222 66.9036 61.2446 66.7391 60.8516 66.7402ZM58.7109 84.417C58.7057 83.9671 58.4415 83.5634 58.0352 83.376L58.0342 83.375L57.8779 83.3164C57.5087 83.2082 57.1039 83.2896 56.8037 83.542L56.7832 83.5596L56.7637 83.5801C56.3516 84.0133 55.7828 84.2602 55.1846 84.2676C54.5877 84.2738 54.0124 84.0404 53.5908 83.6172H53.5918C52.7345 82.7542 52.7345 81.3601 53.5918 80.4971L53.5898 80.4951C53.9284 80.182 54.0411 79.6959 53.875 79.2676L53.8711 79.2578L53.8662 79.2471C53.6929 78.8535 53.3081 78.5962 52.8779 78.5869H52.7129C51.4911 78.5869 50.5002 77.5965 50.5 76.374C50.5 75.1522 51.4911 74.1602 52.7129 74.1602V74.1592C53.1638 74.1725 53.5723 73.9103 53.7529 73.5L53.7539 73.501C53.7563 73.4963 53.7574 73.491 53.7598 73.4863C53.765 73.4741 53.7726 73.4627 53.7773 73.4502L53.7754 73.4492C53.9589 73.0462 53.8902 72.5704 53.5889 72.2393L53.5791 72.2275L53.5684 72.2178L53.4141 72.0518C52.6936 71.1913 52.7275 69.9074 53.5283 69.0859C54.3816 68.2099 55.784 68.1919 56.6592 69.0459L56.6602 69.0439C56.97 69.3745 57.4485 69.4896 57.876 69.3271L57.877 69.3281L58.0488 69.2646L58.1025 69.2451L58.1504 69.2139C58.4234 69.0356 58.5983 68.7453 58.6328 68.4268L58.6387 68.2891V68.1445C58.6387 66.9227 59.6291 65.9319 60.8516 65.9316C62.0734 65.9316 63.0654 66.9227 63.0654 68.1445H63.0664C63.045 68.5949 63.2941 69.0146 63.7002 69.21L63.707 69.2139L63.7129 69.2158C64.1165 69.3958 64.5912 69.3205 64.918 69.0176L64.9414 68.9941C65.3569 68.5542 65.9345 68.3038 66.54 68.3008C67.1231 68.3018 67.6825 68.5325 68.0957 68.9424C68.5121 69.3574 68.7461 69.9218 68.7461 70.5098C68.7461 71.0978 68.5115 71.661 68.0947 72.0762L68.0957 72.0771C67.7964 72.3522 67.6737 72.7654 67.7686 73.1533L67.8242 73.3232C67.8341 73.3479 67.8434 73.377 67.8506 73.4111L67.8721 73.5127L67.9316 73.5967C68.1338 73.8834 68.461 74.056 68.8115 74.0615H68.9912C70.213 74.0616 71.204 75.0519 71.2041 76.2744C71.2041 77.4962 70.213 78.4872 68.9912 78.4873V78.4893C68.5448 78.4707 68.1249 78.7142 67.9268 79.1211L67.9209 79.1318C67.7332 79.5426 67.8211 80.0251 68.1396 80.3438L68.1436 80.3486C69.0198 81.2046 69.0366 82.6089 68.1807 83.4854H68.1797C67.3248 84.3612 65.9205 84.3776 65.0439 83.5215H65.043C64.748 83.1971 64.2884 83.0775 63.873 83.2227C63.4366 83.3738 63.1422 83.7836 63.1367 84.2451V84.4229C63.1366 85.6446 62.1456 86.6357 60.9238 86.6357C59.7021 86.6356 58.7111 85.6446 58.7109 84.4229V84.417Z" fill="black" stroke="var(--bg)" />
  <path d="M45 97C55.5 115 81.5 115.5 88 109.5C94.5 103.5 70 92.5 68 119C66.4 140.2 80.6667 156.5 88 162" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M251 146.5C253.5 162 253 202 209 184.5C165 167 167 162 148 165" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M239.5 70.5002C223.5 57 193 63.5011 172.5 82.0005" stroke="var(--bg-secondary-500)" stroke-linecap="round" stroke-dasharray="4 4" />
  <path d="M170.286 79C170.286 80.3609 167.185 83.4258 166.259 85.8156C166.03 86.4039 166.577 86.8845 167.196 86.7608L176 85" stroke="var(--bg-secondary-500)" stroke-linecap="round" />
  <defs>
    <radialGradient id="paint0_radial_2530_45010" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(152.764 175.58) rotate(-6.93547) scale(96.7739 10.2746)">
      <stop />
      <stop offset="1" stop-opacity="0" />
    </radialGradient>
    <clipPath id="clip0_2530_45010">
      <rect y="8.43359" width="74" height="74" rx="37" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip1_2530_45010">
      <rect x="96" y="157.424" width="44" height="44" rx="22" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip2_2530_45010">
      <rect x="218" y="77.4258" width="60" height="60" rx="30" fill="var(--bg)" />
    </clipPath>
    <clipPath id="clip3_2530_45010">
      <rect width="20" height="20" fill="var(--bg)" transform="translate(209 125.43)" />
    </clipPath>
  </defs>
</svg>
`;});var Eo=(()=>{let e=class e{};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:1,vars:0,consts:[["mode","user","key","UserVideoCommentList"]],template:function(i,r){i&1&&v(0,"my-video-comment-list-admin-owner",0);},dependencies:[po],encapsulation:2}));let o=e;return o;})();var Me=class Me{authHttp=p(On);restExtractor=p(Gn);listAvailable(e){let n=Me.BASE_AUTOMATIC_TAGS_URL+"accounts/"+e.accountName+"/available";return this.authHttp.get(n).pipe(Xt(t=>this.restExtractor.handleError(t)));}getCommentPolicies(e){let n=Me.BASE_AUTOMATIC_TAGS_URL+"policies/accounts/"+e.accountName+"/comments";return this.authHttp.get(n).pipe(Xt(t=>this.restExtractor.handleError(t)));}updateCommentPolicies(e){let n=Me.BASE_AUTOMATIC_TAGS_URL+"policies/accounts/"+e.accountName+"/comments";return this.authHttp.put(n,{review:e.review}).pipe(Xt(t=>this.restExtractor.handleError(t)));}};h(Me,"BASE_AUTOMATIC_TAGS_URL",Yn.apiUrl+"/api/v1/automatic-tags/"),h(Me,"\u0275fac",function(n){return new(n||Me)();}),h(Me,"\u0275prov",Pe({token:Me,factory:Me.ɵfac,providedIn:"root"}));var Tt=Me;function Lr(o,e){if(o&1){let n=N();c(0,"div",2)(1,"my-peertube-checkbox",3),ge("ngModelChange",function(i){let r=P(n).$implicit;return he(r.review,i)||(r.review=i),I(i);}),E("ngModelChange",function(){P(n);let i=m();return I(i.updatePolicies());}),s()();}if(o&2){let n=e.$implicit,t=e.$index,i=m();l(),u("inputName","tag-"+t),ue("ngModel",n.review),u("labelText",i.getLabelText(n));}}var Po=(()=>{let e=class e{authService=p(z);autoTagsService=p(Tt);notifier=p(w);tags=[];ngOnInit(){this.loadAvailableTags();}getLabelText(t){return t.name==="external-link"?"That contain an external link":"That contain any word from your \""+t.name+"\" watched word list";}updatePolicies(){let t=this.authService.getUser().account.name;this.autoTagsService.updateCommentPolicies({accountName:t,review:this.tags.filter(i=>i.review).map(i=>i.name)}).subscribe({next:()=>{this.notifier.success("Comment policies updated");},error:i=>this.notifier.handleError(i)});}loadAvailableTags(){let t=this.authService.getUser().account.name;Gt([this.autoTagsService.listAvailable({accountName:t}),this.autoTagsService.getCommentPolicies({accountName:t})]).subscribe(([i,r])=>{this.tags=i.available.map(a=>({name:a.name,type:a.type,review:r.review.includes(a.name)}));});}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:4,vars:0,consts:()=>{let t;return t="Automatically block comments:",[t,[1,"d-block","mb-3"],[1,"form-group","ms-3"],[3,"ngModelChange","inputName","ngModel","labelText"]];},template:function(i,r){i&1&&(c(0,"strong",1),g(1,0),s(),ne(2,Lr,2,3,"div",2,ze)),i&2&&(l(2),oe(r.tags));},dependencies:[W,q,Te,et],encapsulation:2}));let o=e;return o;})();function Nr(o,e){if(o&1&&(pt(0,"div",1),ei(1,"div",4),Dt()),o&2){let n=m();l(),Hi("innerHTML",n.svg,ki);}}var Io=(()=>{let e=class e{activeModal=p(kn);title;html;svg;};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-new-feature-info-modal"]],decls:6,vars:3,consts:()=>{let t;return t="Got it",[[1,"modal-body"],[1,"svg-relative-container"],[1,"content",3,"innerHtml"],["type","button","role","button","value",t,1,"peertube-button","primary-button",3,"click","key.enter"],["aria-hidden","true",1,"svg-container",3,"innerHTML"]];},template:function(i,r){i&1&&(pt(0,"div",0),f(1,Nr,2,1,"div",1),pt(2,"h2"),y(3),Dt(),ei(4,"div",2),pt(5,"input",3),yn("click",function(){return r.activeModal.close();})("key.enter",function(){return r.activeModal.close();}),Dt()()),i&2&&(l(),C(r.svg?1:-1),l(2),R(r.title),l(),Hi("innerHTML",r.html,ki));},dependencies:[W],styles:[`h2[_ngcontent-%COMP%]{color:var(--fg-350);font-weight:700;margin-bottom:calc(1.325rem + .9vw)}@media(min-width:1200px){h2[_ngcontent-%COMP%]{margin-bottom:2rem}}h2[_ngcontent-%COMP%]{font-size:calc(1.3625rem + 1.35vw)}@media(min-width:1200px){h2[_ngcontent-%COMP%]{font-size:2.375rem}}.modal-body[_ngcontent-%COMP%]{text-align:center}.content[_ngcontent-%COMP%]{color:var(--fg-200);margin-bottom:calc(1.375rem + 1.5vw)}@media(min-width:1200px){.content[_ngcontent-%COMP%]{margin-bottom:2.5rem}}.svg-relative-container[_ngcontent-%COMP%]{position:relative}.svg-container[_ngcontent-%COMP%]{margin:0 auto;position:absolute;top:-3.5rem;right:0;left:0}.svg-relative-container[_ngcontent-%COMP%] + h2[_ngcontent-%COMP%]{margin-top:10rem}
/*# sourceMappingURL=new-feature-info-modal.component-IANZ5DI7.css.map */`]}));let o=e;return o;})();var wr=To(),bi=(()=>{let e=class e{auth=p(z);modalService=p(ai);serverService=p(pe);userService=p(ci);notifier=p(w);domSanitizer=p(bn);showChannelCollaboration(){this.auth.userInformationLoaded.pipe(Wt()).subscribe(()=>{if(this.serverService.getHTMLConfig().client.newFeaturesInfo!==!0||this.auth.getUser().newFeaturesInfoRead&Xi.CHANNEL_COLLABORATION||this.modalService.hasOpenModals())return;let r=this.serverService.getHTMLConfig().instance.name,a=this.modalService.open(Io,{size:"lg",centered:!0}),d=a.componentInstance;d.title="Collaboration on channels are coming to "+r+"",d.html="You can now <strong>invite other users</strong> to collaborate on your channel",d.svg=this.domSanitizer.bypassSecurityTrustHtml(wr),a.result.finally(()=>{this.userService.markNewFeatureInfoAsRead(Xi.CHANNEL_COLLABORATION).subscribe({next:()=>this.auth.refreshUserInformation(),error:_=>this.notifier.handleError(_)});});});}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275prov",Pe({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})();var Ro=(()=>{let e=class e{serverService=p(pe);newFeatureInfoService=p(bi);menuEntries=[];serverConfig;ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.buildMenu(),this.newFeatureInfoService.showChannelCollaboration();}buildMenu(){this.menuEntries=[{label:"Manage my channels",routerLink:"/my-library/video-channels"},{label:"\u062F\u0646\u0628\u0627\u0644\u200C\u06A9\u0646\u0646\u062F\u06AF\u0627\u0646",routerLink:"/my-library/followers"},{label:"Synchronizations",routerLink:"/my-library/video-channel-syncs",isDisplayed:()=>this.isChannelSyncEnabled()}];}isChannelSyncEnabled(){let t=this.serverConfig.import;return this.serverConfig.import.videoChannelSynchronization.enabled&&(t.videos.http.enabled||t.videos.torrent.enabled);}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let t;t="My channels";let i;return i="Skip the sub menu",[["myChannelSpaceContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-channel-space-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1Icon","channel","h1",t,3,"menuEntries"],["tabindex","-1","id","my-channel-space-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",2)(1,"div",3)(2,"a",4),E("click",function(_){P(a);let S=j(6);return _.preventDefault(),I(S.focus());}),g(3,1),s(),v(4,"my-horizontal-menu",5),s(),c(5,"div",6,0),v(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[gt,Mt],encapsulation:2}));let o=e;return o;})();function xr(o,e){if(o&1&&(c(0,"span",4),y(1),s()),o&2){let n=m();l(),Y(" ",n.getTotalTitle());}}function Yr(o,e){o&1&&(c(0,"div",6),g(1,0),s());}function Vr(o,e){o&1&&($(0),g(1,1),F());}function $r(o,e){if(o&1&&($(0),g(1,2),F()),o&2){let n=m().$implicit;l(),B(n.following.name),U(1);}}function Fr(o,e){if(o&1&&(c(0,"div",8),v(1,"my-actor-avatar",9),c(2,"div",10)(3,"a",11)(4,"div",12),y(5),s(),v(6,"my-global-icon",13),s(),c(7,"div",14),f(8,Vr,2,0,"ng-container")(9,$r,2,1,"ng-container"),s()()()),o&2){let n=e.$implicit,t=m();l(),u("actor",n.follower)("href",n.follower.url),l(2),u("href",n.follower.url,Ne),l(2),R(n.follower.name+"@"+n.follower.host),l(3),C(t.isFollowingAccount(n)?8:9);}}var Oo=(()=>{let e=class e{route=p(ht);auth=p(z);userSubscriptionService=p(It);notifier=p(w);follows=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new A();search;inputFilters;ngOnInit(){this.route.snapshot.queryParams.search&&(this.search=this.route.snapshot.queryParams.search);let t=this.auth.getUser().videoChannels.map(i=>({value:"channel:"+i.name,label:i.name}));this.inputFilters=[{title:"\u0641\u06CC\u0644\u062A\u0631\u0647\u0627\u06CC \u06A9\u0627\u0646\u0627\u0644",children:t}];}onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadFollowers());}onSearch(t){this.search=t,St(this.pagination),this.loadFollowers(!1);}isFollowingAccount(t){return t.following.name===this.getUsername();}getTotalTitle(){return st(""+this.pagination.totalItems+" {total, plural, =1 {follower} other {followers}}",{total:this.pagination.totalItems});}loadFollowers(t=!0){this.userSubscriptionService.listFollowers({pagination:this.pagination,nameWithHost:this.getUsername(),search:this.search}).subscribe({next:i=>{this.follows=t?this.follows.concat(i.data):i.data,this.pagination.totalItems=i.total,this.onDataSubject.next(i.data);},error:i=>this.notifier.handleError(i)});}getUsername(){return this.auth.getUser().username;}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:7,vars:4,consts:()=>{let t;t="\u0647\u06CC\u0686 \u062F\u0646\u0628\u0627\u0644\u200C\u06A9\u0646\u0646\u062F\u0647\u200C\u0627\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F.";let i;i="\u0635\u0641\u062D\u0647 \u062F\u0646\u0628\u0627\u0644\u200C\u06A9\u0646\u0646\u062F\u0647";let r;r="\u062A\u0645\u0627\u0645 \u06A9\u0627\u0646\u0627\u0644\u200C\u0647\u0627\u06CC \u0634\u0645\u0627 \u0631\u0627 \u062F\u0646\u0628\u0627\u0644 \u0645\u06CC \u06A9\u0646\u062F";let a;return a="\u06A9\u0627\u0646\u0627\u0644\u0647\u0627\u06CC \u0634\u0645\u0627 \u0631\u0627 \u062F\u0646\u0628\u0627\u0644  "+"\uFFFD0\uFFFD"+"\u0645\u06CC \u06A9\u0646\u062F",[t,r,a,[1,"followers-header","d-flex","justify-content-between","align-items-end","gap-2","flex-wrap"],[1,"total-items"],["emitOnInit","true",1,"d-block","ms-auto",3,"search","filters"],[1,"no-results"],["myInfiniteScroller","",1,"actors",3,"nearOfBottom","dataObservable"],[1,"actor"],["actorType","account","size","40",3,"actor","href"],[1,"actor-info"],["rel","noopener noreferrer","target","_blank","title",i,1,"actor-names",3,"href"],[1,"actor-display-name"],["iconName","external-link"],[1,"small","muted"]];},template:function(i,r){i&1&&(c(0,"div",3),f(1,xr,2,1,"span",4),c(2,"my-advanced-input-filter",5),E("search",function(d){return r.onSearch(d);}),s()(),f(3,Yr,2,0,"div",6),c(4,"div",7),E("nearOfBottom",function(){return r.onNearOfBottom();}),ne(5,Fr,10,5,"div",8,ze),s()),i&2&&(l(),C(r.pagination.totalItems?1:-1),l(),u("filters",r.inputFilters),l(),C(r.pagination.totalItems===0?3:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),oe(r.follows));},dependencies:[qe,fe,Je,Re],styles:[`.followers-header[_ngcontent-%COMP%]{margin-bottom:30px;display:flex}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:300px;max-width:300px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:340px){input[type=text][_ngcontent-%COMP%]{width:100%}}.actor[_ngcontent-%COMP%]{display:flex;min-height:auto;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]{flex-direction:column;height:auto;align-items:center}}.actor[_ngcontent-%COMP%] > my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.625rem}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{flex-grow:1}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{width:fit-content;display:flex;align-items:baseline;color:var(--fg)}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-display-name[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.actor[_ngcontent-%COMP%]   .actor-name[_ngcontent-%COMP%]{font-size:14px;color:var(--fg-300);margin-inline-start:.3125rem}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]{color:var(--fg);display:flex;align-items:center}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{opacity:.8}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{margin-inline-start:.3125rem}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{padding-bottom:10px;text-align:center}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{flex-direction:column;align-items:center!important;margin:auto}}
/*# sourceMappingURL=my-followers.component-G4H42FZN.css.map */`]}));let o=e;return o;})();var bo=o=>["/c",o],kr=o=>["/a",o],zr=o=>[o];function Br(o,e){if(o&1&&(c(0,"span",4),y(1),s()),o&2){let n=m();l(),Y(" ",n.getTotalTitle());}}function Ur(o,e){o&1&&(c(0,"div",6),g(1,0),s());}function Gr(o,e){if(o&1&&(c(0,"div",8),v(1,"my-actor-avatar",9),c(2,"div",10)(3,"a",11)(4,"div",12),y(5),s(),c(6,"div",13),y(7),s()(),c(8,"div",14),g(9,1),s(),c(10,"a",15)(11,"span"),g(12,2),s(),v(13,"my-actor-avatar",16),s()(),v(14,"my-subscribe-button",17),s()),o&2){let n=e.$implicit;l(),u("actor",n)("internalHref",k(10,bo,n.nameWithHost)),l(2),u("routerLink",k(12,bo,n.nameWithHost)),l(2),R(n.displayName),l(2),R(n.nameWithHost),l(2),B(n.followersCount),U(9),l(),u("routerLink",k(14,kr,n.ownerBy)),l(2),B(n.ownerBy),U(12),l(),u("actor",n.ownerAccount),l(),u("videoChannels",k(16,zr,n));}}var Ao=(()=>{let e=class e{userSubscriptionService=p(It);notifier=p(w);videoChannels=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new A();search;onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadSubscriptions());}onSearch(t){this.search=t,St(this.pagination),this.loadSubscriptions(!1);}getTotalTitle(){return st(""+this.pagination.totalItems+" {total, plural, =1 {subscription} other {subscriptions}}",{total:this.pagination.totalItems});}loadSubscriptions(t=!0){this.userSubscriptionService.listSubscriptions({pagination:this.pagination,search:this.search}).subscribe({next:i=>{this.videoChannels=t?this.videoChannels.concat(i.data):i.data,this.pagination.totalItems=i.total,this.onDataSubject.next(i.data);},error:i=>this.notifier.handleError(i)});}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:7,vars:3,consts:()=>{let t;t="\u0634\u0645\u0627 \u0647\u0646\u0648\u0632 \u0647\u06CC\u0686 \u0627\u0634\u062A\u0631\u0627\u06A9\u06CC \u0646\u062F\u0627\u0631\u06CC\u062F.";let i;i="\u0635\u0641\u062D\u0647 \u06A9\u0627\u0646\u0627\u0644";let r;r="\u0635\u0641\u062D\u0647 \u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u0645\u0627\u0644\u06A9";let a;a=""+"\uFFFD0\uFFFD"+" \u0645\u0634\u062A\u0631\u06A9 ";let d;return d="\u0627\u06CC\u062C\u0627\u062F \u0634\u062F\u0647 \u062A\u0648\u0633\u0637 "+"\uFFFD0\uFFFD"+"",[t,a,d,[1,"mb-4","d-flex","justify-content-between","align-items-end","gap-2","flex-wrap"],[1,"total-items"],["emitOnInit","true",1,"d-block","ms-auto",3,"search"],[1,"no-results"],["myInfiniteScroller","",1,"actors",3,"nearOfBottom","dataObservable"],[1,"actor"],["actorType","channel","size","80",3,"actor","internalHref"],[1,"actor-info"],["title",i,1,"actor-names",3,"routerLink"],[1,"actor-display-name"],[1,"actor-name"],[1,"actor-followers"],["title",r,1,"actor-owner",3,"routerLink"],["actorType","account","size","18",3,"actor"],[3,"videoChannels"]];},template:function(i,r){i&1&&(c(0,"div",3),f(1,Br,2,1,"span",4),c(2,"my-advanced-input-filter",5),E("search",function(d){return r.onSearch(d);}),s()(),f(3,Ur,2,0,"div",6),c(4,"div",7),E("nearOfBottom",function(){return r.onNearOfBottom();}),ne(5,Gr,15,18,"div",8,ze),s()),i&2&&(l(),C(r.pagination.totalItems?1:-1),l(2),C(r.pagination.totalItems===0?3:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),oe(r.videoChannels));},dependencies:[fe,Je,Re,te,go],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:300px;max-width:300px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:340px){input[type=text][_ngcontent-%COMP%]{width:100%}}.actor[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]{flex-direction:column;height:auto;align-items:center}}.actor[_ngcontent-%COMP%] > my-actor-avatar[_ngcontent-%COMP%]{margin-inline-end:.625rem}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{flex-grow:1}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{width:fit-content;display:flex;align-items:baseline;color:var(--fg)}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-display-name[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.actor[_ngcontent-%COMP%]   .actor-name[_ngcontent-%COMP%]{font-size:14px;color:var(--fg-300);margin-inline-start:.3125rem}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]{color:var(--fg);display:flex;align-items:center}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%], .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:hover, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus, .actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:active{text-decoration:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:hover{opacity:.8}.actor[_ngcontent-%COMP%]   .actor-owner[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{margin-inline-start:.3125rem}@media screen and (max-width:800px){.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]{padding-bottom:10px;text-align:center}.actor[_ngcontent-%COMP%]   .actor-info[_ngcontent-%COMP%]   .actor-names[_ngcontent-%COMP%]{flex-direction:column;align-items:center!important;margin:auto}}
/*# sourceMappingURL=my-subscriptions.component-VN5JYKPR.css.map */`]}));let o=e;return o;})();var Hr=o=>({$implicit:o});function Xr(o,e){if(o&1&&(c(0,"div",2),g(1,0),s()),o&2){let n=m();l(),B(n.noResultMessage()),U(1);}}function Wr(o,e){if(o&1){let n=N();c(0,"div",6)(1,"my-peertube-checkbox",8),ge("ngModelChange",function(i){P(n);let r=m().$implicit,a=m();return he(a.selection()[r.id],i)||(a.selection()[r.id]=i),I(i);}),s()();}if(o&2){let n=m().$implicit,t=m();l(),u("inputName","video-check-"+n.id),ue("ngModel",t.selection()[n.id]);}}function jr(o,e){o&1&&Gi(0);}function Qr(o,e){if(o&1&&K(0,jr,1,0,"ng-container",9),o&2){let n=m().$implicit,t=m();u("ngTemplateOutlet",t.rowButtonsTemplate)("ngTemplateOutletContext",k(2,Hr,n));}}function Zr(o,e){if(o&1&&(c(0,"div",4),f(1,Wr,2,2,"div",6),v(2,"my-video-miniature",7),f(3,Qr,1,4,"ng-container"),s()),o&2){let n=e.$implicit,t=m();l(),C(t.enableSelection()?1:-1),l(),u("video",n)("displayAsRow",!0)("displayOptions",t.miniatureDisplayOptions())("displayVideoActions",!1)("user",t.user()),l(),C(t.isInSelectionMode()===!1?3:-1);}}function qr(o,e){o&1&&Gi(0);}function Kr(o,e){if(o&1){let n=N();c(0,"div",5)(1,"button",10),E("click",function(){P(n);let i=m();return I(i.abortSelectionMode());}),g(2,1),s(),K(3,qr,1,0,"ng-container",11),s();}if(o&2){let n=m();l(3),u("ngTemplateOutlet",n.globalButtonsTemplate);}}var Lo=(()=>{let e=class e{notifier=p(w);user=X(void 0);pagination=X(void 0);titlePage=X(void 0);miniatureDisplayOptions=X(void 0);noResultMessage=X("\u0628\u062F\u0648\u0646 \u0646\u062A\u06CC\u062C\u0647.");enableSelection=X(!0);disabled=X(!1);getVideosObservableFunction=X(void 0);templates=In(Yt);selection=wt({});videos=wt([]);rowButtonsTemplate;globalButtonsTemplate;sort="-publishedAt";onDataSubject=new A();hasDoneFirstQuery=!1;lastQueryLength;ngAfterContentInit(){{let t=this.templates().find(i=>i.name()==="rowButtons");t&&(this.rowButtonsTemplate=t.template);}{let t=this.templates().find(i=>i.name()==="globalButtons");t&&(this.globalButtonsTemplate=t.template);}}getVideosObservable(t){return this.getVideosObservableFunction()(t,this.sort);}abortSelectionMode(){this.selection.update(()=>({}));}isInSelectionMode(){return wn(this.selection()).some(t=>this.selection()[t]===!0);}videoById(t,i){return i.id;}onNearOfBottom(){this.disabled()||this.lastQueryLength!==void 0&&this.lastQueryLength<this.pagination().itemsPerPage||(this.pagination().currentPage+=1,this.loadMoreVideos());}loadMoreVideos(t=!1){t&&(this.hasDoneFirstQuery=!1),this.getVideosObservable(this.pagination().currentPage).subscribe({next:({data:i})=>{this.hasDoneFirstQuery=!0,this.lastQueryLength=i.length,t&&this.videos.set([]),this.videos.update(r=>r.concat(i)),this.onDataSubject.next(i);},error:i=>{let r="Cannot load more videos. Please try again later.";xn.error(r,i),this.notifier.error(r);}});}reloadVideos(){St(this.pagination()),this.loadMoreVideos(!0);}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-videos-selection"]],contentQueries:function(i,r,a){i&1&&Mn(a,r.templates,Yt,4),i&2&&Q();},inputs:{user:[1,"user"],pagination:[1,"pagination"],titlePage:[1,"titlePage"],miniatureDisplayOptions:[1,"miniatureDisplayOptions"],noResultMessage:[1,"noResultMessage"],enableSelection:[1,"enableSelection"],disabled:[1,"disabled"],getVideosObservableFunction:[1,"getVideosObservableFunction"],selection:[1,"selection"],videos:[1,"videos"]},outputs:{selection:"selectionChange",videos:"videosChange"},decls:5,vars:3,consts:()=>{let t;t="\n          "+"\uFFFD0\uFFFD"+"\n        ";let i;return i="\u0644\u063A\u0648",[t,i,[1,"no-results"],["myInfiniteScroller","",1,"videos",3,"nearOfBottom","dataObservable"],[1,"video"],[1,"action-selection-mode"],[1,"checkbox-container"],[3,"video","displayAsRow","displayOptions","displayVideoActions","user"],[3,"ngModelChange","inputName","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cancel-selection","peertube-button","secondary-button","me-2",3,"click"],[4,"ngTemplateOutlet"]];},template:function(i,r){i&1&&(f(0,Xr,2,1,"div",2),c(1,"div",3),E("nearOfBottom",function(){return r.onNearOfBottom();}),ne(2,Zr,4,7,"div",4,r.videoById,!0),s(),f(4,Kr,4,1,"div",5)),i&2&&(C(r.hasDoneFirstQuery&&r.videos().length===0?0:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),oe(r.videos()),l(2),C(r.isInSelectionMode()===!0?4:-1));},dependencies:[Je,et,W,q,Te,oo,Rn],styles:[`.action-selection-mode[_ngcontent-%COMP%]{position:fixed;bottom:1rem}@supports (inset-inline-end: var(--x-margin-content)){.action-selection-mode[_ngcontent-%COMP%]{inset-inline-end:var(--x-margin-content)}}@supports not (inset-inline-end: var(--x-margin-content)){.action-selection-mode[_ngcontent-%COMP%]{right:var(--x-margin-content)}}.action-selection-mode[_ngcontent-%COMP%]   .action-button[_ngcontent-%COMP%]{display:block;margin-inline-start:calc(1.46875rem + 2.625vw)}@media(min-width:1200px){.action-selection-mode[_ngcontent-%COMP%]   .action-button[_ngcontent-%COMP%]{margin-inline-start:3.4375rem}}.video[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{min-height:initial;padding-bottom:.5rem;margin-bottom:.5rem}}.video[_ngcontent-%COMP%]:first-child{margin-top:47px}.video[_ngcontent-%COMP%]   .checkbox-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-inline-end:1.25rem;margin-inline-start:.75rem}.video[_ngcontent-%COMP%]   my-video-miniature[_ngcontent-%COMP%]{flex-grow:1;max-width:100%}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{flex-wrap:wrap}.checkbox-container[_ngcontent-%COMP%], .action-selection-mode[_ngcontent-%COMP%]{display:none!important}}
/*# sourceMappingURL=videos-selection.component-FWXCYWF2.css.map */`]}));let o=e;return o;})();var Jr=["videosSelection"];function ea(o,e){if(o&1){let n=N();c(0,"div",12)(1,"my-delete-button",13),E("click",function(){let i=P(n).$implicit,r=m();return I(r.deleteHistoryElement(i));}),s()();}}var No=(()=>{let e=class e{authService=p(z);userService=p(ci);notifier=p(w);confirmService=p(Ze);userHistoryService=p(fo);destroyRef=p(Fi);videosSelection=Z("videosSelection");titlePage;pagination={currentPage:1,itemsPerPage:5,totalItems:null};videosHistoryEnabled;miniatureDisplayOptions={date:!0,views:!0,by:!0,privacyLabel:!1};getVideosObservableFunction=this.getVideosObservable.bind(this);user;videos=[];search;disabled=!1;constructor(){this.titlePage="\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0645\u0646";}ngOnInit(){this.user=this.authService.getUser(),this.authService.userInformationLoaded.pipe(Fn(this.destroyRef)).subscribe(()=>this.videosHistoryEnabled=this.user.videosHistoryEnabled);}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}reloadData(){this.videosSelection().reloadVideos();}onSearch(t){this.search=t,this.reloadData();}getVideosObservable(t){let i=$n(this.pagination,{currentPage:t});return this.userHistoryService.list(i,this.search).pipe($e(r=>this.pagination.totalItems=r.total));}generateSyndicationList(){throw new Error("Method not implemented.");}onVideosHistoryChange(){this.userService.updateMyProfile({videosHistoryEnabled:this.videosHistoryEnabled}).subscribe({next:()=>{let t=this.videosHistoryEnabled===!0?"\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0648\u06CC\u062F\u0626\u0648 \u0641\u0639\u0627\u0644 \u0627\u0633\u062A":"\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0648\u06CC\u062F\u0626\u0648 \u063A\u06CC\u0631\u0641\u0639\u0627\u0644 \u0627\u0633\u062A";this.notifier.success(t),this.authService.refreshUserInformation();},error:t=>this.notifier.handleError(t)});}deleteHistoryElement(t){this.userHistoryService.deleteElement(t).subscribe({next:()=>{this.videos=this.videos.filter(i=>i.id!==t.id),si(this.pagination);},error:i=>this.notifier.handleError(i)});}clearAllHistory(){return Ye(this,null,function*(){let t="\u062D\u0630\u0641 \u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0648\u06CC\u062F\u0626\u0648",i="\u0622\u06CC\u0627 \u0627\u0632 \u062D\u0630\u0641 \u062A\u0645\u0627\u0645 \u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0648\u06CC\u062F\u0626\u0648\u06CC \u062E\u0648\u062F \u0627\u0637\u0645\u06CC\u0646\u0627\u0646 \u062F\u0627\u0631\u06CC\u062F\u061F";(yield this.confirmService.confirm(i,t))===!0&&this.userHistoryService.clearAll().subscribe({next:()=>{this.notifier.success("\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0648\u06CC\u062F\u0626\u0648 \u062D\u0630\u0641 \u0634\u062F"),this.reloadData();},error:a=>this.notifier.handleError(a)});});}getNoResultMessage(){return this.search?"\u0647\u06CC\u0686 \u0648\u06CC\u062F\u0626\u0648\u06CC\u06CC \u0628\u0631\u0627\u0633\u0627\u0633 \""+this.search+"\" \u06CC\u0627\u0641\u062A \u0646\u0634\u062F.":"\u0634\u0645\u0627 \u0633\u0627\u0628\u0642\u0647 \u0645\u0634\u0627\u0647\u062F\u0647 \u0647\u06CC\u0686 \u0648\u06CC\u062F\u0626\u0648\u06CC\u06CC \u0631\u0627 \u0646\u062F\u0627\u0631\u06CC\u062F.";}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.videosSelection,Jr,5),i&2&&Q();},decls:12,vars:10,consts:()=>{let t;t="\u0631\u0647\u06AF\u06CC\u0631\u06CC \u0633\u0648\u0627\u0628\u0642 \u0645\u0634\u0627\u0647\u062F\u0647";let i;i="Clear all history";let r;return r="\u062D\u0630\u0641 \u0627\u0632 \u062A\u0627\u0631\u06CC\u062E\u0686\u0647",[["videosSelection",""],t,i,[1,"top-buttons"],[1,"search-wrapper"],["emitOnInit","true",3,"search"],[1,"history-switch"],["inputName","track-watch-history",3,"ngModelChange","ngModel"],["for","track-watch-history"],["icon","delete",3,"click"],[3,"videosChange","pagination","videos","miniatureDisplayOptions","titlePage","getVideosObservableFunction","user","noResultMessage","enableSelection","disabled"],["ptTemplate","rowButtons"],[1,"action-button"],["label",r,3,"click"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",3)(1,"div",4)(2,"my-advanced-input-filter",5),E("search",function(_){return P(a),I(r.onSearch(_));}),s()(),c(3,"div",6)(4,"my-input-switch",7),ge("ngModelChange",function(_){return P(a),he(r.videosHistoryEnabled,_)||(r.videosHistoryEnabled=_),I(_);}),E("ngModelChange",function(){return P(a),I(r.onVideosHistoryChange());}),s(),c(5,"label",8),g(6,1),s()(),c(7,"my-button",9),E("click",function(){return P(a),I(r.clearAllHistory());}),g(8,2),s()(),c(9,"my-videos-selection",10,0),ge("videosChange",function(_){return P(a),he(r.videos,_)||(r.videos=_),I(_);}),K(11,ea,2,0,"ng-template",11),s();}i&2&&(l(4),ue("ngModel",r.videosHistoryEnabled),l(5),u("pagination",r.pagination),ue("videos",r.videos),u("miniatureDisplayOptions",r.miniatureDisplayOptions)("titlePage",r.titlePage)("getVideosObservableFunction",r.getVideosObservableFunction)("user",r.user)("noResultMessage",r.getNoResultMessage())("enableSelection",!1)("disabled",r.disabled));},dependencies:[Ke,fe,uo,W,q,Te,Lo,Yt,gi],styles:[`.no-history[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-top:50px;font-weight:600}.top-buttons[_ngcontent-%COMP%]{margin-bottom:30px;display:grid;grid-template-columns:250px 1fr auto auto;align-items:center}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{grid-column:1}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:250px;max-width:250px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[readonly][_ngcontent-%COMP%]{color:var(--fg-300)}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus, .top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:290px){.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:100%}}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]{grid-column:3;display:flex;align-items:center;margin-inline-start:auto;margin-inline-end:.9375rem}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{margin:0 0 0 5px;color:var(--fg-400);font-weight:600}.top-buttons[_ngcontent-%COMP%]   .delete-history[_ngcontent-%COMP%]{grid-column:4}.video[_ngcontent-%COMP%]{display:flex;min-height:130px;padding-bottom:1.25rem;margin-bottom:1.25rem;border-bottom:1px solid var(--input-border-color)}@media screen and (max-width:800px){.video[_ngcontent-%COMP%]{min-height:initial;padding-bottom:.5rem;margin-bottom:.5rem}}.action-button[_ngcontent-%COMP%]{display:flex;align-self:flex-end}@media screen and (max-width:800px){.top-buttons[_ngcontent-%COMP%]{grid-template-columns:auto 1fr auto;row-gap:20px}.top-buttons[_ngcontent-%COMP%]   .history-switch[_ngcontent-%COMP%]{grid-row:1;grid-column:1;margin:0}.top-buttons[_ngcontent-%COMP%]   .delete-history[_ngcontent-%COMP%]{grid-row:1;grid-column:3}.top-buttons[_ngcontent-%COMP%]   .search-wrapper[_ngcontent-%COMP%]{grid-column:1/4}}
/*# sourceMappingURL=my-history.component-4U73CBX6.css.map */`]}));let o=e;return o;})();var Do=(()=>{let e=class e{menuEntries=[];ngOnInit(){this.buildMenu();}buildMenu(){this.menuEntries=[{label:"\u0641\u0647\u0631\u0633\u062A\u200C\u0647\u0627\u06CC \u067E\u062E\u0634",routerLink:"/my-library/video-playlists"},{label:"\u0627\u0634\u062A\u0631\u0627\u06A9\u200C\u0647\u0627",routerLink:"/my-library/subscriptions"},{label:"\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0645\u0634\u0627\u0647\u062F\u0647",routerLink:"/my-library/history/videos"}];}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let t;t="\u06A9\u062A\u0627\u0628\u062E\u0627\u0646\u0647 \u0645\u0646";let i;return i="Skip the sub menu",[["myLibraryContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-library-content-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1",t,3,"menuEntries"],["tabindex","-1","id","my-library-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",2)(1,"div",3)(2,"a",4),E("click",function(_){P(a);let S=j(6);return _.preventDefault(),I(S.focus());}),g(3,1),s(),v(4,"my-horizontal-menu",5),s(),c(5,"div",6,0),v(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[gt,Mt],encapsulation:2}));let o=e;return o;})();var ta=["modal"];function ia(o,e){if(o&1&&(c(0,"div",11),y(1),s()),o&2){let n=m(2);l(),R(n.formErrors.channel);}}function na(o,e){if(o&1){let n=N();c(0,"div",3)(1,"h1",4),g(2,1),s(),c(3,"button",5),E("click",function(){let i=P(n).dismiss;return I(i());}),v(4,"my-global-icon",6),s()(),c(5,"div",7)(6,"div",8)(7,"label",9),g(8,2),s(),v(9,"my-select-channel",10),f(10,ia,2,1,"div",11),s()(),c(11,"div",12)(12,"div",13)(13,"input",14),E("click",function(){let i=P(n).dismiss;return I(i());})("key.enter",function(){let i=P(n).dismiss;return I(i());}),s(),c(14,"input",15),E("click",function(){let i=P(n).close;return I(i());}),s()()();}if(o&2){let n=m();l(5),u("formGroup",n.form),l(4),u("items",n.videoChannels),l(),C(n.formErrors.channel?10:-1);}}var wo=(()=>{let e=class e extends Pt{formReactiveService=p(je);videoOwnershipService=p(Ri);notifier=p(w);authService=p(z);modalService=p(ai);accepted=Pn();modal=Z("modal");videoChangeOwnership=void 0;videoChannels;error=null;ngOnInit(){this.videoChannels=[],Qe(this.authService,{includeCollaborations:!1}).subscribe(t=>this.videoChannels=t),this.buildForm({channel:Co});}show(t){this.form.patchValue({channel:this.videoChannels[0].id}),this.videoChangeOwnership=t,this.modalService.open(this.modal(),{centered:!0}).result.then(()=>this.acceptOwnership()).catch(()=>{this.videoChangeOwnership=void 0;});}acceptOwnership(){let t=this.form.value.channel,i=this.videoChangeOwnership;this.videoOwnershipService.acceptOwnership(i.id,{channelId:t}).subscribe({next:()=>{this.notifier.success("\u0645\u0627\u0644\u06A9\u06CC\u062A \u067E\u0630\u06CC\u0631\u0641\u062A\u0647 \u0634\u062F"),this.accepted&&this.accepted.emit(),this.videoChangeOwnership=void 0;},error:r=>this.notifier.handleError(r)});}};h(e,"\u0275fac",(()=>{let t;return function(r){return(t||(t=ke(e)))(r||e);};})()),h(e,"\u0275cmp",T({type:e,selectors:[["my-accept-ownership"]],viewQuery:function(i,r){i&1&&J(r.modal,ta,5),i&2&&Q();},outputs:{accepted:"accepted"},features:[De],decls:2,vars:0,consts:()=>{let t;t="Close this modal";let i;i="\u0644\u063A\u0648";let r;r="\u067E\u0630\u06CC\u0631\u0641\u062A\u0646";let a;a="\u067E\u0630\u06CC\u0631\u0634 \u0645\u0627\u0644\u06A9\u06CC\u062A";let d;return d="\u0627\u0646\u062A\u062E\u0627\u0628 \u06CC\u06A9 \u06A9\u0627\u0646\u0627\u0644 \u0628\u0631\u0627\u06CC \u062F\u0631\u06CC\u0627\u0641\u062A \u0648\u06CC\u062F\u0626\u0648",[["modal",""],a,d,[1,"modal-header"],[1,"modal-title"],["title",t,1,"border-0","p-0",3,"click"],["iconName","cross"],[1,"modal-body",3,"formGroup"],[1,"form-group"],["for","channel"],["inputId","channel","formControlName","channel",1,"d-block",3,"items"],["role","alert",1,"form-error"],[1,"modal-footer","inputs"],[1,"inputs"],["type","button","role","button","value",i,1,"peertube-button","secondary-button",3,"click","key.enter"],["type","submit","value",r,1,"peertube-button","primary-button",3,"click"]];},template:function(i,r){i&1&&K(0,na,15,3,"ng-template",null,0,D);},dependencies:[qe,W,q,Ge,We,Xe,He,tt],styles:[`.peertube-select-container[_ngcontent-%COMP%]{width:350px}@media screen and (max-width:380px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}
/*# sourceMappingURL=my-accept-ownership.component-DYYBUNAG.css.map */`]}));let o=e;return o;})();var oa=["myAcceptOwnershipComponent"],ra=["table"];function aa(o,e){if(o&1&&($(0),g(1,6),H(2,"myNumberFormatter"),F()),o&2){let n=e.$implicit;l(2),B(n)(ce(2,2,n)),U(1);}}function sa(o,e){if(o&1&&(c(0,"td")(1,"a",10)(2,"div",11),v(3,"my-actor-avatar",12),c(4,"div"),y(5),c(6,"span",13),y(7),s()()()()(),c(8,"td"),v(9,"my-video-cell",14),s(),c(10,"td"),y(11),H(12,"ptDate"),s(),c(13,"td")(14,"span",15),y(15),s()()),o&2){let n=e.$implicit,t=m();l(),u("href",n.initiatorAccount.url,Ne),l(2),u("actor",n.initiatorAccount),l(2),Y(" ",n.initiatorAccount.displayName," "),l(2),R(n.initiatorAccount.nameWithHost),l(2),u("video",n.video),l(2),R(ve(12,8,n.createdAt,"short")),l(3),u("ngClass",t.getStatusClass(n.status)),l(),R(n.status);}}function la(o,e){if(o&1){let n=N();c(0,"my-button",16),E("click",function(){P(n);let i=m().$implicit,r=m();return I(r.openAcceptModal(i));}),s(),c(1,"my-button",17),E("click",function(){P(n);let i=m().$implicit,r=m();return I(r.refuse(i));}),s();}}function ca(o,e){if(o&1&&f(0,la,2,0),o&2){let n=e.$implicit;C(n.status==="WAITING"?0:-1);}}function da(o,e){o&1&&($(0),g(1,7),F());}var xo=(()=>{let e=class e{notifier=p(w);videoOwnershipService=p(Ri);myAccountAcceptOwnershipComponent=Z("myAcceptOwnershipComponent");table=Z("table");columns=[{id:"initiator",label:"\u0634\u0631\u0648\u0639\u200C\u06A9\u0646\u0646\u062F\u0647",sortable:!1},{id:"video",label:"\u0648\u06CC\u062F\u0626\u0648",sortable:!1},{id:"createdAt",label:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u062C\u0627\u062F",sortable:!0},{id:"status",label:"\u0648\u0636\u0639\u06CC\u062A",sortable:!1}];dataLoader;constructor(){this.dataLoader=this._dataLoader.bind(this);}getStatusClass(t){switch(t){case Wi.ACCEPTED:return"badge-green";case Wi.REFUSED:return"badge-red";default:return"badge-yellow";}}openAcceptModal(t){this.myAccountAcceptOwnershipComponent().show(t);}accepted(){this.table().loadData();}refuse(t){this.videoOwnershipService.refuseOwnership(t.id).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}_dataLoader(t){return this.videoOwnershipService.getOwnershipChanges(t.pagination,t.sort).pipe(lt(i=>({data:i.data.map(r=>se(ie({},r),{initiatorAccount:new Qi(r.initiatorAccount),nextOwnerAccount:new Qi(r.nextOwnerAccount)})),total:i.total})));}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.myAccountAcceptOwnershipComponent,oa,5)(r.table,ra,5),i&2&&Q(2);},decls:12,vars:2,consts:()=>{let t;t="entries per page";let i;i="{VAR_PLURAL, plural, =0 {No entry} =1 {1 entry} other {{INTERPOLATION} entries}}",i=le(i,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let r;r="\u0628\u0627\u0632 \u0646\u0645\u0648\u062F\u0646 \u062D\u0633\u0627\u0628 \u06A9\u0627\u0631\u0628\u0631\u06CC \u062F\u0631 \u06CC\u06A9 \u0628\u0631\u06AF\u0647 \u062C\u062F\u06CC\u062F";let a;a="\u067E\u0630\u06CC\u0631\u0641\u062A\u0646";let d;d="\u0631\u062F \u06A9\u0631\u062F\u0646";let _;return _="\u062F\u0631\u062E\u0648\u0627\u0633\u062A\u06CC \u0628\u0631\u0627\u06CC \u062A\u063A\u06CC\u06CC\u0631 \u0645\u0627\u0644\u06A9\u06CC\u062A \u06CC\u0627\u0641\u062A \u0646\u0634\u062F.",[["table",""],["totalTitle",""],["tableCells",""],["actionCell",""],["noResults",""],["myAcceptOwnershipComponent",""],i,_,["key","MyOwnershipComponent","paginatorText",t,"columnConfig","false",3,"defaultColumns","dataLoader"],[3,"accepted"],["title",r,"target","_blank","rel","noopener noreferrer",3,"href"],[1,"chip","two-lines"],["actorType","account","size","32",3,"actor"],[1,"muted"],["size","small",3,"video"],[1,"pt-badge",3,"ngClass"],["title",a,"icon","tick",3,"click"],["title",d,"icon","cross",3,"click"]];},template:function(i,r){if(i&1){let a=N();c(0,"my-table",8,0),K(2,aa,3,4,"ng-template",null,1,D)(4,sa,16,11,"ng-template",null,2,D)(6,ca,1,1,"ng-template",null,3,D)(8,da,2,0,"ng-template",null,4,D),s(),c(10,"my-accept-ownership",9,5),E("accepted",function(){return P(a),I(r.accepted());}),s();}i&2&&u("defaultColumns",r.columns)("dataLoader",r.dataLoader);},dependencies:[de,ee,Ke,Re,wo,Ii,Le,Ae,be],encapsulation:2}));let o=e;return o;})();function _a(o,e){if(o&1&&v(0,"my-actor-avatar",2),o&2){let n=m();u("actor",n.actor())("actorType",n.actorType());}}function pa(o,e){if(o&1&&(c(0,"span",5),y(1),s()),o&2){let n=m();l(),R(n.actor().name);}}function ma(o,e){o&1&&v(0,"my-collaborator-state",6);}function ua(o,e){o&1&&v(0,"my-collaborator-state",7);}var Ai=(()=>{let e=class e{authService=p(z);actor=X.required();actorType=X.required();displayAvatar=X(!0,{transform:Ie});displayUsername=X(!0,{transform:Ie});routerLink;linkTitle;ngOnInit(){this.actorType()==="channel"?(this.routerLink=["/c",this.actor().name],this.linkTitle="Go to the channel page of "+this.actor().displayName+""):(this.routerLink=["/a",this.actor().name],this.linkTitle="Go to the account page of "+this.actor().displayName+"");}isEditorOfChannel(){if(this.actorType()!=="channel")return!1;let t=this.authService.getUser();return t.isCollaboratingToChannels()&&t.isEditorOfChannel(this.actor());}isOwnerOfChannel(){if(this.actorType()!=="channel")return!1;let t=this.authService.getUser();return t.isCollaboratingToChannels()&&t.isOwnerOfChannel(this.actor());}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-actor-cell"]],inputs:{actor:[1,"actor"],actorType:[1,"actorType"],displayAvatar:[1,"displayAvatar"],displayUsername:[1,"displayUsername"]},decls:9,vars:6,consts:[[3,"routerLink","title"],[1,"chip","two-lines"],["size","32",3,"actor","actorType"],[1,"information"],[1,"fw-semibold"],[1,"muted"],["type","accepted","small","true",1,"ms-2"],["type","owner","small","true",1,"ms-2"]],template:function(i,r){i&1&&(c(0,"a",0)(1,"div",1),f(2,_a,1,2,"my-actor-avatar",2),c(3,"div",3)(4,"span",4),y(5),s(),f(6,pa,2,1,"span",5),s(),f(7,ma,1,0,"my-collaborator-state",6)(8,ua,1,0,"my-collaborator-state",7),s()()),i&2&&(u("routerLink",r.routerLink)("title",r.linkTitle),l(2),C(r.displayAvatar()?2:-1),l(3),R(r.actor().displayName),l(),C(r.displayUsername()?6:-1),l(),C(r.isEditorOfChannel()?7:r.isOwnerOfChannel()?8:-1));},dependencies:[An,te,vt,Re],styles:[`a[_ngcontent-%COMP%]:hover{opacity:1}a[_ngcontent-%COMP%]:hover   .information[_ngcontent-%COMP%]{opacity:.8}
/*# sourceMappingURL=actor-cell.component-PPYSRTR3.css.map */`]}));let o=e;return o;})();var ha=["table"];function ga(o,e){o&1&&(c(0,"div")(1,"p",11),g(2,6),s()());}function fa(o,e){if(o&1&&($(0),g(1,7),H(2,"myNumberFormatter"),F()),o&2){let n=e.$implicit;l(2),B(n)(ce(2,2,n)),U(1);}}function Ca(o,e){if(o&1&&(c(0,"a",12),v(1,"my-global-icon",13),$(2),g(3,8),F(),s()),o&2){let n=m();u("routerLink",Be(n.getSyncCreateLink()));}}function Sa(o,e){if(o&1&&(c(0,"td")(1,"a",14),y(2),s()(),c(3,"td"),v(4,"my-actor-cell",15),s(),c(5,"td")(6,"span",16),y(7),s()(),c(8,"td"),y(9),H(10,"ptDate"),s(),c(11,"td"),y(12),H(13,"ptDate"),s()),o&2){let n=e.$implicit,t=m();l(),u("href",n.externalChannelUrl,Ne),l(),R(n.externalChannelUrl),l(2),u("actor",n.channel),l(2),u("ngClass",t.getSyncStateClass(n.state.id)),l(),Y(" ",n.state.label," "),l(2),R(ve(10,7,n.createdAt,"short")),l(3),R(ve(13,10,n.lastSyncAt,"short"));}}function va(o,e){if(o&1&&v(0,"my-action-dropdown",17),o&2){let n=e.$implicit,t=m();u("actions",t.videoChannelSyncActions)("entry",n);}}function ya(o,e){o&1&&($(0),g(1,9),F());}var nt=class nt{videoChannelsSyncService=p(Oi);serverService=p(pe);notifier=p(w);authService=p(z);videoChannelService=p(pi);table=Z("table");videoChannelSyncActions=[];serverConfig;columns=[{id:"externalChannelUrl",label:"External Channel",sortable:!0},{id:"videoChannel",label:"\u06A9\u0627\u0646\u0627\u0644",sortable:!0},{id:"state",label:"\u0648\u0636\u0639\u06CC\u062A",sortable:!0},{id:"createdAt",label:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u062C\u0627\u062F",sortable:!0},{id:"lastSyncAt",label:"Last synchronization at",sortable:!0}];dataLoader;get user(){return this.authService.getUser();}constructor(){this.dataLoader=this._dataLoader.bind(this);}ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.videoChannelSyncActions=[[{label:"\u0641\u0647\u0631\u0633\u062A \u0643\u0631\u062F\u0646 \u0648\u0627\u0631\u062F\u0634\u062F\u0647\u200C\u0647\u0627",linkBuilder:()=>["/my-library/video-imports"],queryParamsBuilder:e=>({search:`videoChannelSyncId:${e.id}`}),iconName:"cloud-download"}],[{label:"\u062D\u0630\u0641",iconName:"delete",handler:e=>this.deleteSync(e)},{label:"\u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC \u06A9\u0627\u0645\u0644 \u06A9\u0627\u0646\u0627\u0644",description:"\u0628\u0627\u0639\u062B \u062F\u0631\u06CC\u0627\u0641\u062A \u062A\u0645\u0627\u0645 \u0648\u06CC\u062F\u0626\u0648\u0647\u0627\u06CC\u06CC \u06A9\u0647 \u062F\u0631 \u06A9\u0627\u0646\u0627\u0644 \u0645\u062D\u0644\u06CC \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F \u0645\u06CC\u200C\u06AF\u0631\u062F\u062F",iconName:"refresh",handler:e=>this.fullySynchronize(e)}]];}_dataLoader(e){return this.authService.userInformationLoaded.pipe(Wt(),Ut(()=>this.videoChannelsSyncService.listByAccount({sort:e.sort,pagination:e.pagination,includeCollaborations:!0,account:this.authService.getUser().account})));}syncEnabled(){return this.serverConfig.import.videoChannelSynchronization.enabled;}deleteSync(e){this.videoChannelsSyncService.delete(e.id).subscribe({next:()=>{this.notifier.success("\u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC \u06A9\u0627\u0646\u0627\u0644 "+e.channel.displayName+" \u0628\u0627\u0645\u0648\u0641\u0642\u06CC\u062A \u062D\u0630\u0641 \u0634\u062F."),this.table().loadData();},error:n=>this.notifier.handleError(n)});}fullySynchronize(e){this.videoChannelService.importVideos(e.channel.name,e.externalChannelUrl,e.id).subscribe({next:()=>{this.notifier.success("\u062F\u0631\u062E\u0648\u0627\u0633\u062A \u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC \u06A9\u0627\u0645\u0644 \u06A9\u0627\u0646\u0627\u0644 "+e.channel.displayName+" \u0628\u0627\u0645\u0648\u0641\u0642\u06CC\u062A \u0627\u0631\u0633\u0627\u0644 \u0634\u062F.");},error:n=>this.notifier.handleError(n)});}getSyncCreateLink(){return"/my-library/video-channel-syncs/create";}getSyncStateClass(e){return["pt-badge",nt.STATE_CLASS_BY_ID[e]];}getChannelUrl(e){return"/c/"+e;}};h(nt,"STATE_CLASS_BY_ID",{[xt.FAILED]:"badge-red",[xt.PROCESSING]:"badge-blue",[xt.SYNCED]:"badge-green",[xt.WAITING_FIRST_RUN]:"badge-yellow"}),h(nt,"\u0275fac",function(n){return new(n||nt)();}),h(nt,"\u0275cmp",T({type:nt,selectors:[["ng-component"]],viewQuery:function(n,t){n&1&&J(t.table,ha,5),n&2&&Q();},decls:13,vars:3,consts:()=>{let e;e="syncs per page";let n;n="\u26A0\uFE0F \u0627\u064A\u0646 \u0633\u0627\u064A\u062A \u0627\u062C\u0627\u0632\u0647 \u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u064A \u0643\u0627\u0646\u0627\u0644 \u0631\u0627 \u0646\u0645\u064A\u062F\u0647\u062F";let t;t="{VAR_PLURAL, plural, =0 {No sync} =1 {1 sync} other {{INTERPOLATION} syncs}}",t=le(t,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i="\u0627\u0641\u0632\u0648\u062F\u0646 \u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u064A";let r;return r="You don't have channel synchronisation configured.",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["noResults",""],n,t,i,r,["key","MyVideoChannelsSyncComponent","paginatorText",e,"columnConfig","false",3,"defaultColumns","dataLoader"],[1,"muted"],[1,"peertube-create-button",3,"routerLink"],["iconName","add","aria-hidden","true"],["target","_blank","rel","noopener noreferrer",3,"href"],["actorType","channel",3,"actor"],[3,"ngClass"],["container","body",3,"actions","entry"]];},template:function(n,t){n&1&&(f(0,ga,3,0,"div"),c(1,"my-table",10,0),K(3,fa,3,4,"ng-template",null,1,D)(5,Ca,4,2,"ng-template",null,2,D)(7,Sa,14,13,"ng-template",null,3,D)(9,va,1,2,"ng-template",null,4,D)(11,ya,2,0,"ng-template",null,5,D),s()),n&2&&(C(t.syncEnabled()?-1:0),l(),u("defaultColumns",t.columns)("dataLoader",t.dataLoader));},dependencies:[de,ee,qe,te,Et,Le,Ai,Ae,be],encapsulation:2}));var Li=nt;var Ma=o=>({"input-error":o});function Ea(o,e){if(o&1&&(c(0,"my-alert",6),y(1),s()),o&2){let n=m();l(),R(n.error);}}function Pa(o,e){if(o&1&&(c(0,"div",15),y(1),s()),o&2){let n=m();l(),R(n.formErrors.externalChannelUrl);}}function Ia(o,e){if(o&1&&(c(0,"div",15),y(1),s()),o&2){let n=m();l(),R(n.formErrors.videoChannel);}}var Yo=(()=>{let e=class e extends Pt{formReactiveService=p(je);authService=p(z);router=p(Ue);notifier=p(w);videoChannelSyncService=p(Oi);videoChannelService=p(pi);error;userVideoChannels=[];existingVideosStrategy;ngOnInit(){this.buildForm({externalChannelUrl:So,videoChannel:Ji,existingVideoStrategy:Ji}),Qe(this.authService,{includeCollaborations:!0}).subscribe(t=>this.userVideoChannels=t);}getFormButtonTitle(){return"\u0627\u06CC\u062C\u0627\u062F";}formValidated(){this.error=void 0;let t=this.form.value,i={externalChannelUrl:t.externalChannelUrl,videoChannelId:t.videoChannel},r=t.existingVideoStrategy==="import";this.videoChannelSyncService.create(i).pipe(Ut(({videoChannelSync:a})=>r?this.videoChannelService.importVideos(a.channel.name,a.externalChannelUrl,a.id):Promise.resolve(null))).subscribe({next:()=>{this.notifier.success("\u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u0627\u06CC\u062C\u0627\u062F \u0634\u062F."),this.router.navigate(["/my-library","video-channel-syncs"]);},error:a=>{this.error=a.message;}});}};h(e,"\u0275fac",(()=>{let t;return function(r){return(t||(t=ke(e)))(r||e);};})()),h(e,"\u0275cmp",T({type:e,selectors:[["my-video-channel-sync-edit"]],features:[De],decls:30,vars:11,consts:()=>{let t;t="\u0628\u0639\u0646\u0648\u0627\u0646 \u0645\u062B\u0627\u0644: https://youtube.com/channel/UC_fancy_channel";let i;i="\u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u064A \u062C\u062F\u064A\u062F";let r;r="\u0644\u06CC\u0646\u06A9 \u06A9\u0627\u0646\u0627\u0644 \u0631\u0627\u0647\u200C\u062F\u0648\u0631";let a;a="Video channel";let d;d="\u06AF\u0632\u06CC\u0646\u0647\u200C\u0647\u0627 \u0628\u0631\u0627\u06CC \u0648\u06CC\u062F\u0626\u0648\u0647\u0627\u06CC \u0645\u0648\u062C\u0648\u062F \u062F\u0631 \u06A9\u0627\u0646\u0627\u0644 \u0631\u0627\u0647\u200C\u062F\u0648\u0631:";let _;_="\u0648\u0627\u0631\u062F \u0646\u0645\u0648\u062F\u0646 \u0647\u0645\u0647 \u0648 \u0627\u0646\u062A\u0638\u0627\u0631 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0634\u0627\u0631 \u0648\u06CC\u062F\u0626\u0648\u0647\u0627\u06CC \u062C\u062F\u06CC\u062F";let S;return S="\u0641\u0642\u0637 \u0627\u0646\u062A\u0638\u0627\u0631 \u0628\u0631\u0627\u06CC \u0627\u0646\u062A\u0634\u0627\u0631 \u0648\u06CC\u062F\u0626\u0648\u0647\u0627\u06CC \u062C\u062F\u06CC\u062F",[i,r,a,d,_,S,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","externalChannelUrl"],[1,"input-group"],["type","text","id","externalChannelUrl","placeholder",t,"formControlName","externalChannelUrl",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","videoChannel"],["inputId","videoChannel","formControlName","videoChannel",3,"items"],["role","radiogroup",1,"form-group"],["for","existingVideoStrategy"],[1,"peertube-radio-container"],["type","radio","name","existingVideoStrategy","id","import","value","import","formControlName","existingVideoStrategy"],["for","import"],["type","radio","name","existingVideoStrategy","id","doNothing","value","nothing","formControlName","existingVideoStrategy"],["for","doNothing"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"]];},template:function(i,r){i&1&&(f(0,Ea,2,1,"my-alert",6),c(1,"div",7)(2,"div",8)(3,"h2"),g(4,0),s()(),c(5,"div",9)(6,"form",10),E("ngSubmit",function(){return r.formValidated();}),c(7,"div",11)(8,"label",12),g(9,1),s(),c(10,"div",13),v(11,"input",14),s(),f(12,Pa,2,1,"div",15),s(),c(13,"div",11)(14,"label",16),g(15,2),s(),v(16,"my-select-channel",17),f(17,Ia,2,1,"div",15),s(),c(18,"div",18)(19,"label",19),g(20,3),s(),c(21,"div",20),v(22,"input",21),c(23,"label",22),g(24,4),s()(),c(25,"div",20),v(26,"input",23),c(27,"label",24),g(28,5),s()()(),v(29,"input",25),s()()()),i&2&&(C(r.error?0:-1),l(6),u("formGroup",r.form),l(5),u("ngClass",k(9,Ma,r.formErrors.externalChannelUrl)),l(),C(r.formErrors.externalChannelUrl?12:-1),l(4),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannel?17:-1),l(12),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[W,Ct,ft,Nn,q,Ge,We,Xe,He,ee,tt,yt],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:480px;max-width:480px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:520px){input[type=text][_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%]{display:block;max-width:480px}
/*# sourceMappingURL=video-channel-sync-edit.component-AWQWPIEU.css.map */`]}));let o=e;return o;})();var Ta=["table"];function Ra(o,e){if(o&1&&($(0),g(1,7),H(2,"myNumberFormatter"),F()),o&2){let n=e.$implicit;l(2),B(n)(ce(2,2,n)),U(1);}}function Oa(o,e){if(o&1){let n=N();c(0,"my-advanced-input-filter",11),E("search",function(i){P(n),m();let r=j(1);return I(r.onSearch(i));}),s();}}function ba(o,e){if(o&1&&(c(0,"a",13),y(1),s()),o&2){let n=m().$implicit;u("href",n.targetUrl,Ne)("title",n.targetUrl),l(),R(n.targetUrl);}}function Aa(o,e){if(o&1&&(c(0,"span",14),y(1),s()),o&2){let n=m().$implicit;u("title",n.torrentName||n.magnetUri),l(),R(n.torrentName||n.magnetUri);}}function La(o,e){if(o&1&&v(0,"my-actor-cell",15),o&2){let n=m().$implicit;u("actor",n.video.channel);}}function Na(o,e){if(o&1&&y(0),o&2){let n=m().$implicit;Y(" ",n.video==null?null:n.video.name," ");}}function Da(o,e){if(o&1&&(c(0,"a",17),y(1),s()),o&2){let n=m(2).$implicit,t=m();u("href",t.getVideoUrl(n.video),Ne),l(),R(n.video==null?null:n.video.name);}}function wa(o,e){o&1&&($(0),g(1,8),F());}function xa(o,e){if(o&1&&f(0,Da,2,2,"a",17)(1,wa,2,0,"ng-container"),o&2){let n=m().$implicit;C(n.video?0:1);}}function Ya(o,e){if(o&1&&(c(0,"td",12),f(1,ba,2,3,"a",13)(2,Aa,2,2,"span",14),s(),c(3,"td"),f(4,La,1,1,"my-actor-cell",15),s(),c(5,"td"),f(6,Na,1,1)(7,xa,2,1),s(),c(8,"td")(9,"span",16),y(10),s()(),c(11,"td"),y(12),H(13,"ptDate"),s()),o&2){let n=e.$implicit,t=m();l(),C(n.targetUrl?1:2),l(3),C(n.video!=null&&n.video.channel?4:-1),l(2),C(t.isVideoImportPending(n)?6:t.isVideoImportSuccess(n)?7:-1),l(3),u("ngClass",t.getVideoImportStateClass(n.state.id)),l(),Y(" ",n.state.label," "),l(2),R(ve(13,6,n.createdAt,"short"));}}function Va(o,e){if(o&1&&v(0,"my-action-dropdown",18),o&2){let n=e.$implicit,t=m();u("actions",t.videoImportActions)("entry",n);}}function $a(o,e){if(o&1&&(c(0,"pre"),y(1),s()),o&2){let n=e.$implicit;l(),R(n.error);}}function Fa(o,e){o&1&&($(0),g(1,9),F());}var Vo=(()=>{let e=class e{notifier=p(w);videoImportService=p(vo);table=Z("table");videoImportActions=[];columns=[{id:"target",label:"\u0647\u062F\u0641",sortable:!1},{id:"channel",label:"\u06A9\u0627\u0646\u0627\u0644",sortable:!1},{id:"video",label:"\u0648\u06CC\u062F\u0626\u0648",sortable:!1},{id:"state",label:"\u0648\u0636\u0639\u06CC\u062A",sortable:!1},{id:"createdAt",label:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u062C\u0627\u062F",sortable:!0}];dataLoader;constructor(){this.dataLoader=this._dataLoader.bind(this);}ngOnInit(){this.videoImportActions=[{label:"Cancel import",iconName:"no",handler:t=>this.cancelImport(t),isDisplayed:t=>this.isVideoImportPending(t)},{label:"Retry import",iconName:"refresh",handler:t=>this.retryImport(t),isDisplayed:t=>this.isVideoImportFailed(t)},{label:"Delete import task",description:"The associated video is not deleted",iconName:"delete",handler:t=>this.deleteImport(t),isDisplayed:t=>this.isVideoImportFailed(t)||this.isVideoImportCancelled(t)||!t.video},{label:"Edit video",iconName:"edit",linkBuilder:t=>[this.getEditVideoUrl(t.video)],isDisplayed:t=>this.isVideoImportSuccess(t)&&!!t.video}];}getVideoImportStateClass(t){switch(t){case we.FAILED:return"badge-red";case we.REJECTED:return"badge-banned";case we.PENDING:return"badge-yellow";case we.PROCESSING:return"badge-blue";default:return"badge-green";}}isVideoImportSuccess(t){return t.state.id===we.SUCCESS;}isVideoImportPending(t){return t.state.id===we.PENDING;}isVideoImportFailed(t){return t.state.id===we.FAILED;}isVideoImportCancelled(t){return t.state.id===we.CANCELLED;}getVideoUrl(t){return Zi.buildWatchUrl(t);}getEditVideoUrl(t){return Zi.buildUpdateUrl(t);}deleteImport(t){this.videoImportService.deleteVideoImport(t).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}cancelImport(t){this.videoImportService.cancelVideoImport(t).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}retryImport(t){this.videoImportService.retryVideoImport(t).subscribe({next:()=>this.table().loadData(),error:i=>this.notifier.handleError(i)});}_dataLoader(t){return this.videoImportService.listMyVideoImports(se(ie({},t),{includeCollaborations:!0}));}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.table,Ta,5),i&2&&Q();},decls:14,vars:2,consts:()=>{let t;t="imports per page";let i;i="{VAR_PLURAL, plural, =0 {No import} =1 {1 import} other {{INTERPOLATION} imports}}",i=le(i,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let r;r="This video has been deleted";let a;a="\u0627\u0642\u062F\u0627\u0645\u0627\u062A";let d;return d="No video import found.",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["expandedRow",""],["noResults",""],i,r,d,["key","MyVideoImportsComponent","paginatorText",t,"columnConfig","false",3,"defaultColumns","dataLoader"],[3,"search"],[1,"max-width-300px","ellipsis"],["target","_blank","rel","noopener noreferrer",3,"href","title"],[3,"title"],["actorType","channel",3,"actor"],[1,"pt-badge",3,"ngClass"],["target","_blank","rel","noopener noreferrer",3,"href"],["label",a,"container","body",3,"actions","entry"]];},template:function(i,r){i&1&&(c(0,"my-table",10,0),K(2,Ra,3,4,"ng-template",null,1,D)(4,Oa,1,0,"ng-template",null,2,D)(6,Ya,14,9,"ng-template",null,3,D)(8,Va,1,2,"ng-template",null,4,D)(10,$a,2,1,"ng-template",null,5,D)(12,Fa,2,0,"ng-template",null,6,D),s()),i&2&&u("defaultColumns",r.columns)("dataLoader",r.dataLoader);},dependencies:[fe,de,ee,Le,Ai,Et,Ae,be],styles:[`pre[_ngcontent-%COMP%]{font-size:11px}.video-import-error[_ngcontent-%COMP%]{color:var(--red)}
/*# sourceMappingURL=my-video-imports.component-TZLTH2W6.css.map */`]}));let o=e;return o;})();var Ot=class extends Pt{videoPlaylistToUpdate;userVideoChannels=[];videoPlaylistPrivacies=[];};var ka=o=>({"input-error":o}),za=o=>["/my-library/video-playlists/update",o];function Ba(o,e){if(o&1&&(c(0,"my-alert",14),y(1),s()),o&2){let n=m();l(),R(n.error);}}function Ua(o,e){o&1&&(c(0,"li",21),g(1,6),s());}function Ga(o,e){if(o&1&&(c(0,"a",41),y(1),s()),o&2){let n=m(2);u("routerLink",k(2,za,n.videoPlaylistToUpdate==null?null:n.videoPlaylistToUpdate.shortUUID)),l(),Y(" ",n.videoPlaylistToUpdate==null?null:n.videoPlaylistToUpdate.displayName," ");}}function Ha(o,e){if(o&1&&(c(0,"li",21),g(1,7),s(),c(2,"li",40),f(3,Ga,2,4,"a",41),s()),o&2){let n=m();l(3),C(n.videoPlaylistToUpdate?3:-1);}}function Xa(o,e){o&1&&(c(0,"h2",22),g(1,8),s());}function Wa(o,e){o&1&&(c(0,"h2",22),g(1,9),s());}function ja(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),Y(" ",n.formErrors.displayName," ");}}function Qa(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),R(n.formErrors.privacy);}}function Za(o,e){if(o&1&&(c(0,"div",37)(1,"div"),g(2,10),s(),c(3,"div"),g(4,11),s()()),o&2){let n=m();l(2),B(n.getOwnerAccountDisplayName()),U(2);}}function qa(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),R(n.formErrors.videoChannelId);}}function Ka(o,e){o&1&&(c(0,"div",25)(1,"my-peertube-checkbox",42),$(2,43),c(3,"span"),g(4,12),s(),v(5,"br"),c(6,"span"),g(7,13),s(),F(),s()());}var $o=(()=>{let e=class e extends Ot{formReactiveService=p(je);authService=p(z);notifier=p(w);router=p(Ue);videoPlaylistService=p(Oe);serverService=p(pe);error;ngOnInit(){this.buildForm({displayName:Si,privacy:vi,description:yi,videoChannelId:Mi,insertAtFirstPosition:null,thumbnailfile:null}),this.form.get("privacy").valueChanges.subscribe(t=>{Ei(this.form.get("videoChannelId"),t);}),Qe(this.authService,{includeCollaborations:!0}).subscribe(t=>this.userVideoChannels=t),this.serverService.getVideoPlaylistPrivacies().subscribe(t=>{this.videoPlaylistPrivacies=t,this.form.patchValue({privacy:Dn.PRIVATE});});}formValidated(){this.error=void 0;let t=this.form.value,i={displayName:t.displayName,privacy:t.privacy,description:t.description||null,videoChannelId:t.videoChannelId||null,thumbnailfile:t.thumbnailfile||null};this.videoPlaylistService.createVideoPlaylist(i).pipe(Ve(({videoPlaylist:{id:r}})=>{if(t.insertAtFirstPosition!==!0||!t.videoChannelId)return Bt(!0);let a=this.userVideoChannels.find(d=>d.id===t.videoChannelId)?.name;return this.videoPlaylistService.getVideoPlaylist(r).pipe(Ve(d=>this.videoPlaylistService.reorderPlaylistsOfChannel(a,d.videoChannelPosition,0)));})).subscribe({next:()=>{this.notifier.success("\u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634 "+i.displayName+" \u0627\u06CC\u062C\u0627\u062F \u0634\u062F."),this.router.navigate(["/my-library","video-playlists"]);},error:r=>{this.error=r.message;}});}isCreation(){return!0;}isEditor(){return!1;}getOwnerAccountDisplayName(){return this.authService.getUser().account.displayName;}getFormButtonTitle(){return"\u0627\u06CC\u062C\u0627\u062F";}};h(e,"\u0275fac",(()=>{let t;return function(r){return(t||(t=ke(e)))(r||e);};})()),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],features:[De],decls:41,vars:18,consts:()=>{let t;t="\u0648\u06CC\u0631\u0627\u06CC\u0634";let i;i="\u0641\u0647\u0631\u0633\u062A\u200C\u0647\u0627\u06CC \u067E\u062E\u0634 \u0645\u0646";let r;r="\u062A\u0635\u0648\u06CC\u0631 \u06A9\u0648\u0686\u06A9 \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634";let a;a="\u0646\u0627\u0645";let d;d="\u062A\u0648\u0636\u06CC\u062D\u0627\u062A";let _;_="\u062D\u0631\u06CC\u0645 \u062E\u0635\u0648\u0635\u06CC";let S;S="\u06A9\u0627\u0646\u0627\u0644";let M;M="\u0627\u06CC\u062C\u0627\u062F";let L;L="\u0648\u06CC\u0631\u0627\u06CC\u0634";let O;O="\u0641\u0647\u0631\u0633\u062A \u067E\u062E\u0634 \u062C\u062F\u06CC\u062F";let ae;ae="UPDATE PLAYLIST";let me;me=" Only "+"\uFFFD0\uFFFD"+"'s channels are listed ";let Ee;Ee=" Changing the owner of a playlist is not supported ";let x;x="Insert at the first position in your channel's playlist list";let ot;ot="Playlists can be manually sorted in your channel.";let xe;return xe="By default, new playlists are added at the end of the list.",[i,r,a,d,_,S,M,L,O,ae,me,Ee,ot,xe,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],["aria-label","breadcrumb"],[1,"pt-breadcrumb"],[1,"breadcrumb-item"],["routerLink","/my-library/video-playlists"],[1,"breadcrumb-item","active"],[1,"visually-hidden"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","thumbnailfile"],["inputLabel",t,"inputName","thumbnailfile","formControlName","thumbnailfile"],["for","displayName"],["type","text","id","displayName","formControlName","displayName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText"],["inputId","description","formControlName","description",3,"formError"],["for","privacy"],["inputId","privacy","formControlName","privacy",3,"items"],["for","videoChannelId"],[1,"form-group-description"],["inputId","videoChannelId","formControlName","videoChannelId",3,"items"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"],["aria-current","page",1,"breadcrumb-item","active"],[3,"routerLink"],["inputName","insertAtFirstPosition","formControlName","insertAtFirstPosition","labelText",x],["ngProjectAs","description",5,["description"]]];},template:function(i,r){i&1&&(f(0,Ba,2,1,"my-alert",14),c(1,"div",15)(2,"div",16)(3,"nav",17)(4,"ol",18)(5,"li",19)(6,"a",20),g(7,0),s()(),f(8,Ua,2,0,"li",21)(9,Ha,4,1),s()(),f(10,Xa,2,0,"h2",22)(11,Wa,2,0,"h2",22),s(),c(12,"div",23)(13,"form",24),E("ngSubmit",function(){return r.formValidated();}),c(14,"div",25)(15,"label",26),g(16,1),s(),v(17,"my-image-input",27),s(),c(18,"div",25)(19,"label",28),g(20,2),s(),v(21,"input",29),f(22,ja,2,1,"div",30),s(),c(23,"div",25)(24,"label",31),g(25,3),s(),v(26,"my-help",32)(27,"my-markdown-textarea",33),s(),c(28,"div",25)(29,"label",34),g(30,4),s(),v(31,"my-select-options",35),f(32,Qa,2,1,"div",30),s(),c(33,"div",25)(34,"label",36),g(35,5),s(),f(36,Za,5,1,"div",37),v(37,"my-select-channel",38),f(38,qa,2,1,"div",30),s(),f(39,Ka,8,0,"div",25),v(40,"input",39),s()()()),i&2&&(C(r.error?0:-1),l(8),C(r.isCreation()?8:9),l(2),C(r.isCreation()?10:11),l(3),u("formGroup",r.form),l(8),u("ngClass",k(16,ka,r.formErrors.displayName)),l(),C(r.formErrors.displayName?22:-1),l(5),u("formError",r.formErrors.description),l(4),u("items",r.videoPlaylistPrivacies),l(),C(r.formErrors.privacy?32:-1),l(4),C(r.isEditor()?36:-1),l(),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannelId?38:-1),l(),C(r.isCreation()&&r.form.value.videoChannelId?39:-1),l(),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[de,ee,te,W,Ct,ft,q,Ge,We,Xe,He,fi,ui,Ci,mi,tt,yt,et],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}.peertube-select-container[_ngcontent-%COMP%]{width:340px}@media screen and (max-width:370px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%], my-select-options[_ngcontent-%COMP%]{display:block;max-width:340px}.content-col[_ngcontent-%COMP%]{max-width:500px}my-image-input[_ngcontent-%COMP%]{width:223px;height:122px}
/*# sourceMappingURL=my-video-playlist-edit.component-V7C7NDGN.css.map */`]}));let o=e;return o;})();var es=20,Fo=(()=>{let e=class e{_ngZone=p(Fe);_platform=p(qi);_renderer=p(_t).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new A();_scrolledCount=0;scrollContainers=new Map();register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)));}deregister(t){let i=this.scrollContainers.get(t);i&&(i.unsubscribe(),this.scrollContainers.delete(t));}scrolled(t=es){return this._platform.isBrowser?new At(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=t>0?this._scrolled.pipe(Vi(t)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0);};}):Bt();}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,i)=>this.deregister(i)),this._scrolled.complete();}ancestorScrolled(t,i){let r=this.getAncestorScrollContainers(t);return this.scrolled(i).pipe(Cn(a=>!a||r.indexOf(a)>-1));}getAncestorScrollContainers(t){let i=[];return this.scrollContainers.forEach((r,a)=>{this._scrollableContainsElement(a,t)&&i.push(a);}),i;}_scrollableContainsElement(t,i){let r=ye(i),a=t.getElementRef().nativeElement;do if(r==a)return!0;while(r=r.parentElement);return!1;}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275prov",Pe({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})();var ts=20,en=(()=>{let e=class e{_platform=p(qi);_listeners;_viewportSize=null;_change=new A();_document=p(dt);constructor(){let t=p(Fe),i=p(_t).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=a=>this._change.next(a);this._listeners=[i.listen("window","resize",r),i.listen("window","orientationchange",r)];}this.change().subscribe(()=>this._viewportSize=null);});}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete();}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t;}getViewportRect(){let t=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+i,height:r,width:i};}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,i=this._getWindow(),r=t.documentElement,a=r.getBoundingClientRect(),d=-a.top||t.body?.scrollTop||i.scrollY||r.scrollTop||0,_=-a.left||t.body?.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:d,left:_};}change(t=ts){return t>0?this._change.pipe(Vi(t)):this._change;}_getWindow(){return this._document.defaultView||window;}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0};}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275prov",Pe({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})();var ko=(()=>{let e=class e{};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275mod",Kt({type:e})),h(e,"\u0275inj",Qt({}));let o=e;return o;})();function on(o){let e=o.cloneNode(!0),n=e.querySelectorAll("[id]"),t=o.nodeName.toLowerCase();e.removeAttribute("id");for(let i=0;i<n.length;i++)n[i].removeAttribute("id");return t==="canvas"?Uo(o,e):(t==="input"||t==="select"||t==="textarea")&&Bo(o,e),zo("canvas",o,e,Uo),zo("input, textarea, select",o,e,Bo),e;}function zo(o,e,n,t){let i=e.querySelectorAll(o);if(i.length){let r=n.querySelectorAll(o);for(let a=0;a<i.length;a++)t(i[a],r[a]);}}var is=0;function Bo(o,e){e.type!=="file"&&(e.value=o.value),e.type==="radio"&&e.name&&(e.name=`mat-clone-${e.name}-${is++}`);}function Uo(o,e){let n=e.getContext("2d");if(n)try{n.drawImage(o,0,0);}catch(t){}}function dn(o){let e=o.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height,x:e.x,y:e.y};}function rn(o,e,n){let{top:t,bottom:i,left:r,right:a}=o;return n>=t&&n<=i&&e>=r&&e<=a;}function ns(o,e){let n=e.left<o.left,t=e.left+e.width>o.right,i=e.top<o.top,r=e.top+e.height>o.bottom;return n||t||i||r;}function kt(o,e,n){o.top+=e,o.bottom=o.top+o.height,o.left+=n,o.right=o.left+o.width;}function Go(o,e,n,t){let{top:i,right:r,bottom:a,left:d,width:_,height:S}=o,M=_*e,L=S*e;return t>i-L&&t<a+L&&n>d-M&&n<r+M;}var Ni=class{_document;positions=new Map();constructor(e){this._document=e;}clear(){this.positions.clear();}cache(e){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),e.forEach(n=>{this.positions.set(n,{scrollPosition:{top:n.scrollTop,left:n.scrollLeft},clientRect:dn(n)});});}handleScroll(e){let n=Vt(e),t=this.positions.get(n);if(!t)return null;let i=t.scrollPosition,r,a;if(n===this._document){let S=this.getViewportScrollPosition();r=S.top,a=S.left;}else r=n.scrollTop,a=n.scrollLeft;let d=i.top-r,_=i.left-a;return this.positions.forEach((S,M)=>{S.clientRect&&n!==M&&n.contains(M)&&kt(S.clientRect,d,_);}),i.top=r,i.left=a,{top:d,left:_};}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX};}};function nr(o,e){let n=o.rootNodes;if(n.length===1&&n[0].nodeType===e.ELEMENT_NODE)return n[0];let t=e.createElement("div");return n.forEach(i=>t.appendChild(i)),t;}function _n(o,e,n){for(let t in e)if(e.hasOwnProperty(t)){let i=e[t];i?o.setProperty(t,i,n?.has(t)?"important":""):o.removeProperty(t);}return o;}function bt(o,e){let n=e?"":"none";_n(o.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":n,"-ms-user-select":n,"-webkit-user-select":n,"-moz-user-select":n});}function Ho(o,e,n){_n(o.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},n);}function Di(o,e){return e&&e!="none"?o+" "+e:o;}function Xo(o,e){o.style.width=`${e.width}px`,o.style.height=`${e.height}px`,o.style.transform=zt(e.left,e.top);}function zt(o,e){return`translate3d(${Math.round(o)}px, ${Math.round(e)}px, 0)`;}var $t={capture:!0},tn={passive:!1,capture:!0},os=(()=>{let e=class e{};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,r){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
`],encapsulation:2,changeDetection:0}));let o=e;return o;})(),pn=(()=>{let e=class e{_ngZone=p(Fe);_document=p(dt);_styleLoader=p(Zn);_renderer=p(_t).createRenderer(null,null);_cleanupDocumentTouchmove;_scroll=new A();_dropInstances=new Set();_dragInstances=new Set();_activeDragInstances=Zt([]);_globalListeners;_draggingPredicate=t=>t.isDragging();_domNodesToDirectives=null;pointerMove=new A();pointerUp=new A();constructor(){}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t);}registerDragItem(t){this._dragInstances.add(t),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=this._renderer.listen(this._document,"touchmove",this._persistentTouchmoveListener,tn);});}removeDropContainer(t){this._dropInstances.delete(t);}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.();}startDragging(t,i){if(!(this._activeDragInstances().indexOf(t)>-1)&&(this._styleLoader.load(os),this._activeDragInstances.update(r=>[...r,t]),this._activeDragInstances().length===1)){let r=i.type.startsWith("touch"),a=_=>this.pointerUp.next(_),d=[["scroll",_=>this._scroll.next(_),$t],["selectstart",this._preventDefaultWhileDragging,tn]];r?d.push(["touchend",a,$t],["touchcancel",a,$t]):d.push(["mouseup",a,$t]),r||d.push(["mousemove",_=>this.pointerMove.next(_),tn]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=d.map(([_,S,M])=>this._renderer.listen(this._document,_,S,M));});}}stopDragging(t){this._activeDragInstances.update(i=>{let r=i.indexOf(t);return r>-1?(i.splice(r,1),[...i]):i;}),this._activeDragInstances().length===0&&this._clearGlobalListeners();}isDragging(t){return this._activeDragInstances().indexOf(t)>-1;}scrolled(t){let i=[this._scroll];return t&&t!==this._document&&i.push(new At(r=>this._ngZone.runOutsideAngular(()=>{let a=this._renderer.listen(t,"scroll",d=>{this._activeDragInstances().length&&r.next(d);},$t);return()=>{a();};}))),Ht(...i);}registerDirectiveNode(t,i){this._domNodesToDirectives??=new WeakMap(),this._domNodesToDirectives.set(t,i);}removeDirectiveNode(t){this._domNodesToDirectives?.delete(t);}getDragDirectiveForNode(t){return this._domNodesToDirectives?.get(t)||null;}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete();}_preventDefaultWhileDragging=t=>{this._activeDragInstances().length>0&&t.preventDefault();};_persistentTouchmoveListener=t=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&t.preventDefault(),this.pointerMove.next(t));};_clearGlobalListeners(){this._globalListeners?.forEach(t=>t()),this._globalListeners=void 0;}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275prov",Pe({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})();function Wo(o){let e=o.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(o)*e;}function rs(o){let e=getComputedStyle(o),n=nn(e,"transition-property"),t=n.find(d=>d==="transform"||d==="all");if(!t)return 0;let i=n.indexOf(t),r=nn(e,"transition-duration"),a=nn(e,"transition-delay");return Wo(r[i])+Wo(a[i]);}function nn(o,e){return o.getPropertyValue(e).split(",").map(t=>t.trim());}var as=new Set(["position"]),an=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView=null;_preview;get element(){return this._preview;}constructor(e,n,t,i,r,a,d,_,S,M){this._document=e,this._rootElement=n,this._direction=t,this._initialDomRect=i,this._previewTemplate=r,this._previewClass=a,this._pickupPositionOnPage=d,this._initialTransform=_,this._zIndex=S,this._renderer=M;}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),jo(this._preview)&&this._preview.showPopover();}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null;}setTransform(e){this._preview.style.transform=e;}getBoundingClientRect(){return this._preview.getBoundingClientRect();}addClass(e){this._preview.classList.add(e);}getTransitionDuration(){return rs(this._preview);}addEventListener(e,n){return this._renderer.listen(this._preview,e,n);}_createPreview(){let e=this._previewTemplate,n=this._previewClass,t=e?e.template:null,i;if(t&&e){let r=e.matchSize?this._initialDomRect:null,a=e.viewContainer.createEmbeddedView(t,e.context);a.detectChanges(),i=nr(a,this._document),this._previewEmbeddedView=a,e.matchSize?Xo(i,r):i.style.transform=zt(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y);}else i=on(this._rootElement),Xo(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return _n(i.style,{"pointer-events":"none",margin:jo(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},as),bt(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach(r=>i.classList.add(r)):i.classList.add(n)),i;}};function jo(o){return"showPopover"in o;}var ss={passive:!0},Qo={passive:!1},ls={passive:!1,capture:!0},cs=800,Zo="cdk-drag-placeholder",qo=new Set(["position"]);function or(o,e,n={dragStartThreshold:5,pointerDirectionChangeThreshold:5}){let t=o.get(Bi,null,{optional:!0})||o.get(_t).createRenderer(null,null);return new sn(e,n,o.get(dt),o.get(Fe),o.get(en),o.get(pn),t);}var sn=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview=null;_previewContainer;_placeholderRef=null;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_marker;_anchor=null;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Zt(!1);_hasMoved=!1;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new A();_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement=null;_rootElementTapHighlight;_pointerMoveSubscription=rt.EMPTY;_pointerUpSubscription=rt.EMPTY;_scrollSubscription=rt.EMPTY;_resizeSubscription=rt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set();_dropContainer;_direction="ltr";_parentDragRef=null;_cachedShadowRoot;lockAxis=null;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled);}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(n=>bt(n,e)));}_disabled=!1;beforeStarted=new A();started=new A();released=new A();ended=new A();entered=new A();exited=new A();dropped=new A();moved=this._moveEvents;data;constrainPosition;constructor(e,n,t,i,r,a,d){this._config=n,this._document=t,this._ngZone=i,this._viewportRuler=r,this._dragDropRegistry=a,this._renderer=d,this.withRootElement(e).withParent(n.parentDragRef||null),this._parentPositions=new Ni(t),a.registerDragItem(this);}getPlaceholderElement(){return this._placeholder;}getRootElement(){return this._rootElement;}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement();}withHandles(e){this._handles=e.map(t=>ye(t)),this._handles.forEach(t=>bt(t,this.disabled)),this._toggleNativeDragInteractions();let n=new Set();return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&n.add(t);}),this._disabledHandles=n,this;}withPreviewTemplate(e){return this._previewTemplate=e,this;}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this;}withRootElement(e){let n=ye(e);if(n!==this._rootElement){this._removeRootElementListeners();let t=this._renderer;this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[t.listen(n,"mousedown",this._pointerDown,Qo),t.listen(n,"touchstart",this._pointerDown,ss),t.listen(n,"dragstart",this._nativeDragStart,Qo)]),this._initialTransform=void 0,this._rootElement=n;}return typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this;}withBoundaryElement(e){return this._boundaryElement=e?ye(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this;}withParent(e){return this._parentDragRef=e,this;}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._marker?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._marker=this._parentDragRef=null;}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this);}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0};}resetToBoundary(){if(this._boundaryElement&&this._rootElement&&ns(this._boundaryElement.getBoundingClientRect(),this._rootElement.getBoundingClientRect())){let e=this._boundaryElement.getBoundingClientRect(),n=this._rootElement.getBoundingClientRect(),t=0,i=0;n.left<e.left?t=e.left-n.left:n.right>e.right&&(t=e.right-n.right),n.top<e.top?i=e.top-n.top:n.bottom>e.bottom&&(i=e.bottom-n.bottom);let r=this._activeTransform.x,a=this._activeTransform.y,d=r+t,_=a+i;this._rootElement.style.transform=zt(d,_),this._activeTransform={x:d,y:_},this._passiveTransform={x:d,y:_};}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),bt(e,!0));}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),bt(e,this.disabled));}withDirection(e){return this._direction=e,this;}_withDropContainer(e){this._dropContainer=e;}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y};}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this;}withPreviewContainer(e){return this._previewContainer=e,this;}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e);}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0;}_destroyPreview(){this._preview?.destroy(),this._preview=null;}_destroyPlaceholder(){this._anchor?.remove(),this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._anchor=this._placeholderRef=null;}_pointerDown=e=>{if(this.beforeStarted.next(),this._handles.length){let n=this._getTargetHandle(e);n&&!this._disabledHandles.has(n)&&!this.disabled&&this._initializeDragSequence(n,e);}else this.disabled||this._initializeDragSequence(this._rootElement,e);};_pointerMove=e=>{let n=this._getPointerPositionOnPage(e);if(!this._hasStartedDragging()){let i=Math.abs(n.x-this._pickupPositionOnPage.x),r=Math.abs(n.y-this._pickupPositionOnPage.y);if(i+r>=this._config.dragStartThreshold){let d=Date.now()>=this._dragStartTime+this._getDragStartDelay(e),_=this._dropContainer;if(!d){this._endDragSequence(e);return;}(!_||!_.isDragging()&&!_.isReceiving())&&(e.cancelable&&e.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(e)));}return;}e.cancelable&&e.preventDefault();let t=this._getConstrainedPointerPosition(n);if(this._hasMoved=!0,this._lastKnownPointerPosition=n,this._updatePointerDirectionDelta(t),this._dropContainer)this._updateActiveDropContainer(t,n);else{let i=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,r=this._activeTransform;r.x=t.x-i.x+this._passiveTransform.x,r.y=t.y-i.y+this._passiveTransform.y,this._applyRootElementTransform(r.x,r.y);}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:t,event:e,distance:this._getDragDistance(t),delta:this._pointerDirectionDelta});});};_pointerUp=e=>{this._endDragSequence(e);};_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);});else{this._passiveTransform.x=this._activeTransform.x;let n=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(n),dropPoint:n,event:e});}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this);}}_startDragSequence(e){Ft(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let n=this._getShadowRoot(),t=this._dropContainer;if(n&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=this._renderer.listen(n,"selectstart",ds,ls);}),t){let i=this._rootElement,r=i.parentNode,a=this._placeholder=this._createPlaceholderElement(),d=this._marker=this._marker||this._document.createComment("");r.insertBefore(d,i),this._initialTransform=i.style.transform||"",this._preview=new an(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(r,n)),Ho(i,!1,qo),this._document.body.appendChild(r.replaceChild(a,i)),this.started.next({source:this,event:e}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this);}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[]);}_initializeDragSequence(e,n){this._parentDragRef&&n.stopPropagation();let t=this.isDragging(),i=Ft(n),r=!i&&n.button!==0,a=this._rootElement,d=Vt(n),_=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+cs>Date.now(),S=i?Qn(n):jn(n);if(d&&d.draggable&&n.type==="mousedown"&&n.preventDefault(),t||r||_||S)return;if(this._handles.length){let O=a.style;this._rootElementTapHighlight=O.webkitTapHighlightColor||"",O.webkitTapHighlightColor="transparent";}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(O=>this._updateOnScroll(O)),this._boundaryElement&&(this._boundaryRect=dn(this._boundaryElement));let M=this._previewTemplate;this._pickupPositionInElement=M&&M.template&&!M.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,n);let L=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(n);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:L.x,y:L.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,n);}_cleanupDragArtifacts(e){Ho(this._rootElement,!0,qo),this._marker.parentNode.replaceChild(this._rootElement,this._marker),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let n=this._dropContainer,t=n.getItemIndex(this),i=this._getPointerPositionOnPage(e),r=this._getDragDistance(i),a=n._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:r,dropPoint:i,event:e}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:n,previousContainer:this._initialContainer,isPointerOverContainer:a,distance:r,dropPoint:i,event:e}),n.drop(this,t,this._initialIndex,this._initialContainer,a,r,i,e),this._dropContainer=this._initialContainer;});}_updateActiveDropContainer({x:e,y:n},{x:t,y:i}){let r=this._initialContainer._getSiblingContainerFromPosition(this,e,n);!r&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,n)&&(r=this._initialContainer),r&&r!==this._dropContainer&&this._ngZone.run(()=>{let a=this._dropContainer.getItemIndex(this),d=this._dropContainer.getItemAtIndex(a+1)?.getVisibleElement()||null;this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._conditionallyInsertAnchor(r,this._dropContainer,d),this._dropContainer=r,this._dropContainer.enter(this,e,n,r===this._initialContainer&&r.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:r,currentIndex:r.getItemIndex(this)});}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,i),this._dropContainer._sortItem(this,e,n,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,n):this._applyPreviewTransform(e-this._pickupPositionInElement.x,n-this._pickupPositionInElement.y));}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let n=this._preview.getTransitionDuration();return n===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let i=d=>{(!d||this._preview&&Vt(d)===this._preview.element&&d.propertyName==="transform")&&(a(),t(),clearTimeout(r));},r=setTimeout(i,n*1.5),a=this._preview.addEventListener("transitionend",i);}));}_createPlaceholderElement(){let e=this._placeholderTemplate,n=e?e.template:null,t;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),t=nr(this._placeholderRef,this._document)):t=on(this._rootElement),t.style.pointerEvents="none",t.classList.add(Zo),t;}_getPointerPositionInElement(e,n,t){let i=n===this._rootElement?null:n,r=i?i.getBoundingClientRect():e,a=Ft(t)?t.targetTouches[0]:t,d=this._getViewportScrollPosition(),_=a.pageX-r.left-d.left,S=a.pageY-r.top-d.top;return{x:r.left-e.left+_,y:r.top-e.top+S};}_getPointerPositionOnPage(e){let n=this._getViewportScrollPosition(),t=Ft(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,i=t.pageX-n.left,r=t.pageY-n.top;if(this._ownerSVGElement){let a=this._ownerSVGElement.getScreenCTM();if(a){let d=this._ownerSVGElement.createSVGPoint();return d.x=i,d.y=r,d.matrixTransform(a.inverse());}}return{x:i,y:r};}_getConstrainedPointerPosition(e){let n=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:i}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||n==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||n==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:r,y:a}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,d=this._boundaryRect,{width:_,height:S}=this._getPreviewRect(),M=d.top+a,L=d.bottom-(S-a),O=d.left+r,ae=d.right-(_-r);t=Ko(t,O,ae),i=Ko(i,M,L);}return{x:t,y:i};}_updatePointerDirectionDelta(e){let{x:n,y:t}=e,i=this._pointerDirectionDelta,r=this._pointerPositionAtLastDirectionChange,a=Math.abs(n-r.x),d=Math.abs(t-r.y);return a>this._config.pointerDirectionChangeThreshold&&(i.x=n>r.x?1:-1,r.x=n),d>this._config.pointerDirectionChangeThreshold&&(i.y=t>r.y?1:-1,r.y=t),i;}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,bt(this._rootElement,e));}_removeRootElementListeners(){this._rootElementCleanups?.forEach(e=>e()),this._rootElementCleanups=void 0;}_applyRootElementTransform(e,n){let t=1/this.scale,i=zt(e*t,n*t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=Di(i,this._initialTransform);}_applyPreviewTransform(e,n){let t=this._previewTemplate?.template?void 0:this._initialTransform,i=zt(e,n);this._preview.setTransform(Di(i,t));}_getDragDistance(e){let n=this._pickupPositionOnPage;return n?{x:e.x-n.x,y:e.y-n.y}:{x:0,y:0};}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear();}_containInsideBoundaryOnResize(){let{x:e,y:n}=this._passiveTransform;if(e===0&&n===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||t.width===0&&t.height===0)return;let r=i.left-t.left,a=t.right-i.right,d=i.top-t.top,_=t.bottom-i.bottom;i.width>t.width?(r>0&&(e+=r),a>0&&(e-=a)):e=0,i.height>t.height?(d>0&&(n+=d),_>0&&(n-=_)):n=0,(e!==this._passiveTransform.x||n!==this._passiveTransform.y)&&this.setFreeDragPosition({y:n,x:e});}_getDragStartDelay(e){let n=this.dragStartDelay;return typeof n=="number"?n:Ft(e)?n.touch:n?n.mouse:0;}_updateOnScroll(e){let n=this._parentPositions.handleScroll(e);if(n){let t=Vt(e);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&kt(this._boundaryRect,n.top,n.left),this._pickupPositionOnPage.x+=n.left,this._pickupPositionOnPage.y+=n.top,this._dropContainer||(this._activeTransform.x-=n.left,this._activeTransform.y-=n.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y));}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition();}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=hi(this._rootElement)),this._cachedShadowRoot;}_getPreviewInsertionPoint(e,n){let t=this._previewContainer||"global";if(t==="parent")return e;if(t==="global"){let i=this._document;return n||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body;}return ye(t);}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect;}_nativeDragStart=e=>{if(this._handles.length){let n=this._getTargetHandle(e);n&&!this._disabledHandles.has(n)&&!this.disabled&&e.preventDefault();}else this.disabled||e.preventDefault();};_getTargetHandle(e){return this._handles.find(n=>e.target&&(e.target===n||n.contains(e.target)));}_conditionallyInsertAnchor(e,n,t){if(e===this._initialContainer)this._anchor?.remove(),this._anchor=null;else if(n===this._initialContainer&&n.hasAnchor){let i=this._anchor??=on(this._placeholder);i.classList.remove(Zo),i.classList.add("cdk-drag-anchor"),i.style.transform="",t?t.before(i):ye(n.element).appendChild(i);}}};function Ko(o,e,n){return Math.max(e,Math.min(n,o));}function Ft(o){return o.type[0]==="t";}function ds(o){o.preventDefault();}function rr(o,e,n){let t=Jo(e,o.length-1),i=Jo(n,o.length-1);if(t===i)return;let r=o[t],a=i<t?-1:1;for(let d=t;d!==i;d+=a)o[d]=o[d+a];o[i]=r;}function Jo(o,e){return Math.max(0,Math.min(e,o));}var wi=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction="ltr";constructor(e){this._dragDropRegistry=e;}_previousSwap={drag:null,delta:0,overlaps:!1};start(e){this.withItems(e);}sort(e,n,t,i){let r=this._itemPositions,a=this._getItemIndexFromPointerPosition(e,n,t,i);if(a===-1&&r.length>0)return null;let d=this.orientation==="horizontal",_=r.findIndex(x=>x.drag===e),S=r[a],M=r[_].clientRect,L=S.clientRect,O=_>a?1:-1,ae=this._getItemOffsetPx(M,L,O),me=this._getSiblingOffsetPx(_,r,O),Ee=r.slice();return rr(r,_,a),r.forEach((x,ot)=>{if(Ee[ot]===x)return;let xe=x.drag===e,b=xe?ae:me,un=xe?e.getPlaceholderElement():x.drag.getRootElement();x.offset+=b;let hn=Math.round(x.offset*(1/x.drag.scale));d?(un.style.transform=Di(`translate3d(${hn}px, 0, 0)`,x.initialTransform),kt(x.clientRect,0,b)):(un.style.transform=Di(`translate3d(0, ${hn}px, 0)`,x.initialTransform),kt(x.clientRect,b,0));}),this._previousSwap.overlaps=rn(L,n,t),this._previousSwap.drag=S.drag,this._previousSwap.delta=d?i.x:i.y,{previousIndex:_,currentIndex:a};}enter(e,n,t,i){let r=i==null||i<0?this._getItemIndexFromPointerPosition(e,n,t):i,a=this._activeDraggables,d=a.indexOf(e),_=e.getPlaceholderElement(),S=a[r];if(S===e&&(S=a[r+1]),!S&&(r==null||r===-1||r<a.length-1)&&this._shouldEnterAsFirstChild(n,t)&&(S=a[0]),d>-1&&a.splice(d,1),S&&!this._dragDropRegistry.isDragging(S)){let M=S.getRootElement();M.parentElement.insertBefore(_,M),a.splice(r,0,e);}else this._element.appendChild(_),a.push(e);_.style.transform="",this._cacheItemPositions();}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions();}withSortPredicate(e){this._sortPredicate=e;}reset(){this._activeDraggables?.forEach(e=>{let n=e.getRootElement();if(n){let t=this._itemPositions.find(i=>i.drag===e)?.initialTransform;n.style.transform=t||"";}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1;}getActiveItemsSnapshot(){return this._activeDraggables;}getItemIndex(e){return this._getVisualItemPositions().findIndex(n=>n.drag===e);}getItemAtIndex(e){return this._getVisualItemPositions()[e]?.drag||null;}updateOnScroll(e,n){this._itemPositions.forEach(({clientRect:t})=>{kt(t,e,n);}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition();});}withElementContainer(e){this._element=e;}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(n=>{let t=n.getVisibleElement();return{drag:n,offset:0,initialTransform:t.style.transform||"",clientRect:dn(t)};}).sort((n,t)=>e?n.clientRect.left-t.clientRect.left:n.clientRect.top-t.clientRect.top);}_getVisualItemPositions(){return this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions;}_getItemOffsetPx(e,n,t){let i=this.orientation==="horizontal",r=i?n.left-e.left:n.top-e.top;return t===-1&&(r+=i?n.width-e.width:n.height-e.height),r;}_getSiblingOffsetPx(e,n,t){let i=this.orientation==="horizontal",r=n[e].clientRect,a=n[e+t*-1],d=r[i?"width":"height"]*t;if(a){let _=i?"left":"top",S=i?"right":"bottom";t===-1?d-=a.clientRect[_]-r[S]:d+=r[_]-a.clientRect[S];}return d;}_shouldEnterAsFirstChild(e,n){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,i=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let a=t[t.length-1].clientRect;return i?e>=a.right:n>=a.bottom;}else{let a=t[0].clientRect;return i?e<=a.left:n<=a.top;}}_getItemIndexFromPointerPosition(e,n,t,i){let r=this.orientation==="horizontal",a=this._itemPositions.findIndex(({drag:d,clientRect:_})=>{if(d===e)return!1;if(i){let S=r?i.x:i.y;if(d===this._previousSwap.drag&&this._previousSwap.overlaps&&S===this._previousSwap.delta)return!1;}return r?n>=Math.floor(_.left)&&n<Math.floor(_.right):t>=Math.floor(_.top)&&t<Math.floor(_.bottom);});return a===-1||!this._sortPredicate(a,e)?-1:a;}},ln=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(e,n){this._document=e,this._dragDropRegistry=n;}start(e){let n=this._element.childNodes;this._relatedNodes=[];for(let t=0;t<n.length;t++){let i=n[t];this._relatedNodes.push([i,i.nextSibling]);}this.withItems(e);}sort(e,n,t,i){let r=this._getItemIndexFromPointerPosition(e,n,t),a=this._previousSwap;if(r===-1||this._activeItems[r]===e)return null;let d=this._activeItems[r];if(a.drag===d&&a.overlaps&&a.deltaX===i.x&&a.deltaY===i.y)return null;let _=this.getItemIndex(e),S=e.getPlaceholderElement(),M=d.getRootElement();r>_?M.after(S):M.before(S),rr(this._activeItems,_,r);let L=this._getRootNode().elementFromPoint(n,t);return a.deltaX=i.x,a.deltaY=i.y,a.drag=d,a.overlaps=M===L||M.contains(L),{previousIndex:_,currentIndex:r};}enter(e,n,t,i){let r=this._activeItems.indexOf(e);r>-1&&this._activeItems.splice(r,1);let a=i==null||i<0?this._getItemIndexFromPointerPosition(e,n,t):i;a===-1&&(a=this._getClosestItemIndexToPointer(e,n,t));let d=this._activeItems[a];d&&!this._dragDropRegistry.isDragging(d)?(this._activeItems.splice(a,0,e),d.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()));}withItems(e){this._activeItems=e.slice();}withSortPredicate(e){this._sortPredicate=e;}reset(){let e=this._element,n=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[i,r]=this._relatedNodes[t];i.parentNode===e&&i.nextSibling!==r&&(r===null?e.appendChild(i):r.parentNode===e&&e.insertBefore(i,r));}this._relatedNodes=[],this._activeItems=[],n.drag=null,n.deltaX=n.deltaY=0,n.overlaps=!1;}getActiveItemsSnapshot(){return this._activeItems;}getItemIndex(e){return this._activeItems.indexOf(e);}getItemAtIndex(e){return this._activeItems[e]||null;}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition();});}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0);}_getItemIndexFromPointerPosition(e,n,t){let i=this._getRootNode().elementFromPoint(Math.floor(n),Math.floor(t)),r=i?this._activeItems.findIndex(a=>{let d=a.getRootElement();return i===d||d.contains(i);}):-1;return r===-1||!this._sortPredicate(r,e)?-1:r;}_getRootNode(){return this._rootNode||(this._rootNode=hi(this._element)||this._document),this._rootNode;}_getClosestItemIndexToPointer(e,n,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,r=-1;for(let a=0;a<this._activeItems.length;a++){let d=this._activeItems[a];if(d!==e){let{x:_,y:S}=d.getRootElement().getBoundingClientRect(),M=Math.hypot(n-_,t-S);M<i&&(i=M,r=a);}}return r;}},er=.05,ar=.05,Ce=function(o){return o[o.NONE=0]="NONE",o[o.UP=1]="UP",o[o.DOWN=2]="DOWN",o;}(Ce||{}),re=function(o){return o[o.NONE=0]="NONE",o[o.LEFT=1]="LEFT",o[o.RIGHT=2]="RIGHT",o;}(re||{});function sr(o,e){return new cn(e,o.get(pn),o.get(dt),o.get(Fe),o.get(en));}var cn=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis=null;autoScrollDisabled=!1;autoScrollStep=2;hasAnchor=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new A();entered=new A();exited=new A();dropped=new A();sorted=new A();receivingStarted=new A();receivingStopped=new A();data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set();_viewportScrollSubscription=rt.EMPTY;_verticalScrollDirection=Ce.NONE;_horizontalScrollDirection=re.NONE;_scrollNode;_stopScrollTimers=new A();_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(e,n,t,i,r){this._dragDropRegistry=n,this._ngZone=i,this._viewportRuler=r;let a=this.element=ye(e);this._document=t,this.withOrientation("vertical").withElementContainer(a),n.registerDropContainer(this),this._parentPositions=new Ni(t);}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this);}isDragging(){return this._isDragging;}start(){this._draggingStarted(),this._notifyReceivingSiblings();}enter(e,n,t,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(e)),this._sortStrategy.enter(e,n,t,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)});}exit(e){this._reset(),this.exited.next({item:e,container:this});}drop(e,n,t,i,r,a,d,_={}){this._reset(),this.dropped.next({item:e,currentIndex:n,previousIndex:t,container:this,previousContainer:i,isPointerOverContainer:r,distance:a,dropPoint:d,event:_});}withItems(e){let n=this._draggables;return this._draggables=e,e.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(n.filter(i=>i.isDragging()).every(i=>e.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this;}withDirection(e){return this._direction=e,this._sortStrategy instanceof wi&&(this._sortStrategy.direction=e),this;}connectedTo(e){return this._siblings=e.slice(),this;}withOrientation(e){if(e==="mixed")this._sortStrategy=new ln(this._document,this._dragDropRegistry);else{let n=new wi(this._dragDropRegistry);n.direction=this._direction,n.orientation=e,this._sortStrategy=n;}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((n,t)=>this.sortPredicate(n,t,this)),this;}withScrollableParents(e){let n=this._container;return this._scrollableElements=e.indexOf(n)===-1?[n,...e]:e.slice(),this;}withElementContainer(e){if(e===this._container)return this;let n=ye(this.element),t=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(e);return t>-1&&this._scrollableElements.splice(t,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this;}getScrollableParents(){return this._scrollableElements;}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e);}getItemAtIndex(e){return this._isDragging?this._sortStrategy.getItemAtIndex(e):this._draggables[e]||null;}isReceiving(){return this._activeSiblings.size>0;}_sortItem(e,n,t,i){if(this.sortingDisabled||!this._domRect||!Go(this._domRect,er,n,t))return;let r=this._sortStrategy.sort(e,n,t,i);r&&this.sorted.next({previousIndex:r.previousIndex,currentIndex:r.currentIndex,container:this,item:e});}_startScrollingIfNecessary(e,n){if(this.autoScrollDisabled)return;let t,i=Ce.NONE,r=re.NONE;if(this._parentPositions.positions.forEach((a,d)=>{d===this._document||!a.clientRect||t||Go(a.clientRect,er,e,n)&&([i,r]=_s(d,a.clientRect,this._direction,e,n),(i||r)&&(t=d));}),!i&&!r){let{width:a,height:d}=this._viewportRuler.getViewportSize(),_={width:a,height:d,top:0,right:a,bottom:d,left:0};i=lr(_,n),r=cr(_,e),t=window;}t&&(i!==this._verticalScrollDirection||r!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=r,this._scrollNode=t,(i||r)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling());}_stopScrolling(){this._stopScrollTimers.next();}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents();}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect;}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(n=>n._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear();}_startScrollInterval=()=>{this._stopScrolling(),fn(0,Yi).pipe(ct(this._stopScrollTimers)).subscribe(()=>{let e=this._scrollNode,n=this.autoScrollStep;this._verticalScrollDirection===Ce.UP?e.scrollBy(0,-n):this._verticalScrollDirection===Ce.DOWN&&e.scrollBy(0,n),this._horizontalScrollDirection===re.LEFT?e.scrollBy(-n,0):this._horizontalScrollDirection===re.RIGHT&&e.scrollBy(n,0);});};_isOverContainer(e,n){return this._domRect!=null&&rn(this._domRect,e,n);}_getSiblingContainerFromPosition(e,n,t){return this._siblings.find(i=>i._canReceive(e,n,t));}_canReceive(e,n,t){if(!this._domRect||!rn(this._domRect,n,t)||!this.enterPredicate(e,this))return!1;let i=this._getShadowRoot().elementFromPoint(n,t);return i?i===this._container||this._container.contains(i):!1;}_startReceiving(e,n){let t=this._activeSiblings;!t.has(e)&&n.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(t.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:n}));}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this});}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let n=this._parentPositions.handleScroll(e);n&&this._sortStrategy.updateOnScroll(n.top,n.left);}else this.isReceiving()&&this._cacheParentPositions();});}_getShadowRoot(){if(!this._cachedShadowRoot){let e=hi(this._container);this._cachedShadowRoot=e||this._document;}return this._cachedShadowRoot;}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(n=>n.isDragging());this._siblings.forEach(n=>n._startReceiving(this,e));}};function lr(o,e){let{top:n,bottom:t,height:i}=o,r=i*ar;return e>=n-r&&e<=n+r?Ce.UP:e>=t-r&&e<=t+r?Ce.DOWN:Ce.NONE;}function cr(o,e){let{left:n,right:t,width:i}=o,r=i*ar;return e>=n-r&&e<=n+r?re.LEFT:e>=t-r&&e<=t+r?re.RIGHT:re.NONE;}function _s(o,e,n,t,i){let r=lr(e,i),a=cr(e,t),d=Ce.NONE,_=re.NONE;if(r){let S=o.scrollTop;r===Ce.UP?S>0&&(d=Ce.UP):o.scrollHeight-S>o.clientHeight&&(d=Ce.DOWN);}if(a){let S=o.scrollLeft;n==="rtl"?a===re.RIGHT?S<0&&(_=re.RIGHT):o.scrollWidth+S>o.clientWidth&&(_=re.LEFT):a===re.LEFT?S>0&&(_=re.LEFT):o.scrollWidth-S>o.clientWidth&&(_=re.RIGHT);}return[d,_];}var ps=(()=>{let e=class e{_injector=p(Lt);constructor(){}createDrag(t,i){return or(this._injector,t,i);}createDropList(t){return sr(this._injector,t);}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275prov",Pe({token:e,factory:e.ɵfac,providedIn:"root"}));let o=e;return o;})(),tr=new at("CDK_DRAG_PARENT");var ms=new at("CdkDragHandle");var dr=new at("CDK_DRAG_CONFIG"),_r=new at("CdkDropList"),pr=(()=>{let e=class e{element=p(qt);dropContainer=p(_r,{optional:!0,skipSelf:!0});_ngZone=p(Fe);_viewContainerRef=p(Ui);_dir=p(Ki,{optional:!0});_changeDetectorRef=p(ut);_selfHandle=p(ms,{optional:!0,self:!0});_parentDrag=p(tr,{optional:!0,skipSelf:!0});_dragDropRegistry=p(pn);_destroyed=new A();_handles=new gn([]);_previewTemplate=null;_placeholderTemplate=null;_dragRef;data;lockAxis=null;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled);}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled;}_disabled=!1;constrainPosition;previewClass;previewContainer;scale=1;started=new Se();released=new Se();ended=new Se();entered=new Se();exited=new Se();dropped=new Se();moved=new At(t=>{let i=this._dragRef.moved.pipe(lt(r=>({source:this,pointerPosition:r.pointerPosition,event:r.event,delta:r.delta,distance:r.distance}))).subscribe(t);return()=>{i.unsubscribe();};});_injector=p(Lt);constructor(){let t=this.dropContainer,i=p(dr,{optional:!0});this._dragRef=or(this._injector,this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),t&&(t.addItem(this),t._dropListRef.beforeStarted.pipe(ct(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale;})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef);}getPlaceholderElement(){return this._dragRef.getPlaceholderElement();}getRootElement(){return this._dragRef.getRootElement();}reset(){this._dragRef.reset();}resetToBoundary(){this._dragRef.resetToBoundary();}getFreeDragPosition(){return this._dragRef.getFreeDragPosition();}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t);}ngAfterViewInit(){zi(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);},{injector:this._injector});}ngOnChanges(t){let i=t.rootElementSelector,r=t.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition);}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose();});}_addHandle(t){let i=this._handles.getValue();i.push(t),this._handles.next(i);}_removeHandle(t){let i=this._handles.getValue(),r=i.indexOf(t);r>-1&&(i.splice(r,1),this._handles.next(i));}_setPreviewTemplate(t){this._previewTemplate=t;}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null);}_setPlaceholderTemplate(t){this._placeholderTemplate=t;}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null);}_updateRootElement(){let t=this.element.nativeElement,i=t;this.rootElementSelector&&(i=t.closest!==void 0?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||t);}_getBoundaryElement(){let t=this.boundaryElement;return t?typeof t=="string"?this.element.nativeElement.closest(t):ye(t):null;}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){let i=this._dir,r=this.dragStartDelay,a=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,d=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.scale=this.scale,t.dragStartDelay=typeof r=="object"&&r?r:_i(r),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(d).withPreviewContainer(this.previewContainer||"global"),i&&t.withDirection(i.value);}}),t.beforeStarted.pipe(Sn(1)).subscribe(()=>{if(this._parentDrag){t.withParent(this._parentDrag._dragRef);return;}let i=this.element.nativeElement.parentElement;for(;i;){let r=this._dragDropRegistry.getDragDirectiveForNode(i);if(r){t.withParent(r._dragRef);break;}i=i.parentElement;}});}_handleEvents(t){t.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck();}),t.released.subscribe(i=>{this.released.emit({source:this,event:i.event});}),t.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),t.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex});}),t.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this});}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event});});}_assignDefaults(t){let{lockAxis:i,dragStartDelay:r,constrainPosition:a,previewClass:d,boundaryElement:_,draggingDisabled:S,rootElementSelector:M,previewContainer:L}=t;this.disabled=S??!1,this.dragStartDelay=r||0,this.lockAxis=i||null,a&&(this.constrainPosition=a),d&&(this.previewClass=d),_&&(this.boundaryElement=_),M&&(this.rootElementSelector=M),L&&(this.previewContainer=L);}_setupHandlesListener(){this._handles.pipe($e(t=>{let i=t.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i);}),Ve(t=>Ht(...t.map(i=>i._stateChanges.pipe(jt(i))))),ct(this._destroyed)).subscribe(t=>{let i=this._dragRef,r=t.element.nativeElement;t.disabled?i.disableHandle(r):i.enableHandle(r);});}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275dir",Jt({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,r){i&2&&ni("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging());},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Ie],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Tn]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[mt([{provide:tr,useExisting:e}]),Nt]}));let o=e;return o;})(),ir=new at("CdkDropListGroup");var mr=(()=>{let e=class e{element=p(qt);_changeDetectorRef=p(ut);_scrollDispatcher=p(Fo);_dir=p(Ki,{optional:!0});_group=p(ir,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new A();_scrollableParentsResolved=!1;_dropListRef;connectedTo=[];data;orientation="vertical";id=p(Kn).getId("cdk-drop-list-");lockAxis=null;get disabled(){return this._disabled||!!this._group&&this._group.disabled;}set disabled(t){this._dropListRef.disabled=this._disabled=t;}_disabled=!1;sortingDisabled=!1;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled=!1;autoScrollStep;elementContainerSelector=null;hasAnchor=!1;dropped=new Se();entered=new Se();exited=new Se();sorted=new Se();_unsortedItems=new Set();constructor(){let t=p(dr,{optional:!0}),i=p(Lt);this._dropListRef=sr(i,this.element),this._dropListRef.data=this,t&&this._assignDefaults(t),this._dropListRef.enterPredicate=(r,a)=>this.enterPredicate(r.data,a.data),this._dropListRef.sortPredicate=(r,a,d)=>this.sortPredicate(r,a.data,d.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),this._group&&this._group._items.add(this);}addItem(t){this._unsortedItems.add(t),t._dragRef._withDropContainer(this._dropListRef),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef));}removeItem(t){if(this._unsortedItems.delete(t),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(t._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs));}}getSortedItems(){return Array.from(this._unsortedItems).sort((t,i)=>t._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);}ngOnDestroy(){let t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete();}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(jt(this._dir.value),ct(this._destroyed)).subscribe(i=>t.withDirection(i)),t.beforeStarted.subscribe(()=>{let i=qn(this.connectedTo).map(r=>{if(typeof r=="string"){let a=e._dropLists.find(d=>d.id===r);return a;}return r;});if(this._group&&this._group._items.forEach(r=>{i.indexOf(r)===-1&&i.push(r);}),!this._scrollableParentsResolved){let r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(a=>a.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0;}if(this.elementContainerSelector){let r=this.element.nativeElement.querySelector(this.elementContainerSelector);t.withElementContainer(r);}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=_i(this.autoScrollStep,2),t.hasAnchor=this.hasAnchor,t.connectedTo(i.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation);});}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck();}),t.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex});}),t.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck();}),t.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data});}),t.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck();}),Ht(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck());}_assignDefaults(t){let{lockAxis:i,draggingDisabled:r,sortingDisabled:a,listAutoScrollDisabled:d,listOrientation:_}=t;this.disabled=r??!1,this.sortingDisabled=a??!1,this.autoScrollDisabled=d??!1,this.orientation=_||"vertical",this.lockAxis=i||null;}_syncItemsWithRef(t){this._latestSortedRefs=t,this._dropListRef.withItems(t);}};h(e,"_dropLists",[]),h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275dir",Jt({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,r){i&2&&(vn("id",r.id),ni("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()));},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",Ie],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",Ie],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Ie],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"],hasAnchor:[2,"cdkDropListHasAnchor","hasAnchor",Ie]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[mt([{provide:ir,useValue:void 0},{provide:_r,useExisting:e}])]}));let o=e;return o;})();var ur=(()=>{let e=class e{};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275mod",Kt({type:e})),h(e,"\u0275inj",Qt({providers:[ps],imports:[ko]}));let o=e;return o;})();var us=["videoShareModal"];function hs(o,e){if(o&1&&v(0,"my-video-playlist-miniature",7),o&2){let n=m();u("playlist",n.playlist);}}function gs(o,e){if(o&1&&v(0,"my-action-dropdown",10),o&2){let n=m();u("entry",n.playlist)("actions",n.playlistActions);}}function fs(o,e){o&1&&(c(0,"div",12)(1,"div"),g(2,2),s(),c(3,"div"),g(4,3),s(),c(5,"div"),ti(6,4),v(7,"a",16),ii(),s()());}function Cs(o,e){if(o&1){let n=N();c(0,"div",14)(1,"my-video-playlist-element-miniature",17),E("elementRemoved",function(i){P(n);let r=m();return I(r.onElementRemoved(i));}),s()();}if(o&2){let n=e.$implicit,t=m();u("cdkDragStartDelay",t.getDragStartDelay()),l(),u("playlistElement",n)("playlist",t.playlist)("owned",!0)("position",n.position);}}var hr=(()=>{let e=class e{hooks=p(Xn);notifier=p(w);router=p(Ue);confirmService=p(Ze);route=p(ht);screenService=p(li);videoPlaylistService=p(Oe);videoShareModal=Z("videoShareModal");playlistElements=[];playlist;playlistActions=[];pagination={currentPage:1,itemsPerPage:10,totalItems:null};onDataSubject=new A();videoPlaylistId;paramsSub;ngOnInit(){this.playlistActions=[[{label:"\u0628\u0647\u200C\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634",iconName:"edit",linkBuilder:t=>["/my-library","video-playlists","update",t.shortUUID]},{label:"\u062D\u0630\u0641 \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634",iconName:"delete",handler:t=>this.deleteVideoPlaylist(t)}]],this.paramsSub=this.route.params.subscribe(t=>{this.videoPlaylistId=t.videoPlaylistId,this.loadElements(),this.loadPlaylistInfo();});}ngOnDestroy(){this.paramsSub&&this.paramsSub.unsubscribe();}drop(t){let i=t.previousIndex,r=t.currentIndex;if(i===r)return;let a=this.playlistElements[i].position,d=this.playlistElements[r].position;a>d&&d--;let _=this.playlistElements[i];this.playlistElements.splice(i,1),this.playlistElements.splice(r,0,_),this.videoPlaylistService.reorderVideosOfPlaylist(this.playlist.id,a,d).subscribe({next:()=>{this.reorderClientPositions();},error:S=>this.notifier.handleError(S)});}onElementRemoved(t){let i=this.findFirst();this.playlistElements=this.playlistElements.filter(r=>r.id!==t.id),si(this.pagination),this.reorderClientPositions(i);}onNearOfBottom(){this.pagination.totalItems<=this.pagination.currentPage*this.pagination.itemsPerPage||(this.pagination.currentPage+=1,this.loadElements());}trackByFn(t,i){return i.id;}isRegularPlaylist(t){return t?.type.id===oi.REGULAR;}showShareModal(){this.videoShareModal().show();}deleteVideoPlaylist(t){return Ye(this,null,function*(){(yield this.confirmService.confirm("\u0622\u06CC\u0627 \u0648\u0627\u0642\u0639\u0627 \u0645\u06CC \u062E\u0648\u0627\u0647\u06CC\u062F "+t.displayName+" \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F\u061F ","\u062D\u0630\u0641"))!==!1&&this.videoPlaylistService.removeVideoPlaylist(t).subscribe({next:()=>{this.router.navigate(["/my-library","video-playlists"]),this.notifier.success("\u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634 "+t.displayName+" \u062D\u0630\u0641 \u0634\u062F.");},error:r=>this.notifier.handleError(r)});});}getDragStartDelay(){return this.screenService.isInTouchScreen()?500:null;}loadElements(){this.hooks.wrapObsFun(this.videoPlaylistService.getPlaylistVideos.bind(this.videoPlaylistService),{videoPlaylistId:this.videoPlaylistId,componentPagination:this.pagination},"my-library","filter:api.my-library.video-playlist-elements.list.params","filter:api.my-library.video-playlist-elements.list.result").subscribe(({total:t,data:i})=>{this.playlistElements=this.playlistElements.concat(i),this.pagination.totalItems=t,this.onDataSubject.next(i);});}loadPlaylistInfo(){this.videoPlaylistService.getVideoPlaylist(this.videoPlaylistId).subscribe(t=>{this.playlist=t;});}reorderClientPositions(t){if(this.playlistElements.length===0)return;let i=t||this.findFirst(),r=1;for(let d of this.playlistElements)d.position=r,r++;let a=this.findFirst();i&&a&&i.id!==a.id&&this.loadPlaylistInfo();}findFirst(){return this.playlistElements.find(t=>t.position===1);}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.videoShareModal,us,5),i&2&&Q();},decls:14,vars:5,consts:()=>{let t;t="\u0647\u0645\u200C\u0631\u0633\u0627\u0646\u06CC";let i;i="\u0647\u06CC\u0686 \u0641\u06CC\u0644\u0645\u06CC \u062F\u0631 \u0627\u06CC\u0646 \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F.";let r;r="Browse videos on PeerTube to add them in your playlist.";let a;return a="See the "+"\uFFFD#7\uFFFD"+"documentation"+"\uFFFD/#7\uFFFD"+" for more information.",[["videoShareModal",""],t,i,r,a,[1,"root"],[1,"playlist-info"],["toManage","false","displayChannel","true","displayDescription","true","displayPrivacy","true",3,"playlist"],[1,"playlist-buttons"],["icon","share",1,"me-3",3,"click"],["label","More",3,"entry","actions"],[1,"playlist-elements"],[1,"no-results"],["myInfiniteScroller","","cdkDropList","",1,"videos",3,"nearOfBottom","cdkDropListDropped","dataObservable"],["cdkDrag","",1,"video",3,"cdkDragStartDelay"],[3,"playlist"],["target","_blank","href","https://docs.joinpeertube.org/use/library#playlist"],[3,"elementRemoved","playlistElement","playlist","owned","position"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",5)(1,"div",6),f(2,hs,1,1,"my-video-playlist-miniature",7),c(3,"div",8)(4,"my-button",9),E("click",function(){return P(a),I(r.showShareModal());}),g(5,1),s(),f(6,gs,1,2,"my-action-dropdown",10),s()(),c(7,"div",11),f(8,fs,8,0,"div",12),c(9,"div",13),E("nearOfBottom",function(){return P(a),I(r.onNearOfBottom());})("cdkDropListDropped",function(_){return P(a),I(r.drop(_));}),ne(10,Cs,2,5,"div",14,r.trackByFn,!0),s()()(),v(12,"my-video-share",15,0);}i&2&&(l(2),C(r.playlist?2:-1),l(4),C(r.isRegularPlaylist(r.playlist)?6:-1),l(2),C(r.pagination.totalItems===0?8:-1),l(),u("dataObservable",r.onDataSubject.asObservable()),l(),oe(r.playlistElements),l(2),u("playlist",r.playlist));},dependencies:[Ke,Pi,Et,Je,mr,pr,Mo,yo],styles:[`.root[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr}.playlist-info[_ngcontent-%COMP%]{grid-column:1;display:flex;flex-direction:column;margin-inline-end:1rem}.playlist-buttons[_ngcontent-%COMP%]{display:flex;margin:30px 0 10px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.video[_ngcontent-%COMP%]:last-child{border:0}.videos.cdk-drop-list-dragging[_ngcontent-%COMP%]   .video[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.playlist-elements[_ngcontent-%COMP%]{grid-column:2}my-video-playlist-miniature[_ngcontent-%COMP%]{width:280px}@media screen and (max-width:800px){my-video-playlist-miniature[_ngcontent-%COMP%]{width:201px}}@media screen and (max-width:500px){.root[_ngcontent-%COMP%]{display:block}.playlist-info[_ngcontent-%COMP%]{width:calc(100% + 2 * var(--x-margin-content));padding-top:20px;margin-bottom:10px}my-video-playlist-miniature[_ngcontent-%COMP%], .playlist-buttons[_ngcontent-%COMP%]{margin-inline-start:auto;margin-inline-end:auto}  my-video-playlist-element-miniature .video{padding:5px!important}  my-video-playlist-element-miniature .position{margin-inline-end:.3125rem!important}}
/*# sourceMappingURL=my-video-playlist-elements.component-VX3J4GNJ.css.map */`]}));let o=e;return o;})();var Ss=o=>({"input-error":o}),vs=o=>["/my-library/video-playlists/update",o];function ys(o,e){if(o&1&&(c(0,"my-alert",14),y(1),s()),o&2){let n=m();l(),R(n.error);}}function Ms(o,e){o&1&&(c(0,"li",21),g(1,6),s());}function Es(o,e){if(o&1&&(c(0,"a",41),y(1),s()),o&2){let n=m(2);u("routerLink",k(2,vs,n.videoPlaylistToUpdate==null?null:n.videoPlaylistToUpdate.shortUUID)),l(),Y(" ",n.videoPlaylistToUpdate==null?null:n.videoPlaylistToUpdate.displayName," ");}}function Ps(o,e){if(o&1&&(c(0,"li",21),g(1,7),s(),c(2,"li",40),f(3,Es,2,4,"a",41),s()),o&2){let n=m();l(3),C(n.videoPlaylistToUpdate?3:-1);}}function Is(o,e){o&1&&(c(0,"h2",22),g(1,8),s());}function Ts(o,e){o&1&&(c(0,"h2",22),g(1,9),s());}function Rs(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),Y(" ",n.formErrors.displayName," ");}}function Os(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),R(n.formErrors.privacy);}}function bs(o,e){if(o&1&&(c(0,"div",37)(1,"div"),g(2,10),s(),c(3,"div"),g(4,11),s()()),o&2){let n=m();l(2),B(n.getOwnerAccountDisplayName()),U(2);}}function As(o,e){if(o&1&&(c(0,"div",30),y(1),s()),o&2){let n=m();l(),R(n.formErrors.videoChannelId);}}function Ls(o,e){o&1&&(c(0,"div",25)(1,"my-peertube-checkbox",42),$(2,43),c(3,"span"),g(4,12),s(),v(5,"br"),c(6,"span"),g(7,13),s(),F(),s()());}var gr=(()=>{let e=class e extends Ot{formReactiveService=p(je);authService=p(z);notifier=p(w);router=p(Ue);route=p(ht);videoPlaylistService=p(Oe);serverService=p(pe);error;paramsSub;ngOnInit(){this.buildForm({displayName:Si,privacy:vi,description:yi,videoChannelId:Mi,thumbnailfile:null}),this.form.get("privacy").valueChanges.subscribe(t=>{Ei(this.form.get("videoChannelId"),t);}),this.paramsSub=this.route.params.pipe(lt(t=>t.videoPlaylistId),Ve(t=>Gt([this.videoPlaylistService.getVideoPlaylist(t),this.serverService.getVideoPlaylistPrivacies(),Qe(this.authService,{includeCollaborations:!0})]))).subscribe({next:([t,i,r])=>{this.videoPlaylistToUpdate=t,this.videoPlaylistPrivacies=i,this.userVideoChannels=r.filter(a=>a.ownerAccountId===this.videoPlaylistToUpdate.ownerAccount.id),this.hydrateFormFromPlaylist();},error:t=>{this.error=t.message;}});}ngOnDestroy(){this.paramsSub&&this.paramsSub.unsubscribe();}formValidated(){this.error=void 0;let t=this.form.value,i={displayName:t.displayName,privacy:t.privacy,description:t.description||null,videoChannelId:t.videoChannelId||null,thumbnailfile:t.thumbnailfile||void 0};this.videoPlaylistService.updateVideoPlaylist(this.videoPlaylistToUpdate,i).subscribe({next:()=>{this.notifier.success("\u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634 "+i.displayName+" \u0628\u0647 \u0631\u0648\u0632 \u0634\u062F."),this.router.navigate(["/my-library","video-playlists"]);},error:r=>{this.error=r.message;}});}isCreation(){return!1;}getFormButtonTitle(){return"\u0628\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC";}isEditor(){return this.videoPlaylistToUpdate?this.videoPlaylistToUpdate?.ownerAccount.id!==this.authService.getUser().account.id:!1;}getOwnerAccountDisplayName(){return this.videoPlaylistToUpdate?.ownerAccount.displayName;}hydrateFormFromPlaylist(){this.form.patchValue({displayName:this.videoPlaylistToUpdate.displayName,privacy:this.videoPlaylistToUpdate.privacy.id,description:this.videoPlaylistToUpdate.description,videoChannelId:this.videoPlaylistToUpdate.videoChannel?this.videoPlaylistToUpdate.videoChannel.id:null}),fetch(this.videoPlaylistToUpdate.getThumbnailUrl(223)).then(t=>t.blob()).then(t=>{this.form.patchValue({thumbnailfile:t});});}};h(e,"\u0275fac",(()=>{let t;return function(r){return(t||(t=ke(e)))(r||e);};})()),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],features:[De],decls:41,vars:18,consts:()=>{let t;t="\u0648\u06CC\u0631\u0627\u06CC\u0634";let i;i="\u0641\u0647\u0631\u0633\u062A\u200C\u0647\u0627\u06CC \u067E\u062E\u0634 \u0645\u0646";let r;r="\u062A\u0635\u0648\u06CC\u0631 \u06A9\u0648\u0686\u06A9 \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634";let a;a="\u0646\u0627\u0645";let d;d="\u062A\u0648\u0636\u06CC\u062D\u0627\u062A";let _;_="\u062D\u0631\u06CC\u0645 \u062E\u0635\u0648\u0635\u06CC";let S;S="\u06A9\u0627\u0646\u0627\u0644";let M;M="\u0627\u06CC\u062C\u0627\u062F";let L;L="\u0648\u06CC\u0631\u0627\u06CC\u0634";let O;O="\u0641\u0647\u0631\u0633\u062A \u067E\u062E\u0634 \u062C\u062F\u06CC\u062F";let ae;ae="UPDATE PLAYLIST";let me;me=" Only "+"\uFFFD0\uFFFD"+"'s channels are listed ";let Ee;Ee=" Changing the owner of a playlist is not supported ";let x;x="Insert at the first position in your channel's playlist list";let ot;ot="Playlists can be manually sorted in your channel.";let xe;return xe="By default, new playlists are added at the end of the list.",[i,r,a,d,_,S,M,L,O,ae,me,Ee,ot,xe,["type","danger"],[1,"pt-two-cols"],[1,"title-col"],["aria-label","breadcrumb"],[1,"pt-breadcrumb"],[1,"breadcrumb-item"],["routerLink","/my-library/video-playlists"],[1,"breadcrumb-item","active"],[1,"visually-hidden"],[1,"content-col"],[3,"ngSubmit","formGroup"],[1,"form-group"],["for","thumbnailfile"],["inputLabel",t,"inputName","thumbnailfile","formControlName","thumbnailfile"],["for","displayName"],["type","text","id","displayName","formControlName","displayName",1,"form-control",3,"ngClass"],["role","alert",1,"form-error"],["for","description"],["helpType","markdownText"],["inputId","description","formControlName","description",3,"formError"],["for","privacy"],["inputId","privacy","formControlName","privacy",3,"items"],["for","videoChannelId"],[1,"form-group-description"],["inputId","videoChannelId","formControlName","videoChannelId",3,"items"],["type","submit",1,"peertube-button","primary-button",3,"value","disabled"],["aria-current","page",1,"breadcrumb-item","active"],[3,"routerLink"],["inputName","insertAtFirstPosition","formControlName","insertAtFirstPosition","labelText",x],["ngProjectAs","description",5,["description"]]];},template:function(i,r){i&1&&(f(0,ys,2,1,"my-alert",14),c(1,"div",15)(2,"div",16)(3,"nav",17)(4,"ol",18)(5,"li",19)(6,"a",20),g(7,0),s()(),f(8,Ms,2,0,"li",21)(9,Ps,4,1),s()(),f(10,Is,2,0,"h2",22)(11,Ts,2,0,"h2",22),s(),c(12,"div",23)(13,"form",24),E("ngSubmit",function(){return r.formValidated();}),c(14,"div",25)(15,"label",26),g(16,1),s(),v(17,"my-image-input",27),s(),c(18,"div",25)(19,"label",28),g(20,2),s(),v(21,"input",29),f(22,Rs,2,1,"div",30),s(),c(23,"div",25)(24,"label",31),g(25,3),s(),v(26,"my-help",32)(27,"my-markdown-textarea",33),s(),c(28,"div",25)(29,"label",34),g(30,4),s(),v(31,"my-select-options",35),f(32,Os,2,1,"div",30),s(),c(33,"div",25)(34,"label",36),g(35,5),s(),f(36,bs,5,1,"div",37),v(37,"my-select-channel",38),f(38,As,2,1,"div",30),s(),f(39,Ls,8,0,"div",25),v(40,"input",39),s()()()),i&2&&(C(r.error?0:-1),l(8),C(r.isCreation()?8:9),l(2),C(r.isCreation()?10:11),l(3),u("formGroup",r.form),l(8),u("ngClass",k(16,Ss,r.formErrors.displayName)),l(),C(r.formErrors.displayName?22:-1),l(5),u("formError",r.formErrors.description),l(4),u("items",r.videoPlaylistPrivacies),l(),C(r.formErrors.privacy?32:-1),l(4),C(r.isEditor()?36:-1),l(),u("items",r.userVideoChannels),l(),C(r.formErrors.videoChannelId?38:-1),l(),C(r.isCreation()&&r.form.value.videoChannelId?39:-1),l(),u("value",Be(r.getFormButtonTitle()))("disabled",!r.form.valid));},dependencies:[de,ee,te,W,Ct,ft,q,Ge,We,Xe,He,fi,ui,Ci,mi,tt,yt,et],styles:[`input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:340px;max-width:340px;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width:380px){input[type=text][_ngcontent-%COMP%]{width:100%}}.peertube-select-container[_ngcontent-%COMP%]{width:340px}@media screen and (max-width:370px){.peertube-select-container[_ngcontent-%COMP%]{width:100%}}my-select-channel[_ngcontent-%COMP%], my-select-options[_ngcontent-%COMP%]{display:block;max-width:340px}.content-col[_ngcontent-%COMP%]{max-width:500px}my-image-input[_ngcontent-%COMP%]{width:223px;height:122px}
/*# sourceMappingURL=my-video-playlist-edit.component-V7C7NDGN.css.map */`]}));let o=e;return o;})();var Cr=br(Ar());var Ns=o=>({active:o}),Ds=o=>({"has-collaborator-state":o});function ws(o,e){o&1&&v(0,"my-collaborator-state",4);}function xs(o,e){o&1&&v(0,"my-collaborator-state",5);}function Ys(o,e){if(o&1&&f(0,ws,1,0,"my-collaborator-state",4)(1,xs,1,0,"my-collaborator-state",5),o&2){let n=m();C(n.user.isEditorOfChannel(n.channel())?0:1);}}var xi=(()=>{let e=class e{authService=p(z);checked=wt(!1);channel=X.required();inputName=X(void 0);label=X("Toggle this channel");get user(){return this.authService.getUser();}propagateChange=t=>{};writeValue(t){this.checked.set(t);}registerOnChange(t){this.propagateChange=t;}registerOnTouched(){}toggle(){this.checked.set(!this.checked()),this.propagateChange(this.checked());}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-channel-toggle"]],inputs:{checked:[1,"checked"],channel:[1,"channel"],inputName:[1,"inputName"],label:[1,"label"]},outputs:{checked:"checkedChange"},features:[mt([{provide:Ln,useExisting:$i(()=>e),multi:!0}])],decls:6,vars:10,consts:[[1,"root","button-unstyle",3,"click","ngClass","title"],["actorType","channel","size","34",3,"actor"],[1,"info",3,"ngClass"],[1,"name"],["small","true","type","accepted"],["small","true","type","owner"]],template:function(i,r){i&1&&(c(0,"button",0),E("click",function(){return r.toggle();}),v(1,"my-actor-avatar",1),c(2,"div",2)(3,"div",3),y(4),s(),f(5,Ys,2,1),s()()),i&2&&(u("ngClass",k(6,Ns,r.checked()))("title",r.label()),l(),u("actor",r.channel()),l(),u("ngClass",k(8,Ds,r.user.isCollaboratingToChannels())),l(2),R(r.channel().displayName),l(),C(r.user.isCollaboratingToChannels()?5:-1));},dependencies:[de,ee,Re,vt],styles:[`.root[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;text-align:start;line-height:1.2;padding-inline-start:17px}.root[_ngcontent-%COMP%]:hover{opacity:.9}.info[_ngcontent-%COMP%]{border-radius:4px;background-color:var(--bg-secondary-400);max-width:150px;padding-top:.75rem;padding-bottom:.75rem;padding-inline-start:25px;padding-inline-end:1rem}.info[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{color:var(--fg-400);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.875rem}.info.has-collaborator-state[_ngcontent-%COMP%]{padding-top:.5rem;padding-bottom:.5rem}my-actor-avatar[_ngcontent-%COMP%]{position:absolute;left:0;border:2px solid var(--bg-secondary-400);border-radius:5px}.root.active[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{background-color:var(--bg-secondary-450)}.root.active[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-weight:700}.root.active[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{border-color:var(--bg-secondary-450);background-color:var(--bg-secondary-450)}
/*# sourceMappingURL=channel-toggle.component-ONNTWUQO.css.map */`]}));let o=e;return o;})();var Vs=["table"],$s=o=>["/my-library/video-playlists",o],Fs=o=>["/c",o],ks=o=>["update",o],zs=(o,e)=>e.id;function Bs(o,e){if(o&1){let n=N();c(0,"my-channel-toggle",18),ge("ngModelChange",function(i){let r=P(n).$implicit;return he(r.selected,i)||(r.selected=i),I(i);}),E("ngModelChange",function(){let i=P(n).$implicit,r=m();return I(r.onChannelFilter(i));}),s();}if(o&2){let n=e.$implicit;u("channel",n),ue("ngModel",n.selected);}}function Us(o,e){if(o&1&&($(0),g(1,9),H(2,"myNumberFormatter"),F()),o&2){let n=m().$implicit,t=m();l(2),B(n)(ce(2,3,n))(t.getFilteredChannel().displayName),U(1);}}function Gs(o,e){if(o&1&&($(0),g(1,10),H(2,"myNumberFormatter"),F()),o&2){let n=m().$implicit;l(2),B(n)(ce(2,2,n)),U(1);}}function Hs(o,e){if(o&1&&f(0,Us,3,5,"ng-container")(1,Gs,3,4,"ng-container"),o&2){let n=m();C(n.getFilteredChannel()?0:1);}}function Xs(o,e){if(o&1){let n=N();c(0,"my-advanced-input-filter",19),E("search",function(i){P(n),m();let r=j(9);return I(r.onSearch(i));}),s(),c(1,"a",20),v(2,"my-global-icon",21),$(3),g(4,11),F(),s();}}function Ws(o,e){if(o&1&&(c(0,"td",22),y(1),s()),o&2){let n=m().$implicit;l(),Y(" ",n.videoChannelPosition," ");}}function js(o,e){if(o&1&&(c(0,"td"),v(1,"my-video-playlist-miniature",23),s()),o&2){let n=m().$implicit;l(),u("playlist",n);}}function Qs(o,e){o&1&&v(0,"my-collaborator-state",27);}function Zs(o,e){o&1&&v(0,"my-collaborator-state",28);}function qs(o,e){if(o&1&&f(0,Qs,1,0,"my-collaborator-state",27)(1,Zs,1,0,"my-collaborator-state",28),o&2){let n=m(3).$implicit,t=m();C(t.user.isOwnerOfChannel(n.videoChannel)?0:t.user.isEditorOfChannel(n.videoChannel)?1:-1);}}function Ks(o,e){if(o&1&&(c(0,"a",26)(1,"span"),y(2),s(),f(3,qs,2,1),s()),o&2){let n=m(2).$implicit,t=m();u("routerLink",k(3,Fs,n.videoChannel.name)),l(2),R(n.videoChannel.displayName),l(),C(t.user.isCollaboratingToChannels()?3:-1);}}function Js(o,e){if(o&1&&(c(0,"td")(1,"div",24)(2,"a",25),y(3),s(),f(4,Ks,4,5,"a",26),s()()),o&2){let n=m().$implicit;l(2),u("routerLink",k(3,$s,n.shortUUID)),l(),Y(" ",n.displayName," "),l(),C(n.videoChannel?4:-1);}}function el(o,e){if(o&1&&(c(0,"td"),v(1,"my-privacy-badge",29),s()),o&2){let n=m().$implicit;l(),u("playlist",n);}}function tl(o,e){if(o&1&&(c(0,"td"),y(1),H(2,"ptDate"),s()),o&2){let n=m().$implicit;l(),Y(" ",ve(2,1,n.updatedAt,"short")," ");}}function il(o,e){if(o&1&&(f(0,Ws,2,1,"td",22),f(1,js,2,1,"td"),f(2,Js,5,5,"td"),f(3,el,2,1,"td"),f(4,tl,3,4,"td")),o&2){m();let n=j(9);C(n.isColumnDisplayed("videoChannelPosition")?0:-1),l(),C(n.isColumnDisplayed("videos")?1:-1),l(),C(n.isColumnDisplayed("name")?2:-1),l(),C(n.isColumnDisplayed("privacy")?3:-1),l(),C(n.isColumnDisplayed("updatedAt")?4:-1);}}function nl(o,e){if(o&1){let n=N();v(0,"my-edit-button",30),c(1,"my-delete-button",31),E("click",function(){P(n);let i=m().$implicit,r=m();return I(r.deleteVideoPlaylist(i));}),s();}if(o&2){let n=m().$implicit;u("ptRouterLink",k(1,ks,n.shortUUID));}}function ol(o,e){if(o&1&&f(0,nl,2,3),o&2){let n=e.$implicit,t=m();C(t.isRegularPlaylist(n)?0:-1);}}function rl(o,e){if(o&1&&y(0),o&2){let n=e.$implicit;Y(" ",n.description," ");}}function al(o,e){if(o&1&&y(0),o&2){let n=e.$implicit,t=m();Y(" ",t.getNoResults(n)," ");}}var fr=(0,Cr.default)("peertube:my-video-playlists"),Sr=(()=>{let e=class e{notifier=p(w);confirmService=p(Ze);videoPlaylistService=p(Oe);auth=p(z);headerService=p(di);cdr=p(ut);screenService=p(li);table=Z("table");user;channels=[];onDataSubject=new A();columns=[];customUpdateUrl;customParseQueryParams;dataLoader;hasExpandedRow;playlistsAfterDrop=[];playlistsBeforeDrop=[];paginationStart=0;constructor(){this.customUpdateUrl=this._customUpdateUrl.bind(this),this.customParseQueryParams=this._customParseQueryParams.bind(this),this.dataLoader=this._dataLoader.bind(this),this.hasExpandedRow=this._hasExpandedRow.bind(this);}ngOnInit(){this.headerService.setSearchHidden(!0),this.user=this.auth.getUser(),this.columns=[{id:"videoChannelPosition",label:"Position",selected:!0,sortable:!0,isDisplayed:()=>this.hasReorderableRows()},{id:"videos",label:"\u0641\u06CC\u0644\u0645\u200C\u0647\u0627",selected:!0,sortable:!1},{id:"name",label:"\u0646\u0627\u0645",selected:!0,sortable:!0},{id:"privacy",label:"\u062D\u0631\u06CC\u0645 \u062E\u0635\u0648\u0635\u06CC",selected:!0,sortable:!1},{id:"updatedAt",label:"\u0628\u0647 \u0631\u0648\u0632 \u0634\u062F\u0647",selected:!0,sortable:!0}];}ngOnDestroy(){this.headerService.setSearchHidden(!1);}_customParseQueryParams(t){this.user=this.auth.getUser(),this.channels=[...this.user.videoChannels,...this.user.videoChannelCollaborations].map(i=>se(ie({},i),{selected:t.channelName===i.name})),this.cdr.detectChanges();}getNoResults(t){return t?"No playlists found matching your search.":this.getFilteredChannel()?"No playlists found in selected channels.":"You don't have any playlists published yet.";}_customUpdateUrl(){return{channelName:this.getFilteredChannel()?.name};}deleteVideoPlaylist(t){return Ye(this,null,function*(){(yield this.confirmService.confirm("\u0622\u06CC\u0627 \u0648\u0627\u0642\u0639\u0627 \u0645\u06CC \u062E\u0648\u0627\u0647\u06CC\u062F "+t.displayName+" \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F\u061F ","\u062D\u0630\u0641"))!==!1&&this.videoPlaylistService.removeVideoPlaylist(t).subscribe({next:()=>{this.table().loadData(),this.notifier.success("\u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634 "+t.displayName+" \u062D\u0630\u0641 \u0634\u062F.");},error:r=>this.notifier.handleError(r)});});}isRegularPlaylist(t){return t.type.id===oi.REGULAR;}onRowReorder(t){let{dragIndex:i,dropIndex:r}=t,a=i-this.paginationStart,d=r-this.paginationStart,_=this.playlistsBeforeDrop[a],S=this.playlistsBeforeDrop[d];if(fr("onRowReorder",{previousIndex:a,newIndex:d,dragPlaylist:_,dropAfterPlaylist:S}),a===d)return;let M=_.videoChannelPosition,L=S.videoChannelPosition;M>L&&L--,fr("Will reorder",{oldPosition:M,insertAfter:L});for(let O=1;O<=this.playlistsAfterDrop.length;O++)this.playlistsAfterDrop[O-1].videoChannelPosition=O+this.paginationStart;this.videoPlaylistService.reorderPlaylistsOfChannel(this.getFilteredChannel().name,M,L).subscribe({next:()=>{this.table().loadData({skipLoader:!this.screenService.isInTouchScreen()}),this.notifier.success("Playlists reordered");},error:O=>this.notifier.handleError(O)});}onChannelFilter(t){for(let i of this.channels)i.id!==t.id&&(i.selected=!1);this.table().onFilter();}hasReorderableRows(){return!!this.getFilteredChannel();}_dataLoader(t){let{pagination:i,sort:r,search:a}=t;this.paginationStart=i.start;let d=this.getFilteredChannel();return(d?this.videoPlaylistService.listChannelPlaylists({videoChannel:{nameWithHost:Un.CREATE_BY_STRING(d.name,d.host)},includeCollaborations:!0,restPagination:i,sort:r,search:a}):this.videoPlaylistService.listAccountPlaylists({account:this.user.account,includeCollaborations:!0,restPagination:i,sort:r,search:a})).pipe($e(({data:S})=>{this.playlistsAfterDrop=S,this.playlistsBeforeDrop=[...S];}));}_hasExpandedRow(t){return!!t.description;}getFilteredChannel(){return this.channels.find(t=>t.selected);}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],viewQuery:function(i,r){i&1&&J(r.table,Vs,5),i&2&&Q();},decls:22,vars:6,consts:()=>{let t;t="playlists per page";let i;i="Drag and drop this row to reorder playlists in your channel";let r;r="Filter by a channel";let a;a="This allows you to reorder playlists assigned to it";let d;d="{VAR_PLURAL, plural, =0 {No playlist} =1 {1 playlist} other {{INTERPOLATION} playlists}}",d=le(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let _;_=""+d+" in "+"\uFFFD2\uFFFD"+" channel";let S;S="{VAR_PLURAL, plural, =0 {No playlist} =1 {1 playlist} other {{INTERPOLATION} playlists}}",S=le(S,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let M;M="Search your playlists";let L;return L="\u0627\u06CC\u062C\u0627\u062F \u0641\u0647\u0631\u0633\u062A \u067E\u062E\u0634",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["expandedRow",""],["noResults",""],r,a,_,S,L,[1,"form-group"],[1,"label"],[1,"form-group-description"],[1,"channel-filters"],[3,"channel","ngModel"],["key","MyVideoPlaylistsComponent","defaultSort","updatedAt","paginatorText",t,"defaultRowsPerPage","10","columnConfig","false","dragHandleTitle",i,3,"rowReorder","defaultColumns","dataLoader","customParseQueryParams","customUpdateUrl","hasExpandedRow","reorderableRows"],[3,"ngModelChange","channel","ngModel"],["inputId","table-search","icon","true","emitOnInit","false","placeholder",M,3,"search"],["routerLink","create",1,"peertube-create-button"],["iconName","add","aria-hidden","true"],[2,"width","10px"],["thumbnailOnly","true","toManage","true",3,"playlist"],[1,"name-container"],[1,"name",3,"routerLink"],[1,"channel-sub-link-in-cell",3,"routerLink"],["type","owner","small","true",1,"ms-2"],["type","accepted","small","true",1,"ms-2"],[3,"playlist"],["label","",3,"ptRouterLink"],["label","",3,"click"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",12)(1,"div",13),g(2,7),s(),c(3,"div",14),g(4,8),s(),c(5,"div",15),ne(6,Bs,1,2,"my-channel-toggle",16,zs),s()(),c(8,"my-table",17,0),E("rowReorder",function(_){return P(a),I(r.onRowReorder(_));}),K(10,Hs,2,1,"ng-template",null,1,D)(12,Xs,5,0,"ng-template",null,2,D)(14,il,5,5,"ng-template",null,3,D)(16,ol,1,1,"ng-template",null,4,D)(18,rl,1,1,"ng-template",null,5,D)(20,al,1,1,"ng-template",null,6,D),s();}i&2&&(l(6),oe(r.channels),l(2),u("defaultColumns",r.columns)("dataLoader",r.dataLoader)("customParseQueryParams",r.customParseQueryParams)("customUpdateUrl",r.customUpdateUrl)("hasExpandedRow",r.hasExpandedRow)("reorderableRows",r.hasReorderableRows()));},dependencies:[W,q,Te,qe,fe,te,Pi,gi,co,xi,Le,Ti,ur,vt,be,Ae],styles:[`.channel-filters[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:1rem;border-bottom:1px solid var(--bg-secondary-400);margin-bottom:1rem;gap:1rem;overflow:hidden}.channel-filters[_ngcontent-%COMP%]:hover{overflow:auto}.name[_ngcontent-%COMP%]{color:var(--fg);line-height:1rem;font-weight:700;text-decoration:none}.name-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}my-video-playlist-miniature[_ngcontent-%COMP%]{display:block;width:130px}
/*# sourceMappingURL=my-video-playlists.component-BYPSTI5W.css.map */`]}));let o=e;return o;})();var vr=(()=>{let e=class e{serverService=p(pe);newFeatureInfoService=p(bi);menuEntries=[];serverConfig;ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.buildMenu(),this.newFeatureInfoService.showChannelCollaboration();}buildMenu(){this.menuEntries=[{label:"Manage my videos",routerLink:"/my-library/videos"},{label:"\u062F\u06CC\u062F\u06AF\u0627\u0647\u200C\u0647\u0627",routerLink:"/my-library/comments-on-my-videos",children:[{label:"Comments on my videos",routerLink:"/my-library/comments-on-my-videos"},{label:"Watched words",routerLink:"/my-library/watched-words/list"},{label:"Auto tag policies",routerLink:"/my-library/auto-tag-policies"}]},{label:"More",routerLink:this.isVideoImportEnabled()?"/my-library/video-imports":"/my-library/ownership",children:[{label:"Imports",routerLink:"/my-library/video-imports",isDisplayed:()=>this.isVideoImportEnabled()},{label:"\u062A\u063A\u06CC\u06CC\u0631 \u0645\u0627\u0644\u06A9\u06CC\u062A",routerLink:"/my-library/ownership"}]}];}isVideoImportEnabled(){let t=this.serverConfig.import.videos;return t.http.enabled||t.torrent.enabled;}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:8,vars:1,consts:()=>{let t;t="\u0641\u06CC\u0644\u0645\u200C\u0647\u0627\u06CC \u0645\u0646";let i;return i="Skip the sub menu",[["myVideoSpaceContent",""],i,[1,"root"],[1,"margin-content"],["href","#my-video-space-content",1,"visually-hidden-focusable","skip-to-content-sub-menu",3,"click"],["h1Icon","videos","h1",t,3,"menuEntries"],["tabindex","-1","id","my-video-space-content",1,"margin-content","pb-5","outline-0"]];},template:function(i,r){if(i&1){let a=N();c(0,"div",2)(1,"div",3)(2,"a",4),E("click",function(_){P(a);let S=j(6);return _.preventDefault(),I(S.focus());}),g(3,1),s(),v(4,"my-horizontal-menu",5),s(),c(5,"div",6,0),v(7,"router-outlet"),s()();}i&2&&(l(4),u("menuEntries",r.menuEntries));},dependencies:[gt,Mt],encapsulation:2}));let o=e;return o;})();function sl(o,e){if(o&1&&(c(0,"span",0),y(1),s()),o&2){let n=m();u("ngClass",n.badgeClass),l(),R(n.label);}}var yr=(()=>{let e=class e{video=X.required();states={[G.PUBLISHED]:"badge-green",[G.TO_TRANSCODE]:"badge-brown",[G.TO_IMPORT]:"badge-brown",[G.TO_IMPORT_FAILED]:"badge-red",[G.WAITING_FOR_LIVE]:"badge-blue",[G.LIVE_ENDED]:"badge-green",[G.TO_MOVE_TO_EXTERNAL_STORAGE]:"badge-brown",[G.TRANSCODING_FAILED]:"badge-red",[G.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED]:"badge-red",[G.TO_EDIT]:"badge-brown",[G.TO_MOVE_TO_FILE_SYSTEM]:"badge-brown",[G.TO_MOVE_TO_FILE_SYSTEM_FAILED]:"badge-brown"};label;badgeClass;ngOnChanges(){this.buildBadgeAndLabel();}buildBadgeAndLabel(){let t=this.video();if(!t.state){this.label="";return;}let i=t.state.id;switch(this.badgeClass=this.states[t.state.id],i){case G.PUBLISHED:if(t.privacy.id===_e.PRIVATE){this.label="In your library",this.badgeClass="badge-grey";return;}if(t.privacy.id===_e.INTERNAL){this.label="Internal",this.badgeClass="badge-blue";return;}this.label="\u0632\u0645\u0627\u0646 \u0627\u0646\u062A\u0634\u0627\u0631";return;case G.WAITING_FOR_LIVE:this.label="Waiting live";return;case G.LIVE_ENDED:this.label="Live ended";return;case G.TRANSCODING_FAILED:this.label="\u062A\u063A\u06CC\u06CC\u0631 \u06A9\u062F \u0646\u0627\u0645\u0648\u0641\u0642 \u0628\u0648\u062F";return;case G.TO_MOVE_TO_FILE_SYSTEM:this.label="Moving to file system";return;case G.TO_MOVE_TO_FILE_SYSTEM_FAILED:this.label="Moving to file system failed";return;case G.TO_MOVE_TO_EXTERNAL_STORAGE:this.label="Moving to external storage";return;case G.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED:this.label="\u0627\u0646\u062A\u0642\u0627\u0644 \u0628\u0647 \u0630\u062E\u06CC\u0631\u0647\u200C\u0633\u0627\u0632 \u0628\u06CC\u0631\u0648\u0646\u06CC \u0645\u0648\u0641\u0642\u06CC\u062A\u200C\u0622\u0645\u06CC\u0632 \u0646\u0628\u0648\u062F";return;case G.TO_TRANSCODE:this.label=this.video().waitTranscoding===!0?"\u062F\u0631 \u062D\u0627\u0644 \u0627\u0646\u062A\u0638\u0627\u0631 \u0628\u0631\u0627\u06CC \u062A\u063A\u06CC\u06CC\u0631 \u06A9\u062F":"\u062F\u0631\u062D\u0627\u0644 \u062A\u063A\u06CC\u06CC\u0631 \u06A9\u062F";return;case G.TO_IMPORT:this.label="\u062F\u0631\u062D\u0627\u0644 \u0648\u0627\u0631\u062F \u06A9\u0631\u062F\u0646";return;case G.TO_IMPORT_FAILED:this.label="Import failed";return;case G.TO_EDIT:this.label="\u062F\u0631\u062D\u0627\u0644 \u0648\u06CC\u0631\u0627\u06CC\u0634";return;default:return i;}}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-video-state-badge"]],inputs:{video:[1,"video"]},features:[Nt],decls:1,vars:1,consts:[[1,"pt-badge",3,"ngClass"]],template:function(i,r){i&1&&f(0,sl,2,2,"span",0),i&2&&C(r.label?0:-1);},dependencies:[de,ee],encapsulation:2}));let o=e;return o;})();var ll=["videoChangeOwnershipModal"],cl=["table"],dl=()=>[],_l=o=>["/w/p/",o],pl=o=>["/videos/manage",o,"stats"],ml=o=>["/videos","manage",o],ul=(o,e)=>e.id;function hl(o,e){if(o&1){let n=N();c(0,"my-channel-toggle",18),ge("ngModelChange",function(i){let r=P(n).$implicit;return he(r.selected,i)||(r.selected=i),I(i);}),E("ngModelChange",function(){P(n),m();let i=j(6);return I(i.onFilter());}),s();}if(o&2){let n=e.$implicit;u("channel",n),ue("ngModel",n.selected);}}function gl(o,e){if(o&1&&($(0),g(1,7),H(2,"myNumberFormatter"),F()),o&2){let n=e.$implicit;l(2),B(n)(ce(2,2,n)),U(1);}}function fl(o,e){if(o&1){let n=N();c(0,"div",19)(1,"label",20),g(2,8),s(),c(3,"my-advanced-input-filter",21),E("search",function(i){P(n),m();let r=j(6);return I(r.onSearch(i,!0));}),s()(),c(4,"div",19)(5,"label",22),g(6,9),s(),c(7,"my-select-checkbox",23),ge("ngModelChange",function(i){P(n);let r=m();return he(r.selectedFilterItems,i)||(r.selectedFilterItems=i),I(i);}),E("ngModelChange",function(){P(n),m();let i=j(6);return I(i.onFilter());}),s()();}if(o&2){let n=m();l(7),u("availableItems",n.filterItems)("selectableGroup",!1),ue("ngModel",n.selectedFilterItems);}}function Cl(o,e){if(o&1&&(c(0,"td"),v(1,"my-video-cell",24),s()),o&2){let n=m().$implicit;l(),u("video",n);}}function Sl(o,e){if(o&1&&(c(0,"td"),v(1,"my-video-cell",25),s()),o&2){let n=m().$implicit;l(),u("video",n);}}function vl(o,e){if(o&1&&(c(0,"span",28),g(1,10),s()),o&2){let n=m(2).$implicit;u("ngbTooltip",n.blacklistedReason);}}function yl(o,e){if(o&1&&(c(0,"td")(1,"div",26),v(2,"my-privacy-badge",27),f(3,vl,2,1,"span",28),s()()),o&2){let n=m().$implicit;l(2),u("video",n),l(),C(n.blacklisted?3:-1);}}function Ml(o,e){if(o&1&&(c(0,"td"),v(1,"my-video-nsfw-badge",27),s()),o&2){let n=m().$implicit;l(),u("video",n);}}function El(o,e){if(o&1&&(c(0,"a",30),y(1),s()),o&2){let n=e.$implicit;u("routerLink",k(2,_l,n.playlistShortUUID)),l(),Y(" ",n.playlistDisplayName," ");}}function Pl(o,e){if(o&1&&(c(0,"td")(1,"div",29),ne(2,El,2,4,"a",30,ze),s()()),o&2){let n=m().$implicit,t=m();l(2),oe(t.videosContainedInPlaylists[n.id]||En(0,dl));}}function Il(o,e){if(o&1&&(v(0,"br"),$(1),g(2,12),H(3,"myNumberFormatter"),F()),o&2){let n=m(2).$implicit;l(3),B(n.viewers)(ce(3,2,n.views)),U(2);}}function Tl(o,e){if(o&1&&(c(0,"td")(1,"a",31),$(2),g(3,11),H(4,"myNumberFormatter"),F(),f(5,Il,4,4),s()()),o&2){let n=m().$implicit;l(),u("routerLink",k(6,pl,n.shortUUID)),l(3),B(n.views)(ce(4,4,n.views)),U(3),l(),C(n.isLive?5:-1);}}function Rl(o,e){if(o&1&&(c(0,"td")(1,"span"),g(2,13),H(3,"myNumberFormatter"),s()()),o&2){let n=m().$implicit;l(3),B(n.comments)(ce(3,2,n.comments)),U(2);}}function Ol(o,e){if(o&1&&(c(0,"td"),y(1),H(2,"ptDate"),s()),o&2){let n=m().$implicit;l(),Y(" ",ve(2,1,n.publishedAt,"short")," ");}}function bl(o,e){if(o&1&&(c(0,"td"),v(1,"my-video-state-badge",27),s()),o&2){let n=m().$implicit;l(),u("video",n);}}function Al(o,e){if(o&1&&y(0),o&2){let n=m(2).$implicit;Y(" ",n.language.label," ");}}function Ll(o,e){if(o&1&&(c(0,"td"),f(1,Al,1,1),s()),o&2){let n=m().$implicit;l(),C(n.language!=null&&n.language.id?1:-1);}}function Nl(o,e){if(o&1&&(f(0,Cl,2,1,"td"),f(1,Sl,2,1,"td"),f(2,yl,4,2,"td"),f(3,Ml,2,1,"td"),f(4,Pl,4,1,"td"),f(5,Tl,6,8,"td"),f(6,Rl,4,4,"td"),f(7,Ol,3,4,"td"),f(8,bl,2,1,"td"),f(9,Ll,2,1,"td")),o&2){m();let n=j(6);C(n.isColumnDisplayed("duration")?0:-1),l(),C(n.isColumnDisplayed("name")?1:-1),l(),C(n.isColumnDisplayed("privacy")?2:-1),l(),C(n.isColumnDisplayed("sensitive")?3:-1),l(),C(n.isColumnDisplayed("playlists")?4:-1),l(),C(n.isColumnDisplayed("insights")?5:-1),l(),C(n.isColumnDisplayed("comments")?6:-1),l(),C(n.isColumnDisplayed("published")?7:-1),l(),C(n.isColumnDisplayed("state")?8:-1),l(),C(n.isColumnDisplayed("language")?9:-1);}}function Dl(o,e){if(o&1){let n=N();v(0,"my-button",32),c(1,"my-video-actions-dropdown",33),E("videoRemoved",function(){P(n),m();let i=j(6);return I(i.loadData());})("videoFilesRemoved",function(){P(n),m();let i=j(6);return I(i.loadData());})("transcodingCreated",function(){P(n),m();let i=j(6);return I(i.loadData());})("videoExistsInPlaylistChange",function(){let i=P(n).$implicit,r=m();return I(r.fetchVideosContainedInPlaylists([i]));}),s();}if(o&2){let n=e.$implicit,t=m();u("ptRouterLink",k(3,ml,n.shortUUID)),l(),u("video",n)("displayOptions",t.videoActionsOptions);}}function wl(o,e){if(o&1&&y(0),o&2){let n=e.$implicit,t=m();Y(" ",t.getNoResults(n)," ");}}var Mr=(()=>{let e=class e{confirmService=p(Ze);auth=p(z);notifier=p(w);videoService=p(Jn);playlistService=p(Oe);server=p(pe);headerService=p(di);videoChangeOwnershipModal=Z("videoChangeOwnershipModal");table=Z("table");videosContainedInPlaylists={};bulkActions=[];videoActionsOptions={playlist:!0,download:!0,update:!1,blacklist:!1,delete:!0,report:!1,duplicate:!1,mute:!1,liveInfo:!0,removeFiles:!1,transcoding:!1};user;channels=[];filterItems=[];selectedFilterItems=[];columns=[];customUpdateUrl;customParseQueryParams;dataLoader;constructor(){this.customUpdateUrl=this._customUpdateUrl.bind(this),this.customParseQueryParams=this._customParseQueryParams.bind(this),this.dataLoader=this._dataLoader.bind(this);}get serverConfig(){return this.server.getHTMLConfig();}ngOnInit(){this.headerService.setSearchHidden(!0),this.user=this.auth.getUser(),this.columns=[{id:"duration",label:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646",selected:!0,sortable:!0},{id:"name",label:"\u0646\u0627\u0645",selected:!0,sortable:!0},{id:"privacy",label:"\u062D\u0631\u06CC\u0645 \u062E\u0635\u0648\u0635\u06CC",selected:!0,sortable:!1},{id:"sensitive",label:"\u0645\u062D\u062A\u0648\u0627\u064A \u062D\u0633\u0627\u0633",selected:!0,sortable:!1},{id:"playlists",label:"\u0641\u0647\u0631\u0633\u062A\u200C\u0647\u0627\u06CC \u067E\u062E\u0634",selected:!0,sortable:!1},{id:"insights",label:"Insights",selected:!0,sortable:!0,sortKey:"views"},{id:"comments",label:"\u062F\u06CC\u062F\u06AF\u0627\u0647\u200C\u0647\u0627",selected:!0,sortable:!0},{id:"published",label:"\u0632\u0645\u0627\u0646 \u0627\u0646\u062A\u0634\u0627\u0631",selected:!0,sortable:!0,sortKey:"publishedAt"},{id:"state",label:"\u0648\u0636\u0639\u06CC\u062A",selected:!0,sortable:!1},{id:"language",label:"\u0632\u0628\u0627\u0646",selected:!1,sortable:!1}],this.filterItems=[{id:"live",label:"Lives"},{id:"vod",label:"vod"},{id:"public",label:"Public videos"},{id:"internal",label:"Internal videos"},{id:"unlisted",label:"Unlisted videos"},{id:"password-protected",label:"Password protected videos"},{id:"private",label:"Private videos"}],this.buildActions();}ngOnDestroy(){this.headerService.setSearchHidden(!1);}_customParseQueryParams(t){{let i=t.channelNameOneOf?new Set(ri(t.channelNameOneOf)):new Set();this.user=this.auth.getUser(),this.channels=[...this.user.videoChannels,...this.user.videoChannelCollaborations].map(r=>se(ie({},r),{selected:i.has(r.name)}));}{this.selectedFilterItems=[];let i=ri(t.videoType);i.includes("live")&&this.selectedFilterItems.push("live"),i.includes("vod")&&this.selectedFilterItems.push("vod");let r=t.privacyOneOf?new Set(ri(t.privacyOneOf).map(a=>parseInt(a))):new Set();r.has(_e.PUBLIC)&&this.selectedFilterItems.push("public"),r.has(_e.INTERNAL)&&this.selectedFilterItems.push("internal"),r.has(_e.UNLISTED)&&this.selectedFilterItems.push("unlisted"),r.has(_e.PASSWORD_PROTECTED)&&this.selectedFilterItems.push("password-protected"),r.has(_e.PRIVATE)&&this.selectedFilterItems.push("private");}}getNoResults(t){return t||this.selectedFilterItems.length!==0?"No videos found matching your filters.":this.channels.some(i=>i.selected)?"No videos found in selected channels.":"You don't have any videos published yet.";}_customUpdateUrl(){let t=this.channels.filter(i=>i.selected).map(i=>i.name);return se(ie({},ji(this.buildCommonVideoFilters(),["privacyOneOf","videoType"])),{channelNameOneOf:t});}buildCommonVideoFilters(){let t=new Set(this.selectedFilterItems),i,r=[];t.has("live")&&(r.push("live"),t.has("vod")||(i=!0)),t.has("vod")&&(r.push("vod"),t.has("live")||(i=!1));let a=[];return t.has("public")&&a.push(_e.PUBLIC),t.has("internal")&&a.push(_e.INTERNAL),t.has("unlisted")&&a.push(_e.UNLISTED),t.has("password-protected")&&a.push(_e.PASSWORD_PROTECTED),t.has("private")&&a.push(_e.PRIVATE),{isLive:i,videoType:r,privacyOneOf:a};}_dataLoader(t){let{pagination:i,sort:r,search:a}=t,d=this.channels.filter(_=>_.selected).map(_=>_.name);return this.videoService.listMyVideos(ie({restPagination:i,sort:r,search:a,includeCollaborations:!0,channelNameOneOf:d.length!==0?d:void 0},ji(this.buildCommonVideoFilters(),["isLive","privacyOneOf"]))).pipe($e(({data:_})=>this.fetchVideosContainedInPlaylists(_)));}fetchVideosContainedInPlaylists(t){this.playlistService.doVideosExistInPlaylist(t.map(i=>i.id)).subscribe(i=>{this.videosContainedInPlaylists=Object.keys(i).reduce((r,a)=>se(ie({},r),{[a]:Vn(i[+a],d=>d.playlistId)}),this.videosContainedInPlaylists);});}removeVideos(t){return Ye(this,null,function*(){let i=st("\u0622\u06CC\u0627 \u0627\u0632 \u062D\u0630\u0641 \u0627\u06CC\u0646 {count, plural, =1 {\u0627\u06CC\u0646 \u0648\u06CC\u062F\u0626\u0648} other {\u0648\u06CC\u062F\u0626\u0648 {count} \u0627\u06CC\u0646}} \u0627\u0637\u0645\u06CC\u0646\u0627\u0646 \u062F\u0627\u0631\u06CC\u062F\u061F",{count:t.length});(yield this.confirmService.confirm(i,"\u062D\u0630\u0641"))!==!1&&this.videoService.removeVideo(t.map(a=>a.id)).subscribe({next:()=>{this.notifier.success(st("{count, plural, =1 {\u06CC\u06A9 \u0648\u06CC\u062F\u0626\u0648} other {\u0648\u06CC\u062F\u0626\u0648{count}}}\u062D\u0630\u0641 \u0634\u062F.",{count:t.length})),this.table().loadData();},error:a=>this.notifier.handleError(a)});});}buildActions(){this.bulkActions=[[{label:"\u062D\u0630\u0641",handler:t=>this.removeVideos(t),iconName:"delete"}]];}};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["my-videos"]],viewQuery:function(i,r){i&1&&J(r.videoChangeOwnershipModal,ll,5)(r.table,cl,5),i&2&&Q(2);},decls:17,vars:5,consts:()=>{let t;t="videos per page";let i;i="Per channel:";let r;r="{VAR_PLURAL, plural, =0 {\u0628\u062F\u0648\u0646 \u0648\u06CC\u062F\u0626\u0648} =1 {\u06CC\u06A9 \u0648\u06CC\u062F\u0626\u0648} other {{INTERPOLATION}\u0648\u06CC\u062F\u0626\u0648 }}",r=le(r,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let a;a="Search your videos";let d;d="\u0647\u0645\u0647 \u0641\u06CC\u0644\u0645\u200C\u0647\u0627";let _;_="\u062C\u0633\u062A\u062C\u0648";let S;S="\u0641\u06CC\u0644\u062A\u0631";let M;M="\u0645\u0633\u062F\u0648\u062F";let L;L="Navigate to the video stats page";let O;O="{VAR_PLURAL, plural, =0 {\u0628\u062F\u0648\u0646 \u0628\u0627\u0632\u062F\u06CC\u062F} =1 {\u06CC\u06A9 \u0628\u0627\u0632\u062F\u06CC\u062F} other {{INTERPOLATION} \u0628\u0627\u0632\u062F\u06CC\u062F}}",O=le(O,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let ae;ae="{VAR_PLURAL, plural, =0 {No viewers} =1 {1 viewer} other {{INTERPOLATION} viewers}}",ae=le(ae,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let me;me="{VAR_PLURAL, plural, =0 {No comments} =1 {1 comment} other {{INTERPOLATION} comments}}",me=le(me,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let Ee;return Ee="Manage",[["table",""],["totalTitle",""],["captionRight",""],["tableCells",""],["actionCell",""],["noResults",""],i,r,_,S,M,O,ae,me,[1,"channel-filters"],[1,"channel-label"],[3,"channel","ngModel"],["key","MyVideosComponent","defaultSort","publishedAt","paginatorText",t,"defaultRowsPerPage","5",3,"defaultColumns","bulkActions","dataLoader","customParseQueryParams","customUpdateUrl"],[3,"ngModelChange","channel","ngModel"],[1,"d-flex","align-items-center"],["for","table-search",1,"label-inline","d-none","d-inline-block-mw"],["inputId","table-search","icon","true","emitOnInit","false","placeholder",a,3,"search"],["for","table-filter",1,"label-inline"],["inputId","table-filter","showToggleAll","false","showClear","true","placeholder",d,3,"ngModelChange","availableItems","selectableGroup","ngModel"],["thumbnail","true","title","false",3,"video"],["thumbnail","false","title","true","displayEditorInfo","true",1,"video-cell-name",3,"video"],[1,"pt-badges-container"],[3,"video"],[1,"pt-badge","badge-red",3,"ngbTooltip"],[1,"badges","playlists"],[1,"pt-badge","badge-secondary","pt-badge-keep-case",3,"routerLink"],["title",L,1,"pt",3,"routerLink"],["label",Ee,"theme","secondary","icon","film","responsiveLabel","true",1,"me-3",3,"ptRouterLink"],["placement","bottom auto","buttonIcon","more-horizontal","buttonStyled","true",3,"videoRemoved","videoFilesRemoved","transcodingCreated","videoExistsInPlaylistChange","video","displayOptions"]];},template:function(i,r){i&1&&(c(0,"div",14)(1,"div",15),g(2,6),s(),ne(3,hl,1,2,"my-channel-toggle",16,ul),s(),c(5,"my-table",17,0),K(7,gl,3,4,"ng-template",null,1,D)(9,fl,8,3,"ng-template",null,2,D)(11,Nl,10,10,"ng-template",null,3,D)(13,Dl,2,5,"ng-template",null,4,D)(15,wl,1,1,"ng-template",null,5,D),s()),i&2&&(l(3),oe(r.channels),l(2),u("defaultColumns",r.columns)("bulkActions",r.bulkActions)("dataLoader",r.dataLoader)("customParseQueryParams",r.customParseQueryParams)("customUpdateUrl",r.customUpdateUrl));},dependencies:[W,q,Te,fe,Ke,Bn,zn,no,Ii,te,yr,xi,Wn,ao,Le,Ti,be,Ae],styles:[`my-select-checkbox[_ngcontent-%COMP%]{min-width:250px}.pt-badge[_ngcontent-%COMP%]{margin-inline-end:.3125rem}.playlists[_ngcontent-%COMP%]   .pt-badge[_ngcontent-%COMP%]{max-width:200px;vertical-align:bottom;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.video-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex}.video-info[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{position:relative;top:-2px;display:inline-block;width:16px;height:16px;line-height:16px;margin-inline-start:.1875rem}td[_ngcontent-%COMP%]{padding-top:.75rem;padding-bottom:.75rem}.channel-label[_ngcontent-%COMP%]{color:var(--fg-200);font-weight:700;white-space:nowrap}.channel-filters[_ngcontent-%COMP%]{display:flex;align-items:center;padding-bottom:1rem;border-bottom:1px solid var(--bg-secondary-400);margin-bottom:1rem;gap:1rem;overflow:hidden}.channel-filters[_ngcontent-%COMP%]:hover{overflow:auto}@media screen and (min-width:800px){.video-cell-name[_ngcontent-%COMP%]{width:300px;display:block}}@media screen and (max-width:800px){my-video-cell[_ngcontent-%COMP%]{max-width:120px;display:block}}
/*# sourceMappingURL=my-videos.component-CIULYWMY.css.map */`]}));let o=e;return o;})();var Er=(()=>{let e=class e{};h(e,"\u0275fac",function(i){return new(i||e)();}),h(e,"\u0275cmp",T({type:e,selectors:[["ng-component"]],decls:6,vars:0,consts:()=>{let t;t="Comments that contain any of the watched words are automatically tagged with the name of the list.";let i;return i="These automatic tags can be used to filter comments or "+"\uFFFD#4\uFFFD"+"automatically block"+"\uFFFD/#4\uFFFD"+" them.",[t,i,[1,"d-block"],[1,"d-block","mb-3"],["routerLink","/my-account/auto-tag-policies"],["mode","user"]];},template:function(i,r){i&1&&(c(0,"em",2),g(1,0),s(),c(2,"em",3),ti(3,1),v(4,"a",4),ii(),s(),v(5,"my-watched-words-list-admin-owner",5));},dependencies:[lo,te],encapsulation:2}));let o=e;return o;})();var mn={path:"",providers:[eo,io,to,ho,It,Tt,so,_o,ro],resolve:{user:mo},canActivateChild:[Hn]},Tr=[{path:"videos/comments",redirectTo:"comments-on-my-videos",pathMatch:"full"},{path:"comments-on-my-videos",component:Eo,data:{meta:{title:"Comments on your videos"}}},{path:"watched-words/list",component:Er,data:{meta:{title:"Your watched words"}}},{path:"auto-tag-policies",component:Po,data:{meta:{title:"Your automatic tag policies"}}},{path:"videos",component:Mr,data:{meta:{title:"\u0641\u06CC\u0644\u0645\u200C\u0647\u0627\u06CC \u0645\u0646"}}},{path:"video-imports",component:Vo,data:{meta:{title:"\u0648\u06CC\u062F\u06CC\u0648\u06CC \u0647\u0627\u06CC \u0648\u0627\u0631\u062F \u0634\u062F\u0647 \u0645\u0646"}}},{path:"ownership",component:xo,data:{meta:{title:"\u062A\u063A\u06CC\u06CC\u0631 \u0645\u0627\u0644\u06A9\u06CC\u062A"}}}],Rr=[{path:"",redirectTo:"video-channels",pathMatch:"full"},{path:"video-channels",loadChildren:()=>import("./chunk-DMIP226B.js")},{path:"followers",component:Oo,data:{meta:{title:"\u062F\u0646\u0628\u0627\u0644\u200C\u06A9\u0646\u0646\u062F\u06AF\u0627\u0646 \u0645\u0646"}}},{path:"video-channel-syncs",component:Li,data:{meta:{title:"\u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC\u200C\u0647\u0627\u06CC \u0645\u0646"}}},{path:"video-channel-syncs/create",component:Yo,data:{meta:{title:"\u0627\u06CC\u062C\u0627\u062F \u0647\u0645\u0633\u0627\u0646\u200C\u0633\u0627\u0632\u06CC \u062C\u062F\u06CC\u062F"}}}],xl=[{path:"video-playlists",component:Sr,data:{meta:{title:"\u0641\u0647\u0631\u0633\u062A\u200C\u0647\u0627\u06CC \u067E\u062E\u0634 \u0645\u0646"}}},{path:"video-playlists/create",component:$o,data:{meta:{title:"\u0627\u06CC\u062C\u0627\u062F \u0641\u0647\u0631\u0633\u062A \u067E\u062E\u0634 \u062C\u062F\u06CC\u062F"}}},{path:"video-playlists/:videoPlaylistId",component:hr,data:{meta:{title:"\u0639\u0646\u0627\u0635\u0631 \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634"}}},{path:"video-playlists/update/:videoPlaylistId",component:gr,data:{meta:{title:"\u0628\u0647\u200C\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06CC \u0644\u06CC\u0633\u062A\u200C\u067E\u062E\u0634"}}},{path:"subscriptions",component:Ao,data:{meta:{title:"\u0627\u0634\u062A\u0631\u0627\u06A9 \u0647\u0627\u06CC \u0645\u0646"}}},{path:"history/videos",component:No,data:{meta:{title:"\u062A\u0627\u0631\u06CC\u062E\u0686\u0647 \u0648\u06CC\u062F\u0626\u0648 \u0645\u0646"},reuse:{enabled:!0,key:"my-videos-history-list"}}}];function Pr(o){if(o.length===0)return!1;let e=o[0].path;return Tr.some(n=>n.path===e||n.path.startsWith(`${e}/`));}function Ir(o){if(o.length===0)return!1;let e=o[0].path;return Rr.some(n=>n.path===e||n.path.startsWith(`${e}/`));}var Ig=[se(ie({},mn),{component:vr,canMatch:[(o,e)=>Pr(e)],children:Tr}),se(ie({},mn),{component:Ro,canMatch:[(o,e)=>Ir(e)],children:Rr}),se(ie({},mn),{component:Do,canMatch:[(o,e)=>!Pr(e)&&!Ir(e)],children:xl})];export{Ig as default};/**i18n:671d995daee9c68b73ac729b7ab2c3cf3be32c7f1a24d9dfa94e261c45ee5241*///# sourceMappingURL=chunk-HRTLDRTA.js.map