@mjhls/mjh-framework 1.0.795-beta.1 → 1.0.795-srcset
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/dist/cjs/AD.js +10 -9
- package/dist/cjs/AD300x250.js +30 -29
- package/dist/cjs/AD300x250x600.js +30 -29
- package/dist/cjs/AD728x90.js +33 -32
- package/dist/cjs/ADFloatingFooter.js +32 -31
- package/dist/cjs/ADFooter.js +15 -14
- package/dist/cjs/ADGutter.js +32 -31
- package/dist/cjs/{ADInfeed-bb09e44c.js → ADInfeed-7cf51090.js} +15 -13
- package/dist/cjs/ADSkyscraper.js +32 -31
- package/dist/cjs/ADSponsoredResources.js +32 -31
- package/dist/cjs/ADWebcast.js +32 -31
- package/dist/cjs/ADWelcome.js +33 -32
- package/dist/cjs/{ADlgInfeed-fa91dbda.js → ADlgInfeed-bf24708d.js} +11 -10
- package/dist/cjs/AccordionPanel.js +31 -29
- package/dist/cjs/AdSlot.js +35 -34
- package/dist/cjs/AdSlotsProvider.js +17 -16
- package/dist/cjs/AlphabeticList.js +26 -25
- package/dist/cjs/ArticleCarousel.js +24 -23
- package/dist/cjs/ArticleProgramLandingPage.js +57 -56
- package/dist/cjs/ArticleSeriesLandingPage.js +41 -40
- package/dist/cjs/ArticleSeriesListing.js +61 -60
- package/dist/cjs/Auth.js +686 -462
- package/dist/cjs/{AuthorComponent-bb831b74.js → AuthorComponent-c21aac7f.js} +14 -13
- package/dist/cjs/Beam.js +8 -8
- package/dist/cjs/{BlockContent-091a991f.js → BlockContent-36e54d77.js} +56 -55
- package/dist/cjs/Breadcrumbs.js +29 -27
- package/dist/cjs/CMEDeck.js +83 -83
- package/dist/cjs/Column1.js +14 -11
- package/dist/cjs/Column2.js +36 -33
- package/dist/cjs/Column3.js +61 -58
- package/dist/cjs/ConferenceArticleCard.js +24 -23
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +99 -95
- package/dist/cjs/DeckQueue.js +92 -88
- package/dist/cjs/{Dfp-946b8c39.js → Dfp-3f0ed4c8.js} +34 -33
- package/dist/cjs/EventsDeck.js +142 -135
- package/dist/cjs/ExternalResources.js +80 -79
- package/dist/cjs/Feature.js +27 -25
- package/dist/cjs/ForbesHero.js +41 -40
- package/dist/cjs/GridContent.js +182 -178
- package/dist/cjs/GridHero.js +43 -42
- package/dist/cjs/GroupDeck.js +59 -58
- package/dist/cjs/HamMagazine.js +136 -131
- package/dist/cjs/Header.js +14 -12
- package/dist/cjs/Hero.js +13 -12
- package/dist/cjs/HighlightenVideo.js +18 -17
- package/dist/cjs/HorizontalArticleListing.js +70 -69
- package/dist/cjs/HorizontalHero.js +27 -26
- package/dist/cjs/IssueContentDeck.js +77 -72
- package/dist/cjs/IssueDeck.js +76 -71
- package/dist/cjs/IssueLanding.js +43 -42
- package/dist/cjs/LeftNav.js +40 -38
- package/dist/cjs/MasterDeck.js +72 -71
- package/dist/cjs/MediaSeriesLanding.js +966 -956
- package/dist/cjs/NavDvm.js +79 -74
- package/dist/cjs/{NavFooter-76c913e3.js → NavFooter-3dcd99a8.js} +15 -14
- package/dist/cjs/NavMagazine.js +143 -138
- package/dist/cjs/NavNative.js +138 -130
- package/dist/cjs/NavNormal.js +53 -48
- package/dist/cjs/OncliveHero.js +20 -20
- package/dist/cjs/OncliveLargeHero.js +67 -66
- package/dist/cjs/PageFilter.js +15 -14
- package/dist/cjs/PartnerDetailListing.js +109 -108
- package/dist/cjs/PdfDownload.js +10 -9
- package/dist/cjs/PopUpModal.js +21 -19
- package/dist/cjs/PubSection.js +42 -41
- package/dist/cjs/PubToc.js +16 -15
- package/dist/cjs/PublicationDeck.js +66 -61
- package/dist/cjs/PublicationLanding.js +112 -108
- package/dist/cjs/QueueDeckExpanded.js +294 -294
- package/dist/cjs/RecentNews.js +25 -24
- package/dist/cjs/RelatedContent.js +25 -24
- package/dist/cjs/RelatedTopicsDropdown.js +22 -19
- package/dist/cjs/RolesDeck.js +32 -27
- package/dist/cjs/Search.js +22 -18
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +38 -38
- package/dist/cjs/{SeriesSlider-4abb21b4.js → SeriesSlider-2db54929.js} +38 -37
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +37 -36
- package/dist/cjs/SocialIcons.js +10 -9
- package/dist/cjs/{SocialSearchComponent-8dd468fd.js → SocialSearchComponent-9cb50ae4.js} +40 -36
- package/dist/cjs/SocialShare.js +31 -29
- package/dist/cjs/TaxonomyCard.js +63 -58
- package/dist/cjs/TaxonomyDescription.js +54 -53
- package/dist/cjs/TemplateNormal.js +76 -75
- package/dist/cjs/ThumbnailCard.js +22 -20
- package/dist/cjs/Ustream.js +28 -27
- package/dist/cjs/VerticalHero.js +18 -17
- package/dist/cjs/VideoProgramLandingPage.js +76 -72
- package/dist/cjs/VideoSeriesCard.js +32 -31
- package/dist/cjs/VideoSeriesFilter.js +18 -18
- package/dist/cjs/VideoSeriesLandingPage.js +49 -48
- package/dist/cjs/VideoSeriesListing.js +78 -77
- package/dist/cjs/View.js +264 -261
- package/dist/cjs/YahooHero.js +40 -39
- package/dist/cjs/YoutubeGroup.js +63 -62
- package/dist/cjs/{_is-array-754e012d.js → _is-array-6128bd56.js} +6 -6
- package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-55a5657a.js} +8 -8
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-5e74ba08.js → _object-sap-a175b4a9.js} +1 -1
- package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-8fe5a54f.js} +2 -2
- package/dist/cjs/{_to-object-329a650b.js → _to-object-6de10e57.js} +8 -8
- package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-58c289d9.js} +32 -32
- package/dist/cjs/{brightcove-react-player-loader.es-156bd4d6.js → brightcove-react-player-loader.es-a195642e.js} +11 -9
- package/dist/cjs/{core.get-iterator-method-f62321d4.js → core.get-iterator-method-f474eacc.js} +2 -2
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-f4d12f4e.js → define-property-c88be878.js} +6 -6
- package/dist/cjs/{defineProperty-55548b25.js → defineProperty-0cb76d99.js} +1 -1
- package/dist/cjs/{entities-310b46ee.js → entities-3f9d0f2f.js} +1 -1
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{es6.string.iterator-cc0bbaa4.js → es6.string.iterator-c2573ffd.js} +6 -6
- package/dist/cjs/{extends-0a918631.js → extends-29bdbc6d.js} +7 -7
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +140 -76
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +43 -43
- package/dist/cjs/{getTargeting-021d644c.js → getTargeting-a100d6e5.js} +3 -3
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/{esm/iconBase-602d52fe.js → cjs/iconBase-be4097c0.js} +33 -8
- package/dist/cjs/{index-8bf6c863.js → index-0e4427c8.js} +12 -11
- package/dist/cjs/{index-f05824b5.js → index-73705aa2.js} +1010 -987
- package/dist/cjs/{index-96b3db50.js → index-eadd5035.js} +17 -15
- package/dist/cjs/{index-be0c82be.js → index-efca863c.js} +36 -30
- package/dist/cjs/{index-3294d3bc.js → index-f86bb269.js} +44 -45
- package/dist/cjs/{index.es-9110add6.js → index.es-f3e47207.js} +31 -12
- package/dist/cjs/{index.esm-90433435.js → index.esm-00a6aade.js} +7 -16
- package/dist/cjs/{index.esm-4d410430.js → index.esm-2bb721c8.js} +21 -21
- package/dist/cjs/{index.esm-66ffa47a.js → index.esm-9225638f.js} +5 -10
- package/dist/cjs/{index.esm-ff47db6f.js → index.esm-f27f80d9.js} +6 -13
- package/dist/cjs/index.js +163 -160
- package/dist/cjs/{inherits-452ff02c.js → inherits-c2065b95.js} +19 -19
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/keys-7f2c2108.js +25 -0
- package/dist/cjs/{lodash-fc2922d0.js → lodash-f0783643.js} +128 -31
- package/dist/cjs/main-f1c77adb.js +973 -0
- package/dist/cjs/{moment-575fe24c.js → moment-aca40de1.js} +11 -9
- package/dist/cjs/{react-social-icons-f7f48f71.js → react-social-icons-af932527.js} +28 -27
- package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-5d1bc3b3.js} +14 -14
- package/dist/cjs/{smoothscroll-5054361f.js → smoothscroll-99df7f93.js} +1 -1
- package/dist/cjs/stringify-c9ac1214.js +17 -0
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-ddb70795.js} +9 -9
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-725500bc.js → typeof-88a668c5.js} +36 -36
- package/dist/cjs/urlFor.js +2 -2
- package/dist/cjs/{util-f2c1b65b.js → util-6f784d85.js} +1 -1
- package/dist/cjs/{visibility-sensor-ad5e3116.js → visibility-sensor-eb2c5b69.js} +7 -5
- package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-46657b5c.js} +3 -3
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +23 -23
- package/dist/esm/AD300x250x600.js +23 -23
- package/dist/esm/AD728x90.js +26 -26
- package/dist/esm/ADFloatingFooter.js +22 -22
- package/dist/esm/ADFooter.js +6 -6
- package/dist/esm/ADGutter.js +22 -22
- package/dist/esm/{ADInfeed-ab8f9325.js → ADInfeed-f7d00a9a.js} +6 -6
- package/dist/esm/ADSkyscraper.js +22 -22
- package/dist/esm/ADSponsoredResources.js +22 -22
- package/dist/esm/ADWebcast.js +22 -22
- package/dist/esm/ADWelcome.js +19 -19
- package/dist/esm/{ADlgInfeed-49f41f83.js → ADlgInfeed-db64f46d.js} +4 -4
- package/dist/esm/AccordionPanel.js +8 -8
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +12 -12
- package/dist/esm/AlphabeticList.js +10 -10
- package/dist/esm/ArticleCarousel.js +17 -17
- package/dist/esm/ArticleProgramLandingPage.js +47 -47
- package/dist/esm/ArticleSeriesLandingPage.js +32 -32
- package/dist/esm/ArticleSeriesListing.js +33 -33
- package/dist/esm/Auth.js +595 -375
- package/dist/esm/{AuthorComponent-34b16174.js → AuthorComponent-30aeba69.js} +1 -1
- package/dist/esm/Beam.js +8 -8
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-c99c9a8d.js} +34 -34
- package/dist/esm/Breadcrumbs.js +7 -7
- package/dist/esm/CMEDeck.js +24 -24
- package/dist/esm/Column1.js +4 -4
- package/dist/esm/Column2.js +21 -21
- package/dist/esm/Column3.js +38 -38
- package/dist/esm/ConferenceArticleCard.js +7 -7
- package/dist/esm/DeckContent.js +48 -48
- package/dist/esm/DeckQueue.js +47 -47
- package/dist/esm/{Dfp-965b3873.js → Dfp-be030f2a.js} +14 -14
- package/dist/esm/EventsDeck.js +50 -50
- package/dist/esm/ExternalResources.js +47 -47
- package/dist/esm/Feature.js +4 -4
- package/dist/esm/ForbesHero.js +11 -11
- package/dist/esm/GridContent.js +80 -80
- package/dist/esm/GridHero.js +12 -12
- package/dist/esm/GroupDeck.js +13 -13
- package/dist/esm/HamMagazine.js +29 -29
- package/dist/esm/Hero.js +3 -3
- package/dist/esm/HighlightenVideo.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +44 -44
- package/dist/esm/HorizontalHero.js +5 -5
- package/dist/esm/IssueContentDeck.js +26 -26
- package/dist/esm/IssueDeck.js +36 -36
- package/dist/esm/IssueLanding.js +35 -35
- package/dist/esm/LeftNav.js +21 -21
- package/dist/esm/MasterDeck.js +36 -36
- package/dist/esm/MediaSeriesLanding.js +501 -494
- package/dist/esm/NavDvm.js +16 -16
- package/dist/esm/NavMagazine.js +34 -34
- package/dist/esm/NavNative.js +34 -34
- package/dist/esm/NavNormal.js +18 -18
- package/dist/esm/OncliveHero.js +4 -5
- package/dist/esm/OncliveLargeHero.js +12 -12
- package/dist/esm/PageFilter.js +6 -6
- package/dist/esm/PartnerDetailListing.js +56 -56
- package/dist/esm/PdfDownload.js +2 -2
- package/dist/esm/PopUpModal.js +6 -6
- package/dist/esm/PubSection.js +33 -33
- package/dist/esm/PubToc.js +8 -8
- package/dist/esm/PublicationDeck.js +23 -23
- package/dist/esm/PublicationLanding.js +49 -49
- package/dist/esm/QueueDeckExpanded.js +37 -37
- package/dist/esm/RecentNews.js +6 -6
- package/dist/esm/RelatedContent.js +6 -6
- package/dist/esm/RolesDeck.js +12 -12
- package/dist/esm/Search.js +8 -8
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +19 -19
- package/dist/esm/{SeriesSlider-36be7223.js → SeriesSlider-c8477bf3.js} +10 -10
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +15 -15
- package/dist/esm/{SocialSearchComponent-719f230f.js → SocialSearchComponent-09775683.js} +12 -12
- package/dist/esm/TaxonomyCard.js +24 -24
- package/dist/esm/TaxonomyDescription.js +44 -44
- package/dist/esm/TemplateNormal.js +50 -50
- package/dist/esm/ThumbnailCard.js +6 -6
- package/dist/esm/Ustream.js +11 -11
- package/dist/esm/VerticalHero.js +3 -3
- package/dist/esm/VideoProgramLandingPage.js +52 -52
- package/dist/esm/VideoSeriesCard.js +12 -12
- package/dist/esm/VideoSeriesFilter.js +9 -9
- package/dist/esm/VideoSeriesLandingPage.js +37 -37
- package/dist/esm/VideoSeriesListing.js +34 -34
- package/dist/esm/View.js +89 -90
- package/dist/esm/YahooHero.js +14 -14
- package/dist/esm/YoutubeGroup.js +21 -21
- package/dist/esm/{_is-array-58e95429.js → _is-array-3e99e06e.js} +6 -6
- package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-7e5e5ce2.js} +8 -8
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-964b6feb.js → _object-sap-f353c2a9.js} +1 -1
- package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-0f197f89.js} +2 -2
- package/dist/esm/{_to-object-a4107da3.js → _to-object-b50e61c3.js} +9 -9
- package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-7f8f9219.js} +32 -32
- package/dist/esm/{brightcove-react-player-loader.es-83f53e4e.js → brightcove-react-player-loader.es-57a70a56.js} +5 -4
- package/dist/esm/{core.get-iterator-method-e1de7503.js → core.get-iterator-method-133dfacd.js} +2 -2
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-8af5f002.js → define-property-fe54dc9f.js} +6 -6
- package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-f5ff6f5a.js} +1 -1
- package/dist/esm/{entities-7cc3bf45.js → entities-932b50cf.js} +1 -1
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{es6.string.iterator-c990c18c.js → es6.string.iterator-bc33758b.js} +7 -7
- package/dist/esm/{extends-6f2fcc99.js → extends-60e0e1c6.js} +7 -7
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +135 -71
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +43 -43
- package/dist/esm/{getTargeting-82e86707.js → getTargeting-05c216d6.js} +2 -2
- package/dist/esm/getTargeting.js +8 -8
- package/dist/{cjs/iconBase-68959171.js → esm/iconBase-ccc56b97.js} +2 -8
- package/dist/esm/{index-73819142.js → index-0dbff1d1.js} +36 -30
- package/dist/esm/{index-a9e53f80.js → index-5cc7b406.js} +3 -3
- package/dist/esm/{index-5f7e79e7.js → index-755f2cc2.js} +6 -6
- package/dist/esm/{index-ef6d5dcf.js → index-79cfd25c.js} +44 -45
- package/dist/esm/{index-41b5c632.js → index-f0a9dd6d.js} +632 -616
- package/dist/esm/{index.es-29c1cef5.js → index.es-a6137319.js} +23 -5
- package/dist/esm/{index.esm-fd746768.js → index.esm-37268dca.js} +4 -5
- package/dist/esm/{index.esm-cf08bf18.js → index.esm-d4932dea.js} +6 -13
- package/dist/esm/{index.esm-b08f4b04.js → index.esm-e874e770.js} +5 -10
- package/dist/esm/{index.esm-29e48d38.js → index.esm-f6156a57.js} +7 -16
- package/dist/esm/index.js +117 -117
- package/dist/esm/{inherits-cf8dde54.js → inherits-a41fe93f.js} +19 -19
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-8eda7a5c.js → keys-7a3adabf.js} +6 -6
- package/dist/esm/{lodash-17fdfebb.js → lodash-f97fd99a.js} +128 -31
- package/dist/esm/main-d4165069.js +961 -0
- package/dist/esm/{moment-e2f9b20c.js → moment-bc12cb97.js} +11 -9
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-9be47857.js} +16 -16
- package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-be2f7a22.js} +14 -14
- package/dist/esm/{smoothscroll-0cd4c7a6.js → smoothscroll-fa4e3f8c.js} +1 -1
- package/dist/esm/stringify-59c8f690.js +15 -0
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-6d9a4616.js} +9 -9
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-6435ba1c.js → typeof-a286cf0c.js} +36 -36
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{util-7700fc59.js → util-3ab476bf.js} +1 -1
- package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-4109ff68.js} +3 -3
- package/package.json +1 -1
- package/dist/cjs/ConferenceBanner-4a16fddc.js +0 -23
- package/dist/cjs/keys-a586b7a0.js +0 -25
- package/dist/cjs/main-02daeefe.js +0 -862
- package/dist/cjs/stringify-7c5aff47.js +0 -17
- package/dist/esm/main-e4a934b2.js +0 -851
- package/dist/esm/stringify-4330ccdc.js +0 -15
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7f8f9219.js';
|
|
1
2
|
import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-a4107da3.js';
|
|
3
|
-
import './es6.string.iterator-c990c18c.js';
|
|
4
|
-
import './_library-528f1934.js';
|
|
5
|
-
import './_iter-detect-5d49a330.js';
|
|
6
|
-
import './core.get-iterator-method-e1de7503.js';
|
|
7
|
-
import './web.dom.iterable-4439f05a.js';
|
|
8
|
-
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
|
|
9
3
|
import { c as cookie } from './index-db3bb315.js';
|
|
10
4
|
import getQuery from './getQuery.js';
|
|
5
|
+
import './es6.string.iterator-bc33758b.js';
|
|
6
|
+
import './_to-object-b50e61c3.js';
|
|
7
|
+
import './web.dom.iterable-4109ff68.js';
|
|
8
|
+
import './_library-528f1934.js';
|
|
9
|
+
import './core.get-iterator-method-133dfacd.js';
|
|
10
|
+
import './_iter-detect-7e5e5ce2.js';
|
|
11
11
|
|
|
12
12
|
var defaultParseOptions = {
|
|
13
13
|
decodeValues: true,
|
|
@@ -29,9 +29,20 @@ function parseString(setCookieValue, options) {
|
|
|
29
29
|
? Object.assign({}, defaultParseOptions, options)
|
|
30
30
|
: defaultParseOptions;
|
|
31
31
|
|
|
32
|
+
try {
|
|
33
|
+
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
34
|
+
} catch (e) {
|
|
35
|
+
console.error(
|
|
36
|
+
"set-cookie-parser encountered an error while decoding a cookie with value '" +
|
|
37
|
+
value +
|
|
38
|
+
"'. Set options.decodeValues to false to disable this feature.",
|
|
39
|
+
e
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
var cookie = {
|
|
33
44
|
name: name, // grab everything before the first =
|
|
34
|
-
value:
|
|
45
|
+
value: value,
|
|
35
46
|
};
|
|
36
47
|
|
|
37
48
|
parts.forEach(function (part) {
|
|
@@ -202,7 +213,7 @@ setCookie.parse = parse_1;
|
|
|
202
213
|
setCookie.parseString = parseString_1;
|
|
203
214
|
setCookie.splitCookiesString = splitCookiesString_1;
|
|
204
215
|
|
|
205
|
-
var
|
|
216
|
+
var utils = createCommonjsModule(function (module, exports) {
|
|
206
217
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
207
218
|
__assign = Object.assign || function(t) {
|
|
208
219
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -215,10 +226,33 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
|
215
226
|
return __assign.apply(this, arguments);
|
|
216
227
|
};
|
|
217
228
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218
|
-
exports.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
|
|
230
|
+
/**
|
|
231
|
+
* Tells whether we are in a browser or server.
|
|
232
|
+
*/
|
|
233
|
+
function isBrowser() {
|
|
234
|
+
return typeof window !== 'undefined';
|
|
235
|
+
}
|
|
236
|
+
exports.isBrowser = isBrowser;
|
|
237
|
+
/**
|
|
238
|
+
* Create an instance of the Cookie interface
|
|
239
|
+
*/
|
|
240
|
+
function createCookie(name, value, options) {
|
|
241
|
+
var sameSite = options.sameSite;
|
|
242
|
+
if (sameSite === true) {
|
|
243
|
+
sameSite = 'strict';
|
|
244
|
+
}
|
|
245
|
+
if (sameSite === undefined || sameSite === false) {
|
|
246
|
+
sameSite = 'lax';
|
|
247
|
+
}
|
|
248
|
+
var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
|
|
249
|
+
delete cookieToSet.encode;
|
|
250
|
+
return __assign({ name: name, value: value }, cookieToSet);
|
|
251
|
+
}
|
|
252
|
+
exports.createCookie = createCookie;
|
|
253
|
+
/**
|
|
254
|
+
* Tells whether given objects have the same properties.
|
|
255
|
+
*/
|
|
222
256
|
function hasSameProperties(a, b) {
|
|
223
257
|
var aProps = Object.getOwnPropertyNames(a);
|
|
224
258
|
var bProps = Object.getOwnPropertyNames(b);
|
|
@@ -233,8 +267,9 @@ function hasSameProperties(a, b) {
|
|
|
233
267
|
}
|
|
234
268
|
return true;
|
|
235
269
|
}
|
|
270
|
+
exports.hasSameProperties = hasSameProperties;
|
|
236
271
|
/**
|
|
237
|
-
* Compare the cookie and return true if the cookies
|
|
272
|
+
* Compare the cookie and return true if the cookies have equivalent
|
|
238
273
|
* options and the cookies would be overwritten in the browser storage.
|
|
239
274
|
*
|
|
240
275
|
* @param a first Cookie for comparison
|
|
@@ -247,71 +282,109 @@ function areCookiesEqual(a, b) {
|
|
|
247
282
|
}
|
|
248
283
|
return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
|
|
249
284
|
}
|
|
285
|
+
exports.areCookiesEqual = areCookiesEqual;
|
|
286
|
+
/* Functions */
|
|
287
|
+
//# sourceMappingURL=utils.js.map
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
unwrapExports(utils);
|
|
291
|
+
utils.areCookiesEqual;
|
|
292
|
+
utils.hasSameProperties;
|
|
293
|
+
utils.createCookie;
|
|
294
|
+
utils.isBrowser;
|
|
295
|
+
|
|
296
|
+
var dist = createCommonjsModule(function (module, exports) {
|
|
297
|
+
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
298
|
+
__assign = Object.assign || function(t) {
|
|
299
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
300
|
+
s = arguments[i];
|
|
301
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
302
|
+
t[p] = s[p];
|
|
303
|
+
}
|
|
304
|
+
return t;
|
|
305
|
+
};
|
|
306
|
+
return __assign.apply(this, arguments);
|
|
307
|
+
};
|
|
308
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
309
|
+
exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
250
313
|
/**
|
|
251
|
-
* Create an instance of the Cookie interface
|
|
252
|
-
*
|
|
253
|
-
* @param name name of the Cookie
|
|
254
|
-
* @param value value of the Cookie
|
|
255
|
-
* @param options Cookie options
|
|
256
|
-
*/
|
|
257
|
-
function createCookie(name, value, options) {
|
|
258
|
-
var sameSite = options.sameSite;
|
|
259
|
-
if (sameSite === true) {
|
|
260
|
-
sameSite = 'strict';
|
|
261
|
-
}
|
|
262
|
-
if (sameSite === undefined || sameSite === false) {
|
|
263
|
-
sameSite = 'lax';
|
|
264
|
-
}
|
|
265
|
-
var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
|
|
266
|
-
delete cookieToSet.encode;
|
|
267
|
-
return __assign({ name: name, value: value }, cookieToSet);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
*
|
|
271
314
|
* Parses cookies.
|
|
272
315
|
*
|
|
273
|
-
* @param ctx
|
|
274
|
-
* @param options
|
|
316
|
+
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
317
|
+
* @param options Options that we pass down to `cookie` library.
|
|
275
318
|
*/
|
|
276
319
|
function parseCookies(ctx, options) {
|
|
277
|
-
|
|
320
|
+
var _a, _b;
|
|
321
|
+
if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
|
|
278
322
|
return cookie.parse(ctx.req.headers.cookie, options);
|
|
279
323
|
}
|
|
280
|
-
if (isBrowser()) {
|
|
324
|
+
if (utils.isBrowser()) {
|
|
281
325
|
return cookie.parse(document.cookie, options);
|
|
282
326
|
}
|
|
283
327
|
return {};
|
|
284
328
|
}
|
|
285
329
|
exports.parseCookies = parseCookies;
|
|
286
330
|
/**
|
|
287
|
-
*
|
|
288
331
|
* Sets a cookie.
|
|
289
332
|
*
|
|
290
|
-
* @param ctx
|
|
291
|
-
* @param name
|
|
292
|
-
* @param value
|
|
293
|
-
* @param options
|
|
333
|
+
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
334
|
+
* @param name The name of your cookie.
|
|
335
|
+
* @param value The value of your cookie.
|
|
336
|
+
* @param options Options that we pass down to `cookie` library.
|
|
294
337
|
*/
|
|
295
338
|
function setCookie$1(ctx, name, value, options) {
|
|
296
|
-
|
|
339
|
+
var _a, _b;
|
|
340
|
+
if (options === void 0) { options = {}; }
|
|
341
|
+
// SSR
|
|
342
|
+
if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
|
|
343
|
+
// Check if response has finished and warn about it.
|
|
344
|
+
if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
|
|
345
|
+
console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
|
|
346
|
+
console.warn("You should set cookie before res.send()");
|
|
347
|
+
return {};
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Load existing cookies from the header and parse them.
|
|
351
|
+
*/
|
|
297
352
|
var cookies = ctx.res.getHeader('Set-Cookie') || [];
|
|
298
353
|
if (typeof cookies === 'string')
|
|
299
354
|
cookies = [cookies];
|
|
300
355
|
if (typeof cookies === 'number')
|
|
301
356
|
cookies = [];
|
|
302
|
-
|
|
357
|
+
/**
|
|
358
|
+
* Parse cookies but ignore values - we've already encoded
|
|
359
|
+
* them in the previous call.
|
|
360
|
+
*/
|
|
361
|
+
var parsedCookies = setCookie.parse(cookies, {
|
|
362
|
+
decodeValues: false,
|
|
363
|
+
});
|
|
364
|
+
/**
|
|
365
|
+
* We create the new cookie and make sure that none of
|
|
366
|
+
* the existing cookies match it.
|
|
367
|
+
*/
|
|
368
|
+
var newCookie_1 = utils.createCookie(name, value, options);
|
|
303
369
|
var cookiesToSet_1 = [];
|
|
304
370
|
parsedCookies.forEach(function (parsedCookie) {
|
|
305
|
-
if (!areCookiesEqual(parsedCookie,
|
|
306
|
-
|
|
371
|
+
if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
|
|
372
|
+
/**
|
|
373
|
+
* We serialize the cookie back to the original format
|
|
374
|
+
* if it isn't the same as the new one.
|
|
375
|
+
*/
|
|
376
|
+
var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
|
|
377
|
+
// we prevent reencoding by default, but you might override it
|
|
378
|
+
encode: function (val) { return val; } }, parsedCookie));
|
|
379
|
+
cookiesToSet_1.push(serializedCookie);
|
|
307
380
|
}
|
|
308
381
|
});
|
|
309
382
|
cookiesToSet_1.push(cookie.serialize(name, value, options));
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
383
|
+
// Update the header.
|
|
384
|
+
ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
|
|
313
385
|
}
|
|
314
|
-
|
|
386
|
+
// Browser
|
|
387
|
+
if (utils.isBrowser()) {
|
|
315
388
|
if (options && options.httpOnly) {
|
|
316
389
|
throw new Error('Can not set a httpOnly cookie in the browser.');
|
|
317
390
|
}
|
|
@@ -321,40 +394,31 @@ function setCookie$1(ctx, name, value, options) {
|
|
|
321
394
|
}
|
|
322
395
|
exports.setCookie = setCookie$1;
|
|
323
396
|
/**
|
|
324
|
-
*
|
|
325
397
|
* Destroys a cookie with a particular name.
|
|
326
398
|
*
|
|
327
|
-
* @param ctx
|
|
328
|
-
* @param name
|
|
329
|
-
* @param options
|
|
399
|
+
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
400
|
+
* @param name Cookie name.
|
|
401
|
+
* @param options Options that we pass down to `cookie` library.
|
|
330
402
|
*/
|
|
331
403
|
function destroyCookie(ctx, name, options) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
if (typeof cookies === 'number')
|
|
338
|
-
cookies = [];
|
|
339
|
-
cookies.push(cookie.serialize(name, '', opts));
|
|
340
|
-
ctx.res.setHeader('Set-Cookie', cookies);
|
|
341
|
-
}
|
|
342
|
-
if (isBrowser()) {
|
|
343
|
-
document.cookie = cookie.serialize(name, '', opts);
|
|
344
|
-
}
|
|
345
|
-
return {};
|
|
404
|
+
/**
|
|
405
|
+
* We forward the request destroy to setCookie function
|
|
406
|
+
* as it is the same function with modified maxAge value.
|
|
407
|
+
*/
|
|
408
|
+
return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
|
|
346
409
|
}
|
|
347
410
|
exports.destroyCookie = destroyCookie;
|
|
411
|
+
/* Utility Exports */
|
|
348
412
|
exports.default = {
|
|
349
413
|
set: setCookie$1,
|
|
350
414
|
get: parseCookies,
|
|
351
415
|
destroy: destroyCookie,
|
|
352
416
|
};
|
|
353
|
-
|
|
417
|
+
//# sourceMappingURL=index.js.map
|
|
354
418
|
});
|
|
355
419
|
|
|
356
420
|
unwrapExports(dist);
|
|
357
|
-
|
|
421
|
+
dist.destroyCookie;
|
|
358
422
|
var dist_2 = dist.setCookie;
|
|
359
423
|
var dist_3 = dist.parseCookies;
|
|
360
424
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7f8f9219.js';
|
|
1
2
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
3
|
+
import './es6.string.iterator-bc33758b.js';
|
|
4
|
+
import './_to-object-b50e61c3.js';
|
|
5
|
+
import './web.dom.iterable-4109ff68.js';
|
|
4
6
|
import './_library-528f1934.js';
|
|
5
|
-
import './
|
|
6
|
-
import './
|
|
7
|
-
import './web.dom.iterable-4439f05a.js';
|
|
8
|
-
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
|
|
7
|
+
import './core.get-iterator-method-133dfacd.js';
|
|
8
|
+
import './_iter-detect-7e5e5ce2.js';
|
|
9
9
|
|
|
10
10
|
var _this = undefined;
|
|
11
11
|
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-a4107da3.js';
|
|
3
|
-
import './es6.string.iterator-c990c18c.js';
|
|
4
|
-
import './_library-528f1934.js';
|
|
5
|
-
import './_iter-detect-5d49a330.js';
|
|
6
|
-
import './toConsumableArray-43aa614d.js';
|
|
7
|
-
import './core.get-iterator-method-e1de7503.js';
|
|
8
|
-
import './_object-pie-33c40e79.js';
|
|
9
|
-
import './extends-6f2fcc99.js';
|
|
10
|
-
import './_object-sap-964b6feb.js';
|
|
11
|
-
import './inherits-cf8dde54.js';
|
|
12
|
-
import './define-property-8af5f002.js';
|
|
13
|
-
import './web.dom.iterable-4439f05a.js';
|
|
14
|
-
import './typeof-6435ba1c.js';
|
|
15
|
-
import './_is-array-58e95429.js';
|
|
16
1
|
import 'react';
|
|
17
|
-
|
|
2
|
+
export { g as default } from './index-f0a9dd6d.js';
|
|
3
|
+
import './BlockContent-c99c9a8d.js';
|
|
4
|
+
import './entities-932b50cf.js';
|
|
5
|
+
import './slicedToArray-be2f7a22.js';
|
|
6
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
7
|
+
import './web.dom.iterable-4109ff68.js';
|
|
8
|
+
import './es6.string.iterator-bc33758b.js';
|
|
9
|
+
import './_to-object-b50e61c3.js';
|
|
10
|
+
import './core.get-iterator-method-133dfacd.js';
|
|
11
|
+
import 'react-bootstrap';
|
|
12
|
+
import './index-0dbff1d1.js';
|
|
13
|
+
import './index-5cc7b406.js';
|
|
18
14
|
import 'prop-types';
|
|
19
|
-
import 'react-bootstrap/Row';
|
|
20
|
-
import 'react-bootstrap/Col';
|
|
21
|
-
import './moment-e2f9b20c.js';
|
|
22
15
|
import 'next/router';
|
|
23
|
-
import './isSymbol-1981418f.js';
|
|
24
|
-
import './debounce-9207d8ee.js';
|
|
25
|
-
import './toNumber-2f7a84cd.js';
|
|
26
|
-
import 'react-dom';
|
|
27
|
-
import './index-73819142.js';
|
|
28
|
-
import './index-5f7e79e7.js';
|
|
29
|
-
import './main-e4a934b2.js';
|
|
30
|
-
import './entities-7cc3bf45.js';
|
|
31
|
-
import './slicedToArray-641f241f.js';
|
|
32
|
-
import './stringify-4330ccdc.js';
|
|
33
|
-
import './asyncToGenerator-fc1c2e29.js';
|
|
34
|
-
import './Segment.js';
|
|
35
|
-
import './Beam.js';
|
|
36
|
-
import './AdSlot.js';
|
|
37
|
-
import './BlockContent-e9b4ddcf.js';
|
|
38
16
|
import './index-c7e2ac95.js';
|
|
39
|
-
import './
|
|
17
|
+
import './util-3ab476bf.js';
|
|
18
|
+
import './Beam.js';
|
|
19
|
+
import './stringify-59c8f690.js';
|
|
20
|
+
import './asyncToGenerator-7f8f9219.js';
|
|
21
|
+
import './_library-528f1934.js';
|
|
22
|
+
import './_iter-detect-7e5e5ce2.js';
|
|
23
|
+
import './Segment.js';
|
|
24
|
+
import './main-d4165069.js';
|
|
25
|
+
import './extends-60e0e1c6.js';
|
|
26
|
+
import './_object-pie-133f504a.js';
|
|
27
|
+
import './index-755f2cc2.js';
|
|
28
|
+
import 'react-dom';
|
|
29
|
+
import './typeof-a286cf0c.js';
|
|
30
|
+
import './_is-array-3e99e06e.js';
|
|
31
|
+
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
40
32
|
import './GroupDeck.js';
|
|
41
|
-
import '
|
|
42
|
-
import './
|
|
43
|
-
import './
|
|
44
|
-
export { g as default } from './index-41b5c632.js';
|
|
45
|
-
import './util-7700fc59.js';
|
|
46
|
-
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
33
|
+
import './smoothscroll-fa4e3f8c.js';
|
|
34
|
+
import './moment-bc12cb97.js';
|
|
35
|
+
import './SocialShare.js';
|
|
47
36
|
import 'next/head';
|
|
48
37
|
import 'react-share';
|
|
49
|
-
import './
|
|
50
|
-
import './
|
|
38
|
+
import './_object-to-array-0f197f89.js';
|
|
39
|
+
import './toConsumableArray-6d9a4616.js';
|
|
51
40
|
import 'react-bootstrap/Pagination';
|
|
52
41
|
import 'react-bootstrap/Button';
|
|
42
|
+
import './AdSlot.js';
|
|
43
|
+
import './debounce-533d9748.js';
|
|
44
|
+
import './isSymbol-a7e9aafe.js';
|
|
45
|
+
import './toNumber-5aeba6e7.js';
|
|
46
|
+
import 'react-bootstrap/Row';
|
|
47
|
+
import 'react-bootstrap/Col';
|
|
48
|
+
import './inherits-a41fe93f.js';
|
|
49
|
+
import './_object-sap-f353c2a9.js';
|
|
50
|
+
import './define-property-fe54dc9f.js';
|
|
51
|
+
import './index.esm-f6156a57.js';
|
|
52
|
+
import './iconBase-ccc56b97.js';
|
|
53
53
|
import 'react-bootstrap/Figure';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from './extends-60e0e1c6.js';
|
|
2
|
+
import { _ as _toConsumableArray } from './toConsumableArray-6d9a4616.js';
|
|
3
3
|
|
|
4
4
|
var getContentPlacementUrl = function getContentPlacementUrl(cp) {
|
|
5
5
|
var cp_url = '';
|
package/dist/esm/getTargeting.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import './extends-60e0e1c6.js';
|
|
2
|
+
import './toConsumableArray-6d9a4616.js';
|
|
3
|
+
export { g as default } from './getTargeting-05c216d6.js';
|
|
1
4
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
5
|
-
import './
|
|
6
|
-
import './core.get-iterator-method-
|
|
7
|
-
import './_object-pie-33c40e79.js';
|
|
8
|
-
import './extends-6f2fcc99.js';
|
|
9
|
-
export { g as default } from './getTargeting-82e86707.js';
|
|
5
|
+
import './_to-object-b50e61c3.js';
|
|
6
|
+
import './_object-pie-133f504a.js';
|
|
7
|
+
import './es6.string.iterator-bc33758b.js';
|
|
8
|
+
import './_iter-detect-7e5e5ce2.js';
|
|
9
|
+
import './core.get-iterator-method-133dfacd.js';
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var React__default = _interopDefault(React);
|
|
1
|
+
import * as React from 'react';
|
|
7
2
|
|
|
8
3
|
var DefaultContext = {
|
|
9
4
|
color: undefined,
|
|
@@ -83,5 +78,4 @@ function IconBase(props) {
|
|
|
83
78
|
}) : elem(DefaultContext);
|
|
84
79
|
}
|
|
85
80
|
|
|
86
|
-
|
|
87
|
-
exports.IconContext = IconContext;
|
|
81
|
+
export { GenIcon as G, IconContext as I };
|
|
@@ -18,7 +18,7 @@ function parseAssetId(ref) {
|
|
|
18
18
|
return { id: id, width: width, height: height, format: format };
|
|
19
19
|
}
|
|
20
20
|
exports.default = parseAssetId;
|
|
21
|
-
|
|
21
|
+
//# sourceMappingURL=parseAssetId.js.map
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
unwrapExports(parseAssetId_1);
|
|
@@ -58,35 +58,35 @@ function parseSource(source) {
|
|
|
58
58
|
if (typeof source === 'string' && isUrl(source)) {
|
|
59
59
|
// Someone passed an existing image url?
|
|
60
60
|
image = {
|
|
61
|
-
asset: { _ref: urlToId(source) }
|
|
61
|
+
asset: { _ref: urlToId(source) },
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
else if (typeof source === 'string') {
|
|
65
65
|
// Just an asset id
|
|
66
66
|
image = {
|
|
67
|
-
asset: { _ref: source }
|
|
67
|
+
asset: { _ref: source },
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
else if (isRef(source)) {
|
|
71
71
|
// We just got passed an asset directly
|
|
72
72
|
image = {
|
|
73
|
-
asset: source
|
|
73
|
+
asset: source,
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
else if (isAsset(source)) {
|
|
77
77
|
// If we were passed an image asset document
|
|
78
78
|
image = {
|
|
79
79
|
asset: {
|
|
80
|
-
_ref: source._id || ''
|
|
81
|
-
}
|
|
80
|
+
_ref: source._id || '',
|
|
81
|
+
},
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
else if (isAssetStub(source)) {
|
|
85
85
|
// If we were passed a partial asset (`url`, but no `_id`)
|
|
86
86
|
image = {
|
|
87
87
|
asset: {
|
|
88
|
-
_ref: urlToId(source.asset.url)
|
|
89
|
-
}
|
|
88
|
+
_ref: urlToId(source.asset.url),
|
|
89
|
+
},
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
else if (typeof source.asset === 'object') {
|
|
@@ -127,7 +127,7 @@ function applyDefaults(image) {
|
|
|
127
127
|
left: 0,
|
|
128
128
|
top: 0,
|
|
129
129
|
bottom: 0,
|
|
130
|
-
right: 0
|
|
130
|
+
right: 0,
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
if (!result.hotspot) {
|
|
@@ -135,12 +135,12 @@ function applyDefaults(image) {
|
|
|
135
135
|
x: 0.5,
|
|
136
136
|
y: 0.5,
|
|
137
137
|
height: 1.0,
|
|
138
|
-
width: 1.0
|
|
138
|
+
width: 1.0,
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
return result;
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
//# sourceMappingURL=parseSource.js.map
|
|
144
144
|
});
|
|
145
145
|
|
|
146
146
|
unwrapExports(parseSource_1);
|
|
@@ -182,7 +182,8 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
|
|
|
182
182
|
['crop', 'crop'],
|
|
183
183
|
['saturation', 'sat'],
|
|
184
184
|
['auto', 'auto'],
|
|
185
|
-
['dpr', 'dpr']
|
|
185
|
+
['dpr', 'dpr'],
|
|
186
|
+
['pad', 'pad'],
|
|
186
187
|
];
|
|
187
188
|
function urlForImage(options) {
|
|
188
189
|
var spec = __assign({}, (options || {}));
|
|
@@ -201,7 +202,7 @@ function urlForImage(options) {
|
|
|
201
202
|
left: cropLeft,
|
|
202
203
|
top: cropTop,
|
|
203
204
|
width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
|
|
204
|
-
height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
|
|
205
|
+
height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
|
|
205
206
|
};
|
|
206
207
|
// Compute hot spot rect in terms of pixel coordinates
|
|
207
208
|
var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
|
|
@@ -212,7 +213,7 @@ function urlForImage(options) {
|
|
|
212
213
|
left: hotSpotCenterX - hotSpotHorizontalRadius,
|
|
213
214
|
top: hotSpotCenterY - hotSpotVerticalRadius,
|
|
214
215
|
right: hotSpotCenterX + hotSpotHorizontalRadius,
|
|
215
|
-
bottom: hotSpotCenterY + hotSpotVerticalRadius
|
|
216
|
+
bottom: hotSpotCenterY + hotSpotVerticalRadius,
|
|
216
217
|
};
|
|
217
218
|
// If irrelevant, or if we are requested to: don't perform crop/fit based on
|
|
218
219
|
// the crop/hotspot.
|
|
@@ -294,7 +295,7 @@ function fit(source, spec) {
|
|
|
294
295
|
left: Math.round(left),
|
|
295
296
|
top: Math.round(top_2),
|
|
296
297
|
width: Math.round(width),
|
|
297
|
-
height: Math.round(height)
|
|
298
|
+
height: Math.round(height),
|
|
298
299
|
};
|
|
299
300
|
}
|
|
300
301
|
else {
|
|
@@ -316,21 +317,21 @@ function fit(source, spec) {
|
|
|
316
317
|
left: Math.max(0, Math.floor(left)),
|
|
317
318
|
top: Math.max(0, Math.floor(top_3)),
|
|
318
319
|
width: Math.round(width),
|
|
319
|
-
height: Math.round(height)
|
|
320
|
+
height: Math.round(height),
|
|
320
321
|
};
|
|
321
322
|
}
|
|
322
323
|
return {
|
|
323
324
|
width: imgWidth,
|
|
324
325
|
height: imgHeight,
|
|
325
|
-
rect: cropRect
|
|
326
|
+
rect: cropRect,
|
|
326
327
|
};
|
|
327
328
|
}
|
|
328
|
-
|
|
329
|
+
//# sourceMappingURL=urlForImage.js.map
|
|
329
330
|
});
|
|
330
331
|
|
|
331
332
|
unwrapExports(urlForImage_1);
|
|
332
|
-
|
|
333
|
-
|
|
333
|
+
urlForImage_1.parseSource;
|
|
334
|
+
urlForImage_1.SPEC_NAME_TO_URL_NAME_MAPPINGS;
|
|
334
335
|
|
|
335
336
|
var builder = createCommonjsModule(function (module, exports) {
|
|
336
337
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
@@ -356,7 +357,7 @@ var urlForImage_1$1 = __importStar(urlForImage_1);
|
|
|
356
357
|
var validFits = ['clip', 'crop', 'fill', 'fillmax', 'max', 'scale', 'min'];
|
|
357
358
|
var validCrops = ['top', 'bottom', 'left', 'right', 'center', 'focalpoint', 'entropy'];
|
|
358
359
|
var validAutoModes = ['format'];
|
|
359
|
-
function
|
|
360
|
+
function isSanityClientLike(client) {
|
|
360
361
|
return client ? typeof client.clientConfig === 'object' : false;
|
|
361
362
|
}
|
|
362
363
|
function rewriteSpecName(key) {
|
|
@@ -373,13 +374,14 @@ function rewriteSpecName(key) {
|
|
|
373
374
|
function urlBuilder(options) {
|
|
374
375
|
// Did we get a SanityClient?
|
|
375
376
|
var client = options;
|
|
376
|
-
if (
|
|
377
|
+
if (isSanityClientLike(client)) {
|
|
377
378
|
// Inherit config from client
|
|
378
|
-
var _a = client.clientConfig,
|
|
379
|
+
var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
|
|
380
|
+
var apiHost = apiUrl || 'https://api.sanity.io';
|
|
379
381
|
return new ImageUrlBuilder(null, {
|
|
380
382
|
baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
|
|
381
383
|
projectId: projectId,
|
|
382
|
-
dataset: dataset
|
|
384
|
+
dataset: dataset,
|
|
383
385
|
});
|
|
384
386
|
}
|
|
385
387
|
// Or just accept the options as given
|
|
@@ -392,7 +394,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
392
394
|
? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
|
|
393
395
|
}
|
|
394
396
|
ImageUrlBuilder.prototype.withOptions = function (options) {
|
|
395
|
-
var baseUrl = options.baseUrl ||
|
|
397
|
+
var baseUrl = options.baseUrl || this.options.baseUrl;
|
|
396
398
|
var newOptions = { baseUrl: baseUrl };
|
|
397
399
|
for (var key in options) {
|
|
398
400
|
if (options.hasOwnProperty(key)) {
|
|
@@ -486,7 +488,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
486
488
|
ImageUrlBuilder.prototype.flipHorizontal = function () {
|
|
487
489
|
return this.withOptions({ flipHorizontal: true });
|
|
488
490
|
};
|
|
489
|
-
// Flip image
|
|
491
|
+
// Flip image vertically
|
|
490
492
|
ImageUrlBuilder.prototype.flipVertical = function () {
|
|
491
493
|
return this.withOptions({ flipVertical: true });
|
|
492
494
|
};
|
|
@@ -516,22 +518,26 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
516
518
|
}
|
|
517
519
|
return this.withOptions({ auto: value });
|
|
518
520
|
};
|
|
521
|
+
// Specify the number of pixels to pad the image
|
|
522
|
+
ImageUrlBuilder.prototype.pad = function (pad) {
|
|
523
|
+
return this.withOptions({ pad: pad });
|
|
524
|
+
};
|
|
519
525
|
// Gets the url based on the submitted parameters
|
|
520
526
|
ImageUrlBuilder.prototype.url = function () {
|
|
521
527
|
return urlForImage_1$1.default(this.options);
|
|
522
528
|
};
|
|
523
|
-
//
|
|
529
|
+
// Alias for url()
|
|
524
530
|
ImageUrlBuilder.prototype.toString = function () {
|
|
525
531
|
return this.url();
|
|
526
532
|
};
|
|
527
533
|
return ImageUrlBuilder;
|
|
528
534
|
}());
|
|
529
535
|
exports.ImageUrlBuilder = ImageUrlBuilder;
|
|
530
|
-
|
|
536
|
+
//# sourceMappingURL=builder.js.map
|
|
531
537
|
});
|
|
532
538
|
|
|
533
539
|
unwrapExports(builder);
|
|
534
|
-
|
|
540
|
+
builder.ImageUrlBuilder;
|
|
535
541
|
|
|
536
542
|
var node = createCommonjsModule(function (module) {
|
|
537
543
|
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
@@ -539,7 +545,7 @@ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || func
|
|
|
539
545
|
};
|
|
540
546
|
var builder_1 = __importDefault(builder);
|
|
541
547
|
module.exports = builder_1.default;
|
|
542
|
-
|
|
548
|
+
//# sourceMappingURL=index.js.map
|
|
543
549
|
});
|
|
544
550
|
|
|
545
551
|
var imageUrlBuilder = unwrapExports(node);
|