photostructure 0.6.0-alpha.2 → 2026.4.7-beta
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/LICENSE.md +31 -29
- package/README.md +20 -8
- package/SECURITY.md +29 -0
- package/VERSION.json +12 -0
- package/bin/bootstrap.js +9 -0
- package/bin/fix.js +9 -0
- package/bin/info.js +9 -0
- package/bin/list.js +9 -0
- package/bin/logcat.js +9 -0
- package/bin/logtail.js +9 -0
- package/bin/main.js +9 -0
- package/bin/photostructure.js +9 -0
- package/bin/sync.js +9 -0
- package/bin/web.js +9 -0
- package/bin/worker.js +9 -0
- package/data/cuss.txt.br +0 -0
- package/data/icc/AdobeCompat-v2.icc +0 -0
- package/data/icc/AppleCompat-v2.icc +0 -0
- package/data/icc/ColorMatchCompat-v2.icc +0 -0
- package/data/icc/DisplayP3-v2-magic.icc +0 -0
- package/data/icc/DisplayP3-v2-micro.icc +0 -0
- package/data/icc/DisplayP3-v4.icc +0 -0
- package/data/icc/DisplayP3Compat-v2-magic.icc +0 -0
- package/data/icc/DisplayP3Compat-v2-micro.icc +0 -0
- package/data/icc/DisplayP3Compat-v4.icc +0 -0
- package/data/icc/ProPhoto-v2-magic.icc +0 -0
- package/data/icc/ProPhoto-v2-micro.icc +0 -0
- package/data/icc/ProPhoto-v4.icc +0 -0
- package/data/icc/Rec2020-v2-magic.icc +0 -0
- package/data/icc/Rec2020-v2-micro.icc +0 -0
- package/data/icc/Rec2020-v4.icc +0 -0
- package/data/icc/Rec2020Compat-v2-magic.icc +0 -0
- package/data/icc/Rec2020Compat-v2-micro.icc +0 -0
- package/data/icc/Rec2020Compat-v4.icc +0 -0
- package/data/icc/Rec709-v2-magic.icc +0 -0
- package/data/icc/Rec709-v2-micro.icc +0 -0
- package/data/icc/Rec709-v4.icc +0 -0
- package/data/icc/WideGamutCompat-v2.icc +0 -0
- package/data/icc/_info.md +49 -0
- package/data/icc/license +116 -0
- package/data/icc/readme.md +142 -0
- package/data/icc/sGrey-v2-magic.icc +0 -0
- package/data/icc/sGrey-v2-micro.icc +0 -0
- package/data/icc/sGrey-v2-nano.icc +0 -0
- package/data/icc/sGrey-v4.icc +0 -0
- package/data/icc/sRGB-v2-magic.icc +0 -0
- package/data/icc/sRGB-v2-micro.icc +0 -0
- package/data/icc/sRGB-v2-nano.icc +0 -0
- package/data/icc/sRGB-v4.icc +0 -0
- package/data/icc/scRGB-v2.icc +0 -0
- package/data/migrations/models/20181030_models.sql +151 -0
- package/data/migrations/models/20190417_rotation.sql +2 -0
- package/data/migrations/models/20190425_merged_assets.sql +11 -0
- package/{migrations → data/migrations}/models/20190426_clean_sha.sql +4 -4
- package/data/migrations/models/20190426_lowercase_psnet_hostname.sql +1 -0
- package/{migrations → data/migrations}/models/20190727_find_by_ca_and_geo.sql +3 -1
- package/data/migrations/models/20190730_session.sql +7 -0
- package/data/migrations/models/20190922_numeric_captured_at.sql +1 -0
- package/data/migrations/models/20190923_asset_file_v2_nofk.sql +107 -0
- package/data/migrations/models/20191013_asset_v2_nofk.sql +81 -0
- package/data/migrations/models/20200104_video_duration.sql +9 -0
- package/data/migrations/models/20200116_heartbeat.sql +9 -0
- package/data/migrations/models/20200127_spread_modes.sql +1 -0
- package/data/migrations/models/20200128_asset_file_v3_nofk.sql +143 -0
- package/data/migrations/models/20200130_advisory_lock.sql +21 -0
- package/data/migrations/models/20200211_updateCount.sql +2 -0
- package/data/migrations/models/20200512_asset_file_v4_nofk.sql +145 -0
- package/data/migrations/models/20200515_drop_merged_asset.sql +1 -0
- package/data/migrations/models/20200816_normalize_asset_file_uris.sql +1 -0
- package/data/migrations/models/20200823_add_asset_excluded.sql +11 -0
- package/data/migrations/models/20200825_fix_root_tags.sql +1 -0
- package/data/migrations/models/20200826_dedupe_tag_paths.sql +1 -0
- package/data/migrations/models/20200827_tag_v2_nofk.sql +35 -0
- package/data/migrations/models/20200923_suffix_tag_paths.sql +1 -0
- package/data/migrations/models/20200927_progress_v2.sql +23 -0
- package/data/migrations/models/20201006_progress_meta.sql +16 -0
- package/data/migrations/models/20201007_operation.sql +12 -0
- package/data/migrations/models/20201023_dedupe_tag_paths.sql +1 -0
- package/data/migrations/models/20201026_normalize_asset_file_uris.sql +1 -0
- package/data/migrations/models/20201030_add_tag_counts.sql +5 -0
- package/data/migrations/models/20201106_normalize_tag_paths.sql +1 -0
- package/data/migrations/models/20201112_tag_display_name.sql +2 -0
- package/data/migrations/models/20201113_drop_tc_tables.sql +1 -0
- package/data/migrations/models/20201211_tag_description.sql +5 -0
- package/data/migrations/models/20210322_sha_blocklist.sql +6 -0
- package/data/migrations/models/20210323_create_tag_fts.sql +1 -0
- package/data/migrations/models/20210324_asset_fave_delete.sql +20 -0
- package/data/migrations/models/20210531_asset_duration.sql +20 -0
- package/data/migrations/models/20210604_changed_tag.sql +7 -0
- package/data/migrations/models/20210627_changed_tag_updated_at.sql +2 -0
- package/data/migrations/models/20210827_asset_excluded_at.sql +19 -0
- package/data/migrations/models/20210930_asset_file_rating.sql +2 -0
- package/data/migrations/models/20210930_asset_revision.sql +16 -0
- package/data/migrations/models/20211025_ts_cleanup.sql +11 -0
- package/data/migrations/models/20220222_rebuild_rotated_heic.sql +2 -0
- package/data/migrations/models/20220922_rebuild_videos.sql +3 -0
- package/data/migrations/models/20220923_add_asset_file_mode_pct.sql +63 -0
- package/data/migrations/models/20221031_add_asset_file_hashes.sql +5 -0
- package/data/migrations/models/20231105_copy_asset_duration.sql +3 -0
- package/data/migrations/models/20231115_strict_nofk.sql +674 -0
- package/data/migrations/models/20231116_rebuild_tag_asset_counts.sql +1 -0
- package/data/migrations/models/20240115_task.sql +18 -0
- package/data/migrations/models/20240131_drop_operation_version.sql +35 -0
- package/data/migrations/models/20240201_create_tag_fts.sql +1 -0
- package/data/migrations/models/20240307_rebuild_progress_nofk.sql +59 -0
- package/data/migrations/models/20240313_rebuild_null_island.sql +3 -0
- package/data/migrations/models/20240723_add_asset_file_image_data_hash.sql +2 -0
- package/data/migrations/models/20240920_drop_task.sql +1 -0
- package/data/migrations/models/20240929_metadata_local.sql +3 -0
- package/data/migrations/models/20250421_asset_tag_fk_indexes.sql +21 -0
- package/data/migrations/models/20250421_tag_hierarchy.sql +13 -0
- package/data/migrations/models/20250422_schema_v3.sql +170 -0
- package/data/migrations/models/20250423_schema_v3_backfill_nofk.sql +1 -0
- package/data/migrations/models/20250929_indexes.sql +80 -0
- package/data/migrations/models/20260117_scan_generation.sql +31 -0
- package/data/migrations/models/20260122_fix_scan_generation_idx.sql +5 -0
- package/data/migrations/models/20260204_vec0_captured_at_local.sql +10 -0
- package/data/migrations/models/20260217_reaggregate_to_validate_siblings.sql +8 -0
- package/data/migrations/models/20260321_captured_at_src_detail.sql +3 -0
- package/data/migrations/models/20260322_captured_at_src_backfill.sql +2 -0
- package/data/migrations/models/20260403_drop_tag_fts.sql +5 -0
- package/data/migrations/models/20260425_volume_label.sql +5 -0
- package/data/migrations/models/20260426_vec0_bname.sql +6 -0
- package/data/models-schema.json +907 -0
- package/data/models-schema.sql +268 -0
- package/data/words.txt.br +0 -0
- package/defaults.env +6376 -0
- package/package.json +47 -25
- package/photostructure +26 -27
- package/public/192.png.gz +0 -0
- package/public/3rd-party-licenses.html.gz +0 -0
- package/public/3rd-party-licenses.txt.gz +0 -0
- package/public/512.png.gz +0 -0
- package/public/app/Array.js +8 -0
- package/public/app/Array.js.gz +0 -0
- package/public/app/BabyMarkdown.js +14 -0
- package/public/app/BabyMarkdown.js.gz +0 -0
- package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js +12 -0
- package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js.gz +0 -0
- package/public/app/HealthChecks.js +8 -0
- package/public/app/HealthChecks.js.gz +0 -0
- package/public/app/Lazy.js +8 -0
- package/public/app/Lazy.js.gz +0 -0
- package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js +8 -0
- package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js.gz +0 -0
- package/public/app/ProgressState.js +8 -0
- package/public/app/Random.js +8 -0
- package/public/app/SSEChannels.js +8 -0
- package/public/app/SSEChannels.js.gz +0 -0
- package/public/app/Search.js +8 -0
- package/public/app/Search.js.gz +0 -0
- package/public/app/StickyHeader.js +8 -0
- package/public/app/StickyHeader.js.gz +0 -0
- package/public/app/Tag.js +8 -0
- package/public/app/Tag.js.gz +0 -0
- package/public/app/_plugin-vue_export-helper.js +8 -0
- package/public/app/_plugin-vue_export-helper.js.gz +0 -0
- package/public/app/about.css +8 -0
- package/public/app/about.css.gz +0 -0
- package/public/app/about.js +8 -0
- package/public/app/about.js.gz +0 -0
- package/public/app/app.css +8 -0
- package/public/app/app.css.gz +0 -0
- package/public/app/app.js +12 -0
- package/public/app/app.js.gz +0 -0
- package/public/app/health.css +8 -0
- package/public/app/health.css.gz +0 -0
- package/public/app/health.js +10 -0
- package/public/app/health.js.gz +0 -0
- package/public/app/logs.css +8 -0
- package/public/app/logs.css.gz +0 -0
- package/public/app/logs.js +8 -0
- package/public/app/logs.js.gz +0 -0
- package/public/app/onReady.js +8 -0
- package/public/app/platform.js +8 -0
- package/public/app/roboto-mono-v22-latin-700.woff2.gz +0 -0
- package/public/app/roboto-mono-v22-latin-regular.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-700.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-700italic.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-italic.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-regular.woff2.gz +0 -0
- package/public/app/settings.css +8 -0
- package/public/app/settings.css.gz +0 -0
- package/public/app/settings.js +8 -0
- package/public/app/settings.js.gz +0 -0
- package/public/app/splash.css +8 -0
- package/public/app/splash.css.gz +0 -0
- package/public/app/splash.js +8 -0
- package/public/app/splash.js.gz +0 -0
- package/public/app/sse-worker.js +8 -0
- package/public/app/sse-worker.js.gz +0 -0
- package/public/app/sync.css +8 -0
- package/public/app/sync.css.gz +0 -0
- package/public/app/sync.js +12 -0
- package/public/app/sync.js.gz +0 -0
- package/public/app/toast.js +9 -0
- package/public/app/toast.js.gz +0 -0
- package/public/app/useAnchorHighlight.js +8 -0
- package/public/app/useSectionPersistence.js +8 -0
- package/public/app/useSectionPersistence.js.gz +0 -0
- package/public/apple-touch-icon.png.gz +0 -0
- package/public/browserconfig.xml +9 -0
- package/public/eula.html +25 -26
- package/public/favicon-16x16.png.gz +0 -0
- package/public/favicon-32x32.png.gz +0 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/roboto-mono-v22-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-mono-v22-latin-regular.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-700italic.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-italic.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-regular.woff2.gz +0 -0
- package/public/icon.svg.gz +0 -0
- package/public/images/1.png.gz +0 -0
- package/public/images/128.png +0 -0
- package/public/images/22-Template.png.gz +0 -0
- package/public/images/22-Template@2x.png.gz +0 -0
- package/public/images/22-Template@3x.png.gz +0 -0
- package/public/images/22-blue.png.gz +0 -0
- package/public/images/22-blue@2x.png.gz +0 -0
- package/public/images/22-blue@3x.png.gz +0 -0
- package/public/images/22-dark.png +0 -0
- package/public/images/22-dark@2x.png +0 -0
- package/public/images/22-dark@3x.png +0 -0
- package/public/images/22-gradient.png.gz +0 -0
- package/public/images/22-gradient@2x.png.gz +0 -0
- package/public/images/22-gradient@3x.png.gz +0 -0
- package/public/images/22-light.png +0 -0
- package/public/images/22-light@2x.png +0 -0
- package/public/images/22-light@3x.png +0 -0
- package/public/images/256.png +0 -0
- package/public/images/512.png.gz +0 -0
- package/public/images/64.png +0 -0
- package/public/images/antenna.svg.gz +0 -0
- package/public/images/article.svg.gz +0 -0
- package/public/images/baby.svg.gz +0 -0
- package/public/images/ballot-box.svg.gz +0 -0
- package/public/images/bank.svg.gz +0 -0
- package/public/images/bar-chart.svg.gz +0 -0
- package/public/images/beetle.svg.gz +0 -0
- package/public/images/birthday.svg.gz +0 -0
- package/public/images/bookmark-tabs.svg.gz +0 -0
- package/public/images/books-desat.svg.gz +0 -0
- package/public/images/books.svg.gz +0 -0
- package/public/images/busy-circle.svg.gz +0 -0
- package/public/images/busy-circles.svg.gz +0 -0
- package/public/images/busy-dots.svg.gz +0 -0
- package/public/images/busy.svg.gz +0 -0
- package/public/images/calendar.svg.gz +0 -0
- package/public/images/camera.svg.gz +0 -0
- package/public/images/card-box.svg.gz +0 -0
- package/public/images/card-index-dividers.svg.gz +0 -0
- package/public/images/cd.svg.gz +0 -0
- package/public/images/chart.svg.gz +0 -0
- package/public/images/check.svg.gz +0 -0
- package/public/images/checkered-flag.svg.gz +0 -0
- package/public/images/clear-256.png.gz +0 -0
- package/public/images/clear-64.png.gz +0 -0
- package/public/images/clock.svg.gz +0 -0
- package/public/images/computer.svg.gz +0 -0
- package/public/images/cpu.svg.gz +0 -0
- package/public/images/crane.svg.gz +0 -0
- package/public/images/cross-mark.svg.gz +0 -0
- package/public/images/disabled.svg.gz +0 -0
- package/public/images/dvd.svg.gz +0 -0
- package/public/images/emergency-light.svg.gz +0 -0
- package/public/images/error.svg.gz +0 -0
- package/public/images/expressionless-desat.svg.gz +0 -0
- package/public/images/expressionless.svg.gz +0 -0
- package/public/images/file-cabinet.svg.gz +0 -0
- package/public/images/fill.svg.gz +0 -0
- package/public/images/floppy.svg.gz +0 -0
- package/public/images/gift.svg.gz +0 -0
- package/public/images/green-check.svg.gz +0 -0
- package/public/images/green-radio.svg.gz +0 -0
- package/public/images/handshake.svg.gz +0 -0
- package/public/images/health.svg.gz +0 -0
- package/public/images/heart.svg.gz +0 -0
- package/public/images/home.svg.gz +0 -0
- package/public/images/homebrew-installer.png.gz +0 -0
- package/public/images/info.svg.gz +0 -0
- package/public/images/library.svg.gz +0 -0
- package/public/images/logo-blue.svg.gz +0 -0
- package/public/images/logo-circle.svg.gz +0 -0
- package/public/images/logo-dark-700pt.svg.gz +0 -0
- package/public/images/logo-dark.svg.gz +0 -0
- package/public/images/logo-gradient-gloss-512w.png.gz +0 -0
- package/public/images/logo-gradient-gloss.svg.gz +0 -0
- package/public/images/logo-gradient-square-512w.png.gz +0 -0
- package/public/images/logo-gradient.svg.gz +0 -0
- package/public/images/logo-horizontal-600w.png.gz +0 -0
- package/public/images/logo-horizontal-white.svg.gz +0 -0
- package/public/images/logo-horizontal.svg.gz +0 -0
- package/public/images/logo-lite.svg.gz +0 -0
- package/public/images/logo-plus-512w.png.gz +0 -0
- package/public/images/logo-plus-horizontal.svg.gz +0 -0
- package/public/images/logo-plus.svg.gz +0 -0
- package/public/images/logo-square.svg.gz +0 -0
- package/public/images/logo-white.svg.gz +0 -0
- package/public/images/logo.ico +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/logo@2x.png.gz +0 -0
- package/public/images/logo@3x.png.gz +0 -0
- package/public/images/logo@4x.png.gz +0 -0
- package/public/images/logo@5x.png +0 -0
- package/public/images/maximize.svg.gz +0 -0
- package/public/images/microscope.svg.gz +0 -0
- package/public/images/minidisc.svg.gz +0 -0
- package/public/images/movie-camera.svg.gz +0 -0
- package/public/images/navigate_next.svg.gz +0 -0
- package/public/images/new-yellow.svg.gz +0 -0
- package/public/images/new.svg.gz +0 -0
- package/public/images/open-book.svg.gz +0 -0
- package/public/images/open-folder.svg.gz +0 -0
- package/public/images/pause.svg.gz +0 -0
- package/public/images/photostructure-black.svg.gz +0 -0
- package/public/images/photostructure-white.svg.gz +0 -0
- package/public/images/refresh.svg.gz +0 -0
- package/public/images/rocket.svg.gz +0 -0
- package/public/images/sad-cat.svg.gz +0 -0
- package/public/images/safe.svg.gz +0 -0
- package/public/images/scales.svg.gz +0 -0
- package/public/images/seedling.svg.gz +0 -0
- package/public/images/shield.svg.gz +0 -0
- package/public/images/sleeping-face-desat.svg.gz +0 -0
- package/public/images/sleeping-face.svg.gz +0 -0
- package/public/images/sparkles.svg.gz +0 -0
- package/public/images/speed.svg.gz +0 -0
- package/public/images/splash.svg +1 -1
- package/public/images/splashbg1-1024w.jpg +0 -0
- package/public/images/splashbg2-1024w.jpg +0 -0
- package/public/images/splashbg3-1024w.jpg +0 -0
- package/public/images/splashbg4-1024w.jpg +0 -0
- package/public/images/splashbg5-1024w.jpg +0 -0
- package/public/images/splashbg6-1024w.jpg +0 -0
- package/public/images/star2.svg.gz +0 -0
- package/public/images/starry-night.svg.gz +0 -0
- package/public/images/stethoscope.svg.gz +0 -0
- package/public/images/stop.svg.gz +0 -0
- package/public/images/surf.svg.gz +0 -0
- package/public/images/sync.svg.gz +0 -0
- package/public/images/tada.svg.gz +0 -0
- package/public/images/terminal.svg.gz +0 -0
- package/public/images/thinking.svg.gz +0 -0
- package/public/images/thumbs-down.svg.gz +0 -0
- package/public/images/thumbs-up.svg.gz +0 -0
- package/public/images/toolbox.svg.gz +0 -0
- package/public/images/tools.svg.gz +0 -0
- package/public/images/umbrella.svg.gz +0 -0
- package/public/images/warning.svg.gz +0 -0
- package/public/images/wave.svg.gz +0 -0
- package/public/images/wrench.svg.gz +0 -0
- package/public/images/xray.svg.gz +0 -0
- package/public/images/zzz.svg.gz +0 -0
- package/public/mstile-144x144.png.gz +0 -0
- package/public/mstile-150x150.png.gz +0 -0
- package/public/mstile-310x150.png.gz +0 -0
- package/public/mstile-310x310.png.gz +0 -0
- package/public/mstile-70x70.png.gz +0 -0
- package/public/safari-pinned-tab.svg.gz +0 -0
- package/public/sw.js +5 -0
- package/server/bin/install-codec-tools.sh +48 -0
- package/server/sudoers.d/photostructure-codec-install +18 -0
- package/tools/README.md +23 -0
- package/tools/build.sh +30 -0
- package/tools/download-rg.sh +61 -0
- package/tools/license-overrides/photostructure-sqlite-vec-MIT.txt +21 -0
- package/tools/licenses/d3-color-difference/LICENSE.txt +29 -0
- package/tools/licenses/deep-eql/LICENSE.txt +21 -0
- package/tools/licenses/exiftool/{license.txt → LICENSE.txt} +140 -140
- package/tools/licenses/fft.js/LICENSE.txt +9 -0
- package/tools/licenses/libjpeg-turbo/LICENSE.md +7 -16
- package/tools/licenses/libraw/COPYRIGHT.txt +27 -0
- package/tools/licenses/moveable-type/LICENSE.txt +6 -0
- package/tools/licenses/noto-emoji/LICENSE.txt +201 -0
- package/tools/licenses/sharp-phash/LICENSE.txt +21 -0
- package/tools/licenses/{twemoji → type-detect}/LICENSE.txt +1 -1
- package/tools/linux-arm64/dcraw_emu +0 -0
- package/tools/linux-arm64/jpegtran +0 -0
- package/tools/linux-arm64/raw-identify +0 -0
- package/tools/linux-arm64/rg +0 -0
- package/tools/linux-arm64/sqlite3 +0 -0
- package/tools/linux-x64/dcraw_emu +0 -0
- package/tools/linux-x64/jpegtran +0 -0
- package/tools/linux-x64/raw-identify +0 -0
- package/tools/linux-x64/rg +0 -0
- package/tools/linux-x64/sqlite3 +0 -0
- package/tools/mac-arm64/dcraw_emu +0 -0
- package/tools/mac-arm64/jpegtran +0 -0
- package/tools/mac-arm64/jpegtran-README.md +31 -0
- package/tools/mac-arm64/libraw-README.md +42 -0
- package/tools/mac-arm64/raw-identify +0 -0
- package/tools/mac-arm64/rg +0 -0
- package/tools/mac-arm64/sqlite3 +0 -0
- package/tools/mac-arm64/sqlite3-README.md +35 -0
- package/tools/mac-x64/dcraw_emu +0 -0
- package/tools/mac-x64/jpegtran +0 -0
- package/tools/mac-x64/jpegtran-README.md +30 -0
- package/tools/mac-x64/libraw-README.md +52 -0
- package/tools/mac-x64/raw-identify +0 -0
- package/tools/mac-x64/rg +0 -0
- package/tools/mac-x64/sqlite3 +0 -0
- package/tools/mac-x64/sqlite3-README.md +6 -0
- package/tools/win-x64/dcraw_emu.exe +0 -0
- package/tools/{win-ia32/jpegtran → win-x64}/jpegtran.exe +0 -0
- package/tools/{win-ia32/jpegtran → win-x64}/libjpeg-62.dll +0 -0
- package/tools/win-x64/libraw-README.md +6 -0
- package/tools/win-x64/libraw.dll +0 -0
- package/tools/win-x64/raw-identify.exe +0 -0
- package/tools/win-x64/recycle-bin-README.md +3 -0
- package/tools/win-x64/recycle-bin.exe +0 -0
- package/tools/win-x64/rg.exe +0 -0
- package/tools/win-x64/sqlite3-README.md +4 -0
- package/tools/win-x64/sqlite3.exe +0 -0
- package/views/_fouc-prevention.ejs +13 -0
- package/views/error.ejs +64 -0
- package/views/eula.html +57 -0
- package/views/settings.ejs +958 -0
- package/views/spa.ejs +54 -0
- package/views/splash.ejs +30 -0
- package/views/welcome-tools.ejs +201 -0
- package/views/welcome.ejs +89 -0
- package/app/info.js +0 -3
- package/app/logtail.js +0 -3
- package/app/main.js +0 -3
- package/app/sync-file.js +0 -3
- package/app/sync.js +0 -3
- package/app/web.js +0 -3
- package/migrations/models/20181030_models.sql +0 -145
- package/migrations/models/20190417_rotation.sql +0 -1
- package/migrations/models/20190425_merged_assets.sql +0 -10
- package/migrations/models/20190426_lowercase_psnet_hostname.sql +0 -1
- package/migrations/models/20190522_on_new_exif_uid.sql +0 -1
- package/migrations/models/20190729_on_new_exif_uid.sql +0 -1
- package/migrations/models/20190730_session.sql +0 -6
- package/migrations/stats/20181030_stats.sql +0 -16
- package/migrations/stats/20190312_files_not_bytes.sql +0 -23
- package/migrations/stats/20190515_rebuild_queue.sql +0 -21
- package/public/app/latest.js.gz +0 -0
- package/public/fonts/roboto-mono-v5-latin-regular.woff.gz +0 -0
- package/public/fonts/roboto-mono-v5-latin-regular.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-300.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-300.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-500.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-500.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-700.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-900.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-900.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-italic.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-italic.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-regular.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-regular.woff2.gz +0 -0
- package/public/images/128.png.gz +0 -0
- package/public/images/256-gradient.png +0 -0
- package/public/images/256-gradient.png.gz +0 -0
- package/public/images/256.png.gz +0 -0
- package/public/images/64.png.gz +0 -0
- package/public/images/bg.svg.gz +0 -0
- package/public/images/bg10.jpg.gz +0 -0
- package/public/images/blue-splash-1024w.png.gz +0 -0
- package/public/images/blue-tri-bg.svg.gz +0 -0
- package/public/images/boom.svg.gz +0 -0
- package/public/images/dark-cyan-fuschia-bg.svg.gz +0 -0
- package/public/images/fit.svg.gz +0 -0
- package/public/images/light-cyan-fuschia-bg.svg.gz +0 -0
- package/public/images/line-logo-top-cuts-filled.svg.gz +0 -0
- package/public/images/line-logo-top-cuts.svg.gz +0 -0
- package/public/images/link.svg.gz +0 -0
- package/public/images/logo-gradient-gloss-sq.svg.gz +0 -0
- package/public/images/logo-gradient.svg +0 -1
- package/public/images/logo-icon-path.svg.gz +0 -0
- package/public/images/logo-text-path.svg.gz +0 -0
- package/public/images/logo-text-white.svg.gz +0 -0
- package/public/images/navigate_prev.svg.gz +0 -0
- package/public/images/no-entry.svg.gz +0 -0
- package/public/images/phone.svg.gz +0 -0
- package/public/images/private.svg.gz +0 -0
- package/public/images/profile.svg.gz +0 -0
- package/public/images/public.svg.gz +0 -0
- package/public/images/show-in-folder-black.svg.gz +0 -0
- package/public/images/show-in-folder.svg.gz +0 -0
- package/public/images/shrug.svg.gz +0 -0
- package/public/images/splash-1024w.png +0 -0
- package/public/images/splash-1024w.png.gz +0 -0
- package/public/images/splash-512w.png +0 -0
- package/public/images/splash-512w.png.gz +0 -0
- package/public/images/splash-blue.svg +0 -1
- package/public/images/splashbg01-1024w.jpg +0 -0
- package/public/images/splashbg01-1024w.jpg.gz +0 -0
- package/public/images/splashbg02-1024w.jpg +0 -0
- package/public/images/splashbg02-1024w.jpg.gz +0 -0
- package/public/images/text-logo-blue.svg.gz +0 -0
- package/public/images/transparent-white.svg.gz +0 -0
- package/public/images/trash.svg.gz +0 -0
- package/public/release-notes.html +0 -581
- package/public/splash.html +0 -360
- package/tools/licenses/dcraw/dcraw.txt +0 -24
- package/tools/licenses/vue-my-dropdown/LICENSE.txt +0 -19
- package/tools/linux-arm/dcraw/dcraw +0 -0
- package/tools/linux-arm/dcraw/install.sh +0 -5
- package/tools/linux-arm/jpegtran/README.md +0 -11
- package/tools/linux-arm/jpegtran/jpegtran +0 -0
- package/tools/linux-arm/sqlite3/sqlite3 +0 -0
- package/tools/linux-ia32/sqlite3/sqlite3 +0 -0
- package/tools/linux-x64/dcraw/dcraw +0 -0
- package/tools/linux-x64/jpegtran/jpegtran +0 -0
- package/tools/mac-x64/dcraw/dcraw +0 -0
- package/tools/mac-x64/dcraw/install.sh +0 -8
- package/tools/mac-x64/jpegtran/jpegtran +0 -0
- package/tools/mac-x64/sqlite3/README.md +0 -33
- package/tools/mac-x64/sqlite3/sqlite3 +0 -0
- package/tools/win-ia32/dcraw/README.md +0 -30
- package/tools/win-ia32/dcraw/dcraw.exe +0 -0
- package/tools/win-ia32/sqlite3/sqlite3.exe +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026, PhotoStructure Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* BY USING THIS SOFTWARE, YOU ACCEPT ALL OF THE TERMS IN
|
|
5
|
+
* https://photostructure.com/eula
|
|
6
|
+
* IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THIS SOFTWARE
|
|
7
|
+
*/
|
|
8
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["Tag.js","toast.js","Array.js","DropDown.vue_vue_type_script_setup_true_lang.js","Lazy.js","useSectionPersistence.js","ProgressState.js","BabyMarkdown.js","StickyHeader.js","platform.js","_plugin-vue_export-helper.js","Random.js","Search.js"])))=>i.map(i=>d[i]);
|
|
9
|
+
import{i as Tt,u as l,s as Bi,a as qi,d as Ue,n as Je,r as Gi,h as Do,c as A,w as Ae,b as M,p as qn,e as Qt,f as lt,g as ze,o as p,j as Se,k as Re,l as k,m,q as et,t as Z,v as R,x as Ge,y as ji,z as Ki,A as Xi,B as _e,C as ve,T as ws,D as gn,E as St,F as yn,G as E,H as Ce,I as Fe,J as Ze,K as _n,L as wt,M as Yi,N as Zi,O as Qi,P as Ji,Q as ea,R as ta,S as na,U as sa}from"./toast.js";import{_ as Mo,v as oa}from"./_plugin-vue_export-helper.js";import{f as dt,_ as D,p as ia,s as aa,t as Os,h as ks,a as bs,u as la,b as ra,c as ua,d as ca,e as da}from"./DropDown.vue_vue_type_script_setup_true_lang.js";import{l as Jt,s as wn,a as vt,f as No,m as He,d as fa,b as An,n as Cn,o as $s,c as Gn,e as ha,g as va,h as ma,i as pa}from"./Lazy.js";import{t as Ds,n as st,a as ga,i as os,f as ya,g as wa,m as Fo,b as bt,c as en,d as $n,e as ka,h as ba,j as Gt,k as Sa,l as Wo,o as ft,p as Ia,u as Ss,q as Aa,r as Ca,s as xa,v as _a,w as Pa,x as Ta,y as Ea,z as Pn,A as Qe,B as jn,C as Ms,D as Ra,E as La,F as Oa,G as Vo,H as un,I as $a,J as Ns,K as Da,L as Kn}from"./Array.js";import{q as Ho,t as zo,i as Fs,a as Is,b as Ma,f as Na,r as Uo,s as Fa,c as Wa,S as Va,w as Ws,d as Bo}from"./StickyHeader.js";import{b as Ha,i as As,a as za,c as Ua,d as Ba,e as Vs,f as is,g as qa,u as Ga,h as ja}from"./platform.js";import{r as Ka}from"./Random.js";import{u as jt,a as Xa,e as Ya,d as Za}from"./useSectionPersistence.js";import"./BabyMarkdown.js";function Qa(e,t=[]){for(const n of Ds(e))if(n!=null)for(const s of Ds(n))s!=null&&t.push(s);return t}const Ut=typeof document<"u";function qo(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ja(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&qo(e.default)}const we=Object.assign;function Xn(e,t){const n={};for(const s in t){const o=t[s];n[s]=ot(o)?o.map(e):e(o)}return n}const fn=()=>{},ot=Array.isArray;function Hs(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}let De=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const Go=Symbol("");De.MATCHER_NOT_FOUND+"",De.NAVIGATION_GUARD_REDIRECT+"",De.NAVIGATION_ABORTED+"",De.NAVIGATION_CANCELLED+"",De.NAVIGATION_DUPLICATED+"";function Xt(e,t){return we(new Error,{type:e,[Go]:!0},t)}function ct(e,t){return e instanceof Error&&Go in e&&(t==null||!!(e.type&t))}const el=["params","query","hash"];function tl(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of el)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const nl=Symbol(""),zs=Symbol(""),Dn=Symbol(""),Cs=Symbol(""),as=Symbol("");function jo(){return Tt(Dn)}function kn(e){return Tt(Cs)}const Ko=/#/g,sl=/&/g,ol=/\//g,il=/=/g,al=/\?/g,Xo=/\+/g,ll=/%5B/g,rl=/%5D/g,Yo=/%5E/g,ul=/%60/g,Zo=/%7B/g,cl=/%7C/g,Qo=/%7D/g,dl=/%20/g;function xs(e){return e==null?"":encodeURI(""+e).replace(cl,"|").replace(ll,"[").replace(rl,"]")}function fl(e){return xs(e).replace(Zo,"{").replace(Qo,"}").replace(Yo,"^")}function ls(e){return xs(e).replace(Xo,"%2B").replace(dl,"+").replace(Ko,"%23").replace(sl,"%26").replace(ul,"`").replace(Zo,"{").replace(Qo,"}").replace(Yo,"^")}function hl(e){return ls(e).replace(il,"%3D")}function vl(e){return xs(e).replace(Ko,"%23").replace(al,"%3F")}function ml(e){return vl(e).replace(ol,"%2F")}function mn(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const pl=/\/$/,gl=e=>e.replace(pl,"");function Yn(e,t,n="/"){let s,o={},a="",u="";const r=t.indexOf("#");let i=t.indexOf("?");return i=r>=0&&i>r?-1:i,i>=0&&(s=t.slice(0,i),a=t.slice(i,r>0?r:t.length),o=e(a.slice(1))),r>=0&&(s=s||t.slice(0,r),u=t.slice(r,t.length)),s=bl(s??t,n),{fullPath:s+a+u,path:s,query:o,hash:mn(u)}}function yl(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Us(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function wl(e,t,n){const s=t.matched.length-1,o=n.matched.length-1;return s>-1&&s===o&&Yt(t.matched[s],n.matched[o])&&Jo(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Yt(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Jo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!kl(e[n],t[n]))return!1;return!0}function kl(e,t){return ot(e)?Bs(e,t):ot(t)?Bs(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Bs(e,t){return ot(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function bl(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),o=s[s.length-1];(o===".."||o===".")&&s.push("");let a=n.length-1,u,r;for(u=0;u<s.length;u++)if(r=s[u],r!==".")if(r==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+s.slice(u).join("/")}const yt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let rs=(function(e){return e.pop="pop",e.push="push",e})({}),Zn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function Sl(e){if(!e)if(Ut){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),gl(e)}const Il=/^[^#]+#/;function Al(e,t){return e.replace(Il,"#")+t}function Cl(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const Mn=()=>({left:window.scrollX,top:window.scrollY});function xl(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=Cl(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function qs(e,t){return(history.state?history.state.position-t:-1)+e}const us=new Map;function _l(e,t){us.set(e,t)}function Pl(e){const t=us.get(e);return us.delete(e),t}function Tl(e){return typeof e=="string"||e&&typeof e=="object"}function ei(e){return typeof e=="string"||typeof e=="symbol"}function El(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;s<n.length;++s){const o=n[s].replace(Xo," "),a=o.indexOf("="),u=mn(a<0?o:o.slice(0,a)),r=a<0?null:mn(o.slice(a+1));if(u in t){let i=t[u];ot(i)||(i=t[u]=[i]),i.push(r)}else t[u]=r}return t}function Gs(e){let t="";for(let n in e){const s=e[n];if(n=hl(n),s==null){s!==void 0&&(t+=(t.length?"&":"")+n);continue}(ot(s)?s.map(o=>o&&ls(o)):[s&&ls(s)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function Rl(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=ot(s)?s.map(o=>o==null?null:""+o):s==null?s:""+s)}return t}function cn(){let e=[];function t(s){return e.push(s),()=>{const o=e.indexOf(s);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function kt(e,t,n,s,o,a=u=>u()){const u=s&&(s.enterCallbacks[o]=s.enterCallbacks[o]||[]);return()=>new Promise((r,i)=>{const d=h=>{h===!1?i(Xt(De.NAVIGATION_ABORTED,{from:n,to:t})):h instanceof Error?i(h):Tl(h)?i(Xt(De.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(u&&s.enterCallbacks[o]===u&&typeof h=="function"&&u.push(h),r())},v=a(()=>e.call(s&&s.instances[o],t,n,d));let f=Promise.resolve(v);e.length<3&&(f=f.then(d)),f.catch(h=>i(h))})}function Qn(e,t,n,s,o=a=>a()){const a=[];for(const u of e)for(const r in u.components){let i=u.components[r];if(!(t!=="beforeRouteEnter"&&!u.instances[r]))if(qo(i)){const d=(i.__vccOpts||i)[t];d&&a.push(kt(d,n,s,u,r,o))}else{let d=i();a.push(()=>d.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${r}" at "${u.path}"`);const f=Ja(v)?v.default:v;u.mods[r]=v,u.components[r]=f;const h=(f.__vccOpts||f)[t];return h&&kt(h,n,s,u,r,o)()}))}}return a}function Ll(e,t){const n=[],s=[],o=[],a=Math.max(t.matched.length,e.matched.length);for(let u=0;u<a;u++){const r=t.matched[u];r&&(e.matched.find(d=>Yt(d,r))?s.push(r):n.push(r));const i=e.matched[u];i&&(t.matched.find(d=>Yt(d,i))||o.push(i))}return[n,s,o]}let Ol=()=>location.protocol+"//"+location.host;function ti(e,t){const{pathname:n,search:s,hash:o}=t,a=e.indexOf("#");if(a>-1){let u=o.includes(e.slice(a))?e.slice(a).length:1,r=o.slice(u);return r[0]!=="/"&&(r="/"+r),Us(r,"")}return Us(n,e)+s+o}function $l(e,t,n,s){let o=[],a=[],u=null;const r=({state:h})=>{const c=ti(e,location),g=n.value,C=t.value;let F=0;if(h){if(n.value=c,t.value=h,u&&u===g){u=null;return}F=C?h.position-C.position:0}else s(c);o.forEach(L=>{L(n.value,g,{delta:F,type:rs.pop,direction:F?F>0?Zn.forward:Zn.back:Zn.unknown})})};function i(){u=n.value}function d(h){o.push(h);const c=()=>{const g=o.indexOf(h);g>-1&&o.splice(g,1)};return a.push(c),c}function v(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(we({},h.state,{scroll:Mn()}),"")}}function f(){for(const h of a)h();a=[],window.removeEventListener("popstate",r),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",r),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:i,listen:d,destroy:f}}function js(e,t,n,s=!1,o=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:o?Mn():null}}function Dl(e){const{history:t,location:n}=window,s={value:ti(e,n)},o={value:t.state};o.value||a(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(i,d,v){const f=e.indexOf("#"),h=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+i:Ol()+e+i;try{t[v?"replaceState":"pushState"](d,"",h),o.value=d}catch(c){console.error(c),n[v?"replace":"assign"](h)}}function u(i,d){a(i,we({},t.state,js(o.value.back,i,o.value.forward,!0),d,{position:o.value.position}),!0),s.value=i}function r(i,d){const v=we({},o.value,t.state,{forward:i,scroll:Mn()});a(v.current,v,!0),a(i,we({},js(s.value,i,null),{position:v.position+1},d),!1),s.value=i}return{location:s,state:o,push:r,replace:u}}function Ml(e){e=Sl(e);const t=Dl(e),n=$l(e,t.state,t.location,t.replace);function s(a,u=!0){u||n.pauseListeners(),history.go(a)}const o=we({location:"",base:e,go:s,createHref:Al.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}let Pt=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({});var We=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(We||{});const Nl={type:Pt.Static,value:""},Fl=/[a-zA-Z0-9_]/;function Wl(e){if(!e)return[[]];if(e==="/")return[[Nl]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(c){throw new Error(`ERR (${n})/"${d}": ${c}`)}let n=We.Static,s=n;const o=[];let a;function u(){a&&o.push(a),a=[]}let r=0,i,d="",v="";function f(){d&&(n===We.Static?a.push({type:Pt.Static,value:d}):n===We.Param||n===We.ParamRegExp||n===We.ParamRegExpEnd?(a.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Pt.Param,value:d,regexp:v,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),d="")}function h(){d+=i}for(;r<e.length;){if(i=e[r++],i==="\\"&&n!==We.ParamRegExp){s=n,n=We.EscapeNext;continue}switch(n){case We.Static:i==="/"?(d&&f(),u()):i===":"?(f(),n=We.Param):h();break;case We.EscapeNext:h(),n=s;break;case We.Param:i==="("?n=We.ParamRegExp:Fl.test(i)?h():(f(),n=We.Static,i!=="*"&&i!=="?"&&i!=="+"&&r--);break;case We.ParamRegExp:i===")"?v[v.length-1]=="\\"?v=v.slice(0,-1)+i:n=We.ParamRegExpEnd:v+=i;break;case We.ParamRegExpEnd:f(),n=We.Static,i!=="*"&&i!=="?"&&i!=="+"&&r--,v="";break;default:t("Unknown state");break}}return n===We.ParamRegExp&&t(`Unfinished custom RegExp for param "${d}"`),f(),u(),o}const Ks="[^/]+?",Vl={sensitive:!1,strict:!1,start:!0,end:!0};var Ke=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(Ke||{});const Hl=/[.+*?^${}()[\]/\\]/g;function zl(e,t){const n=we({},Vl,t),s=[];let o=n.start?"^":"";const a=[];for(const d of e){const v=d.length?[]:[Ke.Root];n.strict&&!d.length&&(o+="/");for(let f=0;f<d.length;f++){const h=d[f];let c=Ke.Segment+(n.sensitive?Ke.BonusCaseSensitive:0);if(h.type===Pt.Static)f||(o+="/"),o+=h.value.replace(Hl,"\\$&"),c+=Ke.Static;else if(h.type===Pt.Param){const{value:g,repeatable:C,optional:F,regexp:L}=h;a.push({name:g,repeatable:C,optional:F});const P=L||Ks;if(P!==Ks){c+=Ke.BonusCustomRegExp;try{new RegExp(`(${P})`)}catch(T){throw new Error(`Invalid custom RegExp for param "${g}" (${P}): `+T.message)}}let O=C?`((?:${P})(?:/(?:${P}))*)`:`(${P})`;f||(O=F&&d.length<2?`(?:/${O})`:"/"+O),F&&(O+="?"),o+=O,c+=Ke.Dynamic,F&&(c+=Ke.BonusOptional),C&&(c+=Ke.BonusRepeatable),P===".*"&&(c+=Ke.BonusWildcard)}v.push(c)}s.push(v)}if(n.strict&&n.end){const d=s.length-1;s[d][s[d].length-1]+=Ke.BonusStrict}n.strict||(o+="/?"),n.end?o+="$":n.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const u=new RegExp(o,n.sensitive?"":"i");function r(d){const v=d.match(u),f={};if(!v)return null;for(let h=1;h<v.length;h++){const c=v[h]||"",g=a[h-1];f[g.name]=c&&g.repeatable?c.split("/"):c}return f}function i(d){let v="",f=!1;for(const h of e){(!f||!v.endsWith("/"))&&(v+="/"),f=!1;for(const c of h)if(c.type===Pt.Static)v+=c.value;else if(c.type===Pt.Param){const{value:g,repeatable:C,optional:F}=c,L=g in d?d[g]:"";if(ot(L)&&!C)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const P=ot(L)?L.join("/"):L;if(!P)if(F)h.length<2&&(v.endsWith("/")?v=v.slice(0,-1):f=!0);else throw new Error(`Missing required param "${g}"`);v+=P}}return v||"/"}return{re:u,score:s,keys:a,parse:r,stringify:i}}function Ul(e,t){let n=0;for(;n<e.length&&n<t.length;){const s=t[n]-e[n];if(s)return s;n++}return e.length<t.length?e.length===1&&e[0]===Ke.Static+Ke.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Ke.Static+Ke.Segment?1:-1:0}function ni(e,t){let n=0;const s=e.score,o=t.score;for(;n<s.length&&n<o.length;){const a=Ul(s[n],o[n]);if(a)return a;n++}if(Math.abs(o.length-s.length)===1){if(Xs(s))return 1;if(Xs(o))return-1}return o.length-s.length}function Xs(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Bl={strict:!1,end:!0,sensitive:!1};function ql(e,t,n){const s=zl(Wl(e.path),n),o=we(s,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Gl(e,t){const n=[],s=new Map;t=Hs(Bl,t);function o(f){return s.get(f)}function a(f,h,c){const g=!c,C=Zs(f);C.aliasOf=c&&c.record;const F=Hs(t,f),L=[C];if("alias"in f){const T=typeof f.alias=="string"?[f.alias]:f.alias;for(const q of T)L.push(Zs(we({},C,{components:c?c.record.components:C.components,path:q,aliasOf:c?c.record:C})))}let P,O;for(const T of L){const{path:q}=T;if(h&&q[0]!=="/"){const G=h.record.path,N=G[G.length-1]==="/"?"":"/";T.path=h.record.path+(q&&N+q)}if(P=ql(T,h,F),c?c.alias.push(P):(O=O||P,O!==P&&O.alias.push(P),g&&f.name&&!Qs(P)&&u(f.name)),si(P)&&i(P),C.children){const G=C.children;for(let N=0;N<G.length;N++)a(G[N],P,c&&c.children[N])}c=c||P}return O?()=>{u(O)}:fn}function u(f){if(ei(f)){const h=s.get(f);h&&(s.delete(f),n.splice(n.indexOf(h),1),h.children.forEach(u),h.alias.forEach(u))}else{const h=n.indexOf(f);h>-1&&(n.splice(h,1),f.record.name&&s.delete(f.record.name),f.children.forEach(u),f.alias.forEach(u))}}function r(){return n}function i(f){const h=Xl(f,n);n.splice(h,0,f),f.record.name&&!Qs(f)&&s.set(f.record.name,f)}function d(f,h){let c,g={},C,F;if("name"in f&&f.name){if(c=s.get(f.name),!c)throw Xt(De.MATCHER_NOT_FOUND,{location:f});F=c.record.name,g=we(Ys(h.params,c.keys.filter(O=>!O.optional).concat(c.parent?c.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),f.params&&Ys(f.params,c.keys.map(O=>O.name))),C=c.stringify(g)}else if(f.path!=null)C=f.path,c=n.find(O=>O.re.test(C)),c&&(g=c.parse(C),F=c.record.name);else{if(c=h.name?s.get(h.name):n.find(O=>O.re.test(h.path)),!c)throw Xt(De.MATCHER_NOT_FOUND,{location:f,currentLocation:h});F=c.record.name,g=we({},h.params,f.params),C=c.stringify(g)}const L=[];let P=c;for(;P;)L.unshift(P.record),P=P.parent;return{name:F,path:C,params:g,matched:L,meta:Kl(L)}}e.forEach(f=>a(f));function v(){n.length=0,s.clear()}return{addRoute:a,resolve:d,removeRoute:u,clearRoutes:v,getRoutes:r,getRecordMatcher:o}}function Ys(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function Zs(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:jl(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function jl(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function Qs(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Kl(e){return e.reduce((t,n)=>we(t,n.meta),{})}function Xl(e,t){let n=0,s=t.length;for(;n!==s;){const a=n+s>>1;ni(e,t[a])<0?s=a:n=a+1}const o=Yl(e);return o&&(s=t.lastIndexOf(o,s-1)),s}function Yl(e){let t=e;for(;t=t.parent;)if(si(t)&&ni(e,t)===0)return t}function si({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Js(e){const t=Tt(Dn),n=Tt(Cs),s=A(()=>{const i=l(e.to);return t.resolve(i)}),o=A(()=>{const{matched:i}=s.value,{length:d}=i,v=i[d-1],f=n.matched;if(!v||!f.length)return-1;const h=f.findIndex(Yt.bind(null,v));if(h>-1)return h;const c=eo(i[d-2]);return d>1&&eo(v)===c&&f[f.length-1].path!==c?f.findIndex(Yt.bind(null,i[d-2])):h}),a=A(()=>o.value>-1&&tr(n.params,s.value.params)),u=A(()=>o.value>-1&&o.value===n.matched.length-1&&Jo(n.params,s.value.params));function r(i={}){if(er(i)){const d=t[l(e.replace)?"replace":"push"](l(e.to)).catch(fn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:s,href:A(()=>s.value.href),isActive:a,isExactActive:u,navigate:r}}function Zl(e){return e.length===1?e[0]:e}const Ql=Ue({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Js,setup(e,{slots:t}){const n=Gi(Js(e)),{options:s}=Tt(Dn),o=A(()=>({[to(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[to(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&Zl(t.default(n));return e.custom?a:Do("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},a)}}}),Jl=Ql;function er(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function tr(e,t){for(const n in t){const s=t[n],o=e[n];if(typeof s=="string"){if(s!==o)return!1}else if(!ot(o)||o.length!==s.length||s.some((a,u)=>a.valueOf()!==o[u].valueOf()))return!1}return!0}function eo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const to=(e,t,n)=>e??t??n,nr=Ue({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Tt(as),o=A(()=>e.route||s.value),a=Tt(zs,0),u=A(()=>{let d=l(a);const{matched:v}=o.value;let f;for(;(f=v[d])&&!f.components;)d++;return d}),r=A(()=>o.value.matched[u.value]);qn(zs,A(()=>u.value+1)),qn(nl,r),qn(as,o);const i=M();return Ae(()=>[i.value,r.value,e.name],([d,v,f],[h,c,g])=>{v&&(v.instances[f]=d,c&&c!==v&&d&&d===h&&(v.leaveGuards.size||(v.leaveGuards=c.leaveGuards),v.updateGuards.size||(v.updateGuards=c.updateGuards))),d&&v&&(!c||!Yt(v,c)||!h)&&(v.enterCallbacks[f]||[]).forEach(C=>C(d))},{flush:"post"}),()=>{const d=o.value,v=e.name,f=r.value,h=f&&f.components[v];if(!h)return no(n.default,{Component:h,route:d});const c=f.props[v],g=c?c===!0?d.params:typeof c=="function"?c(d):c:null,F=Do(h,we({},g,t,{onVnodeUnmounted:L=>{L.component.isUnmounted&&(f.instances[v]=null)},ref:i}));return no(n.default,{Component:F,route:d})||F}}});function no(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const sr=nr;function or(e){const t=Gl(e.routes,e),n=e.parseQuery||El,s=e.stringifyQuery||Gs,o=e.history,a=cn(),u=cn(),r=cn(),i=qi(yt);let d=yt;Ut&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const v=Xn.bind(null,y=>""+y),f=Xn.bind(null,ml),h=Xn.bind(null,mn);function c(y,S){let $,V;return ei(y)?($=t.getRecordMatcher(y),V=S):V=y,t.addRoute(V,$)}function g(y){const S=t.getRecordMatcher(y);S&&t.removeRoute(S)}function C(){return t.getRoutes().map(y=>y.record)}function F(y){return!!t.getRecordMatcher(y)}function L(y,S){if(S=we({},S||i.value),typeof y=="string"){const ae=Yn(n,y,S.path),ke=t.resolve({path:ae.path},S),Xe=o.createHref(ae.fullPath);return we(ae,ke,{params:h(ke.params),hash:mn(ae.hash),redirectedFrom:void 0,href:Xe})}let $;if(y.path!=null)$=we({},y,{path:Yn(n,y.path,S.path).path});else{const ae=we({},y.params);for(const ke in ae)ae[ke]==null&&delete ae[ke];$=we({},y,{params:f(ae)}),S.params=f(S.params)}const V=t.resolve($,S),oe=y.hash||"";V.params=v(h(V.params));const ge=yl(s,we({},y,{hash:fl(oe),path:V.path})),le=o.createHref(ge);return we({fullPath:ge,hash:oe,query:s===Gs?Rl(y.query):y.query||{}},V,{redirectedFrom:void 0,href:le})}function P(y){return typeof y=="string"?Yn(n,y,i.value.path):we({},y)}function O(y,S){if(d!==y)return Xt(De.NAVIGATION_CANCELLED,{from:S,to:y})}function T(y){return N(y)}function q(y){return T(we(P(y),{replace:!0}))}function G(y,S){const $=y.matched[y.matched.length-1];if($&&$.redirect){const{redirect:V}=$;let oe=typeof V=="function"?V(y,S):V;return typeof oe=="string"&&(oe=oe.includes("?")||oe.includes("#")?oe=P(oe):{path:oe},oe.params={}),we({query:y.query,hash:y.hash,params:oe.path!=null?{}:y.params},oe)}}function N(y,S){const $=d=L(y),V=i.value,oe=y.state,ge=y.force,le=y.replace===!0,ae=G($,V);if(ae)return N(we(P(ae),{state:typeof ae=="object"?we({},oe,ae.state):oe,force:ge,replace:le}),S||$);const ke=$;ke.redirectedFrom=S;let Xe;return!ge&&wl(s,V,$)&&(Xe=Xt(De.NAVIGATION_DUPLICATED,{to:ke,from:V}),Ee(V,V,!0,!1)),(Xe?Promise.resolve(Xe):se(ke,V)).catch(Ie=>ct(Ie)?ct(Ie,De.NAVIGATION_GUARD_REDIRECT)?Ie:ye(Ie):x(Ie,ke,V)).then(Ie=>{if(Ie){if(ct(Ie,De.NAVIGATION_GUARD_REDIRECT))return N(we({replace:le},P(Ie.to),{state:typeof Ie.to=="object"?we({},oe,Ie.to.state):oe,force:ge}),S||ke)}else Ie=B(ke,V,!0,le,oe);return X(ke,V,Ie),Ie})}function j(y,S){const $=O(y,S);return $?Promise.reject($):Promise.resolve()}function b(y){const S=te.values().next().value;return S&&typeof S.runWithContext=="function"?S.runWithContext(y):y()}function se(y,S){let $;const[V,oe,ge]=Ll(y,S);$=Qn(V.reverse(),"beforeRouteLeave",y,S);for(const ae of V)ae.leaveGuards.forEach(ke=>{$.push(kt(ke,y,S))});const le=j.bind(null,y,S);return $.push(le),Pe($).then(()=>{$=[];for(const ae of a.list())$.push(kt(ae,y,S));return $.push(le),Pe($)}).then(()=>{$=Qn(oe,"beforeRouteUpdate",y,S);for(const ae of oe)ae.updateGuards.forEach(ke=>{$.push(kt(ke,y,S))});return $.push(le),Pe($)}).then(()=>{$=[];for(const ae of ge)if(ae.beforeEnter)if(ot(ae.beforeEnter))for(const ke of ae.beforeEnter)$.push(kt(ke,y,S));else $.push(kt(ae.beforeEnter,y,S));return $.push(le),Pe($)}).then(()=>(y.matched.forEach(ae=>ae.enterCallbacks={}),$=Qn(ge,"beforeRouteEnter",y,S,b),$.push(le),Pe($))).then(()=>{$=[];for(const ae of u.list())$.push(kt(ae,y,S));return $.push(le),Pe($)}).catch(ae=>ct(ae,De.NAVIGATION_CANCELLED)?ae:Promise.reject(ae))}function X(y,S,$){r.list().forEach(V=>b(()=>V(y,S,$)))}function B(y,S,$,V,oe){const ge=O(y,S);if(ge)return ge;const le=S===yt,ae=Ut?history.state:{};$&&(V||le?o.replace(y.fullPath,we({scroll:le&&ae&&ae.scroll},oe)):o.push(y.fullPath,oe)),i.value=y,Ee(y,S,$,le),ye()}let K;function ce(){K||(K=o.listen((y,S,$)=>{if(!re.listening)return;const V=L(y),oe=G(V,re.currentRoute.value);if(oe){N(we(oe,{replace:!0,force:!0}),V).catch(fn);return}d=V;const ge=i.value;Ut&&_l(qs(ge.fullPath,$.delta),Mn()),se(V,ge).catch(le=>ct(le,De.NAVIGATION_ABORTED|De.NAVIGATION_CANCELLED)?le:ct(le,De.NAVIGATION_GUARD_REDIRECT)?(N(we(P(le.to),{force:!0}),V).then(ae=>{ct(ae,De.NAVIGATION_ABORTED|De.NAVIGATION_DUPLICATED)&&!$.delta&&$.type===rs.pop&&o.go(-1,!1)}).catch(fn),Promise.reject()):($.delta&&o.go(-$.delta,!1),x(le,V,ge))).then(le=>{le=le||B(V,ge,!1),le&&($.delta&&!ct(le,De.NAVIGATION_CANCELLED)?o.go(-$.delta,!1):$.type===rs.pop&&ct(le,De.NAVIGATION_ABORTED|De.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),X(V,ge,le)}).catch(fn)}))}let de=cn(),he=cn(),ue;function x(y,S,$){ye(y);const V=he.list();return V.length?V.forEach(oe=>oe(y,S,$)):console.error(y),Promise.reject(y)}function ie(){return ue&&i.value!==yt?Promise.resolve():new Promise((y,S)=>{de.add([y,S])})}function ye(y){return ue||(ue=!y,ce(),de.list().forEach(([S,$])=>y?$(y):S()),de.reset()),y}function Ee(y,S,$,V){const{scrollBehavior:oe}=e;if(!Ut||!oe)return Promise.resolve();const ge=!$&&Pl(qs(y.fullPath,0))||(V||!$)&&history.state&&history.state.scroll||null;return Je().then(()=>oe(y,S,ge)).then(le=>le&&xl(le)).catch(le=>x(le,y,S))}const z=y=>o.go(y);let W;const te=new Set,re={currentRoute:i,listening:!0,addRoute:c,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:F,getRoutes:C,resolve:L,options:e,push:T,replace:q,go:z,back:()=>z(-1),forward:()=>z(1),beforeEach:a.add,beforeResolve:u.add,afterEach:r.add,onError:he.add,isReady:ie,install(y){y.component("RouterLink",Jl),y.component("RouterView",sr),y.config.globalProperties.$router=re,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>l(i)}),Ut&&!W&&i.value===yt&&(W=!0,T(o.location).catch(V=>{}));const S={};for(const V in yt)Object.defineProperty(S,V,{get:()=>i.value[V],enumerable:!0});y.provide(Dn,re),y.provide(Cs,Bi(S)),y.provide(as,i);const $=y.unmount;te.add(y),y.unmount=function(){te.delete(y),te.size<1&&(d=yt,K&&K(),K=null,i.value=yt,W=!1,ue=!1),$()}}};function Pe(y){return y.reduce((S,$)=>S.then(()=>b($)),Promise.resolve())}return re}let Jn;function ir(e){st(e)&&(Jn==null?Jn=e:Jn!==e&&Qt().show({text:"A new version of PhotoStructure is ready",details:"Version "+e,type:"info",uuid:"new-version",timeout:!1,buttons:[{text:"Details",class:"text",title:"Open the latest release notes in a new window",onClick:()=>window.open("https://photostructure.com/about/release-notes/","_blank")},{text:"Refresh",class:"info",onClick:()=>window.location.reload()}],onClick:()=>window.location.reload()}))}const ar=Jt(()=>!1,10*wn),Ah=Jt(()=>new rr("div[data-url]",e=>e.click())),so=["scroll","wheel","resize","touchmove","touchend"],oi=[];function lr(){oi.forEach(e=>e.onChange())}class rr{constructor(t,n){this.selector=t,this.visibilityHandler=n,this.callback=()=>{ga(5,s=>setTimeout(()=>this.check(),s*wn))},oi.push(this)}selector;visibilityHandler;arr=[];callback;onChange(){this.findElements(),this._check()}findElements(){this.arr.length=0,Ho(this.selector).forEach(t=>this.arr.push(t)),os(this.arr)?this.removeListenersIfEmpty():this.addListeners()}check=zo({f:this._check.bind(this),minCallDelayMs:100});_check(){ya(this.arr,t=>{const n=ur(t);return n&&this.visibilityHandler(t),!n}),this.removeListenersIfEmpty()}addListeners(){if(this.arr.length>0)for(const t of so)window.addEventListener(t,this.callback,{passive:!0})}removeListenersIfEmpty(){if(os(this.arr))for(const t of so)window.removeEventListener(t,this.callback)}}const ii=Jt(()=>50);function ur(e){if(document.documentElement==null)return!1;const t=e.getBoundingClientRect(),n=ii()/100*document.documentElement.clientHeight;return t.bottom>=-n&&t.right>=-n&&t.top<=document.documentElement.clientHeight+n&&t.left<=document.documentElement.clientWidth+n}const cr="2026.4.7-beta",oo=Jt(()=>Ha("is-plus")),tn=lt("system",()=>{const e=M(oo()),t=A(()=>!e.value),n=M(cr),s=M([]),o=M(void 0);function a(r){if(r!=null&&ar.set(!1),st(r?.tier)){const i=r?.tier==="plus";oo.set(i),e.value=i}wa(r?.ll_vh)&&ii.set(r.ll_vh),Fo(r?.ver,i=>{n.value=i,ir(i)})}function u(r){r?.navItems!=null&&(s.value=r.navItems),o.value=r?.healthLevel}return{plus:e,lite:t,navItems:s,healthLevel:o,version:n,set:a,setSystemState:u}}),Rn=Jt(async()=>{const e=await dt("/admin/state");return tn().setSystemState(e),e},wn),Ch=vt("capturedAt");function dr(e){return e=bt(e).trim(),e.match(/\s/)!=null?`"${e}"`:e}const fr=1,hr=99;function vr(){return Ka(fr,hr+1)}function mr(e){return e?.constructor?.name==="URLSearchParams"}function ai(e){return e==null?void 0:mr(e)?e:new URLSearchParams(e)}function li(...e){const t=$n(e.map(ai)),n=t.shift();if(n!=null){for(const s of t)for(const[o,a]of s.entries())n.set(o,a);return n}}function Et(e,...t){const n=bt(li(...t));return e+(en(n)?"":"?"+n)}const pr=Jt(vr,100);function gr(e,t){const n=ai(e);if(t||!ka(n?.get("seed"))){const s=pr().toString();return n?.set("seed",s),n??{seed:s}}return n}function ri(e){return pn([],e,!0)}function pn(e,t,n=!1){const s=ui(e,t,n);return Et(s.path,s.query)}function ui(e,t,n=!1){return{path:"/tag/"+(os(e)?"":e.map(encodeURIComponent).join("/")),query:gr(t,n)}}function xh(e){if(e.length===0)return{path:"/search"};if(e.length===1)return{path:"/search",query:{q:e[0]}};const t=e.slice(1).join("/");return{path:"/search",query:{q:`${e[0]}:${dr("/"+t+"/")}`}}}function yr(e,t){if(e==="/tag"||e.startsWith("/tag/")){const s=(e.startsWith("/tag/")?e.substring(5):"").split("/").filter(a=>a!=="").map(decodeURIComponent);s.length>0&&s.pop();const o=s.length>0;return pn(s,t,o)}return ri()}function io(e){const{query:t}=ui(e);return t instanceof URLSearchParams?Object.fromEntries(t.entries()):t}function wr(e){if(e!=null&&e.startsWith("search:"))return{name:"search",query:{q:e.substring(7)}};if(e!=null&&e.startsWith("tag:")){const t=e.substring(4).split("/");return{name:"tag",params:{path:t},query:io(t)}}return{name:"tag",query:io([])}}function Vt(e,t){const n=e.toLowerCase(),s=n!==e||t.shiftKey,o=new Event("click");o.shiftKey=s;for(const a of["data-key0","data-key","data-key1","data-key2","data-key3","data-key4","data-key5"]){const u=document.querySelector(`[${a}="${e}"]`)??(s?document.querySelector(`[${a}="${n}"]`):void 0);if(u!=null){t.preventDefault(),u.dispatchEvent(o);return}}}function es(){return document.body.classList.contains("pause")}function ci(e){if(!(e.defaultPrevented||e.target?.tagName?.toLowerCase()==="input")){if(["Alt","Control","Shift","ScrollLock"," "].includes(e.key)){const n=e.key.toLowerCase();document.body.classList.add(n);const s=o=>{o.key===e.key&&(document.body.classList.remove(n),window.removeEventListener("keyup",s))};window.addEventListener("keyup",s);return}if(e.key==="p"||e.key==="Pause"){document.body.classList.toggle("pause");return}if(As()&&(za()&&e.metaKey||e.altKey))switch(e.key){case"ArrowLeft":e.preventDefault(),window.history.back();return;case"ArrowRight":e.preventDefault(),window.history.forward();return;case"r":e.preventDefault(),window.location.reload();return;default:return}if(!(e.altKey||e.ctrlKey||e.metaKey))switch(e.key){case"Left":case"ArrowLeft":return Vt("left",e);case"Right":case"ArrowRight":return Vt("right",e);case"Escape":return Vt("esc",e);case"Enter":return Vt("enter",e);case"Backspace":return Vt("backspace",e);default:return Vt(e.key,e)}}}function kr(){window.addEventListener("keydown",ci)}function br(){window.removeEventListener("keydown",ci)}const Ht=vt("pending","resolved","rejected");class hn{constructor(t){this.id=t,this.promise=new Promise((n,s)=>{this._resolve=n,this._reject=s})}id;static observe(t){return new hn().observe(t)}[Symbol.toStringTag]="Deferred";promise;startedAt=Date.now();settledAt=void 0;_resolve;_reject;_state=Ht.pending;get state(){return this._state}get elapsedMs(){return(this.settledAt??Date.now())-this.startedAt}isPending(){return this._state===Ht.pending}isResolved(){return this._state===Ht.resolved}isRejected(){return this._state===Ht.rejected}isSettled(){return!this.isPending()}then(t,n){return this.promise.then(t,n)}catch(t){return this.promise.catch(t)}finally(t){return this.promise.finally(t)}resolve(t){return this.isSettled()?!1:(this._state=Ht.resolved,this.settledAt??=Date.now(),this._resolve(t),!0)}reject(t){return this.isSettled()?!1:(this._state=Ht.rejected,this.settledAt??=Date.now(),this._reject(t),!0)}async observeFn(t){try{const n=await t();return this.resolve(n),n}catch(n){throw this.reject(ba(n)),n}}observe(t){return t.then(n=>this.resolve(n),n=>this.reject(n)),this}observeQuietly(t){return t==null?this.resolve(void 0):t.then(n=>this.resolve(n),()=>this.resolve(void 0)),this}toJSON(){return{$ctor:"fe.Deferred",...this.id==null?{}:{id:this.id},state:this._state,elapsedMs:this.elapsedMs}}}function Sr(){return{title:null,message:null,showPrompt:null,promptType:"text",promptPlaceholder:"",showCancel:null,okText:"OK",okClass:"info",okIcon:null}}const Ir=lt("modal",()=>{const e=M(!1),t=M(null),n=M(null),s=M(null),o=M("text"),a=M(""),u=M(null),r=M("OK"),i=M("info"),d=M(null),v=M("");let f=null;Ae(e,T=>{T?document.body.classList.add("modal-shown"):document.body.classList.remove("modal-shown")});function h(){const T=Sr();t.value=T.title,n.value=T.message,s.value=null,o.value=T.promptType,a.value=T.promptPlaceholder,u.value=null,r.value=T.okText,i.value=T.okClass,d.value=null,v.value=""}function c(T){e.value=!1,f?.(T),f=null}function g(){c({ok:!1})}function C(){c({ok:!1})}function F(){c({ok:!0,prompt:v.value})}function L(T,q){h(),t.value=T,n.value=q,s.value=!1,u.value=!1,e.value=!0;const G=new hn;return f=()=>G.resolve(),G}function P(T,q){h(),t.value=T,n.value=q,s.value=!1,u.value=!0,e.value=!0;const G=new hn;return f=N=>G.resolve(N.ok),G}function O(T){h(),t.value=T.title,n.value=T.message,s.value=T.showPrompt??!0,o.value=T.promptType??"text",a.value=T.promptPlaceholder??"",u.value=T.showCancel??!0,r.value=T.okText??"OK",i.value=T.okClass??"info",d.value=T.okIcon??null,e.value=!0;const q=new hn;return f=G=>q.resolve(G),q}return{show:e,title:t,message:n,showPrompt:s,promptType:o,promptPlaceholder:a,showCancel:u,okText:r,okClass:i,okIcon:d,promptValue:v,dismiss:c,onScrimClick:g,onCancelClick:C,onOkClick:F,alert:L,confirm:P,promptModal:O}}),Ar={key:0,class:"modal"},Cr={class:"dialog reveal"},xr={key:0,class:"header"},_r=["innerHTML"],Pr=["type","placeholder"],Tr={class:"footer"},Er=Ue({__name:"Modal",setup(e){const t=Ir(),{show:n,title:s,message:o,showPrompt:a,promptType:u,promptPlaceholder:r,showCancel:i,okText:d,okClass:v,okIcon:f,promptValue:h}=ze(t),{onScrimClick:c,onCancelClick:g,onOkClick:C}=t;return(F,L)=>(p(),Se(ws,{name:"fade"},{default:Re(()=>[l(n)?(p(),k("div",Ar,[m("div",{class:"scrim",onClick:L[0]||(L[0]=et((...P)=>l(c)&&l(c)(...P),["stop"]))}),m("div",Cr,[l(s)?(p(),k("h2",xr,Z(l(s)),1)):R("",!0),m("div",{class:"body",innerHTML:l(o)},null,8,_r),l(a)?Ge((p(),k("input",{key:1,class:"prompt","onUpdate:modelValue":L[1]||(L[1]=P=>Ki(h)?h.value=P:null),type:l(u)??"text",placeholder:l(r)??"",onKeyup:L[2]||(L[2]=ji((...P)=>l(C)&&l(C)(...P),["enter"]))},null,40,Pr)),[[Xi,l(h)]]):R("",!0),m("div",Tr,[l(i)?(p(),k("button",{key:0,class:"cancel btn grey",onClick:L[3]||(L[3]=(...P)=>l(g)&&l(g)(...P)),"data-key":"esc"}," Cancel ")):R("",!0),m("button",{class:_e(["btn",l(v)]),onClick:L[4]||(L[4]=(...P)=>l(C)&&l(C)(...P)),"data-key":"enter"},[l(f)?(p(),Se(D,{key:0,icon:l(f)},null,8,["icon"])):R("",!0),ve(" "+Z(l(d)),1)],2)])])])):R("",!0)]),_:1}))}}),di="ps-theme",ts=["auto","light","dark"],Rr={auto:"brightness_auto",light:"light_mode",dark:"dark_mode"},ao={auto:"Auto",light:"Light",dark:"Dark"};function Tn(e){return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Lr(){const e=localStorage.getItem(di);return e==="light"||e==="dark"||e==="auto"?e:"auto"}function ns(e){const t=document.documentElement;t.classList.toggle("light",e==="light"),t.classList.toggle("dark",e==="dark")}const Bt=M(Lr()),Ct=M(Tn(Bt.value));function fi(){let e;function t(o){Bt.value=o,localStorage.setItem(di,o),Ct.value=Tn(o),ns(Ct.value)}function n(){const o=ts.indexOf(Bt.value);t(ts[(o+1)%ts.length])}function s(){Bt.value==="auto"&&(Ct.value=Tn("auto"),ns(Ct.value))}return gn(()=>{Ct.value=Tn(Bt.value),ns(Ct.value),e=window.matchMedia("(prefers-color-scheme: dark)"),e.addEventListener("change",s)}),St(()=>{e?.removeEventListener("change",s)}),{preference:Bt,resolved:Ct,setPreference:t,toggleTheme:n}}function pe(e){if(e!=null){if(Gt(e))return e;if("id"in e&&Gt(e.id))return e.id;if("assetId"in e&&Gt(e.assetId))return e.assetId;if("tagId"in e&&Gt(e.tagId))return e.tagId}}const Or=vt("fit","sq");vt("uhd8k","uhd5k","uhd4k","qhd","fhd","hd","wvga","qvga","qqvga");vt("s480","s240","s120","s60");const $r=[60,120,240,480];function lo(e,t){return e+" "+t+"w"}function _s(e,t){let n=t==null?void 0:li(...t);const s=bt(e.v);return!en(s)&&s!=="1"&&(n??=new URLSearchParams).append("v",s),n}function ht({assetId:e,params:t,context:n}){if(e==null)return"";const s=n!=null?{context:n}:void 0;return Et("/asset/"+pe(e),_s(e,t),s)}function Dr({assetId:e,params:t,context:n}){const s=ht({assetId:e,params:t,context:n});return en(s)?{}:{href:s}}function Zt({assetId:e,reducer:t,width:n,params:s}){return Et(`/img/${pe(e)}/${t}/${Sa(n)??320}`,_s(e,s))}function hi({assetId:e,assetFileId:t,params:n}){return Et(`/img/${$n([pe(e),t]).join("/")}/actual`,_s(e,n))}function Mr({assetId:e,params:t,lazyLoad:n,size:s="m"}){return{...vi({assetId:e,params:t,reducer:"sq",widths:$r,lazyLoad:n}),sizes:(s==="s"?80:s==="m"?160:320)*Wo(globalThis?.window?.devicePixelRatio,1)+"px"}}function vi({assetId:e,params:t,reducer:n,widths:s,lazyLoad:o,af:a}){if(pe(e)==null)return{src:"/images/clear-64.png"};s=(s??[]).filter(ft),s.length===0&&s.push(320);const r=Math.min(...s),i={width:bt(r)},d=No(e.capturedAtLocal);d!=null&&(i.title=d);const v=Zt({assetId:e,params:t,reducer:n,width:r});o??=!0,i.src=v,i.loading=o?"lazy":"eager",i.decoding="async",n===Or.sq?i.height=bt(r):s.length>1&&(i.sizes=Math.round(r*Wo(globalThis?.window?.devicePixelRatio,1))+"px");const f=s.map(h=>lo(Zt({assetId:e,params:t,reducer:n,width:h}),h));return a!=null&&f.push(lo(hi({assetId:e,params:t,assetFileId:a.assetFileId}),a.width)),i.srcSet=f.join(","),i}const it=lt("assetOverlay",()=>{const e=M(void 0),t=M(void 0),n=M(void 0),s=M(void 0),o=M(void 0),a=M(!1),u=M(0);let r=0,i;const d=M(0);let v=!1;function f(){v=!0}function h(){const x=v;return v=!1,x}let c=!1;function g(){c=!0}function C(){const x=c;return c=!1,x}let F=!1;function L(){F=!0}function P(){const x=F;return F=!1,x}const O=A(()=>e.value!=null);let T;function q(x){T=x}let G;function N(x){G=x}function j(){const x=G;G=void 0,x?.()}function b(x){o.value=x}function se(x){a.value=o.value!=null,o.value=void 0,e.value=x.assetId,t.value=x.context,n.value=x.from,s.value=x.priorAssetId,u.value=1,r=1,i=document.title;const ie=ht({assetId:x.assetId,params:[],context:x.context});history.pushState({__psOverlay:!0,assetId:x.assetId,context:x.context,depth:1},"",ie);const ye=document.body.classList;ye.add("overlay-open"),ye.remove("header-hidden"),jt().pauseSSE()}let X=!1;async function B(x="back"){if(!X){X=!0;try{const ie=e.value,ye=C();x!=="replace"&&ie!=null&&T!=null&&!ye&&await T(ie),d.value=0;const Ee=u.value;o.value=void 0,e.value=void 0,t.value=void 0,n.value=void 0,s.value=void 0,u.value=0,r=0,document.body.classList.remove("overlay-open"),x==="back"?(f(),history.go(-Ee)):x==="replace"&&history.replaceState(history.state,"",location.href),i!=null&&(document.title=i,i=void 0),jt().resumeSSE()}finally{X=!1}}}function K(x){const ie=x.clearContext?void 0:x.context??t.value;t.value=ie,e.value=x.assetId,n.value=x.from,s.value=x.priorAssetId,u.value++,r=u.value;const ye=ht({assetId:x.assetId,params:[],context:ie});history.pushState({__psOverlay:!0,assetId:x.assetId,context:ie,depth:u.value},"",ye)}function ce(){o.value=void 0,e.value=void 0,t.value=void 0,n.value=void 0,s.value=void 0,u.value=0,r=0,d.value=0,document.body.classList.remove("overlay-open"),i!=null&&(document.title=i,i=void 0),jt().resumeSSE()}function de(x){u.value=x.depth,e.value=x.assetId,t.value=x.context,n.value=void 0,s.value=void 0}function he(x){u.value=x.depth,e.value=x.assetId,t.value=x.context,n.value=void 0,s.value=void 0,a.value=!1,o.value=void 0,r=x.depth,i=document.title,document.body.classList.add("overlay-open"),document.body.classList.remove("header-hidden"),jt().pauseSSE()}function ue(){t.value=void 0;const x=e.value;if(x!=null){const ie=ht({assetId:x,params:[]});history.replaceState({__psOverlay:!0,assetId:x,depth:u.value},"",ie)}}return{assetId:A(()=>e.value),context:A(()=>t.value),from:A(()=>n.value),priorAssetId:A(()=>s.value),isOpen:O,pendingOpen:A(()=>o.value),openedFromPending:A(()=>a.value),overlayDepth:A(()=>u.value),hasForwardOverlay:A(()=>u.value<r),onBeforeClose:q,onceAssetReady:N,notifyAssetReady:j,setPendingOpen:b,open:se,close:B,closeImmediate:ce,navigateToAsset:K,switchToHistoryAsset:de,reopenFromHistory:he,clearContext:ue,setSkipNextDissolve:L,consumeSkipNextDissolve:P,dismissProgress:d,setSkipNextClose:g,consumeSkipNextClose:C,consumeOverlayCloseExpected:h}}),mi=280,ro="ps-nav-pinned",Nr=1280,Ps=lt("menu",()=>{const e=M(!1),t=window.matchMedia(`(min-width: ${Nr}px)`),n=M(t.matches);function s(c){n.value=c.matches,c.matches&&!a()?r():!c.matches&&o.value&&i()}t.addEventListener("change",s);const o=M(!1);n.value&&!a()&&r();function a(){try{return localStorage.getItem(ro)==="false"}catch{return!1}}function u(c){try{localStorage.setItem(ro,String(c))}catch{}}function r(){o.value=!0,e.value=!0,document.body.classList.add("nav-pinned"),document.body.classList.remove("menu-shown"),document.documentElement.style.setProperty("--nav-inset",`${mi}px`),window.dispatchEvent(new Event("resize"))}function i(){o.value=!1,e.value=!1,document.body.classList.remove("nav-pinned"),document.documentElement.style.setProperty("--nav-inset","0px"),window.dispatchEvent(new Event("resize"))}function d(){n.value?(r(),u(!0)):(e.value=!0,document.body.classList.add("menu-shown"))}function v(){o.value?(i(),u(!1)):(e.value=!1,document.body.classList.remove("menu-shown"))}function f(){e.value?v():d()}const h=A(()=>n.value?e.value?"Hide sidebar":"Show sidebar":"Navigation");return{visible:e,pinned:o,isWideViewport:n,sidebarLabel:h,show:d,hide:v,toggle:f}}),pi="welcome-overlay-seen";function Fr(){return window.localStorage?.getItem(pi)==="1"}function uo(){window.localStorage?.setItem(pi,"1")}const gi=lt("welcomeOverlay",()=>{const e=M(!1);Ae(e,o=>{o?document.body.classList.add("welcome-overlay-shown"):document.body.classList.remove("welcome-overlay-shown")});function t(){e.value=!0}function n(){e.value=!1,uo()}function s(){Fr()||(uo(),t())}return{show:e,open:t,close:n,maybeAutoOpen:s}}),Wr={class:"top"},Vr=["data-key4"],Hr=["title"],zr=["src"],Ur={key:0,class:"edition plus"},Br={key:1,class:"edition lite"},qr={class:"menu-items"},Gr=["aria-expanded"],jr=["aria-expanded"],Kr={href:"/settings",title:"Change settings for your library"},Xr={href:"/activity",title:"View and manage system activity and performance"},Yr={href:"/logs",title:"Log viewer"},Zr={key:1},Qr=["title"],Jr={href:"/about",target:"_blank",title:"View version, system, and licensing details."},eu={class:"external-link",href:"https://photostructure.com/whats-new/",target:"_blank",rel:"noopener",title:"See what's new in this version of PhotoStructure"},tu={class:"external-link",href:"https://photostructure.com/user-guide/",target:"_blank",rel:"noopener",title:"A guided path of documentation in using PhotoStructure"},nu={class:"external-link",href:"https://forum.photostructure.com/",target:"_blank",rel:"noopener",title:"Visit the PhotoStructure Forum to get support and share feedback"},su={class:"external-link",href:"https://photostructure.com/go/discord",target:"_blank",rel:"noopener",title:"Chat with the author and community in the official PhotoStructure Discord channel"},ou={key:0,class:"bottom"},iu=["href"],au=Ue({__name:"NavMenu",setup(e){const t=kn(),{preference:n,resolved:s,toggleTheme:o}=fi(),a=A(()=>s.value==="dark"?"/images/logo-horizontal-white.svg":"/images/logo-horizontal.svg"),u=Ps(),r=tn(),i=it(),d=gi(),{visible:v,pinned:f}=ze(u),{hide:h}=u,{plus:c,lite:g,navItems:C,healthLevel:F}=ze(r),L=M(!1),P=M(!0);Xa("ps-nav-sections",{explore:L,admin:P});const O=A(()=>({visible:v.value===!0,pinned:f.value===!0}));function T(){f.value||h()}Rn(),Ae(v,j=>{j&&Rn()});function q(j){const b=t.path,se=j.endsWith("/")?j:j+"/";return(b.endsWith("/")?b:b+"/").startsWith(se)}function G(){return ri(t.query)}function N(){aa()}return(j,b)=>{const se=yn("router-link");return p(),k("div",null,[l(v)&&!l(f)?(p(),k("div",{key:0,id:"full-page-scrim",onClick:b[0]||(b[0]=X=>l(h)())})):R("",!0),m("nav",{class:_e(["nav-menu",O.value]),id:"nav-menu",onClick:b[7]||(b[7]=X=>T())},[m("div",Wr,[l(v)?(p(),k("a",{key:0,class:"vicon nav-close",title:"Close",onClick:b[1]||(b[1]=X=>l(h)()),"data-key4":l(i).isOpen?void 0:"esc"},[E(D,{icon:"close"})],8,Vr)):R("",!0),m("div",{class:"branding",title:l(c)?"Thanks for supporting PhotoStructure with your subscription!":l(g)?"This is the free version of PhotoStructure with limited features.":""},[m("img",{class:"logo",src:a.value,alt:"PhotoStructure logo"},null,8,zr),l(c)?(p(),k("div",Ur,"plus")):R("",!0),l(g)?(p(),k("div",Br,"lite")):R("",!0)],8,Hr)]),m("div",qr,[m("ol",null,[m("li",null,[E(se,{to:G(),title:"View all root tags"},{default:Re(()=>[E(D,{icon:"home"}),b[8]||(b[8]=m("span",null,"Home",-1))]),_:1},8,["to"])]),m("li",null,[E(se,{to:"/search",title:"Search"},{default:Re(()=>[E(D,{icon:"search"}),b[9]||(b[9]=m("span",null,"Search",-1))]),_:1})]),l(C).length>0?(p(),k(Ce,{key:0},[b[11]||(b[11]=m("hr",null,null,-1)),m("li",null,[m("div",{class:"nav-section-header",role:"button","aria-expanded":!L.value,onClick:b[2]||(b[2]=et(X=>L.value=!L.value,["stop"])),title:"Show or hide tag categories"},[E(D,{icon:"explore"}),b[10]||(b[10]=m("span",null," Explore",-1)),E(D,{icon:"expand_more",class:_e(["nav-section-chevron",{collapsed:L.value}])},null,8,["class"])],8,Gr)]),(p(!0),k(Ce,null,Fe(l(C),X=>Ge((p(),k("li",{key:X.name},[E(se,{to:X.href,title:X.title,class:_e({"nav-active":q(X.href)})},{default:Re(()=>[E(D,{icon:X.icon},null,8,["icon"]),m("span",null,Z(X.label),1)]),_:2},1032,["to","title","class"])])),[[Ze,!L.value]])),128))],64)):R("",!0),m("li",null,[Ge(E(se,{to:"/search?q=liked:true",title:"View liked photos and videos"},{default:Re(()=>[E(D,{icon:"favorite_border"}),b[12]||(b[12]=m("span",null,"Liked",-1))]),_:1},512),[[Ze,!L.value]])]),b[28]||(b[28]=m("hr",null,null,-1)),m("li",null,[m("div",{class:_e(["nav-section-header",l(F)!=null&&P.value?["health-alert",l(F)]:void 0]),role:"button","aria-expanded":!P.value,onClick:b[3]||(b[3]=et(X=>P.value=!P.value,["stop"])),title:"Show or hide admin tools"},[E(D,{icon:"build_circle"}),b[13]||(b[13]=m("span",null,"Admin",-1)),E(D,{icon:"expand_more",class:_e(["nav-section-chevron",{collapsed:P.value}])},null,8,["class"])],10,jr)]),Ge(m("li",null,[E(se,{to:"/search?q=archived:true",title:"View archived assets. These photos and videos are hidden from tag galleries and most searches."},{default:Re(()=>[E(D,{icon:"archive"}),b[14]||(b[14]=m("span",null,"Archived",-1))]),_:1})],512),[[Ze,!P.value]]),Ge(m("li",null,[E(se,{to:"/search?q=removed:true",title:"View recently removed assets. These photos and videos will be removed from the library, but their files remain on disk."},{default:Re(()=>[E(D,{icon:"library_remove"}),b[15]||(b[15]=m("span",null,"Removed",-1))]),_:1})],512),[[Ze,!P.value]]),Ge(m("li",null,[E(se,{to:"/search?q=trashed:true",title:"View recently trashed assets. These photos and videos will be removed from the library and all file variations will be deleted."},{default:Re(()=>[E(D,{icon:"trash"}),b[16]||(b[16]=m("span",null,"Trash",-1))]),_:1})],512),[[Ze,!P.value]]),Ge(m("hr",null,null,512),[[Ze,!P.value]]),Ge(m("li",null,[m("a",Kr,[E(D,{icon:"settings"}),b[17]||(b[17]=m("span",null,"Settings",-1))])],512),[[Ze,!P.value]]),Ge(m("li",null,[m("a",{href:"/health",title:"View your library's health checks",class:_e(l(F)!=null?["health-alert",l(F)]:void 0)},[E(D,{icon:"health"}),b[18]||(b[18]=m("span",null,"Health checks",-1))],2)],512),[[Ze,!P.value]]),Ge(m("li",null,[m("a",Xr,[E(D,{icon:"speed"}),b[19]||(b[19]=m("span",null,"System activity",-1))])],512),[[Ze,!P.value]]),Ge(m("li",null,[m("a",Yr,[E(D,{icon:"article"}),b[20]||(b[20]=m("span",null,"Log viewer",-1))])],512),[[Ze,!P.value]]),l(As)()?R("",!0):Ge((p(),k("li",Zr,[m("a",{onClick:b[4]||(b[4]=X=>N()),title:"Shut down PhotoStructure. Your library will no longer be accessible until you re-launch PhotoStructure."},[E(D,{icon:"power"}),b[21]||(b[21]=m("span",null,"Shut down",-1))])],512)),[[Ze,!P.value]]),m("li",null,[m("a",{onClick:b[5]||(b[5]=et(X=>l(o)(),["stop"])),title:`Theme: ${l(ao)[l(n)]} (click to change)`},[E(D,{icon:l(Rr)[l(n)]},null,8,["icon"]),m("span",null,"Theme: "+Z(l(ao)[l(n)]),1)],8,Qr)]),b[29]||(b[29]=m("hr",null,null,-1)),m("li",null,[m("a",Jr,[E(D,{icon:"logo"}),b[22]||(b[22]=m("span",null,"About PhotoStructure",-1))])]),m("li",null,[m("a",{onClick:b[6]||(b[6]=X=>l(d).open()),title:"View the welcome screen"},[E(D,{icon:"help_outline"}),b[23]||(b[23]=m("span",null,"Welcome",-1))])]),m("li",null,[m("a",eu,[E(D,{icon:"gift"}),b[24]||(b[24]=m("span",null,"What's new?",-1))])]),m("li",null,[m("a",tu,[E(D,{icon:"auto_stories"}),b[25]||(b[25]=m("span",null,"User guide",-1))])]),m("li",null,[m("a",nu,[E(D,{icon:"forum"}),b[26]||(b[26]=m("span",null,"Forum",-1))])]),m("li",null,[m("a",su,[E(D,{icon:"discord"}),b[27]||(b[27]=m("span",null,"Discord",-1))])])])]),l(g)?(p(),k("div",ou,[b[30]||(b[30]=ve(" You deserve PhotoStructure ",-1)),b[31]||(b[31]=m("span",{class:"plus"},"PLUS",-1)),b[32]||(b[32]=ve("!",-1)),b[33]||(b[33]=m("br",null,null,-1)),m("a",{href:l(ia)()},"Try it for free for 15 days",8,iu),b[34]||(b[34]=ve(". ",-1))])):R("",!0)],2)])}}}),yi="(PLUS only)",lu=new Map([[" ","spacebar"],["-","minus"],["+","plus"],["left","left cursor"],["right","right cursor"],["backspace",Ua()?"delete":"backspace"]]),co=" ",fo="(",ru=")";function wi(e){{const t=lu.get(e);if(t!=null)return t}return e!==e.toLowerCase()&&e===e.toUpperCase()?"Shift + "+e:e}function uu(){for(const e of Ho("[data-key],[data-key2],[data-key3],[data-key4],[data-key5]")){if(en(e.title)||e.title.endsWith(yi))continue;const t=bt(e.title).split(co).filter(n=>!n.startsWith(fo));Ia(Ss([e.dataset.key,e.dataset.key2,e.dataset.key3,e.dataset.key4,e.dataset.key5]),n=>{t.push(fo+Aa(n.map(wi))+ru)}),e.title=t.join(co)}}function cu(e){return e.replace(/\s*\([^)]+\)\s*$/,"").trim()}const du=["key0","key","key1","key2","key3","key4","key5"];function fu(e){return e.closest(".asset-overlay, .asset")?"Asset viewer":e.closest("header")?"Navigation":e.closest("nav, .nav-menu")?"Menu":"General"}function hu(){const e=new Map,t=document.querySelectorAll("[data-key],[data-key0],[data-key1],[data-key2],[data-key3],[data-key4],[data-key5]");for(const n of t){if(n.closest(".shortcuts-sheet, .welcome-overlay"))continue;const s=n.dataset,o=[];for(const v of du){const f=s[v];f!=null&&f!==""&&o.push(f)}if(o.length===0)continue;const a=n.title;if(!a)continue;const u=cu(a);if(!u)continue;const r=fu(n),i=r+":"+u,d=e.get(i);d!=null?d.keys=Ss([...d.keys,...o]):e.set(i,{label:u,keys:[...o],section:r})}for(const n of vu){const s=n.section+":"+n.label;e.has(s)||e.set(s,{...n})}return[...e.values()].map(n=>({...n,keys:n.keys.map(wi)}))}const vu=[{label:"Close",keys:["esc","backspace"],section:"Asset viewer"},{label:"Previous asset",keys:["left","j"],section:"Asset viewer"},{label:"Next asset",keys:["right","k"],section:"Asset viewer"},{label:"Zoom in",keys:["+","="],section:"Asset viewer"},{label:"Zoom out",keys:["-","_"],section:"Asset viewer"},{label:"Toggle zoom",keys:["z"],section:"Asset viewer"},{label:"Like",keys:["*","l"],section:"Asset viewer"},{label:"Rotate",keys:["r"],section:"Asset viewer"},{label:"Download",keys:["d"],section:"Asset viewer"},{label:"Archive",keys:["A"],section:"Asset viewer"},{label:"Remove",keys:["R"],section:"Asset viewer"},{label:"Trash",keys:["#","T"],section:"Asset viewer"},{label:"Autoplay video",keys:["P"],section:"Asset viewer"},{label:"Related assets",keys:["s"],section:"Asset viewer"},{label:"Show info",keys:["i"],section:"Asset viewer"}];function mu(){return window.matchMedia?.("(pointer: coarse)").matches===!0&&window.matchMedia?.("(pointer: fine)").matches!==!0}const ki=lt("shortcutsSheet",()=>{const e=M(!1),t=M([]);Ae(e,o=>{o?document.body.classList.add("shortcuts-sheet-shown"):document.body.classList.remove("shortcuts-sheet-shown")});function n(){mu()||(t.value=hu(),e.value=!0)}function s(){e.value=!1}return{show:e,rows:t,open:n,close:s}}),pu={key:0,class:"shortcuts-sheet"},gu={class:"dialog reveal"},yu={class:"dialog-header"},wu={class:"body"},ku={class:"shortcut-rows"},bu={class:"shortcut-label"},Su={class:"shortcut-keys"},Iu=Ue({__name:"ShortcutsSheet",setup(e){const t=ki(),{show:n,rows:s}=ze(t),{close:o}=t,a=["Navigation","General","Asset viewer","Menu"],u=A(()=>{const r=new Map;for(const i of s.value){const d=r.get(i.section);d!=null?d.push(i):r.set(i.section,[i])}return a.filter(i=>r.has(i)).map(i=>({heading:i,rows:r.get(i)}))});return(r,i)=>(p(),Se(ws,{name:"fade"},{default:Re(()=>[l(n)?(p(),k("div",pu,[m("div",{class:"scrim",onClick:i[0]||(i[0]=et((...d)=>l(o)&&l(o)(...d),["stop"]))}),m("div",gu,[m("div",yu,[i[2]||(i[2]=m("h2",null,"Keyboard shortcuts",-1)),m("button",{class:"vicon close-btn",title:"Close","data-key":"esc",onClick:i[1]||(i[1]=(...d)=>l(o)&&l(o)(...d))},[E(D,{icon:"close"})])]),m("div",wu,[(p(!0),k(Ce,null,Fe(u.value,d=>(p(),k("div",{key:d.heading,class:"shortcut-section"},[m("h3",null,Z(d.heading),1),m("div",ku,[(p(!0),k(Ce,null,Fe(d.rows,v=>(p(),k(Ce,{key:v.label},[m("span",bu,Z(v.label),1),m("span",Su,[(p(!0),k(Ce,null,Fe(v.keys,f=>(p(),k("kbd",{key:f},Z(f),1))),128))])],64))),128))])]))),128))])])])):R("",!0)]),_:1}))}}),Au={key:0,class:"welcome-overlay"},Cu={class:"dialog reveal"},xu={class:"dialog-header"},_u=["src"],Pu={class:"body"},Tu={key:0},Eu={key:1},Ru={key:2},Lu={key:3},Ou=Ue({__name:"WelcomeOverlay",setup(e){const{resolved:t}=fi(),n=A(()=>t.value==="dark"?"/images/logo-horizontal-white.svg":"/images/logo-horizontal.svg"),s=gi(),o=ki(),a=Ps(),{show:u}=ze(s),{close:r}=s,{pinned:i}=ze(a),d=window.matchMedia("(any-pointer: coarse)").matches;function v(){r(),o.open()}return(f,h)=>(p(),Se(ws,{name:"fade"},{default:Re(()=>[l(u)?(p(),k("div",Au,[m("div",{class:"scrim",onClick:h[0]||(h[0]=et((...c)=>l(r)&&l(r)(...c),["stop"]))}),m("div",Cu,[m("button",{class:"vicon close-btn",title:"Close","data-key":"esc",onClick:h[1]||(h[1]=(...c)=>l(r)&&l(r)(...c))},[E(D,{icon:"close"})]),m("div",xu,[m("img",{class:"welcome-logo",src:n.value,alt:"PhotoStructure"},null,8,_u),h[2]||(h[2]=m("h2",null,"Welcome!",-1))]),m("div",Pu,[h[14]||(h[14]=m("p",null," You're looking at the tag gallery — a preview of your library organized into sections like When, Where, Camera, and Albums. Each section shows a random sample of what's inside. ",-1)),m("ul",null,[m("li",null,[h[3]||(h[3]=ve(" Click ",-1)),E(D,{icon:"casino"}),h[4]||(h[4]=ve(" to shuffle and see new samples — embrace the serendipity! ",-1))]),h[13]||(h[13]=m("li",null," Want to see everything? Click the asset count in any section heading to browse all photos and videos in that group, sorted by time. ",-1)),l(i)?R("",!0):(p(),k("li",Tu,[h[5]||(h[5]=ve(" The ",-1)),E(D,{icon:"hamburger"}),h[6]||(h[6]=ve(" in the upper left has library navigation options, search, help, and more. ",-1))])),m("li",null,[h[7]||(h[7]=ve(" The ",-1)),E(D,{icon:"more_vert"}),h[8]||(h[8]=ve(" menu in the upper right has options for the current view — thumbnail layout here, or rotate and organize when viewing a photo ",-1))]),l(d)?(p(),k("li",Eu," Tap any thumbnail to view it full-screen. Swipe to navigate, pinch to zoom, swipe down to return to your gallery. The filmstrip at the bottom lets you scrub through media quickly. ")):(p(),k("li",Ru,[...h[9]||(h[9]=[ve(" Click any thumbnail to view it full-screen. Arrow keys to navigate, scroll wheel to zoom, ",-1),m("kbd",null,"Esc",-1),ve(" to return to your gallery. ",-1),m("kbd",null,"Shift",-1),ve("-scroll on the bottom filmstrip to scrub through media quickly. ",-1)])])),l(d)?R("",!0):(p(),k("li",Lu,[h[10]||(h[10]=ve(" Press ",-1)),h[11]||(h[11]=m("kbd",null,"?",-1)),h[12]||(h[12]=ve(" anytime to see all ",-1)),m("a",{href:"#",onClick:et(v,["prevent"])},"keyboard shortcuts")]))])])])])):R("",!0)]),_:1}))}});function $u(){const e=M(!1);if(typeof window>"u")return e;const t=window.matchMedia("(prefers-reduced-motion: reduce)");e.value=t.matches;const n=s=>{e.value=s.matches};return t.addEventListener("change",n),St(()=>t.removeEventListener("change",n)),e}const Du=120,ho=80,Mu=250;function vo(e){const t=document.querySelector(`[data-asset-id="${e}"]`);if(t==null)return;const n=t.getBoundingClientRect();if(!(n.bottom<0||n.top>window.innerHeight)&&!(n.right<0||n.left>window.innerWidth))return t}function mo(e,t){const n=e.width/t.width,s=e.height/t.height,o=e.left+e.width/2,a=e.top+e.height/2,u=t.left+t.width/2,r=t.top+t.height/2,i=o-u,d=a-r;return`translate(${i}px, ${d}px) scale(${n}, ${s})`}function Nu(e){const t=Du,n=$u();let s;function o(){s!=null&&(s.cancel(),s=void 0)}function a(i,d,v){return o(),new Promise(f=>{const h=setTimeout(f,Mu),c=i.animate(d,{duration:v,easing:"ease-out",fill:"none"});s=c,c.finished.then(()=>{clearTimeout(h),s=void 0,f()},()=>{clearTimeout(h),s=void 0,f()})})}async function u(i,d){if(n.value)return;const v=vo(i);if(v==null)return a(d,[{opacity:0},{opacity:1}],ho);const f=v.getBoundingClientRect(),h=d.getBoundingClientRect(),c=mo(f,h);return a(d,[{transform:c,opacity:.7},{transform:"none",opacity:1}],t)}async function r(i,d){if(n.value)return;const v=vo(i);if(v==null)return a(d,[{opacity:1},{opacity:0}],ho);const f=v.getBoundingClientRect(),h=d.getBoundingClientRect(),c=mo(f,h);return a(d,[{transform:"none",opacity:1},{transform:c,opacity:.7}],t)}return{animateOpen:u,animateClose:r,cancel:o}}function bi(e,t){let n,s=[];const o=(...a)=>{s=a,n!=null&&clearTimeout(n),n=setTimeout(()=>e(...s),t)};return o.reset=()=>{n!=null&&clearTimeout(n),n=void 0},o.now=()=>{o.reset(),e()},o}const po=["resize"],go=["keydown","mousedown","mousemove","touchstart","touchmove","wheel"];class Fu{constructor(t=4e3,n=()=>document.body.classList.remove("idle"),s=()=>document.body.classList.add("idle")){this.idleMs=t,this.activate=n,this.deactivate=s}idleMs;activate;deactivate;paused=!0;active=!0;idleTimer;onActive=()=>{this.scheduleIdle(),!this.active&&(this.active=!0,this.activate())};scheduleIdle(){this.idleTimer!=null&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{if(this.active){if(document.body.classList.contains("modal-shown")){this.scheduleIdle();return}this.active=!1,this.deactivate()}},this.idleMs)}nudge(){this.paused||this.onActive()}resume(){if(this.paused){this.paused=!1;for(const t of po)window.addEventListener(t,this.onActive,{passive:!0});for(const t of go)document.addEventListener(t,this.onActive,{passive:!0});this.onActive()}}pause(){if(!this.paused){this.paused=!0;for(const t of po)window.removeEventListener(t,this.onActive);for(const t of go)document.removeEventListener(t,this.onActive);this.idleTimer!=null&&(clearTimeout(this.idleTimer),this.idleTimer=void 0),this.active||(this.active=!0,this.activate())}}}function vn(e,t=!1){if(!Gt(e))return;t&&(e=-e);const n=Math.round((e%360+360)%360/90)*90;return n===360?0:n}function Wu(e){if(e==null)return!1;const t=vn(e);return t===90||t===270}const cs=3.5*wn,Vu=3,ds=new Map;function yo(e){return He(e,t=>Ca(ds,t.assetId,()=>new Uu(t,"")))}function Hu(){setTimeout(()=>zu(),cs)}async function zu(e){for(const t of ds.values())await t.maybeSave(e);_a(ds,(t,n)=>n.settled())}class Uu{constructor(t,n){this.asset=t,this.search=n}asset;search;_lastTouchedMs=Date.now();_rotation=0;_retries=0;_saving=!1;_failed=!1;_saved=!1;assetId(){return this.asset.assetId}rotation(){return vn(this._rotation)??0}rotationIfSameSearch(t){return t===this.search?this.rotation():0}isSaved(){return this._saved}settled(){return this._saved||this._failed}rotate(t){return this.touch(),this._rotation=vn(this._rotation+t)??0}touch(){this._lastTouchedMs=Date.now()}cssTransform(){return this._rotation===0?"":`transform: rotate(${this._rotation}deg);`}msSinceLastTouch(){return Date.now()-this._lastTouchedMs}toFormData(){const t={};return this._rotation!==0&&(t.rotation=vn(this._rotation)),xa(t)?void 0:t}save(){return this.maybeSave(0)}async maybeSave(t){if(this._saving||this.settled())return;const n=t!=null?Number(t):null;if(this.assetId()===n&&this.msSinceLastTouch()<cs)return;this._saving=!0;const s=this.toFormData();if(s==null)this._saved=!0;else try{await dt("/api/asset/"+this.assetId(),{data:s,method:"PUT"}),this._saved=!0,window.location.pathname==="/asset/"+this.assetId()&&window.location.reload()}catch(o){this._retries++>Vu?(this._failed=!0,console.error("Failed to save asset "+this.assetId(),{formData:s,err:o})):(this.touch(),this.scheduleRetry())}this._saving=!1}async scheduleRetry(){await fa(cs),await this.save()}}function Bu(e,t=" "){return`${e.width}${t}×${t}${e.height}`}function qu(e){return{width:e.height,height:e.width}}function Gu(e,t){return Wu(t)?qu(e):e}const Si=": ",ju=["Error","String","Object","WrappedError"];function Ku(e){return e==null?void 0:[e?.name,e?.constructor?.name].find(t=>t!=null&&!ju.includes(t))?.toString()}function Xu(e){return e==null?void 0:Ta(e?.code)}function wo(e){if(en(e))throw new Error("undefined error");if(e instanceof Error)return e;if(Array.isArray(e)){const t=e[0];return t instanceof Error?(e.length>1&&(t.errors=e.slice(1)),t):new Error(e.map(n=>bt(n)).filter(st).join(", "))}else{const t=Zu(e).replace(/^Error: /i,"");return new Error(t)}}function Yu(...e){const t=[];for(const n of e)n!=null&&(n instanceof Error?t.push(Ku(n),Xu(n),n?.message):t.push(bt(n)));return Ss(Pa(Qa($n(t).map(n=>n.split(Si)))))}function Zu(...e){return Yu(...e).join(Si)}const Qu=250;function zt(e){document.body.classList.add("no-transition"),e(),setTimeout(()=>document.body.classList.remove("no-transition"),Qu)}const qt=3;let dn=null;const Ii="videoAutoplay";function Ju(){const e=localStorage.getItem(Ii);return e!=null?e==="true":ks()}function ec(){return{asset:null,previewAf:null,width:null,height:null,lastClientX:null,lastClientY:null,tx:"",ty:"",scale:null,maxScale:qt,minScale:null,rotation:0,showInfo:!1,showTransitions:!1}}let Ln;function tc(e){Ln=e}function ko(){Ln?.nudge()}const bn=lt("asset",()=>{const e=M(null),t=M(null),n=M(null),s=M(null),o=M(null),a=M(null),u=M(""),r=M(""),i=M(null),d=M(qt),v=M(null),f=M(0),h=M(!1),c=M(!1),g=M(null),C=M(Ju()),F=M(0);let L=0,P=0;function O(){const _=document.getElementById("fullscreen")??document.body,U=getComputedStyle(_);L=parseFloat(U.getPropertyValue("--top-chrome"))||0,P=parseFloat(U.getPropertyValue("--bottom-chrome"))||0}O();function T(){return window.innerWidth-F.value}function q(){return window.innerHeight-L-P}function G(_,U=2){return jn(_*100,U)}function N(_,U=2){return G(_,U)+"%"}function j(){if(i.value==null||n.value==null||s.value==null){u.value=r.value="";return}const _=T(),U=q(),Y=Math.floor(i.value*n.value),ee=Math.floor(i.value*s.value),Q=Math.floor(Y-_),fe=Math.floor(ee-U),be=Math.floor((n.value-Y)/2),Te=Math.floor((s.value-ee)/2),Oe=f.value!==0?.5:An(o.value,$e=>1-Qe(0,1,2*(_-$e)/_-.5),()=>.5),Me=f.value!==0?.5:An(a.value,$e=>1-Qe(0,1,2*(U-$e)/U-.5),()=>.5);u.value=Math.floor((Q<=0?-Q/2:-Oe*Q)-be)+"px",r.value=Math.floor((fe<=0?-fe/2:-Me*fe)-Te)+"px"}function b(_){return _<.39?.75:_<.667?1:(_+qt)/2}const se=A(()=>{if(e.value!=null){if(st(e.value.name))return e.value.name;if(e.value.assetId>0)return"Asset "+e.value.assetId}}),X=A(()=>e.value!=null&&"videoAttrs"in e.value),B=A(()=>e.value!=null&&"imgAttrs"in e.value),K=A(()=>vn(f.value)!==0),ce=A(()=>i.value==null||Ms(i.value,v.value,1/34)),de=A(()=>{if(ce.value||i.value==null||s.value==null)return!0;const _=parseFloat(r.value)||0,U=s.value,Y=i.value,ee=U*Y,Q=q();if(ee<=Q)return!0;const fe=U*(Y-1)/2;return _>=fe-1}),he=A(()=>B.value&&!K.value&&ks()),ue=A(()=>He(i.value,G)),x=A(()=>He(i.value,N)),ie=A(()=>He(v.value,G)),ye=A(()=>He(d.value,G)),Ee=A(()=>T()),z=A(()=>Gn(n.value,i.value,(_,U)=>_*U)),W=A(()=>t.value!=null||Ra(z.value,Ee.value)),te=A(()=>X.value||ce.value&&!K.value),re=A(()=>{const _=te.value;return $n([_?void 0:Fo(u.value,()=>`translate(${u.value}, ${r.value})`),K.value?`rotate(${f.value}deg)`:void 0,_?void 0:He(i.value,U=>`scale(${U})`)]).join(" ")}),Pe=A(()=>{const _={};return!K.value&&c.value&&(_.transition="width 0.5s"),te.value||(_.position="absolute",_.top=0,_.left=0),_.transform=re.value,_}),y=A(()=>{try{if(e.value==null||!B.value)return{};(v.value==null||i.value==null)&&$();const _=e.value.imgAttrs,U=e.value.assetId;if(U==null||_==null)return{};const Y={contain:te.value};let ee;if(he.value){const be=ce.value?"in":"out";Y[`zoom-${be}`]=!0}const Q=Gn(n.value,i.value,(be,Te)=>Math.round(100*be*Te/T())+"vw"),fe={..._,style:Pe.value,class:Y,sizes:Q,width:n.value,height:s.value,title:ee};return t.value?.assetFileId!=null&&(delete fe.srcSet,fe.src=hi({assetId:U,assetFileId:t.value.assetFileId})),fe}catch(_){return Os({text:"Failed to compute image attributes",error:wo(_)}),{}}}),S=A(()=>X.value?{...e.value.videoAttrs,style:Pe.value,autoplay:C.value||void 0}:{});function $(){if(O(),Ye!=null)return;const _=ce.value||v.value==null;n.value=Cn($s(He(t.value,Q=>Q.width),()=>He(e.value,Q=>Q.width))),s.value=Cn($s(He(t.value,Q=>Q.height),()=>He(e.value,Q=>Q.height)));const U=Gu({width:n.value,height:s.value},f.value),Y=T(),ee=q();v.value=Cn(Gn(U.width,U.height,(Q,fe)=>Math.min(Y/Q,ee/fe))),(_||Ea(i.value,v.value)||f.value!==0)&&(i.value=v.value),te.value?j():V()}function V(){if(i.value==null||n.value==null||s.value==null)return;const _=parseFloat(u.value)||0,U=parseFloat(r.value)||0,Y=n.value,ee=s.value,Q=i.value,fe=T(),be=q();u.value=Math.floor(Xe(_,Y,Q,fe))+"px",r.value=Math.floor(Ie(U,ee,Q,be))+"px",tt()}function oe(_){if(_==null||_.assetId==null){ge();return}e.value=_,f.value=An(yo(e.value),U=>U.rotation(),()=>0),es()||(i.value=null),t.value=null,$()}function ge(){nt(),dn=null;const _=ec();e.value=_.asset,t.value=_.previewAf,n.value=_.width,s.value=_.height,o.value=_.lastClientX,a.value=_.lastClientY,u.value=_.tx,r.value=_.ty,i.value=_.scale,d.value=_.maxScale,v.value=_.minScale,f.value=_.rotation,h.value=_.showInfo,c.value=_.showTransitions,g.value=null}function le(_){t.value=Cn(Pn(t.value,_)?void 0:_),es()||(i.value=null),$()}function ae(_){es()||_==null||e.value==null||(o.value=_.clientX,a.value=_.clientY,j())}function ke(_){const U=v.value;U!=null&&zt(()=>{i.value=jn(Qe(U,qt,_),3),j()})}function Xe(_,U,Y,ee){if(U*Y<=ee)return(ee-U)/2;const fe=U*(Y-1)/2,be=ee-U*(1+Y)/2;return Math.max(be,Math.min(fe,_))}function Ie(_,U,Y,ee){if(U*Y<=ee)return(ee-U)/2;const fe=U*(Y-1)/2,be=ee-U*(1+Y)/2;return Math.max(be,Math.min(fe,_))}function tt(){if(i.value==null||n.value==null||s.value==null)return;const _=T(),U=q(),Y=i.value*n.value,ee=i.value*s.value,Q=Y-_,fe=ee-U,be=(n.value-Y)/2,Te=(s.value-ee)/2,Oe=parseFloat(u.value)||0,Me=parseFloat(r.value)||0;if(Q>0){const $e=Qe(0,1,-(Oe+be)/Q);o.value=($e+.5)*_/2}else o.value=_/2;if(fe>0){const $e=Qe(0,1,-(Me+Te)/fe);a.value=($e+.5)*U/2}else a.value=U/2}function qe(_,U){if(nt(),i.value==null||n.value==null||s.value==null)return;const Y=i.value,ee=n.value,Q=s.value,fe=T(),be=q(),Te=te.value?(fe-ee)/2:parseFloat(u.value)||0,Oe=te.value?(be-Q)/2:parseFloat(r.value)||0;dn={focalIx:(_-Te-ee/2)/Y+ee/2,focalIy:(U-Oe-Q/2)/Y+Q/2,initialScale:Y}}function nn(_,U,Y){if(dn==null||n.value==null||s.value==null)return;const ee=v.value;if(ee==null)return;const{initialScale:Q,focalIx:fe,focalIy:be}=dn,Te=n.value,Oe=s.value,Me=jn(Qe(ee,qt,Q*_),3),$e=T(),pt=q(),gt=U-(fe-Te/2)*Me-Te/2,on=Y-(be-Oe/2)*Me-Oe/2;zt(()=>{i.value=Me,u.value=Math.floor(Xe(gt,Te,Me,$e))+"px",r.value=Math.floor(Ie(on,Oe,Me,pt))+"px"})}function Lt(){dn=null,i.value!=null&&v.value!=null&&Ms(i.value,v.value,.1)?(i.value=v.value,j()):tt()}function Ot(_,U){if(i.value==null||n.value==null||s.value==null)return;const Y=parseFloat(u.value)||0,ee=parseFloat(r.value)||0,Q=T(),fe=q();zt(()=>{u.value=Math.floor(Xe(Y+_,n.value,i.value,Q))+"px",r.value=Math.floor(Ie(ee+U,s.value,i.value,fe))+"px"}),tt()}let Ye=null;function nt(){Ye!=null&&(cancelAnimationFrame(Ye),Ye=null)}function at(_,U){if(!B.value||i.value==null||n.value==null||s.value==null||v.value==null)return;nt();const Y=n.value,ee=s.value,Q=T(),fe=q(),be=v.value,Te=i.value,Oe=te.value?(Q-Y)/2:parseFloat(u.value)||0,Me=te.value?(fe-ee)/2:parseFloat(r.value)||0;let $e,pt,gt;if(ce.value){$e=Qe(be,qt,Math.max(be*2,Q/Y,fe/ee));const an=(_-Oe-Y/2)/Te+Y/2,Nt=(U-Me-ee/2)/Te+ee/2;pt=Xe(_-(an-Y/2)*$e-Y/2,Y,$e,Q),gt=Ie(U-(Nt-ee/2)*$e-ee/2,ee,$e,fe)}else $e=be,pt=(Q-Y)/2,gt=(fe-ee)/2;te.value&&zt(()=>{i.value=Te+1e-4,u.value=Math.floor(Oe)+"px",r.value=Math.floor(Me)+"px"});const on=250,Wn=performance.now();function Sn(an){const Nt=Math.min(1,(an-Wn)/on),ln=1-Math.pow(1-Nt,3),Vn=Te+($e-Te)*ln,Hn=Oe+(pt-Oe)*ln,zn=Me+(gt-Me)*ln;zt(()=>{i.value=Vn,u.value=Math.floor(Hn)+"px",r.value=Math.floor(zn)+"px"}),Nt<1?Ye=requestAnimationFrame(Sn):(Ye=null,zt(()=>{i.value=$e,u.value=Math.floor(pt)+"px",r.value=Math.floor(gt)+"px"}),tt())}Ye=requestAnimationFrame(Sn)}function At(){he.value&&v.value!=null&&ke(ce.value?b(v.value):v.value)}function rt(){i.value!=null&&ke(i.value*11/10)}function $t(){i.value!=null&&ke(i.value*9/10)}function mt(_){_==null||e.value==null||i.value==null||!_.shiftKey||f.value!==0||ke(i.value*(_.deltaY>0?31:33)/32)}function Dt(_){f.value===0&&(i.value=null),f.value=An(yo(e.value),U=>U.rotate(_),()=>0),$(),Hu()}function Mt(){nt(),i.value=null,$()}function sn(_){c.value=!0,h.value=_,_?(Ln?.pause(),$()):(Ln?.resume(),$()),setTimeout(()=>{c.value=!1},1e3)}function w(_){F.value!==_&&(F.value=_,$())}function J(_){c.value=_}function me(){const _=!C.value;localStorage.setItem(Ii,String(_)),C.value=_}async function Le(_){const U=e.value,Y=U?.assetId,ee={...U};oe({...U,..._});try{const Q=await nc(Y,_);if(Q?.assetId===Y)e.value?.assetId===Y&&oe({...U,...Q});else throw new Error("Unexpected server result")}catch(Q){e.value?.assetId===Y&&oe(ee),Os({text:"Failed to save asset",error:wo(Q)})}}return{asset:e,previewAf:t,width:n,height:s,lastClientX:o,lastClientY:a,tx:u,ty:r,scale:i,maxScale:d,minScale:v,rotation:f,showInfo:h,showTransitions:c,previewAssetId:g,videoAutoplay:C,description:se,isVideo:X,isImage:B,isRotated:K,isMinScale:ce,canDismissDown:de,showZoom:he,scalePct:ue,scalePercent:x,minScalePct:ie,maxScalePct:ye,assetWindowWidth:Ee,assetDisplayWidth:z,showActual:W,isContainClass:te,styleTransform:re,style:Pe,imgAttrs:y,videoAttrs:S,handleResize:$,setAsset:oe,resetAsset:ge,setPreviewAf:le,onMouseMove:ae,setScale:ke,toggleZoom:At,onZoomIn:rt,onZoomOut:$t,onWheel:mt,addToRotation:Dt,resetZoom:Mt,setShowInfo:sn,setInfoPanelWidth:w,setTransitions:J,toggleVideoAutoplay:me,recomputeTranslations:j,beginPinch:qe,updatePinch:nn,endPinch:Lt,panBy:Ot,doubleTapZoom:at,save:Le}});async function nc(e,t){if(e==null||e<=0)throw new Error("saveAsset(): missing asset id");return dt("/api/asset/"+e,{data:t,method:"PUT"})}const Ts=lt("fullscreen",()=>{const e=M(Fs());Is(o=>{e.value=o});function n(o){e.value=o??Fs()}function s(){Ma()}return{fullscreen:e,setFullscreen:n,toggle:s}}),Ai=vt("aspect","square"),Be=vt("s","m","l"),sc=80;function _h(e,t){const n={};return La(t.offset,s=>n.offset=s.toString()),Et(`/api/t/${e}/assets`,n)}function Ph(e,t){const n={};return ft(t.seed)&&(n.seed=t.seed.toString()),ft(t.limit)&&(n.limit=t.limit.toString()),ft(t.offset)&&(n.offset=t.offset.toString()),ft(t.tc)&&(n.tc=t.tc.toString()),Et(`/api/t/${e}/child-tags`,n)}const xe=vt("When","Who","Where","What","Event","Camera","Lens","Albums","Keywords","Type","fs"),oc=[xe.When,xe.Camera,xe.Lens,xe.Type,xe.fs];function ic(e){if(e==null)return!1;const t=Oa(e)?e:e.tagPath?.[0];return!oc.includes(t)}const bo=4;function ss(){return window.matchMedia("(max-width: 720px)").matches}function Ci(e){switch(Be.toValid(e)??"m"){case Be.s:return ss()?60:80;case Be.l:return ss()?240:320;case Be.m:default:return ss()?120:160}}function ac(e){switch(Be.toValid(e)??"m"){case Be.s:return 100;case Be.l:return 480;case Be.m:default:return 200}}function lc(){const e=document.body.classList.contains("nav-pinned")?mi:0;return document.documentElement.clientWidth-e}function fs(e){return Qe(1,85,Math.floor((lc()+bo)/(Ci(e)+bo)))}function _t(e){return Math.floor(sc/fs(e))}function xi(e){return Qe(1,_t(e),Math.ceil(document.documentElement.clientHeight/Ci(e)))}function rc(){return Ai.toValid(localStorage.getItem("thumbFit"))??"square"}function hs(){return Be.toValid(localStorage.getItem("thumbSize"))??"m"}function So(e=hs()){return Qe(1,_t(e),Vo(localStorage.getItem("thumbRows-"+e))??xi(e))}function Io(e,t){Be.includes(e)&&ft(t)&&localStorage.setItem("thumbRows-"+e,t.toString())}const _i=lt("thumb",()=>{const e=M(rc()),t=M(So()),n=M(hs()),s=M(fs(hs())),o=A(()=>n.value==="s"?"sq_x4":n.value==="m"?"sq_x3":"sq_x2"),a=A(()=>Qe(1,_t(n.value),t.value??xi(n.value))),u=A(()=>a.value<=1),r=A(()=>a.value>=_t(n.value)),i=A(()=>_t(n.value));function d(){const P=((Be.indexOf(n.value)??0)+1)%Be.values.length;c(Be.values[P])}function v(L){const O=(Be.indexOf(n.value)??0)+L;O>=0&&O<Be.values.length&&c(Be.values[O])}function f(){s.value=fs(n.value)}function h(L){const P=Ai.toValid(L)??"square";localStorage.setItem("thumbFit",P),e.value=P}function c(L){const P=Be.toValid(L)??"m";localStorage.setItem("thumbSize",P),n.value=P,t.value=So(P),setTimeout(lr,10),f()}function g(L=1){const P=_t(n.value);t.value=Qe(1,P,a.value+L),Io(n.value,t.value)}function C(){g(-1)}function F(L){const P=_t(n.value);t.value=Qe(1,P,L),Io(n.value,t.value)}return{thumbFit:e,thumbRows:t,thumbSize:n,thumbCols:s,thumbIcon:o,actualThumbRows:a,disableDecrRows:u,disableIncrRows:r,maxThumbRows:i,cycleSize:d,zoomSize:v,handleResize:f,setThumbFit:h,setThumbSize:c,incrRows:g,decrRows:C,setThumbRows:F}});function uc(e){const t=ac(e);return[t,t*2]}function cc(e){return He(e?.afterAssetId,t=>{const n=pe(t);return n!=null?{assetId:n,from:"prev",priorAssetId:e.assetId}:void 0})}function dc(e){return He(e?.beforeAssetId,t=>{const n=pe(t);return n!=null?{assetId:n,from:"next",priorAssetId:e.assetId}:void 0})}const On=" / ",fc={"liked:true":{icon:"favorite",label:"Liked"},"archived:true":{icon:"archive",label:"Archived"},"removed:true":{icon:"library_remove",label:"Removed"},"trashed:true":{icon:"trash",label:"Trash"}},Ao=20;function hc(e,t){const n=e.tagPath[0],s=t.find(a=>a.name===n),o=e.displayPath;return{icon:s?.icon??"folder",label:Pi(o).join(On),tooltip:o.join(On),tagPath:e.tagPath,displayPath:o}}function vc(e,t){if(e!=null){if(e.startsWith("tagId:"))return{icon:"folder",label:"…"};if(e.startsWith("tag:")){const n=e.slice(4).split("/"),s=n[0];return s===xe.When?void 0:{icon:t.find(a=>a.name===s)?.icon??"folder",label:Pi(n).join(On),tooltip:n.join(On),tagPath:n,displayPath:n}}if(e.startsWith("search:")){const n=e.slice(7),s=fc[n];return s??{icon:"search",label:n.length>Ao?n.slice(0,Ao)+"…":n}}}}function Pi(e){return e.length<=3?e:[e[0],"…",...e.slice(-2)]}function Ti(e,t){if(e.label!=null)return t;if(e.tags.length===1){const n=e.tags[0];if(n.tagPath[0]!==xe.When)return"tagId:"+n.tagId}}function Ei(e,t){const n=e.querySelector(t);n?.scrollIntoView({inline:"center",block:"nearest",behavior:"instant"})}function mc(e,t,n){function s(){const o=e.value;o==null||n?.suppressScroll?.()||requestAnimationFrame(()=>{n?.onBeforeScroll?.(),Ei(o,n?.targetSelector?.()??".is-active"),n?.onScrolled?.(),requestAnimationFrame(()=>{n?.onAfterScroll?.()})})}return{onMounted:()=>{Je(s)},onTrackChange:()=>{Je(s)},trackRef:t}}function pc(e){for(const t of e)Ei(t,".is-active")}const Es=lt("assetSequence",()=>{const e=M([]),t=M(),n=M();let s=!1,o=!1,a=!1,u=!1;function r(N){return N==null?-1:e.value.findIndex(j=>pe(j)===N)}const i=A(()=>r(t.value)),d=A(()=>i.value>=0&&i.value<e.value.length?e.value[i.value]:void 0),v=A(()=>e.value.length>0&&(i.value>0||!s)),f=A(()=>e.value.length>0&&(i.value<e.value.length-1||!o));function h(N=1){const j=i.value;if(j<0)return;const b=j-N;return b>=0?e.value[b]:void 0}function c(N=1){const j=i.value;if(j<0)return;const b=j+N;return b<e.value.length?e.value[b]:void 0}function g(N){return t.value=N,r(N)!==-1}function C(N){const j=r(N);return j===-1?{}:{left:j>0?e.value[j-1]:void 0,right:j<e.value.length-1?e.value[j+1]:void 0}}function F(N){return r(N)!==-1}function L(N,j,b){const se=pe(j),X=typeof j=="object"&&"capturedAtLocal"in j?j:{assetId:se,capturedAtLocal:0};e.value=[...N.assetIdsAfter,X,...N.assetIdsBefore],t.value=se,n.value=b,s=N.assetIdsAfter.length===0,o=N.assetIdsBefore.length===0,a=!1,u=!1}function P(){const N=window.innerWidth>=768?34:26;return Math.ceil(window.innerWidth/N*2)}async function O(N){const j=e.value;if(j.length===0)return;if(N==="left"){if(a||s)return}else if(u||o)return;const b=pe(N==="left"?j[0]:j[j.length-1]);if(!(b==null||b<=0)){N==="left"?a=!0:u=!0;try{const se=new URLSearchParams({count:"1",limit:String(P())});n.value!=null&&se.set("context",n.value);const B=(await dt(`/api/asset/${b}/streams?${se}`))?.assetStreams?.[0];if(B==null)return;const K=new Set(j.map(ce=>pe(ce)));if(N==="left"){const ce=B.assetIdsAfter.filter(de=>!K.has(pe(de)));if(ce.length===0){s=!0;return}e.value=[...ce,...j]}else{const ce=B.assetIdsBefore.filter(de=>!K.has(pe(de)));if(ce.length===0){o=!0;return}e.value=[...j,...ce]}}finally{N==="left"?a=!1:u=!1}}}async function T(N){const b=i.value;if(!(N==="left"&&b>3)&&!(N==="right"&&e.value.length-1-b>3))return O(N)}async function q(N){return O(N)}function G(){e.value=[],t.value=void 0,n.value=void 0,s=!1,o=!1,a=!1,u=!1}return{ids:e,currentIndex:i,currentId:d,context:n,hasLeft:v,hasRight:f,peekLeft:h,peekRight:c,setCurrent:g,neighborsOf:C,contains:F,seed:L,extendIfNeeded:T,extendForScroll:q,reset:G}}),gc={key:0,class:"thumb transparent",src:"/images/clear-64.png"},yc=["href","data-asset-id"],wc={key:0,class:"duration"},Ri=Ue({__name:"AssetThumb",props:{id:{},aClass:{},imgClass:{},lazy:{type:Boolean},replace:{type:Boolean},context:{}},setup(e){const t=e,n=_i(),{thumbSize:s,thumbFit:o}=ze(n),a=it(),u=A(()=>!ft(pe(t.id))),r=A(()=>o.value==="square"),i=A(()=>r.value?Mr({assetId:t.id,lazyLoad:t.lazy,size:s.value}):vi({assetId:t.id,lazyLoad:t.lazy,widths:uc(s.value),reducer:"fit"})),d=A(()=>Dr({assetId:t.id,context:t.context}));function v(){const f=pe(t.id);f!=null&&(t.replace&&a.isOpen?a.navigateToAsset({assetId:f,...t.context!=null?{context:t.context}:{clearContext:!0}}):a.open({assetId:f,context:t.context}))}return(f,h)=>u.value?(p(),k("img",gc)):d.value.href?(p(),k("a",{key:1,href:d.value.href,class:_e(e.aClass),"data-asset-id":l(pe)(e.id),onClick:et(v,["prevent"])},[m("img",_n({class:["thumb",e.imgClass,l(o)]},i.value),null,16),e.id.durationHMS?(p(),k("span",wc,Z(e.id.durationHMS),1)):R("",!0)],10,yc)):R("",!0)}}),kc=Ue({__name:"AssetFilmstrip",props:{stream:{},assetId:{},context:{}},emits:["preview","scrubNavigate"],setup(e,{emit:t}){const n=e,s=t,o=it(),a=Es();let u=null;const r=M(null),i=A(()=>Ti(n.stream,n.context));let d,v=0,f;Ae(()=>a.ids,async W=>{const te=r.value,re=a.context;if(te==null||v===0){v=W.length,d=W.length>0?pe(W[0]):void 0,f=re,te!=null&&W.length>0&&(await Je(),O.onTrackChange());return}const Pe=W.length-v,y=W.length>0?pe(W[0]):void 0,S=re!==f,$=d;if(v=W.length,d=y,f=re,S)await Je(),await Je(),requestAnimationFrame(()=>{const V=`[data-asset-id="${pe(n.assetId)}"]`,oe=te.querySelector(V);oe!=null&&(P=!0,oe.scrollIntoView({inline:"center",block:"nearest",behavior:"instant"}),F(),requestAnimationFrame(()=>{P=!1}))});else if(Pe>0&&y!==$){const V=te.scrollLeft,oe=te.scrollWidth;await Je();const ge=te.scrollWidth-oe;ge>0&&(te.scrollLeft=V+ge),C()}});let h=null;function c(){const W=r.value;if(W==null)return null;const te=W.getBoundingClientRect(),re=window.innerWidth/2,Pe=te.top+te.height/2;return document.elementFromPoint(re,Pe)?.closest("[data-asset-id]")??null}function g(W){W!==h&&(h?.classList.remove("is-center"),h=W,h?.classList.add("is-center"))}function C(){g(c())}function F(){const W=r.value;if(W==null)return;const te=W.querySelector(`[data-asset-id="${pe(n.assetId)}"]`);g(te)}let L=!1,P=!1;const O=mc(r,()=>n.assetId,{suppressScroll:()=>L,targetSelector:()=>`[data-asset-id="${pe(n.assetId)}"]`,onScrolled:F,onBeforeScroll:()=>{P=!0},onAfterScroll:()=>{P=!1}});gn(O.onMounted),Ae(()=>n.assetId,()=>{L=!1,ue!=null&&(clearTimeout(ue),ue=null),O.onTrackChange()});function T(){const W=r.value;if(W==null)return;const te=200;W.scrollLeft<te&&a.extendForScroll("left"),W.scrollWidth-W.scrollLeft-W.clientWidth<te&&a.extendForScroll("right")}let q=!1;function G(W){if(q)return;const te=W.target.closest("[data-asset-id]");if(te==null)return;const re=Number(te.dataset.assetId);if(!(!Number.isFinite(re)||re<=0||re===pe(n.assetId))){if(u===-1){u=re;return}u!==re&&(u=null,s("preview",re))}}function N(){u=null,!q&&s("preview",null)}function j(){u=-1,X=null,ue!=null&&(clearTimeout(ue),ue=null),o.setSkipNextDissolve()}let b=0,se=0,X=null,B=!1,K=null;function ce(){const W=c();if(W==null)return null;const te=Number(W.dataset.assetId);return Number.isFinite(te)&&te>0?te:null}function de(W){if(W.button!==0||W.pointerType==="touch")return;b=W.clientX,se=W.clientX,q=!1,X=null;function te(y){if(!q){if(Math.abs(y.clientX-b)<8)return;q=!0}const S=r.value;S!=null&&(S.scrollLeft-=y.clientX-se),se=y.clientX,C();const $=ce();$!=null&&$!==X&&(X=$,s("preview",$)),y.preventDefault()}function re(){Pe();const y=q&&X!=null,S=!q;y&&(B=!0,s("scrubNavigate",X)),q=!1,X=null,!y&&!S&&s("preview",null)}function Pe(){window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",re),window.removeEventListener("pointercancel",re),K=null}window.addEventListener("pointermove",te,{passive:!1}),window.addEventListener("pointerup",re),window.addEventListener("pointercancel",re),K=Pe}let he=!1,ue=null;function x(){L=!0,he=!0,ue!=null&&(clearTimeout(ue),ue=null)}function ie(){he=!1,ue!=null&&clearTimeout(ue),ue=setTimeout(Ee,150)}function ye(){if(T(),C(),q||P)return;const W=ce();W!=null&&W!==X&&(X=W,s("preview",W)),ue!=null&&clearTimeout(ue),he||(ue=setTimeout(Ee,150))}function Ee(){ue=null,L=!1;const W=X;X=null,W!=null&&W!==pe(n.assetId)?s("scrubNavigate",W):s("preview",null)}function z(W){B&&(W.stopPropagation(),W.preventDefault(),B=!1)}return St(()=>{K?.(),ue!=null&&clearTimeout(ue)}),(W,te)=>(p(),k("div",{class:"filmstrip hide-on-idle",onPointerdown:de,onClickCapture:z},[m("div",{class:"thumb-strip",ref_key:"stripRef",ref:r,onMouseover:G,onMouseleave:N,onClick:j,onTouchstartPassive:x,onTouchendPassive:ie,onTouchcancelPassive:ie,onScrollPassive:ye},[(p(!0),k(Ce,null,Fe(l(a).ids,re=>(p(),Se(Ri,{id:re,key:"f:"+l(pe)(re),lazy:!1,replace:!0,context:i.value},null,8,["id","context"]))),128))],544)],32))}});function Li(){const e=bn(),t=tn(),n=Qt(),{asset:s,description:o}=ze(e),{lite:a}=ze(t),u=A(()=>s.value?.liked===!0),r=A(()=>s.value?.hidden===!0),i=A(()=>s.value?.excluded===!0),d=A(()=>s.value?.deleted===!0),v=A(()=>a.value?`
|
|
10
|
+
`+yi:"");function f(){return a.value?(n.show({text:"This is a PhotoStructure Plus feature",type:"info"}),!1):!0}function h(P){if(f())return e.save(P)}async function c(P,O){if(!f())return;const T=s.value;if(T==null)return;const q=T[P],G={};G[P]=!q,await e.save(G),q!==!0&&n.show({text:O,type:"success",timeout:5e3})}function g(){return h({liked:!u.value})}function C(){return c("hidden",`${o.value} added to archive.`)}function F(){return c("excluded",`${o.value} marked for removal.`)}function L(){return c("deleted",`${o.value} marked for deletion.`)}return{liked:u,hidden:r,excluded:i,deleted:d,plusOnly:v,requirePlus:f,saveAssetViaStore:h,toggleAssetField:c,toggleLiked:g,toggleArchived:C,toggleExcluded:F,toggleDeleted:L}}const bc=window.matchMedia("(display-mode: standalone)");function Sc(){const e=Ts();return A(()=>As()||e.fullscreen||bc.matches)}function Nn(){return typeof globalThis.navigator?.share=="function"}function Oi(){return typeof globalThis.navigator?.clipboard?.write=="function"}function vs(){return Nn()||Oi()}function ms(){return Nn()?Ba()?"share_ios":"share":"content_copy"}function En(){return Nn()?"Share this photo":"Copy image to clipboard"}async function Co(e){const t="/img/"+e+"/fit/2000",n=await fetch(t),s=await n.blob(),o=n.headers.get("X-basename")??"image.jpg";return{blob:s,filename:o}}async function $i(e){if(Nn()){try{const{blob:t,filename:n}=await Co(e),s=new File([t],n,{type:t.type});await navigator.share({files:[s]})}catch(t){if(t instanceof DOMException&&t.name==="AbortError")throw t;await navigator.share({title:"Photo",url:window.location.href})}return}if(Oi()){const t=Co(e).then(({blob:n})=>n.type==="image/png"?n:Ic(n));return await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),"Image copied to clipboard"}throw new Error("No share or copy mechanism available")}async function Ic(e){const t=await createImageBitmap(e),n=new OffscreenCanvas(t.width,t.height);return n.getContext("2d").drawImage(t,0,0),t.close(),n.convertToBlob({type:"image/png"})}const Ac=["title"],Cc=Ue({__name:"FullscreenButton",setup(e){const t=Ts(),{fullscreen:n}=ze(t),{toggle:s}=t;return(o,a)=>l(Na)?(p(),k("button",{key:0,title:l(n)?"Exit full screen":"Full screen",class:"vicon no-drag hide-on-m","data-key":"f",onClick:a[0]||(a[0]=(...u)=>l(s)&&l(s)(...u))},[E(D,{icon:l(n)?"fullscreen_exit":"fullscreen"},null,8,["icon"])],8,Ac)):R("",!0)}}),xc=["data-key5"],_c=Ue({__name:"HeaderBackButton",props:{icon:{default:"arrow_upward"},to:{}},setup(e){const t=e,n=kn(),s=jo(),o=it(),a=A(()=>({vicon:!0,back:!0,"hide-on-s":!0})),u=A(()=>!o.isOpen);function r(){s.push(t.to??yr(n.path,n.query))}return(i,d)=>(p(),k("button",{title:"Navigate to parent",class:_e(a.value),"data-key5":u.value?"esc":void 0,onClick:r},[E(D,{icon:e.icon},null,8,["icon"])],10,xc))}}),Pc=["title"],Tc=Ue({__name:"NavMenuButton",setup(e){const t=Ps(),{toggle:n}=t,{pinned:s,sidebarLabel:o}=ze(t),{healthLevel:a}=ze(tn());return(u,r)=>Ge((p(),k("button",{title:l(o),class:"vicon nav-menu-btn",onClick:r[0]||(r[0]=et((...i)=>l(n)&&l(n)(...i),["stop"])),"data-key":"m"},[E(D,{icon:"hamburger"}),l(a)!=null?(p(),k("span",{key:0,class:_e(["health-dot",l(a)])},null,2)):R("",!0)],8,Pc)),[[Ze,!l(s)]])}}),Ec={class:"hide-on-idle asset-header left-fill-right nav-aware"},Rc={class:"left"},Lc={class:"crumb no-drag asset-meta-links hide-on-l-info"},Oc={key:0,class:"link preview-date"},$c={key:0,class:"meta-sep hide-on-s"},Dc={class:"right"},Mc={class:"crumb hide-on-m hide-on-l-info"},Nc=["title"],Fc=["href","title","download"],Wc=["title"],Vc=["title","data-state"],Hc=["title","data-state"],zc=["title","data-state"],Uc=["title"],Bc=["title"],qc=["href","title","download"],Gc={class:"description"},jc=["title"],Kc=["title"],Xc={key:0,class:"details hide-on-s"},Yc=["title"],Zc={key:0,class:"details hide-on-s"},Qc=["title"],Jc={key:0,class:"details hide-on-s"},ed=["title"],td=["title"],nd=Ue({__name:"AssetHeader",props:{showStreams:{type:Boolean}},emits:["resync","toggleStreams"],setup(e,{emit:t}){const n=e,s=t,o=it(),a=bn(),u=Es(),r=Qt(),{overlayDepth:i,hasForwardOverlay:d}=ze(o),v=Sc();function f(){o.close("back")}function h(){history.back()}function c(){history.forward()}const{asset:g,previewAssetId:C,showInfo:F,isVideo:L,videoAutoplay:P,scalePercent:O}=ze(a),T=A(()=>C.value!=null),q=A(()=>{const y=C.value;if(y==null)return;const S=u.ids.find($=>pe($)===y);if(!(S==null||typeof S!="object"||!("capturedAtLocal"in S)))return No(S.capturedAtLocal)}),{liked:G,hidden:N,excluded:j,deleted:b,plusOnly:se,toggleLiked:X,toggleArchived:B,toggleExcluded:K,toggleDeleted:ce}=Li(),de=A(()=>He(g.value?.whenTag,y=>pn(y.tagPath))),he=A(()=>He(g.value?.whereTag,y=>pn(y.tagPath))),ue=A(()=>g.value?.whereTag?.displayPath.at(-1)??"");function x(y){a.addToRotation(y?.shiftKey===!0?90:-90)}function ie(){a.addToRotation(90)}function ye(){a.onZoomIn()}function Ee(){a.onZoomOut()}const z=X,W=B,te=K,re=ce;async function Pe(){const y=g.value?.assetId;if(y!=null)try{const S=await $i(y);S!=null&&r.show({type:"success",text:S,timeout:3e3})}catch(S){if(S instanceof DOMException&&S.name==="AbortError")return;r.show({type:"error",text:"Failed to share",details:S instanceof Error?S.message:String(S)})}}return(y,S)=>{const $=yn("router-link");return p(),k("header",Ec,[m("div",Rc,[l(o).isOpen?R("",!0):(p(),Se(Tc,{key:0})),l(o).isOpen?(p(),k("button",{key:1,class:"vicon back",title:"Close","data-key":"esc","data-key2":"backspace",onClick:f},[E(D,{icon:"close"})])):R("",!0),l(o).isOpen&&l(v)&&l(i)>1?(p(),k("button",{key:2,class:"vicon",title:"Previous asset (Alt+←)",onClick:h},[E(D,{icon:"navigate_before"})])):R("",!0),l(o).isOpen&&l(v)&&l(d)?(p(),k("button",{key:3,class:"vicon",title:"Next asset (Alt+→)",onClick:c},[E(D,{icon:"navigate_next"})])):R("",!0),l(o).isOpen?R("",!0):(p(),Se(_c,{key:4}))]),m("div",Lc,[T.value&&q.value?(p(),k("span",Oc,Z(q.value),1)):de.value?(p(),Se($,{key:1,class:"link",to:de.value,replace:!0,title:"View assets from "+l(g)?.capturedAtLocale},{default:Re(()=>[ve(Z(l(g)?.capturedAtLocale),1)]),_:1},8,["to","title"])):R("",!0),T.value?R("",!0):(p(),k(Ce,{key:2},[de.value&&he.value?(p(),k("span",$c,"|")):R("",!0),he.value?(p(),Se($,{key:1,class:"link hide-on-s",to:he.value,replace:!0,title:"View assets from "+ue.value},{default:Re(()=>[ve(Z(ue.value),1)]),_:1},8,["to","title"])):R("",!0)],64))]),m("div",Dc,[l(L)?R("",!0):(p(),k(Ce,{key:0},[m("a",{title:"Zoom out",class:"vicon hide-on-m","data-key":"-","data-key2":"_",onClick:Ee},[E(D,{icon:"loupe_minus"})]),m("div",Mc,Z(l(O)),1),m("a",{title:"Zoom in",class:"vicon hide-on-m","data-key":"+","data-key2":"=",onClick:ye},[E(D,{icon:"loupe"})])],64)),E(Cc),l(vs)()?(p(),k("a",{key:1,class:"vicon hide-on-s hide-on-l-info hide-on-touch",onClick:Pe,title:l(En)()},[E(D,{icon:l(ms)()},null,8,["icon"])],8,Nc)):R("",!0),l(g)?.downloadable?(p(),k("a",{key:2,class:"vicon hide-on-s hide-on-l-info hide-on-touch",href:l(g).downloadable.href,title:l(g).downloadable.title,download:l(g).downloadable.basename},[E(D,{icon:"download"})],8,Fc)):R("",!0),m("a",{title:(l(G)?"Unlike":"Like")+l(se),class:"vicon hide-on-s hide-on-l-info hide-on-touch","data-key":"*","data-key2":"l",onClick:S[0]||(S[0]=(...V)=>l(z)&&l(z)(...V))},[E(D,{icon:l(G)?"favorite":"favorite_border"},null,8,["icon"])],8,Wc),m("a",{title:"Rotate 90° counter-clockwise",class:"vicon hide-on-m hide-on-l-info","data-key":"r",onClick:x},[E(D,{icon:"rotate_left"})]),m("a",{title:(l(N)?"Unarchive":"Archive")+l(se),class:"vicon hide-on-m hide-on-l-info hide-on-touch","data-key":"A",id:"asset-header-hidden","data-state":l(N)?"hidden":"not-hidden",onClick:S[1]||(S[1]=(...V)=>l(W)&&l(W)(...V))},[E(D,{icon:l(N)?"unarchive":"archive"},null,8,["icon"])],8,Vc),l(Vs)()?(p(),k("a",{key:3,title:(l(j)?"Don't remove from library":"Remove from library")+l(se),class:"vicon hide-on-l hide-on-l-info hide-on-touch","data-key":"R",id:"asset-header-excluded","data-state":l(j)?"excluded":"not-excluded",onClick:S[2]||(S[2]=(...V)=>l(te)&&l(te)(...V))},[E(D,{icon:l(j)?"library_add_filled":"library_remove"},null,8,["icon"])],8,Hc)):R("",!0),l(is)()?(p(),k("a",{key:4,title:(l(b)?"Restore from trash":"Delete")+l(se),class:"vicon hide-on-m hide-on-l-info hide-on-touch","data-key":"#","data-key2":"T",id:"asset-header-deleted","data-state":l(b)?"deleted":"not-deleted",onClick:S[3]||(S[3]=(...V)=>l(re)&&l(re)(...V))},[E(D,{icon:l(b)?"trash_restore":"trash"},null,8,["icon"])],8,zc)):R("",!0),l(L)&&l(ks)()?(p(),k("a",{key:5,title:l(P)?"Disable autoplay":"Enable autoplay",class:"vicon","data-key":"P",onClick:S[4]||(S[4]=V=>l(a).toggleVideoAutoplay())},[E(D,{icon:l(P)?"autopause":"autoplay"},null,8,["icon"])],8,Uc)):R("",!0),E(bs,{class:"a-op",title:"Asset operations",icon:"more_vert","active-icon":"expand_more"},{dropdown:Re(()=>[l(vs)()?(p(),k("a",{key:0,onClick:Pe,title:l(En)()},[E(D,{icon:l(ms)()},null,8,["icon"]),m("span",null,Z(l(En)()),1)],8,Bc)):R("",!0),l(g)?.downloadable?(p(),k("a",{key:1,href:l(g).downloadable.href,title:l(g).downloadable.title,download:l(g).downloadable.basename},[E(D,{icon:"download"}),m("span",Gc,Z(l(g).downloadable.description),1)],8,qc)):R("",!0),m("a",{title:(l(G)?"Unlike":"Like")+l(se),onClick:S[5]||(S[5]=(...V)=>l(z)&&l(z)(...V))},[E(D,{icon:l(G)?"favorite":"favorite_border"},null,8,["icon"]),m("span",null,Z(l(G)?"Unlike":"Like"),1)],8,jc),m("a",{title:"Rotate 90° counter-clockwise",onClick:x},[E(D,{icon:"rotate_left"}),S[14]||(S[14]=m("span",null,"Rotate 90° left",-1))]),m("a",{title:"Rotate 90° clockwise",onClick:ie},[E(D,{icon:"rotate_right"}),S[15]||(S[15]=m("span",null,"Rotate 90° right",-1))]),m("a",{title:"Re-import all the files for this asset",onClick:S[6]||(S[6]=V=>s("resync")),"data-key":"r"},[E(D,{icon:"sync_alt"}),S[16]||(S[16]=m("span",null,"Re-sync this asset",-1))]),S[17]||(S[17]=m("hr",null,null,-1)),l(qa)()||l(N)?(p(),k("a",{key:2,title:`Archived assets remain on disk and the library,
|
|
11
|
+
but are hidden from thumbnail views and most searches.`+l(se),onClick:S[7]||(S[7]=(...V)=>l(W)&&l(W)(...V))},[E(D,{icon:l(N)?"unarchive":"archive"},null,8,["icon"]),m("span",null,[ve(Z(l(N)?"Unarchive":"Archive")+" ",1),l(N)?R("",!0):(p(),k("div",Xc," Hide from thumbnail views "))])],8,Kc)):R("",!0),l(Vs)()||l(j)?(p(),k("a",{key:3,title:"Removed assets are removed from this library but the files remain on disk."+l(se),onClick:S[8]||(S[8]=(...V)=>l(te)&&l(te)(...V))},[E(D,{icon:l(j)?"library_add_filled":"library_remove"},null,8,["icon"]),m("span",null,[ve(Z(l(j)?"Don't remove from library":"Remove from library")+" ",1),l(j)?R("",!0):(p(),k("div",Zc," Files on disk are retained "))])],8,Yc)):R("",!0),l(is)()||l(b)?(p(),k("a",{key:4,title:"Deleted assets are removed from this library AND from disk."+l(se),onClick:S[9]||(S[9]=(...V)=>l(re)&&l(re)(...V))},[E(D,{icon:l(b)?"trash_restore":"trash"},null,8,["icon"]),m("span",null,[ve(Z(l(b)?"Restore from trash":"Delete")+" ",1),l(b)?R("",!0):(p(),k("div",Jc," Files on disk are deleted "))])],8,Qc)):R("",!0),S[18]||(S[18]=m("hr",null,null,-1)),m("a",{onClick:S[10]||(S[10]=V=>s("toggleStreams"))},[E(D,{icon:n.showStreams?"graph_filled":"graph"},null,8,["icon"]),m("span",null,Z(n.showStreams?"Hide related assets":"Related assets"),1)]),m("a",{onClick:S[11]||(S[11]=V=>l(a).setShowInfo(!l(F)))},[E(D,{icon:l(F)?"info":"info_outline"},null,8,["icon"]),m("span",null,Z(l(F)?"Hide info":"Show info"),1)])]),_:1}),m("a",{title:n.showStreams?"Hide related assets":"Related assets",class:_e(["vicon","hide-on-touch",{active:n.showStreams}]),"data-key":"s",onClick:S[12]||(S[12]=V=>s("toggleStreams"))},[E(D,{icon:n.showStreams?"graph_filled":"graph"},null,8,["icon"])],10,ed),m("a",{title:l(F)?"Hide info":"Show info",class:_e(["vicon","hide-on-touch",{active:l(F)}]),"data-key":"i",onClick:S[13]||(S[13]=V=>l(a).setShowInfo(!l(F)))},[E(D,{icon:l(F)?"info":"info_outline"},null,8,["icon"])],10,td)])])}}}),sd=Mo(nd,[["__scopeId","data-v-22aefbef"]]),ps={tags:"Date source: EXIF metadata",siblings:"Date source: interpolated from neighboring files","bname+stat":"Date source: filename confirmed by file date","path+stat":"Date source: directory path confirmed by file date",bname:"Date source: parsed from filename",path:"Date source: parsed from directory path",stat:"Date source: file modification time — may be inaccurate",unknown:"Date source: unknown — may be inaccurate"};vt("date-confidence-high","date-confidence-medium","date-confidence-low","date-confidence-none");const gs={tags:{label:"date: EXIF",colorClass:"date-confidence-high"},siblings:{label:"date: estimated",colorClass:"date-confidence-medium"},"bname+stat":{label:"date: estimated",colorClass:"date-confidence-medium"},"path+stat":{label:"date: estimated",colorClass:"date-confidence-medium"},bname:{label:"date: filename",colorClass:"date-confidence-low"},path:{label:"date: file path",colorClass:"date-confidence-low"},stat:{label:"date: file date",colorClass:"date-confidence-none"},unknown:{label:"date: unknown",colorClass:"date-confidence-none"}},od={...gs.unknown,tooltip:ps.unknown};function id(e,t){if(e==null)return od;const n=e,s=gs[n]??gs.unknown,o=(ps[n]??ps.unknown)+(st(t)?`: ${t}`:"");return{...s,tooltip:o}}const ad=["GPSLatitude/GPSLongitude","GeolocationTimeZone"],ld=["TimeZone","OffsetTimeOriginal","OffsetTimeDigitized","TimeZoneOffset","Z"];function rd(e){return ad.includes(e)}function ud(e){return ld.includes(e)||e.startsWith("ExifDateTime.")||e.startsWith("ExifTime.")||e.includes("adjusted for DaylightSavings")}function cd(e){const{capturedAtTz:t,capturedAtZoneSrc:n,capturedAtZoneName:s}=e;if(t==null)return;const o=st(s)?` (${s})`:"";return n==null?{label:"zone: EXIF",colorClass:"date-confidence-high",tooltip:`Timezone: embedded in metadata${o}`}:n==="forced"||n==="defaultVideosToUTC"?{label:"zone: default",colorClass:"date-confidence-low",tooltip:n==="forced"?"Timezone: forced to UTC for this tag type":"Timezone: defaulted to UTC for video files"}:rd(n)?{label:"zone: GPS",colorClass:"date-confidence-high",tooltip:`Timezone: from ${n}${o}`}:ud(n)?{label:"zone: EXIF",colorClass:"date-confidence-high",tooltip:`Timezone: from ${n} tag${o}`}:{label:"zone: inferred",colorClass:"date-confidence-medium",tooltip:`Timezone: ${n}${o}`}}const Rt={When:{name:xe.When,description:"Dates come from DateTimeOriginal, CreateDate, filename patterns, and the file's modification time.",helpUrl:"https://photostructure.com/guide/captured-at/",ordinal:1,icon:"event",title:"Year and month",label:"When"},Albums:{name:xe.Albums,description:"Albums come from Album, Collections.CollectionName, or Google Takeout albumData.title metadata. (Lightroom CatalogSets show up under Keywords, not Albums.)",helpUrl:"https://photostructure.com/guide/albums/",ordinal:2,icon:"collections",title:"Album",label:"Album"},fs:{name:xe.fs,description:"Directory hierarchy mirroring your original folder structure.",ordinal:3,icon:"folder",title:"Directories on your computer",label:"Directory"},Who:{name:xe.Who,description:"People come from MWG 2.0 face regions (RegionInfo), Google Takeout peopleNames, and tags like PersonInImage.",helpUrl:"https://photostructure.com/guide/people/",ordinal:4,icon:"face",title:"Who",label:"Who"},Where:{name:xe.Where,description:"Places come from GPS coordinates (reverse-geocoded by ExifTool's bundled geo database) and from explicit Country, State, and City metadata.",helpUrl:"https://photostructure.com/guide/places/",ordinal:5,icon:"location",title:"Location",label:"Where"},Event:{name:xe.Event,description:"Events come from keywords under Event, Activity, or Occasion (e.g. the keyword Occasion/Birthday becomes Event/Birthday).",helpUrl:"https://photostructure.com/guide/keywords/",ordinal:6,icon:"newspaper",title:"Event",label:"Event"},Camera:{name:xe.Camera,description:"Cameras come from the Make and Model metadata fields.",ordinal:7,icon:"camera_alt",title:"Camera make and model",label:"Camera"},Lens:{name:xe.Lens,description:"Lenses come from the LensMake, LensModel, and LensInfo metadata fields.",ordinal:8,icon:"camera",title:"Camera lens",label:"Lens"},What:{name:xe.What,description:"What comes from keywords under Subject, Object, Item, or Article (e.g. the keyword Subject/Nature becomes What/Nature).",helpUrl:"https://photostructure.com/guide/keywords/",ordinal:9,icon:"category",title:"Subject or topic",label:"What"},Keywords:{name:xe.Keywords,description:"Keywords come from tags like Keywords, Subject, HierarchicalSubject, CatalogSets, and others.",helpUrl:"https://photostructure.com/guide/keywords/",ordinal:10,icon:"tag",title:"Keyword",label:"Keyword"},Type:{name:xe.Type,description:"Type comes from the media type of the file (e.g. image/jpeg, video/mp4).",ordinal:11,icon:"video_file",title:"Media type (image/jpeg, video/mp4, etc.)",label:"Media type"}},xo=Rt.Albums,dd=Rt.Who,fd=Rt.Where,_o=Rt.Lens,Po=Rt.Keywords;function hd(e){return Rt[e]}function Th(e){return e==null?void 0:Rt[e]}function Rs(e){return e<=1?0:e-1}function vd(e,t){if(e<=0)return[];if(t<=0)return Array.from({length:e},(a,u)=>u);const n=Rs(e),s=Math.min(t,n);if(s>=n)return[e-1];if(e>=3&&s===e-2)return[e-2,e-1];const o=[0];for(let a=1+s;a<e;a++)o.push(a);return o}function md(e,t){if(e<=0||t<=0)return[];const n=Rs(e),s=Math.min(t,n);if(s>=n)return Array.from({length:e-1},(a,u)=>u);if(e>=3&&s===e-2)return Array.from({length:e-2},(a,u)=>u);const o=[];for(let a=1;a<1+s;a++)o.push(a);return o}function pd(e,t){return md(e,t).length>0}function gd(e,t,n=100){let s;const o=bi(t,n);function a(r){u(),s=new ResizeObserver(()=>o()),s.observe(r)}function u(){s!=null&&(s.disconnect(),s=void 0)}Ae(e,r=>{r!=null?a(r):u()},{immediate:!0}),St(()=>{u(),o.reset()})}const yd=["title"],wd={key:0,class:"pathname"},kd={key:1,class:"overflow-nav"},bd={key:0,class:"path-sep"},Sd={key:0,class:"info hide-on-s"},Kt=Ue({__name:"TagPill",props:{tagPath:{},displayPath:{},assetCount:{},icon:{},dismissible:{type:Boolean}},emits:["dismiss"],setup(e,{emit:t}){const n=e,s=t,o=kn(),a=M(null),u=M(null),r=M(0),i=M(!1),d=M(!1);let v=0;function f(O){return pn(n.tagPath.slice(0,O+1),o.query)}function h(O){return{index:O,display:n.displayPath[O],isLast:O===n.displayPath.length-1}}const c=A(()=>vd(n.displayPath.length,r.value)),g=A(()=>{const O=c.value;if(O.length>0&&O[0]===0&&r.value>0)return h(0)}),C=A(()=>{const O=c.value;if(r.value<=0)return O.map(h);const T=g.value!=null?1:0;return O.slice(T).map(h)}),F=A(()=>pd(n.displayPath.length,r.value)),L=A(()=>n.displayPath.map((O,T)=>({index:T,display:O,isLast:T===n.displayPath.length-1})));async function P(){const O=u.value;if(O==null||a.value?.querySelector(".dropdown .dialog")!=null)return;const T=n.displayPath.length;if(T===0)return;const q=Rs(T),G=++v;r.value=0,i.value=!0,d.value=!1;for(let N=0;N<=q;N++){if(r.value=N,await Je(),G!==v)return;if(O.scrollWidth<=O.clientWidth){i.value=!1;return}}d.value=!0,i.value=!1}return Ae(()=>n.displayPath,()=>{P()},{immediate:!0}),gd(a,()=>{P()}),(O,T)=>{const q=yn("router-link");return p(),k("div",{ref_key:"pillRef",ref:a,class:"tag-pill"},[e.icon?(p(),Se(D,{key:0,icon:e.icon,class:"tag-pill-icon"},null,8,["icon"])):R("",!0),m("ol",{ref_key:"olEl",ref:u,style:wt({visibility:i.value?"hidden":"visible"}),title:e.displayPath.join(" / ")},[g.value!=null?(p(),k("li",wd,[E(q,{class:"link",to:f(g.value.index)},{default:Re(()=>[ve(Z(g.value.display),1)]),_:1},8,["to"])])):R("",!0),F.value?(p(),k("li",kd,[E(bs,{title:"Show full path",icon:"more_horiz"},{dropdown:Re(()=>[(p(!0),k(Ce,null,Fe(L.value,G=>(p(),Se(q,{key:"path-"+G.index,to:f(G.index),class:"ancestor-link"},{default:Re(()=>[ve(Z(G.display),1),G.isLast?R("",!0):(p(),k("span",bd,"/"))]),_:2},1032,["to"]))),128))]),_:1})])):R("",!0),(p(!0),k(Ce,null,Fe(C.value,G=>(p(),k("li",{key:"seg-"+G.index,class:_e({pathname:!0,current:G.isLast,"leaf-truncated":G.isLast&&d.value})},[E(q,{class:"link",to:f(G.index)},{default:Re(()=>[ve(Z(G.display),1)]),_:2},1032,["to"]),G.isLast&&e.assetCount!=null?(p(),k("span",Sd,Z(l(ha)(e.assetCount))+" "+Z(e.assetCount===1?"asset":"assets"),1)):R("",!0)],2))),128))],12,yd),e.dismissible?(p(),k("a",{key:1,class:"tag-pill-dismiss",title:"Browse all photos",onClick:T[0]||(T[0]=et(G=>s("dismiss"),["stop"]))},"×")):R("",!0)],512)}}}),Id={class:"asset-info reveal"},Ad=["data-key3"],Cd={key:0},xd={key:0,title:"Captured at"},_d={key:1,class:"captured-at"},Pd={class:"captured-at-row"},Td={class:"captured-at-content"},Ed={key:1},Rd={key:0,class:"captured-at-row"},Ld={class:"captured-at-content captured-at-time"},Od={key:2,title:"Camera"},$d={key:0,class:"camera-make-model"},Dd={key:1,class:"make"},Md={key:2,class:"meta-sep"},Nd={key:4,class:"model"},Fd={key:1,class:"details"},Wd={key:0,title:"Focal length"},Vd={key:1,title:'Aperture, or "F number"'},Hd={key:2,title:"Shutter speed"},zd={key:3,title:"Film sensitivity"},Ud=["title"],Bd={key:4},qd={class:"lens-make-model"},Gd={key:0,class:"meta-sep"},jd={key:5,title:"Video"},Kd={key:6},Xd={key:0,title:"Video duration"},Yd={class:"grey"},Zd={key:1,title:"Frames per second"},Qd={class:"fps"},Jd={key:7,title:"Location"},ef={key:8},tf={class:"crumbs chips"},nf={key:9,title:"People"},sf={key:10},of={class:"crumbs chips"},af=["title"],lf={key:12},rf={class:"crumbs chips"},uf=["title"],cf={key:14},df={class:"crumbs chips"},ff=["onClick"],hf=["onClick"],vf={class:"native-path break-word"},mf={class:"path-sep"},pf=["title"],gf={class:"dimensions"},yf={class:"mimetype"},wf={class:"fileSize"},kf={key:0,class:"shown-badge"},bf=["href","title"],Sf=["onClick"],If=["href","title","download"],Af={class:"description"},Cf={key:0,class:"details"},xf=Ue({__name:"AssetInfo",props:{assetId:{},info:{},previewAf:{},visible:{type:Boolean}},emits:["hide-info","preview-af"],setup(e,{emit:t}){const n=e,s=t,o=kn(),{copyWithFeedback:a,isCopied:u}=la();function r(x){return Et(x,o.query)}function i(x){return{pathname:!0,selected:Pn(x,n.previewAf),missing:!x.exists}}function d(x){const ie=[];return x?.createdAtLocale!=null&&ie.push("First imported "+x.createdAtLocale),x?.updatedAtLocale!=null&&x?.createdAtLocale!==x.updatedAtLocale&&ie.push("Last synced "+x.updatedAtLocale),ie.push(x?.exists?"Click to toggle showing this file":"This file is missing"),ie.join(`
|
|
12
|
+
`)}function v(x){return f(x)==null?void 0:x.exists?`Open ${h(x)?"video":"photo"} in folder`:"(file is missing)"}function f(x){return n.info?.showOpenFile&&x?.exists?`/api/openAssetFile/${x.assetFileId}`:void 0}function h(x){return x?.mimetype?.startsWith("video/")}function c(){return navigator?.clipboard?.writeText!=null}const g=A(()=>n.info?id(n.info.capturedAtSrc,n.info.capturedAtSrcDetail):void 0),C=A(()=>n.info?cd({capturedAtTz:n.info.capturedAtTz,capturedAtZoneSrc:n.info.capturedAtZoneSrc,capturedAtZoneName:n.info.capturedAtZoneName}):void 0),F=A(()=>n.info?.tags.find(x=>x.tagPath[0]===xe.When)),L=A(()=>He(F.value,x=>x.tagPath)),P=A(()=>n.info?.tags.find(x=>x.tagPath[0]===xe.Camera)),O=A(()=>P.value?.tagPath),T=A(()=>st(n.info?.make)||st(n.info?.model)),q=A(()=>st(n.info?.focalLength)||ft(n.info?.aperture)||st(n.info?.shutterSpeed)||ft(n.info?.iso)),G=A(()=>{const x=n.info?.tags.find(ye=>ye.tagPath[0]===xe.Lens);if(x==null)return;const ie=x.displayPath[1]??x.tagPath[1];return x.tagPath.slice(1).map((ye,Ee)=>{const z=x.displayPath[Ee+1]??ye;return{display:z,url:r("/tag/"+x.tagPath.slice(0,Ee+2).map(encodeURIComponent).join("/")),isMake:Ee===0,tooltip:Ee===0?"View all assets from "+z:"View all assets from "+ie+" "+z}})}),N=A(()=>G.value!=null),j=A(()=>n.info?.durationHMS!=null),b=A(()=>He(n.info,x=>He(x.durationHMS,va))),se=A(()=>n.info?.tags.filter(x=>x.tagPath[0]===xe.Where)??[]),X=A(()=>un(se.value)),B=A(()=>n.info?.tags.filter(x=>x.tagPath[0]===xe.Who)??[]),K=A(()=>un(B.value)),ce=A(()=>n.info?.tags.filter(x=>x.tagPath[0]===xe.Albums)??[]),de=A(()=>un(ce.value)),he=A(()=>n.info?.tags.filter(x=>ic(x)&&x.tagPath[0]!==xe.Where&&x.tagPath[0]!==xe.Who&&x.tagPath[0]!==xe.Albums)??[]),ue=A(()=>un(he.value));return(x,ie)=>{const ye=yn("router-link"),Ee=Yi("tip");return p(),k("article",Id,[m("a",{class:"right vicon close",title:"Close info",onClick:ie[0]||(ie[0]=z=>s("hide-info")),"data-key":"i","data-key3":e.visible?"esc":void 0},[E(D,{icon:"close"})],8,Ad),m("div",null,[e.info&&e.assetId==e.info.assetId?(p(),k("dl",Cd,[e.info.capturedAtDate?(p(),k("dt",xd,[E(D,{icon:"today"})])):R("",!0),e.info.capturedAtDate?(p(),k("dd",_d,[m("div",Pd,[m("span",Td,[L.value?(p(),Se(ye,{key:0,class:"link",to:r("/tag/"+L.value.join("/"))},{default:Re(()=>[ve(Z(e.info.capturedAtDate),1)]),_:1},8,["to"])):(p(),k("span",Ed,Z(e.info.capturedAtDate),1))]),g.value?Ge((p(),k("span",{key:0,class:_e(["date-confidence",g.value.colorClass])},[ve(Z(g.value.label),1)],2)),[[Ee,g.value.tooltip]]):R("",!0)]),e.info.capturedAtTime?(p(),k("div",Rd,[m("span",Ld,[ve(Z(e.info.capturedAtTime),1),e.info.capturedAtTz?(p(),k(Ce,{key:0},[ie[1]||(ie[1]=m("span",{class:"meta-sep"},"|",-1)),ve(Z(e.info.capturedAtTz),1)],64)):R("",!0)]),C.value?Ge((p(),k("span",{key:0,class:_e(["date-confidence",C.value.colorClass])},[ve(Z(C.value.label),1)],2)),[[Ee,C.value.tooltip]]):R("",!0)])):R("",!0)])):R("",!0),T.value||q.value?(p(),k("dt",Od,[E(D,{icon:"photo_camera"})])):R("",!0),m("dd",null,[T.value?(p(),k("div",$d,[O.value&&O.value.length>=2?(p(),Se(ye,{key:0,class:"link make",to:r("/tag/"+O.value.slice(0,2).join("/")),title:"View all assets from "+e.info.make},{default:Re(()=>[ve(Z(e.info.make),1)]),_:1},8,["to","title"])):e.info.make?(p(),k("span",Dd,Z(e.info.make),1)):R("",!0),e.info.make&&e.info.model?(p(),k("span",Md,"/")):R("",!0),O.value&&O.value.length>=3?(p(),Se(ye,{key:3,class:"link model",to:r("/tag/"+O.value.slice(0,3).join("/")),title:"View all assets from "+e.info.make+" "+e.info.model},{default:Re(()=>[ve(Z(e.info.model),1)]),_:1},8,["to","title"])):e.info.model?(p(),k("span",Nd,Z(e.info.model),1)):R("",!0)])):R("",!0),q.value?(p(),k("div",Fd,[e.info.focalLength?(p(),k("span",Wd,Z(e.info.focalLength),1)):R("",!0),e.info.aperture?(p(),k("span",Vd,"ƒ/"+Z(e.info.aperture),1)):R("",!0),e.info.shutterSpeed?(p(),k("span",Hd,Z(e.info.shutterSpeed)+" sec",1)):R("",!0),e.info.iso?(p(),k("span",zd,"ISO "+Z(e.info.iso),1)):R("",!0)])):R("",!0)]),N.value?(p(),k("dt",{key:3,title:l(_o).title},[E(D,{icon:l(_o).icon},null,8,["icon"])],8,Ud)):R("",!0),N.value?(p(),k("dd",Bd,[m("div",qd,[(p(!0),k(Ce,null,Fe(G.value,(z,W)=>(p(),k(Ce,{key:W},[E(ye,{class:_e(["link",z.isMake?"make":"model"]),to:z.url,title:z.tooltip},{default:Re(()=>[ve(Z(z.display),1)]),_:2},1032,["class","to","title"]),z.isMake?(p(),k("span",Gd,"/")):R("",!0)],64))),128))])])):R("",!0),j.value?(p(),k("dt",jd,[E(D,{icon:"videocam"})])):R("",!0),j.value?(p(),k("dd",Kd,[b.value?(p(),k("span",Xd,[ie[2]||(ie[2]=ve(" Duration: ",-1)),m("span",Yd,Z(b.value[0]),1),ve(Z(b.value[1]),1)])):R("",!0),e.info.fps?(p(),k("div",Zd,[ie[3]||(ie[3]=ve(" FPS: ",-1)),m("span",Qd,Z(e.info.fps),1)])):R("",!0)])):R("",!0),X.value?(p(),k("dt",Jd,[E(D,{icon:l(fd).icon},null,8,["icon"])])):R("",!0),X.value?(p(),k("dd",ef,[m("div",tf,[(p(!0),k(Ce,null,Fe(se.value,z=>(p(),Se(Kt,{key:e.info.assetId+":where:"+z.tagId,tagPath:z.tagPath,displayPath:z.displayPath},null,8,["tagPath","displayPath"]))),128))])])):R("",!0),K.value?(p(),k("dt",nf,[E(D,{icon:l(dd).icon},null,8,["icon"])])):R("",!0),K.value?(p(),k("dd",sf,[m("div",of,[(p(!0),k(Ce,null,Fe(B.value,z=>(p(),Se(Kt,{key:e.info.assetId+":who:"+z.tagId,tagPath:z.tagPath,displayPath:z.displayPath},null,8,["tagPath","displayPath"]))),128))])])):R("",!0),de.value?(p(),k("dt",{key:11,title:l(xo).label},[E(D,{icon:l(xo).icon},null,8,["icon"])],8,af)):R("",!0),de.value?(p(),k("dd",lf,[m("div",rf,[(p(!0),k(Ce,null,Fe(ce.value,z=>(p(),Se(Kt,{key:e.info.assetId+":album:"+z.tagId,tagPath:z.tagPath,displayPath:z.displayPath},null,8,["tagPath","displayPath"]))),128))])])):R("",!0),ue.value?(p(),k("dt",{key:13,title:l(Po).label},[E(D,{icon:l(Po).icon},null,8,["icon"])],8,uf)):R("",!0),ue.value?(p(),k("dd",cf,[m("div",df,[(p(!0),k(Ce,null,Fe(he.value,z=>(p(),Se(Kt,{key:e.info.assetId+":info:"+z.tagId,tagPath:z.tagPath,displayPath:z.displayPath},null,8,["tagPath","displayPath"]))),128))])])):R("",!0),(p(!0),k(Ce,null,Fe(e.info.files,z=>(p(),k(Ce,{key:z.assetFileId},[m("dt",{class:_e({selected:l(Pn)(z,e.previewAf)}),onClick:W=>z.exists&&s("preview-af",z),title:"Show this variant"},[E(D,{icon:z.exists?h(z)?"movie":"photo":"broken_image"},null,8,["icon"])],10,ff),m("dd",{class:_e(i(z)),onClick:W=>z.exists&&s("preview-af",z),title:"Show this variant"},[m("div",vf,[(p(!0),k(Ce,null,Fe(z.pathElements,W=>(p(),k("span",{key:W.tagPath.join("/")},[E(ye,{class:"link",to:"/tag/"+W.tagPath.map(encodeURIComponent).join("/"),title:"View assets found in "+W.tagPath.join(z.pathSep)},{default:Re(()=>[ve(Z(W.displayName),1)]),_:2},1032,["to","title"]),m("span",mf,Z(z.pathSep),1),ie[4]||(ie[4]=m("wbr",null,null,-1))]))),128)),m("span",{title:d(z)},Z(z.nativePathSuffix),9,pf)]),m("span",gf,Z(l(ma)(z.width*z.height))+" MP ("+Z(l(Bu)(z).replace(/ /g," "))+") ",1),m("span",yf,Z(z.mimetype),1),m("span",wf,Z(l(pa)(z.fileSize).replace(/ /g," ")),1),l(Pn)(z,e.previewAf)?(p(),k("span",kf,"shown")):R("",!0)],10,hf),e.info.showOpenFile&&z.exists||l(un)(z.downloadables)?(p(),Se(bs,{key:0,class:"af-op",id:"af-op:"+z.assetFileId,title:"File operations",icon:"more_vert","active-icon":"expand_more"},{dropdown:Re(()=>[e.info.showOpenFile&&z.exists?(p(),k("a",{key:0,href:f(z),title:v(z)},[E(D,{icon:"launch"}),ie[5]||(ie[5]=m("span",null,"Show file in folder",-1))],8,bf)):R("",!0),c()?(p(),k("a",{key:1,onClick:W=>l(a)(z.nativePath,String(z.assetFileId)),title:"Copy the native path of this file into your clipboard",class:_e({copied:l(u)(String(z.assetFileId))})},[E(D,{icon:l(u)(String(z.assetFileId))?"check":"content_paste"},null,8,["icon"]),m("span",null,Z(l(u)(String(z.assetFileId))?"Copied!":"Copy path"),1)],10,Sf)):R("",!0),(p(!0),k(Ce,null,Fe(z.downloadables,W=>(p(),k("a",{key:W.href,href:W.href,title:W.title,download:W.basename},[E(D,{icon:"download"}),m("span",Af,[ve(Z(W.description)+" ",1),W.details?(p(),k("div",Cf,Z(W.details),1)):R("",!0)])],8,If))),128))]),_:2},1032,["id"])):R("",!0)],64))),128))])):R("",!0)])])}}}),_f=400,Pf={class:"streams"},Tf={class:"crumbs chips"},Ef={key:0,class:"chip stream-label"},Rf=Ue({__name:"AssetStreams",props:{assetStreams:{},assetId:{},context:{}},emits:["hide-streams"],setup(e,{emit:t}){const n=e,s=t,o=new Map;function a(d,v){v!=null?o.set(d,v):o.delete(d)}function u(){requestAnimationFrame(()=>pc(o.values()))}function r(d){return hd(d.tagPath[0])?.icon}function i(d){return Ti(d,n.context)}return gn(()=>{Je(u)}),Ae(()=>n.assetId,()=>{Je(u)}),(d,v)=>(p(),k("div",Pf,[m("a",{class:"right vicon close",title:"Close streams",onClick:v[0]||(v[0]=f=>s("hide-streams")),"data-key3":"esc"},[E(D,{icon:"close"})]),(p(!0),k(Ce,null,Fe(e.assetStreams,(f,h)=>(p(),k("div",{class:"stream",key:e.assetId+":"+(f.label??f.tags[0]?.tagId)},[m("div",Tf,[f.label?(p(),k("span",Ef,Z(f.label),1)):(p(!0),k(Ce,{key:1},Fe(f.tags,c=>(p(),Se(Kt,{key:e.assetId+":"+c.tagId,tagPath:c.tagPath,displayPath:c.displayPath,icon:r(c)},null,8,["tagPath","displayPath","icon"]))),128))]),m("div",{class:"thumb-strip",ref_for:!0,ref:c=>a(h,c)},[(p(!0),k(Ce,null,Fe([...f.assetIdsAfter,e.assetId,...f.assetIdsBefore],c=>(p(),Se(Ri,{id:c,key:h+":"+l(pe)(c),aClass:l(pe)(c)===l(pe)(e.assetId)?"is-active":void 0,lazy:!1,replace:!0,context:i(f)},null,8,["id","aClass","context"]))),128))],512)]))),128))]))}}),Lf={class:"asset-toolbar hide-on-idle"},Of=["title"],$f=["title"],Df=["title"],Mf=["title"],Nf=Ue({__name:"AssetToolbar",props:{showStreams:{type:Boolean}},emits:["toggleStreams"],setup(e,{emit:t}){const n=t,s=bn(),o=Qt(),{asset:a,showInfo:u}=ze(s),{liked:r,deleted:i,toggleLiked:d,toggleDeleted:v}=Li();async function f(){const h=a.value?.assetId;if(h!=null)try{const c=await $i(h);c!=null&&o.show({type:"success",text:c,timeout:3e3})}catch(c){if(c instanceof DOMException&&c.name==="AbortError")return;o.show({type:"error",text:"Failed to share",details:c instanceof Error?c.message:String(c)})}}return(h,c)=>(p(),k("div",Lf,[l(vs)()?(p(),k("a",{key:0,title:l(En)(),onClick:f},[E(D,{icon:l(ms)()},null,8,["icon"])],8,Of)):R("",!0),m("a",{title:l(r)?"Unlike":"Like",class:_e({active:l(r)}),onClick:c[0]||(c[0]=(...g)=>l(d)&&l(d)(...g))},[E(D,{icon:l(r)?"favorite":"favorite_border"},null,8,["icon"])],10,$f),m("a",{title:l(u)?"Hide info":"Show info",class:_e({active:l(u)}),onClick:c[1]||(c[1]=g=>l(s).setShowInfo(!l(u)))},[E(D,{icon:l(u)?"info":"info_outline"},null,8,["icon"])],10,Df),m("a",{title:"Related assets",class:_e({active:e.showStreams}),onClick:c[2]||(c[2]=g=>n("toggleStreams"))},[E(D,{icon:e.showStreams?"graph_filled":"graph"},null,8,["icon"])],2),l(is)()?(p(),k("a",{key:1,title:l(i)?"Restore from trash":"Delete",class:_e({active:l(i)}),onClick:c[3]||(c[3]=(...g)=>l(v)&&l(v)(...g))},[E(D,{icon:l(i)?"trash_restore":"trash"},null,8,["icon"])],10,Mf)):R("",!0)]))}});function Ff(){return[200,480,Math.min(window.innerWidth,1920)]}let Wf=0;function xt(e,t){const n=Vf(t);return{key:Wf++,assetId:t?.assetId??null,...n,loaded:!1,position:e}}function Vf(e){if(e==null)return{src:"",srcset:"",sizes:""};const t=Ff(),n=Zt({assetId:e,reducer:"fit",width:t[0]}),s=t.map(a=>Zt({assetId:e,reducer:"fit",width:a})+" "+a+"w").join(",");return{src:n,srcset:s,sizes:"100vw"}}function Hf(e,t){if(t!=null){const s={src:t.src??e.src};return t.srcSet!=null&&(s.srcset=t.srcSet),t.sizes!=null&&(s.sizes=t.sizes),s}const n={src:e.src};return e.srcset&&(n.srcset=e.srcset),e.sizes&&(n.sizes=e.sizes),n}function zf(){const e=M([]),t=M(0);let n=null;function s(){n!=null&&(clearTimeout(n),n=null);const c=e.value.findIndex(g=>g.isGhost);c!==-1&&e.value.splice(c,1)}const o=A(()=>e.value.some(c=>c.isGhost));function a(c){const g=d.value,C=!c.skipGhost&&g!=null&&g.loaded?{...g,isGhost:!0,position:0,srcset:c.ghostSrcset??g.srcset,sizes:c.ghostSizes??g.sizes}:void 0;n!=null&&clearTimeout(n),t.value=0;const F=xt(0);F.assetId=c.currentAssetId,F.src=c.currentSrc,F.loaded=C==null;const L=[xt(-1,c.leftAssetId),F,xt(1,c.rightAssetId)];C!=null&&(L.unshift(C),n=setTimeout(s,2e3)),e.value=L}function u(c){t.value+=1;const g=e.value.filter(C=>C.position>=t.value-1);g.push(xt(t.value+1,c)),e.value=g}function r(c){t.value-=1;const g=e.value.filter(C=>C.position<=t.value+1);g.unshift(xt(t.value-1,c)),e.value=g}function i(c,g){return{transform:`translateX(calc(${(c.position-t.value)*100}% + ${g}px))`}}const d=A(()=>e.value.find(c=>c.position===t.value&&!c.isGhost));function v(c){const g=e.value.find(F=>F.key===c);if(g==null)return;!g.isGhost&&g.position===t.value&&o.value?requestAnimationFrame(()=>{requestAnimationFrame(()=>{g.loaded=!0,n!=null&&clearTimeout(n),n=setTimeout(s,300)})}):g.loaded=!0}function f(c,g){const C=t.value-1,F=t.value+1;let L=!1;const P=e.value.map(O=>O.isGhost?O:O.position===C&&(c!=null?c.assetId:null)!==O.assetId?(L=!0,xt(C,c??void 0)):O.position===F&&(g!=null?g.assetId:null)!==O.assetId?(L=!0,xt(F,g??void 0)):O);L&&(e.value=P)}function h(){n!=null&&(clearTimeout(n),n=null),e.value=[],t.value=0}return St(()=>{n!=null&&(clearTimeout(n),n=null)}),{slides:e,centerOffset:t,centerSlide:d,hasGhost:o,init:a,settleRight:u,settleLeft:r,slideStyle:i,onSlideLoad:v,clearGhost:s,updateNeighbors:f,reset:h}}const Uf=10,Bf=.3,To=.5,Eo=350,qf=.2,Gf=75,jf=.15,Kf=300,Xf=30,Ro=25;function Yf(e){const t=M(0),n=M(!1),s=M(0),o=M(!1);let a="idle",u=0,r=0,i=0,d=null,v=null,f=!1;const h=[];let c=null,g=null,C=null,F=0,L=0,P=null,O=0,T=0,q=0,G=0,N=0,j=0;const b=[];function se(w,J){b.push({x:w,t:J}),b.length>3&&b.shift()}function X(){if(b.length<2)return 0;const w=b[0],J=b[b.length-1],me=J.t-w.t;return me>0?(J.x-w.x)/me:0}function B(){if(g==null||C==null)return 0;const w=C.x-g.x,J=C.y-g.y;return Math.sqrt(w*w+J*J)}function K(){return g==null||C==null?{x:0,y:0}:{x:(g.x+C.x)/2,y:(g.y+C.y)/2}}function ce(){return e.scrollable.value?de()<=0:!0}function de(){return e.scrollContainer.value?.scrollTop??0}function he(){v!=null&&(v.cancel(),v=null)}function ue(){v?.complete()}function x(){P!=null&&(clearTimeout(P),P=null)}function ie(w){w.pointerType==="touch"&&(g==null?ye(w):C==null&&a!=="dismissing"&&e.isImage.value&&Ee(w))}function ye(w){ue(),t.value=0,n.value=!1,s.value=0,o.value=!1,g={id:w.pointerId,x:w.clientX,y:w.clientY},u=w.clientX,r=w.clientY,i=w.timeStamp,a="tracking"}function Ee(w){a==="swiping"&&(he(),t.value=0,n.value=!1),C={id:w.pointerId,x:w.clientX,y:w.clientY},L=B(),a="pinch-pending";const J=w.target;J?.setPointerCapture?.(g.id),J?.setPointerCapture?.(C.id),x(),P=setTimeout(()=>{P=null,z()},Gf)}function z(){if(a!=="pinch-pending"||g==null||C==null)return;F=B(),a="pinching";const w=K();e.callbacks.onPinchStart(w.x,w.y)}function W(w){if(g!=null&&w.pointerId===g.id)g.x=w.clientX,g.y=w.clientY;else if(C!=null&&w.pointerId===C.id)C.x=w.clientX,C.y=w.clientY;else return;switch(a){case"tracking":te(w);break;case"swiping":re(w);break;case"dismissing":Pe(w);break;case"scrolling":y(w);break;case"pinch-pending":S(w);break;case"pinching":$(w);break;case"panning":V(w);break}}function te(w){const J=w.clientX-u,me=w.clientY-r,Le=e.isMinScale.value?Uf:Ro;if(!(Math.abs(J)<=Le&&Math.abs(me)<=Le)){if(Math.abs(J)>Math.abs(me))e.isMinScale.value?(a="swiping",n.value=!0):(a="panning",O=w.clientX,T=w.clientY);else if(e.scrollable.value)if(!e.isMinScale.value)a="panning",O=w.clientX,T=w.clientY;else if(me>0&&ce()){e.callbacks.onClosePanel?.(),qe();return}else a="scrolling",T=w.clientY;else if(me>0&&e.isMinScale.value&&ce())a="dismissing",o.value=!0;else if(!e.isMinScale.value)a="panning",O=w.clientX,T=w.clientY;else if(me<0&&e.isMinScale.value){e.callbacks.onSwipeUp?.(),qe();return}else return;w.target?.setPointerCapture?.(w.pointerId),w.preventDefault()}}function re(w){w.preventDefault(),se(w.clientX,w.timeStamp);const J=w.clientX-u;J>0&&!e.hasLeft.value||J<0&&!e.hasRight.value?t.value=0:t.value=J}function Pe(w){w.preventDefault(),s.value=Math.max(0,w.clientY-r)}function y(w){w.preventDefault();const J=w.clientY-T,me=e.scrollContainer.value;me!=null&&(me.scrollTop-=J),T=w.clientY}function S(w){if(w.preventDefault(),L>0){const J=B()/L;Math.abs(J-1)>jf&&(x(),z())}}function $(w){w.preventDefault();const J=B();if(F>0&&J>0){const me=K();e.callbacks.onPinchUpdate(J/F,me.x,me.y)}}function V(w){w.preventDefault();const J=w.clientY-T;e.callbacks.onPan(w.clientX-O,J),O=w.clientX,T=w.clientY,J>0&&e.canDismissDown.value?(q+=J,q>Ro&&(a="dismissing",o.value=!0,r=w.clientY)):q=0}function oe(w){if(a==="pinch-pending")return ge(w);if(a==="pinching")return le(w);if(g!=null&&w.pointerId===g.id)g=null;else if(C!=null&&w.pointerId===C.id)C=null;else return;switch(a){case"tracking":ae(w);break;case"swiping":ke(w);break;case"dismissing":Xe(w);break;case"panning":case"scrolling":qe();break}}function ge(w){x(),g!=null&&w.pointerId===g.id?(g=C!=null?{...C}:null,C=null):C!=null&&w.pointerId===C.id&&(C=null),g!=null?(a="tracking",u=g.x,r=g.y,i=performance.now()):qe()}function le(w){g!=null&&w.pointerId===g.id&&C!=null?(g={...C},C=null):C!=null&&w.pointerId===C.id?C=null:g!=null&&w.pointerId===g.id&&(g=null),e.callbacks.onPinchEnd(),!e.isMinScale.value&&g!=null?(a="panning",O=g.x,T=g.y):qe()}function ae(w){const J=window.innerWidth,me=J*.25,Le=w.clientX<me||w.clientX>J-me;if(e.isImage.value&&!Le){const _=w.clientX-N,U=w.clientY-j,Y=Math.sqrt(_*_+U*U);G>0&&w.timeStamp-G<Kf&&Y<Xf?(G=0,e.callbacks.onDoubleTap(w.clientX,w.clientY)):(G=w.timeStamp,N=w.clientX,j=w.clientY)}qe()}function ke(w){se(w.clientX,w.timeStamp);const J=X(),me=Math.max(1,w.timeStamp-i),Le=(w.clientX-u)/me,_=Math.abs(J)>.01?J:Le;b.length=0;const U=window.innerWidth;if(!(Math.abs(t.value)/U>Bf||Math.abs(_)>To)){Ie(t);return}const Q=t.value>0||t.value===0&&_>0;if(!(Q?e.hasLeft.value:e.hasRight.value)){Ie(t);return}const be=Q?"left":"right";f?h.push(be):(f=!0,c=be,Q?e.callbacks.onNavigateLeft():e.callbacks.onNavigateRight());const Te=Q?U:-U,Oe=Ye(t.value,Te,_);nt(t,t.value,Te,Oe,()=>{g=null,a="idle",e.callbacks.onSwipeSettle(be),t.value=0,f=!1,Ot(),requestAnimationFrame(()=>{n.value=!1})})}function Xe(w){const J=Math.max(1,w.timeStamp-i),me=(w.clientY-r)/J,Le=window.innerHeight;if(s.value/Le>qf||me>To){const U=Ye(s.value,Le,me);nt(s,s.value,Le,U,()=>{e.callbacks.onDismiss(),qe()})}else Ie(s)}function Ie(w){nt(w,w.value,0,Eo,()=>qe())}function tt(w){if(a==="pinch-pending"){x(),qe();return}if(g!=null&&w.pointerId===g.id||C!=null&&w.pointerId===C.id){if(a==="pinching"){e.callbacks.onPinchEnd(),qe();return}a==="swiping"&&t.value!==0?Ie(t):a==="dismissing"&&s.value!==0?Ie(s):qe()}}function qe(){x(),g=null,C=null,a="idle",f=!1,h.length=0,b.length=0,t.value=0,n.value=!1,s.value=0,o.value=!1,q=0}function nn(){f=!1}function Lt(){he(),a="idle",g=null,C=null,t.value=0,n.value=!1,s.value=0,o.value=!1,q=0,f=!1,h.length=0}function Ot(){const w=h.shift();w!=null&&(c=w,w==="left"?e.callbacks.onNavigateLeft():e.callbacks.onNavigateRight(),e.callbacks.onSwipeSettle(w),Ot())}function Ye(w,J,me){const Le=Math.abs(me);return Le<.1?Eo:Math.max(250,Math.min(500,3*Math.abs(J-w)/Le))}function nt(w,J,me,Le,_){he();const U=me-J,Y=performance.now();let ee=!1;function Q(){ee=!0,w.value=me,v=null,_()}function fe(Te){if(ee)return;const Oe=Math.min(1,Math.max(0,(Te-Y)/Le));if(Oe>=1)return Q();const Me=1-Oe;w.value=J+U*(1-Me*Me*Me);const $e=requestAnimationFrame(fe);v={cancel(){ee=!0,cancelAnimationFrame($e)},complete:Q}}const be=requestAnimationFrame(fe);v={cancel(){ee=!0,cancelAnimationFrame(be)},complete:Q}}let at=null;function At(){rt()}function rt(){d!=null&&(e.scrollable.value?de()<=0?d.style.touchAction="none":d.style.touchAction="pan-y":d.style.touchAction="none")}function $t(){const w=e.scrollable.value,J=e.scrollContainer.value;w&&J!=null?J!==at&&(mt(),J.addEventListener("scroll",At,{passive:!0}),at=J):mt()}function mt(){at!=null&&(at.removeEventListener("scroll",At),at=null)}Ae(e.scrollable,(w,J)=>{if(!w&&J){const me=e.scrollContainer.value;me!=null&&(me.scrollTop=0),d?.parentElement!=null&&(d.parentElement.scrollTop=0)}$t(),rt()}),Ae(e.scrollContainer,()=>{$t(),rt()});function Dt(w){d=w,rt(),w.addEventListener("pointerdown",ie,{passive:!0}),w.addEventListener("pointermove",W,{passive:!1}),w.addEventListener("pointerup",oe,{passive:!0}),w.addEventListener("pointercancel",tt,{passive:!0})}function Mt(){d!=null&&(d.removeEventListener("pointerdown",ie),d.removeEventListener("pointermove",W),d.removeEventListener("pointerup",oe),d.removeEventListener("pointercancel",tt),d.style.touchAction="",d=null),mt(),he(),qe()}St(Mt);function sn(){const w=c;return c=null,w}return{offset:t,isSwiping:n,unlockNavigation:nn,cancelAndUnlock:Lt,lastNavigationDirection:sn,dismissOffset:s,isDismissing:o,attach:Dt,detach:Mt}}function Zf(e,t){t??=new URLSearchParams;for(const[n,s]of $a(e))t.set(n,s);return t}function Qf(e,t){const s=Zf(e,t).toString();return en(s)?"":"?"+s}const Jf=/\bFirefox\b/;function eh(e,t){return e!=null&&String(e).match(t)!=null}function th(e){return eh(e,Jf)}const nh=["data-key","onLoad"],sh=["href"],oh=["href"],ih=["src"],ah=["title"],Lo="swipeUpPanel",lh=Ue({__name:"Asset",props:{assetId:{},from:{},priorAssetId:{},context:{}},setup(e){const t=e,n=bn(),s=Qt(),o=it(),a=Es(),u=tn(),{asset:r,previewAf:i,previewAssetId:d,showInfo:v,isImage:f,isVideo:h,isMinScale:c,canDismissDown:g,scale:C,width:F,height:L,isRotated:P,videoAttrs:O}=ze(n),T=zf();function q(){if(d.value!=null){const H=N.value;H?.classList.add("skip-fade"),d.value=null,requestAnimationFrame(()=>H?.classList.remove("skip-fade"))}else d.value=null}function G(){if(T.centerSlide.value?.loaded){q(),o.notifyAssetReady();return}const I=setTimeout(()=>{H(),q(),o.notifyAssetReady()},1e3),H=Ae(()=>T.centerSlide.value?.loaded,ne=>{ne&&(H(),clearTimeout(I),q(),o.notifyAssetReady())})}const N=M(null),j=window.matchMedia("(any-pointer: coarse)").matches,b=M(!1);Ae(b,I=>{document.body.classList.toggle("chrome-hidden",I),n.handleResize()});const se=M(void 0),X=M(void 0),B=M(!1),K=M(void 0),ce=M(!1),de=M(!1),he=M(null);let ue;const x=M(!1),ie=A(()=>{if(d.value!=null)return Zt({assetId:d.value,reducer:"fit",width:Math.min(window.innerWidth,1920)})});Ae(d,()=>{x.value=!1}),Ae(()=>t.assetId,()=>{d.value!=null&&o.setSkipNextDissolve()});function ye(I){I!==t.assetId&&(ko(),d.value=I)}function Ee(I){ko(),a.setCurrent(I),o.navigateToAsset({assetId:I,context:t.context})}const z=Math.floor(1e3/60),W=zo({f:I=>n.onMouseMove(I),minCallDelayMs:z});function te(){const I=th(Ga());s.show({type:"warning",text:"This video can't play in your browser.",details:I?"Firefox won't stream some camera-original MOV/MP4 files. Try Chrome, or set transcodeVideos=true (env var PS_TRANSCODE_VIDEOS or library TOML) so PhotoStructure prepares browser-compatible copies.":"Set transcodeVideos=true (env var PS_TRANSCODE_VIDEOS or library TOML) so PhotoStructure prepares browser-compatible copies.",uuid:"video-playback-error",buttons:[{text:"Advanced settings",onClick:H=>{H(),window.open("https://photostructure.com/getting-started/advanced-settings/","_blank","noopener")}},{text:"Env variables",onClick:H=>{H(),window.open("https://photostructure.com/guide/environment-variables/","_blank","noopener")}}]})}const re=A(()=>X.value!=null&&!B.value&&(!v.value||Le.value)),{navItems:Pe}=ze(u),y=A(()=>{const I=r.value?.contextTag;return I!=null?hc(I,Pe.value):vc(o.context,Pe.value)});function S(){o.clearContext()}const $=A(()=>({asset:!0,page:!0,"is-video":h.value,"is-image":f.value,"show-info":v.value,"show-streams":B.value,"has-filmstrip":re.value,previewing:ie.value!=null})),{hasLeft:V,hasRight:oe}=ze(a),ge=A(()=>cc(r.value??void 0)),le=A(()=>dc(r.value??void 0)),ae=A(()=>V.value||ge.value!=null),ke=A(()=>oe.value||le.value!=null),Xe=A(()=>{const I=a.peekLeft();if(I!=null)return ht({assetId:I.assetId,context:t.context});const H=ge.value;return H!=null?ht({assetId:H.assetId,context:t.context}):void 0}),Ie=A(()=>{const I=a.peekRight();if(I!=null)return ht({assetId:I.assetId,context:t.context});const H=le.value;return H!=null?ht({assetId:H.assetId,context:t.context}):void 0});function tt(I){const H=I==="left"?a.peekLeft():a.peekRight();if(H!=null){const ne=pe(H);a.setCurrent(ne),o.navigateToAsset({assetId:ne,context:t.context})}else{const ne=I==="left"?ge.value:le.value;ne!=null&&o.navigateToAsset(ne)}}function qe(){tt("left")}function nn(){tt("right")}function Lt(){B.value&&de.value&&r.value!=null&&Fa("#bottom","auto")}function Ot(){clearTimeout(Y??void 0),Y=null,ee=!1,de.value=!1,b.value=!1,X.value=void 0,K.value=void 0,se.value=void 0,T.reset(),a.reset(),n.resetAsset()}async function Ye(){if(!de.value)return;const I=t.assetId;if(I==null){s.show({type:"error",text:"Internal error",details:"fetchAsset(): missing asset id"});return}const H=t.context!==ue;if(r.value?.assetId!==I||H){r.value?.assetId!==I&&Ns(he.value,"stop"),ue=t.context;const ne=await dt("/api/asset/"+I+Qf({from:t.from,priorAssetId:t.priorAssetId,context:t.context}));if(!(de.value&&I===ne?.assetId&&ne?.assetId===t.assetId))return;const Ne=r.value!=null?n.imgAttrs:null;if(n.setAsset(ne),ne!=null)if(Ve.lastNavigationDirection()!=null)Ve.unlockNavigation(),o.notifyAssetReady();else{Ve.cancelAndUnlock(),a.setCurrent(ne.assetId);const rn=a.neighborsOf(ne.assetId),In=Zt({assetId:ne,reducer:"fit",width:Math.min(window.innerWidth,1920)}),ut=d.value!=null;T.init({currentAssetId:ne.assetId,currentSrc:In,leftAssetId:rn.left??ne.afterAssetId,rightAssetId:rn.right??ne.beforeAssetId,skipGhost:ut,ghostSrcset:!ut&&typeof Ne?.srcSet=="string"?Ne.srcSet:void 0,ghostSizes:!ut&&typeof Ne?.sizes=="string"?Ne.sizes:void 0}),G()}else Ve.cancelAndUnlock(),o.notifyAssetReady();document.title=Da([He(r.value,Wt=>Wt.capturedAtLocale),"PhotoStructure"]).join(" - "),setTimeout(()=>de.value?Ns(he.value,"load"):void 0,100),at(I),$t(I),B.value&&Dt(I)}}function nt(){Je(()=>{requestAnimationFrame(()=>{const I=N.value?.closest(".asset-overlay");I!=null&&I.scrollTop===0&&I.scrollTo({top:80,behavior:"smooth"})})})}async function at(I){const H=Kn(I,t.assetId);if(de.value!==!0||v.value!==!0||t.assetId==null||t.assetId!==H){t.assetId===H&&(se.value=void 0);return}const ne=await dt(`/api/asset/${H}/info`);ne?.assetId===t.assetId&&(se.value=ne,n.handleResize(),nt())}function At(I){const H=new URLSearchParams;if(t.context!=null&&H.set("context",t.context),I!=null)for(const[Ne,Wt]of Object.entries(I))H.set(Ne,Wt);const ne=H.toString();return ne.length>0?"?"+ne:""}function rt(I=2){const H=window.innerWidth>=768?34:26;return String(Math.ceil(window.innerWidth/H*I))}async function $t(I){const H=Kn(I,t.assetId);if(!de.value||t.assetId==null||t.assetId!==H){t.assetId===H&&(X.value=void 0);return}const ne=await dt(`/api/asset/${H}/streams`+At({count:"1",limit:rt()}));if(ne?.assetId===t.assetId&&(X.value=ne?.assetStreams?.[0]??void 0,X.value!=null&&r.value!=null)){const Ne=pe(r.value),Wt=a.context!==t.context,rn=Ne!=null&&a.contains(Ne);let In=!1;if(rn&&Ne!=null){const ut=a.neighborsOf(Ne);In=pe(ut.left)!==pe(r.value.afterAssetId)||pe(ut.right)!==pe(r.value.beforeAssetId)}if(Ne==null||Wt||!rn||In?a.seed(X.value,r.value,t.context):a.setCurrent(Ne),Ne!=null&&T.centerSlide.value?.assetId===Ne){const ut=a.neighborsOf(Ne);T.updateNeighbors(ut.left??null,ut.right??null)}}}const mt=A(()=>{const I=K.value?.assetStreams;return I==null||I.length===0?[]:I});async function Dt(I){const H=Kn(I,t.assetId);if(!de.value||!B.value||t.assetId==null||t.assetId!==H){t.assetId===H&&(K.value=void 0);return}ce.value=!0;const ne=await dt(`/api/asset/${H}/streams`+At({limit:rt()}));ne?.assetId===t.assetId&&(K.value=ne,nt()),ce.value=!1}function Mt(I){n.setPreviewAf(I??null)}async function sn(){await dt("/api/asset/"+t.assetId+"/resync",{method:"PUT"}),window.location.reload()}function w(){n.setShowInfo(!1)}function J(){if(v.value||B.value)return;b.value=!1,localStorage.getItem(Lo)==="streams"?_():n.setShowInfo(!0)}function me(I){localStorage.setItem(Lo,I)}const Le=A(()=>(Oe.value,window.matchMedia("(min-width: 1201px)").matches));function _(){const I=()=>{const H=!B.value;B.value=H,H&&(me("streams"),n.setShowInfo(!1),n.resetZoom())};document.startViewTransition!=null?document.startViewTransition(async()=>{I(),await Je()}):I()}function U(){B.value=!1,Le.value||n.setShowInfo(!1)}let Y=null,ee=!1;function Q(I){if(j){if(ee){ee=!1;return}clearTimeout(Y??void 0),Y=setTimeout(()=>{Y=null,b.value=!b.value},300);return}U(),Gt(I)?n.setScale(I):n.toggleZoom()}function fe(I){I.pointerType==="mouse"&&W(I)}function be(I){I?.shiftKey&&U(),n.onWheel(I)}Ae(()=>t.assetId,Ye),Ae(()=>t.context,Ye),Ae(v,I=>{I&&(me("info"),B.value&&(B.value=!1)),at()}),Ae(B,()=>Dt());function Te(){const I=v.value&&Le.value;n.setInfoPanelWidth(I?_f:0),v.value&&!I&&n.resetZoom()}Ae(v,Te,{immediate:!0});const Oe=M(window.innerWidth),Me=M(window.innerHeight);function $e(){o.setSkipNextDissolve(),tt("left")}function pt(){o.setSkipNextDissolve(),tt("right")}function gt(I){const H=o.assetId;if(H!=null){const ne=a.neighborsOf(H);I==="right"?T.settleRight(ne.right):T.settleLeft(ne.left)}else I==="right"?T.settleRight():T.settleLeft();a.extendIfNeeded(I)}function on(){o.setSkipNextClose(),o.close("back")}function Wn(){v.value?n.setShowInfo(!1):B.value&&(B.value=!1)}function Sn(I,H){U(),n.beginPinch(I,H)}function an(I,H,ne){n.updatePinch(I,H,ne)}function Nt(){n.endPinch()}function ln(I,H){n.panBy(I,H)}function Vn(I,H){clearTimeout(Y??void 0),Y=null,ee=!0,U(),n.doubleTapZoom(I,H)}const Hn=A(()=>v.value||B.value),zn=A(()=>N.value?.closest(".asset-overlay")??null),Ve=Yf({hasLeft:V,hasRight:oe,isMinScale:c,canDismissDown:g,scrollable:Hn,scrollContainer:zn,isImage:f,callbacks:{onNavigateLeft:$e,onNavigateRight:pt,onSwipeSettle:gt,onDismiss:on,onClosePanel:Wn,onPinchStart:Sn,onPinchUpdate:an,onPinchEnd:Nt,onPan:ln,onDoubleTap:Vn,onSwipeUp:J}}),Mi=A(()=>Ve.isSwiping.value?Ve.offset.value:0);function Ft(I){return I.position===T.centerOffset.value}function Ni(I){const H=Ft(I)&&!I.isGhost&&(!c.value||P.value);return{"carousel-slide":!0,"carousel-center":Ft(I)&&!I.isGhost,"ghost-slide":I.isGhost,contain:!H,loaded:I.loaded}}const Fi=A(()=>B.value||v.value&&!Le.value);function Wi(I){if(I.isGhost)return{transform:"translateX(0)"};if(Ft(I)&&(!c.value||P.value)&&F.value!=null&&L.value!=null)return{...n.style,width:F.value+"px",height:L.value+"px",objectFit:"initial",willChange:"transform"};const H=T.slideStyle(I,Mi.value);return Fi.value&&Ft(I)&&F.value!=null&&L.value!=null&&F.value>0&&L.value>0?{...H,aspectRatio:`${F.value} / ${L.value}`}:H}function Vi(I){const H=!I.isGhost&&Ft(I)&&r.value?.assetId===I.assetId;return Hf(I,H?{src:n.imgAttrs.src,srcSet:n.imgAttrs.srcSet,sizes:n.imgAttrs.sizes}:void 0)}const Hi=A(()=>{const I=je.value;if(I>0){const H=Math.max(.1,Math.pow(1-I,1.5));return{transform:`translateY(${Ve.dismissOffset.value}px) scale(${H})`,borderRadius:`${I*16}px`}}}),zi=A(()=>{if(Ve.isSwiping.value&&Ve.offset.value!==0)return{transform:`translateX(${Ve.offset.value}px)`};const I=je.value;if(I>0){const H=Math.max(.1,Math.pow(1-I,1.5));return{transform:`translateY(${Ve.dismissOffset.value}px) scale(${H})`,borderRadius:`${I*16}px`}}}),je=A(()=>!Ve.isDismissing.value||Ve.dismissOffset.value===0?0:Math.min(1,Ve.dismissOffset.value/Me.value));Ae(je,I=>{o.dismissProgress=I,document.documentElement.style.setProperty("--dismiss-bg-opacity",I>0?String(1-I):"")});const Ui=A(()=>{if(je.value!==0)return{background:"transparent"}});function Ls(){Oe.value=window.innerWidth,Me.value=window.innerHeight,Te()}let Un=!1;const Bn=new IntersectionObserver(I=>{if(j)for(const H of I)H.intersectionRatio>=.95&&Un?(n.setShowInfo(!1),B.value=!1,Un=!1):H.intersectionRatio<.5&&(Un=!0)},{threshold:[.5,.95]});return gn(()=>{Is(Lt),window.addEventListener("resize",Ls),N.value!=null&&(Ve.attach(N.value),Bn.observe(N.value)),de.value=!0,Ye()}),Zi(()=>{uu()}),Ae(N,I=>{I!=null&&(Ve.attach(I),Bn.observe(I))}),St(()=>{window.removeEventListener("resize",Ls),Ve.detach(),Bn.disconnect(),Ot(),Uo(Lt)}),(I,H)=>l(r)?(p(),k("div",{key:0,class:_e($.value),style:wt(Ui.value)},[E(sd,{onResync:sn,onToggleStreams:_,showStreams:B.value,style:wt(je.value>0?{opacity:Math.max(0,1-je.value*10)}:void 0)},null,8,["showStreams","style"]),H[4]||(H[4]=m("span",{id:"top"},null,-1)),Ge(E(xf,{assetId:e.assetId,info:se.value,previewAf:l(i)??void 0,visible:l(v),onHideInfo:w,onPreviewAf:Mt},null,8,["assetId","info","previewAf","visible"]),[[Ze,l(v)]]),m("div",{id:"fullscreen",ref_key:"fullscreenRef",ref:N,class:_e({swiping:l(Ve).isSwiping.value,dismissing:je.value>0,previewing:ie.value!=null}),onPointermovePassive:H[2]||(H[2]=ne=>fe(ne))},[l(f)?(p(),k("div",{key:0,class:"carousel-container",style:wt(Hi.value)},[(p(!0),k(Ce,null,Fe(l(T).slides.value,ne=>(p(),k("img",_n({"data-key":Ft(ne)&&!ne.isGhost?"z":void 0,key:ne.key},{ref_for:!0},Vi(ne),{class:Ni(ne),style:Wi(ne),draggable:"false",fetchpriority:"high",onLoad:Ne=>l(T).onSlideLoad(ne.key),onClick:Q,onWheelPassive:H[0]||(H[0]=Ne=>be(Ne))}),null,16,nh))),128))],4)):l(h)?(p(),k("video",_n({key:1,ref_key:"videoRef",ref:he},l(O),{key:l(r).assetId,style:zi.value,onError:te}),[(p(!0),k(Ce,null,Fe(l(r).videoSources,(ne,Ne)=>(p(),k("source",_n({key:typeof ne.src=="string"?ne.src:Ne},{ref_for:!0},ne),null,16))),128))],16)):R("",!0),ae.value?(p(),k("a",{key:2,title:"View previous",class:"nav middle left prev hide-on-idle",href:Xe.value,onClick:et(qe,["prevent"]),"data-key":"left","data-key2":"j"},[E(D,{icon:"navigate_before"})],8,sh)):R("",!0),ke.value?(p(),k("a",{key:3,title:"View next",class:"nav middle right next hide-on-idle",href:Ie.value,onClick:et(nn,["prevent"]),"data-key":"right","data-key2":"k"},[E(D,{icon:"navigate_next"})],8,oh)):R("",!0),ie.value?(p(),k("img",{key:4,class:_e(["contain preview-asset",{loaded:x.value}]),src:ie.value,draggable:"false",onLoad:H[1]||(H[1]=ne=>x.value=!0)},null,42,ih)):R("",!0)],34),re.value?(p(),Se(kc,{key:0,stream:X.value,assetId:l(r),context:e.context,style:wt(je.value>0?{opacity:Math.max(0,1-je.value*3)}:void 0),onPreview:ye,onScrubNavigate:Ee},null,8,["stream","assetId","context","style"])):R("",!0),re.value&&y.value?.displayPath?(p(),Se(Kt,{key:1,class:"filmstrip-context hide-on-idle",tagPath:y.value.tagPath??y.value.displayPath,displayPath:y.value.displayPath,icon:y.value.icon,dismissible:!0,style:wt(je.value>0?{opacity:Math.max(0,1-je.value*3)}:void 0),onDismiss:S},null,8,["tagPath","displayPath","icon","style"])):re.value&&y.value?(p(),k("div",{key:2,class:"filmstrip-context hide-on-idle tag-pill",title:y.value.label,style:wt(je.value>0?{opacity:Math.max(0,1-je.value*3)}:void 0)},[E(D,{icon:y.value.icon},null,8,["icon"]),m("span",null,Z(y.value.label),1),m("a",{class:"tag-pill-dismiss",title:"Browse all photos",onClick:et(S,["stop"])},"×")],12,ah)):R("",!0),E(Nf,{showStreams:B.value,onToggleStreams:_,style:wt(je.value>0?{opacity:Math.max(0,1-je.value*3)}:void 0)},null,8,["showStreams","style"]),B.value&&mt.value.length>0?(p(),Se(Rf,{key:3,assetStreams:mt.value,assetId:l(r),context:e.context,onHideStreams:H[3]||(H[3]=ne=>B.value=!1)},null,8,["assetStreams","assetId","context"])):R("",!0),H[5]||(H[5]=m("div",{id:"bottom"},null,-1))],6)):R("",!0)}}),rh={id:"app-wrapper"},uh={key:2,class:"dev-toolbar"},ch=Ue({__name:"App",setup(e){const t=kn(),n=jo(),s=Qt(),o=it(),a=A(()=>o.isOpen||o.pendingOpen!=null),u=M(o.pendingOpen==null);Ae(()=>o.isOpen,B=>{B&&!u.value&&(u.value=!0)});const r=M(null),{animateOpen:i,animateClose:d,cancel:v}=Nu();o.onBeforeClose(async B=>{const K=r.value;K!=null&&await d(B,K)}),Ae(()=>o.isOpen,async B=>{if(!B||o.openedFromPending)return;await Je();const K=r.value,ce=o.assetId;K==null||ce==null||i(ce,K)}),Ae(()=>o.assetId,(B,K)=>{K==null||B==null||(o.consumeSkipNextDissolve(),o.notifyAssetReady())}),Ae(()=>o.pendingOpen,async B=>{if(B!=null)try{await n.isReady(),await n.replace(wr(B.context)),o.open(B)}catch(K){console.error("Failed to resolve pending overlay:",K),o.setPendingOpen(void 0),u.value=!0}},{immediate:!0});const f=A(()=>t.query.dev!=null),h=_i(),c=bn(),g=Ts(),C=jt(),F=tn();let L;const P=new Fu;let O;function T(){!C.paused&&Ya()&&C.resumeSSE()}const q=bi(()=>{c.handleResize(),h.handleResize()},25);function G(){window.addEventListener("resize",q,{passive:!0}),q()}function N(){window.removeEventListener("resize",q)}function j(B){g.setFullscreen(B)}function b(B){const K=history.state;if(o.consumeOverlayCloseExpected()){B.stopImmediatePropagation();return}if(K?.__psOverlay&&K.assetId!=null){B.stopImmediatePropagation(),o.isOpen?o.switchToHistoryAsset(K):o.reopenFromHistory(K);return}o.isOpen&&(B.stopImmediatePropagation(),o.close("replace"))}function se(){Rn()}function X(){document.hidden||Rn()}return gn(async()=>{window.addEventListener("popstate",b,!0),ja(),G(),Wa(),Is(j),ra("X-Settings",B=>F.set(Za(B))),window.addEventListener("focus",se),document.addEventListener("visibilitychange",X),L=setInterval(T,10*wn),window.matchMedia("(any-pointer: coarse)").matches||(P.resume(),tc(P)),O=new Va,kr()}),St(()=>{v(),window.removeEventListener("popstate",b,!0),window.removeEventListener("focus",se),document.removeEventListener("visibilitychange",X),N(),Uo(j),L!=null&&clearInterval(L),P.pause(),O?.destroy(),br()}),Qi((B,K,ce)=>{if(!ea(B)){const{text:de,details:he,type:ue}=ta(B);s.show({text:de,details:he,type:ue,uuid:"error-captured"})}return!0}),(B,K)=>{const ce=yn("RouterView");return p(),k("div",rh,[(p(),Se(Ji,{max:24},[u.value?(p(),Se(ce,{key:l(t).fullPath})):R("",!0)],1024)),a.value?(p(),k("div",{key:0,ref_key:"overlayRef",ref:r,class:"asset-overlay"},[l(o).isOpen?(p(),Se(lh,{key:0,assetId:l(o).assetId,from:l(o).from,priorAssetId:l(o).priorAssetId,context:l(o).context},null,8,["assetId","from","priorAssetId","context"])):R("",!0)],512)):R("",!0),u.value?(p(),Se(au,{key:1})):R("",!0),E(Er),E(Ou),E(Iu),E(ua),f.value?(p(),k("div",uh,[K[4]||(K[4]=m("span",{class:"dev-label"},"Toast:",-1)),m("a",{onClick:K[0]||(K[0]=de=>{l(s).show({type:"info",text:"This is a short description",details:"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua",buttons:[{text:"An action button",onClick:he=>he()},{text:"Flob gervinerhoosers",onClick:()=>{console.log("flobbed!")}}]})}),title:"Info toast"},[E(D,{icon:"info"})]),m("a",{onClick:K[1]||(K[1]=de=>l(s).success("Success","I did a thing! Praise me.")),title:"Success toast"},[E(D,{icon:"check"})]),m("a",{onClick:K[2]||(K[2]=de=>l(s).show({type:"warning",text:"Warning",details:"Warning message",buttons:[{text:"Dismiss",onClick:he=>he()}]})),title:"Warning toast"},[E(D,{icon:"warning"})]),m("a",{onClick:K[3]||(K[3]=de=>l(s).show({type:"error",text:"Error",details:"Error message",buttons:[{text:"Retry",onClick:he=>he()}]})),title:"Error toast"},[E(D,{icon:"close"})])])):R("",!0)])}}}),dh=Mo(ch,[["__scopeId","data-v-da4315ed"]]),fh="modulepreload",hh=function(e){return"/app/"+e},Oo={},$o=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let i=function(d){return Promise.all(d.map(v=>Promise.resolve(v).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),r=u?.nonce||u?.getAttribute("nonce");o=i(n.map(d=>{if(d=hh(d),d in Oo)return;Oo[d]=!0;const v=d.endsWith(".css"),f=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${f}`))return;const h=document.createElement("link");if(h.rel=v?"stylesheet":fh,v||(h.as="script"),h.crossOrigin="",h.href=d,r&&h.setAttribute("nonce",r),document.head.appendChild(h),v)return new Promise((c,g)=>{h.addEventListener("load",c),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${d}`)))})}))}function a(u){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=u,window.dispatchEvent(r),!r.defaultPrevented)throw u}return o.then(u=>{for(const r of u||[])r.status==="rejected"&&a(r.reason);return t().catch(a)})},Di=new Map,It=or({history:Ml(),routes:[{name:"tag",path:"/tag/:path*",component:()=>$o(()=>import("./Tag.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),props:e=>({fullPath:e.fullPath})},{name:"asset",path:"/asset/:assetId",component:{name:"AssetPlaceholder",render:()=>null},beforeEnter:e=>{const t=it(),n=Vo(e.params.assetId),s=e.query.context??void 0;return n==null?"/tag/":(t.isOpen||t.setPendingOpen({assetId:n,context:s}),!0)}},{name:"search",path:"/search",component:()=>$o(()=>import("./Search.js"),__vite__mapDeps([12,1,2,3,4,8,9,10,7,11,5])),props:e=>({query:e.query})},{path:"/:pathMatch(.*)*",redirect:"/tag/"}],scrollBehavior(e,t,n){if(st(e.hash))return{el:e.hash};const o=Di.get(e.fullPath)??n?.top??0;return o===0?{top:0,left:0}:new Promise(a=>{requestAnimationFrame(()=>{Ws(o),Bo()===0&&o>0&&setTimeout(()=>Ws(o),100),a(void 0)})})}});let ys=!1;It.beforeEach((e,t)=>{it().isOpen&&e.fullPath!==t.fullPath&&(ys=!0)});It.beforeEach((e,t)=>{Di.set(t.fullPath,Bo())});It.afterEach(()=>{ys&&(ys=!1,it().closeImmediate())});It.afterEach(()=>{if(!history.state?.__psOverlay)return;const e=it(),t=e.assetId;if(!e.isOpen||t==null)return;const n=ht({assetId:t,context:e.context??void 0});history.replaceState(history.state,"",n)});It.afterEach((e,t)=>{const n=jt();xn(e)&&!xn(t)?n.resumeSSE():xn(t)&&!xn(e)&&n.pauseSSE()});function xn(e){return e.path==="/tag"||e.path.startsWith("/tag/")}const Fn=na(dh);Fn.directive("tip",oa);Fn.use(sa());Fn.use(It);ca.setShim(e=>{e==="/splash"?document.location=e:It.push(e)});da.setShim(e=>{e==="/splash"?document.location.replace(e):It.replace(e)});Fn.mount("#mount");"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(()=>{});export{ur as A,jo as B,Th as C,sc as D,Ir as E,ri as F,Qf as G,Ch as H,bi as I,Ri as J,xe as T,Tc as _,xh as a,_i as b,it as c,ht as d,Mr as e,vi as f,tn as g,gd as h,pe as i,Rs as j,vd as k,ki as l,pn as m,Ts as n,Sc as o,_c as p,Cc as q,gi as r,pd as s,uc as t,kn as u,uu as v,Ah as w,Ph as x,_h as y,Et as z};
|
package/public/app/app.js.gz
CHANGED
|
Binary file
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026, PhotoStructure Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* BY USING THIS SOFTWARE, YOU ACCEPT ALL OF THE TERMS IN
|
|
5
|
+
* https://photostructure.com/eula
|
|
6
|
+
* IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THIS SOFTWARE
|
|
7
|
+
*/
|
|
8
|
+
@charset "UTF-8";:root{--color-bg: #242424;--color-bg-elevated: #333;--color-bg-overlay: rgba(0, 0, 0, .5);--color-bg-overlay-heavy: rgba(0, 0, 0, .75);--color-bg-input: rgba(0, 0, 0, .2);--color-bg-banner: rgba(0, 0, 0, .5);--color-text: #fff;--color-text-secondary: #ddd;--color-text-muted: #bbb;--color-text-dim: #888;--color-link: #1565a0;--color-link-bright: #64b5f6;--color-link-hover: #9ac7fb;--color-hover-tint: rgba(255, 255, 255, .1);--color-active-tint: rgba(255, 255, 255, .2);--color-focus-tint: rgba(255, 255, 255, .25);--color-focus-glow: rgba(146, 190, 248, .5);--color-border-subtle: rgba(255, 255, 255, .2);--color-tooltip-bg: #333;--color-tooltip-text: #eee;--color-error: #c82929;--color-error-bright: #f87171;--color-warning: #cf714d;--color-warning-bright: #fbbf24;--color-no-library: #dec435;--color-success: #4c964e;--color-success-bright: #40c270;--color-info: #54a2f0;--color-info-bright: #60a5fa;--color-error-bg: linear-gradient(135deg, #3a1a1a 0%, #4a2020 100%);--color-warning-bg: linear-gradient(135deg, #3a2a1a 0%, #4a3520 100%);--color-no-library-bg: linear-gradient(135deg, #3a3a1a 0%, #4a4520 100%);--color-btn-primary-bg: #2f7fbe;--color-btn-primary-hover: #4a9ad4;--color-btn-accent: #64b5f6;--color-btn-accent-hover: #9ac7fb;--color-btn-danger-bg: #d61200;--color-btn-danger-hover: #ec1400;--color-btn-warning-bg: #5c4a1e;--color-btn-warning-hover: #ffa807;--color-btn-warning-text: #fbbf24;--color-btn-disabled-bg: #555;--color-btn-disabled-text: #888;--color-btn-grey-bg: #444;--color-btn-grey-text: #ddd;--color-btn-grey-hover: #555;--color-btn-small-bg: #3a3f48;--color-btn-small-hover: #2a3a5a;--color-btn-small-hover-text: #9ac7fb;--color-on-accent: #fff;--color-section-bg: #2a2a2e;--color-section-text: #ddd;--color-section-heading: #aaa;--color-section-text-muted: #888;--color-section-link: #64b5f6;--color-section-link-hover: #9ac7fb;--color-section-header-bg: #333;--color-section-header-hover: #3a3a3a;--color-section-border: #282828;--color-section-input-border: #555;--color-section-status-info: #64b5f6;--color-section-status-success: #40c270;--color-section-status-warning: #fbbf24;--color-section-status-error: #f87171;--color-row-group-bg: rgba(255, 255, 255, .04);--color-nav-bg: #111;--color-chip-bg: #333;--color-chip-border: #000;--color-scrim: rgba(0, 0, 0, .5);--color-toast-bg: linear-gradient( 135deg, hsl(278, 25%, 20%) 0%, hsl(220, 30%, 20%) 50%, hsl(180, 20%, 21%) 100% );--color-toast-bg-hover: linear-gradient( 135deg, hsl(278, 25%, 24%) 0%, hsl(220, 30%, 24%) 50%, hsl(180, 20%, 25%) 100% );--color-toast-text: #eee;--color-badge-bg: rgba(0, 0, 0, .4);--color-badge-bg-hover: rgba(0, 0, 0, .7);--color-badge-text: #fff;--color-asset-bg: #242424;--color-asset-info-bg: #121212;--color-asset-overlay: rgba(0, 0, 0, .5);--color-asset-overlay-heavy: rgba(0, 0, 0, .85);--color-asset-toolbar: rgba(0, 0, 0, .9);--color-asset-text: #eee;--color-asset-text-muted: #aaa;--color-asset-icon: rgba(255, 255, 255, .75);--color-asset-nav-bg: rgba(0, 0, 0, .2);--color-asset-nav-bg-hover: rgba(0, 0, 0, .3);--color-asset-link: #aedbff;--color-asset-context-start: #6dc6fd;--color-asset-context-end: #cd6cfe;--color-icon-favorite: #ff0037;--color-icon-unarchive: #f6c654;--color-icon-library-add: #6efff3;--color-icon-trash-restore: #48c0f0;--gradient-header: linear-gradient(to right, #2196f3 0%, #e91e63 100%);--gradient-page: linear-gradient( 135deg, hsl(278, 40%, 22%) 0%, hsl(209, 44%, 22%) 50%, hsl(156, 39%, 24%) 100% );--gradient-page2: linear-gradient( 135deg, hsl(278, 65%, 22%) 0%, hsl(209, 65%, 22%) 50%, hsl(156, 65%, 24%) 100% );--gradient-btn: linear-gradient( 135deg, hsl(204, 78%, 45%) 0%, hsl(293, 60%, 45%) 100% );--gradient-surface: linear-gradient(135deg, #12252b, #201730, #321528);--gradient-metric-text: linear-gradient( 90deg, #64b5f6, #ce93d8, #f48fb1, #ce93d8, #64b5f6 );--color-heading: #767676;--color-pill-bg: #317445;--color-pill-plus: hsl(285, 100%, 30%);--color-pill-plus-bg: hsl(285, 65%, 81%);--color-pill-lite-bg: #555;--color-plus: #a030dd;--color-lite: #888;--color-blockquote-bg: #f3f5ff;--color-blockquote-border: #9ea8df;--color-blockquote-quote: #505c9e;--color-details-bg: linear-gradient( 135deg, #352840 0%, #283040 50%, #284038 100% );--color-level-fatal-bg: #4a1a30;--color-level-fatal-text: #e88aaf;--color-level-error-bg: #502020;--color-level-error-text: #f87171;--color-level-warn-bg: #3d3818;--color-level-warn-text: #e5c43a;--color-level-warn-border: #c4a008;--color-level-warn-hover: #4a4420;--color-progress-done: #02790e;--color-progress-complete: #0068a0;--color-progress-incomplete: #6cb1e9;--color-progress-paused: #775905;--color-progress-done-text: #82ce8a;--color-progress-paused-text: #c7941d;--color-severity-low: #ca8a04;--color-severity-high: #ea580c;--color-severity-permanent: #dc2626;--color-modal-bg: #2a2a2e;--color-message-info-bg: #c8e6c9;--color-message-success-bg: #1e4a2e;--color-message-success-text: #e8f5e9;--color-animation-highlight: #675934;--color-brand-plus-bright: #d050d0;--color-pill-purple: #3f33a7;--color-spinner-primary: #0ba3d2;--color-spinner-secondary: #400bd2;--color-spinner-tertiary: #d20ba0;--color-asset-dismiss: #88f;--color-asset-dismiss-hover: #aaf;--color-chip-hover: #444;--color-pill-pro-text: #fbd38d;--gradient-pill-pro: linear-gradient( 135deg, hsl(35, 60%, 25%) 0%, hsl(45, 70%, 30%) 100% );--color-syntax-key: #64b5f6;--color-syntax-string: #81c784;--color-syntax-number: #ffd54f;--color-syntax-boolean: #ce93d8;--color-syntax-null: #999;--color-input-border: #bbb;--color-input-focus: #1565a0;--color-input-warn-focus: #775701;--color-input-error-bg: #dc3545;--color-input-warn-bg: #504728;--color-input-warn-text: #361800;--color-input-placeholder: #888;color-scheme:dark}:root.light{--color-bg: #ddd;--color-bg-elevated: #efefef;--color-bg-overlay: rgba(0, 0, 0, .3);--color-bg-overlay-heavy: rgba(0, 0, 0, .5);--color-bg-input: rgba(0, 0, 0, .06);--color-bg-banner: rgba(255, 255, 255, .85);--color-text: #1a1a1a;--color-text-secondary: #333;--color-text-muted: #666;--color-text-dim: #999;--color-link-bright: #1565a0;--color-link-hover: #1976d2;--color-animation-highlight: #ffd86b;--color-hover-tint: rgba(0, 0, 0, .05);--color-active-tint: rgba(0, 0, 0, .1);--color-focus-tint: rgba(0, 0, 0, .12);--color-focus-glow: rgba(21, 101, 160, .5);--color-border-subtle: rgba(0, 0, 0, .12);--color-tooltip-bg: #f0f0f0;--color-tooltip-text: #333;--color-chip-bg: #eee;--color-chip-border: #aaa;--color-chip-hover: #ddd;--color-scrim: rgba(0, 0, 0, .3);--color-heading: #555;--color-toast-bg: linear-gradient( 45deg, hsl(278, 30%, 90%) 0%, hsl(220, 30%, 92%) 50%, hsl(180, 30%, 91%) 100% );--color-toast-bg-hover: linear-gradient( 45deg, hsl(278, 30%, 95%) 0%, hsl(220, 30%, 96%) 50%, hsl(180, 30%, 96%) 100% );--color-toast-text: #242424;--color-section-bg: #f0f0f0;--color-section-text: #333;--color-section-heading: #666;--color-section-text-muted: #888;--color-section-link: #06579a;--color-section-link-hover: #3894e0;--color-section-header-bg: #e4e4e4;--color-section-header-hover: #ddd;--color-section-border: #ccc;--color-section-input-border: #bbb;--color-row-group-bg: rgba(0, 0, 0, .03);--color-section-status-info: #06579a;--color-section-status-success: #1b5e20;--color-section-status-warning: #92400e;--color-section-status-error: #b91c1c;--color-severity-low: #92400e;--color-severity-high: #c2410c;--color-severity-permanent: #b91c1c;--color-error-bg: linear-gradient(135deg, #fedcdc 0%, #e0a8a8 100%);--color-warning-bg: linear-gradient(135deg, #fdddcf 0%, #ebae94 100%);--color-no-library-bg: linear-gradient(135deg, #fdf2c7 0%, #e6d48d 100%);--color-modal-bg: #efefef;--color-level-fatal-bg: #f5d0e0;--color-level-fatal-text: #8b1a4a;--color-level-error-bg: #fcdcdc;--color-level-error-text: #a71d2a;--color-level-warn-bg: #fef3c7;--color-level-warn-text: #78590c;--color-level-warn-hover: #fceeb0;--color-asset-bg: #ddd;--color-asset-info-bg: #ebebeb;--color-asset-overlay: rgba(255, 255, 255, .6);--color-asset-overlay-heavy: rgba(255, 255, 255, .85);--color-asset-text: #333;--color-asset-text-muted: #666;--color-asset-icon: rgba(0, 0, 0, .6);--color-asset-nav-bg: rgba(255, 255, 255, .3);--color-asset-nav-bg-hover: rgba(255, 255, 255, .45);--color-asset-toolbar: rgba(240, 240, 240, .92);--color-asset-link: #1565a0;--color-btn-accent: #1565a0;--color-btn-accent-hover: #1976d2;--color-btn-disabled-bg: #bbb;--color-btn-disabled-text: #777;--color-btn-grey-bg: #c8c8c8;--color-btn-grey-text: #333;--color-btn-grey-hover: #bbb;--color-btn-warning-bg: #ffecb3;--color-btn-warning-text: #5c3a00;--color-message-success-bg: #d4edda;--color-message-success-text: #155724;--color-btn-small-bg: #efefef;--color-btn-small-hover: #dde6f8;--color-btn-small-hover-text: #003c66;--color-details-bg: linear-gradient( 135deg, #ece5f0 0%, #e3e9ed 50%, #ddece6 100% );--gradient-metric-text: linear-gradient( 90deg, #055398, #400480, #960b61, #400480, #055398 );--color-syntax-key: #06579a;--color-syntax-string: #2e7d32;--color-syntax-number: #d4a005;--color-syntax-boolean: #7b1fa2;--gradient-page: linear-gradient( 135deg, hsl(278, 30%, 90%) 0%, hsl(209, 34%, 92%) 50%, hsl(156, 29%, 92%) 100% );--gradient-page2: linear-gradient( 135deg, hsl(278, 40%, 80%) 0%, hsl(209, 40%, 80%) 50%, hsl(156, 40%, 80%) 100% );--gradient-surface: linear-gradient(135deg, #dde8ec, #e4dbed, #ebdbe6);color-scheme:light}html,*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;min-height:100%}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:400;src:url(/app/roboto-v30-latin-regular.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:400;src:url(/app/roboto-v30-latin-italic.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:normal;font-weight:700;src:url(/app/roboto-v30-latin-700.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto;font-style:italic;font-weight:700;src:url(/app/roboto-v30-latin-700italic.woff2) format("woff2")}*{font-family:Roboto,sans-serif,AppleColorEmoji,Noto Sans,"Noto Color Emoji",ヒラギノ角ゴ Pro W3,Hiragino Kaku Gothic Pro,HiraKakuProN-W3,メイリオ,Meiryo,游ゴシック,YuGothic,Yu Gothic,MS ゴシック,MS Gothic,-apple-system,".LastResort"}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:400;src:url(/app/roboto-mono-v22-latin-regular.woff2) format("woff2")}@font-face{font-display:swap;font-family:Roboto Mono;font-style:normal;font-weight:700;src:url(/app/roboto-mono-v22-latin-700.woff2) format("woff2")}i{display:inline-block;background-repeat:no-repeat;background-size:contain;background-position:center;vertical-align:text-bottom}i.emj{width:1.5em;height:1.5em}i.emj.lg{width:64px;height:64px}i.emj.med{width:48px;height:48px}i.emj.smol{height:20px;width:20px;margin:0 4px 0 0}i.emj.antenna{content:url(/images/antenna.svg)}i.emj.ballot-box{content:url(/images/ballot-box.svg)}i.emj.bar-chart{content:url(/images/bar-chart.svg)}i.emj.bank{content:url(/images/bank.svg)}i.emj.beetle{content:url(/images/beetle.svg)}i.emj.birthday{content:url(/images/birthday.svg)}i.emj.bookmark-tabs{content:url(/images/bookmark-tabs.svg)}i.emj.books{content:url(/images/books.svg)}i.emj.books-desat{content:url(/images/books-desat.svg)}i.emj.busy-circles{content:url(/images/busy-circles.svg)}i.emj.busy-dots{content:url(/images/busy-dots.svg)}i.emj.calendar{content:url(/images/calendar.svg)}i.emj.camera{content:url(/images/camera.svg)}i.emj.card-box{content:url(/images/card-box.svg)}i.emj.cd{content:url(/images/cd.svg)}i.emj.chart{content:url(/images/chart.svg)}i.emj.check{content:url(/images/green-check.svg)}i.emj.checkered-flag{content:url(/images/checkered-flag.svg)}i.emj.clock{content:url(/images/clock.svg)}i.emj.computer{content:url(/images/computer.svg)}i.emj.cpu{content:url(/images/cpu.svg)}i.emj.crane{content:url(/images/crane.svg)}i.emj.cross-mark{content:url(/images/cross-mark.svg)}i.emj.dvd{content:url(/images/dvd.svg)}i.emj.emergency-light{content:url(/images/emergency-light.svg)}i.emj.error{content:url(/images/error.svg)}i.emj.expressionless{content:url(/images/expressionless.svg)}i.emj.file-cabinet{content:url(/images/file-cabinet.svg)}i.emj.floppy{content:url(/images/floppy.svg)}i.emj.gift{content:url(/images/gift.svg)}i.emj.green-check{content:url(/images/green-check.svg)}i.emj.handshake{content:url(/images/handshake.svg)}i.emj.heart{content:url(/images/heart.svg)}i.emj.home{content:url(/images/home.svg)}i.emj.info{content:url(/images/info.svg)}i.emj.library{content:url(/images/library.svg)}i.emj.lite{content:url(/images/logo-lite.svg)}i.emj.logo-dark{content:url(/images/logo-dark.svg)}i.emj.microscope{content:url(/images/microscope.svg)}i.emj.minidisc{content:url(/images/minidisc.svg)}i.emj.movie-camera{content:url(/images/movie-camera.svg)}i.emj.new-yellow{content:url(/images/new-yellow.svg)}i.emj.open-book{content:url(/images/open-book.svg)}i.emj.open-folder{content:url(/images/open-folder.svg)}i.emj.pause{content:url(/images/pause.svg)}i.emj.plus{content:url(/images/logo-plus.svg)}i.emj.refresh{content:url(/images/refresh.svg)}i.emj.rocket{content:url(/images/rocket.svg)}i.emj.sad-cat{content:url(/images/sad-cat.svg)}i.emj.safe{content:url(/images/safe.svg)}i.emj.scales{content:url(/images/scales.svg)}i.emj.seedling{content:url(/images/seedling.svg)}i.emj.shield{content:url(/images/shield.svg)}i.emj.sleeping-face-desat{content:url(/images/sleeping-face-desat.svg)}i.emj.sparkles{content:url(/images/sparkles.svg)}i.emj.star2{content:url(/images/star2.svg)}i.emj.starry-night{content:url(/images/starry-night.svg)}i.emj.stethoscope{content:url(/images/stethoscope.svg)}i.emj.stop{content:url(/images/stop.svg)}i.emj.surf{content:url(/images/surf.svg)}i.emj.tada{content:url(/images/tada.svg)}i.emj.thinking{content:url(/images/thinking.svg)}i.emj.thumbs-down{content:url(/images/thumbs-down.svg)}i.emj.thumbs-up{content:url(/images/thumbs-up.svg)}i.emj.tools{content:url(/images/tools.svg)}i.emj.toolbox{content:url(/images/toolbox.svg)}i.emj.umbrella{content:url(/images/umbrella.svg)}i.emj.wave{content:url(/images/wave.svg)}i.emj.warning{content:url(/images/warning.svg)}i.emj.wrench{content:url(/images/wrench.svg)}i.emj.xray{content:url(/images/xray.svg)}i.emj.zzz{content:url(/images/zzz.svg)}.left-fill-right,.left-middle-right{display:grid}.left-fill-right>*,.left-middle-right>*{min-width:0}.left-fill-right .left,.left-middle-right .left,.left-fill-right .middle,.left-middle-right .middle,.left-fill-right .right,.left-middle-right .right{display:flex;grid-auto-flow:column}.left-fill-right .left,.left-middle-right .left{justify-self:start}.left-fill-right .right,.left-middle-right .right{justify-self:end}.left-middle-right{grid-template-columns:1fr auto 1fr}.left-fill-right{grid-template-columns:auto 1fr auto}body{transition:opacity .3s;opacity:1!important}tt,code{font-family:Roboto Mono,monospace,AppleColorEmoji,Noto Mono,-apple-system,".LastResort"}p,div,span,li,button{font-size:14px}p,li{line-height:25px}body,main{-webkit-overflow-scrolling:touch}h1,h2,h3,h4,h5,h6{color:var(--color-heading);font-weight:400;line-height:1.2em}h1,h2{margin:2em 0 .75em}h3,h4,h5,h6{margin:2em 0 .5em}button{cursor:pointer}.thin{font-weight:lighter}.grey{color:var(--color-section-text)}.warning{color:var(--color-error);font-weight:700}h1{font-size:32px}h2{font-size:24px}h3,h4,h5,h6{font-size:18px}.bold{font-weight:700}.fs11{font-size:11px}.fs12{font-size:12px}.fs13{font-size:13px}.fs14{font-size:14px}.fs15{font-size:15px}.fs16{font-size:16px}.fs22{font-size:22px}.mw100{min-width:100%}.mh100vh{min-height:100vh}.mhauto{margin-left:auto;margin-right:auto}.center{text-align:center;margin-left:auto;margin-right:auto}.container{padding:12px 5vw}dfn{font-style:normal}ol{list-style-type:none;margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px;padding-inline-start:0}.section,section{padding:24px 32px;margin:24px auto;border-radius:4px;box-shadow:0 2px 5px #000000b3}a{color:var(--color-link-bright)}.pr{position:relative}.pl1em{padding-left:1em}.pr1em{padding-right:1em}.pt1em{padding-top:1em}.pb1em{padding-bottom:1em}.pt2em{padding-top:2em}.pb2em{padding-bottom:2em}.mc{margin-left:auto;margin-right:auto}.mt1em{margin-top:1em}.mb1em{margin-bottom:1em}.mt2em{margin-top:2em}.mb2em{margin-bottom:2em}.mt3em{margin-top:3em}.mt4em{margin-top:4em}.mt5em{margin-top:5em}.ml1em{margin-left:1em}.ml2em{margin-left:2em}.mr1em{margin-right:1em}.lh2{line-height:2em}.w80{width:80%}.pt{padding-top:2.5em}.break-word{word-break:normal;overflow-wrap:anywhere}.safari .break-word{word-break:break-word}.grid-center{display:grid;justify-items:center;align-items:center;width:100%}.flex-align-items-center{display:flex;align-items:center}.pill{font-size:12px;text-transform:uppercase;line-height:normal;color:var(--color-text);background-color:var(--color-pill-bg);border-radius:4px;padding:5px 8px;vertical-align:baseline}.pill.green{background-color:var(--color-success)}.pill.purple{background-color:var(--color-pill-purple)}.relative{position:relative}blockquote{display:inline-block;background-color:var(--color-blockquote-bg);padding:16px 32px 16px 56px;border-left:4px solid var(--color-blockquote-border);line-height:32px}blockquote:before{font-family:Times New Roman,Times,serif;font-size:82px;color:var(--color-blockquote-quote);content:"“";position:absolute;left:4px;top:48px}blockquote,blockquote a{font-family:Palatino Linotype,Book Antiqua,Palatino,serif;font-style:italic;font-size:20px}blockquote .cite{float:right}.plus,.lite{text-transform:uppercase;font-weight:700}.lite{color:var(--color-lite)}.plus{color:var(--color-plus)}.pill{font-size:80%}.pill.plus{background-color:var(--color-pill-plus-bg);color:var(--color-text)}.pill.lite{background-color:var(--color-pill-lite-bg);color:var(--color-text-secondary)}.shadow{box-shadow:0 6px 3px -3px #0003}.shadow2{box-shadow:0 2px 2px -2px #0003}.details{color:var(--color-text-dim)}details{transition:all .5s;margin-bottom:16px;border-radius:4px}details summary.more-details:after{content:"More details"}details summary>*{display:inline}details summary{color:var(--color-section-link);cursor:pointer;padding:12px;border-radius:8px;transition:all .5s;width:100%}details[open]{margin-bottom:24px;padding:12px 24px;background:var(--color-details-bg);box-shadow:0 1px 3px #0006}details[open] summary.more-details:after{content:"Hide details"}@media(max-width:540px){details[open]{padding:0 0 12px;box-shadow:none}}.emjlist{padding-left:42px;text-indent:-45px}#confetti-canvas{z-index:999999;pointer-events:none;position:absolute;top:0;left:0;width:calc(100vw - 24px);height:calc(100vh - 24px)}table.bmd{border-collapse:collapse;margin:.5em 0;width:100%;table-layout:auto}table.bmd th,table.bmd td{padding:.3em .6em;word-wrap:break-word;overflow-wrap:break-word}table.bmd th{border-bottom:1px solid rgba(128,128,128,.3);font-weight:600}table.bmd td{font-weight:400;white-space:pre-wrap}table.bmd tr:nth-child(2n) td{background-color:#80808014}.ta-center{text-align:center}.ta-right{text-align:right}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@keyframes dropIn{0%{opacity:0;transform:translateY(-20%)}to{opacity:1;transform:translateY(0)}}.dropin{animation:1s cubic-bezier(0,0,.26,1.01) 0s 1 dropIn}@keyframes leftIn{0%{opacity:0;transform:translate(50%)}to{opacity:1;transform:translate(0)}}.anim-slide-in-left{animation:.3s ease 0s 1 leftIn}@keyframes rightOut{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(50%)}}.anim-slide-out-right{animation:.2s ease 0s 1 rightOut}.reveal,.reveal1s,.reveal2s,.reveal6s{animation-fill-mode:forwards}@keyframes reveal50{0%{opacity:0}50%{opacity:0}to{opacity:1}}.reveal{animation:.35s reveal50}.reveal1s{animation:1s reveal50}.reveal2s{animation:2s reveal50}@keyframes reveal80{0%{opacity:0}80%{opacity:0}to{opacity:1}}.reveal6s{animation:6s reveal80}.zoom-reveal{animation:.4s zoom-reveal;animation-fill-mode:both;animation-timing-function:ease}@keyframes zoom-reveal{0%{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}.anim-flash{animation-name:flash-animation;animation-duration:2s}@keyframes flash-animation{0%{background:default}25%{background:var(--color-animation-highlight)}to{background:default}}.fade-enter-active,.fade-leave-active{transition:opacity .2s}.fade-enter-from,.fade-leave-to{opacity:0}@keyframes pulse-opacity{0%,to{opacity:.75}50%{opacity:1}}.anim-pulse{animation:pulse-opacity 1.8s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.anim-pulse{animation:none}}:root{--header-height: 42px}.flex-center{display:flex;align-items:center;align-content:center;justify-content:center}.ani-slide-leave-active{transition:transform .1s ease,opacity .1s ease;transform:scale(.75);opacity:0}.ani-slide-leave-from{transform:scale(1);opacity:1}.ani-slide-enter-active{transition:transform .1s ease,opacity .1s ease;transform:scale(1);opacity:1}.ani-slide-enter-from{transform:scale(.75);opacity:0}.dropdown{position:relative}.dropdown .scrim{background-color:var(--color-bg-input);position:fixed;inset:0;z-index:1;cursor:pointer;-webkit-tap-highlight-color:transparent}.dropdown .slot{display:block;border-radius:50%;transition:all .1s}.dropdown .details{padding-top:4px}.dropdown .dialog,.dropdown .dialog *,.dropdown .dialog a{color:var(--color-text);fill:var(--color-text)}.dropdown .dialog{position:fixed;margin:4px;z-index:8;background-color:var(--color-bg);box-shadow:0 2px 6px 2px var(--color-chip-border);display:grid;grid-template-columns:auto;border-radius:4px;max-height:90vh;max-width:90vw;overflow-x:hidden;overflow-y:auto}.dropdown .dialog.flex-row{display:flex;flex-flow:row wrap}.dropdown .dialog *{white-space:nowrap}.dropdown .dialog h1,.dropdown .dialog h2,.dropdown .dialog h3,.dropdown .dialog h4,.dropdown .dialog h5{grid-column-start:1;grid-column-end:-1;display:grid;place-self:center;margin:16px 16px 8px;text-wrap:wrap;text-align:center;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-muted)}.dropdown .dialog hr{width:100%;border:1px solid var(--color-border-subtle);grid-column-start:1;grid-column-end:-1}.dropdown .dialog.col2{grid-template-columns:auto auto}.dropdown .dialog .col1,.dropdown .dialog .col2{color:var(--color-text);display:grid;grid-template-columns:auto 1fr;align-items:center;padding:8px 12px}.dropdown .dialog .col1{justify-self:end}.dropdown .dialog a{color:var(--color-text);padding:8px 12px;display:grid;align-items:center;grid-template-columns:auto 1fr;transition:all .25s;background-color:transparent;text-decoration:none}@media(hover:hover){.dropdown .dialog a:hover{background-color:var(--color-active-tint);color:var(--color-text-secondary)}}.dropdown .dialog a.copied,.dropdown .dialog a.copied svg{color:var(--color-success);fill:var(--color-success)}.dropdown .dialog a svg{width:24px;height:24px;fill:var(--color-text)}.dropdown .dialog a>*{margin:8px}@media(min-width:540px){.dropdown .dialog.col3{grid-template-columns:auto auto auto}}.slide-up-enter-active{transition:transform .25s cubic-bezier(.32,.72,0,1),opacity .2s ease}.slide-up-leave-active{transition:transform .2s cubic-bezier(.32,.72,0,1),opacity .15s ease}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(100%);opacity:0}.slide-up-enter-to,.slide-up-leave-from{transform:translateY(0);opacity:1}.dropdown-btn{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:4px;border:1px solid transparent;background-color:var(--color-btn-small-bg);color:var(--color-btn-accent);fill:var(--color-btn-accent);font-weight:700;font-size:16px;cursor:pointer;text-decoration:none;box-shadow:0 1px 3px #0006;transition:.3s all}.dropdown-btn svg{width:18px;height:18px}@media(hover:hover){.dropdown-btn:hover{background-color:var(--color-btn-small-hover);color:var(--color-btn-small-hover-text);fill:var(--color-btn-small-hover-text);box-shadow:0 1px 4px #00000080}}.dropdown .dialog.bottom-sheet{top:auto!important;left:0!important;right:0!important;bottom:calc(env(safe-area-inset-bottom,0px) + 8px)!important;width:calc(100% - 16px);max-width:calc(100vw - 16px);margin:0 8px;border-radius:16px;max-height:calc(100vh - 2 * var(--header-height));max-height:calc(100dvh - 2 * var(--header-height));grid-template-columns:1fr}.dropdown .dialog.bottom-sheet a,.dropdown .dialog.bottom-sheet span,.dropdown .dialog.bottom-sheet .col1,.dropdown .dialog.bottom-sheet .col2{overflow:hidden;text-overflow:ellipsis}.dropdown .dialog.bottom-sheet a{grid-template-columns:auto 1fr;min-width:0}.dropdown .dialog.bottom-sheet a>*:last-child{overflow:hidden;text-overflow:ellipsis}.dropdown .dialog.bottom-sheet .child-list{max-width:none;max-height:none;overflow-y:visible}.dropdown .dialog.bottom-sheet.dragging{transition:none!important}.dropdown .dialog.bottom-sheet .sheet-handle{width:100%;height:28px;cursor:grab;display:flex;align-items:center;justify-content:center;overflow:visible}.dropdown .dialog.bottom-sheet .sheet-handle:after{content:"";width:36px;height:4px;background-color:var(--color-focus-tint);border-radius:2px}html:has(body.electron.mac){scrollbar-gutter:auto}body.electron.mac{overflow:hidden}body.electron.mac header+main{overflow-y:auto;scroll-behavior:smooth;margin-top:var(--header-height);height:calc(100vh - var(--header-height));padding-top:0}body.electron.mac .drag-bar+main{overflow-y:auto;scroll-behavior:smooth;height:100vh}body.electron.mac .drag-bar+main::-webkit-scrollbar{width:10px}body.electron.mac .drag-bar+main::-webkit-scrollbar-thumb{background:var(--color-border-subtle);border-radius:5px}body.electron.mac .drag-bar+main::-webkit-scrollbar-thumb:hover{background:var(--color-text-dim)}body.electron.mac .container{padding-top:0}body.electron.mac .drag-bar{position:fixed;top:0;left:0;right:0;height:var(--header-height);z-index:0;-webkit-app-region:drag}body.electron.mac header{-webkit-app-region:drag}body.electron.mac header a,body.electron.mac header button,body.electron.mac header select,body.electron.mac header input,body.electron.mac header .dropdown{-webkit-app-region:no-drag}body.electron.mac .sticky{top:-1px}.electron.mac header{padding-left:var(--traffic-light-margin, 90px)}.electron.mac.fs header{padding-left:0}.electron.mac.nav-pinned header{padding-left:0}.electron.mac #nav-menu{padding-top:var(--header-height)}.electron.mac #nav-menu:before{content:"";position:absolute;top:0;left:0;right:0;height:var(--header-height);-webkit-app-region:drag}.electron.mac.fs #nav-menu{padding-top:8px}.electron.mac.fs #nav-menu:before{display:none}.electron.mac #nav-menu .top{padding-top:8px}.electron.mac #nav-menu .top .nav-close{top:calc(-1 * var(--header-height) + (var(--header-height) - 32px) / 2)}.electron.mac.fs #nav-menu .top .nav-close{top:8px}a.external-link:after{content:"";display:inline-block;width:14px;height:14px;margin-left:4px;background-color:currentColor;mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/></svg>");mask-repeat:no-repeat;mask-size:contain;-webkit-mask-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z'/></svg>");-webkit-mask-repeat:no-repeat;-webkit-mask-size:contain;align-self:center}.bg-color-gradient,header.tag-header,header.search-header{background:var(--gradient-header)}header.tag-header,header.tag-header *,header.tag-header a,header.tag-header .crumb ol li .info,header.tag-header li.asset-caption,header.search-header,header.search-header *,header.search-header a,header.search-header .crumb ol li .info,header.search-header li.asset-caption,header.bg-color-gradient,header.bg-color-gradient *,header.bg-color-gradient a,header.bg-color-gradient .crumb ol li .info,header.bg-color-gradient li.asset-caption{color:var(--color-on-accent);fill:var(--color-on-accent)}header{z-index:3;align-items:center;grid-auto-flow:column;position:fixed;left:0;right:0;top:0}header.nav-aware{left:var(--nav-inset)}header{height:calc(var(--header-height) + .5px);line-height:normal;transition:all .3s ease!important}header *,header a{transition:all .3s ease!important;color:var(--color-text);font-size:14px}header .logo{width:25px;height:25px;fill:var(--color-text)}header img.mark{height:24px}header .vicon,header label.zoom{color:var(--color-asset-icon);fill:var(--color-asset-icon);transition:all .25s}header .vicon.active,header label.zoom.active{color:var(--color-text);fill:var(--color-text)}header .vicon.copied,header label.zoom.copied{color:var(--color-success);fill:var(--color-success)}header .vicon,header .empty-vicon{width:41px;height:41px}header a,header a:hover{border-bottom:none}header .title,header .crumb{height:100%;flex-grow:1;align-self:center;justify-self:stretch;display:flex;align-items:center;align-content:center;justify-content:center}header .title{gap:8px}header .text,header .text>*{font-size:16px;font-weight:700;line-height:1}header .header-action-label{white-space:nowrap;opacity:.9;transition:opacity .15s ease!important}header .brand span{padding-left:16px}header .menu{padding:1em;transition:background-color .3s}header .menu:hover{background-color:var(--color-focus-tint)}header .button-group.disabled{opacity:.8;color:var(--color-btn-grey-text)}header .button-group.disabled button,header .button-group.disabled select{pointer-events:none;cursor:not-allowed}.header-overflow .dropdown .dialog{min-width:180px}.header-overflow .dropdown .dialog .dropdown-row{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;gap:12px}.header-overflow .dropdown .dialog .dropdown-row.disabled{opacity:.7}.header-overflow .dropdown .dialog .dropdown-row.disabled select,.header-overflow .dropdown .dialog .dropdown-row.disabled button{pointer-events:none;cursor:not-allowed;color:var(--color-text-muted)}.header-overflow .dropdown .dialog .dropdown-row .label{color:var(--color-text-muted);font-size:14px}.header-overflow .dropdown .dialog .dropdown-row .count{min-width:24px;text-align:center;font-size:14px}.header-overflow .dropdown .dialog .dropdown-row .row-input{width:48px;text-align:center;text-align-last:center;font-size:14px;color-scheme:dark;background-color:transparent;border:1px solid var(--color-border-subtle);border-radius:4px;color:var(--color-text);padding:6.5px 16px 6.5px 4px;min-height:32px;cursor:pointer}.header-overflow .dropdown .dialog .dropdown-row .row-input:focus{border-color:#fff6}.header-overflow .dropdown .dialog .dropdown-row .row-input option{background:var(--color-bg-elevated);color:var(--color-text-secondary)}.header-overflow .dropdown .dialog .dropdown-row .button-group{display:flex;gap:8px}.header-overflow .dropdown .dialog .dropdown-row .button-group button{min-width:32px;height:32px;padding:4px 6px;border:none;border-radius:4px;background:var(--color-hover-tint);color:var(--color-text);cursor:pointer;display:flex;gap:8px;align-items:center;justify-content:center}@media(hover:hover){.header-overflow .dropdown .dialog .dropdown-row .button-group button:hover{background:var(--color-active-tint)}}.header-overflow .dropdown .dialog .dropdown-row .button-group button.selected{background:var(--color-active-tint)}.header-overflow .dropdown .dialog .dropdown-row .button-group button.disabled{opacity:.4;cursor:not-allowed}.header-overflow .dropdown .dialog .dropdown-row .button-group button svg{width:18px;height:18px}.btn{border-radius:4px;transition:.3s;font-weight:700;box-shadow:0 1px 3px #0006;display:flex;align-items:center;justify-content:center;grid-gap:6px}.btn svg{flex-shrink:0}.btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:1}.btn.large{color:var(--color-on-accent);fill:var(--color-on-accent);background-color:var(--color-btn-primary-bg)}@media(hover:hover){.btn.large:hover{background-color:var(--color-btn-primary-hover)}}.btn.small{padding:6px 12px;color:var(--color-btn-accent);fill:var(--color-btn-accent);border:1px solid transparent;background-color:var(--color-btn-small-bg)}@media(hover:hover){.btn.small:hover{background-color:var(--color-btn-small-hover);color:var(--color-btn-small-hover-text);fill:var(--color-btn-small-hover-text)}}.btn.text{box-shadow:none;border:none}.btn.error{border:none;font-weight:700;background-color:var(--color-btn-danger-bg);color:var(--color-on-accent);fill:var(--color-on-accent)}@media(hover:hover){.btn.error:hover{background-color:var(--color-btn-danger-hover)}}.btn.warning{border:none;font-weight:700;background-color:var(--color-btn-warning-bg);color:var(--color-btn-warning-text);fill:var(--color-btn-warning-text)}@media(hover:hover){.btn.warning:hover{background-color:var(--color-btn-warning-hover)}}.btn.info{border:none;font-weight:700;background-color:var(--color-btn-primary-bg);color:var(--color-on-accent);fill:var(--color-on-accent)}@media(hover:hover){.btn.info:hover{background-color:var(--color-btn-primary-hover)}}.btn.disabled{border:none;color:var(--color-btn-disabled-text);fill:var(--color-btn-disabled-text);background-color:var(--color-btn-disabled-bg);font-weight:700;cursor:not-allowed}.btn.grey{border:none;font-weight:700;background-color:var(--color-btn-grey-bg);color:var(--color-btn-grey-text);fill:var(--color-btn-grey-text)}@media(hover:hover){.btn.grey:hover{background-color:var(--color-btn-grey-hover);color:var(--color-btn-grey-text);fill:var(--color-btn-grey-text)}}@media(hover:hover){.btn:hover{box-shadow:0 2px 8px #00000040}}.buttons{display:flex;flex-wrap:wrap;gap:8px 12px}.vicon{background:none;border:none;display:grid;justify-items:center;align-items:center;border-radius:50%;transition:all .25s;-webkit-user-select:none;user-select:none;line-height:normal;padding:8px;fill:var(--color-text-secondary)}.vicon .svg,.vicon svg{width:18px;height:18px;display:block}.vicon:active,.vicon:focus,.vicon:focus-within{fill:var(--color-text);background-color:#c8c8c866}@media(hover:hover){.vicon:hover{fill:var(--color-text);background-color:#c8c8c866}}html{scrollbar-gutter:stable}#app{background-color:var(--color-bg);min-height:100vh;display:flex;flex-direction:column;overscroll-behavior-y:contain;touch-action:manipulation}button,a,.vicon,[role=button],.btn{-webkit-tap-highlight-color:transparent}img{image-rendering:high-quality}body.no-transition *{transition:none!important}.hidden{display:none!important}.hide-on-idle{transition:opacity .5s}.transparent,body.idle .hide-on-idle,body.chrome-hidden .hide-on-idle{opacity:0;pointer-events:none}.home .vicon{padding:5px}.sticky{position:-webkit-sticky;position:sticky;transition:top .3s ease;top:var(--header-height);z-index:2}@media(max-width:899px){.header-hidden header{top:calc(-1px - var(--header-height))}.header-hidden .sticky{top:0}}body.overlay-open{overflow:hidden}body.overlay-open:before{content:"";position:fixed;inset:0;z-index:49;background-color:var(--color-bg);opacity:var(--dismiss-bg-opacity, 1)}.rot180{transform:rotate(180deg)}@media(min-width:540px){#app .only-on-s{display:none}}@media(max-width:540px){#app .hide-on-s,#app .show-info .hide-on-s-info{display:none}}@media(max-width:899px)and (min-width:541px){#app .only-on-m{display:none}}@media(min-width:900px){#app .only-on-s-m{display:none}}@media(max-width:900px){#app .hide-on-m,#app .show-info .hide-on-m-info,#app .show-info .hide-on-l-info{display:none}}@media(any-pointer:coarse){#app .hide-on-touch{display:none}}@media(max-width:1200px){#app .hide-on-l{display:none}}@media(max-width:1500px){#app .show-info .hide-on-l-info{display:none}}@media(min-width:1201px){#app .only-on-l{display:none}}.user-select-none{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.user-select-text{-webkit-touch-callout:text;-webkit-user-select:text;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.overflow-visible{overflow:visible}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.right .button-group:last-child{padding-right:8px}.button-group+.button-group{margin-left:8px}.button-group{display:grid;justify-items:center;align-items:center;grid-auto-flow:column}.button-group>*{background:linear-gradient(to bottom,#504b4b33,#14222233);margin:0}.button-group>*:active,.button-group>*:focus{color:var(--color-text);fill:var(--color-text);background:linear-gradient(to bottom,#ffffff4d,#b4b4b44d)}@media(hover:hover){.button-group>*:hover{color:var(--color-text);fill:var(--color-text);background:linear-gradient(to bottom,#ffffff4d,#b4b4b44d)}}.button-group>*.selected{color:var(--color-text);fill:var(--color-text);background:linear-gradient(to bottom,#14222280,#5a5a5a80)}.button-group>*.disabled{border:none;color:var(--color-btn-grey-text);fill:var(--color-btn-grey-text);cursor:not-allowed;background:linear-gradient(to bottom,#33303033,#090a0a33)}.button-group .thumb-rows{padding:4.5px;text-align:center;text-align-last:center;border:1px solid transparent;font-size:inherit;cursor:pointer}.button-group .thumb-rows option{background:var(--color-chip-bg);color:var(--color-text-secondary)}.button-group button{padding:4px 8px;border-radius:0;border-width:0;color:#ffffffa6;fill:var(--color-text-dim);font-size:12px;line-height:12px}.button-group button svg{position:relative;top:1px}.button-group button *{line-height:12px;font-size:12px}.button-group button:first-child{padding-left:10px;border-radius:16px 0 0 16px}.button-group button:last-child{padding-right:10px;border-radius:0 16px 16px 0}.tap-tip{font-size:13px;padding:6px 10px;border-radius:6px;background:var(--color-tooltip-bg);color:var(--color-tooltip-text);border:1px solid var(--color-border-subtle);box-shadow:0 2px 8px #0000004d;max-width:320px;line-height:1.4}.tap-tip a{color:var(--color-link-bright);text-decoration:underline}.tap-tip a:hover{color:var(--color-link)}.tap-tip b{color:var(--color-tooltip-text);font-weight:600}.page-actions{max-width:800px;margin:0 auto 16px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px}.page-actions .btn.copied{color:var(--color-success);fill:var(--color-success)}.filter-group{display:flex;flex-wrap:wrap;gap:4px;align-items:center}.filter-group-label{font-size:12px;text-transform:uppercase;letter-spacing:.05em;color:var(--color-section-text-muted);margin-right:4px}.pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:16px;font-size:13px;cursor:pointer;border:1px solid var(--color-border-subtle);background:transparent;color:var(--color-section-heading);transition:all .15s ease;-webkit-user-select:none;user-select:none}.pill:hover{background:var(--color-btn-small-hover);color:var(--color-btn-small-hover-text);border-color:var(--color-btn-small-hover)}.pill.active{background:var(--color-btn-accent);color:var(--color-on-accent);font-weight:600;border-color:var(--color-btn-accent)}.pill.level-fatal.active{background:var(--color-level-fatal-bg);color:var(--color-level-fatal-text);border-color:var(--color-level-fatal-bg)}.pill.level-error.active{background:var(--color-level-error-bg);color:var(--color-level-error-text);border-color:var(--color-level-error-bg)}.pill.level-warn.active{background:var(--color-level-warn-bg);color:var(--color-level-warn-text);border-color:var(--color-level-warn-bg)}.toast-container{position:fixed;bottom:16px;right:16px;z-index:9999;display:flex;flex-direction:column;gap:8px;pointer-events:none}.toast{display:flex;flex-direction:row;gap:8px;flex-wrap:wrap;align-items:flex-start;width:min(400px,100vw);padding:18px 8px 18px 24px;border-radius:8px;background:var(--color-toast-bg);color:var(--color-toast-text);box-shadow:0 3px 4px 4px #8080804d;cursor:pointer;transition:all .2s;border-left:solid 6px var(--color-info);pointer-events:auto}.toast:hover{background:var(--color-toast-bg-hover)}.toast-info{border-left-color:var(--color-info)}.toast-success{border-left-color:var(--color-success)}.toast-warning{border-left-color:var(--color-warning-bright)}.toast-error{border-left-color:var(--color-error)}.toast-content{flex:1;min-width:200px}.toast-text{font-weight:500}.toast-details{margin-top:4px;font-size:.9em;opacity:.8}.toast-buttons{display:flex;gap:8px;flex-basis:100%;order:10;margin-top:0}.toast-picons{display:flex;margin-left:auto}.toast-picon{width:41px;height:41px;color:var(--color-toast-text);fill:var(--color-toast-text);cursor:pointer;border-radius:50%;transition:all .2s linear;padding:8px;border:none;background:transparent;display:flex;align-items:center;justify-content:center}.toast-picon:hover{background-color:var(--color-hover-tint);color:var(--color-toast-text);fill:var(--color-toast-text)}.toast-copy.copied{color:var(--color-success);fill:var(--color-success)}.toast-enter-active,.toast-leave-active{transition:all .3s ease}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(100%)}.toast-move{transition:transform .3s ease}@media(max-width:480px){.toast-container{left:8px;right:8px;bottom:8px}.toast{width:auto;padding:12px 8px 12px 16px}.toast-content{min-width:0;flex:1 1 0}.toast-picons{flex-shrink:0}.toast-picon{width:36px;height:36px;padding:6px}}body{min-height:100%;background-repeat:no-repeat;background-size:cover;background-image:var(--gradient-page);line-height:1.4}main{padding:calc(var(--header-height) + 16px) 8px 24px 8px;--bg-color: var(--color-section-bg)}.sse-error{max-width:800px;margin:8px auto;padding:12px 16px;display:flex;align-items:center;gap:12px;background:var(--color-warning-bg);border-left:3px solid var(--color-warning);border-radius:3px;color:var(--color-section-text)}hr{color:var(--color-section-border)}header a{cursor:pointer}header .title i.level.emj{height:24px;width:24px;margin-left:8px}section{max-width:800px;background-color:var(--color-section-bg);color:var(--color-section-text);scroll-margin-top:calc(var(--header-height, 60px) + 16px)}section svg *{fill:var(--color-section-text)}section h1,section h2,section h3{display:flex;align-items:center;gap:12px;margin:16px 0;color:var(--color-section-heading);font-weight:400}section>ul{list-style:none;padding-left:8px}section p{margin:4px 0}section p,section div,section span,section li,section button{line-height:1.4}section .buttons{margin-bottom:12px}section li.health{scroll-margin-top:100px;display:grid;grid-template-columns:32px auto;grid-gap:0 12px;border-radius:4px}section li.health.disabled,section li.health.disabled summary{color:var(--color-section-text-muted)}section li.health.error{background:var(--color-error-bg);border-left:3px solid var(--color-error)}section li.health.warn{background:var(--color-warning-bg);border-left:3px solid var(--color-warning)}section li.health.no-library{background:var(--color-no-library-bg);border-left:3px solid var(--color-no-library)}section li.health:last-child{border-bottom:0}section li.health i{justify-self:center;align-self:center;grid-row:1/span;grid-column:1}section li.health .msg,section li.health details,section li.health ul{grid-column:2;min-width:0;overflow-wrap:anywhere}section li.health details[open]{padding:8px 16px;margin:8px;cursor:auto}section li.health details summary{display:flex;align-items:center;list-style:none;cursor:pointer;padding:12px 0}section li.health details summary::-webkit-details-marker{display:none}section li.health details summary:before{content:"";flex-shrink:0;width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 3l5 5-5 5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;background-size:contain;cursor:pointer;margin-right:12px;transition:transform .15s ease}section li.health details[open] summary:before{transform:rotate(90deg)}section li.health details{margin:0;cursor:pointer}section li.health summary{padding:8px}section li.health .msg{border-radius:3px;margin:8px;min-height:8px}section li.health .msg>li{list-style:disc;margin-left:1em}section li.health ul.buttons,section li.health ul.links{list-style:none;padding:8px;display:flex;gap:12px}section button,section a{display:flex;gap:6px}section a{font-weight:700;color:var(--color-section-link)}section a svg *{fill:var(--color-section-link)}section a:hover{color:var(--color-section-link-hover)}@media(max-width:600px){section{width:100%;padding:12px;border-radius:0;margin:0;box-shadow:none}section h1,section h2,section h3{justify-content:center}section>ul{padding-left:0}}
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright © 2026, PhotoStructure Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* BY USING THIS SOFTWARE, YOU ACCEPT ALL OF THE TERMS IN
|
|
5
|
+
* https://photostructure.com/eula
|
|
6
|
+
* IF YOU DO NOT ACCEPT THESE TERMS, DO NOT USE THIS SOFTWARE
|
|
7
|
+
*/
|
|
8
|
+
import{d as te,e as ne,b as m,c as B,D as le,E as se,O as oe,Q as ie,R as ae,o as s,l as i,G as u,m as a,t as p,v,C as k,B as _,u as r,H as g,I as C,j as S,q as re,S as ce,U as ue}from"./toast.js";import{o as de}from"./onReady.js";import{m as I,H as A,t as F}from"./Array.js";import{u as fe,g as O,c as he,_ as d,f as P}from"./DropDown.vue_vue_type_script_setup_true_lang.js";import{m as U}from"./BabyMarkdown.js";import{_ as me,a as pe}from"./PageActionsMenu.vue_vue_type_script_setup_true_lang.js";import{j as V}from"./Lazy.js";import{n as ve,h as ke,H as ye,i as _e,l as ge}from"./HealthChecks.js";import{p as Ce,u as be}from"./useAnchorHighlight.js";const we={key:0,class:"sse-error"},Ee={class:"page-actions"},He=["title"],Te=["id"],Le={key:0,class:"health loading"},xe=["id"],Se=["title"],De={title:"Click to toggle details"},Ne=["innerHTML"],Me=["innerHTML"],Re={key:0,class:"links"},je=["href","title","target","rel"],$e={key:2,class:"buttons"},Be=["onClick","title"],Ie=te({__name:"Health",setup(E){const q=ne(),f=m(ve()),H=m(Date.now()),h=m(null),{copyWithFeedback:W,isCopied:T}=fe(),L=m(null),y=m(!1);function G(){if(L.value==null)return;const e=!y.value;for(const t of L.value.querySelectorAll("details"))t.open=e;y.value=e}const D=Ce(),N=m(0);be({ready:B(()=>D==null?!0:(N.value,f.value.some(e=>e.results.some(t=>t.id===D)))),onTargetFound:e=>{const t=e.querySelector("details");t!=null&&(t.open=!0)}});let x=!1;function z(e){return e.toLowerCase().replace(/\s+/g,"-")}function b(e){return!e.startsWith("/")}const M=B(()=>f.value.flatMap(e=>e.results.filter(t=>ge(t.level))));async function J(){const e=f.value.flatMap(n=>n.results),o=(M.value.length>0?M.value:e).map(({buttons:n,links:c,...ee})=>ee),l=JSON.stringify(o,null,2);await W(l,"results")}async function K(){await P("/api/health/reset",{method:"POST"})!=null&&(location.href="/health?t="+Date.now())}let w;function Q(){H.value=Date.now()}function R(e){return ye[e]}function X(e){const t=e.method??"POST";t==="GET"?document.location.assign(e.url):P(e.url,{method:t})}function Y(e){for(const t of e.target.getElementsByTagName("summary"))t.dispatchEvent(new MouseEvent("click",{bubbles:!1}))}function Z(e){return e!=null&&typeof e=="object"&&"done"in e}function j(e,t){if(h.value=null,t==="done"||Z(e)){x=!0;return}if(t==="result"&&_e(e)){const o=f.value.find(c=>c.section===e.section);if(o==null)return;const l=o.results,n=l.findIndex(c=>c.id===e.id);n===-1?l.push(e):l[n]=e,N.value++}}function $(e){x||(e==="disconnected"?h.value="Connection lost. Reload the page to try again.":e==="reconnecting"?h.value="Reconnecting...":e==="connected"&&(h.value=null))}return le(()=>{x=!1,w=setInterval(Q,5e3);const e=new URLSearchParams(window.location.search).get("test");(e==="warn"||e==="error")&&f.value.find(o=>o.section==="Library")?.results.push({id:"test-"+e,section:"Library",level:e,msg:[`Test ${e} message`,"This is a fake health check for testing the copy button."],ts:Date.now()});const t=O();t.on("health",j),t.onConnectionChange($)}),se(()=>{w!=null&&(clearInterval(w),w=void 0);const e=O();e.off("health",j),e.offConnectionChange($)}),oe((e,t,o)=>{if(!ie(e)){const{text:l,details:n,type:c}=ae(e);q.show({text:l,details:n,type:c,uuid:"error-captured"})}return!0}),(e,t)=>(s(),i("div",null,[u(me,{title:"Health",currentPage:"health"}),u(he),a("main",{ref_key:"mainEl",ref:L,class:"reveal"},[h.value?(s(),i("div",we,[t[3]||(t[3]=a("i",{class:"emj warning"},null,-1)),a("span",null,p(h.value),1)])):v("",!0),a("div",Ee,[a("button",{class:"btn small info",title:"Re-run all health checks",onClick:t[0]||(t[0]=o=>K())},[u(d,{icon:"health_check"}),t[4]||(t[4]=k(" Recheck health ",-1))]),a("button",{class:"btn small",title:y.value?"Collapse all details":"Expand all details",onClick:t[1]||(t[1]=o=>G())},[u(d,{icon:y.value?"compress":"expand"},null,8,["icon"]),k(" "+p(y.value?"Collapse all":"Expand all"),1)],8,He),a("button",{class:_(["btn small",{copied:r(T)("results")}]),title:"Copy results to clipboard",onClick:t[2]||(t[2]=o=>J())},[u(d,{icon:r(T)("results")?"check":"content_paste"},null,8,["icon"]),k(" "+p(r(T)("results")?"Copied!":"Copy results"),1)],2),u(pe)]),(s(!0),i(g,null,C(f.value,o=>(s(),i("section",{key:"section:"+o.section,id:z(o.section)},[a("h2",null,[a("i",{class:_(["emj med",o.emoji])},null,2),k(" "+p(o.section),1)]),a("ul",null,[o.results.length===0?(s(),i("li",Le,[u(d,{icon:"busy_dots"}),t[5]||(t[5]=a("span",null,"Loading...",-1))])):v("",!0),(s(!0),i(g,null,C(o.results,l=>(s(),i("li",{class:_(["health anim-flash",l.level]),key:l.id+"-"+l.ts,id:l.id},[l.level==="pending"||l.level==="installing"?(s(),S(d,{key:0,icon:"busy_dots",title:l.id+": "+R(l.level)+" "+r(V)(H.value-l.ts)+(r(I)(l.meta?.from,n=>`
|
|
9
|
+
From `+n)??"")},null,8,["title"])):(s(),i("i",{key:1,class:_(["emj",r(ke)(l.level)]),title:l.id+": "+R(l.level)+" "+r(V)(H.value-l.ts)+(r(I)(l.meta?.from,n=>`
|
|
10
|
+
From `+n)??"")},null,10,Se)),a("details",{onClick:re(Y,["self"])},[a("summary",De,[a("span",{innerHTML:r(U)(l.msg[0])},null,8,Ne)]),(s(!0),i(g,null,C(l.msg.slice(1),(n,c)=>(s(),i("p",{class:"msg",key:c,innerHTML:r(U)(n)},null,8,Me))),128)),r(A)(l.links)?(s(),i("ul",Re,[(s(!0),i(g,null,C(r(F)(l.links),n=>(s(),i("li",{key:l.id+":"+n.url},[a("a",{href:n.url,class:_({"external-link":b(n.url)}),title:n.title??"Click to open "+n.url+(b(n.url)?" in a new window":""),target:b(n.url)?"_blank":"_self",rel:b(n.url)?"noopener":void 0},[n.icon?(s(),S(d,{key:0,icon:n.icon},null,8,["icon"])):v("",!0),k(" "+p(n.text),1)],10,je)]))),128))])):v("",!0)]),r(A)(l.buttons)?(s(),i("ul",$e,[(s(!0),i(g,null,C(r(F)(l.buttons),n=>(s(),i("li",{key:l.id+":"+n.url},[a("button",{class:"btn small",onClick:c=>X(n),title:n.title??void 0},[n.icon?(s(),S(d,{key:0,icon:n.icon},null,8,["icon"])):v("",!0),k(" "+p(n.text),1)],8,Be)]))),128))])):v("",!0)],10,xe))),128))])],8,Te))),128))],512)]))}});de(()=>{const E=ce(Ie);E.use(ue()),E.mount("#mount")});
|
|
Binary file
|