@react-pakistan/util-functions 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/api-methods.d.mts +13 -0
- package/constants/api-methods.js +1 -1
- package/constants/api-methods.mjs +1 -0
- package/constants/cache-time.d.mts +7 -0
- package/constants/cache-time.js +1 -1
- package/constants/cache-time.mjs +1 -0
- package/constants/countries-timezones.d.mts +8 -0
- package/constants/countries-timezones.js +1 -1
- package/constants/countries-timezones.mjs +1 -0
- package/constants/currencies.d.mts +14 -0
- package/constants/currencies.js +1 -1
- package/constants/currencies.mjs +1 -0
- package/constants/dial-codes.d.mts +9 -0
- package/constants/dial-codes.js +1 -1
- package/constants/dial-codes.mjs +1 -0
- package/constants/layout-direction.d.mts +6 -0
- package/constants/layout-direction.js +1 -1
- package/constants/layout-direction.mjs +1 -0
- package/constants/react-pakistan-meta.d.mts +32 -0
- package/constants/react-pakistan-meta.js +1 -1
- package/constants/react-pakistan-meta.mjs +1 -0
- package/constants/react-pakistan.d.mts +15 -0
- package/constants/react-pakistan.js +1 -12
- package/constants/react-pakistan.mjs +1 -0
- package/constants/select-value-delimiter.d.mts +12 -0
- package/constants/select-value-delimiter.js +1 -1
- package/constants/select-value-delimiter.mjs +1 -0
- package/constants/social-media-colors.d.mts +40 -0
- package/constants/social-media-colors.js +1 -1
- package/constants/social-media-colors.mjs +1 -0
- package/constants/social-media-sizes.d.mts +323 -0
- package/constants/social-media-sizes.js +1 -1
- package/constants/social-media-sizes.mjs +1 -0
- package/constants/user-roles.d.mts +7 -0
- package/constants/user-roles.js +1 -1
- package/constants/user-roles.mjs +1 -0
- package/factory/generic-component-factory.d.mts +78 -0
- package/factory/generic-component-factory.js +1 -1
- package/factory/generic-component-factory.mjs +1 -0
- package/factory/generic-module-factory.d.mts +80 -0
- package/factory/generic-module-factory.js +1 -1
- package/factory/generic-module-factory.mjs +1 -0
- package/general/basic-get.d.mts +8 -0
- package/general/basic-get.js +1 -1
- package/general/basic-get.mjs +1 -0
- package/general/basic-post.d.mts +8 -0
- package/general/basic-post.js +1 -1
- package/general/basic-post.mjs +1 -0
- package/general/calculate-pages.d.mts +9 -0
- package/general/calculate-pages.js +1 -1
- package/general/calculate-pages.mjs +1 -0
- package/general/camel-to-sentence-case.d.mts +12 -0
- package/general/camel-to-sentence-case.js +1 -1
- package/general/camel-to-sentence-case.mjs +1 -0
- package/general/check-even-odd-length.d.mts +13 -0
- package/general/check-even-odd-length.js +1 -1
- package/general/check-even-odd-length.mjs +1 -0
- package/general/clear-cache.d.mts +10 -0
- package/general/clear-cache.js +1 -1
- package/general/clear-cache.mjs +1 -0
- package/general/cnic-formatter.d.mts +20 -0
- package/general/cnic-formatter.js +1 -1
- package/general/cnic-formatter.mjs +1 -0
- package/general/convert-url-to-base64.d.mts +57 -0
- package/general/convert-url-to-base64.js +1 -1
- package/general/convert-url-to-base64.mjs +1 -0
- package/general/countries.d.mts +268 -0
- package/general/countries.js +1 -1
- package/general/countries.mjs +1 -0
- package/general/create-date.d.mts +12 -0
- package/general/create-date.js +1 -1
- package/general/create-date.mjs +1 -0
- package/general/crypto.d.mts +11 -0
- package/general/crypto.js +1 -1
- package/general/crypto.mjs +1 -0
- package/general/currencies.d.mts +2 -0
- package/general/currencies.mjs +0 -0
- package/general/delete-image-from-private-supabase.d.mts +16 -0
- package/general/delete-image-from-private-supabase.js +1 -1
- package/general/delete-image-from-private-supabase.mjs +1 -0
- package/general/delete-image-from-public-supabase.d.mts +16 -0
- package/general/delete-image-from-public-supabase.js +1 -1
- package/general/delete-image-from-public-supabase.mjs +1 -0
- package/general/download-from-url.d.mts +8 -0
- package/general/download-from-url.js +1 -1
- package/general/download-from-url.mjs +1 -0
- package/general/dynamic-page-limit.d.mts +12 -0
- package/general/dynamic-page-limit.js +1 -1
- package/general/dynamic-page-limit.mjs +1 -0
- package/general/enum-to-text.d.mts +8 -0
- package/general/enum-to-text.js +1 -1
- package/general/enum-to-text.mjs +1 -0
- package/general/fetch-data.d.mts +25 -0
- package/general/fetch-data.js +1 -1
- package/general/fetch-data.mjs +1 -0
- package/general/fetch-supabase-image.d.mts +16 -0
- package/general/fetch-supabase-image.js +1 -1
- package/general/fetch-supabase-image.mjs +1 -0
- package/general/fetch-supabase-private-assets.d.mts +15 -0
- package/general/fetch-supabase-private-assets.js +1 -1
- package/general/fetch-supabase-private-assets.mjs +1 -0
- package/general/format-date.d.mts +18 -0
- package/general/format-date.js +1 -1
- package/general/format-date.mjs +1 -0
- package/general/format-number.d.mts +16 -0
- package/general/format-number.js +1 -1
- package/general/format-number.mjs +1 -0
- package/general/format-phone-display.d.mts +9 -0
- package/general/format-phone-display.js +1 -1
- package/general/format-phone-display.mjs +1 -0
- package/general/format-phone.d.mts +13 -0
- package/general/format-phone.d.ts +1 -3
- package/general/format-phone.js +1 -1
- package/general/format-phone.mjs +1 -0
- package/general/format-pricing.d.mts +8 -0
- package/general/format-pricing.js +1 -1
- package/general/format-pricing.mjs +1 -0
- package/general/format-secs.d.mts +8 -0
- package/general/format-secs.js +1 -1
- package/general/format-secs.mjs +1 -0
- package/general/format-time.d.mts +11 -0
- package/general/format-time.js +1 -1
- package/general/format-time.mjs +1 -0
- package/general/format-value.d.mts +8 -0
- package/general/format-value.js +1 -1
- package/general/format-value.mjs +1 -0
- package/general/full-month-range.d.mts +13 -0
- package/general/full-month-range.js +1 -1
- package/general/full-month-range.mjs +1 -0
- package/general/full-year-range.d.mts +12 -0
- package/general/full-year-range.js +1 -1
- package/general/full-year-range.mjs +1 -0
- package/general/generate-article-schema.d.mts +50 -0
- package/general/generate-article-schema.js +1 -1
- package/general/generate-article-schema.mjs +1 -0
- package/general/generate-blog-schema.d.mts +37 -0
- package/general/generate-blog-schema.js +1 -1
- package/general/generate-blog-schema.mjs +1 -0
- package/general/generate-book-schema.d.mts +58 -0
- package/general/generate-book-schema.js +1 -1
- package/general/generate-book-schema.mjs +1 -0
- package/general/generate-breadcrumb-schema.d.mts +40 -0
- package/general/generate-breadcrumb-schema.js +1 -1
- package/general/generate-breadcrumb-schema.mjs +1 -0
- package/general/generate-carousel-schema.d.mts +52 -0
- package/general/generate-carousel-schema.js +1 -1
- package/general/generate-carousel-schema.mjs +1 -0
- package/general/generate-course-schema.d.mts +53 -0
- package/general/generate-course-schema.js +1 -1
- package/general/generate-course-schema.mjs +1 -0
- package/general/generate-dataset-schema.d.mts +65 -0
- package/general/generate-dataset-schema.js +1 -1
- package/general/generate-dataset-schema.mjs +1 -0
- package/general/generate-discussion-forum-schema.d.mts +39 -0
- package/general/generate-discussion-forum-schema.js +1 -1
- package/general/generate-discussion-forum-schema.mjs +1 -0
- package/general/generate-education-schema.d.mts +68 -0
- package/general/generate-education-schema.js +1 -1
- package/general/generate-education-schema.mjs +1 -0
- package/general/generate-employer-aggregate-rating-schema.d.mts +29 -0
- package/general/generate-employer-aggregate-rating-schema.js +1 -1
- package/general/generate-employer-aggregate-rating-schema.mjs +1 -0
- package/general/generate-event-schema.d.mts +63 -0
- package/general/generate-event-schema.js +1 -1
- package/general/generate-event-schema.mjs +1 -0
- package/general/generate-faq-schema.d.mts +32 -0
- package/general/generate-faq-schema.js +1 -1
- package/general/generate-faq-schema.mjs +1 -0
- package/general/generate-grid.d.mts +17 -0
- package/general/generate-grid.js +1 -1
- package/general/generate-grid.mjs +1 -0
- package/general/generate-image-metadata-schema.d.mts +36 -0
- package/general/generate-image-metadata-schema.js +1 -1
- package/general/generate-image-metadata-schema.mjs +1 -0
- package/general/generate-job-posting-schema.d.mts +49 -0
- package/general/generate-job-posting-schema.js +1 -1
- package/general/generate-job-posting-schema.mjs +1 -0
- package/general/generate-local-business-schema.d.mts +42 -0
- package/general/generate-local-business-schema.js +1 -1
- package/general/generate-local-business-schema.mjs +1 -0
- package/general/generate-math-solver-schema.d.mts +45 -0
- package/general/generate-math-solver-schema.js +1 -1
- package/general/generate-math-solver-schema.mjs +1 -0
- package/general/generate-movie-carousel-schema.d.mts +51 -0
- package/general/generate-movie-carousel-schema.js +1 -1
- package/general/generate-movie-carousel-schema.mjs +1 -0
- package/general/generate-organization-schema.d.mts +49 -0
- package/general/generate-organization-schema.js +1 -1
- package/general/generate-organization-schema.mjs +1 -0
- package/general/generate-profile-page-schema.d.mts +37 -0
- package/general/generate-profile-page-schema.js +1 -1
- package/general/generate-profile-page-schema.mjs +1 -0
- package/general/generate-qa-page-schema.d.mts +34 -0
- package/general/generate-qa-page-schema.js +1 -1
- package/general/generate-qa-page-schema.mjs +1 -0
- package/general/generate-recipe-schema.d.mts +49 -0
- package/general/generate-recipe-schema.js +1 -1
- package/general/generate-recipe-schema.mjs +1 -0
- package/general/generate-ref.d.mts +11 -0
- package/general/generate-ref.js +1 -1
- package/general/generate-ref.mjs +1 -0
- package/general/generate-review-snippet-schema.d.mts +52 -0
- package/general/generate-review-snippet-schema.js +1 -1
- package/general/generate-review-snippet-schema.mjs +1 -0
- package/general/generate-shopping-loyalty-program-schema.d.mts +38 -0
- package/general/generate-shopping-loyalty-program-schema.js +1 -1
- package/general/generate-shopping-loyalty-program-schema.mjs +1 -0
- package/general/generate-shopping-merchant-listing-schema.d.mts +53 -0
- package/general/generate-shopping-merchant-listing-schema.js +1 -1
- package/general/generate-shopping-merchant-listing-schema.mjs +1 -0
- package/general/generate-shopping-merchant-return-policy-schema.d.mts +32 -0
- package/general/generate-shopping-merchant-return-policy-schema.js +1 -1
- package/general/generate-shopping-merchant-return-policy-schema.mjs +1 -0
- package/general/generate-shopping-merchant-shipping-policy-schema.d.mts +36 -0
- package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -1
- package/general/generate-shopping-merchant-shipping-policy-schema.mjs +1 -0
- package/general/generate-shopping-overview-schema.d.mts +52 -0
- package/general/generate-shopping-overview-schema.js +1 -1
- package/general/generate-shopping-overview-schema.mjs +1 -0
- package/general/generate-shopping-product-snippet-schema.d.mts +57 -0
- package/general/generate-shopping-product-snippet-schema.js +1 -1
- package/general/generate-shopping-product-snippet-schema.mjs +1 -0
- package/general/generate-shopping-variants-schema.d.mts +46 -0
- package/general/generate-shopping-variants-schema.js +1 -1
- package/general/generate-shopping-variants-schema.mjs +1 -0
- package/general/generate-software-app-schema.d.mts +62 -0
- package/general/generate-software-app-schema.js +1 -1
- package/general/generate-software-app-schema.mjs +1 -0
- package/general/generate-speakable-schema.d.mts +64 -0
- package/general/generate-speakable-schema.js +1 -1
- package/general/generate-speakable-schema.mjs +1 -0
- package/general/generate-subscription-schema.d.mts +60 -0
- package/general/generate-subscription-schema.js +1 -1
- package/general/generate-subscription-schema.mjs +1 -0
- package/general/generate-vacation-rental-schema.d.mts +67 -0
- package/general/generate-vacation-rental-schema.js +1 -1
- package/general/generate-vacation-rental-schema.mjs +1 -0
- package/general/generate-video-schema.d.mts +75 -0
- package/general/generate-video-schema.js +1 -1
- package/general/generate-video-schema.mjs +1 -0
- package/general/generic-cache.d.mts +193 -0
- package/general/generic-cache.js +1 -1
- package/general/generic-cache.mjs +1 -0
- package/general/get-available-page-limit.d.mts +11 -0
- package/general/get-available-page-limit.js +1 -1
- package/general/get-available-page-limit.mjs +1 -0
- package/general/get-calendar-current-month.d.mts +15 -0
- package/general/get-calendar-current-month.js +1 -1
- package/general/get-calendar-current-month.mjs +1 -0
- package/general/get-calendar-dates.d.mts +15 -0
- package/general/get-calendar-dates.js +1 -1
- package/general/get-calendar-dates.mjs +1 -0
- package/general/get-calendar-next-month.d.mts +17 -0
- package/general/get-calendar-next-month.js +1 -1
- package/general/get-calendar-next-month.mjs +1 -0
- package/general/get-calendar-previous-month.d.mts +17 -0
- package/general/get-calendar-previous-month.js +1 -1
- package/general/get-calendar-previous-month.mjs +1 -0
- package/general/get-current-year.d.mts +7 -0
- package/general/get-current-year.js +1 -1
- package/general/get-current-year.mjs +1 -0
- package/general/get-day-name.d.mts +10 -0
- package/general/get-day-name.js +1 -1
- package/general/get-day-name.mjs +1 -0
- package/general/get-dial-code.d.mts +8 -0
- package/general/get-dial-code.js +1 -1
- package/general/get-dial-code.mjs +1 -0
- package/general/get-full-name.d.mts +13 -0
- package/general/get-full-name.js +1 -1
- package/general/get-full-name.mjs +1 -0
- package/general/get-href.d.mts +11 -0
- package/general/get-href.js +1 -1
- package/general/get-href.mjs +1 -0
- package/general/get-month-name.d.mts +10 -0
- package/general/get-month-name.js +1 -1
- package/general/get-month-name.mjs +1 -0
- package/general/get-month-number.d.mts +15 -0
- package/general/get-month-number.js +1 -1
- package/general/get-month-number.mjs +1 -0
- package/general/get-number-of-days-in-month.d.mts +13 -0
- package/general/get-number-of-days-in-month.js +1 -1
- package/general/get-number-of-days-in-month.mjs +1 -0
- package/general/get-pathname.d.mts +11 -0
- package/general/get-pathname.js +1 -1
- package/general/get-pathname.mjs +1 -0
- package/general/get-week-day.d.mts +8 -0
- package/general/get-week-day.js +1 -1
- package/general/get-week-day.mjs +1 -0
- package/general/image-url-to-base64.d.mts +9 -0
- package/general/image-url-to-base64.js +1 -1
- package/general/image-url-to-base64.mjs +1 -0
- package/general/is-created-or-updated.d.mts +13 -0
- package/general/is-created-or-updated.js +1 -1
- package/general/is-created-or-updated.mjs +1 -0
- package/general/is-next-button-disabled.d.mts +9 -0
- package/general/is-next-button-disabled.js +1 -1
- package/general/is-next-button-disabled.mjs +1 -0
- package/general/is-odd.d.mts +11 -0
- package/general/is-odd.js +1 -1
- package/general/is-odd.mjs +1 -0
- package/general/is-previous-button-disabled.d.mts +8 -0
- package/general/is-previous-button-disabled.js +1 -1
- package/general/is-previous-button-disabled.mjs +1 -0
- package/general/linear-gradients.d.mts +14 -0
- package/general/linear-gradients.js +1 -1
- package/general/linear-gradients.mjs +1 -0
- package/general/multi-part-search.d.mts +22 -0
- package/general/multi-part-search.js +1 -1
- package/general/multi-part-search.mjs +1 -0
- package/general/normalize-phone.d.mts +15 -0
- package/general/normalize-phone.js +1 -1
- package/general/normalize-phone.mjs +1 -0
- package/general/parse-frontmatter.d.mts +36 -0
- package/general/parse-frontmatter.js +1 -2
- package/general/parse-frontmatter.mjs +1 -0
- package/general/remove-data-image-prefix.d.mts +8 -0
- package/general/remove-data-image-prefix.js +1 -1
- package/general/remove-data-image-prefix.mjs +1 -0
- package/general/repeat-times.d.mts +15 -0
- package/general/repeat-times.js +1 -1
- package/general/repeat-times.mjs +1 -0
- package/general/resolve-anchor-link.d.mts +13 -0
- package/general/resolve-anchor-link.js +1 -1
- package/general/resolve-anchor-link.mjs +1 -0
- package/general/resolve-current-date.d.mts +12 -0
- package/general/resolve-current-date.js +1 -1
- package/general/resolve-current-date.mjs +1 -0
- package/general/resolve-grid.d.mts +14 -0
- package/general/resolve-grid.js +1 -1
- package/general/resolve-grid.mjs +1 -0
- package/general/resolve-initials.d.mts +12 -0
- package/general/resolve-initials.js +1 -1
- package/general/resolve-initials.mjs +1 -0
- package/general/set-timezone.d.mts +9 -0
- package/general/set-timezone.d.ts +1 -3
- package/general/set-timezone.js +1 -1
- package/general/set-timezone.mjs +1 -0
- package/general/slugify.d.mts +12 -0
- package/general/slugify.js +1 -1
- package/general/slugify.mjs +1 -0
- package/general/text-to-enum.d.mts +8 -0
- package/general/text-to-enum.js +1 -1
- package/general/text-to-enum.mjs +1 -0
- package/general/text-to-sentence-case.d.mts +12 -0
- package/general/text-to-sentence-case.js +1 -1
- package/general/text-to-sentence-case.mjs +1 -0
- package/general/time-out.d.mts +12 -0
- package/general/time-out.js +1 -1
- package/general/time-out.mjs +1 -0
- package/general/time-zones.d.mts +11 -0
- package/general/time-zones.js +1 -1
- package/general/time-zones.mjs +1 -0
- package/general/truncate-text.d.mts +14 -0
- package/general/truncate-text.js +1 -1
- package/general/truncate-text.mjs +1 -0
- package/general/type.d.mts +8 -0
- package/general/type.js +1 -1
- package/general/type.mjs +0 -0
- package/general/upload-blob-to-private-supabase.d.mts +24 -0
- package/general/upload-blob-to-private-supabase.js +1 -1
- package/general/upload-blob-to-private-supabase.mjs +1 -0
- package/general/upload-blob-to-public-supabase.d.mts +24 -0
- package/general/upload-blob-to-public-supabase.js +1 -1
- package/general/upload-blob-to-public-supabase.mjs +1 -0
- package/general/upload-image-to-private-supabase.d.mts +26 -0
- package/general/upload-image-to-private-supabase.js +1 -1
- package/general/upload-image-to-private-supabase.mjs +1 -0
- package/general/upload-image-to-public-supabase.d.mts +26 -0
- package/general/upload-image-to-public-supabase.js +1 -1
- package/general/upload-image-to-public-supabase.mjs +1 -0
- package/general/url-to-sentence-case.d.mts +12 -0
- package/general/url-to-sentence-case.js +1 -1
- package/general/url-to-sentence-case.mjs +1 -0
- package/general/validate-comment.d.mts +14 -0
- package/general/validate-comment.js +1 -1
- package/general/validate-comment.mjs +1 -0
- package/general/validate-email.d.mts +15 -0
- package/general/validate-email.js +1 -1
- package/general/validate-email.mjs +1 -0
- package/general/validate-form.d.mts +18 -0
- package/general/validate-form.js +1 -1
- package/general/validate-form.mjs +1 -0
- package/general/validate-name.d.mts +14 -0
- package/general/validate-name.js +1 -1
- package/general/validate-name.mjs +1 -0
- package/hooks/use-change.d.mts +11 -0
- package/hooks/use-change.js +1 -1
- package/hooks/use-change.mjs +1 -0
- package/hooks/use-debounce.d.mts +10 -0
- package/hooks/use-debounce.js +1 -1
- package/hooks/use-debounce.mjs +1 -0
- package/hooks/use-fetch.d.mts +42 -0
- package/hooks/use-fetch.js +1 -1
- package/hooks/use-fetch.mjs +1 -0
- package/hooks/use-force-render.d.mts +14 -0
- package/hooks/use-force-render.js +1 -1
- package/hooks/use-force-render.mjs +1 -0
- package/hooks/use-ip-geo-location.d.mts +12 -0
- package/hooks/use-ip-geo-location.js +1 -1
- package/hooks/use-ip-geo-location.mjs +1 -0
- package/hooks/use-is-mobile.d.mts +8 -0
- package/hooks/use-is-mobile.js +1 -1
- package/hooks/use-is-mobile.mjs +1 -0
- package/hooks/use-module-entity-v2.d.mts +105 -0
- package/hooks/use-module-entity-v2.js +1 -1
- package/hooks/use-module-entity-v2.mjs +1 -0
- package/hooks/use-module-entity.d.mts +98 -0
- package/hooks/use-module-entity.js +1 -1
- package/hooks/use-module-entity.mjs +1 -0
- package/hooks/use-phone-formatter.d.mts +17 -0
- package/hooks/use-phone-formatter.d.ts +1 -3
- package/hooks/use-phone-formatter.js +1 -1
- package/hooks/use-phone-formatter.mjs +1 -0
- package/hooks/use-position.d.mts +29 -0
- package/hooks/use-position.js +1 -1
- package/hooks/use-position.mjs +1 -0
- package/hooks/use-rtl.d.mts +46 -0
- package/hooks/use-rtl.js +1 -1
- package/hooks/use-rtl.mjs +1 -0
- package/hooks/use-sticky.d.mts +13 -0
- package/hooks/use-sticky.js +1 -1
- package/hooks/use-sticky.mjs +1 -0
- package/hooks/use-toggle-state.d.mts +14 -0
- package/hooks/use-toggle-state.js +1 -1
- package/hooks/use-toggle-state.mjs +1 -0
- package/hooks/use-window-event-listener.d.mts +9 -0
- package/hooks/use-window-event-listener.js +1 -1
- package/hooks/use-window-event-listener.mjs +1 -0
- package/hooks/with-seo.d.mts +19 -0
- package/hooks/with-seo.js +1 -1
- package/hooks/with-seo.mjs +1 -0
- package/local-storage/get-storage-value.d.mts +5 -0
- package/local-storage/get-storage-value.js +1 -1
- package/local-storage/get-storage-value.mjs +1 -0
- package/local-storage/remove-storage-value.d.mts +3 -0
- package/local-storage/remove-storage-value.js +1 -1
- package/local-storage/remove-storage-value.mjs +1 -0
- package/local-storage/set-storage-value.d.mts +3 -0
- package/local-storage/set-storage-value.js +1 -1
- package/local-storage/set-storage-value.mjs +1 -0
- package/local-storage/type.d.mts +3 -0
- package/local-storage/type.js +1 -1
- package/local-storage/type.mjs +0 -0
- package/npm.d.d.mts +2 -0
- package/npm.d.mjs +0 -0
- package/package.json +7 -6
- package/edu-pilot-pro/types/academics.d.ts +0 -2
- package/edu-pilot-pro/types/academics.js +0 -1
- package/edu-pilot-pro/types/admission.d.ts +0 -878
- package/edu-pilot-pro/types/admission.js +0 -1
- package/edu-pilot-pro/types/communication.d.ts +0 -2
- package/edu-pilot-pro/types/communication.js +0 -1
- package/edu-pilot-pro/types/enums.d.ts +0 -413
- package/edu-pilot-pro/types/enums.js +0 -1
- package/edu-pilot-pro/types/finance.d.ts +0 -2
- package/edu-pilot-pro/types/finance.js +0 -1
- package/edu-pilot-pro/types/index.d.ts +0 -2
- package/edu-pilot-pro/types/index.js +0 -1
- package/edu-pilot-pro/types/user-management.d.ts +0 -2
- package/edu-pilot-pro/types/user-management.js +0 -1
- package/storybook/generate-sitemap.d.ts +0 -16
- package/storybook/generate-sitemap.js +0 -17
- package/storybook/preview.d.ts +0 -148
- package/storybook/preview.js +0 -1
- package/storybook/react-design-story-script.d.ts +0 -12
- package/storybook/react-design-story-script.js +0 -5
- package/storybook/react-emoji-collection.d.ts +0 -13
- package/storybook/react-emoji-collection.js +0 -11
- package/storybook/react-emoji-story-script.d.ts +0 -12
- package/storybook/react-emoji-story-script.js +0 -5
- package/storybook/react-emoji-story-template.d.ts +0 -14
- package/storybook/react-emoji-story-template.js +0 -46
- package/storybook/react-icon-collection.d.ts +0 -13
- package/storybook/react-icon-collection.js +0 -11
- package/storybook/react-icon-story-script.d.ts +0 -12
- package/storybook/react-icon-story-script.js +0 -5
- package/storybook/react-icon-story-template.d.ts +0 -13
- package/storybook/react-icon-story-template.js +0 -46
- package/storybook/react-logo-collection.d.ts +0 -13
- package/storybook/react-logo-collection.js +0 -11
- package/storybook/react-logo-story-script.d.ts +0 -12
- package/storybook/react-logo-story-script.js +0 -5
- package/storybook/react-logo-story-template.d.ts +0 -13
- package/storybook/react-logo-story-template.js +0 -46
- package/storybook/react-pakistan-theme.d.ts +0 -25
- package/storybook/react-pakistan-theme.js +0 -1
- package/storybook/responsive-args.d.ts +0 -22
- package/storybook/responsive-args.js +0 -1
- package/storybook/responsive-component.d.ts +0 -33
- package/storybook/responsive-component.js +0 -37
- package/storybook/responsive-screens.d.ts +0 -108
- package/storybook/responsive-screens.js +0 -1
- package/storybook/theme.d.ts +0 -96
- package/storybook/theme.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x2a64(){const _0xc0c6b2=['InStoreOnly','high','144718HNPJab','map','startsWith','508005iHotSP','replace','reviewCount','log','11219142CnFgQX','category','width','priceCurrency','Product','includes','12ivPrLg','aggregateRating','test','exception','4230896MEImSS','priceRange','ImageObject','join','http','mainEntityOfPage','brand','return\x20(function()\x20','constructor','name','bind','url','image','low','OutOfStock','trace','description','Invalid\x20currency\x20code:\x20','80LRsYuZ','length','248900kFZbyV','ItemList','error','info','20zMJUGD','1RjmSCQ','WebPage','prototype','toString','offers','availability','height','price','1302132kFJqcO','some','trim','console','table','2237053hiDtxs','sku'];_0x2a64=function(){return _0xc0c6b2;};return _0x2a64();}function _0x3c6f(_0x5e0dcd,_0x1b1a92){_0x5e0dcd=_0x5e0dcd-0x119;const _0x18fa5a=_0x2a64();let _0x1f09c8=_0x18fa5a[_0x5e0dcd];return _0x1f09c8;}const _0x2bd27e=_0x3c6f;(function(_0x976dd3,_0x2887db){const _0x300303=_0x3c6f,_0x3632b3=_0x976dd3();while(!![]){try{const _0x32a732=parseInt(_0x300303(0x12f))/0x1*(-parseInt(_0x300303(0x140))/0x2)+parseInt(_0x300303(0x137))/0x3+parseInt(_0x300303(0x12a))/0x4*(parseInt(_0x300303(0x128))/0x5)+-parseInt(_0x300303(0x14d))/0x6*(-parseInt(_0x300303(0x13c))/0x7)+parseInt(_0x300303(0x151))/0x8+parseInt(_0x300303(0x143))/0x9+parseInt(_0x300303(0x12e))/0xa*(-parseInt(_0x300303(0x147))/0xb);if(_0x32a732===_0x2887db)break;else _0x3632b3['push'](_0x3632b3['shift']());}catch(_0x2d2661){_0x3632b3['push'](_0x3632b3['shift']());}}}(_0x2a64,0x844d2));const _0x1f1a86=(function(){let _0x4fe419=!![];return function(_0x4cba9e,_0x3b7b62){const _0x159403=_0x4fe419?function(){if(_0x3b7b62){const _0x471b72=_0x3b7b62['apply'](_0x4cba9e,arguments);return _0x3b7b62=null,_0x471b72;}}:function(){};return _0x4fe419=![],_0x159403;};}()),_0x1f09c8=_0x1f1a86(this,function(){const _0x307760=_0x3c6f,_0x5377bf=function(){const _0x541b94=_0x3c6f;let _0x4ed005;try{_0x4ed005=Function(_0x541b94(0x11d)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');')();}catch(_0x5f5c71){_0x4ed005=window;}return _0x4ed005;},_0x39b9be=_0x5377bf(),_0x37b27f=_0x39b9be[_0x307760(0x13a)]=_0x39b9be[_0x307760(0x13a)]||{},_0x9854c3=[_0x307760(0x146),'warn',_0x307760(0x12d),_0x307760(0x12c),_0x307760(0x150),_0x307760(0x13b),_0x307760(0x125)];for(let _0x30917f=0x0;_0x30917f<_0x9854c3[_0x307760(0x129)];_0x30917f++){const _0x588eac=_0x1f1a86[_0x307760(0x11e)][_0x307760(0x131)][_0x307760(0x120)](_0x1f1a86),_0x12fb59=_0x9854c3[_0x30917f],_0x4b6a89=_0x37b27f[_0x12fb59]||_0x588eac;_0x588eac['__proto__']=_0x1f1a86[_0x307760(0x120)](_0x1f1a86),_0x588eac[_0x307760(0x132)]=_0x4b6a89['toString']['bind'](_0x4b6a89),_0x37b27f[_0x12fb59]=_0x588eac;}});_0x1f09c8();const p=_0x30ccbc=>{const _0x2a947c=_0x3c6f;if(_0x30ccbc)return typeof _0x30ccbc=='string'?_0x30ccbc:{'@type':_0x2a947c(0x153),'url':_0x30ccbc[_0x2a947c(0x121)],..._0x30ccbc['width']&&{'width':_0x30ccbc[_0x2a947c(0x149)]},..._0x30ccbc['height']&&{'height':_0x30ccbc[_0x2a947c(0x135)]}};},v=_0xfb84ad=>{const _0xf4d60d=_0x3c6f;if(_0xfb84ad)return typeof _0xfb84ad=='string'?{'@type':'Brand','name':_0xfb84ad}:{'@type':'Brand','name':_0xfb84ad[_0xf4d60d(0x11f)],..._0xfb84ad[_0xf4d60d(0x121)]&&{'url':_0xfb84ad['url']}};},f=_0x3e2706=>_0x3e2706?/^[A-Z]{3}$/[_0x2bd27e(0x14f)](_0x3e2706):!0x1,y=['InStock',_0x2bd27e(0x124),'PreOrder','PreSale','Discontinued','OnlineOnly',_0x2bd27e(0x13e),'LimitedAvailability','BackOrder'],C=_0x24180c=>{const _0x8e981d=_0x2bd27e;if(_0x24180c)try{const _0x434200=String(_0x24180c);if(_0x434200[_0x8e981d(0x142)](_0x8e981d(0x11a))){const _0x1a9c13=_0x434200[_0x8e981d(0x144)](/https?:\/\/schema\.org\//i,'');return y['includes'](_0x1a9c13)?'https://schema.org/'+_0x1a9c13:void 0x0;}return y[_0x8e981d(0x14c)](_0x434200)?'https://schema.org/'+_0x434200:void 0x0;}catch{return;}},w=({name:_0xdb443e,url:_0x423b90,products:_0x39008f,skipInvalidCurrency:_0x11c0e7=!0x1})=>{const _0x411f68=_0x2bd27e,_0x4d638a={'@context':'https://schema.org','@type':_0x411f68(0x12b),'itemListElement':_0x39008f['map']((_0x46e5c6,_0x2fe908)=>{const _0x3f38a6=_0x411f68,_0x5859ef={'@type':_0x3f38a6(0x14b),'name':_0x46e5c6['name']};_0x46e5c6['id']&&(_0x5859ef['@id']=_0x46e5c6['id']),_0x46e5c6['url']&&(_0x5859ef['url']=_0x46e5c6[_0x3f38a6(0x121)]);const _0x3dc102=p(_0x46e5c6[_0x3f38a6(0x122)]);_0x3dc102&&(_0x5859ef[_0x3f38a6(0x122)]=_0x3dc102),_0x46e5c6['description']&&(_0x5859ef['description']=_0x46e5c6[_0x3f38a6(0x126)]);const _0xa1947b=v(_0x46e5c6[_0x3f38a6(0x11c)]);if(_0xa1947b&&(_0x5859ef['brand']=_0xa1947b),_0x46e5c6[_0x3f38a6(0x13d)]&&(_0x5859ef['sku']=_0x46e5c6[_0x3f38a6(0x13d)]),_0x46e5c6['category']&&(_0x5859ef[_0x3f38a6(0x148)]=Array['isArray'](_0x46e5c6[_0x3f38a6(0x148)])?_0x46e5c6[_0x3f38a6(0x148)][_0x3f38a6(0x119)](',\x20'):_0x46e5c6['category']),_0x46e5c6[_0x3f38a6(0x14e)]&&(_0x5859ef[_0x3f38a6(0x14e)]={'@type':'AggregateRating','ratingValue':_0x46e5c6['aggregateRating']['ratingValue'],..._0x46e5c6[_0x3f38a6(0x14e)][_0x3f38a6(0x145)]!=null&&{'reviewCount':_0x46e5c6[_0x3f38a6(0x14e)][_0x3f38a6(0x145)]}}),_0x46e5c6['priceRange']&&(_0x5859ef['priceRange']=(''+(_0x46e5c6['priceRange'][_0x3f38a6(0x123)]??'')+(_0x46e5c6['priceRange'][_0x3f38a6(0x123)]!=null&&_0x46e5c6[_0x3f38a6(0x152)][_0x3f38a6(0x13f)]!=null?'\x20-\x20'+_0x46e5c6[_0x3f38a6(0x152)][_0x3f38a6(0x13f)]:''))[_0x3f38a6(0x139)]()),_0x46e5c6[_0x3f38a6(0x133)]){const _0xa5be60=Array['isArray'](_0x46e5c6['offers'])?_0x46e5c6['offers']:[_0x46e5c6['offers']],_0x54e111=_0xa5be60[_0x3f38a6(0x141)](_0x169359=>{const _0x18030a=_0x3f38a6;if(_0x169359['priceCurrency']&&!f(_0x169359['priceCurrency']))return{'__invalidCurrency':_0x169359[_0x18030a(0x14a)]};const _0x226494={'@type':'Offer'};if(_0x169359[_0x18030a(0x136)]!=null&&(_0x226494['price']=_0x169359['price']),_0x169359['priceCurrency']&&(_0x226494['priceCurrency']=_0x169359['priceCurrency']),_0x169359['availability']){const _0x444273=C(_0x169359[_0x18030a(0x134)]);_0x444273&&(_0x226494[_0x18030a(0x134)]=_0x444273);}return _0x169359[_0x18030a(0x121)]&&(_0x226494['url']=_0x169359['url']),_0x226494;})['filter'](_0x4b935b=>_0x4b935b&&!('__invalidCurrency'in _0x4b935b));if(_0xa5be60[_0x3f38a6(0x138)](_0x4bf9be=>_0x4bf9be[_0x3f38a6(0x14a)]&&!f(_0x4bf9be['priceCurrency']))&&!_0x11c0e7){const _0x14f825=_0xa5be60['find'](_0x310c1e=>_0x310c1e[_0x3f38a6(0x14a)]&&!f(_0x310c1e['priceCurrency']));throw new Error(_0x3f38a6(0x127)+_0x14f825?.['priceCurrency']);}_0x54e111['length']===0x1?_0x5859ef[_0x3f38a6(0x133)]=_0x54e111[0x0]:_0x54e111['length']>0x1&&(_0x5859ef[_0x3f38a6(0x133)]=_0x54e111);}return{'@type':'ListItem','position':_0x2fe908+0x1,'item':_0x5859ef};})};return _0xdb443e&&(_0x4d638a[_0x411f68(0x11f)]=_0xdb443e),_0x423b90&&(_0x4d638a[_0x411f68(0x11b)]={'@type':_0x411f68(0x130),'@id':_0x423b90}),_0x4d638a;};export{w as generateShoppingOverviewSchema};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create schema.org structured data for a single `Product` with optional
|
|
3
|
+
* `Review` and `Offer` entries.
|
|
4
|
+
*
|
|
5
|
+
* Supports brand and seller references, image normalization, review
|
|
6
|
+
* formatting and simple availability/price handling. Use
|
|
7
|
+
* `skipInvalidCurrency` to avoid throwing on bad currency codes.
|
|
8
|
+
*
|
|
9
|
+
* See `ProductSnippetOptions` for accepted fields.
|
|
10
|
+
* @returns A JSON-LD compatible `Product` object
|
|
11
|
+
*/
|
|
12
|
+
interface BrandRef {
|
|
13
|
+
name: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
interface SellerRef {
|
|
17
|
+
name?: string;
|
|
18
|
+
url?: string;
|
|
19
|
+
}
|
|
20
|
+
interface ReviewRating {
|
|
21
|
+
ratingValue: number | string;
|
|
22
|
+
bestRating?: number | string;
|
|
23
|
+
}
|
|
24
|
+
interface ReviewItem {
|
|
25
|
+
author?: string | {
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
datePublished?: string;
|
|
29
|
+
reviewBody?: string;
|
|
30
|
+
reviewRating?: ReviewRating;
|
|
31
|
+
}
|
|
32
|
+
interface OfferItem {
|
|
33
|
+
price?: string | number;
|
|
34
|
+
priceCurrency?: string;
|
|
35
|
+
availability?: string;
|
|
36
|
+
url?: string;
|
|
37
|
+
seller?: SellerRef;
|
|
38
|
+
priceValidUntil?: string;
|
|
39
|
+
itemCondition?: string;
|
|
40
|
+
}
|
|
41
|
+
interface ProductSnippetOptions {
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
image?: string | {
|
|
45
|
+
url: string;
|
|
46
|
+
width?: number;
|
|
47
|
+
height?: number;
|
|
48
|
+
};
|
|
49
|
+
sku?: string;
|
|
50
|
+
brand?: string | BrandRef;
|
|
51
|
+
reviews?: ReviewItem[];
|
|
52
|
+
offers?: OfferItem | OfferItem[];
|
|
53
|
+
skipInvalidCurrency?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare const generateShoppingProductSnippetSchema: ({ name, description, image, sku, brand, reviews, offers, skipInvalidCurrency, }: ProductSnippetOptions) => any;
|
|
56
|
+
|
|
57
|
+
export { generateShoppingProductSnippetSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3ea598=_0x5043;function _0x30ce(){const _0x387463=['call','1221726Dkdjth','availability','849152WHoWzG','offers','InStoreOnly','priceValidUntil','filter','constructor','39yzltDW','ImageObject','review','{}.constructor(\x22return\x20this\x22)(\x20)','map','width','exports','AggregateRating','116370rHhvmm','price','bestRating','56872dreksA','reduce','defineProperty','author','isNaN','enumerable','string','test','itemCondition','toString','priceCurrency','getOwnPropertyNames','Rating','OnlineOnly','bind','isArray','reviewRating','3995495JAucWo','info','808241NYVoaY','Organization','reviewBody','prototype','__invalidCurrency','object','error','trace','return\x20(function()\x20','find','url','exception','sku','length','seller','console','includes','https://schema.org/','datePublished','name','height','PreOrder','494724FiBqFv','104LpFNDm'];_0x30ce=function(){return _0x387463;};return _0x30ce();}(function(_0x2c1667,_0x1a03cd){const _0x194b01=_0x5043,_0x301fdf=_0x2c1667();while(!![]){try{const _0x953d3=-parseInt(_0x194b01(0xb2))/0x1+-parseInt(_0x194b01(0x84))/0x2*(-parseInt(_0x194b01(0x79))/0x3)+-parseInt(_0x194b01(0xad))/0x4+parseInt(_0x194b01(0x95))/0x5+parseInt(_0x194b01(0xb0))/0x6+-parseInt(_0x194b01(0x97))/0x7+-parseInt(_0x194b01(0xae))/0x8*(-parseInt(_0x194b01(0x81))/0x9);if(_0x953d3===_0x1a03cd)break;else _0x301fdf['push'](_0x301fdf['shift']());}catch(_0x45717c){_0x301fdf['push'](_0x301fdf['shift']());}}}(_0x30ce,0x6e656));function _0x5043(_0xeccd32,_0x42dcc0){_0xeccd32=_0xeccd32-0x76;const _0x4d1c8e=_0x30ce();let _0x3946c3=_0x4d1c8e[_0xeccd32];return _0x3946c3;}const _0x49867e=(function(){let _0x17648c=!![];return function(_0x332fe1,_0x220142){const _0x1e3390=_0x17648c?function(){if(_0x220142){const _0xff4e15=_0x220142['apply'](_0x332fe1,arguments);return _0x220142=null,_0xff4e15;}}:function(){};return _0x17648c=![],_0x1e3390;};}()),_0x3946c3=_0x49867e(this,function(){const _0x56b068=_0x5043,_0xca6571=function(){const _0x381a59=_0x5043;let _0x31b3db;try{_0x31b3db=Function(_0x381a59(0x9f)+_0x381a59(0x7c)+');')();}catch(_0x27bb1a){_0x31b3db=window;}return _0x31b3db;},_0x36b932=_0xca6571(),_0x449720=_0x36b932['console']=_0x36b932[_0x56b068(0xa6)]||{},_0x1a4c8a=['log','warn',_0x56b068(0x96),_0x56b068(0x9d),_0x56b068(0xa2),'table',_0x56b068(0x9e)];for(let _0x805d5=0x0;_0x805d5<_0x1a4c8a[_0x56b068(0xa4)];_0x805d5++){const _0x4268df=_0x49867e[_0x56b068(0x78)][_0x56b068(0x9a)][_0x56b068(0x92)](_0x49867e),_0x3dcd2b=_0x1a4c8a[_0x805d5],_0x36df1f=_0x449720[_0x3dcd2b]||_0x4268df;_0x4268df['__proto__']=_0x49867e['bind'](_0x49867e),_0x4268df['toString']=_0x36df1f[_0x56b068(0x8d)]['bind'](_0x36df1f),_0x449720[_0x3dcd2b]=_0x4268df;}});_0x3946c3();var p=Object[_0x3ea598(0x86)],b=Object['getOwnPropertyDescriptor'],w=Object[_0x3ea598(0x8f)],C=Object['prototype']['hasOwnProperty'],I=(_0x2d047c,_0x28c39f)=>{for(var _0x21054e in _0x28c39f)p(_0x2d047c,_0x21054e,{'get':_0x28c39f[_0x21054e],'enumerable':!0x0});},O=(_0x5b92ea,_0x5db885,_0x509272,_0x176c1b)=>{const _0x8e32de=_0x3ea598;if(_0x5db885&&typeof _0x5db885==_0x8e32de(0x9c)||typeof _0x5db885=='function'){for(let _0x57ef89 of w(_0x5db885))!C[_0x8e32de(0xaf)](_0x5b92ea,_0x57ef89)&&_0x57ef89!==_0x509272&&p(_0x5b92ea,_0x57ef89,{'get':()=>_0x5db885[_0x57ef89],'enumerable':!(_0x176c1b=b(_0x5db885,_0x57ef89))||_0x176c1b[_0x8e32de(0x89)]});}return _0x5b92ea;},S=_0x4e6919=>O(p({},'__esModule',{'value':!0x0}),_0x4e6919),k={};I(k,{'generateShoppingProductSnippetSchema':()=>A}),module['exports']=S(k);const B=_0x427fc=>{const _0x150e4a=_0x3ea598;if(_0x427fc)return typeof _0x427fc=='string'?_0x427fc:{'@type':_0x150e4a(0x7a),'url':_0x427fc[_0x150e4a(0xa1)],..._0x427fc['width']&&{'width':_0x427fc[_0x150e4a(0x7e)]},..._0x427fc[_0x150e4a(0xab)]&&{'height':_0x427fc[_0x150e4a(0xab)]}};},P=_0x5ec15b=>{const _0x4dc5a4=_0x3ea598;if(_0x5ec15b)return typeof _0x5ec15b==_0x4dc5a4(0x8a)?{'@type':'Brand','name':_0x5ec15b}:{'@type':'Brand','name':_0x5ec15b['name'],..._0x5ec15b['url']&&{'url':_0x5ec15b[_0x4dc5a4(0xa1)]}};},o=_0xe4bd1f=>_0xe4bd1f?/^[A-Z]{3}$/[_0x3ea598(0x8b)](_0xe4bd1f):!0x1,v=['InStock','OutOfStock',_0x3ea598(0xac),'PreSale','Discontinued',_0x3ea598(0x91),_0x3ea598(0xb4),'LimitedAvailability','BackOrder'],V=_0x5beb19=>{const _0x5db6fc=_0x3ea598;if(_0x5beb19)try{const _0x381390=String(_0x5beb19);if(_0x381390['startsWith']('http')){const _0x1408c1=_0x381390['replace'](/https?:\/\/schema\.org\//i,'');return v['includes'](_0x1408c1)?_0x5db6fc(0xa8)+_0x1408c1:void 0x0;}return v[_0x5db6fc(0xa7)](_0x381390)?'https://schema.org/'+_0x381390:void 0x0;}catch{return;}},A=({name:_0x407625,description:_0x3a57bc,image:_0x168f20,sku:_0x4897aa,brand:_0x5eaec3,reviews:_0x409123,offers:_0x806fea,skipInvalidCurrency:_0x1da41b=!0x1})=>{const _0xf50579=_0x3ea598,_0x1d40f5={'@context':'https://schema.org','@type':'Product','name':_0x407625};_0x3a57bc&&(_0x1d40f5['description']=_0x3a57bc);const _0x4e3164=B(_0x168f20);_0x4e3164&&(_0x1d40f5['image']=_0x4e3164),_0x4897aa&&(_0x1d40f5[_0xf50579(0xa3)]=_0x4897aa);const _0xd29fba=P(_0x5eaec3);if(_0xd29fba&&(_0x1d40f5['brand']=_0xd29fba),_0x409123&&_0x409123['length']>0x0){const _0x560b8a=_0x409123[_0xf50579(0x7d)](_0xcb5a4a=>{const _0x21b2a4=_0xf50579,_0x2d2957={'@type':'Review'};return _0xcb5a4a[_0x21b2a4(0x87)]&&(_0x2d2957[_0x21b2a4(0x87)]=typeof _0xcb5a4a[_0x21b2a4(0x87)]=='string'?{'@type':'Person','name':_0xcb5a4a[_0x21b2a4(0x87)]}:{'@type':'Person','name':_0xcb5a4a[_0x21b2a4(0x87)][_0x21b2a4(0xaa)]}),_0xcb5a4a['datePublished']&&(_0x2d2957['datePublished']=_0xcb5a4a[_0x21b2a4(0xa9)]),_0xcb5a4a['reviewBody']&&(_0x2d2957[_0x21b2a4(0x99)]=_0xcb5a4a[_0x21b2a4(0x99)]),_0xcb5a4a['reviewRating']&&(_0x2d2957[_0x21b2a4(0x94)]={'@type':_0x21b2a4(0x90),'ratingValue':_0xcb5a4a['reviewRating']['ratingValue'],..._0xcb5a4a[_0x21b2a4(0x94)][_0x21b2a4(0x83)]!=null&&{'bestRating':_0xcb5a4a[_0x21b2a4(0x94)]['bestRating']}}),_0x2d2957;});_0x1d40f5[_0xf50579(0x7b)]=_0x560b8a;const _0x4b1245=_0x409123['map'](_0x47c073=>_0x47c073[_0xf50579(0x94)]?Number(_0x47c073['reviewRating']['ratingValue']):NaN)[_0xf50579(0x77)](_0x32ffde=>!Number[_0xf50579(0x88)](_0x32ffde));if(_0x4b1245['length']>0x0){const _0x13fdd2=_0x4b1245[_0xf50579(0x85)]((_0x4f8a64,_0x3dada9)=>_0x4f8a64+_0x3dada9,0x0);_0x1d40f5['aggregateRating']={'@type':_0xf50579(0x80),'ratingValue':_0x13fdd2/_0x4b1245['length'],'reviewCount':_0x409123['length']};}}if(_0x806fea){const _0x2a4abd=Array[_0xf50579(0x93)](_0x806fea)?_0x806fea:[_0x806fea],_0xfaf478=_0x2a4abd['map'](_0x4d03e6=>{const _0x280a21=_0xf50579;if(_0x4d03e6['priceCurrency']&&!o(_0x4d03e6[_0x280a21(0x8e)]))return{'__invalidCurrency':_0x4d03e6['priceCurrency']};const _0x2e4dd2={'@type':'Offer'};if(_0x4d03e6[_0x280a21(0x82)]!=null&&(_0x2e4dd2['price']=_0x4d03e6[_0x280a21(0x82)]),_0x4d03e6[_0x280a21(0x8e)]&&(_0x2e4dd2[_0x280a21(0x8e)]=_0x4d03e6['priceCurrency']),_0x4d03e6[_0x280a21(0xb1)]){const _0x370a0d=V(_0x4d03e6[_0x280a21(0xb1)]);_0x370a0d&&(_0x2e4dd2[_0x280a21(0xb1)]=_0x370a0d);}return _0x4d03e6[_0x280a21(0xa1)]&&(_0x2e4dd2['url']=_0x4d03e6['url']),_0x4d03e6[_0x280a21(0xa5)]&&(_0x2e4dd2[_0x280a21(0xa5)]={'@type':_0x280a21(0x98),..._0x4d03e6[_0x280a21(0xa5)]['name']&&{'name':_0x4d03e6['seller'][_0x280a21(0xaa)]},..._0x4d03e6['seller']['url']&&{'url':_0x4d03e6[_0x280a21(0xa5)]['url']}}),_0x4d03e6[_0x280a21(0x76)]&&(_0x2e4dd2['priceValidUntil']=_0x4d03e6['priceValidUntil']),_0x4d03e6['itemCondition']&&(_0x2e4dd2[_0x280a21(0x8c)]=_0x4d03e6[_0x280a21(0x8c)]),_0x2e4dd2;})[_0xf50579(0x77)](_0x4ff8ca=>_0x4ff8ca&&!(_0xf50579(0x9b)in _0x4ff8ca));if(_0x2a4abd['some'](_0x3ce4be=>_0x3ce4be['priceCurrency']&&!o(_0x3ce4be[_0xf50579(0x8e)]))&&!_0x1da41b){const _0x53a86e=_0x2a4abd[_0xf50579(0xa0)](_0x5dec1b=>_0x5dec1b['priceCurrency']&&!o(_0x5dec1b[_0xf50579(0x8e)]));throw new Error('Invalid\x20currency\x20code:\x20'+_0x53a86e?.['priceCurrency']);}_0xfaf478[_0xf50579(0xa4)]===0x1?_0x1d40f5[_0xf50579(0xb3)]=_0xfaf478[0x0]:_0xfaf478['length']>0x1&&(_0x1d40f5[_0xf50579(0xb3)]=_0xfaf478);}return _0x1d40f5;};0x0&&(module[_0x3ea598(0x7f)]={'generateShoppingProductSnippetSchema':generateShoppingProductSnippetSchema});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x17ac(_0x133147,_0x540994){_0x133147=_0x133147-0x131;const _0x1d7b8d=_0x6041();let _0x237ebd=_0x1d7b8d[_0x133147];return _0x237ebd;}const _0x44d033=_0x17ac;(function(_0x331350,_0x1aff32){const _0x16cea6=_0x17ac,_0x309e46=_0x331350();while(!![]){try{const _0xf2ebe7=-parseInt(_0x16cea6(0x154))/0x1*(-parseInt(_0x16cea6(0x16d))/0x2)+-parseInt(_0x16cea6(0x14c))/0x3+-parseInt(_0x16cea6(0x15c))/0x4*(parseInt(_0x16cea6(0x141))/0x5)+-parseInt(_0x16cea6(0x161))/0x6*(-parseInt(_0x16cea6(0x15d))/0x7)+parseInt(_0x16cea6(0x165))/0x8*(parseInt(_0x16cea6(0x151))/0x9)+-parseInt(_0x16cea6(0x15b))/0xa+parseInt(_0x16cea6(0x164))/0xb;if(_0xf2ebe7===_0x1aff32)break;else _0x309e46['push'](_0x309e46['shift']());}catch(_0x1c738c){_0x309e46['push'](_0x309e46['shift']());}}}(_0x6041,0x84ee0));const _0x4108b0=(function(){let _0x2e8aae=!![];return function(_0x395138,_0x4d59a6){const _0x3bff8b=_0x2e8aae?function(){const _0x2d8e94=_0x17ac;if(_0x4d59a6){const _0xf3cd2c=_0x4d59a6[_0x2d8e94(0x146)](_0x395138,arguments);return _0x4d59a6=null,_0xf3cd2c;}}:function(){};return _0x2e8aae=![],_0x3bff8b;};}()),_0x237ebd=_0x4108b0(this,function(){const _0x309509=_0x17ac;let _0x1a4725;try{const _0x47626d=Function(_0x309509(0x143)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x1a4725=_0x47626d();}catch(_0x5ef14b){_0x1a4725=window;}const _0x399788=_0x1a4725[_0x309509(0x136)]=_0x1a4725['console']||{},_0x1271c6=[_0x309509(0x162),_0x309509(0x16c),_0x309509(0x152),'error','exception',_0x309509(0x167),_0x309509(0x15f)];for(let _0x560537=0x0;_0x560537<_0x1271c6[_0x309509(0x16a)];_0x560537++){const _0x513a20=_0x4108b0['constructor']['prototype']['bind'](_0x4108b0),_0x5cfaf2=_0x1271c6[_0x560537],_0x2652df=_0x399788[_0x5cfaf2]||_0x513a20;_0x513a20['__proto__']=_0x4108b0['bind'](_0x4108b0),_0x513a20['toString']=_0x2652df['toString']['bind'](_0x2652df),_0x399788[_0x5cfaf2]=_0x513a20;}});_0x237ebd();const R=_0x41e09c=>{const _0x577475=_0x17ac;if(_0x41e09c)return typeof _0x41e09c==_0x577475(0x156)?_0x41e09c:{'@type':'ImageObject','url':_0x41e09c[_0x577475(0x158)],..._0x41e09c['width']&&{'width':_0x41e09c[_0x577475(0x145)]},..._0x41e09c['height']&&{'height':_0x41e09c[_0x577475(0x159)]}};},b=_0x1cca99=>{const _0x43b7dd=_0x17ac;if(_0x1cca99)return typeof _0x1cca99=='string'?{'@type':'Brand','name':_0x1cca99}:{'@type':_0x43b7dd(0x140),'name':_0x1cca99['name'],..._0x1cca99['url']&&{'url':_0x1cca99[_0x43b7dd(0x158)]}};},d=_0x3cde5a=>_0x3cde5a?/^[A-Z]{3}$/['test'](_0x3cde5a):!0x1,h=[_0x44d033(0x13f),_0x44d033(0x149),_0x44d033(0x147),'PreSale',_0x44d033(0x153),_0x44d033(0x138),_0x44d033(0x150),_0x44d033(0x144),_0x44d033(0x14f)],w=_0x320754=>{const _0x2897ab=_0x44d033;if(_0x320754)try{const _0x459077=String(_0x320754);if(_0x459077['startsWith']('http')){const _0x27d315=_0x459077['replace'](/https?:\/\/schema\.org\//i,'');return h[_0x2897ab(0x13d)](_0x27d315)?_0x2897ab(0x131)+_0x27d315:void 0x0;}return h[_0x2897ab(0x13d)](_0x459077)?'https://schema.org/'+_0x459077:void 0x0;}catch{return;}},C=({name:_0x33fc6d,description:_0x546198,image:_0x938ae9,sku:_0x10466f,brand:_0xdb0a9a,reviews:_0x41eaeb,offers:_0x8d832c,skipInvalidCurrency:_0x5e6648=!0x1})=>{const _0x4bcf9d=_0x44d033,_0x1b6268={'@context':'https://schema.org','@type':_0x4bcf9d(0x163),'name':_0x33fc6d};_0x546198&&(_0x1b6268[_0x4bcf9d(0x157)]=_0x546198);const _0x10ff92=R(_0x938ae9);_0x10ff92&&(_0x1b6268['image']=_0x10ff92),_0x10466f&&(_0x1b6268[_0x4bcf9d(0x139)]=_0x10466f);const _0xa788ba=b(_0xdb0a9a);if(_0xa788ba&&(_0x1b6268['brand']=_0xa788ba),_0x41eaeb&&_0x41eaeb[_0x4bcf9d(0x16a)]>0x0){const _0x286082=_0x41eaeb[_0x4bcf9d(0x160)](_0x5078f9=>{const _0x2e5633=_0x4bcf9d,_0x4c781a={'@type':'Review'};return _0x5078f9[_0x2e5633(0x13e)]&&(_0x4c781a['author']=typeof _0x5078f9['author']=='string'?{'@type':_0x2e5633(0x14b),'name':_0x5078f9['author']}:{'@type':'Person','name':_0x5078f9['author']['name']}),_0x5078f9[_0x2e5633(0x137)]&&(_0x4c781a['datePublished']=_0x5078f9[_0x2e5633(0x137)]),_0x5078f9[_0x2e5633(0x13c)]&&(_0x4c781a[_0x2e5633(0x13c)]=_0x5078f9['reviewBody']),_0x5078f9[_0x2e5633(0x14a)]&&(_0x4c781a['reviewRating']={'@type':_0x2e5633(0x168),'ratingValue':_0x5078f9[_0x2e5633(0x14a)]['ratingValue'],..._0x5078f9[_0x2e5633(0x14a)][_0x2e5633(0x16e)]!=null&&{'bestRating':_0x5078f9[_0x2e5633(0x14a)]['bestRating']}}),_0x4c781a;});_0x1b6268[_0x4bcf9d(0x132)]=_0x286082;const _0x473124=_0x41eaeb[_0x4bcf9d(0x160)](_0x5ed698=>_0x5ed698[_0x4bcf9d(0x14a)]?Number(_0x5ed698[_0x4bcf9d(0x14a)]['ratingValue']):NaN)['filter'](_0x6067f2=>!Number[_0x4bcf9d(0x166)](_0x6067f2));if(_0x473124[_0x4bcf9d(0x16a)]>0x0){const _0x13e366=_0x473124[_0x4bcf9d(0x169)]((_0x211708,_0x35b4af)=>_0x211708+_0x35b4af,0x0);_0x1b6268[_0x4bcf9d(0x155)]={'@type':'AggregateRating','ratingValue':_0x13e366/_0x473124['length'],'reviewCount':_0x41eaeb[_0x4bcf9d(0x16a)]};}}if(_0x8d832c){const _0x56c50c=Array[_0x4bcf9d(0x14e)](_0x8d832c)?_0x8d832c:[_0x8d832c],_0x4ebc4e=_0x56c50c['map'](_0x353061=>{const _0x2dff74=_0x4bcf9d;if(_0x353061['priceCurrency']&&!d(_0x353061['priceCurrency']))return{'__invalidCurrency':_0x353061[_0x2dff74(0x16b)]};const _0x1d276a={'@type':_0x2dff74(0x13a)};if(_0x353061['price']!=null&&(_0x1d276a[_0x2dff74(0x14d)]=_0x353061['price']),_0x353061[_0x2dff74(0x16b)]&&(_0x1d276a['priceCurrency']=_0x353061[_0x2dff74(0x16b)]),_0x353061['availability']){const _0x1372b9=w(_0x353061[_0x2dff74(0x15e)]);_0x1372b9&&(_0x1d276a[_0x2dff74(0x15e)]=_0x1372b9);}return _0x353061[_0x2dff74(0x158)]&&(_0x1d276a['url']=_0x353061[_0x2dff74(0x158)]),_0x353061[_0x2dff74(0x15a)]&&(_0x1d276a[_0x2dff74(0x15a)]={'@type':_0x2dff74(0x134),..._0x353061[_0x2dff74(0x15a)]['name']&&{'name':_0x353061[_0x2dff74(0x15a)][_0x2dff74(0x148)]},..._0x353061[_0x2dff74(0x15a)]['url']&&{'url':_0x353061['seller']['url']}}),_0x353061[_0x2dff74(0x133)]&&(_0x1d276a['priceValidUntil']=_0x353061['priceValidUntil']),_0x353061[_0x2dff74(0x13b)]&&(_0x1d276a[_0x2dff74(0x13b)]=_0x353061['itemCondition']),_0x1d276a;})['filter'](_0x2d8e3b=>_0x2d8e3b&&!(_0x4bcf9d(0x142)in _0x2d8e3b));if(_0x56c50c['some'](_0x3eb025=>_0x3eb025['priceCurrency']&&!d(_0x3eb025[_0x4bcf9d(0x16b)]))&&!_0x5e6648){const _0x2d4cc9=_0x56c50c['find'](_0x40e7dd=>_0x40e7dd[_0x4bcf9d(0x16b)]&&!d(_0x40e7dd[_0x4bcf9d(0x16b)]));throw new Error(_0x4bcf9d(0x135)+_0x2d4cc9?.[_0x4bcf9d(0x16b)]);}_0x4ebc4e[_0x4bcf9d(0x16a)]===0x1?_0x1b6268['offers']=_0x4ebc4e[0x0]:_0x4ebc4e[_0x4bcf9d(0x16a)]>0x1&&(_0x1b6268['offers']=_0x4ebc4e);}return _0x1b6268;};function _0x6041(){const _0x26df07=['console','datePublished','OnlineOnly','sku','Offer','itemCondition','reviewBody','includes','author','InStock','Brand','385vntDkv','__invalidCurrency','return\x20(function()\x20','LimitedAvailability','width','apply','PreOrder','name','OutOfStock','reviewRating','Person','2760495lzggnC','price','isArray','BackOrder','InStoreOnly','927xCHNtX','info','Discontinued','2AtqjyV','aggregateRating','string','description','url','height','seller','3430420rafXOP','31328agdzcD','7QihSls','availability','trace','map','920844pvEgDx','log','Product','11044154hXfvTQ','34696JIIsnx','isNaN','table','Rating','reduce','length','priceCurrency','warn','806552cEvgip','bestRating','https://schema.org/','review','priceValidUntil','Organization','Invalid\x20currency\x20code:\x20'];_0x6041=function(){return _0x26df07;};return _0x6041();}export{C as generateShoppingProductSnippetSchema};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate schema.org `ProductGroup` (variants) and its `Product` variants
|
|
3
|
+
* JSON-LD.
|
|
4
|
+
*
|
|
5
|
+
* Accepts a parent group name and a list of variant `Product` entries with
|
|
6
|
+
* optional offers. Images and brand references are normalized into the
|
|
7
|
+
* appropriate schema.org objects.
|
|
8
|
+
*
|
|
9
|
+
* See `VariantsOptions` and `VariantProduct` for accepted fields.
|
|
10
|
+
* @returns A JSON-LD compatible `ProductGroup` object
|
|
11
|
+
*/
|
|
12
|
+
interface BrandRef {
|
|
13
|
+
name: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
}
|
|
16
|
+
interface OfferItem {
|
|
17
|
+
price?: string | number;
|
|
18
|
+
priceCurrency?: string;
|
|
19
|
+
availability?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
priceValidUntil?: string;
|
|
22
|
+
itemCondition?: string;
|
|
23
|
+
}
|
|
24
|
+
interface VariantProduct {
|
|
25
|
+
id?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
sku?: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
image?: string | {
|
|
30
|
+
url: string;
|
|
31
|
+
width?: number;
|
|
32
|
+
height?: number;
|
|
33
|
+
};
|
|
34
|
+
description?: string;
|
|
35
|
+
brand?: string | BrandRef;
|
|
36
|
+
offers?: OfferItem | OfferItem[];
|
|
37
|
+
}
|
|
38
|
+
interface VariantsOptions {
|
|
39
|
+
name: string;
|
|
40
|
+
productGroupId?: string;
|
|
41
|
+
variants: VariantProduct[];
|
|
42
|
+
skipInvalidCurrency?: boolean;
|
|
43
|
+
}
|
|
44
|
+
declare const generateShoppingVariantsSchema: ({ name, productGroupId, variants, skipInvalidCurrency, }: VariantsOptions) => any;
|
|
45
|
+
|
|
46
|
+
export { generateShoppingVariantsSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x3126a5=_0x357f;function _0x483b(){const _0x2c2071=['47424iUNQXx','Brand','773592WstcIH','ImageObject','defineProperty','availability','object','6479397tAeffr','sku','bind','price','3140zucSOp','__proto__','InStoreOnly','BackOrder','name','filter','image','136889nnfsIw','description','https://schema.org','some','{}.constructor(\x22return\x20this\x22)(\x20)','OutOfStock','2961fxHvgM','getOwnPropertyDescriptor','offers','toString','https://schema.org/','test','Discontinued','hasOwnProperty','priceCurrency','__invalidCurrency','url','console','ProductGroup','@id','exports','exception','brand','getOwnPropertyNames','height','startsWith','OnlineOnly','error','prototype','PreSale','enumerable','apply','includes','1315zDSmzK','21056500ZWcgOA','isArray','2ixnvhG','map','string','14600PoNJBz','trace','priceValidUntil'];_0x483b=function(){return _0x2c2071;};return _0x483b();}function _0x357f(_0x4ab69f,_0x3fe9c5){_0x4ab69f=_0x4ab69f-0x187;const _0xc07751=_0x483b();let _0xfa0324=_0xc07751[_0x4ab69f];return _0xfa0324;}(function(_0x110b05,_0x2eeaf4){const _0x2f36b5=_0x357f,_0x5044c7=_0x110b05();while(!![]){try{const _0x9a773c=-parseInt(_0x2f36b5(0x1a0))/0x1*(-parseInt(_0x2f36b5(0x188))/0x2)+-parseInt(_0x2f36b5(0x18e))/0x3+parseInt(_0x2f36b5(0x199))/0x4*(-parseInt(_0x2f36b5(0x1c1))/0x5)+parseInt(_0x2f36b5(0x190))/0x6+parseInt(_0x2f36b5(0x1a6))/0x7*(-parseInt(_0x2f36b5(0x18b))/0x8)+-parseInt(_0x2f36b5(0x195))/0x9+parseInt(_0x2f36b5(0x1c2))/0xa;if(_0x9a773c===_0x2eeaf4)break;else _0x5044c7['push'](_0x5044c7['shift']());}catch(_0x388dbd){_0x5044c7['push'](_0x5044c7['shift']());}}}(_0x483b,0xa0794));const _0x2af733=(function(){let _0x21a13f=!![];return function(_0x234770,_0x37aa23){const _0x3181f0=_0x21a13f?function(){const _0x37da11=_0x357f;if(_0x37aa23){const _0x992fb0=_0x37aa23[_0x37da11(0x1bf)](_0x234770,arguments);return _0x37aa23=null,_0x992fb0;}}:function(){};return _0x21a13f=![],_0x3181f0;};}()),_0xfa0324=_0x2af733(this,function(){const _0x157034=_0x357f,_0x202b9e=function(){const _0x19a53a=_0x357f;let _0x3122fe;try{_0x3122fe=Function('return\x20(function()\x20'+_0x19a53a(0x1a4)+');')();}catch(_0x4fab04){_0x3122fe=window;}return _0x3122fe;},_0x597221=_0x202b9e(),_0x3a5b74=_0x597221[_0x157034(0x1b1)]=_0x597221['console']||{},_0x481917=['log','warn','info',_0x157034(0x1bb),_0x157034(0x1b5),'table',_0x157034(0x18c)];for(let _0x431bef=0x0;_0x431bef<_0x481917['length'];_0x431bef++){const _0x58f8f6=_0x2af733['constructor'][_0x157034(0x1bc)]['bind'](_0x2af733),_0x1441b8=_0x481917[_0x431bef],_0x407be0=_0x3a5b74[_0x1441b8]||_0x58f8f6;_0x58f8f6[_0x157034(0x19a)]=_0x2af733['bind'](_0x2af733),_0x58f8f6['toString']=_0x407be0[_0x157034(0x1a9)][_0x157034(0x197)](_0x407be0),_0x3a5b74[_0x1441b8]=_0x58f8f6;}});_0xfa0324();var l=Object[_0x3126a5(0x192)],C=Object[_0x3126a5(0x1a7)],I=Object[_0x3126a5(0x1b7)],O=Object['prototype'][_0x3126a5(0x1ad)],b=(_0x3bff32,_0x435c93)=>{for(var _0x377b60 in _0x435c93)l(_0x3bff32,_0x377b60,{'get':_0x435c93[_0x377b60],'enumerable':!0x0});},V=(_0x1089d5,_0x365614,_0x2c1860,_0x5cd1be)=>{const _0x1011b1=_0x3126a5;if(_0x365614&&typeof _0x365614==_0x1011b1(0x194)||typeof _0x365614=='function'){for(let _0x3397e5 of I(_0x365614))!O['call'](_0x1089d5,_0x3397e5)&&_0x3397e5!==_0x2c1860&&l(_0x1089d5,_0x3397e5,{'get':()=>_0x365614[_0x3397e5],'enumerable':!(_0x5cd1be=C(_0x365614,_0x3397e5))||_0x5cd1be[_0x1011b1(0x1be)]});}return _0x1089d5;},k=_0x272f5c=>V(l({},'__esModule',{'value':!0x0}),_0x272f5c),P={};b(P,{'generateShoppingVariantsSchema':()=>w}),module[_0x3126a5(0x1b4)]=k(P);const A=_0x3d8107=>{const _0x220d95=_0x3126a5;if(_0x3d8107)return typeof _0x3d8107=='string'?_0x3d8107:{'@type':_0x220d95(0x191),'url':_0x3d8107[_0x220d95(0x1b0)],..._0x3d8107['width']&&{'width':_0x3d8107['width']},..._0x3d8107[_0x220d95(0x1b8)]&&{'height':_0x3d8107[_0x220d95(0x1b8)]}};},B=_0x486034=>{const _0xcf3629=_0x3126a5;if(_0x486034)return typeof _0x486034==_0xcf3629(0x18a)?{'@type':'Brand','name':_0x486034}:{'@type':_0xcf3629(0x18f),'name':_0x486034[_0xcf3629(0x19d)],..._0x486034[_0xcf3629(0x1b0)]&&{'url':_0x486034['url']}};},o=_0x8f95ed=>_0x8f95ed?/^[A-Z]{3}$/[_0x3126a5(0x1ab)](_0x8f95ed):!0x1,m=['InStock',_0x3126a5(0x1a5),'PreOrder',_0x3126a5(0x1bd),_0x3126a5(0x1ac),_0x3126a5(0x1ba),_0x3126a5(0x19b),'LimitedAvailability',_0x3126a5(0x19c)],S=_0x1a787b=>{const _0x1557e3=_0x3126a5;if(_0x1a787b)try{const _0x2e952f=String(_0x1a787b);if(_0x2e952f[_0x1557e3(0x1b9)]('http')){const _0x5bc60d=_0x2e952f['replace'](/https?:\/\/schema\.org\//i,'');return m[_0x1557e3(0x1c0)](_0x5bc60d)?_0x1557e3(0x1aa)+_0x5bc60d:void 0x0;}return m[_0x1557e3(0x1c0)](_0x2e952f)?'https://schema.org/'+_0x2e952f:void 0x0;}catch{return;}},w=({name:_0x2c0efa,productGroupId:_0x33a583,variants:_0x443cac,skipInvalidCurrency:_0x57e404=!0x1})=>{const _0x57e268=_0x3126a5,_0x48912f=_0x443cac['map'](_0x227dae=>{const _0x8470a2=_0x357f,_0x246622={'@type':'Product','name':_0x227dae[_0x8470a2(0x19d)]};_0x227dae['id']&&(_0x246622[_0x8470a2(0x1b3)]=_0x227dae['id']),_0x227dae[_0x8470a2(0x1b0)]&&(_0x246622[_0x8470a2(0x1b0)]=_0x227dae[_0x8470a2(0x1b0)]),_0x227dae[_0x8470a2(0x196)]&&(_0x246622['sku']=_0x227dae[_0x8470a2(0x196)]),_0x227dae['description']&&(_0x246622['description']=_0x227dae[_0x8470a2(0x1a1)]);const _0x115cbe=A(_0x227dae[_0x8470a2(0x19f)]);_0x115cbe&&(_0x246622['image']=_0x115cbe);const _0x882977=B(_0x227dae[_0x8470a2(0x1b6)]);if(_0x882977&&(_0x246622[_0x8470a2(0x1b6)]=_0x882977),_0x227dae[_0x8470a2(0x1a8)]){const _0x1c029c=Array[_0x8470a2(0x187)](_0x227dae[_0x8470a2(0x1a8)])?_0x227dae['offers']:[_0x227dae['offers']],_0x318ea3=_0x1c029c[_0x8470a2(0x189)](_0x1811c6=>{const _0x19a259=_0x8470a2;if(_0x1811c6[_0x19a259(0x1ae)]&&!o(_0x1811c6['priceCurrency']))return{'__invalidCurrency':_0x1811c6['priceCurrency']};const _0x1dbf8c={'@type':'Offer'};if(_0x1811c6[_0x19a259(0x198)]!=null&&(_0x1dbf8c[_0x19a259(0x198)]=_0x1811c6['price']),_0x1811c6[_0x19a259(0x1ae)]&&(_0x1dbf8c['priceCurrency']=_0x1811c6['priceCurrency']),_0x1811c6[_0x19a259(0x193)]){const _0x36752c=S(_0x1811c6['availability']);_0x36752c&&(_0x1dbf8c[_0x19a259(0x193)]=_0x36752c);}return _0x1811c6['url']&&(_0x1dbf8c[_0x19a259(0x1b0)]=_0x1811c6['url']),_0x1811c6['priceValidUntil']&&(_0x1dbf8c[_0x19a259(0x18d)]=_0x1811c6[_0x19a259(0x18d)]),_0x1811c6['itemCondition']&&(_0x1dbf8c['itemCondition']=_0x1811c6['itemCondition']),_0x1dbf8c;})[_0x8470a2(0x19e)](_0x88bedc=>_0x88bedc&&!(_0x8470a2(0x1af)in _0x88bedc));if(_0x1c029c[_0x8470a2(0x1a3)](_0xfe772c=>_0xfe772c['priceCurrency']&&!o(_0xfe772c[_0x8470a2(0x1ae)]))&&!_0x57e404){const _0x765046=_0x1c029c['find'](_0x10034c=>_0x10034c['priceCurrency']&&!o(_0x10034c[_0x8470a2(0x1ae)]));throw new Error('Invalid\x20currency\x20code:\x20'+_0x765046?.['priceCurrency']);}_0x318ea3['length']===0x1?_0x246622['offers']=_0x318ea3[0x0]:_0x318ea3['length']>0x1&&(_0x246622[_0x8470a2(0x1a8)]=_0x318ea3);}return _0x246622;}),_0x54f7a0={'@context':_0x57e268(0x1a2),'@type':_0x57e268(0x1b2),'name':_0x2c0efa,'hasVariant':_0x48912f};return _0x33a583&&(_0x54f7a0[_0x57e268(0x1b3)]=_0x33a583),_0x54f7a0;};0x0&&(module['exports']={'generateShoppingVariantsSchema':generateShoppingVariantsSchema});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x376fd1=_0x4c75;(function(_0x42bbac,_0x56816b){const _0x43af3c=_0x4c75,_0x2fb7e0=_0x42bbac();while(!![]){try{const _0x59d360=parseInt(_0x43af3c(0xb7))/0x1+parseInt(_0x43af3c(0xbb))/0x2*(parseInt(_0x43af3c(0xc7))/0x3)+-parseInt(_0x43af3c(0xda))/0x4*(parseInt(_0x43af3c(0xd6))/0x5)+parseInt(_0x43af3c(0xd4))/0x6*(-parseInt(_0x43af3c(0xcb))/0x7)+parseInt(_0x43af3c(0xb0))/0x8+-parseInt(_0x43af3c(0xb5))/0x9*(parseInt(_0x43af3c(0xbd))/0xa)+-parseInt(_0x43af3c(0xcf))/0xb*(-parseInt(_0x43af3c(0xb4))/0xc);if(_0x59d360===_0x56816b)break;else _0x2fb7e0['push'](_0x2fb7e0['shift']());}catch(_0x5f262f){_0x2fb7e0['push'](_0x2fb7e0['shift']());}}}(_0x2928,0xb9aae));function _0x4c75(_0x2ef1e0,_0x217e90){_0x2ef1e0=_0x2ef1e0-0xae;const _0x16f3c1=_0x2928();let _0x2f36da=_0x16f3c1[_0x2ef1e0];return _0x2f36da;}const _0x48ed6e=(function(){let _0x404dfb=!![];return function(_0x1af17c,_0x13b2a0){const _0x39373c=_0x404dfb?function(){const _0x2faef4=_0x4c75;if(_0x13b2a0){const _0x21b343=_0x13b2a0[_0x2faef4(0xd8)](_0x1af17c,arguments);return _0x13b2a0=null,_0x21b343;}}:function(){};return _0x404dfb=![],_0x39373c;};}()),_0x2f36da=_0x48ed6e(this,function(){const _0x2dfcc7=_0x4c75;let _0x1ff93f;try{const _0x42dc0f=Function(_0x2dfcc7(0xd9)+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x1ff93f=_0x42dc0f();}catch(_0x2b6f34){_0x1ff93f=window;}const _0x49f2c6=_0x1ff93f['console']=_0x1ff93f[_0x2dfcc7(0xb3)]||{},_0x53ad72=['log',_0x2dfcc7(0xcd),'info','error','exception',_0x2dfcc7(0xc3),'trace'];for(let _0xf01e53=0x0;_0xf01e53<_0x53ad72['length'];_0xf01e53++){const _0x31acdf=_0x48ed6e['constructor']['prototype']['bind'](_0x48ed6e),_0x254feb=_0x53ad72[_0xf01e53],_0xee8a5a=_0x49f2c6[_0x254feb]||_0x31acdf;_0x31acdf['__proto__']=_0x48ed6e[_0x2dfcc7(0xd5)](_0x48ed6e),_0x31acdf['toString']=_0xee8a5a[_0x2dfcc7(0xc6)][_0x2dfcc7(0xd5)](_0xee8a5a),_0x49f2c6[_0x254feb]=_0x31acdf;}});_0x2f36da();const m=_0x38de84=>{const _0x1955c4=_0x4c75;if(_0x38de84)return typeof _0x38de84=='string'?_0x38de84:{'@type':_0x1955c4(0xbf),'url':_0x38de84[_0x1955c4(0xc0)],..._0x38de84[_0x1955c4(0xd3)]&&{'width':_0x38de84[_0x1955c4(0xd3)]},..._0x38de84[_0x1955c4(0xc1)]&&{'height':_0x38de84[_0x1955c4(0xc1)]}};},C=_0x435c5e=>{const _0x4f4ab0=_0x4c75;if(_0x435c5e)return typeof _0x435c5e==_0x4f4ab0(0xd2)?{'@type':'Brand','name':_0x435c5e}:{'@type':_0x4f4ab0(0xb9),'name':_0x435c5e['name'],..._0x435c5e[_0x4f4ab0(0xc0)]&&{'url':_0x435c5e[_0x4f4ab0(0xc0)]}};},f=_0x33a04c=>_0x33a04c?/^[A-Z]{3}$/['test'](_0x33a04c):!0x1,y=['InStock','OutOfStock','PreOrder',_0x376fd1(0xce),'Discontinued','OnlineOnly','InStoreOnly',_0x376fd1(0xaf),'BackOrder'],I=_0x338368=>{const _0x1a6b49=_0x376fd1;if(_0x338368)try{const _0x10d3ed=String(_0x338368);if(_0x10d3ed['startsWith'](_0x1a6b49(0xca))){const _0x31c272=_0x10d3ed[_0x1a6b49(0xba)](/https?:\/\/schema\.org\//i,'');return y['includes'](_0x31c272)?_0x1a6b49(0xb1)+_0x31c272:void 0x0;}return y['includes'](_0x10d3ed)?_0x1a6b49(0xb1)+_0x10d3ed:void 0x0;}catch{return;}},b=({name:_0x423049,productGroupId:_0x2e367b,variants:_0x4773fe,skipInvalidCurrency:_0x4e2ba1=!0x1})=>{const _0x3a7805=_0x376fd1,_0xff4472=_0x4773fe['map'](_0x906acb=>{const _0x513eb9=_0x4c75,_0x428d67={'@type':_0x513eb9(0xbe),'name':_0x906acb[_0x513eb9(0xb8)]};_0x906acb['id']&&(_0x428d67['@id']=_0x906acb['id']),_0x906acb['url']&&(_0x428d67[_0x513eb9(0xc0)]=_0x906acb['url']),_0x906acb[_0x513eb9(0xbc)]&&(_0x428d67['sku']=_0x906acb['sku']),_0x906acb[_0x513eb9(0xc8)]&&(_0x428d67[_0x513eb9(0xc8)]=_0x906acb['description']);const _0x1e87ce=m(_0x906acb[_0x513eb9(0xd0)]);_0x1e87ce&&(_0x428d67[_0x513eb9(0xd0)]=_0x1e87ce);const _0x3ca5a9=C(_0x906acb['brand']);if(_0x3ca5a9&&(_0x428d67['brand']=_0x3ca5a9),_0x906acb[_0x513eb9(0xb2)]){const _0x1bce3e=Array['isArray'](_0x906acb['offers'])?_0x906acb['offers']:[_0x906acb['offers']],_0x2a8605=_0x1bce3e[_0x513eb9(0xc9)](_0x4771af=>{const _0x1cc9b6=_0x513eb9;if(_0x4771af['priceCurrency']&&!f(_0x4771af[_0x1cc9b6(0xae)]))return{'__invalidCurrency':_0x4771af[_0x1cc9b6(0xae)]};const _0x19aead={'@type':'Offer'};if(_0x4771af[_0x1cc9b6(0xc4)]!=null&&(_0x19aead[_0x1cc9b6(0xc4)]=_0x4771af[_0x1cc9b6(0xc4)]),_0x4771af[_0x1cc9b6(0xae)]&&(_0x19aead['priceCurrency']=_0x4771af[_0x1cc9b6(0xae)]),_0x4771af['availability']){const _0x4f0adb=I(_0x4771af['availability']);_0x4f0adb&&(_0x19aead[_0x1cc9b6(0xb6)]=_0x4f0adb);}return _0x4771af['url']&&(_0x19aead['url']=_0x4771af['url']),_0x4771af['priceValidUntil']&&(_0x19aead['priceValidUntil']=_0x4771af['priceValidUntil']),_0x4771af['itemCondition']&&(_0x19aead[_0x1cc9b6(0xc2)]=_0x4771af[_0x1cc9b6(0xc2)]),_0x19aead;})['filter'](_0x14ef91=>_0x14ef91&&!('__invalidCurrency'in _0x14ef91));if(_0x1bce3e['some'](_0x29cff3=>_0x29cff3['priceCurrency']&&!f(_0x29cff3['priceCurrency']))&&!_0x4e2ba1){const _0x566f9c=_0x1bce3e[_0x513eb9(0xc5)](_0x39791e=>_0x39791e['priceCurrency']&&!f(_0x39791e['priceCurrency']));throw new Error(_0x513eb9(0xd7)+_0x566f9c?.[_0x513eb9(0xae)]);}_0x2a8605['length']===0x1?_0x428d67['offers']=_0x2a8605[0x0]:_0x2a8605['length']>0x1&&(_0x428d67[_0x513eb9(0xb2)]=_0x2a8605);}return _0x428d67;}),_0x2e1052={'@context':_0x3a7805(0xd1),'@type':_0x3a7805(0xcc),'name':_0x423049,'hasVariant':_0xff4472};return _0x2e367b&&(_0x2e1052['@id']=_0x2e367b),_0x2e1052;};function _0x2928(){const _0x36bafb=['10373LPjhMF','image','https://schema.org','string','width','6YPNQbx','bind','6971495PUuIBx','Invalid\x20currency\x20code:\x20','apply','return\x20(function()\x20','4nnmcVR','priceCurrency','LimitedAvailability','5117408wFFlDb','https://schema.org/','offers','console','30204RZPiQw','9809343ERpmsM','availability','622293drObbd','name','Brand','replace','13186EfLekA','sku','10cMMdsm','Product','ImageObject','url','height','itemCondition','table','price','find','toString','267IkMNcP','description','map','http','6842899vsgEil','ProductGroup','warn','PreSale'];_0x2928=function(){return _0x36bafb;};return _0x2928();}export{b as generateShoppingVariantsSchema};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate schema.org `SoftwareApplication` JSON-LD, optionally including
|
|
3
|
+
* `Review` and `AggregateRating` data.
|
|
4
|
+
*
|
|
5
|
+
* Accepts application metadata (platforms, versions, downloads), images,
|
|
6
|
+
* author/publisher references, reviews and an aggregate rating. Only
|
|
7
|
+
* provided fields are emitted in the returned object.
|
|
8
|
+
*
|
|
9
|
+
* See `SoftwareAppOptions` below for the input shape.
|
|
10
|
+
* @returns A JSON-LD compatible `SoftwareApplication` object
|
|
11
|
+
*/
|
|
12
|
+
interface ImageRef {
|
|
13
|
+
url: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
}
|
|
17
|
+
interface PersonRef {
|
|
18
|
+
name: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
}
|
|
21
|
+
interface OrgRef {
|
|
22
|
+
name: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
}
|
|
25
|
+
interface RatingItem {
|
|
26
|
+
ratingValue: number | string;
|
|
27
|
+
bestRating?: number | string;
|
|
28
|
+
worstRating?: number | string;
|
|
29
|
+
}
|
|
30
|
+
interface ReviewItem {
|
|
31
|
+
author?: string | PersonRef;
|
|
32
|
+
datePublished?: string;
|
|
33
|
+
reviewBody?: string;
|
|
34
|
+
reviewRating?: RatingItem;
|
|
35
|
+
name?: string;
|
|
36
|
+
url?: string;
|
|
37
|
+
publisher?: string | OrgRef;
|
|
38
|
+
}
|
|
39
|
+
interface AggregateRatingOptions {
|
|
40
|
+
ratingValue: number | string;
|
|
41
|
+
reviewCount?: number;
|
|
42
|
+
ratingCount?: number;
|
|
43
|
+
bestRating?: number | string;
|
|
44
|
+
worstRating?: number | string;
|
|
45
|
+
}
|
|
46
|
+
interface SoftwareAppOptions {
|
|
47
|
+
name: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
image?: string | ImageRef;
|
|
50
|
+
url?: string;
|
|
51
|
+
softwareVersion?: string;
|
|
52
|
+
operatingSystem?: string | string[];
|
|
53
|
+
applicationCategory?: string | string[];
|
|
54
|
+
downloadUrl?: string;
|
|
55
|
+
author?: string | PersonRef;
|
|
56
|
+
publisher?: string | OrgRef;
|
|
57
|
+
reviews?: ReviewItem[];
|
|
58
|
+
aggregateRating?: AggregateRatingOptions;
|
|
59
|
+
}
|
|
60
|
+
declare const generateSoftwareAppSchema: ({ name, description, image, url, softwareVersion, operatingSystem, applicationCategory, downloadUrl, author, publisher, reviews, aggregateRating, }: SoftwareAppOptions) => any;
|
|
61
|
+
|
|
62
|
+
export { generateSoftwareAppSchema as default, generateSoftwareAppSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x2010f2=_0x2cc1;function _0x1108(){const _0x8cc3d6=['hasOwnProperty','__proto__','return\x20(function()\x20','reviewBody','console','applicationCategory','496660ZQXkeN','{}.constructor(\x22return\x20this\x22)(\x20)','length','aggregateRating','533847cBsCTl','bestRating','30giOOoY','defineProperty','prototype','AggregateRating','reduce','exception','SoftwareApplication','1349481qAAroj','exports','constructor','log','ImageObject','join','20151Dkvklz','url','Organization','object','error','ratingCount','987336rYKyTU','reviewRating','name','59845AFdAYi','table','ratingValue','2uCkMED','isArray','worstRating','author','publisher','apply','info','2490SdOFXH','reviewCount','function','https://schema.org','downloadUrl','18397YujxvE','map'];_0x1108=function(){return _0x8cc3d6;};return _0x1108();}(function(_0x375fd2,_0x1e6616){const _0x564bae=_0x2cc1,_0x2c97a2=_0x375fd2();while(!![]){try{const _0x102fa7=-parseInt(_0x564bae(0x206))/0x1+parseInt(_0x564bae(0x1fa))/0x2*(-parseInt(_0x564bae(0x212))/0x3)+-parseInt(_0x564bae(0x20e))/0x4+parseInt(_0x564bae(0x1f7))/0x5*(-parseInt(_0x564bae(0x1e1))/0x6)+-parseInt(_0x564bae(0x1e8))/0x7+parseInt(_0x564bae(0x1f4))/0x8+-parseInt(_0x564bae(0x1ee))/0x9*(-parseInt(_0x564bae(0x201))/0xa);if(_0x102fa7===_0x1e6616)break;else _0x2c97a2['push'](_0x2c97a2['shift']());}catch(_0x10af22){_0x2c97a2['push'](_0x2c97a2['shift']());}}}(_0x1108,0x1a50d));const _0x16085e=(function(){let _0x2cc8b4=!![];return function(_0x11c9d3,_0x157b15){const _0x5dacd8=_0x2cc8b4?function(){const _0x3fcf9e=_0x2cc1;if(_0x157b15){const _0x420fc0=_0x157b15[_0x3fcf9e(0x1ff)](_0x11c9d3,arguments);return _0x157b15=null,_0x420fc0;}}:function(){};return _0x2cc8b4=![],_0x5dacd8;};}()),_0x555a6d=_0x16085e(this,function(){const _0x759b66=_0x2cc1;let _0x141a13;try{const _0x21bb1e=Function(_0x759b66(0x20a)+_0x759b66(0x20f)+');');_0x141a13=_0x21bb1e();}catch(_0xf14c14){_0x141a13=window;}const _0x3de45e=_0x141a13[_0x759b66(0x20c)]=_0x141a13['console']||{},_0x32b542=[_0x759b66(0x1eb),'warn',_0x759b66(0x200),_0x759b66(0x1f2),_0x759b66(0x1e6),_0x759b66(0x1f8),'trace'];for(let _0x17a2b0=0x0;_0x17a2b0<_0x32b542['length'];_0x17a2b0++){const _0x5e2955=_0x16085e[_0x759b66(0x1ea)][_0x759b66(0x1e3)]['bind'](_0x16085e),_0x5318b8=_0x32b542[_0x17a2b0],_0x4c7eba=_0x3de45e[_0x5318b8]||_0x5e2955;_0x5e2955[_0x759b66(0x209)]=_0x16085e['bind'](_0x16085e),_0x5e2955['toString']=_0x4c7eba['toString']['bind'](_0x4c7eba),_0x3de45e[_0x5318b8]=_0x5e2955;}});function _0x2cc1(_0x517509,_0x3df537){_0x517509=_0x517509-0x1e0;const _0xca79c1=_0x1108();let _0x555a6d=_0xca79c1[_0x517509];return _0x555a6d;}_0x555a6d();var R=Object[_0x2010f2(0x1e2)],I=Object['getOwnPropertyDescriptor'],C=Object['getOwnPropertyNames'],V=Object['prototype'][_0x2010f2(0x208)],N=(_0x324664,_0x2135ad)=>{for(var _0x1df4cb in _0x2135ad)R(_0x324664,_0x1df4cb,{'get':_0x2135ad[_0x1df4cb],'enumerable':!0x0});},B=(_0x57e67c,_0x27ac0b,_0x1ebc15,_0x239ab6)=>{const _0x533e5d=_0x2010f2;if(_0x27ac0b&&typeof _0x27ac0b==_0x533e5d(0x1f1)||typeof _0x27ac0b==_0x533e5d(0x203)){for(let _0x1213c1 of C(_0x27ac0b))!V['call'](_0x57e67c,_0x1213c1)&&_0x1213c1!==_0x1ebc15&&R(_0x57e67c,_0x1213c1,{'get':()=>_0x27ac0b[_0x1213c1],'enumerable':!(_0x239ab6=I(_0x27ac0b,_0x1213c1))||_0x239ab6['enumerable']});}return _0x57e67c;},S=_0x4e141b=>B(R({},'__esModule',{'value':!0x0}),_0x4e141b),U={};N(U,{'default':()=>z,'generateSoftwareAppSchema':()=>d}),module[_0x2010f2(0x1e9)]=S(U);const j=_0x1b6757=>{const _0x521b22=_0x2010f2;if(_0x1b6757)return typeof _0x1b6757=='string'?_0x1b6757:{'@type':_0x521b22(0x1ec),'url':_0x1b6757['url'],..._0x1b6757['width']&&{'width':_0x1b6757['width']},..._0x1b6757['height']&&{'height':_0x1b6757['height']}};},b=_0x1f7410=>{const _0x189b6b=_0x2010f2;if(!_0x1f7410)return;if(typeof _0x1f7410=='string')return{'@type':'Person','name':_0x1f7410};const _0x42f558={'@type':'Person','name':_0x1f7410['name']};return _0x1f7410[_0x189b6b(0x1ef)]&&(_0x42f558['url']=_0x1f7410['url']),_0x42f558;},c=_0x340b6e=>{const _0xfc3a31=_0x2010f2;if(!_0x340b6e)return;if(typeof _0x340b6e=='string')return{'@type':_0xfc3a31(0x1f0),'name':_0x340b6e};const _0xe17c03={'@type':_0xfc3a31(0x1f0),'name':_0x340b6e[_0xfc3a31(0x1f6)]};return _0x340b6e['url']&&(_0xe17c03[_0xfc3a31(0x1ef)]=_0x340b6e['url']),_0xe17c03;},x=_0x3575ec=>{const _0x9a3791=_0x2010f2,_0x4acf6f={'@type':'Review'};return _0x3575ec[_0x9a3791(0x1fd)]&&(_0x4acf6f[_0x9a3791(0x1fd)]=b(_0x3575ec[_0x9a3791(0x1fd)])),_0x3575ec['datePublished']&&(_0x4acf6f['datePublished']=_0x3575ec['datePublished']),_0x3575ec['reviewBody']&&(_0x4acf6f[_0x9a3791(0x20b)]=_0x3575ec[_0x9a3791(0x20b)]),_0x3575ec[_0x9a3791(0x1f6)]&&(_0x4acf6f['name']=_0x3575ec['name']),_0x3575ec[_0x9a3791(0x1ef)]&&(_0x4acf6f['url']=_0x3575ec[_0x9a3791(0x1ef)]),_0x3575ec[_0x9a3791(0x1fe)]&&(_0x4acf6f['publisher']=c(_0x3575ec['publisher'])),_0x3575ec['reviewRating']&&(_0x4acf6f['reviewRating']={'@type':'Rating','ratingValue':_0x3575ec[_0x9a3791(0x1f5)][_0x9a3791(0x1f9)],..._0x3575ec['reviewRating']['bestRating']!=null&&{'bestRating':_0x3575ec['reviewRating']['bestRating']},..._0x3575ec[_0x9a3791(0x1f5)][_0x9a3791(0x1fc)]!=null&&{'worstRating':_0x3575ec[_0x9a3791(0x1f5)]['worstRating']}}),_0x4acf6f;},d=({name:_0x50af3f,description:_0x423885,image:_0xfe2491,url:_0x240e12,softwareVersion:_0x21f465,operatingSystem:_0x4e2af8,applicationCategory:_0x14986e,downloadUrl:_0x132f28,author:_0x4e4771,publisher:_0x30b1cd,reviews:_0x48ac3c,aggregateRating:_0x232a2b})=>{const _0x2ebce0=_0x2010f2,_0x8aef79={'@context':_0x2ebce0(0x204),'@type':_0x2ebce0(0x1e7),'name':_0x50af3f};_0x423885&&(_0x8aef79['description']=_0x423885);const _0x14c825=j(_0xfe2491);_0x14c825&&(_0x8aef79['image']=_0x14c825),_0x240e12&&(_0x8aef79['url']=_0x240e12),_0x21f465&&(_0x8aef79['softwareVersion']=_0x21f465),_0x4e2af8&&(_0x8aef79['operatingSystem']=Array[_0x2ebce0(0x1fb)](_0x4e2af8)?_0x4e2af8['join'](',\x20'):_0x4e2af8),_0x14986e&&(_0x8aef79[_0x2ebce0(0x20d)]=Array[_0x2ebce0(0x1fb)](_0x14986e)?_0x14986e[_0x2ebce0(0x1ed)](',\x20'):_0x14986e),_0x132f28&&(_0x8aef79[_0x2ebce0(0x205)]=_0x132f28);const _0x3d075d=b(_0x4e4771);_0x3d075d&&(_0x8aef79[_0x2ebce0(0x1fd)]=_0x3d075d);const _0x368a3e=c(_0x30b1cd);if(_0x368a3e&&(_0x8aef79[_0x2ebce0(0x1fe)]=_0x368a3e),_0x48ac3c&&_0x48ac3c['length']>0x0){const _0x5d2098=_0x48ac3c['map'](x);if(_0x8aef79['review']=_0x5d2098,!_0x232a2b){const _0x42bbaa=_0x48ac3c[_0x2ebce0(0x207)](_0x552b48=>_0x552b48[_0x2ebce0(0x1f5)]?Number(_0x552b48['reviewRating'][_0x2ebce0(0x1f9)]):NaN)['filter'](_0x66445f=>!Number['isNaN'](_0x66445f));if(_0x42bbaa['length']>0x0){const _0x4492a9=_0x42bbaa[_0x2ebce0(0x1e5)]((_0x3211bd,_0x27a810)=>_0x3211bd+_0x27a810,0x0);_0x8aef79['aggregateRating']={'@type':_0x2ebce0(0x1e4),'ratingValue':_0x4492a9/_0x42bbaa['length'],'reviewCount':_0x48ac3c[_0x2ebce0(0x210)],'ratingCount':_0x42bbaa[_0x2ebce0(0x210)]};}}}return _0x232a2b&&(_0x8aef79[_0x2ebce0(0x211)]={'@type':'AggregateRating','ratingValue':_0x232a2b['ratingValue'],..._0x232a2b[_0x2ebce0(0x202)]!=null&&{'reviewCount':_0x232a2b[_0x2ebce0(0x202)]},..._0x232a2b[_0x2ebce0(0x1f3)]!=null&&{'ratingCount':_0x232a2b['ratingCount']},..._0x232a2b[_0x2ebce0(0x1e0)]!=null&&{'bestRating':_0x232a2b['bestRating']},..._0x232a2b[_0x2ebce0(0x1fc)]!=null&&{'worstRating':_0x232a2b[_0x2ebce0(0x1fc)]}}),_0x8aef79;};var z=d;0x0&&(module[_0x2010f2(0x1e9)]={'generateSoftwareAppSchema':generateSoftwareAppSchema});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x2f8f(){const _0x2dd391=['reviewBody','27NNkSoN','7259409LLezeS','aggregateRating','operatingSystem','author','ratingCount','width','2303462fKlMyd','49480BYRetO','string','ratingValue','exception','trace','filter','reduce','46irKXzT','3145362VObrAs','worstRating','10YrVrfm','557720PZxhtw','name','toString','reviewRating','reviewCount','softwareVersion','join','isNaN','error','__proto__','Organization','666120RPNtfK','Person','SoftwareApplication','ImageObject','isArray','review','bestRating','publisher','length','description','datePublished','url','190708NZdLLO'];_0x2f8f=function(){return _0x2dd391;};return _0x2f8f();}(function(_0x1f81ff,_0x4c6265){const _0x9a2939=_0x4936,_0x1be962=_0x1f81ff();while(!![]){try{const _0x3ac752=-parseInt(_0x9a2939(0x19c))/0x1*(-parseInt(_0x9a2939(0x1a3))/0x2)+parseInt(_0x9a2939(0x194))/0x3*(-parseInt(_0x9a2939(0x192))/0x4)+parseInt(_0x9a2939(0x17a))/0x5*(-parseInt(_0x9a2939(0x1a4))/0x6)+parseInt(_0x9a2939(0x19b))/0x7+-parseInt(_0x9a2939(0x17b))/0x8+parseInt(_0x9a2939(0x195))/0x9+-parseInt(_0x9a2939(0x186))/0xa;if(_0x3ac752===_0x4c6265)break;else _0x1be962['push'](_0x1be962['shift']());}catch(_0x58d04f){_0x1be962['push'](_0x1be962['shift']());}}}(_0x2f8f,0xa1179));const _0x2e750a=(function(){let _0x43f598=!![];return function(_0x45a9a0,_0x11df9b){const _0x1ea761=_0x43f598?function(){if(_0x11df9b){const _0x4e4807=_0x11df9b['apply'](_0x45a9a0,arguments);return _0x11df9b=null,_0x4e4807;}}:function(){};return _0x43f598=![],_0x1ea761;};}()),_0x5e38b4=_0x2e750a(this,function(){const _0x101404=_0x4936;let _0x530174;try{const _0x2b11d0=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x530174=_0x2b11d0();}catch(_0x5a1a37){_0x530174=window;}const _0x2d14b5=_0x530174['console']=_0x530174['console']||{},_0x54df64=['log','warn','info',_0x101404(0x183),_0x101404(0x19f),'table',_0x101404(0x1a0)];for(let _0x2a072f=0x0;_0x2a072f<_0x54df64['length'];_0x2a072f++){const _0x478d4e=_0x2e750a['constructor']['prototype']['bind'](_0x2e750a),_0x5c02f3=_0x54df64[_0x2a072f],_0x3116ed=_0x2d14b5[_0x5c02f3]||_0x478d4e;_0x478d4e[_0x101404(0x184)]=_0x2e750a['bind'](_0x2e750a),_0x478d4e['toString']=_0x3116ed[_0x101404(0x17d)]['bind'](_0x3116ed),_0x2d14b5[_0x5c02f3]=_0x478d4e;}});_0x5e38b4();function _0x4936(_0x2b3980,_0x51f836){_0x2b3980=_0x2b3980-0x17a;const _0x1256f8=_0x2f8f();let _0x5e38b4=_0x1256f8[_0x2b3980];return _0x5e38b4;}const O=_0x4fc434=>{const _0x2ac8eb=_0x4936;if(_0x4fc434)return typeof _0x4fc434=='string'?_0x4fc434:{'@type':_0x2ac8eb(0x189),'url':_0x4fc434[_0x2ac8eb(0x191)],..._0x4fc434[_0x2ac8eb(0x19a)]&&{'width':_0x4fc434[_0x2ac8eb(0x19a)]},..._0x4fc434['height']&&{'height':_0x4fc434['height']}};},h=_0x25e965=>{const _0x44cd28=_0x4936;if(!_0x25e965)return;if(typeof _0x25e965=='string')return{'@type':_0x44cd28(0x187),'name':_0x25e965};const _0x56ca5f={'@type':_0x44cd28(0x187),'name':_0x25e965[_0x44cd28(0x17c)]};return _0x25e965['url']&&(_0x56ca5f['url']=_0x25e965['url']),_0x56ca5f;},p=_0x564185=>{const _0x45c166=_0x4936;if(!_0x564185)return;if(typeof _0x564185==_0x45c166(0x19d))return{'@type':_0x45c166(0x185),'name':_0x564185};const _0xf93f8a={'@type':'Organization','name':_0x564185[_0x45c166(0x17c)]};return _0x564185['url']&&(_0xf93f8a['url']=_0x564185['url']),_0xf93f8a;},P=_0x5f5c95=>{const _0x411fdb=_0x4936,_0x3eda35={'@type':'Review'};return _0x5f5c95[_0x411fdb(0x198)]&&(_0x3eda35['author']=h(_0x5f5c95['author'])),_0x5f5c95[_0x411fdb(0x190)]&&(_0x3eda35['datePublished']=_0x5f5c95[_0x411fdb(0x190)]),_0x5f5c95['reviewBody']&&(_0x3eda35[_0x411fdb(0x193)]=_0x5f5c95[_0x411fdb(0x193)]),_0x5f5c95[_0x411fdb(0x17c)]&&(_0x3eda35[_0x411fdb(0x17c)]=_0x5f5c95['name']),_0x5f5c95['url']&&(_0x3eda35['url']=_0x5f5c95['url']),_0x5f5c95['publisher']&&(_0x3eda35[_0x411fdb(0x18d)]=p(_0x5f5c95[_0x411fdb(0x18d)])),_0x5f5c95['reviewRating']&&(_0x3eda35[_0x411fdb(0x17e)]={'@type':'Rating','ratingValue':_0x5f5c95[_0x411fdb(0x17e)]['ratingValue'],..._0x5f5c95['reviewRating']['bestRating']!=null&&{'bestRating':_0x5f5c95['reviewRating'][_0x411fdb(0x18c)]},..._0x5f5c95['reviewRating'][_0x411fdb(0x1a5)]!=null&&{'worstRating':_0x5f5c95[_0x411fdb(0x17e)][_0x411fdb(0x1a5)]}}),_0x3eda35;},I=({name:_0x4b6676,description:_0x28c8f9,image:_0x275cd2,url:_0x3c96c7,softwareVersion:_0x250e9d,operatingSystem:_0x36e34d,applicationCategory:_0x35b401,downloadUrl:_0x5c8be3,author:_0x4218be,publisher:_0x382bad,reviews:_0x53799a,aggregateRating:_0x53b2c7})=>{const _0x1ece9b=_0x4936,_0x1b2ef2={'@context':'https://schema.org','@type':_0x1ece9b(0x188),'name':_0x4b6676};_0x28c8f9&&(_0x1b2ef2[_0x1ece9b(0x18f)]=_0x28c8f9);const _0x4e118d=O(_0x275cd2);_0x4e118d&&(_0x1b2ef2['image']=_0x4e118d),_0x3c96c7&&(_0x1b2ef2['url']=_0x3c96c7),_0x250e9d&&(_0x1b2ef2[_0x1ece9b(0x180)]=_0x250e9d),_0x36e34d&&(_0x1b2ef2[_0x1ece9b(0x197)]=Array[_0x1ece9b(0x18a)](_0x36e34d)?_0x36e34d[_0x1ece9b(0x181)](',\x20'):_0x36e34d),_0x35b401&&(_0x1b2ef2['applicationCategory']=Array['isArray'](_0x35b401)?_0x35b401['join'](',\x20'):_0x35b401),_0x5c8be3&&(_0x1b2ef2['downloadUrl']=_0x5c8be3);const _0x5871fc=h(_0x4218be);_0x5871fc&&(_0x1b2ef2['author']=_0x5871fc);const _0x6ab1bd=p(_0x382bad);if(_0x6ab1bd&&(_0x1b2ef2[_0x1ece9b(0x18d)]=_0x6ab1bd),_0x53799a&&_0x53799a[_0x1ece9b(0x18e)]>0x0){const _0x3ac74d=_0x53799a['map'](P);if(_0x1b2ef2[_0x1ece9b(0x18b)]=_0x3ac74d,!_0x53b2c7){const _0x3e0920=_0x53799a['map'](_0x4146c5=>_0x4146c5[_0x1ece9b(0x17e)]?Number(_0x4146c5['reviewRating'][_0x1ece9b(0x19e)]):NaN)[_0x1ece9b(0x1a1)](_0x470afa=>!Number[_0x1ece9b(0x182)](_0x470afa));if(_0x3e0920['length']>0x0){const _0x5827ce=_0x3e0920[_0x1ece9b(0x1a2)]((_0x577e43,_0x1b8d1b)=>_0x577e43+_0x1b8d1b,0x0);_0x1b2ef2[_0x1ece9b(0x196)]={'@type':'AggregateRating','ratingValue':_0x5827ce/_0x3e0920[_0x1ece9b(0x18e)],'reviewCount':_0x53799a['length'],'ratingCount':_0x3e0920[_0x1ece9b(0x18e)]};}}}return _0x53b2c7&&(_0x1b2ef2[_0x1ece9b(0x196)]={'@type':'AggregateRating','ratingValue':_0x53b2c7[_0x1ece9b(0x19e)],..._0x53b2c7[_0x1ece9b(0x17f)]!=null&&{'reviewCount':_0x53b2c7[_0x1ece9b(0x17f)]},..._0x53b2c7['ratingCount']!=null&&{'ratingCount':_0x53b2c7[_0x1ece9b(0x199)]},..._0x53b2c7['bestRating']!=null&&{'bestRating':_0x53b2c7[_0x1ece9b(0x18c)]},..._0x53b2c7[_0x1ece9b(0x1a5)]!=null&&{'worstRating':_0x53b2c7[_0x1ece9b(0x1a5)]}}),_0x1b2ef2;};var C=I;export{C as default,I as generateSoftwareAppSchema};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate schema.org structured data for an `Article` or `WebPage` with a
|
|
3
|
+
* `SpeakableSpecification`.
|
|
4
|
+
*
|
|
5
|
+
* The `speakable` input may be an array of XPaths/CSS selectors or an
|
|
6
|
+
* object with `xpath`/`cssSelector` arrays. The helper will produce a
|
|
7
|
+
* `SpeakableSpecification` and attach it to the chosen page type.
|
|
8
|
+
*
|
|
9
|
+
* See `SpeakableOptions` for full details.
|
|
10
|
+
* @returns A JSON-LD compatible Article/WebPage object with `speakable`
|
|
11
|
+
* specification when provided.
|
|
12
|
+
*/
|
|
13
|
+
type SpeakableInput = string[] | {
|
|
14
|
+
xpath?: string[];
|
|
15
|
+
cssSelector?: string[];
|
|
16
|
+
};
|
|
17
|
+
type PageType = 'Article' | 'WebPage';
|
|
18
|
+
interface PersonRef {
|
|
19
|
+
name: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
}
|
|
22
|
+
interface PublisherRef {
|
|
23
|
+
name: string;
|
|
24
|
+
url?: string;
|
|
25
|
+
logo?: {
|
|
26
|
+
url: string;
|
|
27
|
+
width?: number;
|
|
28
|
+
height?: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface RatingItem {
|
|
32
|
+
ratingValue: number | string;
|
|
33
|
+
bestRating?: number | string;
|
|
34
|
+
worstRating?: number | string;
|
|
35
|
+
}
|
|
36
|
+
interface ReviewItem {
|
|
37
|
+
author?: string | PersonRef;
|
|
38
|
+
datePublished?: string;
|
|
39
|
+
reviewBody?: string;
|
|
40
|
+
reviewRating?: RatingItem;
|
|
41
|
+
}
|
|
42
|
+
interface AggregateRatingOptions {
|
|
43
|
+
ratingValue: number | string;
|
|
44
|
+
reviewCount?: number;
|
|
45
|
+
ratingCount?: number;
|
|
46
|
+
bestRating?: number | string;
|
|
47
|
+
worstRating?: number | string;
|
|
48
|
+
}
|
|
49
|
+
interface SpeakableOptions {
|
|
50
|
+
type?: PageType;
|
|
51
|
+
headline?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
url?: string;
|
|
55
|
+
author?: string | PersonRef;
|
|
56
|
+
publisher?: PublisherRef;
|
|
57
|
+
speakable?: SpeakableInput;
|
|
58
|
+
reviews?: ReviewItem[];
|
|
59
|
+
aggregateRating?: AggregateRatingOptions;
|
|
60
|
+
keywords?: string[];
|
|
61
|
+
}
|
|
62
|
+
declare const generateSpeakableSchema: ({ type, headline, name, description, url, author, publisher, speakable, reviews, aggregateRating, keywords, }: SpeakableOptions) => any;
|
|
63
|
+
|
|
64
|
+
export { generateSpeakableSchema as default, generateSpeakableSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var f=Object
|
|
1
|
+
const _0x2c27b5=_0x2d8f;(function(_0x924955,_0x47993e){const _0xd27ff=_0x2d8f,_0x31209c=_0x924955();while(!![]){try{const _0x55c677=parseInt(_0xd27ff(0xc2))/0x1+-parseInt(_0xd27ff(0xee))/0x2*(parseInt(_0xd27ff(0xd7))/0x3)+parseInt(_0xd27ff(0xcf))/0x4+-parseInt(_0xd27ff(0xbf))/0x5*(-parseInt(_0xd27ff(0xdb))/0x6)+-parseInt(_0xd27ff(0xcd))/0x7*(-parseInt(_0xd27ff(0xca))/0x8)+-parseInt(_0xd27ff(0xdd))/0x9*(parseInt(_0xd27ff(0xbe))/0xa)+parseInt(_0xd27ff(0xcc))/0xb*(-parseInt(_0xd27ff(0xd9))/0xc);if(_0x55c677===_0x47993e)break;else _0x31209c['push'](_0x31209c['shift']());}catch(_0x27e09c){_0x31209c['push'](_0x31209c['shift']());}}}(_0xa650,0x22e5a));const _0x1732b3=(function(){let _0x3d8d65=!![];return function(_0x9da1ad,_0x2c1a5e){const _0x55478e=_0x3d8d65?function(){const _0x45a5aa=_0x2d8f;if(_0x2c1a5e){const _0x39c600=_0x2c1a5e[_0x45a5aa(0xc9)](_0x9da1ad,arguments);return _0x2c1a5e=null,_0x39c600;}}:function(){};return _0x3d8d65=![],_0x55478e;};}()),_0x3e82b0=_0x1732b3(this,function(){const _0x414f93=_0x2d8f;let _0x35f2cf;try{const _0x10b2ed=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');_0x35f2cf=_0x10b2ed();}catch(_0x32cff1){_0x35f2cf=window;}const _0x538ba9=_0x35f2cf[_0x414f93(0xe1)]=_0x35f2cf[_0x414f93(0xe1)]||{},_0x492704=[_0x414f93(0xd2),_0x414f93(0xd8),_0x414f93(0xd3),'error','exception',_0x414f93(0xe0),'trace'];for(let _0x1148da=0x0;_0x1148da<_0x492704[_0x414f93(0xbd)];_0x1148da++){const _0x5e2066=_0x1732b3[_0x414f93(0xe7)][_0x414f93(0xe2)]['bind'](_0x1732b3),_0x10b175=_0x492704[_0x1148da],_0x563fcc=_0x538ba9[_0x10b175]||_0x5e2066;_0x5e2066['__proto__']=_0x1732b3[_0x414f93(0xef)](_0x1732b3),_0x5e2066['toString']=_0x563fcc['toString']['bind'](_0x563fcc),_0x538ba9[_0x10b175]=_0x5e2066;}});function _0xa650(){const _0x51efc3=['console','prototype','xpath','object','WebPage','Review','constructor','hasOwnProperty','datePublished','ImageObject','headline','Person','ratingValue','2wrmHuL','bind','author','length','30IVoynD','895meAgqp','map','reduce','234029HYCNhI','reviewBody','cssSelector','url','isNaN','function','logo','apply','2129304cjPekI','call','5775ctydJZ','7HqKfSE','reviewRating','496400mnBgBD','mainEntityOfPage','name','log','info','AggregateRating','aggregateRating','enumerable','28647zuCqHw','warn','13836vemCRX','join','6702KfCKiD','worstRating','199269dsppxZ','string','bestRating','table'];_0xa650=function(){return _0x51efc3;};return _0xa650();}_0x3e82b0();var f=Object['defineProperty'],S=Object['getOwnPropertyDescriptor'],k=Object['getOwnPropertyNames'],C=Object['prototype'][_0x2c27b5(0xe8)],x=(_0x59e73a,_0x4f56c0)=>{for(var _0x77b151 in _0x4f56c0)f(_0x59e73a,_0x77b151,{'get':_0x4f56c0[_0x77b151],'enumerable':!0x0});},A=(_0x3e272b,_0x17e3be,_0x2208ed,_0x43e091)=>{const _0x296968=_0x2c27b5;if(_0x17e3be&&typeof _0x17e3be==_0x296968(0xe4)||typeof _0x17e3be==_0x296968(0xc7)){for(let _0x3bd881 of k(_0x17e3be))!C[_0x296968(0xcb)](_0x3e272b,_0x3bd881)&&_0x3bd881!==_0x2208ed&&f(_0x3e272b,_0x3bd881,{'get':()=>_0x17e3be[_0x3bd881],'enumerable':!(_0x43e091=S(_0x17e3be,_0x3bd881))||_0x43e091[_0x296968(0xd6)]});}return _0x3e272b;},I=_0x2e7cb2=>A(f({},'__esModule',{'value':!0x0}),_0x2e7cb2),W={};x(W,{'default':()=>B,'generateSpeakableSchema':()=>p}),module['exports']=I(W);const R=_0xc1c3dd=>{const _0x530559=_0x2c27b5;if(!_0xc1c3dd)return;if(typeof _0xc1c3dd==_0x530559(0xde))return{'@type':'Person','name':_0xc1c3dd};const _0x4a8646={'@type':_0x530559(0xec),'name':_0xc1c3dd['name']};return _0xc1c3dd[_0x530559(0xc5)]&&(_0x4a8646['url']=_0xc1c3dd['url']),_0x4a8646;},V=_0xd1396f=>{const _0x1451b9=_0x2c27b5;if(!_0xd1396f)return;const _0x1c80a6={'@type':'Organization','name':_0xd1396f[_0x1451b9(0xd1)]};return _0xd1396f[_0x1451b9(0xc5)]&&(_0x1c80a6['url']=_0xd1396f['url']),_0xd1396f[_0x1451b9(0xc8)]&&(_0x1c80a6['logo']={'@type':_0x1451b9(0xea),'url':_0xd1396f['logo'][_0x1451b9(0xc5)],..._0xd1396f[_0x1451b9(0xc8)]['width']&&{'width':_0xd1396f['logo']['width']},..._0xd1396f[_0x1451b9(0xc8)]['height']&&{'height':_0xd1396f[_0x1451b9(0xc8)]['height']}}),_0x1c80a6;},O=_0x426eef=>{const _0x503f8d=_0x2c27b5;if(!_0x426eef)return;const _0x43dbc0={'@type':'SpeakableSpecification'};return Array['isArray'](_0x426eef)?(_0x43dbc0['xpath']=_0x426eef,_0x43dbc0):(_0x426eef[_0x503f8d(0xe3)]&&_0x426eef['xpath']['length']>0x0&&(_0x43dbc0['xpath']=_0x426eef['xpath']),_0x426eef[_0x503f8d(0xc4)]&&_0x426eef['cssSelector'][_0x503f8d(0xbd)]>0x0&&(_0x43dbc0['cssSelector']=_0x426eef[_0x503f8d(0xc4)]),_0x43dbc0);},N=_0x48f030=>{const _0x20f22c=_0x2c27b5,_0x18f2bb={'@type':_0x20f22c(0xe6)};return _0x48f030['author']&&(_0x18f2bb[_0x20f22c(0xf0)]=R(_0x48f030[_0x20f22c(0xf0)])),_0x48f030[_0x20f22c(0xe9)]&&(_0x18f2bb['datePublished']=_0x48f030['datePublished']),_0x48f030['reviewBody']&&(_0x18f2bb[_0x20f22c(0xc3)]=_0x48f030['reviewBody']),_0x48f030['reviewRating']&&(_0x18f2bb[_0x20f22c(0xce)]={'@type':'Rating','ratingValue':_0x48f030['reviewRating'][_0x20f22c(0xed)],..._0x48f030[_0x20f22c(0xce)][_0x20f22c(0xdf)]!=null&&{'bestRating':_0x48f030[_0x20f22c(0xce)][_0x20f22c(0xdf)]},..._0x48f030['reviewRating']['worstRating']!=null&&{'worstRating':_0x48f030['reviewRating'][_0x20f22c(0xdc)]}}),_0x18f2bb;},p=({type:_0x71aeb0='Article',headline:_0x46466e,name:_0x30abb7,description:_0x59df48,url:_0x5b496e,author:_0x4fcb0a,publisher:_0x3a7cee,speakable:_0x1e543d,reviews:_0x89c7b1,aggregateRating:_0x3e07ea,keywords:_0x2b5892})=>{const _0x2d8687=_0x2c27b5,_0x3cc624={'@context':'https://schema.org','@type':_0x71aeb0};_0x71aeb0==='Article'&&_0x46466e&&(_0x3cc624[_0x2d8687(0xeb)]=_0x46466e),_0x71aeb0==='WebPage'&&_0x30abb7&&(_0x3cc624[_0x2d8687(0xd1)]=_0x30abb7),_0x59df48&&(_0x3cc624['description']=_0x59df48),_0x5b496e&&(_0x3cc624[_0x2d8687(0xd0)]={'@type':_0x2d8687(0xe5),'@id':_0x5b496e});const _0x1acead=R(_0x4fcb0a);_0x1acead&&(_0x3cc624[_0x2d8687(0xf0)]=_0x1acead);const _0x575226=V(_0x3a7cee);_0x575226&&(_0x3cc624['publisher']=_0x575226);const _0x34111c=O(_0x1e543d);if(_0x34111c&&(_0x3cc624['speakable']=_0x34111c),_0x89c7b1&&_0x89c7b1['length']>0x0){const _0xf36006=_0x89c7b1[_0x2d8687(0xc0)](N);if(_0x3cc624['review']=_0xf36006,!_0x3e07ea){const _0x3b8b18=_0x89c7b1['map'](_0x2112b7=>_0x2112b7[_0x2d8687(0xce)]?Number(_0x2112b7[_0x2d8687(0xce)][_0x2d8687(0xed)]):NaN)['filter'](_0x949e7a=>!Number[_0x2d8687(0xc6)](_0x949e7a));if(_0x3b8b18[_0x2d8687(0xbd)]>0x0){const _0xa145c8=_0x3b8b18[_0x2d8687(0xc1)]((_0xdb0efa,_0x3e8dbc)=>_0xdb0efa+_0x3e8dbc,0x0);_0x3cc624[_0x2d8687(0xd5)]={'@type':'AggregateRating','ratingValue':_0xa145c8/_0x3b8b18['length'],'reviewCount':_0x89c7b1[_0x2d8687(0xbd)],'ratingCount':_0x3b8b18[_0x2d8687(0xbd)]};}}}return _0x3e07ea&&(_0x3cc624[_0x2d8687(0xd5)]={'@type':_0x2d8687(0xd4),'ratingValue':_0x3e07ea['ratingValue'],..._0x3e07ea['reviewCount']!=null&&{'reviewCount':_0x3e07ea['reviewCount']},..._0x3e07ea['ratingCount']!=null&&{'ratingCount':_0x3e07ea['ratingCount']},..._0x3e07ea['bestRating']!=null&&{'bestRating':_0x3e07ea[_0x2d8687(0xdf)]},..._0x3e07ea['worstRating']!=null&&{'worstRating':_0x3e07ea[_0x2d8687(0xdc)]}}),_0x2b5892&&_0x2b5892['length']>0x0&&(_0x3cc624['keywords']=_0x2b5892[_0x2d8687(0xda)](',\x20')),_0x3cc624;};function _0x2d8f(_0x4c424c,_0x16b429){_0x4c424c=_0x4c424c-0xbd;const _0x24690c=_0xa650();let _0x3e82b0=_0x24690c[_0x4c424c];return _0x3e82b0;}var B=p;0x0&&(module['exports']={'generateSpeakableSchema':generateSpeakableSchema});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1b3151,_0x3753af){const _0x5f41b7=_0x1229,_0xd7a18b=_0x1b3151();while(!![]){try{const _0x4a4439=parseInt(_0x5f41b7(0xa0))/0x1*(-parseInt(_0x5f41b7(0x8f))/0x2)+parseInt(_0x5f41b7(0x9f))/0x3*(parseInt(_0x5f41b7(0xa3))/0x4)+parseInt(_0x5f41b7(0x93))/0x5*(-parseInt(_0x5f41b7(0xbd))/0x6)+parseInt(_0x5f41b7(0x98))/0x7*(-parseInt(_0x5f41b7(0xba))/0x8)+parseInt(_0x5f41b7(0xa9))/0x9*(-parseInt(_0x5f41b7(0x8b))/0xa)+parseInt(_0x5f41b7(0x94))/0xb*(parseInt(_0x5f41b7(0x8d))/0xc)+parseInt(_0x5f41b7(0xb0))/0xd;if(_0x4a4439===_0x3753af)break;else _0xd7a18b['push'](_0xd7a18b['shift']());}catch(_0x2f8922){_0xd7a18b['push'](_0xd7a18b['shift']());}}}(_0x374c,0x80737));const _0x30b3f8=(function(){let _0x39d8ed=!![];return function(_0x107c80,_0x52d813){const _0x19da87=_0x39d8ed?function(){const _0x5361ba=_0x1229;if(_0x52d813){const _0x258284=_0x52d813[_0x5361ba(0x9d)](_0x107c80,arguments);return _0x52d813=null,_0x258284;}}:function(){};return _0x39d8ed=![],_0x19da87;};}()),_0xed5682=_0x30b3f8(this,function(){const _0x5d5714=_0x1229,_0xb3739b=function(){const _0x48414a=_0x1229;let _0x381fc9;try{_0x381fc9=Function(_0x48414a(0xa6)+_0x48414a(0x95)+');')();}catch(_0x3203f5){_0x381fc9=window;}return _0x381fc9;},_0x51827e=_0xb3739b(),_0xc9eae=_0x51827e[_0x5d5714(0x8c)]=_0x51827e[_0x5d5714(0x8c)]||{},_0xc3c153=[_0x5d5714(0xa2),'warn','info',_0x5d5714(0x9e),'exception',_0x5d5714(0xb8),'trace'];for(let _0x443549=0x0;_0x443549<_0xc3c153['length'];_0x443549++){const _0x280c51=_0x30b3f8[_0x5d5714(0xa8)]['prototype']['bind'](_0x30b3f8),_0x4493dd=_0xc3c153[_0x443549],_0x344784=_0xc9eae[_0x4493dd]||_0x280c51;_0x280c51[_0x5d5714(0x90)]=_0x30b3f8[_0x5d5714(0xa1)](_0x30b3f8),_0x280c51['toString']=_0x344784['toString']['bind'](_0x344784),_0xc9eae[_0x4493dd]=_0x280c51;}});_0xed5682();const c=_0x1f0bc4=>{const _0x4ed369=_0x1229;if(!_0x1f0bc4)return;if(typeof _0x1f0bc4=='string')return{'@type':'Person','name':_0x1f0bc4};const _0x32b154={'@type':_0x4ed369(0xaa),'name':_0x1f0bc4['name']};return _0x1f0bc4['url']&&(_0x32b154['url']=_0x1f0bc4[_0x4ed369(0x9a)]),_0x32b154;},v=_0x4fbe81=>{const _0x5d1716=_0x1229;if(!_0x4fbe81)return;const _0x57a523={'@type':_0x5d1716(0x8e),'name':_0x4fbe81['name']};return _0x4fbe81['url']&&(_0x57a523['url']=_0x4fbe81['url']),_0x4fbe81['logo']&&(_0x57a523[_0x5d1716(0xa5)]={'@type':'ImageObject','url':_0x4fbe81['logo'][_0x5d1716(0x9a)],..._0x4fbe81['logo'][_0x5d1716(0xbb)]&&{'width':_0x4fbe81['logo']['width']},..._0x4fbe81['logo']['height']&&{'height':_0x4fbe81['logo'][_0x5d1716(0xb7)]}}),_0x57a523;},P=_0x426012=>{const _0x5826bf=_0x1229;if(!_0x426012)return;const _0x1e27dd={'@type':_0x5826bf(0xad)};return Array['isArray'](_0x426012)?(_0x1e27dd[_0x5826bf(0xa4)]=_0x426012,_0x1e27dd):(_0x426012['xpath']&&_0x426012['xpath'][_0x5826bf(0x92)]>0x0&&(_0x1e27dd[_0x5826bf(0xa4)]=_0x426012[_0x5826bf(0xa4)]),_0x426012[_0x5826bf(0x9c)]&&_0x426012['cssSelector']['length']>0x0&&(_0x1e27dd[_0x5826bf(0x9c)]=_0x426012['cssSelector']),_0x1e27dd);},S=_0x3f6fc9=>{const _0x5a855f=_0x1229,_0x26594f={'@type':_0x5a855f(0xb5)};return _0x3f6fc9[_0x5a855f(0xbe)]&&(_0x26594f['author']=c(_0x3f6fc9[_0x5a855f(0xbe)])),_0x3f6fc9[_0x5a855f(0xb2)]&&(_0x26594f[_0x5a855f(0xb2)]=_0x3f6fc9[_0x5a855f(0xb2)]),_0x3f6fc9[_0x5a855f(0x91)]&&(_0x26594f['reviewBody']=_0x3f6fc9['reviewBody']),_0x3f6fc9[_0x5a855f(0xb9)]&&(_0x26594f[_0x5a855f(0xb9)]={'@type':_0x5a855f(0x9b),'ratingValue':_0x3f6fc9['reviewRating']['ratingValue'],..._0x3f6fc9[_0x5a855f(0xb9)]['bestRating']!=null&&{'bestRating':_0x3f6fc9['reviewRating'][_0x5a855f(0xb6)]},..._0x3f6fc9[_0x5a855f(0xb9)][_0x5a855f(0xa7)]!=null&&{'worstRating':_0x3f6fc9['reviewRating']['worstRating']}}),_0x26594f;},k=({type:_0x5393fa='Article',headline:_0x3e9337,name:_0x3778ba,description:_0xee2ecc,url:_0x211f02,author:_0x49aa16,publisher:_0x6b3734,speakable:_0x345e4f,reviews:_0x119dae,aggregateRating:_0x42376d,keywords:_0x2c9e69})=>{const _0x5ad3ed=_0x1229,_0x316e8d={'@context':_0x5ad3ed(0xaf),'@type':_0x5393fa};_0x5393fa==='Article'&&_0x3e9337&&(_0x316e8d[_0x5ad3ed(0xae)]=_0x3e9337),_0x5393fa==='WebPage'&&_0x3778ba&&(_0x316e8d['name']=_0x3778ba),_0xee2ecc&&(_0x316e8d['description']=_0xee2ecc),_0x211f02&&(_0x316e8d['mainEntityOfPage']={'@type':'WebPage','@id':_0x211f02});const _0x24a7cb=c(_0x49aa16);_0x24a7cb&&(_0x316e8d[_0x5ad3ed(0xbe)]=_0x24a7cb);const _0x1b1f5c=v(_0x6b3734);_0x1b1f5c&&(_0x316e8d[_0x5ad3ed(0x99)]=_0x1b1f5c);const _0x428e35=P(_0x345e4f);if(_0x428e35&&(_0x316e8d[_0x5ad3ed(0x97)]=_0x428e35),_0x119dae&&_0x119dae['length']>0x0){const _0x519d27=_0x119dae['map'](S);if(_0x316e8d[_0x5ad3ed(0xab)]=_0x519d27,!_0x42376d){const _0x35ed82=_0x119dae[_0x5ad3ed(0xb4)](_0x59e7eb=>_0x59e7eb[_0x5ad3ed(0xb9)]?Number(_0x59e7eb['reviewRating'][_0x5ad3ed(0x96)]):NaN)[_0x5ad3ed(0x8a)](_0x16ee1b=>!Number['isNaN'](_0x16ee1b));if(_0x35ed82['length']>0x0){const _0x2cc4ae=_0x35ed82['reduce']((_0x492326,_0x2bd57f)=>_0x492326+_0x2bd57f,0x0);_0x316e8d[_0x5ad3ed(0xb1)]={'@type':_0x5ad3ed(0xbc),'ratingValue':_0x2cc4ae/_0x35ed82['length'],'reviewCount':_0x119dae[_0x5ad3ed(0x92)],'ratingCount':_0x35ed82['length']};}}}return _0x42376d&&(_0x316e8d[_0x5ad3ed(0xb1)]={'@type':_0x5ad3ed(0xbc),'ratingValue':_0x42376d[_0x5ad3ed(0x96)],..._0x42376d['reviewCount']!=null&&{'reviewCount':_0x42376d[_0x5ad3ed(0xac)]},..._0x42376d['ratingCount']!=null&&{'ratingCount':_0x42376d[_0x5ad3ed(0xb3)]},..._0x42376d[_0x5ad3ed(0xb6)]!=null&&{'bestRating':_0x42376d['bestRating']},..._0x42376d[_0x5ad3ed(0xa7)]!=null&&{'worstRating':_0x42376d[_0x5ad3ed(0xa7)]}}),_0x2c9e69&&_0x2c9e69[_0x5ad3ed(0x92)]>0x0&&(_0x316e8d['keywords']=_0x2c9e69['join'](',\x20')),_0x316e8d;};function _0x1229(_0x4740dc,_0x54c5d4){_0x4740dc=_0x4740dc-0x8a;const _0x4dfd16=_0x374c();let _0xed5682=_0x4dfd16[_0x4740dc];return _0xed5682;}var C=k;function _0x374c(){const _0x2a5fb7=['https://schema.org','13767780DdzwvZ','aggregateRating','datePublished','ratingCount','map','Review','bestRating','height','table','reviewRating','472RujFfS','width','AggregateRating','2118HkNEOR','author','filter','209570LejdEo','console','777156AjdRxT','Organization','4372PlgOFQ','__proto__','reviewBody','length','505jZgJzz','66sbuVJO','{}.constructor(\x22return\x20this\x22)(\x20)','ratingValue','speakable','86807YpzeHb','publisher','url','Rating','cssSelector','apply','error','703893jKmaMh','82ZUuryR','bind','log','4AYeyxy','xpath','logo','return\x20(function()\x20','worstRating','constructor','90eZuuJm','Person','review','reviewCount','SpeakableSpecification','headline'];_0x374c=function(){return _0x2a5fb7;};return _0x374c();}export{C as default,k as generateSpeakableSchema};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate schema.org JSON-LD for a `CreativeWork` representing a
|
|
3
|
+
* Subscription.
|
|
4
|
+
*
|
|
5
|
+
* Supports author/publisher, reviews and aggregate ratings, accessibility
|
|
6
|
+
* flags and keywords. Only provided fields are emitted in the returned
|
|
7
|
+
* object.
|
|
8
|
+
*
|
|
9
|
+
* See `SubscriptionOptions` for accepted properties.
|
|
10
|
+
* @returns A JSON-LD compatible `CreativeWork` (Subscription) object
|
|
11
|
+
*/
|
|
12
|
+
interface ImageRef {
|
|
13
|
+
url: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
}
|
|
17
|
+
interface PersonRef {
|
|
18
|
+
name: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
}
|
|
21
|
+
interface OrgRef {
|
|
22
|
+
name: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
}
|
|
25
|
+
interface RatingItem {
|
|
26
|
+
ratingValue: number | string;
|
|
27
|
+
bestRating?: number | string;
|
|
28
|
+
worstRating?: number | string;
|
|
29
|
+
}
|
|
30
|
+
interface ReviewItem {
|
|
31
|
+
author?: string | PersonRef;
|
|
32
|
+
datePublished?: string;
|
|
33
|
+
reviewBody?: string;
|
|
34
|
+
reviewRating?: RatingItem;
|
|
35
|
+
}
|
|
36
|
+
interface AggregateRatingOptions {
|
|
37
|
+
ratingValue: number | string;
|
|
38
|
+
reviewCount?: number;
|
|
39
|
+
ratingCount?: number;
|
|
40
|
+
bestRating?: number | string;
|
|
41
|
+
worstRating?: number | string;
|
|
42
|
+
}
|
|
43
|
+
interface SubscriptionOptions {
|
|
44
|
+
name: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
image?: string | ImageRef;
|
|
47
|
+
url?: string;
|
|
48
|
+
author?: string | PersonRef;
|
|
49
|
+
publisher?: string | OrgRef;
|
|
50
|
+
datePublished?: string;
|
|
51
|
+
dateModified?: string;
|
|
52
|
+
isAccessibleForFree?: boolean;
|
|
53
|
+
genre?: string | string[];
|
|
54
|
+
keywords?: string | string[];
|
|
55
|
+
reviews?: ReviewItem[];
|
|
56
|
+
aggregateRating?: AggregateRatingOptions;
|
|
57
|
+
}
|
|
58
|
+
declare const generateSubscriptionSchema: ({ name, description, image, url, author, publisher, datePublished, dateModified, isAccessibleForFree, genre, keywords, reviews, aggregateRating, }: SubscriptionOptions) => any;
|
|
59
|
+
|
|
60
|
+
export { generateSubscriptionSchema as default, generateSubscriptionSchema };
|