@sync-in/server 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -13
- package/migrations/0001_square_mauler.sql +4 -0
- package/migrations/meta/0001_snapshot.json +2417 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +45 -2
- package/server/app.service.spec.js +4 -4
- package/server/app.service.spec.js.map +1 -1
- package/server/applications/sync/schemas/sync-clients.schema.js +4 -4
- package/server/applications/sync/schemas/sync-clients.schema.js.map +1 -1
- package/server/applications/users/schemas/users.schema.js +4 -4
- package/server/applications/users/schemas/users.schema.js.map +1 -1
- package/server/configuration/config.constants.js +0 -4
- package/server/configuration/config.constants.js.map +1 -1
- package/server/configuration/config.loader.js +2 -2
- package/server/configuration/config.loader.js.map +1 -1
- package/server/infrastructure/database/configuration.js +1 -1
- package/server/infrastructure/database/configuration.js.map +1 -1
- package/server/infrastructure/database/constants.js +19 -5
- package/server/infrastructure/database/constants.js.map +1 -1
- package/static/assets/mimes/7zip.svg +14 -0
- package/static/assets/mimes/application-7zip.svg +14 -0
- package/static/assets/mimes/application-atom+xml.svg +15 -0
- package/static/assets/mimes/application-gzip.svg +16 -0
- package/static/assets/mimes/application-mathml+xml.svg +188 -0
- package/static/assets/mimes/application-mp4.svg +18 -0
- package/static/assets/mimes/application-msexcel.svg +1 -0
- package/static/assets/mimes/application-msword-template.svg +1 -0
- package/static/assets/mimes/application-pgp-encrypted.svg +16 -0
- package/static/assets/mimes/application-pgp-keys.svg +16 -0
- package/static/assets/mimes/application-pgp-signature.svg +16 -0
- package/static/assets/mimes/application-powerpoint.svg +1 -0
- package/static/assets/mimes/application-rdf+xml.svg +14 -0
- package/static/assets/mimes/application-rss+xml.svg +15 -0
- package/static/assets/mimes/application-rtf.svg +14 -0
- package/static/assets/mimes/application-text.svg +14 -0
- package/static/assets/mimes/application-vnd.ms-excel.sheet.binary.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-excel.sheet.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-excel.template.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-powerpoint.presentation.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-powerpoint.template.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-word.document.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-word.svg +1 -0
- package/static/assets/mimes/application-vnd.ms-word.template.macroenabled.12.svg +1 -0
- package/static/assets/mimes/application-vnd.mspowerpoint.svg +1 -0
- package/static/assets/mimes/application-vnd.oasis.opendocument.chart.svg +1 -0
- package/static/assets/mimes/application-vnd.oasis.opendocument.text-master.svg +92 -0
- package/static/assets/mimes/application-vnd.oasis.opendocument.text-web.svg +18 -0
- package/static/assets/mimes/application-vnd.openofficeorg.extension.svg +59 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.presentationml.presentation.svg +1 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.presentationml.slideshow.svg +1 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.spreadsheetml.sheet.svg +1 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.spreadsheetml.template.svg +1 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.wordprocessingml.document.svg +1 -0
- package/static/assets/mimes/application-vnd.openxmlformats-officedocument.wordprocessingml.template.svg +1 -0
- package/static/assets/mimes/application-vnd.rn-realmedia.svg +18 -0
- package/static/assets/mimes/application-vnd.sun.xml.calc.svg +1 -0
- package/static/assets/mimes/application-vnd.sun.xml.writer-global.svg +1 -0
- package/static/assets/mimes/application-vnd.sun.xml.writer-template.svg +1 -0
- package/static/assets/mimes/application-vnd.sun.xml.writer.svg +1 -0
- package/static/assets/mimes/application-vnd.sun.xml.writer.template.svg +14 -0
- package/static/assets/mimes/application-wps-office.doc.svg +1 -0
- package/static/assets/mimes/application-wps-office.docx.svg +1 -0
- package/static/assets/mimes/application-wps-office.ppt.svg +1 -0
- package/static/assets/mimes/application-wps-office.pptx.svg +1 -0
- package/static/assets/mimes/application-wps-office.xls.svg +1 -0
- package/static/assets/mimes/application-wps-office.xlsx.svg +1 -0
- package/static/assets/mimes/application-x-7zip.svg +14 -0
- package/static/assets/mimes/application-x-ace.svg +14 -0
- package/static/assets/mimes/application-x-addon.svg +59 -0
- package/static/assets/mimes/application-x-ar.svg +16 -0
- package/static/assets/mimes/application-x-arc.svg +14 -0
- package/static/assets/mimes/application-x-archive.svg +16 -0
- package/static/assets/mimes/application-x-arj.svg +14 -0
- package/static/assets/mimes/application-x-audacity-project.svg +24 -0
- package/static/assets/mimes/application-x-bzdvi.svg +14 -0
- package/static/assets/mimes/application-x-bzip-compressed-tar.svg +14 -0
- package/static/assets/mimes/application-x-class-file.svg +37 -0
- package/static/assets/mimes/application-x-compress-tar.svg +16 -0
- package/static/assets/mimes/application-x-compress.svg +16 -0
- package/static/assets/mimes/application-x-compressed-tar.svg +14 -0
- package/static/assets/mimes/application-x-core.svg +20 -0
- package/static/assets/mimes/application-x-cpio.svg +16 -0
- package/static/assets/mimes/application-x-deb.svg +14 -0
- package/static/assets/mimes/application-x-designer.svg +48 -0
- package/static/assets/mimes/application-x-egon.svg +12 -0
- package/static/assets/mimes/application-x-extension-html.svg +18 -0
- package/static/assets/mimes/application-x-font-afm.svg +14 -0
- package/static/assets/mimes/application-x-font-snf.svg +14 -0
- package/static/assets/mimes/application-x-font-speedo.svg +14 -0
- package/static/assets/mimes/application-x-font-type1.svg +14 -0
- package/static/assets/mimes/application-x-gettext-translation.svg +14 -0
- package/static/assets/mimes/application-x-gnome-theme-package.svg +109 -0
- package/static/assets/mimes/application-x-gzdvi.svg +16 -0
- package/static/assets/mimes/application-x-gzip.svg +16 -0
- package/static/assets/mimes/application-x-httpd-php.svg +18 -0
- package/static/assets/mimes/application-x-iso9660-image.svg +292 -0
- package/static/assets/mimes/application-x-java-archive.svg +16 -0
- package/static/assets/mimes/application-x-jokosher.svg +24 -0
- package/static/assets/mimes/application-x-kcachegrind.svg +273 -0
- package/static/assets/mimes/application-x-kcsrc.svg +109 -0
- package/static/assets/mimes/application-x-keepass2.svg +2 -0
- package/static/assets/mimes/application-x-kgetlist.svg +53 -0
- package/static/assets/mimes/application-x-lha.svg +14 -0
- package/static/assets/mimes/application-x-lzma-compressed-tar.svg +16 -0
- package/static/assets/mimes/application-x-lzop.svg +16 -0
- package/static/assets/mimes/application-x-m4.svg +14 -0
- package/static/assets/mimes/application-x-matroska.svg +18 -0
- package/static/assets/mimes/application-x-mplayer2.svg +18 -0
- package/static/assets/mimes/application-x-ms-application.svg +306 -0
- package/static/assets/mimes/application-x-msdos-program.svg +306 -0
- package/static/assets/mimes/application-x-msdownload.svg +306 -0
- package/static/assets/mimes/application-x-msi.svg +306 -0
- package/static/assets/mimes/application-x-mswinurl.svg +18 -0
- package/static/assets/mimes/application-x-mswrite.svg +1 -0
- package/static/assets/mimes/application-x-object.svg +273 -0
- package/static/assets/mimes/application-x-ole-storage.svg +273 -0
- package/static/assets/mimes/application-x-pak.svg +16 -0
- package/static/assets/mimes/application-x-perl.svg +15 -0
- package/static/assets/mimes/application-x-php.svg +18 -0
- package/static/assets/mimes/application-x-python-bytecode.svg +16 -0
- package/static/assets/mimes/application-x-rar.svg +14 -0
- package/static/assets/mimes/application-x-rpm.svg +14 -0
- package/static/assets/mimes/application-x-ruby.svg +22 -0
- package/static/assets/mimes/application-x-sh.svg +17 -0
- package/static/assets/mimes/application-x-shared-library-la.svg +62 -0
- package/static/assets/mimes/application-x-shellscript.svg +17 -0
- package/static/assets/mimes/application-x-shockwave-flash.svg +18 -0
- package/static/assets/mimes/application-x-srt.svg +210 -0
- package/static/assets/mimes/application-x-tar.svg +16 -0
- package/static/assets/mimes/application-x-tarz.svg +14 -0
- package/static/assets/mimes/application-x-trash.svg +14 -0
- package/static/assets/mimes/application-x-tzo.svg +14 -0
- package/static/assets/mimes/application-x-wine-extension-pdd.svg +14 -0
- package/static/assets/mimes/application-x-zip.svg +14 -0
- package/static/assets/mimes/application-x-zoo.svg +14 -0
- package/static/assets/mimes/application-xhtml+xml.svg +18 -0
- package/static/assets/mimes/application-xml.svg +18 -0
- package/static/assets/mimes/application-xsd.svg +18 -0
- package/static/assets/mimes/application-xslt+xml.svg +18 -0
- package/static/assets/mimes/application-zip.svg +14 -0
- package/static/assets/mimes/applications-java.svg +14 -0
- package/static/assets/mimes/archive.svg +16 -0
- package/static/assets/mimes/ascii.svg +14 -0
- package/static/assets/mimes/audio-ac3.svg +24 -0
- package/static/assets/mimes/audio-flac.svg +24 -0
- package/static/assets/mimes/audio-mpeg.svg +24 -0
- package/static/assets/mimes/audio-vn.rn-realmedia.svg +18 -0
- package/static/assets/mimes/audio-vnd.rn-realvideo.svg +18 -0
- package/static/assets/mimes/audio-x-adpcm.svg +24 -0
- package/static/assets/mimes/audio-x-aiff.svg +24 -0
- package/static/assets/mimes/audio-x-flac+ogg.svg +24 -0
- package/static/assets/mimes/audio-x-flac.svg +24 -0
- package/static/assets/mimes/audio-x-it.svg +24 -0
- package/static/assets/mimes/audio-x-monkey.svg +24 -0
- package/static/assets/mimes/audio-x-mpegurl.svg +24 -0
- package/static/assets/mimes/audio-x-wav.svg +24 -0
- package/static/assets/mimes/audio-x-xi.svg +24 -0
- package/static/assets/mimes/audio-x-xm.svg +24 -0
- package/static/assets/mimes/binary.svg +40 -0
- package/static/assets/mimes/deb.svg +14 -0
- package/static/assets/mimes/divx.svg +18 -0
- package/static/assets/mimes/document.svg +14 -0
- package/static/assets/mimes/emblem-package.svg +16 -0
- package/static/assets/mimes/eps.svg +24 -0
- package/static/assets/mimes/exec.svg +40 -0
- package/static/assets/mimes/folder-tar.svg +16 -0
- package/static/assets/mimes/folder_tar.svg +16 -0
- package/static/assets/mimes/font-otf.svg +14 -0
- package/static/assets/mimes/font.svg +14 -0
- package/static/assets/mimes/font_bitmap.svg +14 -0
- package/static/assets/mimes/font_truetype.svg +14 -0
- package/static/assets/mimes/font_type1.svg +14 -0
- package/static/assets/mimes/fonts-package.svg +16 -0
- package/static/assets/mimes/gedit-plugin.svg +59 -0
- package/static/assets/mimes/gnome-exe-thumbnailer-generic-x.svg +306 -0
- package/static/assets/mimes/gnome-exe-thumbnailer-generic.svg +306 -0
- package/static/assets/mimes/gnome-exe-thumbnailer-template.svg +306 -0
- package/static/assets/mimes/gnome-fs-executable.svg +40 -0
- package/static/assets/mimes/gnome-mime-application-atom+xml.svg +15 -0
- package/static/assets/mimes/gnome-mime-application-msexcel.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-msword.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-ogg.svg +24 -0
- package/static/assets/mimes/gnome-mime-application-pdf.svg +13 -0
- package/static/assets/mimes/gnome-mime-application-postscript.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-powerpoint.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-rss+xml.svg +15 -0
- package/static/assets/mimes/gnome-mime-application-rtf.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-vnd.ms-excel.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.ms-powerpoint.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.ms-word.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.mspowerpoint.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.oasis.opendocument.formula.svg +188 -0
- package/static/assets/mimes/gnome-mime-application-vnd.oasis.opendocument.text-web.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.presentationml.presentation.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.presentationml.slideshow.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.spreadsheetml.sheet.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.openxmlformats-officedocument.wordprocessingml.document.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia-secure.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia-vbr.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-vnd.rn-realmedia.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.doc.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.docx.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.ppt.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.pptx.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.xls.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-wps-office.xlsx.svg +1 -0
- package/static/assets/mimes/gnome-mime-application-x-7z-compressed.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-7zip.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-archive.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-arj.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-bittorrent.svg +53 -0
- package/static/assets/mimes/gnome-mime-application-x-bzip-compressed-tar.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-bzip-compressed.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-bzip.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-class-file.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-compress.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-compressed-tar.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-cpio-compressed.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-cpio.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-deb.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-designer.svg +48 -0
- package/static/assets/mimes/gnome-mime-application-x-executable.svg +40 -0
- package/static/assets/mimes/gnome-mime-application-x-font-afm.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-font-bdf.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-font-linux-psf.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-font-pcf.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-font-sunos-news.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-font-ttf.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-glade.svg +48 -0
- package/static/assets/mimes/gnome-mime-application-x-gnome-app-info.svg +109 -0
- package/static/assets/mimes/gnome-mime-application-x-gnome-theme-package.svg +109 -0
- package/static/assets/mimes/gnome-mime-application-x-gzip.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-gzpostscript.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-jar.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-java.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-killustrator.svg +12 -0
- package/static/assets/mimes/gnome-mime-application-x-lha.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-lhz.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-lzma-compressed-tar.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-lzma.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-ms-dos-executable.svg +306 -0
- package/static/assets/mimes/gnome-mime-application-x-perl.svg +15 -0
- package/static/assets/mimes/gnome-mime-application-x-php.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-x-python-bytecode.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-rar.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-rpm.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-x-ruby.svg +22 -0
- package/static/assets/mimes/gnome-mime-application-x-shellscript.svg +17 -0
- package/static/assets/mimes/gnome-mime-application-x-shockwave-flash.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-x-stuffit.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-tar.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-tarz.svg +16 -0
- package/static/assets/mimes/gnome-mime-application-x-tex.svg +79 -0
- package/static/assets/mimes/gnome-mime-application-x-theme.svg +109 -0
- package/static/assets/mimes/gnome-mime-application-x-zip.svg +14 -0
- package/static/assets/mimes/gnome-mime-application-xhtml+xml.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-xml.svg +18 -0
- package/static/assets/mimes/gnome-mime-application-zip.svg +14 -0
- package/static/assets/mimes/gnome-mime-application.svg +40 -0
- package/static/assets/mimes/gnome-mime-audio.svg +24 -0
- package/static/assets/mimes/gnome-mime-image-vnd.adobe.photoshop.svg +14 -0
- package/static/assets/mimes/gnome-mime-image-x-cmu-raster.svg +12 -0
- package/static/assets/mimes/gnome-mime-image-x-killustrator.svg +12 -0
- package/static/assets/mimes/gnome-mime-image-x-psd.svg +14 -0
- package/static/assets/mimes/gnome-mime-image-x-xpixmap.svg +12 -0
- package/static/assets/mimes/gnome-mime-image.svg +12 -0
- package/static/assets/mimes/gnome-mime-text-html.svg +18 -0
- package/static/assets/mimes/gnome-mime-text-install.svg +20 -0
- package/static/assets/mimes/gnome-mime-text-plain.svg +14 -0
- package/static/assets/mimes/gnome-mime-text-vnd.wap.wml.svg +18 -0
- package/static/assets/mimes/gnome-mime-text-x-changelog.svg +208 -0
- package/static/assets/mimes/gnome-mime-text-x-copying.svg +17 -0
- package/static/assets/mimes/gnome-mime-text-x-csh.svg +17 -0
- package/static/assets/mimes/gnome-mime-text-x-gtkrc.svg +109 -0
- package/static/assets/mimes/gnome-mime-text-x-install.svg +17 -0
- package/static/assets/mimes/gnome-mime-text-x-java-source.svg +14 -0
- package/static/assets/mimes/gnome-mime-text-x-java.svg +14 -0
- package/static/assets/mimes/gnome-mime-text-x-makefile.svg +176 -0
- package/static/assets/mimes/gnome-mime-text-x-opml+xml.svg +15 -0
- package/static/assets/mimes/gnome-mime-text-x-opml.svg +15 -0
- package/static/assets/mimes/gnome-mime-text-x-python.svg +16 -0
- package/static/assets/mimes/gnome-mime-text-x-readme.svg +15 -0
- package/static/assets/mimes/gnome-mime-text-x-sh.svg +17 -0
- package/static/assets/mimes/gnome-mime-text-x-zsh.svg +17 -0
- package/static/assets/mimes/gnome-mime-text.svg +14 -0
- package/static/assets/mimes/gnome-mime-video-x-ms-asf.svg +18 -0
- package/static/assets/mimes/gnome-mime-video-x-ms-wmv.svg +18 -0
- package/static/assets/mimes/gnome-mime-video.svg +18 -0
- package/static/assets/mimes/gnome-mime-x-font-afm.svg +14 -0
- package/static/assets/mimes/gnome-mime-x-install.svg +20 -0
- package/static/assets/mimes/gnome-package.svg +16 -0
- package/static/assets/mimes/html.svg +18 -0
- package/static/assets/mimes/image-gif.svg +12 -0
- package/static/assets/mimes/image-jpeg.svg +12 -0
- package/static/assets/mimes/image-png.svg +12 -0
- package/static/assets/mimes/image-svg+xml-compressed.svg +12 -0
- package/static/assets/mimes/image-svg+xml.svg +12 -0
- package/static/assets/mimes/image-vnd.adobe.photoshop.svg +14 -0
- package/static/assets/mimes/image-vnd.microsoft.icon.svg +12 -0
- package/static/assets/mimes/image-x-psdimage-x-psd.svg +14 -0
- package/static/assets/mimes/image-x-xfig.svg +12 -0
- package/static/assets/mimes/image.svg +12 -0
- package/static/assets/mimes/internet-feed.svg +15 -0
- package/static/assets/mimes/libpeas-plugin.svg +59 -0
- package/static/assets/mimes/libreoffice-database.svg +155 -0
- package/static/assets/mimes/libreoffice-extension.svg +59 -0
- package/static/assets/mimes/libreoffice-extensionn.svg +59 -0
- package/static/assets/mimes/libreoffice-formula.svg +188 -0
- package/static/assets/mimes/libreoffice-oasis-formula.svg +188 -0
- package/static/assets/mimes/libreoffice34-extension.svg +59 -0
- package/static/assets/mimes/media-audio.svg +24 -0
- package/static/assets/mimes/media-video.svg +18 -0
- package/static/assets/mimes/mime-ascii.svg +14 -0
- package/static/assets/mimes/mime_ascii.svg +14 -0
- package/static/assets/mimes/misc.svg +14 -0
- package/static/assets/mimes/multipart-encrypted.svg +273 -0
- package/static/assets/mimes/music.svg +24 -0
- package/static/assets/mimes/none.svg +110 -0
- package/static/assets/mimes/openofficeorg3-extension.svg +59 -0
- package/static/assets/mimes/package.svg +16 -0
- package/static/assets/mimes/package_editors.svg +14 -0
- package/static/assets/mimes/pdf.svg +13 -0
- package/static/assets/mimes/preferences-certificate.svg +28 -0
- package/static/assets/mimes/preferences-plugin.svg +59 -0
- package/static/assets/mimes/rar.svg +14 -0
- package/static/assets/mimes/raw.svg +12 -0
- package/static/assets/mimes/scii.svg +14 -0
- package/static/assets/mimes/shellscript.svg +17 -0
- package/static/assets/mimes/sound.svg +24 -0
- package/static/assets/mimes/stock_certificate.svg +28 -0
- package/static/assets/mimes/stock_new-formula.svg +188 -0
- package/static/assets/mimes/stock_new-html.svg +18 -0
- package/static/assets/mimes/stock_script.svg +17 -0
- package/static/assets/mimes/stock_scripts.svg +17 -0
- package/static/assets/mimes/tar.svg +16 -0
- package/static/assets/mimes/text-css.svg +18 -0
- package/static/assets/mimes/text-enriched.svg +14 -0
- package/static/assets/mimes/text-htmlh.svg +18 -0
- package/static/assets/mimes/text-javascript.svg +6 -0
- package/static/assets/mimes/text-mht.svg +18 -0
- package/static/assets/mimes/text-plain.svg +14 -0
- package/static/assets/mimes/text-x-bibtex.svg +79 -0
- package/static/assets/mimes/text-x-gtkrc.svg +109 -0
- package/static/assets/mimes/text-x-java-source.svg +14 -0
- package/static/assets/mimes/text-x-lua.svg +14 -0
- package/static/assets/mimes/text-x-nfo.svg +14 -0
- package/static/assets/mimes/text-x-opml+xml.svg +15 -0
- package/static/assets/mimes/text-x-opml.svg +15 -0
- package/static/assets/mimes/text-x-tex.svg +79 -0
- package/static/assets/mimes/text-x-vala.svg +14 -0
- package/static/assets/mimes/text-x.svg +14 -0
- package/static/assets/mimes/text-xmcd.svg +358 -0
- package/static/assets/mimes/text.svg +14 -0
- package/static/assets/mimes/text2.svg +14 -0
- package/static/assets/mimes/tgz.svg +16 -0
- package/static/assets/mimes/txt.svg +14 -0
- package/static/assets/mimes/txt2.svg +14 -0
- package/static/assets/mimes/uri-mms.svg +18 -0
- package/static/assets/mimes/uri-mmst.svg +18 -0
- package/static/assets/mimes/uri-mmsu.svg +18 -0
- package/static/assets/mimes/uri-pnm.svg +18 -0
- package/static/assets/mimes/uri-rtspt.svg +18 -0
- package/static/assets/mimes/uri-rtspu.svg +18 -0
- package/static/assets/mimes/video-mp4.svg +18 -0
- package/static/assets/mimes/video-quicktime.svg +18 -0
- package/static/assets/mimes/video-vivo.svg +18 -0
- package/static/assets/mimes/video-wavelet.svg +18 -0
- package/static/assets/mimes/video-webm.svg +18 -0
- package/static/assets/mimes/video-x-anim.svg +18 -0
- package/static/assets/mimes/video-x-flic.svg +18 -0
- package/static/assets/mimes/video-x-google-vlc-plugin.svg +18 -0
- package/static/assets/mimes/video-x-javafx.svg +18 -0
- package/static/assets/mimes/video-x-matroska.svg +18 -0
- package/static/assets/mimes/video-x-mng.svg +18 -0
- package/static/assets/mimes/video-x-ms-asf-plugin.svg +18 -0
- package/static/assets/mimes/video-x-ms-asf.svg +18 -0
- package/static/assets/mimes/video-x-ms-wmp.svg +18 -0
- package/static/assets/mimes/video-x-ms-wmv.svg +18 -0
- package/static/assets/mimes/video-x-nsv.svg +18 -0
- package/static/assets/mimes/video-x-sgi-movie.svg +18 -0
- package/static/assets/mimes/video-x-theora+ogg.svg +18 -0
- package/static/assets/mimes/video-x-wmv.svg +18 -0
- package/static/assets/mimes/video.svg +18 -0
- package/static/assets/mimes/www.svg +18 -0
- package/static/assets/mimes/x-kde-nsplugin-generated.svg +59 -0
- package/static/assets/mimes/zip.svg +14 -0
- package/static/{chunk-CS5K4IBF.js → chunk-3FX6ISDY.js} +1 -1
- package/static/chunk-3S4WNZ2T.js +7 -0
- package/static/chunk-4KESSWTF.js +1 -0
- package/static/{chunk-62NKWSCZ.js → chunk-4TEHM3AS.js} +1 -1
- package/static/chunk-AY2GOSJ2.js +24 -0
- package/static/chunk-BW5PQAKK.js +4 -0
- package/static/{chunk-MGWJOK6G.js → chunk-CLSVDV7J.js} +1 -1
- package/static/chunk-FJFNDK67.js +1 -0
- package/static/{chunk-YCR3E6AS.js → chunk-HUWQHCUX.js} +1 -1
- package/static/{chunk-KOYXXWT3.js → chunk-KFM544CA.js} +1 -1
- package/static/{chunk-ATROK3XR.js → chunk-LB7B5RIV.js} +1 -1
- package/static/{chunk-CBQRUHAW.js → chunk-LYTD6AJE.js} +1 -1
- package/static/{chunk-FNR2JLQZ.js → chunk-MK7WZG3F.js} +1 -1
- package/static/{chunk-3UFSZ24R.js → chunk-MTRNPGS4.js} +1 -1
- package/static/{chunk-ME4DNAIM.js → chunk-MWFRZBJD.js} +1 -1
- package/static/{chunk-VUBNAENR.js → chunk-N3T57OCA.js} +1 -1
- package/static/{chunk-USM4HKKT.js → chunk-NV2MEIWP.js} +1 -1
- package/static/{chunk-H5ZPIT76.js → chunk-O4AQBQBF.js} +1 -1
- package/static/{chunk-OHGTSIIO.js → chunk-O67RFAWU.js} +1 -1
- package/static/{chunk-CXGKFQMB.js → chunk-PYSFXLMV.js} +1 -1
- package/static/{chunk-BMZK5PGX.js → chunk-QTW62OKJ.js} +1 -1
- package/static/chunk-RSNLYAN6.js +560 -0
- package/static/{chunk-PU26FIXJ.js → chunk-S5WXHO6D.js} +1 -1
- package/static/{chunk-VCXIQZT4.js → chunk-SH5EVL4E.js} +4 -4
- package/static/{chunk-K375F6CH.js → chunk-SKDQM65G.js} +1 -1
- package/static/{chunk-IYMU2AOQ.js → chunk-SRLMFJ7C.js} +1 -1
- package/static/{chunk-OWYD7F64.js → chunk-TTQ37MUV.js} +1 -1
- package/static/chunk-WL65GYD5.js +4 -0
- package/static/{chunk-ZFGAD4UR.js → chunk-WLPYIJFI.js} +1 -1
- package/static/chunk-XE5YHU5J.js +1 -0
- package/static/{chunk-NC5X67U2.js → chunk-XUZSYWRF.js} +1 -1
- package/static/{chunk-MDYFTKWU.js → chunk-Z5X7LVMZ.js} +1 -1
- package/static/{chunk-AOASP2ML.js → chunk-ZFKCGL6X.js} +1 -1
- package/static/chunk-ZTXJC5IC.js +1 -0
- package/static/index.html +1 -1
- package/static/main-RREKR34B.js +10 -0
- package/static/{polyfills-GNKGQMRJ.js → polyfills-IA5XWQYN.js} +1 -1
- package/static/{scripts-263WP5VB.js → scripts-VZVAP2P4.js} +4 -4
- package/sync-in-server.js +1 -1
- package/static/chunk-3CQHRM6K.js +0 -24
- package/static/chunk-7DWT7W6L.js +0 -1
- package/static/chunk-E2MMQS3P.js +0 -1
- package/static/chunk-EUCMHS6F.js +0 -4
- package/static/chunk-H3O3N5LY.js +0 -4
- package/static/chunk-J6YSVODR.js +0 -1
- package/static/chunk-JQOMI5VI.js +0 -560
- package/static/chunk-MAVDZOWK.js +0 -1
- package/static/chunk-N6A3HHB5.js +0 -7
- package/static/main-TFDBY2TB.js +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-7DWT7W6L.js";import{a as Ct,b as vt}from"./chunk-IYMU2AOQ.js";import{f as kt}from"./chunk-E2MMQS3P.js";import{f as St,g as gt,h as _t}from"./chunk-MAVDZOWK.js";import{A as ze,Ca as he,Ea as de,Hb as fe,Ib as R,Jb as H,Kb as mt,La as st,Mb as ht,Ob as dt,Qb as ut,Rb as ft,S as ee,Xa as at,Za as lt,mb as L,pb as ct,v as Ge,va as rt,w as Ze,xb as B,y as Ye,z as Xe}from"./chunk-H3O3N5LY.js";import{d as Y}from"./chunk-J6YSVODR.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-JQOMI5VI.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
|
|
1
|
+
import{a as yt,c as bt,d as T,e as te,g as Et}from"./chunk-ZTXJC5IC.js";import{a as Ct,b as vt}from"./chunk-SRLMFJ7C.js";import{f as kt}from"./chunk-FJFNDK67.js";import{f as St,g as gt,h as _t}from"./chunk-4KESSWTF.js";import{A as ze,Ca as he,Ea as de,Gb as fe,Hb as R,Ib as H,Jb as mt,La as st,Lb as ht,Nb as dt,Pb as ut,Qb as ft,S as ee,Xa as at,Za as lt,lb as L,ob as ct,v as Ge,va as rt,w as Ze,wb as B,y as Ye,z as Xe}from"./chunk-WL65GYD5.js";import{d as Y}from"./chunk-XE5YHU5J.js";import{$b as Le,$c as De,Cb as w,Eb as u,Ed as J,Fd as We,G as oe,Gc as Te,Jd as Qe,L as ve,Lf as ot,Ma as l,Mb as we,Nb as K,Ob as x,Oc as Z,Pb as p,Qb as $,Rb as D,Sb as xe,Tb as le,Ub as ce,Vb as pe,Xa as W,Xb as O,Zc as X,ad as Ne,bb as re,be as Je,bg as ue,ca as P,cb as Ae,cd as z,ce as et,cg as pt,dc as C,dg as N,ed as Re,f as ke,fa as ye,fc as v,fd as Pe,ga as j,gd as me,ha as S,id as f,jb as _,jd as Fe,kb as k,kd as Me,lb as Ie,ld as $e,lf as it,ma as F,na as M,nb as se,nd as Oe,ob as ae,od as Be,p as V,pa as be,pb as m,pd as He,qb as s,qd as Ue,rb as a,rd as Ve,sb as d,sd as Ke,t as Ce,te as tt,tf as nt,v as b,va as Ee,wd as qe,xd as je,yd as Q,zb as G}from"./chunk-RSNLYAN6.js";import{a as y,b as I,c as _e}from"./chunk-RTRJ3KFH.js";function Ft(o,r){if(o&1&&d(0,"fa-icon",2),o&2){let i=u();x(i.repository.class),we("min-width",i.galleryMode.dimensions/3,"px")("min-height",i.galleryMode.dimensions/3,"px")("font-size",i.galleryMode.faSize/1.8,"px"),m("icon",i.repository.icon)}}function Mt(o,r){if(o&1&&d(0,"fa-icon",5),o&2){let i=u(2);x(i.repository.class),m("icon",i.repository.icon)}}function $t(o,r){if(o&1&&(p(0),C(1,"translate")),o&2){let i=u(2);D(" ",v(1,1,i.repository.label,i.locale.language)," ")}}function Ot(o,r){if(o&1&&p(0),o&2){let i=u(2);D(" ",i.repository.label," ")}}function Bt(o,r){if(o&1&&(s(0,"div",1),_(1,Mt,1,3,"fa-icon",3),s(2,"span",4),_(3,$t,2,4)(4,Ot,1,1),a()()),o&2){let i=u();l(),k(i.showIcon?1:-1),l(2),k(i.repository.translate?3:4)}}var At=(()=>{let r=class r{constructor(){this.showIcon=!0,this.showFullPath=!1,this.locale=S(Q),this.layout=S(B),this.unknownRepository={icon:Qe,label:"",class:"circle-primary-icon",translate:!1}}ngOnInit(){this.setRepository()}ngOnChanges(){this.setRepository()}setRepository(){this.share.parent?.id||this.share.parent?.id===0?this.repository={icon:R.SHARES,label:this.share.parent.name,class:"circle-purple-icon",translate:!1}:this.share.file?.ownerId?this.repository={icon:R.PERSONAL,label:fe.PERSONAL_FILES,class:"circle-primary-icon",translate:!0}:this.share.file?.space?.alias?this.repository={icon:R.SPACES,label:`${this.share.file.space.name}`,class:"circle-primary-icon",translate:!1}:this.share.externalPath?this.repository={icon:R.EXTERNAL,label:"External",class:"circle-primary-icon",translate:!0}:this.repository=y({},this.unknownRepository),this.showFullPath&&this.setFullPath()}setFullPath(){if(!this.repository.label)return;let e=this.share.file?.path?this.share.file.path.split("/").filter(n=>n&&n!=="."):[];this.share.parent?.id&&!this.share.file?.id&&this.share.file?.path.indexOf("/")===-1?e.shift():this.share.file?.space?.alias&&this.share.file.space?.root?.alias&&(e.length?e.unshift(this.share.file.space.root.name):e.push(this.share.file.space.root.name)),this.repository.label===fe.PERSONAL_FILES&&(this.repository.label=this.layout.translateString(this.repository.label)),e.length&&(this.repository.label=`${this.repository.label}/${e.join("/")}`)}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-share-repository"]],inputs:{share:"share",galleryMode:"galleryMode",showIcon:"showIcon",showFullPath:"showFullPath"},features:[Ee],decls:2,vars:1,consts:[[3,"icon","class","min-width","min-height","font-size"],[1,"d-flex","align-items-center"],[3,"icon"],[1,"me-2",3,"icon","class"],["draggable","false",1,"no-pointer-events"],[1,"me-2",3,"icon"]],template:function(n,t){n&1&&_(0,Ft,1,9,"fa-icon",0)(1,Bt,5,2,"div",1),n&2&&k(t.galleryMode?0:1)},dependencies:[X,J],encapsulation:2});let o=r;return o})();var h={BASE:`${ee}/shares`,LIST:"list",CHILDREN:"children",LINKS:"links",LINKS_LIST:"links/list",LINKS_UUID:"links/uuid"},It=`${h.BASE}/${h.LIST}`,q=`${h.BASE}/${h.LINKS}`,wt=`${h.BASE}/${h.LINKS_LIST}`,xt=`${h.BASE}/${h.LINKS_UUID}`;var Lt=(()=>{let r=class r{constructor(){this.http=S(Z),this.router=S(Y)}getShare(e){return this.http.get(`${h.BASE}/${e}`).pipe(b(n=>new T(n)))}createShare(e){return this.http.post(h.BASE,e).pipe(b(n=>new T(n)))}updateShare(e){return this.http.put(`${h.BASE}/${e.id}`,e).pipe(b(n=>new T(n)))}deleteShare(e){return this.http.delete(`${h.BASE}/${e}`)}listShares(){return this.http.get(It)}getShareChild(e,n){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new T(t)))}updateShareChild(e,n,t){return this.http.put(`${h.BASE}/${e}/${h.CHILDREN}/${n}`,t).pipe(b(c=>new T(c)))}deleteShareChild(e,n){return this.http.delete(`${h.BASE}/${e}/${h.CHILDREN}/${n}`)}listChildShares(e){return this.http.get(`${h.BASE}/${e}/${h.CHILDREN}`)}initShareFromFile(e,n,t=!1,c=!1){let g,E=null,A=y({id:0,name:"",createdAt:new Date,modifiedAt:new Date,enabled:!0},t?{parent:{id:0,ownerId:0,alias:n.space.alias,name:n.space.name}}:{});if(n){c&&(E=n.root.id);let ge=null;(n?.root?.owner.login===e.login||!n?.space?.alias)&&(n.space=null,ge=e.id),g=new T(I(y({},A),{name:n.name,file:I(y({},n),{path:c?".":st(n.path,2),ownerId:ge})}))}else g=new T(A);return[g,E]}goTo(e){if(!e.id)return Ce(V(!1));if(e.externalPath&&!e.parent?.id)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.name}});if(e.parent?.id&&!e.file?.id&&e.file?.path.indexOf("/")===-1)return this.router.navigate([H.SPACES_SHARES],{queryParams:{select:e.parent.name}});{let[n,t]=bt(e);return this.router.navigate([n],{queryParams:{select:t}})}}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var U={BASE:`${ee}/link`,LINK:"link",VALIDATION:"validation",ACCESS:"access",AUTH:"auth"},Tt=`${U.BASE}/${U.VALIDATION}`,Se=`${U.BASE}/${U.ACCESS}`,Dt=`${U.BASE}/${U.AUTH}`;var Nt=new ye("WindowToken",typeof window<"u"&&window.document?{providedIn:"root",factory:()=>window}:{providedIn:"root",factory:()=>{}});var Rt=(()=>{class o{constructor(i,e,n){this.ngZone=i,this.document=e,this.window=n,this.copySubject=new ke,this.copyResponse$=this.copySubject.asObservable(),this.config={}}configure(i){this.config=i}copy(i){if(!this.isSupported||!i)return this.pushCopyResponse({isSuccess:!1,content:i});let e=this.copyFromContent(i);return e?this.pushCopyResponse({content:i,isSuccess:e}):this.pushCopyResponse({isSuccess:!1,content:i})}get isSupported(){return!!this.document.queryCommandSupported&&!!this.document.queryCommandSupported("copy")&&!!this.window}isTargetValid(i){if(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement){if(i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');return!0}throw new Error("Target should be input or textarea")}copyFromInputElement(i,e=!0){try{this.selectTarget(i);let n=this.copyText();return this.clearSelection(e?i:void 0,this.window),n&&this.isCopySuccessInIE11()}catch{return!1}}isCopySuccessInIE11(){let i=this.window.clipboardData;return!(i&&i.getData&&!i.getData("Text"))}copyFromContent(i,e=this.document.body){if(this.tempTextArea&&!e.contains(this.tempTextArea)&&this.destroy(this.tempTextArea.parentElement||void 0),!this.tempTextArea){this.tempTextArea=this.createTempTextArea(this.document,this.window);try{e.appendChild(this.tempTextArea)}catch{throw new Error("Container should be a Dom element")}}this.tempTextArea.value=i;let n=this.copyFromInputElement(this.tempTextArea,!1);return this.config.cleanUpAfterCopy&&this.destroy(this.tempTextArea.parentElement||void 0),n}destroy(i=this.document.body){this.tempTextArea&&(i.removeChild(this.tempTextArea),this.tempTextArea=void 0)}selectTarget(i){return i.select(),i.setSelectionRange(0,i.value.length),i.value.length}copyText(){return this.document.execCommand("copy")}clearSelection(i,e){i&&i.focus(),e.getSelection()?.removeAllRanges()}createTempTextArea(i,e){let n=i.documentElement.getAttribute("dir")==="rtl",t;t=i.createElement("textarea"),t.style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[n?"right":"left"]="-9999px";let c=e.pageYOffset||i.documentElement.scrollTop;return t.style.top=c+"px",t.setAttribute("readonly",""),t}pushCopyResponse(i){this.copySubject.observers.length>0&&this.ngZone.run(()=>{this.copySubject.next(i)})}pushCopyReponse(i){this.pushCopyResponse(i)}}return o.\u0275fac=function(i){return new(i||o)(j(Ae),j(be),j(Nt,8))},o.\u0275prov=P({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var Pt=(()=>{let r=class r{constructor(){this.router=S(Y),this.http=S(Z),this.layout=S(B),this.authService=S(kt),this.clipboard=S(Rt)}shareLinksList(){return this.http.get(wt).pipe(b(e=>e.map(n=>new te(n))))}shareLink(e){return this.http.get(`${q}/${e}`).pipe(b(n=>new te(n)))}shareLinkChild(e,n){return this.http.get(`${q}/${e}/${h.CHILDREN}/${n}`).pipe(b(t=>new te(t)))}linkFromSpaceOrShare(e,n,t){return this.http.get(`${q}/${e}/${t}/${n}`)}linkValidation(e){return this.http.get(`${Tt}/${e}`).pipe(b(n=>n.ok?n.link:(n.error&&(n.error===ue.UNAUTHORIZED?this.router.navigate([`${N.LINK}/${e}/${N.AUTH}`]).catch(console.error):this.router.navigate([`${N.LINK}/${e}/${n.error}`]).catch(console.error)),!1)),oe(()=>(this.authService.logout(),V(!1))))}linkAccess(e,n){n.share?.isDir||n.space?.alias?this.http.get(`${Se}/${e}`).subscribe(t=>{this.authService.initUserFromResponse(t),n.space?this.router.navigate([H.SPACES],{queryParams:{select:n.space.name}}).catch(console.error):this.router.navigate([H.SPACES_SHARES],{queryParams:{select:n.share.name}}).catch(console.error)}):lt(`${Se}/${e}`)}linkAuthentication(e,n){return this.http.post(`${Dt}/${e}`,{password:n}).pipe(b(t=>(this.authService.initUserFromResponse(t),this.router.navigate([`${N.LINK}/${e}`]).catch(console.error),!0)),oe(t=>(t.error.message===ue.UNAUTHORIZED?this.layout.sendNotification("warning","Link","Bad password"):this.router.navigate([`${N.LINK}/${e}/${t.error.message}`]).catch(console.error),V(!1))))}copyLinkToClipboard(e){this.clipboard.copyFromContent(this.genLink(e))}genUUID(){return this.http.get(xt).pipe(b(e=>e.uuid))}createLinkDialog(e){this.genUUID().subscribe(n=>{let t=this.layout.openDialog(ne,"md",{initialState:{link:{name:e.name,uuid:n,isActive:!0,nbAccess:0}}});this.subscribeToSubmitLinkModal(t,e)})}updateLinkFromSpaceOrShare(e,n,t,c){return this.http.put(`${q}/${e}/${t}/${n}`,c)}editLinkDialog(e,n,t){if(n.id===0||e?.linkSettings?.uuid){let c=this.layout.openDialog(ne,"md",{initialState:{link:e.linkSettings}});this.subscribeToSubmitLinkModal(c,n,e)}else this.linkFromSpaceOrShare(e.linkId,n.id,t).subscribe({next:c=>{let g=this.layout.openDialog(ne,"md",{initialState:{link:I(y({},c),{permissions:e.permissions})}});this.subscribeToSubmitLinkModal(g,n,e)},error:c=>this.layout.sendNotification("error","Link error",e.name||n.name,c)})}shareLinkGuestToMember(e,n,t){return new ft({id:e,linkId:n,name:t.name,description:t.email,createdAt:t.createdAt,permissions:t.permissions,type:ht.LINK,spaceRole:ct.IS_MEMBER,linkSettings:t},[L.SHARE_INSIDE,L.SHARE_OUTSIDE])}subscribeToSubmitLinkModal(e,n,t){e.content.submitEvent.pipe(ve(1)).subscribe(c=>{if(Object.keys(c).length){let g=Object.assign(e.content.link,c),E=this.shareLinkGuestToMember(g.userId||-(n.links.length+1),t?.linkId||-(n.links.length+1),g);E.linkId?n.links=[E,...n.links.filter(A=>A.linkId!==E.linkId)]:n.links=[E,...n.links]}e.content.layout.closeDialog()})}genLink(e){return`${document.location.origin}/#/${N.LINK}/${e}`}};r.\u0275fac=function(n){return new(n||r)},r.\u0275prov=P({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var Ut=o=>({dateInputFormat:"YYYY-MM-DD",containerClass:"theme-dark-blue",returnFocusToInput:!0,minDate:o,showWeekNumbers:!1}),Vt=(o,r)=>r.key;function Kt(o,r){o&1&&(s(0,"span",4),p(1,"Edit link"),a())}function qt(o,r){o&1&&(s(0,"span",4),p(1,"New link"),a())}function jt(o,r){o&1&&d(0,"div",54)}function Wt(o,r){if(o&1){let i=G();s(0,"button",53),C(1,"translate"),pe("ngModelChange",function(n){let t=F(i).$implicit,c=u(3);return ce(c.permissions[t.key],n)||(c.permissions[t.key]=n),M(n)}),w("ngModelChange",function(){F(i);let n=u(3);return M(n.onPermissionChange())}),d(2,"fa-icon",50),a(),_(3,jt,1,0,"div",54)}if(o&2){let i=r.$implicit,e=r.$index,n=r.$count,t=u(3);le("ngModel",t.permissions[i.key]),m("tooltip",v(1,4,t.SPACES_PERMISSIONS_TEXT[i.key].text,t.locale.language)),l(2),m("icon",t.SPACES_PERMISSIONS_TEXT[i.key].icon),l(),k(e===n-1?3:-1)}}function Gt(o,r){if(o&1&&(se(0,Wt,4,7,null,null,Vt),C(2,"keyvalue")),o&2){let i=u(2);ae(v(2,0,i.permissions,i.originalOrderKeyValue))}}function Zt(o,r){if(o&1&&(s(0,"div",51),d(1,"app-share-repository",55),a()),o&2){let i=u(2);l(),m("share",i.share)("showIcon",!0)("showFullPath",!0)}}function Yt(o,r){if(o&1){let i=G();s(0,"div",44),d(1,"fa-icon",45),s(2,"div",46)(3,"span"),p(4),a(),s(5,"span",47),p(6),a()(),s(7,"div",48),_(8,Gt,3,3),s(9,"button",49),C(10,"translate"),w("click",function(){F(i);let n=u();return M(n.toggleRequireAuth())}),d(11,"fa-icon",50),a(),s(12,"button",49),C(13,"translate"),w("click",function(){F(i);let n=u();return M(n.copyToClipboard())}),d(14,"fa-icon",50),a()()(),_(15,Zt,2,3,"div",51),d(16,"hr",52)}if(o&2){let i=u();l(),m("icon",i.icons.links),l(3),$(i.linkForm.value.name||i.linkForm.value.shareName),l(2),$(i.linkForm.value.email),l(2),k(i.share&&i.permissions?8:-1),l(),x(O("btn btn-sm ",i.linkForm.value.requireAuth?"btn-success":"btn-warning")),m("tooltip",v(10,15,"Password",i.locale.language)),l(2),m("icon",i.linkForm.value.requireAuth?i.icons.faLock:i.icons.faLockOpen),l(),x(O("btn btn-sm ms-2 ",i.linkWasCopied?"btn-info":"btn-secondary")),m("tooltip",v(13,18,"Copy link",i.locale.language)),l(2),m("icon",i.linkWasCopied?i.icons.faClipboardCheck:i.icons.faClipboard),l(),k(i.share?15:-1)}}function Xt(o,r){if(o&1&&(s(0,"span"),p(1),a()),o&2){let i=u();x(O("badge rounded-pill ",(i.share?i.share.link.nbAccess:i.link.nbAccess)>=i.linkForm.value.limitAccess?"bg-danger":"bg-success")),l(),xe(" ",i.share?i.share.link.nbAccess:i.link.nbAccess,"/",i.linkForm.value.limitAccess," ")}}function zt(o,r){if(o&1&&(s(0,"span",20),p(1),a()),o&2){let i=u();l(),$(i.share?i.share.link.nbAccess:i.link.nbAccess)}}function Qt(o,r){if(o&1&&(s(0,"div",27)(1,"label",56),p(2,"Share name"),a(),d(3,"input",57),C(4,"translate"),a(),s(5,"div",27)(6,"label",58),p(7,"Share description"),a(),d(8,"input",59),C(9,"translate"),a()),o&2){let i=u();l(3),K("is-invalid",i.linkForm.controls.shareName.invalid),m("placeholder",v(4,4,"Share name",i.locale.language)),l(5),m("placeholder",v(9,7,"Share description",i.locale.language))}}function Jt(o,r){if(o&1&&(s(0,"option",30),p(1),a()),o&2){let i=r.$implicit;m("ngValue",i),l(),$(i)}}function ei(o,r){if(o&1&&(s(0,"div",37),d(1,"app-password-strength-bar",60),a()),o&2){let i=u();l(),m("passwordToCheck",i.password)}}function ti(o,r){if(o&1){let i=G();s(0,"button",61),w("click",function(){F(i);let n=u();return M(n.confirmDeletion=!0)}),p(1," Remove "),a()}if(o&2){let i=u();m("disabled",i.confirmDeletion)}}var ne=(()=>{let r=class r{constructor(){this.layout=S(B),this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.submitEvent=new re,this.shareChange=new re,this.locale=S(Q),this.confirmDeletion=!1,this.submitted=!1,this.SPACES_PERMISSIONS_TEXT=mt,this.originalOrderKeyValue=at,this.icons={faEye:Je,faEyeSlash:ot,links:R.LINKS,faClipboard:tt,faClipboardCheck:et,faLock:nt,faLockOpen:it},this.languages=this.layout.getLanguages(),this.minDate=he(),this.defaultPassword=this.layout.translateString(rt),this.passwordMinLength=8,this.password="",this.linkIsExpired=!1,this.linkIsHovered=!1,this.linkWasCopied=!1,this.userService=S(St),this.sharesService=S(Lt),this.linksService=S(Pt),this.spacesService=S(Et),this.minDate.setDate(this.minDate.getDate()+1)}ngOnInit(){this.link?this.initLink():this.file?this.initFile():this.initShareLink(),this.linkForm.value.requireAuth&&(this.password=this.defaultPassword),this.linkForm.value.expiresAt&&this.isLinkIsExpired(this.share?this.share.link.expiresAt:this.link.expiresAt),this.linkForm.controls.expiresAt.valueChanges.subscribe(e=>this.isLinkIsExpired(e))}onPermissionChange(){let e=ut(this.permissions);this.linkForm.controls.permissions.setValue(e),e!==this.share.link.permissions?this.linkForm.controls.permissions.markAsDirty():this.linkForm.controls.permissions.markAsPristine()}toggleRequireAuth(){this.linkForm.controls.requireAuth.setValue(!this.linkForm.value.requireAuth),this.linkForm.controls.requireAuth.markAsDirty()}copyToClipboard(){this.linksService.copyLinkToClipboard(this.share?this.share.link.uuid:this.link.uuid),this.linkWasCopied=!0,this.layout.sendNotification("info","Link copied",this.linkForm.value.name||this.linkForm.value.shareName),setTimeout(()=>this.linkWasCopied=!1,3e3)}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onSubmit(){if(this.submitted=!0,this.confirmDeletion){(this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.layout.sendNotification("success","Link deleted",this.share.link.name||this.share.name),this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:c=>{this.layout.sendNotification("error","Delete share",this.share.name,c),this.layout.closeDialog()}});return}if(this.file?.id){let n=this.share,{link:t}=n,c=_e(n,["link"]),g=I(y(y({},t),this.linkForm.value),{password:this.mustIncludePassword()?this.password:void 0});c.name=de("shareName",g),c.description=de("shareDescription",g);let E=this.linksService.shareLinkGuestToMember(-1,-1,g);this.sharesService.createShare(I(y({},c),{type:yt.LINK,links:[E]})).subscribe({next:A=>{this.shareChange.emit(["add",A]),this.layout.sendNotification("success","Link created",t.name||A.name),this.layout.closeDialog()},error:A=>{this.layout.sendNotification("error","Link error",this.share.name,A),this.layout.closeDialog()}});return}let e={};for(let t in this.linkForm.controls)this.linkForm.controls[t].dirty&&(e[t]=this.linkForm.controls[t].value);if(this.mustIncludePassword()&&(e.password=this.password),this.share?.id){Object.keys(e).length&&this.linksService.updateLinkFromSpaceOrShare(this.share.link.id,this.share.id,pt.SHARE,e).subscribe({next:t=>{this.share.name=this.linkForm.value.shareName,this.share.description=this.linkForm.value.shareDescription,this.share.link=Object.assign(this.share.link,t),this.share.updateTimes(),this.share.updatePermission(),this.shareChange.emit(["update",this.share]),this.layout.closeDialog()},error:t=>{this.layout.sendNotification("error","Link error",this.share.link.name||this.share.name,t),this.layout.closeDialog()}}),this.layout.closeDialog();return}this.submitEvent.emit(e)}initFile(){let e=this.sharesService.initShareFromFile(this.userService.user,this.file,this.isSharesRepo,this.inSharesList)[0];this.share=I(y({},e),{link:{id:-1,userId:-1,uuid:"",isActive:!0,requireAuth:!1,permissions:"",nbAccess:0,limitAccess:0}}),this.linksService.genUUID().subscribe(n=>this.share.link.uuid=n),this.initShareLink(),this.onPermissionChange()}initShareLink(){this.linkForm=new me({shareName:new f(this.share.name,z.required),shareDescription:new f(this.share.description||""),name:new f(this.share.link?.name||""),email:new f(this.share.link?.email||"",z.email),language:new f(this.share.link.language||null),limitAccess:new f(this.share.link.limitAccess||null),expiresAt:new f(this.share.link.expiresAt||null),requireAuth:new f(this.share.link.requireAuth||!1),permissions:new f(this.share.link.permissions),isActive:new f(this.share.link.isActive)}),this.permissions=dt(this.share.file.permissions,this.share.link.permissions,[L.SHARE_INSIDE,L.SHARE_OUTSIDE,...this.share.file.isDir?[]:[L.DELETE,L.ADD]])}initLink(){this.linkForm=new me({shareName:new f(""),shareDescription:new f(""),name:new f(this.link.name||""),email:new f(this.link.email||"",z.email),language:new f(this.link.language||null),limitAccess:new f(this.link.limitAccess||null),expiresAt:new f(this.link.expiresAt||null),requireAuth:new f(this.link.requireAuth||!1),permissions:new f(this.link.permissions),isActive:new f(this.link.isActive)}),this.link.id||(this.linkForm.controls.name.markAsDirty(),this.linkForm.controls.isActive.markAsDirty())}isLinkIsExpired(e){if(e==null){if(this.linkIsExpired=!1,e===null)return;this.linkForm.controls.expiresAt.setValue(null)}this.linkIsExpired=he()>=e}mustIncludePassword(){return!!this.password.length&&this.password!==this.defaultPassword}};r.\u0275fac=function(n){return new(n||r)},r.\u0275cmp=W({type:r,selectors:[["app-link-dialog"]],inputs:{share:"share",parentSpaceId:"parentSpaceId",link:"link",file:"file",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList"},outputs:{submitEvent:"submitEvent",shareChange:"shareChange"},decls:73,vars:52,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],[1,"modal-title","ms-auto"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white","ms-2",3,"click"],[1,"modal-body"],["autocomplete","off",3,"formGroup"],[1,"d-flex"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","align-items-center","cursor-pointer","py-2",3,"mouseover","mouseleave","focus","click"],["for","link","l10nTranslate",""],["id","link",1,"ms-auto"],[1,"d-flex","align-items-center","py-2"],["for","state","l10nTranslate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","state","formControlName","isActive","type","checkbox","role","button",1,"form-check-input"],["for","access","l10nTranslate",""],["id","access",1,"ms-auto"],[3,"class"],[1,"badge","rounded-pill","bg-success"],[1,"d-flex","align-items-center"],["for","guestName","l10nTranslate",""],["id","guestName","formControlName","name","type","text",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between","px-0"],["for","guestEmail","l10nTranslate",""],["id","guestEmail","autocomplete","off","formControlName","email","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[1,"d-flex","align-items-center","justify-content-between"],["for","guestLanguage","l10nTranslate",""],["id","guestLanguage","formControlName","language",1,"form-control","form-select","form-select-sm","ms-auto","w-50"],[3,"ngValue"],["for","limitAccess","l10nTranslate",""],["id","limitAccess","formControlName","limitAccess","min","1","type","number",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","expiration","l10nTranslate",""],["id","expiration","formControlName","expiresAt","placement","left","type","text","bsDatepicker","",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder","bsConfig"],[1,"d-flex","align-items-center","px-0"],["for","requireAuth","translate","",1,"cursor-pointer","me-auto"],[1,"d-flex","align-items-center","d-none","d-sm-flex","mx-auto"],["id","requireAuth","formControlName","requireAuth","type","checkbox","role","button",1,"form-check-input"],["placeholder","Set a password",2,"width","45%",3,"passwordChange","isRequired","disabled","passwordMinLength","password","showGenerator"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[1,"d-flex","flex-fill","align-items-center"],[1,"circle-primary-icon","me-2",3,"icon"],[1,"d-flex","flex-column"],[1,"fs-xxxs"],[1,"d-flex","ms-auto"],["container","body","type","button",3,"click","tooltip"],["size","lg",3,"icon"],[1,"d-flex","align-items-center","d-none","d-sm-flex","py-2"],[1,"my-2"],["btnCheckbox","","type","button",1,"btn","btn-sm","btn-custom","me-0","ms-2",3,"ngModelChange","ngModel","tooltip"],[1,"vr","mx-2"],["id","file",3,"share","showIcon","showFullPath"],["for","shareName","l10nTranslate",""],["id","shareName","formControlName","shareName","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],["for","shareDescription","l10nTranslate",""],["id","shareDescription","formControlName","shareDescription","type","email",1,"form-control","form-control-sm","ms-auto","w-50",3,"placeholder"],[3,"passwordToCheck"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"]],template:function(n,t){n&1&&(s(0,"div",0)(1,"h4",1),d(2,"fa-icon",2),s(3,"span"),p(4),a()(),s(5,"h4",3),_(6,Kt,2,0,"span",4)(7,qt,2,0,"span",4),a(),s(8,"button",5),w("click",function(){return t.layout.closeDialog()}),a()(),s(9,"div",6),_(10,Yt,17,21),s(11,"form",7)(12,"div",8)(13,"div",9)(14,"div",10),w("mouseover",function(){return t.linkIsHovered=!0})("mouseleave",function(){return t.linkIsHovered=!1})("focus",function(){return t.linkIsHovered=!0})("click",function(){return t.copyToClipboard()}),s(15,"label",11),p(16,"Link"),a(),s(17,"span",12),p(18),a()(),s(19,"div",13)(20,"label",14),p(21,"Active"),a(),s(22,"div",15),d(23,"input",16),s(24,"span"),p(25),C(26,"translate"),a()()(),s(27,"div",13)(28,"label",17),p(29,"Current access count"),a(),s(30,"span",18),_(31,Xt,2,5,"span",19)(32,zt,2,1,"span",20),a()(),_(33,Qt,10,10),s(34,"div",21)(35,"label",22),p(36,"Guest name"),a(),d(37,"input",23),C(38,"translate"),a(),s(39,"div",24)(40,"label",25),p(41,"Guest email"),a(),d(42,"input",26),C(43,"translate"),a(),s(44,"div",27)(45,"label",28),p(46,"Guest language"),a(),s(47,"select",29),se(48,Jt,2,2,"option",30,Ie),a()(),s(50,"div",27)(51,"label",31),p(52,"Limit access"),a(),d(53,"input",32),C(54,"translate"),a(),s(55,"div",27)(56,"label",33),p(57,"Expiration"),a(),d(58,"input",34),C(59,"translate"),a(),s(60,"div",35)(61,"label",36),p(62,"Password"),a(),_(63,ei,2,1,"div",37),s(64,"div",15),d(65,"input",38),a(),s(66,"app-input-password",39),pe("passwordChange",function(g){return ce(t.password,g)||(t.password=g),g}),a()()()()()(),s(67,"div",40),_(68,ti,2,1,"button",41),s(69,"button",42),w("click",function(){return t.onCancel()}),p(70,"Cancel"),a(),s(71,"button",43),w("click",function(){return t.onSubmit()}),p(72),a()()),n&2&&(l(2),m("icon",t.icons.links),l(2),$(t.linkForm.value.name||t.linkForm.value.shareName),l(2),k(t.share!=null&&t.share.id||t.link!=null&&t.link.id?6:7),l(4),k(t.share||t.link?10:-1),l(),m("formGroup",t.linkForm),l(6),K("text-primary",t.linkIsHovered),l(),D(" ",t.share?t.share.link.uuid:t.link.uuid," "),l(6),x(O("badge rounded-pill ms-3 ",t.linkForm.value.isActive?"bg-primary":"bg-danger")),l(),D(" ",v(26,35,t.linkForm.value.isActive?"yes":"no",t.locale.language)," "),l(6),k(t.linkForm.value.limitAccess?31:32),l(2),k(t.share?33:-1),l(4),m("placeholder",v(38,38,"Guest name",t.locale.language)),l(5),K("is-invalid",t.linkForm.controls.email.invalid),m("placeholder",v(43,41,"Guest email",t.locale.language)),l(6),ae(t.languages),l(5),m("placeholder",v(54,44,"Unlimited",t.locale.language)),l(5),K("text-danger",t.linkIsExpired),m("placeholder",v(59,47,"Unlimited",t.locale.language))("bsConfig",Le(50,Ut,t.minDate)),l(5),k(t.linkForm.value.requireAuth&&t.password!==t.defaultPassword?63:-1),l(3),m("isRequired",t.linkForm.value.requireAuth)("disabled",!t.linkForm.value.requireAuth)("passwordMinLength",t.passwordMinLength),le("password",t.password),m("showGenerator",!0),l(2),k(t.share!=null&&t.share.id?68:-1),l(3),x(O("btn btn-sm ",t.confirmDeletion?"btn-danger":"btn-primary")),m("disabled",t.linkForm.invalid||t.linkForm.controls.requireAuth.value&&t.password.length<t.passwordMinLength||t.submitted),l(),D(" ",t.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[X,We,ze,Ye,Xe,_t,gt,qe,Me,Ue,Ve,Ne,$e,De,He,Re,Pe,Ke,Fe,Ct,Ze,Ge,je,Oe,Be,At,vt,Te,J],encapsulation:2});let o=r;return o})();export{Rt as a,At as b,Lt as c,ne as d,Pt as e};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{a as m1}from"./chunk-ZFKCGL6X.js";import{c as d1}from"./chunk-JXZCNFW7.js";import{a as r1}from"./chunk-LB7B5RIV.js";import{a as n1,b as o1,c as a1,d as s1,e as l1,f as Qt,i as c1}from"./chunk-BW5PQAKK.js";import{b as u1,c as Jt,d as h1,e as Zt}from"./chunk-4TEHM3AS.js";import{a as f1,d as Et,g as ct}from"./chunk-ZTXJC5IC.js";import{f as Xt}from"./chunk-4KESSWTF.js";import{Aa as Yn,Ba as Xn,Gb as Yt,Hb as W,Ib as st,Ja as nt,La as rt,Ma as Qn,O as Ve,Za as Ii,f as Rn,ib as Jn,kb as ot,lb as at,mb as Z,nb as Me,pb as Zn,wb as U,xb as e1,za as Kn,zb as t1}from"./chunk-WL65GYD5.js";import{c as Ne,d as p1,h as He,m as lt}from"./chunk-ZZ3LHYOY.js";import{d as An}from"./chunk-XE5YHU5J.js";import{$ as gn,$b as St,$c as Dn,Ab as xn,Ac as Ee,C as mn,Cb as b,Db as En,Dc as ke,Eb as u,Ed as In,Fb as Mn,Fd as ae,Ga as kt,Gb as Nn,Gf as Gn,Hb as yt,Hc as Ln,Ib as Vt,If as $n,Jb as _e,Jd as Pn,Je as Hn,Kb as xe,L as Ke,La as Mi,Lb as Ai,Ma as l,Mb as Pe,Mc as Ti,Na as Ni,Nb as q,Ob as Qe,Oc as jt,Pb as p,Qa as Xe,Qb as k,Rb as J,Re as Bn,Rf as qn,Sa as wi,Tb as Je,Ub as Ze,Vb as et,Wf as Wn,X as vn,Xa as D,Xb as tt,Xc as On,Ya as Cn,Za as Te,Zb as Di,Zc as oe,_a as yn,_b as Fe,_e as jn,ab as z,ad as Ut,bb as j,bc as wn,bf as Kt,ca as ye,cb as zi,cc as Ht,cg as i1,da as bn,dc as fe,ec as Bt,ed as Gt,f as pn,fc as _t,ha as h,hc as xt,jb as L,jd as $t,kb as O,ke as Fn,kf as Un,ma as _,na as x,nb as Sn,ob as _n,pb as f,pe as kn,qb as c,rb as d,sb as g,se as Vn,tb as Li,td as qt,u as hn,ub as Oi,v as Ei,va as Ft,wb as Ie,wd as Wt,xb as Re,xd as Tn,ya as Ye,yb as Se,yd as it,zb as F,zc as zn}from"./chunk-RSNLYAN6.js";import{a as Q,b as De}from"./chunk-RTRJ3KFH.js";var C0={prefix:"far",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-13.3 0-24 10.7-24 24l0 9.7C118.6 45.3 56 115.4 56 200l0 14.5c0 37.7-10 74.7-29 107.3L5.1 359.2C1.8 365 0 371.5 0 378.2 0 399.1 16.9 416 37.8 416l372.4 0c20.9 0 37.8-16.9 37.8-37.8 0-6.7-1.8-13.3-5.1-19L421 321.7c-19-32.6-29-69.6-29-107.3l0-14.5c0-84.6-62.6-154.7-144-166.3l0-9.7c0-13.3-10.7-24-24-24zM392.4 368l-336.9 0 12.9-22.1C91.7 306 104 260.6 104 214.5l0-14.5c0-66.3 53.7-120 120-120s120 53.7 120 120l0 14.5c0 46.2 12.3 91.5 35.5 131.4L392.4 368zM156.1 464c9.9 28 36.6 48 67.9 48s58-20 67.9-48l-135.8 0z"]};var Ar={prefix:"far",iconName:"file-zipper",icon:[384,512,["file-archive"],"f1c6","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zM80 104c0 13.3 10.7 24 24 24l16 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0c-13.3 0-24 10.7-24 24zm0 80c0 13.3 10.7 24 24 24l32 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-32 0c-13.3 0-24 10.7-24 24zm64 56l-32 0c-17.7 0-32 14.3-32 32l0 48c0 26.5 21.5 48 48 48s48-21.5 48-48l0-48c0-17.7-14.3-32-32-32zm-16 64a16 16 0 1 1 0 32 16 16 0 1 1 0-32z"]},y0=Ar;var S0={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256a208 208 0 1 1 -416 0 208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0 256 256 0 1 0 -512 0zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};var ei={prefix:"far",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M176 48L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-240-88 0c-39.8 0-72-32.2-72-72l0-88zM316.1 160L224 67.9 224 136c0 13.3 10.7 24 24 24l68.1 0zM0 64C0 28.7 28.7 0 64 0L197.5 0c17 0 33.3 6.7 45.3 18.7L365.3 141.3c12 12 18.7 28.3 18.7 45.3L384 448c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64z"]};var _0={prefix:"far",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M166.2-16c-13.3 0-25.3 8.3-30 20.8L120 48 24 48C10.7 48 0 58.7 0 72S10.7 96 24 96l400 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-96 0-16.2-43.2C307.1-7.7 295.2-16 281.8-16L166.2-16zM32 144l0 304c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-304-48 0 0 304c0 8.8-7.2 16-16 16L96 464c-8.8 0-16-7.2-16-16l0-304-48 0zm160 72c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176zm112 0c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 176c0 13.3 10.7 24 24 24s24-10.7 24-24l0-176z"]};var x0={prefix:"far",iconName:"user",icon:[448,512,[128100,62144,62470,"user-alt","user-large"],"f007","M144 128a80 80 0 1 1 160 0 80 80 0 1 1 -160 0zm208 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0zM48 480c0-70.7 57.3-128 128-128l96 0c70.7 0 128 57.3 128 128l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8c0-97.2-78.8-176-176-176l-96 0C78.8 304 0 382.8 0 480l0 8c0 13.3 10.7 24 24 24s24-10.7 24-24l0-8z"]};var E0={prefix:"far",iconName:"file-lines",icon:[384,512,[128441,128462,61686,"file-alt","file-text"],"f15c","M64 48l112 0 0 88c0 39.8 32.2 72 72 72l88 0 0 240c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16zM224 67.9l92.1 92.1-68.1 0c-13.3 0-24-10.7-24-24l0-68.1zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-261.5c0-17-6.7-33.3-18.7-45.3L242.7 18.7C230.7 6.7 214.5 0 197.5 0L64 0zm56 256c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"]};var M0={prefix:"far",iconName:"comment-dots",icon:[512,512,[128172,62075,"commenting"],"f4ad","M0 240c0 54.4 19.3 104.6 51.9 144.9L3.1 474.3c-2 3.7-3.1 7.9-3.1 12.2 0 14.1 11.4 25.5 25.5 25.5 4 0 7.8-.6 11.5-2.1L153.4 460c31.4 12.9 66.1 20 102.6 20 141.4 0 256-107.5 256-240S397.4 0 256 0 0 107.5 0 240zM94 407.9c9.3-17.1 7.4-38.1-4.8-53.2-26.1-32.3-41.2-71.9-41.2-114.7 0-103.2 90.2-192 208-192s208 88.8 208 192-90.2 192-208 192c-30.2 0-58.7-5.9-84.3-16.4-11.9-4.9-25.3-4.8-37.1 .3L76 440.9 94 407.9zM144 272a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm144-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm80 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]};var N0={prefix:"far",iconName:"flag",icon:[448,512,[127988,61725],"f024","M48 24C48 10.7 37.3 0 24 0S0 10.7 0 24L0 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-100 80.3-20.1c41.1-10.3 84.6-5.5 122.5 13.4 44.2 22.1 95.5 24.8 141.7 7.4l34.7-13c12.5-4.7 20.8-16.6 20.8-30l0-279.7c0-23-24.2-38-44.8-27.7l-9.6 4.8c-46.3 23.2-100.8 23.2-147.1 0-35.1-17.6-75.4-22-113.5-12.5L48 52 48 24zm0 77.5l96.6-24.2c27-6.7 55.5-3.6 80.4 8.8 54.9 27.4 118.7 29.7 175 6.8l0 241.8-24.4 9.1c-33.7 12.6-71.2 10.7-103.4-5.4-48.2-24.1-103.3-30.1-155.6-17.1l-68.6 17.2 0-237z"]};var w0={prefix:"far",iconName:"window-restore",icon:[576,512,[],"f2d2","M512 80L224 80c-8.8 0-16 7.2-16 16l0 16-48 0 0-16c0-35.3 28.7-64 64-64l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64l-48 0 0-48 48 0c8.8 0 16-7.2 16-16l0-192c0-8.8-7.2-16-16-16zM368 288l-320 0 0 128c0 8.8 7.2 16 16 16l288 0c8.8 0 16-7.2 16-16l0-128zM64 160l288 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64z"]};var v1={prefix:"far",iconName:"folder-closed",icon:[512,512,[],"e185","M448 400L64 400c-8.8 0-16-7.2-16-16l0-144 416 0 0 144c0 8.8-7.2 16-16 16zm16-208l-416 0 0-96c0-8.8 7.2-16 16-16l138.7 0c3.5 0 6.8 1.1 9.6 3.2L250.7 112c13.8 10.4 30.7 16 48 16L448 128c8.8 0 16 7.2 16 16l0 48zM64 448l384 0c35.3 0 64-28.7 64-64l0-240c0-35.3-28.7-64-64-64L298.7 80c-6.9 0-13.7-2.2-19.2-6.4L241.1 44.8C230 36.5 216.5 32 202.7 32L64 32C28.7 32 0 60.7 0 96L0 384c0 35.3 28.7 64 64 64z"]};var g1=(()=>{let e=class e{transform(i,r=0,o=void 0){return rt(i,r,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=yn({name:"pathSlice",type:e,pure:!0});let t=e;return t})();var ki=function(t,e){return ki=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])},ki(t,e)};function z1(t,e){ki(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},K.apply(this,arguments)};function L1(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,o=[],a;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function Vi(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L1(arguments[e]));return t}var Dr="An invariant failed, however the error is obfuscated because this is an production build.",ni=[];Object.freeze(ni);var $i={};Object.freeze($i);var Tr={};function Hi(){return typeof window<"u"?window:typeof global<"u"?global:Tr}function Y(){return++v.mobxGuid}function T(t){throw Nt(!1,t),"X"}function Nt(t,e){if(!t)throw new Error("[mobx] "+(e||Dr))}var b1=[];function he(t,e){return!1}function qi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var C1=function(){};function Ir(t){var e=[];return t.forEach(function(n){e.indexOf(n)===-1&&e.push(n)}),e}function Wi(t){return t!==null&&typeof t=="object"}function pt(t){if(t===null||typeof t!="object")return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function Rr(t){return ht(t)||qe(t)?t:Array.isArray(t)?new Map(t):pt(t)?new Map(Object.entries(t)):T("Cannot convert to map from '"+t+"'")}function Pr(t,e){for(var n=0;n<e.length;n++)Ge(t,e[n],t[e[n]])}function Ge(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ot(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Oe(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Wi(i)&&i[n]===!0}}function Fr(t,e){return typeof t=="number"&&typeof e=="number"&&isNaN(t)&&isNaN(e)}function ht(t){return Hi().Map!==void 0&&t instanceof Hi().Map}function At(t){return t instanceof Set}function ft(t){for(var e=[];;){var n=t.next();if(n.done)break;e.push(n.value)}return e}function O1(){return typeof Symbol=="function"&&Symbol.toPrimitive||"@@toPrimitive"}function A1(t){return t===null?null:typeof t=="object"?""+t:t}function Ki(){return typeof Symbol=="function"&&Symbol.iterator||"@@iterator"}function Yi(t,e){Ot(t,Ki(),e)}function wt(t){return t[Ki()]=kr,t}function Xi(){return typeof Symbol=="function"&&Symbol.toStringTag||"@@toStringTag"}function kr(){return this}var ci=(function(){function t(e){e===void 0&&(e="Atom@"+Y()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=w.NOT_TRACKING}return t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.reportObserved=function(){return $1(this)},t.prototype.reportChanged=function(){me(),s2(this),ve()},t.prototype.toString=function(){return this.name},t})(),Qi=Oe("Atom",ci);function Vr(t,e,n){e===void 0&&(e=C1),n===void 0&&(n=C1);var i=new ci(t);return C2(i,e),X1(i,n),i}function D1(t,e){return t===e}function Hr(t,e){return tn(t,e)}function Br(t,e){return tn(t,e,1)}function jr(t,e){return Fr(t,e)||D1(t,e)}var ut={identity:D1,structural:Hr,default:jr,shallow:Br},Ur={},Gr={};function $r(t,e){var n=e?Ur:Gr;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return je(this),this[t]},set:function(i){je(this),this[t]=i}})}function je(t){if(t.__mobxDidRunLazyInitializers!==!0){var e=t.__mobxDecorators;if(e){Ge(t,"__mobxDidRunLazyInitializers",!0);for(var n in e){var i=e[n];i.propertyCreator(t,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}}function T1(t,e){return function(){var i,r=function(a,s,m,C){if(C===!0)return e(a,s,m,a,i),null;if(!Object.prototype.hasOwnProperty.call(a,"__mobxDecorators")){var A=a.__mobxDecorators;Ge(a,"__mobxDecorators",K({},A))}return a.__mobxDecorators[s]={prop:s,propertyCreator:e,descriptor:m,decoratorTarget:a,decoratorArguments:i},$r(s,t)};return qr(arguments)?(i=ni,r.apply(null,arguments)):(i=Array.prototype.slice.call(arguments),r)}}function qr(t){return(t.length===2||t.length===3)&&typeof t[1]=="string"||t.length===4&&t[3]===!0}function Dt(t,e,n){return Z1(t)?t:Array.isArray(t)?E.array(t,{name:n}):pt(t)?E.object(t,void 0,{name:n}):ht(t)?E.map(t,{name:n}):At(t)?E.set(t,{name:n}):t}function Wr(t,e,n){return t==null||Lt(t)||pi(t)||qe(t)||vt(t)?t:Array.isArray(t)?E.array(t,{name:n,deep:!1}):pt(t)?E.object(t,void 0,{name:n,deep:!1}):ht(t)?E.map(t,{name:n,deep:!1}):At(t)?E.set(t,{name:n,deep:!1}):T(!1)}function zt(t){return t}function Kr(t,e,n){return tn(t,e)?e:t}function di(t){var e=T1(!0,function(i,r,o,a,s){var m=o?o.initializer?o.initializer.call(i):o.value:void 0;T2(i,r,m,t)}),n=(typeof process<"u"&&process.env,e);return n.enhancer=t,n}var I1={deep:!0,name:void 0,defaultDecorator:void 0},Yr={deep:!1,name:void 0,defaultDecorator:void 0};Object.freeze(I1);Object.freeze(Yr);function dt(t){return t==null?I1:typeof t=="string"?{name:t,deep:!0}:t}function ti(t){return t.defaultDecorator?t.defaultDecorator.enhancer:t.deep===!1?zt:Dt}var Ji=di(Dt),Xr=di(Wr),R1=di(zt),Qr=di(Kr);function Jr(t,e,n){if(typeof arguments[1]=="string")return Ji.apply(null,arguments);if(Z1(t))return t;var i=pt(t)?E.object(t,e,n):Array.isArray(t)?E.array(t,e):ht(t)?E.map(t,e):At(t)?E.set(t,e):t;if(i!==t)return i;T(!1)}var y1={box:function(t,e){arguments.length>2&&ue("box");var n=dt(e);return new ze(t,ti(n),n.name,!0,n.equals)},shallowBox:function(t,e){return arguments.length>2&&ue("shallowBox"),he("observable.shallowBox","observable.box(value, { deep: false })"),E.box(t,{name:e,deep:!1})},array:function(t,e){arguments.length>2&&ue("array");var n=dt(e);return new be(t,ti(n),n.name)},shallowArray:function(t,e){return arguments.length>2&&ue("shallowArray"),he("observable.shallowArray","observable.array(values, { deep: false })"),E.array(t,{name:e,deep:!1})},map:function(t,e){arguments.length>2&&ue("map");var n=dt(e);return new hi(t,ti(n),n.name)},shallowMap:function(t,e){return arguments.length>2&&ue("shallowMap"),he("observable.shallowMap","observable.map(values, { deep: false })"),E.map(t,{name:e,deep:!1})},set:function(t,e){arguments.length>2&&ue("set");var n=dt(e);return new mi(t,ti(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&ue("object");var i=dt(n);return y2({},t,e,i)},shallowObject:function(t,e){return typeof arguments[1]=="string"&&ue("shallowObject"),he("observable.shallowObject","observable.object(values, {}, { deep: false })"),E.object(t,{},{name:e,deep:!1})},ref:R1,shallow:Xr,deep:Ji,struct:Qr},E=Jr;Object.keys(y1).forEach(function(t){return E[t]=y1[t]});function ue(t){T("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var ri=T1(!1,function(t,e,n,i,r){var o=n.get,a=n.set,s=r[0]||{};I2(t,e,K({get:o,set:a},s))}),Zr=ri({equals:ut.structural}),R=function(e,n,i){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return ri.apply(null,arguments);var r=typeof n=="object"?n:{};return r.get=e,r.set=typeof n=="function"?n:r.set,r.name=r.name||e.name||"",new Le(r)};R.struct=Zr;var w=(function(t){return t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE",t})(w||{}),le=(function(t){return t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK",t})(le||{}),oi=(function(){function t(e){this.cause=e}return t})();function Mt(t){return t instanceof oi}function Bi(t){switch(t.dependenciesState){case w.UP_TO_DATE:return!1;case w.NOT_TRACKING:case w.STALE:return!0;case w.POSSIBLY_STALE:{for(var e=mt(),n=t.observing,i=n.length,r=0;r<i;r++){var o=n[r];if(ui(o)){if(v.disableErrorBoundaries)o.get();else try{o.get()}catch{return we(e),!0}if(t.dependenciesState===w.STALE)return we(e),!0}}return H1(t),we(e),!1}}}function fi(t){var e=t.observers.length>0;v.computationDepth>0&&e&&T(!1),!v.allowStateChanges&&(e||v.enforceActions==="strict")&&T(!1)}function P1(t,e,n){var i=k1(!0);H1(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t;var o;if(v.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new oi(a)}return v.trackingDerivation=r,e2(t),t.observing.length===0&&void 0,V1(i),o}function e2(t){for(var e=t.observing,n=t.observing=t.newObserving,i=w.UP_TO_DATE,r=0,o=t.unboundDepsCount,a=0;a<o;a++){var s=n[a];s.diffValue===0&&(s.diffValue=1,r!==a&&(n[r]=s),r++),s.dependenciesState>i&&(i=s.dependenciesState)}for(n.length=r,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&U1(s,t),s.diffValue=0}for(;r--;){var s=n[r];s.diffValue===1&&(s.diffValue=0,a2(s,t))}i!==w.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}function ji(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)U1(e[n],t);t.dependenciesState=w.NOT_TRACKING}function F1(t){var e=mt(),n=t();return we(e),n}function mt(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function we(t){v.trackingDerivation=t}function k1(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function V1(t){v.allowStateReads=t}function H1(t){if(t.dependenciesState!==w.UP_TO_DATE){t.dependenciesState=w.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=w.UP_TO_DATE}}var ai=0,t2=1;function Be(t,e){var n=function(){return i2(t,e,this,arguments)};return n.isMobxAction=!0,n}function i2(t,e,n,i){var r=n2(t,n,i);try{return e.apply(n,i)}catch(o){throw r.error=o,o}finally{r2(r)}}function n2(t,e,n){var i=B()&&!!t,r=0;if(i){r=Date.now();var o=n&&n.length||0,a=new Array(o);if(o>0)for(var s=0;s<o;s++)a[s]=n[s];ee({type:"action",name:t,object:e,arguments:a})}var m=mt();me();var C=B1(!0),A=k1(!0),X={prevDerivation:m,prevAllowStateChanges:C,prevAllowStateReads:A,notifySpy:i,startTime:r,actionId:t2++,parentActionId:ai};return ai=X.actionId,X}function r2(t){ai!==t.actionId&&T("invalid action stack. did you forget to finish an action?"),ai=t.parentActionId,t.error!==void 0&&(v.suppressReactionErrors=!0),j1(t.prevAllowStateChanges),V1(t.prevAllowStateReads),ve(),we(t.prevDerivation),t.notifySpy&&te({time:Date.now()-t.startTime}),v.suppressReactionErrors=!1}function B1(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function j1(t){v.allowStateChanges=t}var ze=(function(t){z1(e,t);function e(n,i,r,o,a){r===void 0&&(r="ObservableValue@"+Y()),o===void 0&&(o=!0),a===void 0&&(a=ut.default);var s=t.call(this,r)||this;return s.enhancer=i,s.name=r,s.equals=a,s.hasUnreportedChange=!1,s.value=i(n,void 0,r),o&&B()&&Ue({type:"create",name:s.name,newValue:""+s.value}),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var i=this.value;if(n=this.prepareNewValue(n),n!==v.UNCHANGED){var r=B();r&&ee({type:"update",name:this.name,newValue:n,oldValue:i}),this.setNewValue(n),r&&te()}},e.prototype.prepareNewValue=function(n){if(fi(this),ce(this)){var i=de(this,{object:this,type:"update",newValue:n});if(!i)return v.UNCHANGED;n=i.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?v.UNCHANGED:n},e.prototype.setNewValue=function(n){var i=this.value;this.value=n,this.reportChanged(),ie(this)&&ne(this,{type:"update",object:this,newValue:n,oldValue:i})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return It(this,n)},e.prototype.observe=function(n,i){return i&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Rt(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return A1(this.get())},e})(ci);ze.prototype[O1()]=ze.prototype.valueOf;var A0=Oe("ObservableValue",ze),Le=(function(){function t(e){this.dependenciesState=w.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=w.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.value=new oi(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=le.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+Y(),e.set&&(this.setter=Be(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?ut.structural:ut.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){c2(this)},t.prototype.onBecomeUnobserved=function(){},t.prototype.onBecomeObserved=function(){},t.prototype.get=function(){this.isComputing&&T("Cycle detected in computation "+this.name+": "+this.derivation),v.inBatch===0&&this.observers.length===0&&!this.keepAlive?Bi(this)&&(this.warnAboutUntrackedRead(),me(),this.value=this.computeValue(!1),ve()):($1(this),Bi(this)&&this.trackAndCompute()&&l2(this));var e=this.value;if(Mt(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(Mt(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Nt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Nt(!1,!1)},t.prototype.trackAndCompute=function(){B()&&Ue({object:this.scope,type:"compute",name:this.name});var e=this.value,n=this.dependenciesState===w.NOT_TRACKING,i=this.computeValue(!0),r=n||Mt(e)||Mt(i)||!this.equals(e,i);return r&&(this.value=i),r},t.prototype.computeValue=function(e){this.isComputing=!0,v.computationDepth++;var n;if(e)n=P1(this,this.derivation,this.scope);else if(v.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(i){n=new oi(i)}return v.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(ji(this),this.value=void 0)},t.prototype.observe=function(e,n){var i=this,r=!0,o=void 0;return Tt(function(){var a=i.get();if(!r||n){var s=mt();e({type:"update",object:i,newValue:a,oldValue:o}),we(s)}r=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return A1(this.get())},t})();Le.prototype[O1()]=Le.prototype.valueOf;var ui=Oe("ComputedValue",Le);var Ri=(function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t})(),Pi=!0,o2=!1,v=(function(){var t=Hi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Pi=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Ri().version&&(Pi=!1),Pi?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Ri):(setTimeout(function(){o2||T("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ri)})();function a2(t,e){var n=t.observers.length;n&&(t.observersIndexes[e.__mapid]=n),t.observers[n]=e,t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function U1(t,e){if(t.observers.length===1)t.observers.length=0,G1(t);else{var n=t.observers,i=t.observersIndexes,r=n.pop();if(r!==e){var o=i[e.__mapid]||0;o?i[r.__mapid]=o:delete i[r.__mapid],n[o]=r}delete i[e.__mapid]}}function G1(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,v.pendingUnobservations.push(t))}function me(){v.inBatch++}function ve(){if(--v.inBatch===0){K1();for(var t=v.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,n.observers.length===0&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Le&&n.suspend())}v.pendingUnobservations=[]}}function $1(t){var e=v.trackingDerivation;return e!==null?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(t.observers.length===0&&v.inBatch>0&&G1(t),!1)}function s2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale()),i.dependenciesState=w.STALE}}}function l2(t){if(t.lowestObserverState!==w.STALE){t.lowestObserverState=w.STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.POSSIBLY_STALE?i.dependenciesState=w.STALE:i.dependenciesState===w.UP_TO_DATE&&(t.lowestObserverState=w.UP_TO_DATE)}}}function c2(t){if(t.lowestObserverState===w.UP_TO_DATE){t.lowestObserverState=w.POSSIBLY_STALE;for(var e=t.observers,n=e.length;n--;){var i=e[n];i.dependenciesState===w.UP_TO_DATE&&(i.dependenciesState=w.POSSIBLY_STALE,i.isTracing!==le.NONE&&q1(i,t),i.onBecomeStale())}}}function q1(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===le.BREAK){var n=[];W1(S2(t),n,1),new Function(`debugger;
|
|
2
|
+
/*
|
|
3
|
+
Tracing '`+t.name+`'
|
|
4
|
+
|
|
5
|
+
You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update.
|
|
6
|
+
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
7
|
+
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
8
|
+
|
|
9
|
+
`+(t instanceof Le?t.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
10
|
+
|
|
11
|
+
The dependencies for this derivation are:
|
|
12
|
+
|
|
13
|
+
`+n.join(`
|
|
14
|
+
`)+`
|
|
15
|
+
*/
|
|
16
|
+
`)()}}function W1(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(i){return W1(i,e,n+1)})}var si=(function(){function t(e,n,i,r){e===void 0&&(e="Reaction@"+Y()),r===void 0&&(r=!1),this.name=e,this.onInvalidate=n,this.errorHandler=i,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=w.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+Y(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=le.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,v.pendingReactions.push(this),K1())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(me(),this._isScheduled=!1,Bi(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&B()&&Ue({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}ve()}},t.prototype.track=function(e){me();var n=B(),i;n&&(i=Date.now(),ee({name:this.name,type:"reaction"})),this._isRunning=!0;var r=P1(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ji(this),Mt(r)&&this.reportExceptionInDerivation(r.cause),n&&te({time:Date.now()-i}),ve()},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(v.disableErrorBoundaries)throw e;var i="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";v.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(i,e),B()&&Ue({type:"error",name:this.name,message:i,error:""+e}),v.globalReactionErrorHandlers.forEach(function(r){return r(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(me(),ji(this),ve()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),x2(this,e)},t})();var S1=100,d2=function(t){return t()};function K1(){v.inBatch>0||v.isRunningReactions||d2(f2)}function f2(){v.isRunningReactions=!0;for(var t=v.pendingReactions,e=0;t.length>0;){++e===S1&&(console.error("Reaction doesn't converge to a stable state after "+S1+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction()}v.isRunningReactions=!1}var li=Oe("Reaction",si);function B(){return!!v.spyListeners.length}function Ue(t){if(v.spyListeners.length)for(var e=v.spyListeners,n=0,i=e.length;n<i;n++)e[n](t)}function ee(t){var e=K({},t,{spyReportStart:!0});Ue(e)}var u2={spyReportEnd:!0};function te(t){Ue(t?K({},t,{spyReportEnd:!0}):u2)}function p2(t){return v.spyListeners.push(t),qi(function(){v.spyListeners=v.spyListeners.filter(function(e){return e!==t})})}function h2(){T(!1)}function _1(t){return function(e,n,i){if(i){if(i.value)return{value:Be(t,i.value),enumerable:!1,configurable:!0,writable:!0};var r=i.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Be(t,r.call(this))}}}return m2(t).apply(this,arguments)}}function m2(t){return function(e,n,i){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(r){Ge(this,n,M(t,r))}})}}function v2(t,e,n,i){return i===!0?(Fi(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Fi(this,e,n.value||n.initializer.call(this)),this[e]},set:h2}:{enumerable:!1,configurable:!0,set:function(r){Fi(this,e,r)},get:function(){}}}var M=function(e,n,i,r){if(arguments.length===1&&typeof e=="function")return Be(e.name||"<unnamed action>",e);if(arguments.length===2&&typeof n=="function")return Be(e,n);if(arguments.length===1&&typeof e=="string")return _1(e);if(r===!0)e[n]=Be(e.name||n,i.value);else return _1(n).apply(null,arguments)};M.bound=v2;function Fi(t,e,n){Ge(t,e,Be(e,n.bind(t)))}function Tt(t,e){e===void 0&&(e=$i);var n=e&&e.name||t.name||"Autorun@"+Y(),i=!e.scheduler&&!e.delay,r;if(i)r=new si(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var o=Y1(e),a=!1;r=new si(n,function(){a||(a=!0,o(function(){a=!1,r.isDisposed||r.track(s)}))},e.onError,e.requiresObservable)}function s(){t(r)}return r.schedule(),r.getDisposer()}var g2=function(t){return t()};function Y1(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:g2}function $e(t,e,n){n===void 0&&(n=$i),typeof n=="boolean"&&(n={fireImmediately:n},he("Using fireImmediately as argument is deprecated. Use '{ fireImmediately: true }' instead"));var i=n.name||"Reaction@"+Y(),r=M(i,n.onError?b2(n.onError,e):e),o=!n.scheduler&&!n.delay,a=Y1(n),s=!0,m=!1,C,A=n.compareStructural?ut.structural:n.equals||ut.default,X=new si(i,function(){s||o?Ae():m||(m=!0,a(Ae))},n.onError,n.requiresObservable);function Ae(){if(m=!1,!X.isDisposed){var fn=!1;X.track(function(){var un=t(X);fn=s||!A(C,un),C=un}),s&&n.fireImmediately&&r(C,X),!s&&fn===!0&&r(C,X),s&&(s=!1)}}return X.schedule(),X.getDisposer()}function b2(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function C2(t,e,n){return Q1("onBecomeObserved",t,e,n)}function X1(t,e,n){return Q1("onBecomeUnobserved",t,e,n)}function Q1(t,e,n,i){var r=typeof i=="function"?ge(e,n):ge(e),o=typeof i=="function"?i:n,a=r[t];return typeof a!="function"?T(!1):(r[t]=function(){a.call(this),o.call(this)},function(){r[t]=a})}function y2(t,e,n,i){if(0&&n)for(var r in n);i=dt(i);var o=i.defaultDecorator||(i.deep===!1?R1:Ji);je(t),en(t,i.name,o.enhancer),me();try{for(var r in e){var a=Object.getOwnPropertyDescriptor(e,r),s=n&&r in n?n[r]:a.get?ri:o,m=s(t,r,a,!0);m&&Object.defineProperty(t,r,m)}}finally{ve()}return t}function S2(t,e){return J1(ge(t,e))}function J1(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=Ir(t.observing).map(J1)),e}function _2(t,e){if(t==null)return!1;if(e!==void 0){if(Lt(t)){var n=t.$mobx;return n.values&&!!n.values[e]}return!1}return Lt(t)||!!t.$mobx||Qi(t)||li(t)||ui(t)}function Z1(t){return arguments.length!==1&&T(!1),_2(t)}function x2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;typeof t[t.length-1]=="boolean"&&(n=t.pop());var i=E2(t);if(!i)return T(!1);i.isTracing===le.NONE&&console.log("[mobx.trace] '"+i.name+"' tracing enabled"),i.isTracing=n?le.BREAK:le.LOG}function E2(t){switch(t.length){case 0:return v.trackingDerivation;case 1:return ge(t[0]);case 2:return ge(t[0],t[1])}}function pe(t,e){e===void 0&&(e=void 0),me();try{return t.apply(e)}finally{ve()}}function ce(t){return t.interceptors!==void 0&&t.interceptors.length>0}function It(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),qi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function de(t,e){var n=mt();try{var i=t.interceptors;if(i)for(var r=0,o=i.length;r<o&&(e=i[r](e),Nt(!e||e.type,"Intercept handlers should return nothing or a change object"),!!e);r++);return e}finally{we(n)}}function ie(t){return t.changeListeners!==void 0&&t.changeListeners.length>0}function Rt(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),qi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ne(t,e){var n=mt(),i=t.changeListeners;if(i){i=i.slice();for(var r=0,o=i.length;r<o;r++)i[r](e);we(n)}}var M2=1e4,N2=(function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1})(),Ui=0,Zi=(function(){function t(){}return t})();function w2(t,e){typeof Object.setPrototypeOf<"u"?Object.setPrototypeOf(t.prototype,e):typeof t.prototype.__proto__<"u"?t.prototype.__proto__=e:t.prototype=e}w2(Zi,Array.prototype);Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(t){Object.defineProperty(Zi.prototype,t,{configurable:!0,writable:!0,value:Array.prototype[t]})});var er=(function(){function t(e,n,i,r){this.array=i,this.owned=r,this.values=[],this.lastKnownLength=0,this.atom=new ci(e||"ObservableArray@"+Y()),this.enhancer=function(o,a){return n(o,a,e+"[..]")}}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.dehanceValues=function(e){return this.dehancer!==void 0&&e.length>0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return It(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Rt(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var i=new Array(e-n),r=0;r<e-n;r++)i[r]=void 0;this.spliceWithArray(n,0,i)}else this.spliceWithArray(e,n-e)},t.prototype.updateArrayLength=function(e,n){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=n,n>0&&e+n+1>Ui&&ir(e+n+1)},t.prototype.spliceWithArray=function(e,n,i){var r=this;fi(this.atom);var o=this.values.length;if(e===void 0?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),arguments.length===1?n=o-e:n==null?n=0:n=Math.max(0,Math.min(n,o-e)),i===void 0&&(i=ni),ce(this)){var a=de(this,{object:this.array,type:"splice",index:e,removedCount:n,added:i});if(!a)return ni;n=a.removedCount,i=a.added}i=i.length===0?i:i.map(function(C){return r.enhancer(C,void 0)});var s=i.length-n;this.updateArrayLength(o,s);var m=this.spliceItemsIntoValues(e,n,i);return(n!==0||i.length!==0)&&this.notifyArraySplice(e,i,m),this.dehanceValues(m)},t.prototype.spliceItemsIntoValues=function(e,n,i){var r;if(i.length<M2)return(r=this.values).splice.apply(r,Vi([e,n],i));var o=this.values.slice(e,e+n);return this.values=this.values.slice(0,e).concat(i,this.values.slice(e+n)),o},t.prototype.notifyArrayChildUpdate=function(e,n,i){var r=!this.owned&&B(),o=ie(this),a=o||r?{object:this.array,type:"update",index:e,newValue:n,oldValue:i}:null;r&&ee(K({},a,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,a),r&&te()},t.prototype.notifyArraySplice=function(e,n,i){var r=!this.owned&&B(),o=ie(this),a=o||r?{object:this.array,type:"splice",index:e,removed:i,added:n,removedCount:i.length,addedCount:n.length}:null;r&&ee(K({},a,{name:this.atom.name})),this.atom.reportChanged(),o&&ne(this,a),r&&te()},t})(),be=(function(t){z1(e,t);function e(n,i,r,o){r===void 0&&(r="ObservableArray@"+Y()),o===void 0&&(o=!1);var a=t.call(this)||this,s=new er(r,i,a,o);if(Ot(a,"$mobx",s),n&&n.length){var m=B1(!0);a.spliceWithArray(0,0,n),j1(m)}return N2&&Object.defineProperty(s.array,"0",z2),a}return e.prototype.intercept=function(n){return this.$mobx.intercept(n)},e.prototype.observe=function(n,i){return i===void 0&&(i=!1),this.$mobx.observe(n,i)},e.prototype.clear=function(){return this.splice(0)},e.prototype.concat=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),n.map(function(r){return pi(r)?r.peek():r}))},e.prototype.replace=function(n){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,n)},e.prototype.toJS=function(){return this.slice()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},e.prototype.find=function(n,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.find fromIndex argument to find will not be supported anymore in the next major");var o=this.findIndex.apply(this,arguments);return o===-1?void 0:this.get(o)},e.prototype.findIndex=function(n,i,r){r===void 0&&(r=0),arguments.length===3&&he("The array.findIndex fromIndex argument to find will not be supported anymore in the next major");for(var o=this.peek(),a=o.length,s=r;s<a;s++)if(n.call(i,o[s],s,this))return s;return-1},e.prototype.splice=function(n,i){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(n);case 2:return this.$mobx.spliceWithArray(n,i)}return this.$mobx.spliceWithArray(n,i,r)},e.prototype.spliceWithArray=function(n,i,r){return this.$mobx.spliceWithArray(n,i,r)},e.prototype.push=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(r.values.length,0,n),r.values.length},e.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},e.prototype.shift=function(){return this.splice(0,1)[0]},e.prototype.unshift=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this.$mobx;return r.spliceWithArray(0,0,n),r.values.length},e.prototype.reverse=function(){var n=this.slice();return n.reverse.apply(n,arguments)},e.prototype.sort=function(n){var i=this.slice();return i.sort.apply(i,arguments)},e.prototype.remove=function(n){var i=this.$mobx.dehanceValues(this.$mobx.values).indexOf(n);return i>-1?(this.splice(i,1),!0):!1},e.prototype.move=function(n,i){he("observableArray.move is deprecated, use .slice() & .replace() instead");function r(s){if(s<0)throw new Error("[mobx.array] Index out of bounds: "+s+" is negative");var m=this.$mobx.values.length;if(s>=m)throw new Error("[mobx.array] Index out of bounds: "+s+" is not smaller than "+m)}if(r.call(this,n),r.call(this,i),n!==i){var o=this.$mobx.values,a;n<i?a=Vi(o.slice(0,n),o.slice(n+1,i+1),[o[n]],o.slice(i+1)):a=Vi(o.slice(0,i),[o[n]],o.slice(i,n),o.slice(n+1)),this.replace(a)}},e.prototype.get=function(n){var i=this.$mobx;if(i){if(n<i.values.length)return i.atom.reportObserved(),i.dehanceValue(i.values[n]);console.warn("[mobx.array] Attempt to read an array index ("+n+") that is out of bounds ("+i.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},e.prototype.set=function(n,i){var r=this.$mobx,o=r.values;if(n<o.length){fi(r.atom);var a=o[n];if(ce(r)){var s=de(r,{type:"update",object:this,index:n,newValue:i});if(!s)return;i=s.newValue}i=r.enhancer(i,a);var m=i!==a;m&&(o[n]=i,r.notifyArrayChildUpdate(n,i,a))}else if(n===o.length)r.spliceWithArray(n,0,[i]);else throw new Error("[mobx.array] Index out of bounds, "+n+" is larger than "+o.length)},e})(Zi);Yi(be.prototype,function(){this.$mobx.atom.reportObserved();var t=this,e=0;return wt({next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0,value:void 0}}})});Object.defineProperty(be.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(t){this.$mobx.setArrayLength(t)}});Ge(be.prototype,Xi(),"Array");["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(t){var e=Array.prototype[t];Nt(typeof e=="function","Base function not defined on Array prototype: '"+t+"'"),Ge(be.prototype,t,function(){return e.apply(this.peek(),arguments)})});Pr(be.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var z2=tr(0);function tr(t){return{enumerable:!1,configurable:!1,get:function(){return this.get(t)},set:function(e){this.set(t,e)}}}function L2(t){Object.defineProperty(be.prototype,""+t,tr(t))}function ir(t){for(var e=Ui;e<t;e++)L2(e);Ui=t}ir(1e3);var O2=Oe("ObservableArrayAdministration",er);function pi(t){return Wi(t)&&O2(t.$mobx)}var A2={},hi=(function(){function t(e,n,i){if(n===void 0&&(n=Dt),i===void 0&&(i="ObservableMap@"+Y()),this.enhancer=n,this.name=i,this.$mobx=A2,this._keys=new be(void 0,zt,this.name+".keys()",!0),typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return t.prototype._has=function(e){return this._data.has(e)},t.prototype.has=function(e){var n=this;if(!v.trackingDerivation)return this._has(e);var i=this._hasMap.get(e);if(!i){var r=i=new ze(this._has(e),zt,this.name+"."+ii(e)+"?",!1);this._hasMap.set(e,r),X1(r,function(){return n._hasMap.delete(e)})}return i.get()},t.prototype.set=function(e,n){var i=this._has(e);if(ce(this)){var r=de(this,{type:i?"update":"add",object:this,newValue:n,name:e});if(!r)return this;n=r.newValue}return i?this._updateValue(e,n):this._addValue(e,n),this},t.prototype.delete=function(e){var n=this;if(ce(this)){var i=de(this,{type:"delete",object:this,name:e});if(!i)return!1}if(this._has(e)){var r=B(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return r&&ee(K({},i,{name:this.name,key:e})),pe(function(){n._keys.remove(e),n._updateHasMapEntry(e,!1);var s=n._data.get(e);s.setNewValue(void 0),n._data.delete(e)}),o&&ne(this,i),r&&te(),!0}return!1},t.prototype._updateHasMapEntry=function(e,n){var i=this._hasMap.get(e);i&&i.setNewValue(n)},t.prototype._updateValue=function(e,n){var i=this._data.get(e);if(n=i.prepareNewValue(n),n!==v.UNCHANGED){var r=B(),o=ie(this),a=o||r?{type:"update",object:this,oldValue:i.value,name:e,newValue:n}:null;r&&ee(K({},a,{name:this.name,key:e})),i.setNewValue(n),o&&ne(this,a),r&&te()}},t.prototype._addValue=function(e,n){var i=this;pe(function(){var s=new ze(n,i.enhancer,i.name+"."+ii(e),!1);i._data.set(e,s),n=s.value,i._updateHasMapEntry(e,!0),i._keys.push(e)});var r=B(),o=ie(this),a=o||r?{type:"add",object:this,name:e,newValue:n}:null;r&&ee(K({},a,{name:this.name,key:e})),o&&ne(this,a),r&&te()},t.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.keys=function(){return this._keys[Ki()]()},t.prototype.values=function(){var e=this,n=0;return wt({next:function(){return n<e._keys.length?{value:e.get(e._keys[n++]),done:!1}:{value:void 0,done:!0}}})},t.prototype.entries=function(){var e=this,n=0;return wt({next:function(){if(n<e._keys.length){var i=e._keys[n++];return{value:[i,e.get(i)],done:!1}}return{done:!0}}})},t.prototype.forEach=function(e,n){var i=this;this._keys.forEach(function(r){return e.call(n,i.get(r),r,i)})},t.prototype.merge=function(e){var n=this;return qe(e)&&(e=e.toJS()),pe(function(){pt(e)?Object.keys(e).forEach(function(i){return n.set(i,e[i])}):Array.isArray(e)?e.forEach(function(i){var r=L1(i,2),o=r[0],a=r[1];return n.set(o,a)}):ht(e)?e.constructor!==Map?T("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach(function(i,r){return n.set(r,i)}):e!=null&&T("Cannot initialize map from "+e)}),this},t.prototype.clear=function(){var e=this;pe(function(){F1(function(){e._keys.slice().forEach(function(n){return e.delete(n)})})})},t.prototype.replace=function(e){var n=this;return pe(function(){for(var i=Rr(e),r=n._keys,o=Array.from(i.keys()),a=!1,s=0;s<r.length;s++){var m=r[s];r.length===o.length&&m!==o[s]&&(a=!0),i.has(m)||(a=!0,n.delete(m))}i.forEach(function(C,A){n._data.has(A)||(a=!0),n.set(A,C)}),a&&n._keys.replace(o)}),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var e=this,n={};return this._keys.forEach(function(i){return n[typeof i=="symbol"?i:ii(i)]=e.get(i)}),n},t.prototype.toJS=function(){var e=this,n=new Map;return this._keys.forEach(function(i){return n.set(i,e.get(i))}),n},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map(function(n){return ii(n)+": "+(""+e.get(n))}).join(", ")+" }]"},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t})();function ii(t){return t&&t.toString?t.toString():new String(t).toString()}Yi(hi.prototype,function(){return this.entries()});Ot(hi.prototype,Xi(),"Map");var qe=Oe("ObservableMap",hi),D2={},mi=(function(){function t(e,n,i){if(n===void 0&&(n=Dt),i===void 0&&(i="ObservableSet@"+Y()),this.name=i,this.$mobx=D2,this._data=new Set,this._atom=Vr(this.name),typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(r,o){return n(r,o,i)},e&&this.replace(e)}return t.prototype.dehanceValue=function(e){return this.dehancer!==void 0?this.dehancer(e):e},t.prototype.clear=function(){var e=this;pe(function(){F1(function(){e._data.forEach(function(n){e.delete(n)})})})},t.prototype.forEach=function(e,n){var i=this;this._data.forEach(function(r){e.call(n,r,r,i)})},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(e){var n=this;if(fi(this._atom),ce(this)){var i=de(this,{type:"add",object:this,newValue:e});if(!i)return this}if(!this.has(e)){pe(function(){n._data.add(n.enhancer(e,void 0)),n._atom.reportChanged()});var r=B(),o=ie(this),i=o||r?{type:"add",object:this,newValue:e}:null;o&&ne(this,i)}return this},t.prototype.delete=function(e){var n=this;if(ce(this)){var i=de(this,{type:"delete",object:this,oldValue:e});if(!i)return!1}if(this.has(e)){var r=B(),o=ie(this),i=o||r?{type:"delete",object:this,oldValue:e}:null;return pe(function(){n._atom.reportChanged(),n._data.delete(e)}),o&&ne(this,i),!0}return!1},t.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},t.prototype.entries=function(){var e=0,n=ft(this.keys()),i=ft(this.values());return wt({next:function(){var r=e;return e+=1,r<i.length?{value:[n[r],i[r]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var e=this,n=0,i;return this._data.values!==void 0?i=ft(this._data.values()):(i=[],this._data.forEach(function(r){return i.push(r)})),wt({next:function(){return n<i.length?{value:e.dehanceValue(i[n++]),done:!1}:{done:!0}}})},t.prototype.replace=function(e){var n=this;return vt(e)&&(e=e.toJS()),pe(function(){Array.isArray(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):At(e)?(n.clear(),e.forEach(function(i){return n.add(i)})):e!=null&&T("Cannot initialize set from "+e)}),this},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+ft(this.keys()).join(", ")+" ]"},t})();Yi(mi.prototype,function(){return this.values()});Ot(mi.prototype,Xi(),"Set");var vt=Oe("ObservableSet",mi),nr=(function(){function t(e,n,i){this.target=e,this.name=n,this.defaultEnhancer=i,this.values={}}return t.prototype.read=function(e,n){if(!(this.target!==e&&(this.illegalAccess(e,n),!this.values[n])))return this.values[n].get()},t.prototype.write=function(e,n,i){var r=this.target;r!==e&&this.illegalAccess(e,n);var o=this.values[n];if(o instanceof Le){o.set(i);return}if(ce(this)){var a=de(this,{type:"update",object:r,name:n,newValue:i});if(!a)return;i=a.newValue}if(i=o.prepareNewValue(i),i!==v.UNCHANGED){var s=ie(this),m=B(),a=s||m?{type:"update",object:r,oldValue:o.value,name:n,newValue:i}:null;m&&ee(K({},a,{name:this.name,key:n})),o.setNewValue(i),s&&ne(this,a),m&&te()}},t.prototype.remove=function(e){if(this.values[e]){var n=this.target;if(ce(this)){var i=de(this,{object:n,name:e,type:"remove"});if(!i)return}try{me();var r=ie(this),o=B(),a=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var i=r||o?{type:"remove",object:n,oldValue:a,name:e}:null;o&&ee(K({},i,{name:this.name,key:e})),r&&ne(this,i),o&&te()}finally{ve()}}},t.prototype.illegalAccess=function(e,n){console.warn("Property '"+n+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(e,n){return Rt(this,e)},t.prototype.intercept=function(e){return It(this,e)},t.prototype.getKeys=function(){var e=this;return this.keys===void 0&&(this.keys=new be(Object.keys(this.values).filter(function(n){return e.values[n]instanceof ze}),zt,"keys("+this.name+")",!0)),this.keys.slice()},t})();function en(t,e,n){e===void 0&&(e=""),n===void 0&&(n=Dt);var i=t.$mobx;return i||(pt(t)||(e=(t.constructor.name||"ObservableObject")+"@"+Y()),e||(e="ObservableObject@"+Y()),i=new nr(t,e,n),Ot(t,"$mobx",i),i)}function T2(t,e,n,i){var r=en(t);if(ce(r)){var o=de(r,{object:t,name:e,type:"add",newValue:n});if(!o)return;n=o.newValue}var a=r.values[e]=new ze(n,i,r.name+"."+e,!1);n=a.value,Object.defineProperty(t,e,R2(e)),r.keys&&r.keys.push(e),F2(r,t,e,n)}function I2(t,e,n){var i=en(t);n.name=i.name+"."+e,n.context=t,i.values[e]=new Le(n),Object.defineProperty(t,e,P2(e))}var x1=Object.create(null),E1=Object.create(null);function R2(t){return x1[t]||(x1[t]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,t)},set:function(e){this.$mobx.write(this,t,e)}})}function M1(t){var e=t.$mobx;return e||(je(t),t.$mobx)}function P2(t){return E1[t]||(E1[t]={configurable:v.computedConfigurable,enumerable:!1,get:function(){return M1(this).read(this,t)},set:function(e){M1(this).write(this,t,e)}})}function F2(t,e,n,i){var r=ie(t),o=B(),a=r||o?{type:"add",object:e,name:n,newValue:i}:null;o&&ee(K({},a,{name:t.name,key:n})),r&&ne(t,a),o&&te()}var k2=Oe("ObservableObjectAdministration",nr);function Lt(t){return Wi(t)?(je(t),k2(t.$mobx)):!1}function ge(t,e){if(typeof t=="object"&&t!==null){if(pi(t))return e!==void 0&&T(!1),t.$mobx.atom;if(vt(t))return t.$mobx;if(qe(t)){var n=t;if(e===void 0)return ge(n._keys);var i=n._data.get(e)||n._hasMap.get(e);return i||T(!1),i}if(je(t),e&&!t.$mobx&&t[e],Lt(t)){if(!e)return T(!1);var i=t.$mobx.values[e];return i||T(!1),i}if(Qi(t)||ui(t)||li(t))return t}else if(typeof t=="function"&&li(t.$mobx))return t.$mobx;return T(!1)}function rr(t,e){if(t||T("Expecting some object"),e!==void 0)return rr(ge(t,e));if(Qi(t)||ui(t)||li(t)||qe(t)||vt(t))return t;if(je(t),t.$mobx)return t.$mobx;T(!1)}function V2(t,e){var n;return e!==void 0?n=ge(t,e):Lt(t)||qe(t)||vt(t)?n=rr(t):n=ge(t),n.name}var N1=Object.prototype.toString;function tn(t,e,n){return n===void 0&&(n=-1),Gi(t,e,n)}function Gi(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var o=typeof t;if(o!=="function"&&o!=="object"&&typeof e!="object")return!1;t=w1(t),e=w1(e);var a=N1.call(t);if(a!==N1.call(e))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e)}var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var m=t.constructor,C=e.constructor;if(m!==C&&!(typeof m=="function"&&m instanceof m&&typeof C=="function"&&C instanceof C)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var A=i.length;A--;)if(i[A]===t)return r[A]===e;if(i.push(t),r.push(e),s){if(A=t.length,A!==e.length)return!1;for(;A--;)if(!Gi(t[A],e[A],n-1,i,r))return!1}else{var X=Object.keys(t),Ae=void 0;if(A=X.length,Object.keys(e).length!==A)return!1;for(;A--;)if(Ae=X[A],!(H2(e,Ae)&&Gi(t[Ae],e[Ae],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function w1(t){return pi(t)?t.peek():ht(t)||qe(t)||At(t)||vt(t)?ft(t.entries()):t}function H2(t,e){return Object.prototype.hasOwnProperty.call(t,e)}(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();var B2="$mobx";typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:p2,extras:{getDebugName:V2},$mobx:B2});var j2=t=>({$implicit:t});function U2(t,e){t&1&&(c(0,"span"),p(1,"loading..."),d())}var G2=["*"],bt=()=>({dontDetach:!0});function $2(t,e){if(t&1&&(Ie(0),c(1,"div"),Nn(2),d(),Re()),t&2){let n=u();l(),Pe("height",n.getTotalHeight())}}function q2(t,e){if(t&1){let n=F();Ie(0),c(1,"input",1),b("click",function(r){_(n);let o=u();return x(o.node.mouseAction("checkboxClick",r))}),d(),Re()}if(t&2){let n=u();l(),f("checked",n.node.isSelected)("indeterminate",n.node.isPartiallySelected)}}function W2(t,e){if(t&1){let n=F();c(0,"span",3),b("click",function(r){_(n);let o=u(2);return x(o.node.mouseAction("expanderClick",r))}),g(1,"span",4),d()}if(t&2){let n=u(2);q("toggle-children-wrapper-expanded",n.node.isExpanded)("toggle-children-wrapper-collapsed",n.node.isCollapsed)}}function K2(t,e){t&1&&g(0,"span",5)}function Y2(t,e){if(t&1&&(Ie(0),z(1,W2,2,4,"span",1)(2,K2,1,0,"span",2),Re()),t&2){let n=u();l(),f("ngIf",n.node.hasChildren),l(),f("ngIf",!n.node.hasChildren)}}var X2=(t,e,n)=>({$implicit:t,node:e,index:n});function Q2(t,e){if(t&1&&(c(0,"span"),p(1),d()),t&2){let n=u();l(),k(n.node.displayField)}}var fr=(t,e,n,i)=>({$implicit:t,node:e,index:n,templates:i});function J2(t,e){if(t&1&&g(0,"tree-node-checkbox",4),t&2){let n=u(2);f("node",n.node)}}function Z2(t,e){if(t&1){let n=F();c(0,"div",2),z(1,J2,1,1,"tree-node-checkbox",3),g(2,"tree-node-expander",4),c(3,"div",5),b("click",function(r){_(n);let o=u();return x(o.node.mouseAction("click",r))})("dblclick",function(r){_(n);let o=u();return x(o.node.mouseAction("dblClick",r))})("mouseover",function(r){_(n);let o=u();return x(o.node.mouseAction("mouseOver",r))})("mouseout",function(r){_(n);let o=u();return x(o.node.mouseAction("mouseOut",r))})("contextmenu",function(r){_(n);let o=u();return x(o.node.mouseAction("contextMenu",r))})("treeDrop",function(r){_(n);let o=u();return x(o.node.onDrop(r))})("treeDropDragOver",function(r){_(n);let o=u();return x(o.node.mouseAction("dragOver",r))})("treeDropDragLeave",function(r){_(n);let o=u();return x(o.node.mouseAction("dragLeave",r))})("treeDropDragEnter",function(r){_(n);let o=u();return x(o.node.mouseAction("dragEnter",r))}),g(4,"tree-node-content",6),d()()}if(t&2){let n=u();Pe("padding-left",n.node.getNodePadding()),l(),f("ngIf",n.node.options.useCheckbox),l(),f("node",n.node),l(),q("node-content-wrapper-active",n.node.isActive)("node-content-wrapper-focused",n.node.isFocused),f("treeAllowDrop",n.node.allowDrop)("allowDragoverStyling",n.node.allowDragoverStyling())("treeDrag",n.node)("treeDragEnabled",n.node.allowDrag()),l(),f("node",n.node)("index",n.index)("template",n.templates.treeNodeTemplate)}}function eo(t,e){if(t&1&&g(0,"tree-node-collection",4),t&2){let n=u(3);f("nodes",n.node.children)("templates",n.templates)("treeModel",n.node.treeModel)}}function to(t,e){if(t&1&&g(0,"tree-loading-component",5),t&2){let n=u(3);Pe("padding-left",n.node.getNodePadding()),f("template",n.templates.loadingTemplate)("node",n.node)}}function io(t,e){if(t&1&&(c(0,"div"),z(1,eo,1,3,"tree-node-collection",2)(2,to,1,4,"tree-loading-component",3),d()),t&2){let n=u(2);q("tree-children",!0)("tree-children-no-padding",n.node.options.levelPadding),l(),f("ngIf",n.node.children),l(),f("ngIf",!n.node.children)}}function no(t,e){if(t&1&&(Ie(0),z(1,io,3,6,"div",1),Re()),t&2){let n=u();l(),f("treeAnimateOpen",n.node.isExpanded)("treeAnimateOpenSpeed",n.node.options.animateSpeed)("treeAnimateOpenAcceleration",n.node.options.animateAcceleration)("treeAnimateOpenEnabled",n.node.options.animateExpand)}}function ro(t,e){if(t&1&&g(0,"tree-node",2),t&2){let n=e.$implicit,i=e.index,r=u(2);f("node",n)("index",i)("templates",r.templates)}}function oo(t,e){if(t&1&&(Ie(0),c(1,"div"),z(2,ro,1,3,"tree-node",1),d(),Re()),t&2){let n=u();l(),Pe("margin-top",n.marginTop),l(),f("ngForOf",n.viewportNodes)("ngForTrackBy",n.trackNode)}}function ao(t,e){if(t&1&&g(0,"tree-node-drop-slot",6),t&2){let n=u(3);f("dropIndex",n.node.index)("node",n.node.parent)}}function so(t,e){if(t&1&&(c(0,"div"),z(1,ao,1,2,"tree-node-drop-slot",3),g(2,"tree-node-wrapper",4)(3,"tree-node-children",5)(4,"tree-node-drop-slot",6),d()),t&2){let n=u(2);Qe(n.node.getClass()),q("tree-node",!0)("tree-node-expanded",n.node.isExpanded&&n.node.hasChildren)("tree-node-collapsed",n.node.isCollapsed&&n.node.hasChildren)("tree-node-leaf",n.node.isLeaf)("tree-node-active",n.node.isActive)("tree-node-focused",n.node.isFocused),l(),f("ngIf",n.index===0),l(),f("node",n.node)("index",n.index)("templates",n.templates),l(),f("node",n.node)("templates",n.templates),l(),f("dropIndex",n.node.index+1)("node",n.node.parent)}}function lo(t,e){if(t&1&&(Ie(0),z(1,so,5,22,"div",1),Se(2,2),Re()),t&2){let n=u();l(),f("ngIf",!n.templates.treeNodeFullTemplate),l(),f("ngTemplateOutlet",n.templates.treeNodeFullTemplate)("ngTemplateOutletContext",Ht(3,fr,n.node,n.node,n.index,n.templates))}}var co=["loadingTemplate"],fo=["treeNodeTemplate"],uo=["treeNodeWrapperTemplate"],po=["treeNodeFullTemplate"],ho=["viewport"],mo=(t,e,n,i)=>({loadingTemplate:t,treeNodeTemplate:e,treeNodeWrapperTemplate:n,treeNodeFullTemplate:i});function vo(t,e){if(t&1&&g(0,"tree-node-collection",4),t&2){let n=u();f("nodes",n.treeModel.roots)("treeModel",n.treeModel)("templates",Ht(3,mo,n.loadingTemplate,n.treeNodeTemplate,n.treeNodeWrapperTemplate,n.treeNodeFullTemplate))}}function go(t,e){if(t&1&&g(0,"tree-node-drop-slot",5),t&2){let n=u();f("dropIndex",0)("node",n.treeModel.virtualRoot)}}var Ct=(()=>{let e=class e{constructor(){this.templateRef=h(Ni),this.viewContainer=h(wi),this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(i){this.dispose=Tt(()=>i.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}});let t=e;return t})(),G={LEFT:37,UP:38,RIGHT:39,DOWN:40,ENTER:13,SPACE:32,CONTEXT_MENU:32},I={TOGGLE_ACTIVE:(t,e,n)=>e&&e.toggleActivated(),TOGGLE_ACTIVE_MULTI:(t,e,n)=>e&&e.toggleActivated(!0),TOGGLE_SELECTED:(t,e,n)=>e&&e.toggleSelected(),ACTIVATE:(t,e,n)=>e.setIsActive(!0),DEACTIVATE:(t,e,n)=>e.setIsActive(!1),SELECT:(t,e,n)=>e.setIsSelected(!0),DESELECT:(t,e,n)=>e.setIsSelected(!1),FOCUS:(t,e,n)=>e.focus(),TOGGLE_EXPANDED:(t,e,n)=>e.hasChildren&&e.toggleExpanded(),EXPAND:(t,e,n)=>e.expand(),COLLAPSE:(t,e,n)=>e.collapse(),DRILL_DOWN:(t,e,n)=>t.focusDrillDown(),DRILL_UP:(t,e,n)=>t.focusDrillUp(),NEXT_NODE:(t,e,n)=>t.focusNextNode(),PREVIOUS_NODE:(t,e,n)=>t.focusPreviousNode(),MOVE_NODE:(t,e,n,{from:i,to:r})=>{n.ctrlKey?t.copyNode(i,r):t.moveNode(i,r)}},gt={mouse:{click:I.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:I.TOGGLE_EXPANDED,checkboxClick:I.TOGGLE_SELECTED,drop:I.MOVE_NODE},keys:{[G.RIGHT]:I.DRILL_DOWN,[G.LEFT]:I.DRILL_UP,[G.DOWN]:I.NEXT_NODE,[G.UP]:I.PREVIOUS_NODE,[G.SPACE]:I.TOGGLE_ACTIVE,[G.ENTER]:I.TOGGLE_ACTIVE}},bi=class{get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return this.options.scrollOnActivate===void 0?!0:this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return this.options.useTriState===void 0?!0:this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return this.options.allowDragoverStyling===void 0?!0:this.options.allowDragoverStyling}constructor(e={}){this.options=e,this.actionMapping={mouse:{click:this.options?.actionMapping?.mouse?.click??gt.mouse.click,dblClick:this.options?.actionMapping?.mouse?.dblClick??gt.mouse.dblClick,contextMenu:this.options?.actionMapping?.mouse?.contextMenu??gt.mouse.contextMenu,expanderClick:this.options?.actionMapping?.mouse?.expanderClick??gt.mouse.expanderClick,checkboxClick:this.options?.actionMapping?.mouse?.checkboxClick??gt.mouse.checkboxClick,drop:this.options?.actionMapping?.mouse?.drop??gt.mouse.drop,dragStart:this.options?.actionMapping?.mouse?.dragStart??void 0,drag:this.options?.actionMapping?.mouse?.drag??void 0,dragEnd:this.options?.actionMapping?.mouse?.dragEnd??void 0,dragOver:this.options?.actionMapping?.mouse?.dragOver??void 0,dragLeave:this.options?.actionMapping?.mouse?.dragLeave??void 0,dragEnter:this.options?.actionMapping?.mouse?.dragEnter??void 0,mouseOver:this.options?.actionMapping?.mouse?.mouseOver??void 0,mouseOut:this.options?.actionMapping?.mouse?.mouseOut??void 0},keys:{[G.RIGHT]:I.DRILL_DOWN,[G.LEFT]:I.DRILL_UP,[G.DOWN]:I.NEXT_NODE,[G.UP]:I.PREVIOUS_NODE,[G.SPACE]:I.TOGGLE_ACTIVE,[G.ENTER]:I.TOGGLE_ACTIVE}},this.options?.actionMapping?.keys&&(this.actionMapping.keys=Q(Q({},this.actionMapping.keys),this.options.actionMapping.keys)),e.rtl&&(this.actionMapping.keys[G.RIGHT]=e.actionMapping?.keys[G.RIGHT]||I.DRILL_UP,this.actionMapping.keys[G.LEFT]=e.actionMapping?.keys[G.LEFT]||I.DRILL_DOWN)}getNodeClone(e){if(this.options.getNodeClone)return this.options.getNodeClone(e);let n=Object.assign({},e.data);return n.id&&delete n.id,n}allowDrop(e,n,i){return this.options.allowDrop instanceof Function?this.options.allowDrop(e,n,i):this.options.allowDrop===void 0?!0:this.options.allowDrop}allowDrag(e){return this.options.allowDrag instanceof Function?this.options.allowDrag(e):this.options.allowDrag}nodeClass(e){return this.options.nodeClass?this.options.nodeClass(e):""}nodeHeight(e){if(e.data.virtual)return 0;let n=this.options.nodeHeight||22;return typeof n=="function"&&(n=n(e)),n+(e.index===0?2:1)*this.dropSlotHeight}get dropSlotHeight(){return typeof this.options.dropSlotHeight=="number"?this.options.dropSlotHeight:2}},P={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"},$=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},V=class t{get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.some(e=>e.isSelected)}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):this.children.every(e=>e.isAllSelected)}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw`Element Ref is no longer supported since introducing virtual scroll
|
|
17
|
+
|
|
18
|
+
You may use a template to obtain a reference to the element`}get originalNode(){return this._originalNode}constructor(e,n,i,r){this.data=e,this.parent=n,this.treeModel=i,this.position=0,this.allowDrop=(o,a)=>this.options.allowDrop(o,{parent:this,index:0},a),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,(this.id===void 0||this.id===null)&&(this.id=bo()),this.index=r,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(e){this.treeModel.fireEvent(e)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(e){this.setField("id",e)}getField(e){return this.data[this.options[`${e}Field`]]}setField(e,n){this.data[this.options[`${e}Field`]]=n}_findAdjacentSibling(e,n=!1){let i=this._getParentsChildren(n),r=i.indexOf(this);return i.length>r+e?i[r+e]:null}findNextSibling(e=!1){return this._findAdjacentSibling(1,e)}findPreviousSibling(e=!1){return this._findAdjacentSibling(-1,e)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(e=>!e.isHidden)}getFirstChild(e=!1){let n=e?this.visibleChildren:this.children;return n!=null&&n.length?n[0]:null}getLastChild(e=!1){let n=e?this.visibleChildren:this.children;return n!=null&&n.length?n[n.length-1]:null}findNextNode(e=!0,n=!1){return e&&this.isExpanded&&this.getFirstChild(n)||this.findNextSibling(n)||this.parent&&this.parent.findNextNode(!1,n)}findPreviousNode(e=!1){let n=this.findPreviousSibling(e);return n?n._getLastOpenDescendant(e):this.realParent}_getLastOpenDescendant(e=!1){let n=this.getLastChild(e);return this.isCollapsed||!n?this:n._getLastOpenDescendant(e)}_getParentsChildren(e=!1){return this.parent&&(e?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(e=!1){return this._getParentsChildren(e).indexOf(this)}isDescendantOf(e){return this===e?!0:this.parent&&this.parent.isDescendantOf(e)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),`tree-node-level-${this.level}`].join(" ")}onDrop(e){this.mouseAction("drop",e.event,{from:e.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(e=>{e&&(this.setField("children",e),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(n=>{n.getField("isExpanded")&&n.hasChildren&&n.expand()}))}).then(()=>{this.fireEvent({eventName:P.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(e){Promise.resolve(e(this)).then(()=>{this.children&&this.children.forEach(n=>n.doForAll(e))})}expandAll(){this.doForAll(e=>e.expand())}collapseAll(){this.doForAll(e=>e.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(e){return this.hasChildren&&this.treeModel.setExpandedNode(this,e),this}autoLoadChildren(){this.handler=$e(()=>this.isExpanded,e=>{!this.children&&this.hasChildren&&e&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(e=>e.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(e,n=!1){return this.treeModel.setActiveNode(this,e,n),e&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(e){return this.isSelectable()?this.treeModel.setSelectedNode(this,e):this.visibleChildren.forEach(n=>n.setIsSelected(e)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(e=!1){return this.setIsActive(!this.isActive,e),this}setActiveAndVisible(e=!1){return this.setIsActive(!0,e).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(e=!1){this.treeModel.virtualScroll.scrollIntoView(this,e)}focus(e=!0){let n=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),e&&this.scrollIntoView(),n&&this.fireEvent({eventName:P.blur,node:n}),this.fireEvent({eventName:P.focus,node:this}),this}blur(){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),e&&this.fireEvent({eventName:P.blur,node:this}),this}setIsHidden(e){this.treeModel.setIsHidden(this,e)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(e,n,i=null){this.treeModel.setFocus(!0);let o=this.options.actionMapping.mouse[e];o&&o(this.treeModel,this,n,i)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((e,n)=>new t(e,this,this.treeModel,n))}};$([R],V.prototype,"isHidden",null);$([R],V.prototype,"isExpanded",null);$([R],V.prototype,"isActive",null);$([R],V.prototype,"isFocused",null);$([R],V.prototype,"isSelected",null);$([R],V.prototype,"isAllSelected",null);$([R],V.prototype,"isPartiallySelected",null);$([E],V.prototype,"children",void 0);$([E],V.prototype,"index",void 0);$([E],V.prototype,"position",void 0);$([E],V.prototype,"height",void 0);$([R],V.prototype,"level",null);$([R],V.prototype,"path",null);$([R],V.prototype,"visibleChildren",null);$([M],V.prototype,"setIsSelected",null);$([M],V.prototype,"_initChildren",null);function bo(){return Math.floor(Math.random()*1e13)}var N=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},y=(()=>{let e=class e{constructor(){this.options=new bi,this.eventNames=Object.keys(P),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}fireEvent(i){i.treeModel=this,this.events[i.eventName].emit(i),this.events.event.emit(i)}subscribe(i,r){let o=this.events[i].subscribe(r);this.subscriptions.push(o)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(i=!1){let r=i?this.getVisibleRoots():this.roots;return r!=null&&r.length?r[0]:null}getLastRoot(i=!1){let r=i?this.getVisibleRoots():this.roots;return r!=null&&r.length?r[r.length-1]:null}get isFocused(){return e.focusedTree===this}isNodeFocused(i){return this.focusedNode===i}isEmptyTree(){return this.roots&&this.roots.length===0}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){return Object.keys(this.expandedNodeIds).filter(r=>this.expandedNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get activeNodes(){return Object.keys(this.activeNodeIds).filter(r=>this.activeNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get hiddenNodes(){return Object.keys(this.hiddenNodeIds).filter(r=>this.hiddenNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}get selectedLeafNodes(){return Object.keys(this.selectedLeafNodeIds).filter(r=>this.selectedLeafNodeIds[r]).map(r=>this.getNodeById(r)).filter(Boolean)}getNodeByPath(i,r=null){if(!i)return null;if(r=r||this.virtualRoot,i.length===0)return r;if(!r.children)return null;let o=i.shift(),a=r.children.find(s=>s.id===o);return a?this.getNodeByPath(i,a):null}getNodeById(i){let r=i.toString();return this.getNodeBy(o=>o.id.toString()===r)}getNodeBy(i,r=null){if(r=r||this.virtualRoot,!r.children)return null;let o=r.children.find(i);if(o)return o;for(let a of r.children){let s=this.getNodeBy(i,a);if(s)return s}}isExpanded(i){return this.expandedNodeIds[i.id]}isHidden(i){return this.hiddenNodeIds[i.id]}isActive(i){return this.activeNodeIds[i.id]}isSelected(i){return this.selectedLeafNodeIds[i.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(i=>i.unsubscribe()),this.subscriptions=[]}setData({nodes:i,options:r=null,events:o=null}){r&&(this.options=new bi(r)),o&&(this.events=o),i&&(this.nodes=i),this.update()}update(){let i={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new V(i,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:P.updateData})}setFocusedNode(i){this.focusedNodeId=i?i.id:null}setFocus(i){e.focusedTree=i?this:null}doForAll(i){this.roots.forEach(r=>r.doForAll(i))}focusNextNode(){let i=this.getFocusedNode(),r=i?i.findNextNode(!0,!0):this.getFirstRoot(!0);r&&r.focus()}focusPreviousNode(){let i=this.getFocusedNode(),r=i?i.findPreviousNode(!0):this.getLastRoot(!0);r&&r.focus()}focusDrillDown(){let i=this.getFocusedNode();if(i&&i.isCollapsed&&i.hasChildren)i.toggleExpanded();else{let r=i?i.getFirstChild(!0):this.getFirstRoot(!0);r&&r.focus()}}focusDrillUp(){let i=this.getFocusedNode();if(i)if(i.isExpanded)i.toggleExpanded();else{let r=i.realParent;r&&r.focus()}}setActiveNode(i,r,o=!1){o?this._setActiveNodeMulti(i,r):this._setActiveNodeSingle(i,r),r?(i.focus(this.options.scrollOnActivate),this.fireEvent({eventName:P.activate,node:i}),this.fireEvent({eventName:P.nodeActivate,node:i})):(this.fireEvent({eventName:P.deactivate,node:i}),this.fireEvent({eventName:P.nodeDeactivate,node:i}))}setSelectedNode(i,r){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[i.id]:r}),r?(i.focus(),this.fireEvent({eventName:P.select,node:i})):this.fireEvent({eventName:P.deselect,node:i})}setExpandedNode(i,r){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[i.id]:r}),this.fireEvent({eventName:P.toggleExpanded,node:i,isExpanded:r})}expandAll(){this.roots.forEach(i=>i.expandAll())}collapseAll(){this.roots.forEach(i=>i.collapseAll())}setIsHidden(i,r){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[i.id]:r})}setHiddenNodeIds(i){this.hiddenNodeIds=i.reduce((r,o)=>Object.assign(r,{[o]:!0}),{})}performKeyAction(i,r){let o=this.options.actionMapping.keys[r.keyCode];return o?(r.preventDefault(),o(this,i,r),!0):!1}filterNodes(i,r=!0){let o;if(!i)return this.clearFilter();if(i&&typeof i.valueOf()=="string")o=s=>s.displayField.toLowerCase().indexOf(i.toLowerCase())!==-1;else if(i&&typeof i=="function")o=i;else{console.error("Don't know what to do with filter",i),console.error("Should be either a string or function");return}let a={};this.roots.forEach(s=>this._filterNode(a,s,o,r)),this.hiddenNodeIds=a,this.fireEvent({eventName:P.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:P.changeFilter})}moveNode(i,r){let o=i.getIndexInParent(),a=i.parent;if(!this.canMoveNode(i,r,o))return;let s=a.getField("children");r.parent.getField("children")||r.parent.setField("children",[]);let m=r.parent.getField("children"),C=s.splice(o,1)[0],A=a===r.parent&&r.index>o?r.index-1:r.index;m.splice(A,0,C),a.treeModel.update(),r.parent.treeModel!==a.treeModel&&r.parent.treeModel.update(),this.fireEvent({eventName:P.moveNode,node:C,to:{parent:r.parent.data,index:A},from:{parent:a.data,index:o}})}copyNode(i,r){let o=i.getIndexInParent();if(!this.canMoveNode(i,r,o))return;r.parent.getField("children")||r.parent.setField("children",[]);let a=r.parent.getField("children"),s=this.options.getNodeClone(i);a.splice(r.index,0,s),i.treeModel.update(),r.parent.treeModel!==i.treeModel&&r.parent.treeModel.update(),this.fireEvent({eventName:P.copyNode,node:s,to:{parent:r.parent.data,index:r.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(i){i&&Object.assign(this,{expandedNodeIds:i.expandedNodeIds||{},selectedLeafNodeIds:i.selectedLeafNodeIds||{},activeNodeIds:i.activeNodeIds||{},hiddenNodeIds:i.hiddenNodeIds||{},focusedNodeId:i.focusedNodeId})}subscribeToState(i){Tt(()=>i(this.getState()))}canMoveNode(i,r,o=void 0){let a=o||i.getIndexInParent();return i.parent===r.parent&&o===r.index?!1:!r.parent.isDescendantOf(i)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(i,r,o,a){let s=o(r);return r.children&&r.children.forEach(m=>{this._filterNode(i,m,o,a)&&(s=!0)}),s||(i[r.id]=!0),a&&s&&r.ensureVisible(),s}_calculateExpandedNodes(i=null){i=i||this.virtualRoot,i.data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[i.id]:!0})),i.children&&i.children.forEach(r=>this._calculateExpandedNodes(r))}_setActiveNodeSingle(i,r){this.activeNodes.filter(o=>o!==i).forEach(o=>{this.fireEvent({eventName:P.deactivate,node:o}),this.fireEvent({eventName:P.nodeDeactivate,node:o})}),r?this.activeNodeIds={[i.id]:!0}:this.activeNodeIds={}}_setActiveNodeMulti(i,r){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[i.id]:r})}};e.focusedTree=null,e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac});let t=e;return t})();N([E],y.prototype,"roots",void 0);N([E],y.prototype,"expandedNodeIds",void 0);N([E],y.prototype,"selectedLeafNodeIds",void 0);N([E],y.prototype,"activeNodeIds",void 0);N([E],y.prototype,"hiddenNodeIds",void 0);N([E],y.prototype,"focusedNodeId",void 0);N([E],y.prototype,"virtualRoot",void 0);N([R],y.prototype,"focusedNode",null);N([R],y.prototype,"expandedNodes",null);N([R],y.prototype,"activeNodes",null);N([R],y.prototype,"hiddenNodes",null);N([R],y.prototype,"selectedLeafNodes",null);N([M],y.prototype,"setData",null);N([M],y.prototype,"update",null);N([M],y.prototype,"setFocusedNode",null);N([M],y.prototype,"setFocus",null);N([M],y.prototype,"doForAll",null);N([M],y.prototype,"focusNextNode",null);N([M],y.prototype,"focusPreviousNode",null);N([M],y.prototype,"focusDrillDown",null);N([M],y.prototype,"focusDrillUp",null);N([M],y.prototype,"setActiveNode",null);N([M],y.prototype,"setSelectedNode",null);N([M],y.prototype,"setExpandedNode",null);N([M],y.prototype,"expandAll",null);N([M],y.prototype,"collapseAll",null);N([M],y.prototype,"setIsHidden",null);N([M],y.prototype,"setHiddenNodeIds",null);N([M],y.prototype,"filterNodes",null);N([M],y.prototype,"clearFilter",null);N([M],y.prototype,"moveNode",null);N([M],y.prototype,"copyNode",null);N([M],y.prototype,"setState",null);var nn=(()=>{let e=class e{constructor(){this._draggedElement=null}set(i){this._draggedElement=i}get(){return this._draggedElement}isDragging(){return!!this.get()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Ce=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},or=500,vi=150,re=(()=>{let e=class e{get y(){return this.yBlocks*vi}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}constructor(){this.treeModel=h(y),this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null;let i=this.treeModel;i.virtualScroll=this,this._dispose=[Tt(()=>this.fixScroll())]}fireEvent(i){this.treeModel.fireEvent(i)}init(){let i=this.recalcPositions.bind(this);i(),this._dispose=[...this._dispose,$e(()=>this.treeModel.roots,i),$e(()=>this.treeModel.expandedNodeIds,i),$e(()=>this.treeModel.hiddenNodeIds,i)],this.treeModel.subscribe(P.loadNodeChildren,i)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(i){this.yBlocks=i}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(i,r){let o=r;return i.forEach(a=>{a.position=o,o=this._getPositionAfterNode(a,o)}),o}_getPositionAfterNode(i,r){let o=i.getSelfHeight()+r;return i.children&&i.isExpanded&&(o=this._getPositionAfter(i.visibleChildren,o)),i.height=o-r,o}clear(){this._dispose.forEach(i=>i())}setViewport(i){Object.assign(this,{viewport:i,x:i.scrollLeft,yBlocks:Math.round(i.scrollTop/vi),viewportHeight:i.getBoundingClientRect?i.getBoundingClientRect().height:0})}scrollIntoView(i,r,o=!0){if(i.options.scrollContainer){let a=i.options.scrollContainer,s=a.getBoundingClientRect().height,m=a.getBoundingClientRect().top,C=this.viewport.getBoundingClientRect().top+i.position-m;(r||C<a.scrollTop||C+i.getSelfHeight()>a.scrollTop+s)&&(a.scrollTop=o?C-s/2:C)}else(r||i.position<this.y||i.position+i.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=o?i.position-this.viewportHeight/2:i.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/vi)))}getViewportNodes(i){if(!i)return[];let r=i.filter(C=>!C.isHidden);if(!this.isEnabled())return r;if(!this.viewportHeight||!r.length)return[];let o=r.slice(-1)[0];if(!o.height&&o.position===0)return[];let a=ar(r,C=>C.position+or>this.y||C.position+C.height>this.y),s=ar(r,C=>C.position-or>this.y+this.viewportHeight,a),m=[];for(let C=a;C<=s;C++)m.push(r[C]);return m}fixScroll(){let i=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>i&&this._setYBlocks(i/vi)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac});let t=e;return t})();Ce([E],re.prototype,"yBlocks",void 0);Ce([E],re.prototype,"x",void 0);Ce([E],re.prototype,"viewportHeight",void 0);Ce([R],re.prototype,"y",null);Ce([R],re.prototype,"totalHeight",null);Ce([M],re.prototype,"_setYBlocks",null);Ce([M],re.prototype,"recalcPositions",null);Ce([M],re.prototype,"setViewport",null);Ce([M],re.prototype,"scrollIntoView",null);function ar(t,e,n=0){let i=n,r=t.length-1;for(;i!==r;){let o=Math.floor((i+r)/2);e(t[o])?r=o:i===o?i=r:i=o}return i}var Co=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,o){r&1&&(z(0,U2,2,0,"span",0),Se(1,1)),r&2&&(f("ngIf",!o.template),l(),f("ngTemplateOutlet",o.template)("ngTemplateOutletContext",St(3,j2,o.node)))},dependencies:[Ee,ke],encapsulation:2});let t=e;return t})(),yo=(()=>{let e=class e{constructor(){this.elementRef=h(Ye),this.virtualScroll=h(re),this.setViewport=this.throttle(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:P.initialized})}),this.elementRef.nativeElement.addEventListener("scroll",this.scrollEventHandler)}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}throttle(i,r){let o=0;return function(){let a=Date.now();a-o>=r&&(i(),o=a)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-viewport"]],features:[Di([re])],ngContentSelectors:G2,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(r,o){r&1&&(Mn(),z(0,$2,3,2,"ng-container",0)),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct],encapsulation:2});let t=e;return t})();function So(...t){return M(...t)}var _o=Object.assign(So,M);function xo(...t){return R(...t)}var Eo=Object.assign(xo,R);function Mo(...t){return E(...t)}var sr=Object.assign(Mo,E),lr="is-dragging-over",cr="is-dragging-over-disabled",ur=(()=>{let e=class e{set treeAllowDrop(i){i instanceof Function?this._allowDrop=i:this._allowDrop=(r,o)=>i}allowDrop(i){return this._allowDrop(this.treeDraggedElement.get(),i)}constructor(){this.el=h(Ye),this.renderer=h(Xe),this.treeDraggedElement=h(nn),this.ngZone=h(zi),this.allowDragoverStyling=!0,this.onDropCallback=new j,this.onDragOverCallback=new j,this.onDragLeaveCallback=new j,this.onDragEnterCallback=new j,this._allowDrop=(i,r)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}ngAfterViewInit(){let i=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{i.addEventListener("dragover",this.dragOverEventHandler),i.addEventListener("dragenter",this.dragEnterEventHandler),i.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let i=this.el.nativeElement;i.removeEventListener("dragover",this.dragOverEventHandler),i.removeEventListener("dragenter",this.dragEnterEventHandler),i.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(i){if(!this.allowDrop(i))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:i,element:this.treeDraggedElement.get()}),i.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(i){this.allowDrop(i)&&(i.preventDefault(),this.onDragEnterCallback.emit({event:i,element:this.treeDraggedElement.get()}))}onDragLeave(i){if(!this.allowDrop(i))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:i,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(i){this.allowDrop(i)&&(i.preventDefault(),this.onDropCallback.emit({event:i,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,lr)}removeClass(){this.renderer.removeClass(this.el.nativeElement,lr)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,cr)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,cr)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeDrop",""]],hostBindings:function(r,o){r&1&&b("drop",function(s){return o.onDrop(s)})},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}});let t=e;return t})(),pr=(()=>{let e=class e{onDrop(i){this.node.mouseAction("drop",i.event,{from:i.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(i,r){return this.node.options.allowDrop(i,{parent:this.node,index:this.dropIndex},r)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeDrop","treeAllowDrop","allowDragoverStyling"]],template:function(r,o){r&1&&(c(0,"div",0),b("treeDrop",function(s){return o.onDrop(s)}),d()),r&2&&f("treeAllowDrop",o.allowDrop.bind(o))("allowDragoverStyling",!0)},dependencies:[ur],encapsulation:2});let t=e;return t})(),No=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"click","checked","indeterminate"]],template:function(r,o){r&1&&z(0,q2,2,2,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct],encapsulation:2});let t=e;return t})(),rn=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(r,o){r&1&&z(0,Y2,3,2,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct,Ee],encapsulation:2});let t=e;return t})();var wo=(()=>{let e=class e{constructor(){this.el=h(Ye),this.renderer=h(Xe),this.treeDraggedElement=h(nn),this.ngZone=h(zi),this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let i=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{i.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(i){i.dataTransfer.setData("text",i.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",i)}onDrag(i){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",i)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeDrag",""]],hostBindings:function(r,o){r&1&&b("dragstart",function(s){return o.onDragStart(s)})("dragend",function(){return o.onDragEnd()})},inputs:{draggedElement:[0,"treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}});let t=e;return t})(),on=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(r,o){r&1&&(z(0,Q2,2,1,"span",0),Se(1,1)),r&2&&(f("ngIf",!o.template),l(),f("ngTemplateOutlet",o.template)("ngTemplateOutletContext",wn(3,X2,o.node,o.node,o.index)))},dependencies:[Ee,ke],encapsulation:2});let t=e;return t})(),zo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter","treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled"],[3,"node","index","template"]],template:function(r,o){r&1&&(z(0,Z2,5,15,"div",0),Se(1,1)),r&2&&(f("ngIf",!o.templates.treeNodeWrapperTemplate),l(),f("ngTemplateOutlet",o.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",Ht(3,fr,o.node,o.node,o.index,o.templates)))},dependencies:[Ee,No,rn,wo,ur,on,ke],encapsulation:2});let t=e;return t})(),dr=1.005,Lo=(()=>{let e=class e{constructor(){this.renderer=h(Xe),this.templateRef=h(Ni),this.viewContainerRef=h(wi)}set isOpen(i){i?(this._show(),this.isEnabled&&this._isOpen===!1&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!i}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let i=this.animateSpeed,r=this.animateAcceleration,o=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{let a=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(a);o+=i;let s=Math.round(o);this.renderer.setStyle(this.innerElement,"max-height",`${s}px`);let m=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;i*=r,r*=dr,m<s&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(a))},17)})}_animateClose(){if(!this.innerElement)return;let i=this.animateSpeed,r=this.animateAcceleration,o=this.innerElement.getBoundingClientRect().height,a=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(a);o-=i,this.renderer.setStyle(this.innerElement,"max-height",`${o}px`),i*=r,r*=dr,o<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(a))},17)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","treeAnimateOpen",""]],inputs:{animateSpeed:[0,"treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:[0,"treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:[0,"treeAnimateOpenEnabled","isEnabled"],isOpen:[0,"treeAnimateOpen","isOpen"]}});let t=e;return t})(),gi=function(t,e,n,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,n):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(r<3?a(o):r>3?a(e,n,o):a(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},Oo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(r,o){r&1&&z(0,no,2,4,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:()=>[Ct,Lo,Ee,hr,Co],encapsulation:2});let t=e;return t})(),hr=(()=>{let e=class e{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(i){this.setNodes(i)}get marginTop(){let i=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return`${i&&i.parent?i.position-i.parent.position-i.parent.getSelfHeight():0}px`}setNodes(i){this._nodes=i}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[$e(()=>this.virtualScroll.getViewportNodes(this.nodes).map(i=>i.index),i=>{this.viewportNodes=i.map(r=>this.nodes[r])},{compareStructural:!0,fireImmediately:!0}),$e(()=>this.nodes,i=>{this.viewportNodes=this.virtualScroll.getViewportNodes(i)})]}ngOnDestroy(){this._dispose.forEach(i=>i())}trackNode(i,r){return r.id}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(r,o){r&1&&z(0,oo,3,4,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:()=>[Ct,zn,Ao],encapsulation:2});let t=e;return gi([sr],t.prototype,"_nodes",void 0),gi([sr],t.prototype,"viewportNodes",void 0),gi([Eo],t.prototype,"marginTop",null),gi([_o],t.prototype,"setNodes",null),t})(),Ao=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(r,o){r&1&&z(0,lo,3,8,"ng-container",0),r&2&&f("treeMobxAutorun",Fe(1,bt))},dependencies:[Ct,Ee,pr,zo,Oo,ke],encapsulation:2});let t=e;return t})(),mr=(()=>{let e=class e{set nodes(i){}set options(i){}set focused(i){this.treeModel.setFocus(i)}set state(i){this.treeModel.setState(i)}constructor(){this.treeModel=h(y),this.treeDraggedElement=h(nn);let i=this.treeModel;i.eventNames.forEach(r=>this[r]=new j),i.subscribeToState(r=>this.stateChange.emit(r))}onKeydown(i){if(!this.treeModel.isFocused||["input","textarea"].includes(document.activeElement.tagName.toLowerCase()))return;let r=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(r,i)}onMousedown(i){function r(o,a){return o?o.localName===a?!1:r(o.parentElement,a):!0}r(i.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(i){(i.options||i.nodes)&&this.treeModel.setData({options:i.options&&i.options.currentValue,nodes:i.nodes&&i.nodes.currentValue,events:this.pick(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}pick(i,r){return r.reduce((o,a)=>(i&&i.hasOwnProperty(a)&&(o[a]=i[a]),o),{})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["Tree"],["tree-root"]],contentQueries:function(r,o,a){if(r&1&&(yt(a,co,5),yt(a,fo,5),yt(a,uo,5),yt(a,po,5)),r&2){let s;_e(s=xe())&&(o.loadingTemplate=s.first),_e(s=xe())&&(o.treeNodeTemplate=s.first),_e(s=xe())&&(o.treeNodeWrapperTemplate=s.first),_e(s=xe())&&(o.treeNodeFullTemplate=s.first)}},viewQuery:function(r,o){if(r&1&&Vt(ho,5),r&2){let a;_e(a=xe())&&(o.viewportComponent=a.first)}},hostBindings:function(r,o){r&1&&b("keydown",function(s){return o.onKeydown(s)},Mi)("mousedown",function(s){return o.onMousedown(s)},Mi)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[Di([y]),Ft],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(r,o){r&1&&(c(0,"tree-viewport",null,0)(2,"div",1),z(3,vo,1,8,"tree-node-collection",2)(4,go,1,2,"tree-node-drop-slot",3),d()()),r&2&&(l(2),q("node-dragging",o.treeDraggedElement.isDragging())("angular-tree-component-rtl",o.treeModel.options.rtl),l(),f("ngIf",o.treeModel.roots),l(),f("ngIf",o.treeModel.isEmptyTree()))},dependencies:[yo,Ee,hr,pr],encapsulation:2});let t=e;return t})(),vr=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=Cn({type:e}),e.\u0275inj=bn({imports:[Ln]});let t=e;return t})();var S=(function(t){return t.MAKE="make",t.COPY="copy",t.MOVE="move",t.DELETE="delete",t.COMPRESS="compress",t.DECOMPRESS="decompress",t.DOWNLOAD="download",t.UPLOAD="upload",t.TOUCH="touch",t.THUMBNAIL="thumbnail",t})(S||{});var Y0=".selected",X0="drag-over";var Ci=(()=>{let e=class e{constructor(){this.overFlowX="hidden",this.resizeOffset=80,this.useMaxHeight=!0,this.elementRef=h(Ye),this.renderer=h(Xe),this.layout=h(U),this.renderer.setStyle(this.elementRef.nativeElement,"overflow-y","auto"),this.renderer.setStyle(this.elementRef.nativeElement,"scrollbar-width","thin"),this.resizeSubscription=this.layout.resizeEvent.pipe(vn(1)).subscribe(()=>this.onResize())}ngAfterViewInit(){this.renderer.setStyle(this.elementRef.nativeElement,"overflow-x",this.overFlowX),this.onResize()}ngOnDestroy(){this.resizeSubscription.unsubscribe()}scrollTop(){this.renderer.setProperty(this.elementRef.nativeElement,"scrollTop","0")}scrollIntoView(i=0){setTimeout(()=>this.elementRef.nativeElement.scrollTo({left:0,top:i,behavior:"smooth"}),50)}onResize(){this.renderer.setStyle(this.elementRef.nativeElement,this.useMaxHeight?"max-height":"height",`${window.innerHeight-this.resizeOffset-1}px`)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Te({type:e,selectors:[["","appAutoResize",""]],inputs:{overFlowX:"overFlowX",resizeOffset:"resizeOffset",useMaxHeight:"useMaxHeight"}});let t=e;return t})();var H={BASE:e1.BASE,OPERATION:"operation",TASK_OPERATION:"task/operation",TASKS:"tasks",TASKS_DOWNLOAD:"download",RECENTS:"recents",SEARCH:"search",ONLY_OFFICE:"onlyoffice",ONLY_OFFICE_SETTINGS:"settings",ONLY_OFFICE_DOCUMENT:"document",ONLY_OFFICE_CALLBACK:"callback"},sn=`${H.BASE}/${H.OPERATION}`,sa=`${sn}/${S.THUMBNAIL}`,ln=`${sn}/${S.MAKE}`,la=`${sn}/${S.UPLOAD}`,cn=`${H.BASE}/${H.TASK_OPERATION}`,gr=`${cn}/${S.DOWNLOAD}`,br=`${cn}/${S.COMPRESS}`,Cr=`${cn}/${S.DECOMPRESS}`,Pt=`${H.BASE}/${H.TASKS}`,yr=`${H.BASE}/${H.TASKS}/${H.TASKS_DOWNLOAD}`,Sr=`${H.BASE}/${H.RECENTS}`,_r=`${H.BASE}/${H.SEARCH}`,dn=`${H.BASE}/${H.ONLY_OFFICE}`,ca=`${dn}/${H.ONLY_OFFICE_SETTINGS}`,da=`${dn}/${H.ONLY_OFFICE_DOCUMENT}`,fa=`${dn}/${H.ONLY_OFFICE_CALLBACK}`;var yi=class{constructor(e){Object.assign(this,e),this.mimeUrl=He(this.mime),this.setInfos()}fallBackMimeUrl(){this.mimeUrl=lt}setInfos(){let e=this.path.split("/")[0],n=this.path.split("/")[1]===Me.PERSONAL;this.showedPath=this.path.split("/").slice(n?2:1).join("/"),this.iconClass=e===Z.SHARES?"purple":"primary",this.icon=e===Z.SHARES?W.SHARES:n?W.PERSONAL:W.SPACES}};var Si=class{constructor(e){this.inTrash=!1,Object.assign(this,e),this.mimeUrl=He(this.mime),this.iconClass=this.shareId?"purple":"primary",this.icon=this.shareId?W.SHARES:this.spaceId?W.SPACES:W.PERSONAL,this.showedPath=this.path.split("/").slice(this.path.split("/")[1]===Me.PERSONAL?2:1).join("/"),this.inTrash=this.path.split("/")[0]===Z.TRASH}fallBackMimeUrl(){this.mimeUrl=lt}};var We=(function(t){return t[t.PENDING=0]="PENDING",t[t.SUCCESS=1]="SUCCESS",t[t.ERROR=2]="ERROR",t})(We||{}),_i=class{constructor(e,n,i,r){this.props={},this.id=e,this.type=n,this.path=i,this.name=r,(n===S.COPY||n===S.MOVE||n===S.DOWNLOAD)&&(this.props={progress:1},n!==S.DOWNLOAD&&(this.props.src={name:r,path:i}))}};var xr=(()=>{let e=class e{constructor(){this.http=h(jt),this.layout=h(U),this.store=h(ot),this.onDone={[S.DELETE]:{title:"Deletion",fileEvent:{delete:!0}},[S.MOVE]:{title:"Move",fileEvent:{delete:!0,reloadFocusOnDst:!0}},[S.COPY]:{title:"Copy",fileEvent:{reload:!0,focus:!0}},[S.DOWNLOAD]:{title:"Download",fileEvent:{reload:!0,focus:!0}},[S.UPLOAD]:{title:"Upload",fileEvent:{reload:!0,focus:!0}},[S.COMPRESS]:{title:"Compression",fileEvent:{reload:!0,focus:!0}},[S.DECOMPRESS]:{title:"Decompression",fileEvent:{reload:!0,focus:!0}}},this.watcher=null,this.watch=mn(1e3,1e3).pipe(gn(()=>this.doWatch())),this.loadAll()}addTask(i){i.status===We.PENDING?(this.store.filesActiveTasks.next([i,...this.store.filesActiveTasks.getValue()]),this.startWatch()):this.store.filesEndedTasks.next([i,...this.store.filesEndedTasks.getValue()])}createUploadTask(i,r,o){let a=new _i(Qn(),S.UPLOAD,i,r);return a.status=We.PENDING,a.startedAt=Xn(null,!0),a.props={progress:1,size:0,totalSize:o},this.store.filesActiveTasks.next([a,...this.store.filesActiveTasks.getValue()]),this.layout.showRSideBarTab(nt.TASKS,!0),a}removeAll(){this.http.delete(Pt).subscribe({next:()=>this.clearEndedTasks(),error:i=>console.error(i)})}remove(i){this.http.delete(`${Pt}/${i.id}`).subscribe({next:()=>this.deleteTask(i.id,!1),error:r=>console.error(r)})}updateTask(i){if(i.status===We.PENDING){let r=this.findTask(i.id,!0);Object.assign(r,i)}else this.deleteTask(i.id,!0),this.addTask(i),this.taskDone(i)}loadAll(){this.http.get(Pt).subscribe({next:i=>i.forEach(r=>this.addTask(r)),error:i=>console.error(i)})}doWatch(){this.store.filesActiveTasks.getValue().length?this.fetchActiveTasks():this.stopWatch()}startWatch(){(!this.watcher||this.watcher.closed)&&(this.layout.showRSideBarTab(nt.TASKS,!0),this.watcher=this.watch.subscribe())}stopWatch(){(this.watcher||!this.watcher.closed)&&(setTimeout(()=>this.layout.hideRSideBarTab(nt.TASKS),3e3),this.watcher.unsubscribe())}fetchActiveTasks(){for(let i of this.store.filesActiveTasks.getValue().filter(r=>r.type!==S.UPLOAD))this.http.get(`${Pt}/${i.id}`).subscribe({next:r=>this.updateTask(r),error:r=>{r.status===404&&(i.result=r.error.message,i.status=We.ERROR,this.updateTask(i)),console.warn(r)}})}findTask(i,r){return r?this.store.filesActiveTasks.getValue().find(o=>o.id===i):this.store.filesEndedTasks.getValue().find(o=>o.id===i)}deleteTask(i,r){r?this.store.filesActiveTasks.next(this.store.filesActiveTasks.getValue().filter(o=>o.id!==i)):this.store.filesEndedTasks.next(this.store.filesEndedTasks.getValue().filter(o=>o.id!==i))}taskDone(i){if(i.type in this.onDone){if(this.onDone[i.type].fileEvent){let r=De(Q({},this.onDone[i.type].fileEvent),{status:i.status});i.type===S.COPY||i.type===S.MOVE?(r.filePath=i.props.src.path,r.fileName=i.props.src.name,r.fileDstPath=i.path):(r.filePath=i.path,r.fileName=i.name,i.type===S.COMPRESS&&(r.archiveId=i.props.compressInDirectory===!1?i.id:null)),this.store.filesOnEvent.next(r)}i.status===We.SUCCESS?i.type===S.DELETE?this.removeDeletedChildTasks(i):this.layout.sendNotification("info",`${this.onDone[i.type].title} done`,i.name):this.layout.sendNotification("error",`${this.onDone[i.type].title} failed`,i.name,{error:{message:i.result}})}}removeDeletedChildTasks(i){if(i.path.startsWith(Z.SHARES))this.remove(i);else if(i.path.startsWith(Z.TRASH)){for(let r of this.store.filesEndedTasks.getValue().filter(o=>o.id!==i.id&&o.type===S.DELETE&&o.path.startsWith(Z.FILES))){let o=i.path.replace(Z.TRASH,Z.FILES);new RegExp(`^${d1(`${o}/${i.name}`)}(/|$)`).test(`${r.path}/${r.name}`)&&this.remove(r)}this.remove(i)}}clearEndedTasks(){this.store.filesEndedTasks.next([])}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var Er=(()=>{let e=class e{constructor(){this.treeNodeSelected=null,this.treeCopyMoveOn=new pn,this.clipboardAction="copyPaste",this.http=h(jt),this.layout=h(U),this.store=h(ot),this.sanitizer=h(On),this.filesTasksService=h(xr)}getTreeNode(i,r=!1){return hn(this.http.get(`${t1}/${i}`,{params:r?new Ti().set("showFiles",r):null}))}addToClipboard(i){if(i.length)if(!this.store.filesClipboard.getValue().length)this.layout.showRSideBarTab(nt.CLIPBOARD,!0),this.store.filesClipboard.next(i);else{let r=i.filter(o=>this.store.filesClipboard.getValue().indexOf(o)===-1);r.length&&this.store.filesClipboard.next([...r,...this.store.filesClipboard.getValue()])}}removeFromClipboard(i){this.store.filesClipboard.next(this.store.filesClipboard.getValue().filter(r=>r.id!==i.id))}clearClipboard(){this.store.filesClipboard.next([])}onPasteClipboard(i){let r=i||this.clipboardAction;if(this.store.filesClipboard.getValue().length){let o=this.currentRoute;this.copyMove([...this.store.filesClipboard.getValue()],o,r==="copyPaste"?S.COPY:S.MOVE),this.clearClipboard()}}download(i){Ii(i.dataUrl)}copyMove(i,r,o){let a=o===S.MOVE;for(let s of i){a&&(s.isBeingDeleted=!0);let m={dstDirectory:r};this.http.request(o,s.taskUrl,{body:m}).subscribe({next:C=>this.filesTasksService.addTask(C),error:C=>{a&&(s.isBeingDeleted=!1),this.layout.sendNotification("error",o==="move"?"Move failed":"Copy failed",s.name,C)}})}}rename(i,r){if(!this.isValidName(r))return;let a={dstDirectory:i.path.split("/").slice(0,-1).join("/")||".",dstName:r};this.http.request(S.MOVE,i.dataUrl,{body:a}).subscribe({next:s=>{i.rename(s.name),i.isEditable=!1},error:s=>this.layout.sendNotification("error","Rename",i.name,s)})}delete(i){for(let r of i)r.isBeingDeleted=!0,this.http.delete(r.taskUrl).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>{r.isBeingDeleted=!1,this.layout.sendNotification("error","Deletion failed",r.name,o)}})}make(i,r,o=null,a=!1){if(!this.isValidName(r))return;o=o||this.currentRoute;let s={type:i};if(a)return this.http.post(`${ln}/${o}/${r}`,s);this.http.post(`${ln}/${o}/${r}`,s).subscribe({next:()=>this.store.filesOnEvent.next({filePath:o,fileName:r,focus:!0,reload:!0}),error:m=>this.layout.sendNotification("error","Creation failed",r,m)})}compress(i){let r=this.currentRoute;this.http.post(`${br}/${r}/${i.name}.${i.extension}`,i).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>this.layout.sendNotification("error","Compression failed",i.name,o)})}decompress(i){let r=this.currentRoute;this.http.post(`${Cr}/${r}/${i.name}`,null).subscribe({next:o=>this.filesTasksService.addTask(o),error:o=>this.layout.sendNotification("error","Compression failed",i.name,o)})}downloadFromUrl(i,r){if(!this.isValidName(r))return;let o=this.currentRoute,a={url:i};this.http.post(`${gr}/${o}/${r}`,a).subscribe({next:s=>this.filesTasksService.addTask(s),error:s=>this.layout.sendNotification("error","Download failed",i,s)})}downloadTaskArchive(i){Ii(`${yr}/${i}`)}loadRecents(i){this.http.get(Sr,{params:new Ti().set("limit",i)}).pipe(Ei(r=>r.map(o=>new Si(o)))).subscribe({next:r=>{this.store.filesRecents.update(o=>[...r,...o.slice(i)])},error:r=>this.layout.sendNotification("error","Files","Unable to load",r)})}search(i){return this.http.request("search",_r,{body:i}).pipe(Ei(r=>r.map(o=>(o.content&&(o.content=this.sanitizer.bypassSecurityTrustHtml(o.content)),new yi(o)))))}isValidName(i){try{return Yn(i),!0}catch(r){return this.layout.sendNotification("error","Rename",`${this.layout.translateString(r.message)} : ${Kn}`),!1}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=ye({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var To=["tree"];function Io(t,e){if(t&1&&(c(0,"span",8),p(1),d()),t&2){let n=u(2);l(),k(n.errorMsg)}}function Ro(t,e){t&1&&(c(0,"span",9),p(1,"Navigation Tree"),d())}function Po(t,e){if(t&1){let n=F();c(0,"div",3)(1,"button",6),b("click",function(){_(n);let r=u();return x(r.onRefresh())}),g(2,"fa-icon",7),d(),L(3,Io,2,1,"span",8)(4,Ro,2,0,"span",9),d()}if(t&2){let n=u();l(2),f("icon",n.icons.faArrowRotateRight),l(),O(n.errorMsg?3:4)}}function Fo(t,e){if(t&1&&(c(0,"span")(1,"span"),p(2),d()()),t&2){let n=u(2);l(2),k(n.store.filesSelection()[0].name)}}function ko(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",18),d()),t&2){let n=u(2);l(),f("icon",n.icons.faQuestion)}}function Vo(t,e){if(t&1&&(c(0,"span")(1,"span"),p(2),d(),p(3,"\xA0"),c(4,"span",9),p(5,"items"),d()()),t&2){let n=u(2);l(2),k(n.store.filesSelection().length)}}function Ho(t,e){if(t&1){let n=F();c(0,"div",10)(1,"div",11)(2,"span",12)(3,"span",9),p(4,"Source"),d(),p(5,":"),d(),L(6,Fo,3,1,"span")(7,ko,2,1,"span")(8,Vo,6,1,"span"),d(),c(9,"div",13)(10,"span",12)(11,"span",9),p(12,"Destination"),d(),p(13,":"),d(),c(14,"span"),p(15),d()(),c(16,"div",14)(17,"button",15),b("click",function(){_(n);let r=u();return x(r.actionMove())}),g(18,"fa-icon",7),p(19," Move "),d(),c(20,"button",15),b("click",function(){_(n);let r=u();return x(r.actionCopy())}),g(21,"fa-icon",7),p(22," Copy "),d(),c(23,"button",16),b("click",function(){_(n);let r=u();return x(r.actionCancel())}),g(24,"fa-icon",7),p(25," Cancel "),d()()(),g(26,"hr",17)}if(t&2){let n,i=u();l(6),O((n=i.store.filesSelection().length)===1?6:n===0?7:8),l(9),k((i.selection==null?null:i.selection.data.name)||""),l(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.srcAllowed||!i.dstAllowed),l(),f("icon",i.icons.faArrowsAlt),l(2),f("disabled",!i.selection||!i.store.filesSelection().length||!i.dstAllowed),l(),f("icon",i.icons.faClone),l(3),f("icon",i.icons.faTimes)}}function Bo(t,e){if(t&1){let n=F();c(0,"div",19),b("click",function(r){let o=_(n).$implicit;return x(o.mouseAction("click",r))})("tap",function(r){let o=_(n).$implicit;return x(o.mouseAction("dblClick",r))}),g(1,"tree-node-expander",20),c(2,"div",21),g(3,"tree-node-content",22),d()()}if(t&2){let n=e.index,i=e.$implicit;Pe("padding-left",i.getNodePadding()),q("tree-selected",i.isActive)("tree-disabled",!i.data.enabled),l(),q("toggle-children-file",!i.data.isDir)("toggle-children-shared",i.data.inShare),f("node",i),l(),q("node-content-wrapper-active",i.isActive),l(),f("index",n)("node",i)}}function jo(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",23),d()),t&2){let n=u();l(),f("icon",n.icons.faSpinner)}}var Mr=(()=>{let e=class e{constructor(){this.selected=new j,this.showFiles=!1,this.allowShares=!0,this.allowSpaces=!0,this.enableCopyMove=!0,this.enableNavigateTo=!0,this.sideBarHeader=!0,this.resizeOffset=80,this.toggleNodesAtStartup=!1,this.store=h(ot),this.icons={faArrowRotateRight:$n,faArrowsAlt:jn,faClone:Fn,faTimes:Un,faFolder:Hn,faFile:ei,faQuestion:Pn,faAnglesRight:qn,faSpinner:Kt},this.options={actionMapping:{mouse:{click:(i,r,o)=>this.onSelect(i,r,o),dblClick:(i,r)=>this.onOpen(r),expanderClick:()=>null}},animateExpand:!1,levelPadding:10,useVirtualScroll:!1,nodeHeight:30,dropSlotHeight:0,allowDrag:!1,allowDrop:!1,getChildren:i=>this.getTreeNode(i)},this.srcAllowed=!0,this.dstAllowed=!0,this.errorMsg=null,this.layout=h(U),this.router=h(An),this.user=h(Xt),this.filesService=h(Er),this.copyMoveOnHeight=80,this.subscriptions=[],this.preventDblClick=!1,this._copyMoveOn=!1,this.enableCopyMove&&this.subscriptions.push(Rn(this.store.filesSelection).subscribe(()=>this.checkAllowed(this.selection)))}get copyMoveOn(){return this._copyMoveOn}set copyMoveOn(i){this._copyMoveOn!==i&&(this._copyMoveOn=i,i?this.resizeOffset+=this.copyMoveOnHeight:this.resizeOffset-=this.copyMoveOnHeight,setTimeout(()=>this.layout.resizeEvent.next(),0))}get selection(){return this.filesService.treeNodeSelected}set selection(i){this.filesService.treeNodeSelected=i,i&&([0,-1,-2].indexOf(i.data.id)===-1?this.selected.emit(i.data):this.selected.emit(null))}ngOnInit(){this.enableCopyMove&&this.subscriptions.push(this.filesService.treeCopyMoveOn.subscribe(()=>this.onCopyMove())),this.initRoot(),setTimeout(()=>this.focusLastNode(),100)}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}onRefresh(){this.tree.treeModel.activeNodes.length?this.tree.treeModel.activeNodes.forEach(i=>{i.loadNodeChildren().then(()=>this.tree.treeModel.update())}):(this.user.userHavePermission(Ve.PERSONAL_SPACE)&&this.tree.treeModel.getNodeById(0).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.user.userHavePermission(Ve.SPACES)&&this.tree.treeModel.getNodeById(-1).loadNodeChildren().then(()=>this.tree.treeModel.update()),this.allowShares&&this.user.userHavePermission(Ve.SHARES)&&this.tree.treeModel.getNodeById(-2).loadNodeChildren().then(()=>this.tree.treeModel.update()))}actionCancel(){this.copyMoveOn=!1,this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}actionCopy(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,S.COPY),this.copyMoveOn=!1}actionMove(){this.filesService.copyMove(this.store.filesSelection(),this.selection.data.path,S.MOVE),this.copyMoveOn=!1}initRoot(){if(this.nodes=[],this.user.userHavePermission(Ve.PERSONAL_SPACE)){let i={id:0,name:this.layout.translateString(Yt.PERSONAL_FILES),path:`${st.FILES}/${Me.PERSONAL}`,isDir:!0,inShare:!1,mime:Ne,quotaIsExceeded:this.store.user.getValue().quotaIsExceeded,enabled:!0,permissions:Zn,children:null,hasChildren:!0,isExpanded:!1};this.checkToggleNodeAtStartup(i,!0)}if(this.allowSpaces&&this.user.userHavePermission(Ve.SPACES)){let i={id:-1,name:this.layout.translateString(Yt.SPACES),path:st.SPACES,isDir:!0,mime:Ne,inShare:!1,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(i)}if(this.allowShares&&this.user.userHavePermission(Ve.SHARES)){let i={id:-2,name:this.layout.translateString(Yt.SHARES),path:st.SHARES,isDir:!0,mime:Ne,inShare:!0,hasChildren:!0,quotaIsExceeded:!1,enabled:!0,permissions:"",children:null,isExpanded:!1};this.checkToggleNodeAtStartup(i)}}checkToggleNodeAtStartup(i,r=!1){this.toggleNodesAtStartup?this.getTreeNode(i).then(o=>{i.children=o,r?this.nodes.unshift(i):this.nodes.push(i),this.tree.treeModel.update(),this.toggleExpand(this.tree,this.tree.treeModel.getNodeById(i.id),null)}):(r?this.nodes.unshift(i):this.nodes.push(i),this.tree.treeModel.update())}focusLastNode(){this.selection&&(this.selection=this.tree.treeModel.getNodeById(this.selection.data.id),this.selection&&I.ACTIVATE(this.tree,this.selection,null))}getTreeNode(i){return this.filesService.getTreeNode(i?.data?.path||i?.path||i,this.showFiles)}collapseChildren(i,r){for(let o of r)[0,-1,-2].indexOf(o.id)===-1&&o.id!==i.id&&(o.data.isExpanded=!1,o.collapse())}toggleExpand(i,r,o){I.TOGGLE_EXPANDED(i,r,o),r.data.isExpanded=!!r.data.isExpanded}onOpen(i){if(!this.copyMoveOn&&this.enableNavigateTo&&i.data.enabled){clearTimeout(this.preventTimer),this.preventDblClick=!0;let r=i.data.path.split("/");r[0]!==st.SPACES&&r.unshift(st.SPACES),this.router.navigate(r).catch(console.error)}}onSelect(i,r,o){if(!r.data.enabled){this.layout.sendNotification("warning",r.data.name,`${r.data.inShare?"Share":"Space"} is disabled`);return}I.ACTIVATE(i,r,o),this.preventTimer=setTimeout(()=>{this.checkAllowed(r),this.selection=r,this.preventDblClick||r.hasChildren&&(this.collapseChildren(r,r.parent.children),this.toggleExpand(i,r,o)),this.preventDblClick=!1},200)}checkAllowed(i){if(this.copyMoveOn){if(this.store.filesSelection().length)for(let r of this.store.filesSelection()){if(r.root?.alias){this.errorMsg="You can not move an anchored file",this.srcAllowed=!1,this.dstAllowed=!0;return}if(r.lock&&r.lock.ownerLogin!==this.store.user.getValue().login){this.errorMsg="You can not move a locked file",this.srcAllowed=!1,this.dstAllowed=!0;return}}if(i){if([-1,-2].indexOf(i.data.id)>-1){this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!1;return}else if(i.data.permissions.indexOf(at.ADD)===-1){this.errorMsg="You are not allowed to write here",this.srcAllowed=!0,this.dstAllowed=!1;return}else if(i.data.quotaIsExceeded){this.errorMsg="No more space available",this.srcAllowed=!0,this.dstAllowed=!1;return}}this.errorMsg=null,this.srcAllowed=!0,this.dstAllowed=!0}}onCopyMove(){this.onRefresh(),this.copyMoveOn=!0,this.checkAllowed(this.selection)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-files-tree"]],viewQuery:function(r,o){if(r&1&&Vt(To,7),r&2){let a;_e(a=xe())&&(o.tree=a.first)}},inputs:{showFiles:"showFiles",allowShares:"allowShares",allowSpaces:"allowSpaces",enableCopyMove:"enableCopyMove",enableNavigateTo:"enableNavigateTo",sideBarHeader:"sideBarHeader",resizeOffset:"resizeOffset",toggleNodesAtStartup:"toggleNodesAtStartup"},outputs:{selected:"selected"},decls:9,vars:7,consts:[["tree",""],["treeNodeWrapperTemplate",""],["loadingTemplate",""],[1,"sidebar-component-title"],["appAutoResize","",3,"overFlowX","resizeOffset","useMaxHeight"],[3,"nodes","options"],[1,"btn","btn-xs","btn-secondary",3,"click"],[3,"icon"],["l10nTranslate","",1,"text-danger","fs-xxs","p-2"],["l10nTranslate",""],[1,"px-2","pt-2","pb-0","fs-xs"],[1,"text-start","text-truncate"],["l10nTranslate","",1,"fs-xs","fw-bold","me-2"],[1,"text-start","text-truncate","mt-1"],[1,"d-flex","justify-content-between","mt-2"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-primary",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-xxs","btn-secondary",3,"click"],[1,"mx-0","mt-2","mb-0"],[1,"fw-bold","me-1",3,"icon"],[1,"node-wrapper",3,"click","tap"],[3,"node"],[1,"node-content-wrapper"],[3,"index","node"],["animation","spin",1,"fw-bold",3,"icon"]],template:function(r,o){r&1&&(L(0,Po,5,2,"div",3),L(1,Ho,27,7),c(2,"div",4)(3,"tree-root",5,0),z(5,Bo,4,15,"ng-template",null,1,xt)(7,jo,2,1,"ng-template",null,2,xt),d()()),r&2&&(O(o.sideBarHeader?0:-1),l(),O(o.copyMoveOn?1:-1),l(),f("overFlowX","auto")("resizeOffset",o.resizeOffset)("useMaxHeight",!1),l(),f("nodes",o.nodes)("options",o.options))},dependencies:[Ci,vr,mr,on,rn,ae,oe],encapsulation:2});let t=e;return t})();function Uo(t,e){if(t&1&&(c(0,"span"),g(1,"fa-icon",10),p(2),fe(3,"pathSlice"),d()),t&2){let n=u();l(),f("icon",n.selection.isDir?n.icons.faFolderClosed:n.icons.faFile),l(),J(" ",_t(3,2,n.selection.path,-1)," ")}}function Go(t,e){t&1&&(c(0,"span",2),p(1,"Select a file"),d())}function $o(t,e){if(t&1&&(c(0,"span",7),p(1),d()),t&2){let n=u();l(),k(n.errorSelection)}}var Nr=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new j,this.allowSpaces=!1,this.toggleNodesAtStartup=!0,this.mustHaveShareOutsidePermission=!1,this.layout=h(U),this.icons={faFile:ei,faFolderClosed:v1},this.errorSelection=null,this.selection=null}onSelect(i){if(i){if(this.mustHaveShareOutsidePermission){if(i.permissions.indexOf(at.SHARE_OUTSIDE)===-1){this.errorSelection=this.layout.translateString("You do not have share permission"),this.selection=null;return}if(i.path.split("/").length<=2){this.errorSelection=this.layout.translateString("You can not share a space"),this.selection=null;return}}let r=i,o=this.currentRoots.find(a=>a.file.id===r.id);o?(this.errorSelection=this.layout.translateString("This item is already selected"),this.selection=null):(o=this.currentRoots.find(a=>r.path.startsWith(a.file.path)),o?(this.errorSelection=`${this.layout.translateString("Parent item is already selected")}: ${o.file.path}`,this.selection=null):(this.errorSelection=null,this.selection=r))}else this.selection=null,this.errorSelection=null}onSubmit(){this.submitEvent.emit({id:this.selection.id,name:this.selection.name,path:this.selection.path,mime:this.selection.mime,permissions:this.selection.permissions}),this.layout.closeDialog()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-files-tree-dialog"]],inputs:{currentRoots:"currentRoots",allowSpaces:"allowSpaces",toggleNodesAtStartup:"toggleNodesAtStartup",mustHaveShareOutsidePermission:"mustHaveShareOutsidePermission"},outputs:{submitEvent:"submitEvent"},decls:13,vars:11,consts:[[1,"modal-header"],[1,"modal-title"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","py-2","px-0"],[3,"selected","enableNavigateTo","enableCopyMove","showFiles","allowShares","allowSpaces","sideBarHeader","toggleNodesAtStartup","resizeOffset"],[1,"modal-footer"],[1,"me-auto","fs-sm","text-danger","text-truncate"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click","disabled"],[3,"icon"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),L(2,Uo,4,5,"span")(3,Go,2,0,"span",2),d(),c(4,"button",3),b("click",function(){return o.layout.closeDialog()}),d()(),c(5,"div",4)(6,"app-files-tree",5),b("selected",function(s){return o.onSelect(s)}),d()(),c(7,"div",6),L(8,$o,2,1,"span",7),c(9,"button",8),b("click",function(){return o.layout.closeDialog()}),p(10,"Cancel"),d(),c(11,"button",9),b("click",function(){return o.onSubmit()}),p(12,"Confirm"),d()()),r&2&&(l(2),O(o.selection?2:3),l(4),f("enableNavigateTo",!1)("enableCopyMove",!1)("showFiles",!0)("allowShares",!1)("allowSpaces",o.allowSpaces)("sideBarHeader",!1)("toggleNodesAtStartup",o.toggleNodesAtStartup)("resizeOffset",200),l(2),O(o.errorSelection?8:-1),l(3),f("disabled",!o.selection))},dependencies:[ae,Mr,oe,g1],encapsulation:2});let t=e;return t})();function Wo(t,e){if(t&1){let n=F();c(0,"input",12),fe(1,"translate"),b("ngModelChange",function(r){_(n);let o=u();return x(o.checkInput(r,!0))}),d()}if(t&2){let n=u();q("is-invalid",!n.rootNameIsValid),f("ngModel",n.newSpaceRoot.name)("placeholder",_t(1,4,"Name",n.locale.language))}}function Ko(t,e){if(t&1&&(c(0,"span",9),p(1),d()),t&2){let n=u();l(),k(n.error)}}function Yo(t,e){if(t&1){let n=F();c(0,"button",13),b("click",function(){_(n);let r=u();return x(r.onSubmit())}),p(1,"Confirm"),d()}}function Xo(t,e){if(t&1){let n=F();c(0,"button",14),b("click",function(){_(n);let r=u();return x(r.onValidRoot())}),p(1,"Check the location"),d()}}var wr=(()=>{let e=class e{constructor(){this.currentRoots=[],this.submitEvent=new j,this.withRootName=!0,this.locale=h(it),this.layout=h(U),this.icons={faFolderClosed:Wn},this.newSpaceRoot={name:"",externalPath:""},this.rootNameIsValid=!1,this.rootPathIsValid=!1,this.rootIsValid=!1,this.spacesService=h(ct)}ngOnInit(){this.withRootName||(this.rootNameIsValid=!0)}keyEnter(){this.rootIsValid?this.onSubmit():this.onValidRoot()}onValidRoot(){if(this.withRootName&&!this.newSpaceRoot.name||!this.newSpaceRoot.externalPath){this.error="Name and location are required";return}this.newSpaceRoot.externalPath[0]!=="/"&&(this.newSpaceRoot.externalPath="/"+this.newSpaceRoot.externalPath);for(let i of this.currentRoots)if(this.newSpaceRoot.externalPath.startsWith(i.externalPath)){this.rootPathIsValid=!1,this.error="Parent location already exists in files";return}this.spacesService.checkSpaceRootPath(this.newSpaceRoot.externalPath).subscribe({next:()=>{this.rootPathIsValid=!0,this.rootNameIsValid=!0,this.rootIsValid=!0,this.error=null},error:i=>{this.rootPathIsValid=!1,this.error=i.error.message}})}onSubmit(){this.submitEvent.emit(this.newSpaceRoot),this.layout.closeDialog()}checkInput(i,r=!1){r?(this.newSpaceRoot.name=i,this.rootNameIsValid=!!i):(this.newSpaceRoot.externalPath=i,this.rootPathIsValid=!!i),this.rootIsValid&&(this.rootIsValid=!1)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-space-root-path-dialog"]],hostBindings:function(r,o){r&1&&b("keyup.enter",function(){return o.keyEnter()})},inputs:{currentRoots:"currentRoots",withRootName:"withRootName"},outputs:{submitEvent:"submitEvent"},decls:14,vars:13,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],[1,"modal-body","form-validation"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModel","is-invalid","placeholder"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-4",3,"ngModelChange","autoFocus","ngModel","placeholder"],[1,"modal-footer"],["l10nTranslate","",1,"me-auto","fs-sm","text-danger","text-truncate"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["appAutofocus","","type","text","required","",1,"form-control","form-control-sm","my-2",3,"ngModelChange","ngModel","placeholder"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-primary",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),g(2,"fa-icon",2),c(3,"span",3),p(4,"Add an external location"),d()(),c(5,"button",4),b("click",function(){return o.layout.closeDialog()}),d()(),c(6,"div",5),L(7,Wo,2,7,"input",6),c(8,"input",7),fe(9,"translate"),b("ngModelChange",function(s){return o.checkInput(s)}),d()(),c(10,"div",8),L(11,Ko,2,1,"span",9),L(12,Yo,2,0,"button",10)(13,Xo,2,0,"button",11),d()),r&2&&(l(2),f("icon",o.icons.faFolderClosed),l(5),O(o.withRootName?7:-1),l(),q("is-invalid",!o.rootPathIsValid),f("placeholder",tt("",_t(9,10,"Location",o.locale.language),": /home/sync-in/data"))("autoFocus",!o.withRootName)("ngModel",o.newSpaceRoot.externalPath),l(3),O(o.error?11:-1),l(),O(o.rootIsValid?12:13))},dependencies:[oe,ae,Wt,Ut,Gt,qt,$t,Qt,In],encapsulation:2});let t=e;return t})();var zr=(()=>{let e=class e{constructor(){this.locale=h(it)}ngOnInit(){this.setFilePath()}ngOnChanges(){this.setFilePath()}setFilePath(){let i=this.share.file?rt(this.share.file.name,-1):"";i?this.fileName=i:this.share.parent?.id?this.fileName=this.share.parent.name:this.share instanceof Et&&this.share.externalPath&&(this.fileName=this.share.externalPath)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-share-file-name"]],inputs:{share:"share"},features:[Ft],decls:5,vars:2,consts:[[1,"d-flex","align-items-center","text-truncate"],["draggable","false","height","30","width","30","alt","",3,"error","src"],[1,"d-flex","flex-column","text-truncate","ms-2"],[1,"text-truncate"]],template:function(r,o){r&1&&(Li(0,"div",0)(1,"img",1),En("error",function(){return o.share.fallBackMimeUrl()}),Oi(),Li(2,"div",2)(3,"div",3),p(4),Oi()()()),r&2&&(l(),xn("src",o.share.mimeUrl,kt),l(3),J(" ",o.fileName," "))},encapsulation:2});let t=e;return t})();function Qo(t,e){if(t&1&&(c(0,"span"),p(1),d()),t&2){let n=u();l(),k(n.share.name)}}function Jo(t,e){t&1&&(c(0,"span",3),p(1,"Create a new share"),d())}function Zo(t,e){if(t&1&&g(0,"fa-icon",4),t&2){let n=u();f("icon",n.icons.faSpinner)}}function e0(t,e){t&1&&(c(0,"h4",5)(1,"span",3),p(2,"Edit share"),d()())}function t0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",40),p(2,"Settings"),d()),t&2){let n=u();f("icon",n.icons.faCog)}}function i0(t,e){if(t&1&&(c(0,"div",19)(1,"label",41),p(2,"File"),d(),g(3,"app-share-file-name",42),d()),t&2){let n=u();l(3),f("share",n.share)}}function n0(t,e){if(t&1&&(c(0,"div",49)(1,"label",50),p(2,"Deactivation date"),d(),c(3,"div",51),p(4),fe(5,"amDateFormat"),d()()),t&2){let n=u(2);l(4),k(Bt(5,1,n.share.disabledAt))}}function r0(t,e){if(t&1&&(c(0,"div",31)(1,"div",43)(2,"label",44),p(3,"Creation date"),d(),c(4,"div",45),p(5),fe(6,"amDateFormat"),d()(),c(7,"div",46)(8,"label",47),p(9,"Modification date"),d(),c(10,"div",48),p(11),fe(12,"amDateFormat"),d()(),L(13,n0,6,3,"div",49),d()),t&2){let n=u();l(5),k(Bt(6,3,n.share.createdAt)),l(6),k(Bt(12,5,n.share.modifiedAt)),l(2),O(n.share.disabledAt&&!n.share.enabled?13:-1)}}function o0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",52),p(2,"Members"),d(),c(3,"span"),p(4),d()),t&2){let n=u();f("icon",n.icons.faUsers),l(4),J("(",n.share.members.length,")")}}function a0(t,e){if(t&1&&(g(0,"fa-icon",39),c(1,"span",52),p(2,"Links"),d(),c(3,"span"),p(4),d()),t&2){let n=u();f("icon",n.icons.LINKS),l(4),J("(",n.share.links.length,")")}}function s0(t,e){if(t&1){let n=F();c(0,"button",54),b("click",function(){_(n);let r=u(2);return x(r.confirmDeletion=!0)}),p(1," Remove "),d()}if(t&2){let n=u(2);f("disabled",n.confirmDeletion)}}function l0(t,e){if(t&1){let n=F();c(0,"button",57),b("click",function(){_(n);let r=u(3);return x(r.openAdminRootDialog())}),g(1,"fa-icon",39),p(2," External location "),d()}if(t&2){let n=u(3);l(),f("icon",n.icons.faUserShield)}}function c0(t,e){if(t&1){let n=F();c(0,"button",55),b("click",function(){_(n);let r=u(2);return x(r.openSelectRootDialog())}),g(1,"fa-icon",39)(2,"fa-icon",39),p(3," File "),d(),L(4,l0,3,1,"button",56)}if(t&2){let n=u(2);l(),f("icon",n.icons.faPlus),l(),f("icon",n.icons.SHARES),l(2),O(n.user.isAdmin?4:-1)}}function d0(t,e){if(t&1&&L(0,s0,2,1,"button",53)(1,c0,5,3),t&2){let n=u();O(n.share.id?0:n.allowFilesOptions?1:-1)}}function f0(t,e){if(t&1){let n=F();c(0,"button",55),b("click",function(){_(n);let r=u();return x(r.openCreateLinkDialog())}),g(1,"fa-icon",39)(2,"fa-icon",39),p(3," Link "),d()}if(t&2){let n=u();l(),f("icon",n.icons.faPlus),l(),f("icon",n.icons.LINKS)}}var Lr=(()=>{let e=class e{constructor(){this.parentShareId=null,this.parentSpaceId=null,this.isSharesRepo=!1,this.inSharesList=!1,this.allowFilesOptions=!0,this.shareChange=new j,this.locale=h(it),this.layout=h(U),this.icons={SHARED:W.SHARED_WITH_OTHERS,SHARES:W.SHARES,LINKS:W.LINKS,faPlus:Gn,faSpinner:Kt,faUserShield:Vn,faUsers:kn,faCog:Bn},this.allowedPermissions=[],this.confirmDeletion=!1,this.loading=!1,this.submitted=!1,this.userService=h(Xt),this.user=this.userService.user,this.sharesService=h(Jt),this.linksService=h(Zt),this.spacesService=h(ct)}ngOnInit(){this.share||([this.share,this.parentShareId]=this.sharesService.initShareFromFile(this.user,this.file,this.isSharesRepo,this.inSharesList)),this.allowedPermissions=Object.keys(this.share.hPerms)}searchMembers(i){let r={search:i,ignoreUserIds:[this.user.id,...this.share.parent?.ownerId?[this.share.parent.ownerId]:[],...this.share.members.filter(o=>o.isUser).map(o=>o.id)],ignoreGroupIds:this.share.members.filter(o=>o.isGroup).map(o=>o.id)};return this.userService.searchMembers(r,[at.SHARE_INSIDE])}openSelectRootDialog(){this.layout.openDialog(Nr,"xl",{initialState:{toggleNodesAtStartup:!1,allowSpaces:!0,mustHaveShareOutsidePermission:!0}}).content.submitEvent.pipe(Ke(1)).subscribe(r=>{let o=r.path.split("/"),a={id:r.id,name:r.name,path:rt(r.path,2),permissions:r.permissions,mime:r.mime,ownerId:o[1]===Me.PERSONAL?this.user.id:null,inTrash:!1,isDir:r.mime===Ne,space:{alias:o[1],name:o[1],root:{alias:"",name:""}}},s=De(Q({},this.share),{file:a,externalPath:null});s.name=s.file.name,this.share=new Et(s),this.allowedPermissions=Object.keys(this.share.hPerms)})}openAdminRootDialog(){this.layout.openDialog(wr,null,{initialState:{withRootName:!1}}).content.submitEvent.pipe(Ke(1)).subscribe(r=>{let o=De(Q({},this.share),{file:null,externalPath:r.externalPath,name:r.externalPath.split("/").at(-1)});this.share=new Et(o),this.allowedPermissions=Object.keys(this.share.hPerms)})}openEditLinkDialog(i){this.linksService.editLinkDialog(i,this.share,i1.SHARE)}openCreateLinkDialog(){this.linksService.createLinkDialog(this.share)}cantSubmit(){return this.submitted||!this.share.externalPath&&!this.share.file}onSubmit(){this.loading=!0,this.submitted=!0,this.confirmDeletion?(this.parentShareId?this.sharesService.deleteShareChild(this.parentShareId,this.share.id):this.parentSpaceId?this.spacesService.deleteSpaceShare(this.parentSpaceId,this.share.id):this.sharesService.deleteShare(this.share.id)).subscribe({next:()=>{this.loading=!1,this.shareChange.emit(["delete",this.share]),this.layout.closeDialog()},error:r=>{this.onError(),this.layout.sendNotification("error","Delete share",this.share.name,r)}}):this.share.id===0?this.sharesService.createShare(this.share).subscribe({next:i=>{this.loading=!1,this.share=i,this.shareChange.emit(["add",i]),this.layout.closeDialog()},error:i=>{this.onError(),this.layout.sendNotification("error","Create share",this.share.name,i)}}):(this.parentShareId?this.sharesService.updateShareChild(this.parentShareId,this.share.id,this.share):this.parentSpaceId?this.spacesService.updateSpaceShare(this.parentSpaceId,this.share):this.sharesService.updateShare(this.share)).subscribe({next:r=>{this.loading=!1,this.share=r,this.shareChange.emit(["update",r]),this.layout.closeDialog()},error:r=>{this.onError(),this.layout.sendNotification("error","Edit share",this.share.name,r)}})}onCancel(){this.confirmDeletion?this.confirmDeletion=!1:this.layout.closeDialog()}onError(){this.confirmDeletion=!1,this.submitted=!1,this.loading=!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-share-dialog"]],inputs:{share:"share",file:"file",parentShareId:"parentShareId",parentSpaceId:"parentSpaceId",isSharesRepo:"isSharesRepo",inSharesList:"inSharesList",allowFilesOptions:"allowFilesOptions"},outputs:{shareChange:"shareChange"},decls:57,vars:39,consts:[[1,"modal-header","align-items-center"],[1,"modal-title"],[1,"me-2",3,"icon"],["l10nTranslate",""],["animation","spin","size","sm",1,"ms-2",3,"icon"],[1,"modal-title","ms-auto"],["aria-label","Close","type","button",3,"click"],[1,"modal-body"],["type","pills",3,"justified"],[1,"my-3"],["customClass","tab-dialog form-validation",3,"selectTab"],["tabHeading",""],[1,"d-flex","col-12"],[1,"d-flex","flex-column","col-6","pe-2"],[1,"mb-3","px-0",2,"max-width","80%"],["for","name","l10nTranslate",""],["id","name","type","text","appAutofocus","","required","",3,"ngModelChange","ngModel"],["for","description","l10nTranslate",""],["id","description","type","text",1,"form-control","form-control-sm",3,"ngModelChange","ngModel"],[1,"mb-3","px-0"],["for","switchStatus","l10nTranslate",""],[1,"d-flex","align-items-center","form-check","form-switch","cursor-pointer"],["id","switchStatus","type","checkbox","role","button",1,"form-check-input",3,"ngModelChange","ngModel"],["for","switchStatus","l10nTranslate","",1,"form-check-label","mb-0","ms-2"],[1,"col-6"],[1,"mb-3"],["for","from","l10nTranslate",""],["id","from",3,"share","showFullPath"],["for","permissions","l10nTranslate",""],[1,"d-flex"],["id","permissions",3,"permissions","replaceEmptyPermissions"],[1,"d-flex","d-none","d-lg-flex","mt-auto"],["customClass","tab-dialog",3,"selectTab"],[3,"membersChange","members","withPermissions","filterPermissions","allowedPermissions","searchFunction"],[3,"membersChange","members","filterPermissions","allowedPermissions","withPermissions","editFunction","hideInput"],[1,"modal-footer"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success"],["data-dismiss","modal","type","button","l10nTranslate","",1,"btn","btn-sm","btn-secondary","ms-auto",3,"click"],["type","button","l10nTranslate","",3,"click","disabled"],[3,"icon"],["l10nTranslate","",1,"ms-2"],["for","shareFilePath","l10nTranslate","",1,"no-select"],["id","shareFilePath",3,"share"],[1,"d-flex","flex-column","align-items-start","col-4","px-0"],["for","created","l10nTranslate",""],["id","created"],[1,"d-flex","flex-column","align-items-center","col-4","px-0"],["for","modified","l10nTranslate",""],["id","modified"],[1,"d-flex","flex-column","align-items-end","col-4","text-danger","px-0"],["for","disabled","l10nTranslate",""],["id","disabled"],["l10nTranslate","",1,"ms-2","me-1"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-danger",3,"click","disabled"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-success",3,"click"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning"],["type","button","l10nTranslate","",1,"btn","btn-sm","btn-warning",3,"click"]],template:function(r,o){r&1&&(c(0,"div",0)(1,"h4",1),g(2,"fa-icon",2),L(3,Qo,2,1,"span")(4,Jo,2,0,"span",3),L(5,Zo,1,1,"fa-icon",4),d(),L(6,e0,3,0,"h4",5),c(7,"button",6),b("click",function(){return o.layout.closeDialog()}),d()(),c(8,"div",7)(9,"tabset",8),g(10,"hr",9),c(11,"tab",10),b("selectTab",function(){return o.tabView=null}),z(12,t0,3,1,"ng-template",11),c(13,"div",12)(14,"div",13)(15,"div",14)(16,"label",15),p(17," Share name "),d(),c(18,"input",16),et("ngModelChange",function(s){return Ze(o.share.name,s)||(o.share.name=s),s}),d()(),c(19,"div",14)(20,"label",17),p(21," Description "),d(),c(22,"input",18),et("ngModelChange",function(s){return Ze(o.share.description,s)||(o.share.description=s),s}),d()(),c(23,"div",19)(24,"label",20),p(25,"Share status"),d(),c(26,"div",21)(27,"input",22),et("ngModelChange",function(s){return Ze(o.share.enabled,s)||(o.share.enabled=s),s}),d(),c(28,"label",23),p(29),d()()()(),c(30,"div",24),L(31,i0,4,1,"div",19),c(32,"div",25)(33,"label",26),p(34,"Shared from"),d(),g(35,"app-share-repository",27),d(),c(36,"div",25)(37,"label",28),p(38,"File permissions"),d(),c(39,"div",29),g(40,"app-file-permissions",30),d()(),L(41,r0,14,7,"div",31),d()()(),c(42,"tab",32),b("selectTab",function(){return o.tabView="members"}),z(43,o0,5,2,"ng-template",11),c(44,"div",9)(45,"app-user-search",33),et("membersChange",function(s){return Ze(o.share.members,s)||(o.share.members=s),s}),d()()(),c(46,"tab",32),b("selectTab",function(){return o.tabView="links"}),z(47,a0,5,2,"ng-template",11),c(48,"div",9)(49,"app-user-search",34),et("membersChange",function(s){return Ze(o.share.links,s)||(o.share.links=s),s}),d()()()()(),c(50,"div",35),L(51,d0,2,1),L(52,f0,4,2,"button",36),c(53,"button",37),b("click",function(){return o.onCancel()}),p(54,"Cancel"),d(),c(55,"button",38),b("click",function(){return o.onSubmit()}),p(56),d()()),r&2&&(l(2),f("icon",o.icons.SHARED),l(),O(o.share.id?3:4),l(2),O(o.loading?5:-1),l(),O(o.share.id?6:-1),l(),Qe(tt("btn-close btn-close-white ",o.share.id?"ms-2":"ms-auto"," ms-2")),l(2),f("justified",!0),l(9),Qe(tt("form-control form-control-sm ",o.share.name?"":"is-invalid")),Je("ngModel",o.share.name),l(4),Je("ngModel",o.share.description),l(5),Je("ngModel",o.share.enabled),l(2),J(" ",o.share.enabled?"enabled":"disabled"," "),l(2),O(o.share.file!=null&&o.share.file.name||o.share.externalPath?31:-1),l(4),f("share",o.share)("showFullPath",!0),l(5),f("permissions",o.share.hPerms)("replaceEmptyPermissions",!0),l(),O(o.share!=null&&o.share.id?41:-1),l(4),Je("members",o.share.members),f("withPermissions",!0)("filterPermissions",!0)("allowedPermissions",o.allowedPermissions)("searchFunction",o.searchMembers.bind(o)),l(4),Je("members",o.share.links),f("filterPermissions",!0)("allowedPermissions",o.allowedPermissions)("withPermissions",!0)("editFunction",o.openEditLinkDialog.bind(o))("hideInput",!0),l(2),O(o.tabView?-1:51),l(),O(o.tabView==="links"?52:-1),l(3),Qe(tt("btn btn-sm ",o.confirmDeletion?"btn-danger":"btn-primary")),f("disabled",o.cantSubmit()),l(),J(" ",o.confirmDeletion?"Confirm deletion":"Confirm"," "))},dependencies:[oe,ae,l1,a1,o1,s1,Qt,Tn,Ut,Dn,Gt,qt,Wt,$t,c1,u1,zr,m1,n1],encapsulation:2});let t=e;return t})();var xi=class{constructor(e){this.isShareLink=!1,Object.assign(this,e),this.owner.avatarUrl=Jn(this.owner.login),this.isShareLink=this.type===f1.LINK,this.setMimeUrl()}fallBackMimeUrl(){this.mimeUrl=lt}setMimeUrl(){!this.file||this.file.mime===Ne?this.mimeUrl=He(p1):this.mimeUrl=He(this.file.mime)}};var Or=t=>({$implicit:t}),u0=(t,e)=>e.id;function p0(t,e){if(t&1&&g(0,"fa-icon",17),t&2){let n=u(3);f("icon",n.icons.LINKS)}}function h0(t,e){t&1&&Se(0)}function m0(t,e){if(t&1&&(c(0,"ul"),z(1,h0,1,0,"ng-container",10),d()),t&2){let n=u().$implicit;u(2);let i=Ai(15);l(),f("ngTemplateOutlet",i)("ngTemplateOutletContext",St(2,Or,n.children))}}function v0(t,e){if(t&1){let n=F();c(0,"li")(1,"div",14),b("click",function(){let r=_(n).$implicit,o=u(2);return x(o.onSelect(r))})("dblclick",function(){_(n);let r=u(2);return x(r.openChildShare())}),c(2,"div",15)(3,"img",16),b("error",function(){let r=_(n).$implicit;return x(r.fallBackMimeUrl())}),d(),L(4,p0,1,1,"fa-icon",17),c(5,"span",18),p(6),d()(),c(7,"div",19)(8,"span",20),p(9),d(),g(10,"app-user-avatar",21),d()(),L(11,m0,2,4,"ul"),d()}if(t&2){let n=e.$implicit,i=u(2);l(),q("selected",i.selected&&i.selected.id===n.id),l(2),f("src",n.mimeUrl,kt),l(),O(n.isShareLink?4:-1),l(2),k(n.name),l(3),k(n.owner.fullName),l(),f("user",n.owner)("height",26)("width",26),l(),O((n.children==null?null:n.children.length)>0?11:-1)}}function g0(t,e){if(t&1&&Sn(0,v0,12,10,"li",null,u0),t&2){let n=e.$implicit,i=u();_n(i.toShares(n))}}function b0(t,e){t&1&&Se(0)}var oc=(()=>{let e=class e{constructor(){this.fromAdmin=!1,this.sharesCountEvent=new j,this.layout=h(U),this.icons={SHARED:W.SHARED_WITH_OTHERS,LINKS:W.LINKS},this.loading=!1,this.childSharesLength=0,this.sharesService=h(Jt),this.linksService=h(Zt),this.spacesService=h(ct)}ngOnInit(){this.loadChildShares()}toShares(i){return i}loadChildShares(){this.loading=!0;let i;if(this.share)i=this.sharesService.listChildShares(this.share.id);else if(this.space)i=this.spacesService.listSpaceShares(this.space.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.childSharesLength=r.length,this.sharesCountEvent.emit(r.length),this.setShares(r.map(o=>new xi(o))),this.loading=!1},error:r=>{this.childShares=[],this.childSharesLength=0,this.loading=!1,this.layout.sendNotification("error","Child shares",r.error.message)}})}onSelect(i){this.selected=i}openChildShare(){if(this.selected.isShareLink){let i;if(this.share)i=this.linksService.shareLinkChild(this.share.id,this.selected.id);else if(this.space)i=this.spacesService.getSpaceShareLink(this.space.id,this.selected.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.layout.openDialog(h1,"md",{initialState:{share:r}}).content.shareChange.pipe(Ke(1)).subscribe(a=>{let[s,m]=a;s==="update"?this.selected.name=m.name:this.loadChildShares()})},error:r=>this.layout.sendNotification("error","Edit children shares",this.selected.name,r)})}else{let i;if(this.share)i=this.sharesService.getShareChild(this.share.id,this.selected.id);else if(this.space)i=this.spacesService.getSpaceShare(this.space.id,this.selected.id);else{console.error("share or space not defined");return}i.subscribe({next:r=>{this.layout.openDialog(Lr,"lg",{initialState:De(Q(Q({},this.share?{parentShareId:this.share.id}:{}),this.space?{parentSpaceId:this.space.id}:{}),{share:r})}).content.shareChange.pipe(Ke(1)).subscribe(a=>{let[s,m]=a;s==="update"?(this.selected.name=m.name,this.selected.alias=m.alias):this.loadChildShares()})},error:r=>this.layout.sendNotification("error","Edit children shares",this.selected.name,r)})}}setShares(i){let r={id:this.share?.id||0,children:[]};this.recurseChildrenShares(i,r),this.childShares=r.children}recurseChildrenShares(i,r){for(let o of i)o.parentId===r.id?(r.children=r.children??[],r.children.push(o),this.recurseChildrenShares(i,o)):r.id===0&&!o.parentId&&(r.children=r.children??[],r.children.push(o),this.recurseChildrenShares(i,o))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=D({type:e,selectors:[["app-shared-children-dialog"]],inputs:{fromAdmin:"fromAdmin",share:"share",space:"space"},outputs:{sharesCountEvent:"sharesCountEvent"},decls:22,vars:9,consts:[["recursiveList",""],[1,"modal-header","align-items-center"],[1,"modal-title","w-100"],[1,"d-flex"],[1,"me-2",3,"icon"],[1,"ms-auto","me-2"],["l10nTranslate",""],["aria-label","Close","type","button",1,"btn-close","btn-close-white",3,"click"],["appAutoResize","",1,"modal-body",2,"padding-right","24px",3,"resizeOffset"],[1,"tree"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"modal-footer"],["l10nTranslate","","type","button",1,"btn","btn-sm","btn-primary",3,"click","disabled"],["data-dismiss","modal","l10nTranslate","","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"app-div-hovered",3,"click","dblclick"],[1,"me-auto","text-truncate"],["alt","","draggable","false","height","28",3,"error","src"],[1,"align-middle","ms-1",3,"icon"],[1,"ms-1","align-middle"],[1,"d-flex","align-items-center"],[1,"fs-xxxs","me-2"],["tooltipPlacement","top","container","body",3,"user","height","width"]],template:function(r,o){if(r&1){let a=F();c(0,"div",1)(1,"h4",2)(2,"div",3)(3,"div"),g(4,"fa-icon",4),c(5,"span"),p(6),d()(),c(7,"div",5)(8,"span",6),p(9,"Child shares"),d(),p(10),d()()(),c(11,"button",7),b("click",function(){return _(a),x(o.layout.closeDialog())}),d()(),c(12,"div",8)(13,"ul",9),z(14,g0,2,0,"ng-template",null,0,xt)(16,b0,1,0,"ng-container",10),d()(),c(17,"div",11)(18,"button",12),b("click",function(){return _(a),x(o.openChildShare())}),p(19,"Edit"),d(),c(20,"button",13),b("click",function(){return _(a),x(o.layout.closeDialog())}),p(21,"Close"),d()()}if(r&2){let a=Ai(15);l(4),f("icon",o.icons.SHARED),l(2),k((o.share==null?null:o.share.name)||(o.space==null?null:o.space.name)),l(4),J("\xA0(",o.childSharesLength,") "),l(2),f("resizeOffset",170),l(4),f("ngTemplateOutlet",a)("ngTemplateOutletContext",St(7,Or,o.childShares)),l(2),f("disabled",!o.selected)}},dependencies:[Ci,ke,ae,oe,r1],styles:[`ul.tree[_ngcontent-%COMP%], ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}ul.tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:18px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0;padding:0;line-height:30px;border-left:1px solid rgb(100,100,100);white-space:nowrap}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:inline-flex;width:100%;cursor:pointer;border-radius:4px}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-left:none}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:before{position:relative;top:-.3em;height:1.2rem;width:1rem;color:#fff;border-bottom:1px solid rgb(100,100,100);content:"";display:inline-block}ul.tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child:before{border-left:1px solid rgb(100,100,100)}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
`]});let t=e;return t})();export{Y0 as a,X0 as b,Ci as c,C0 as d,y0 as e,S0 as f,ei as g,_0 as h,x0 as i,E0 as j,M0 as k,N0 as l,w0 as m,v1 as n,S as o,sn as p,sa as q,la as r,cn as s,ca as t,We as u,xr as v,Er as w,g1 as x,Mr as y,Nr as z,wr as A,Lr as B,oc as C};
|