DDG.Data.Experiments = { about_module: { versions: ["v35-1", "v35-2", "v35-3", "v35-4", "v36-7", "v37-1", "v37-2", "v37-3"], variants: ["a", "b"] }, stack_overflow: { versions: ["v35-5", "v35-6", "v35-7", "v36-1", "v36-2", "v36-3"], variants: ["a", "b"] }, spelling: { versions: ["v33-6", "v33-7", "v34-1", "v34-2", "v34-3"], variants: ["a", "b"] }, region_override: { versions: ["v38-2", "v38-3", "v38-4", "v38-5", "v38-6", "v38-7", "v39-1", "v39-2"], variants: ["a", "b"] }, control: { versions: ["v39-3", "v39-4", "v39-5", "v39-6", "v39-7", "v40-1", "v40-2", "v40-3", "v40-4", "v40-5", "v40-6", "v40-7"], variants: ["a", "b"] }, filter_label: { versions: ["v41-1", "v41-2", "v41-3", "v41-4", "v41-5", "v41-6", "v41-7"], variants: ["a", "b", "c", "d"] }, filters_above_organics: { versions: ["v42-1", "v42-2", "v42-3", "v42-4", "v42-5", "v42-6", "v42-7"], variants: ["a", "b", "c", "d"] }, organic_ux: { versions: ["v44-1", "v44-2", "v44-3", "v44-4", "v44-5", "v44-6", "v44-7"], variants: ["a", "b", "c", "d", "e"], locale: "en_us" }, static_news: { versions: ["v47-6", "v47-7", "v48-1", "v48-2", "v48-3", "v48-4", "v48-5"], variants: ["a", "b"] }, control2: { versions: ["v51-2", "v51-3", "v51-4", "v51-5"], variants: ["a", "b"] }, safe_search_filter: { versions: ["v52-1", "v52-2", "v52-3", "v52-4", "v52-5", "v52-6", "v52-7"], variants: ["a", "b"] }, map_module: { versions: ["v57-1", "v57-2", "v57-3", "v57-4", "v57-5", "v57-6", "v57-7"], variants: ["a", "b"], locale: "en_us" }, images_ux: { versions: ["v58-1"], variants: ["a", "b"] }, images_ux_detail: { versions: ["v58-6", "v58-7"], variants: ["a", "b"] }, images_ux_filters: { versions: ["v59-1", "v59-2", "v59-3"], variants: ["a", "b"], englishOnly: true }, placeholder_delay: { versions: ["v61-1", "v61-2", "v61-3"], variants: ["a", "b"] }, back_button: { versions: ["v63-1", "v63-2", "v63-3", "v63-4", "v63-5", "v63-6"], variants: ["a", "b"] }, fixed_ux_header: { versions: ["v64-3", "v64-4", "v64-5", "v64-6", "v64-7"], variants: ["a", "b"] }, ad_layouts: { versions: ["v66-1", "v66-2", "v66-3", "v66-4", "v66-5", "v66-6", "v66-7", "v67-1"], variants: ["a", "b", "c"] }, ad_layouts_2: { versions: ["v67-2", "v67-3", "v67-4", "v67-5", "v67-6", "v67-7"], variants: ["b", "c"] }, serp_ui: { versions: ["v88-3", "v88-4", "v88-5", "v88-6", "v88-7", "v89-1", "v89-2", "v89-3", "v89-4"], variants: ["q", "r"], platformName: "androidwos" }, chrome_desktop_us_portableapps_control: { versions: ["v121-2", "v121-3", "v121-4", "v121-5", "v121-6", "v121-7", "v122-1", "v122-2", "v122-3", "v122-4", "v122-5", "v122-6", "v122-7"], variants: ["o"], locale: "en_us", desktopOnly: true, displayBrowserName: "Chrome" }, serp_show_hide_bolding: { versions: ["v124-1", "v124-2", "v124-3", "v124-4", "v124-5", "v124-6", "v124-7", "v125-1", "v125-2", "v125-3", "v125-4"], variants: ["a", "b", "c"] }, green_urls: { versions: ["v127-1", "v127-2", "v127-3", "v127-4", "v127-5", "v127-6", "v127-7", "v128-1"], variants: ["a", "b", "c", "d"] }, chrome_desktop_store_install_en: { allocation: [0.5, 1], variants: ["e", "f"], desktopOnly: true, englishOnly: true, atb: true, active: false, displayBrowserName: "Chrome", canInstallExtension: true }, chrome_desktop_store_install_non_en: { allocation: [0.5, 1], variants: ["g", "h"], desktopOnly: true, nonEnglishOnly: true, atb: true, active: false, displayBrowserName: "Chrome", canInstallExtension: true }, serp_footer: { versions: ["v129-6", "v129-7", "v130-1", "v130-2", "v130-3", "v130-4", "v130-5", "v130-6"], englishOnly: true, desktopOnly: true, variants: ["e", "f"] }, safe_search_moderate_default: { versions: ["v136-2", "v136-3", "v136-4", "v136-5", "v136-6", "v136-7", "v137-1", "v137-2"], variants: ["a", "b"] }, region_toggle_default: { versions: ["v140-2", "v140-3", "v140-4", "v140-5", "v140-6", "v140-7", "v141-1", "v141-2", "v141-3"], variants: ["a", "b"], desktopOnly: true }, deemphasize_http_links: { versions: ["v143-7", "v144-1", "v144-2", "v144-3", "v144-4", "v144-5", "v144-6"], variants: ["a", "b", "c"] }, no_ads: { versions: ["v148-2", "v148-3", "v148-4", "v148-5", "v148-6"], variants: ["a", "b"], desktopOnly: true }, fonts: { versions: ["v154-1", "v154-2", "v154-3", "v154-4", "v154-5", "v154-6"], variants: ["a", "b"], mobileAppVariants: { sa: "a", sb: "b", sc: "a", sd: "b" } }, ui_updates: { pixelId: "uiu", versions: ["v155-1", "v155-2", "v155-3", "v155-4", "v155-5", "v155-6", "v155-7", "v156-1", "v156-2", "v156-3", "v156-4", "v156-5", "v156-6", "v156-7"], variants: ["a", "b"], mobileAppVariants: { sa: "a", sb: "b", sc: "a", sd: "b" } }, post_install_onboarding: { versions: ["v157-1", "v157-2", "v157-3", "v157-4", "v157-5", "v157-6", "v157-7"], variants: ["a", "b"], desktopOnly: true }, regions_toggle_exp: { pixelId: "rtl", versions: ["v158-1", "v158-2", "v158-3", "v158-4", "v158-5", "v158-6", "v158-7", "v159-1", "v159-2", "v159-3", "v159-4", "v159-5", "v159-6", "v159-7"], variants: ["a", "b"], countries: ["DE", "FR", "PL", "CA", "IT", "ES", "AU", "BR", "NL", "GB", "ID"], desktopOnly: true }, welcome_message: { pixelId: "wcm", versions: ["v163-1", "v163-2", "v163-3", "v163-4", "v163-5", "v163-6"], variants: ["a", "b"], desktopOnly: true, englishOnly: true }, less_prominent_answerbar: { pixelId: "lpab", versions: ["v163-7", "v164-1", "v164-2", "v164-3", "v164-4", "v164-5", "v164-6"], variants: ["a", "b"], desktopOnly: true }, settings_dropdown: { pixelId: "sdd", versions: ["v165-3", "v165-4", "v165-5", "v165-6", "v165-7", "v166-1", "v166-2"], variants: ["a", "b", "c"], desktopOnly: true, englishOnly: true }, welcome_message_2: { pixelId: "wcm2", versions: ["v166-3", "v166-4", "v166-5", "v166-6", "v166-6", "v167-1"], variants: ["a", "b"], desktopOnly: true, englishOnly: true }, homepage_landing: { allocation: [0.033, 0.066, 0.1], variants: ["a", "b", "c"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true, defaultThemeOnly: true, stickyAtbVariant: true }, homepage_fullbleed_landing: { allocation: [0, 0.2, 0.4], variant: "g", variants: ["x", "w"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true, defaultThemeOnly: true, minScreenSize: { width: 800, height: 600 }, filter: function() { return window.locale !== "en_GB" } }, homepage_fullbleed_regional_landing: { allocation: [0, 1], variant: "g", variants: ["y"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true, defaultThemeOnly: true, minScreenSize: { width: 800, height: 600 }, filter: function() { return window.locale === "en_GB" } }, welcome_message_3: { pixelId: "wcm3", versions: ["v168-1", "v168-2", "v168-3", "v168-4", "v168-5", "v168-6", "v168-7"], variants: ["a", "b", "c", "d"], desktopOnly: true, englishOnly: true }, extension_optin: { versions: ["v169-3", "v169-4", "v169-5", "v169-6", "v169-7", "v170-1", "v170-2", "v170-3", "v170-4", "v170-5"], allocation: [0.5, 1], variants: ["k", "l"], desktopOnly: true, englishOnly: true, canInstallExtension: true }, mobile_cards: { pixelId: "mcds", versions: ["v169-2", "v169-3", "v169-4", "v169-5", "v169-6", "v169-7", "v170-1", "v170-7", "v171-1", "v171-2"], variants: ["a", "b"], appsOnly: true, displayBrowserName: "DDG iPhone", mobileAppVariants: { sc: "a", se: "b" } }, ct_retention_exp: { pixelId: "ctexp", versions: ["v174-7", "v175-1", "v175-2", "v175-3", "v175-4", "v175-5", "v175-6", "v175-7"], variants: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], countries: ["AT", "AU", "BE", "BR", "CA", "CH", "DE", "DK", "ES", "FI", "FR", "GB", "ID", "IE", "IN", "IT", "JP", "MX", "NL", "NO", "NZ", "PL", "RU", "SE", "SG", "US"], desktopOnly: true }, post_install_homepage: { pixelId: "pih", versions: ["v177-3", "v177-4", "v177-5", "v177-6", "v177-7", "v178-1"], variants: ["a", "b"], desktopOnly: true, englishOnly: true, canInstallExtension: true, defaultThemeOnly: true, minScreenSize: { width: 900, height: 600 } }, mixed_modules: { variants: ["a", "b"], pixelId: "miaexp", versions: ["v192-7", "v193-1", "v193-2", "v193-3", "v193-4", "v193-5", "v193-6", "v193-7"], mobileAppVariants: { sc: "a", se: "b" } }, mobile_cards_refinements: { variants: ["a", "b", "c"], pixelId: "crdexp", versions: ["v203-2", "v203-3", "v203-4", "v203-5", "v203-6", "v203-7", "v204-1"], mobileAppVariants: { sc: "a", sd: "b", se: "c" } }, autocomplete_delay: { variants: ["a", "b"], pixelId: "acdexp", versions: ["v208-3", "v208-4", "v208-5", "v208-6", "v208-7", "v209-1"] }, organic_atb_measure: { allocation: [0, 0.1], variant: "r", variants: ["z"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true }, mobile_header: { pixelId: "mhdr", versions: ["v211-4", "v211-5", "v211-6", "v211-7", "v212-1", "v212-2", "v212-3"], variants: ["a", "b"], appsOnly: true, mobileAppVariants: { sc: "a", se: "b" } }, home_brand_messaging: { allocation: [0, 0.1, 0.2], variants: ["a", "d"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true, defaultThemeOnly: true, minScreenSize: { width: 800, height: 600 } }, dynamic_slotting: { pixelId: "sltret", versions: ["v213-2", "v213-3", "v213-4", "v213-5", "v213-6", "v213-7", "v214-1", "v214-2"], variants: ["a", "b"], mobileAppVariants: { sc: "a", se: "b" } }, privacy_nudge: { allocation: [0.3, 0.5, 0.7], variant: "r", variants: ["y", "z"], desktopOnly: true, englishOnly: true, atb: true, active: false, canInstallExtension: true, displayBrowserName: "Chrome" }, ct_test: { pixelId: "cttest", versions: ["v217-2", "v217-3"], variants: ["a", "b"] }, larger_extension_tracker_list: { allocation: [0.3, 0.5, 0.7], variant: "l", variants: ["m", "n"], desktopOnly: true, atb: true, active: false, canInstallExtension: true }, desktop_mobile_app_promo: { allocation: [0, 0.2, 0.4, 0.8], variant: "p", variants: ["v", "w", "x"], desktopOnly: true, englishOnly: true, trap: true, atb: true, active: false, canInstallExtension: true, displayBrowserName: "Chrome" }, cross_product_promotion_mobile: { allocation: [0.6, 0.7, 0.8, 0.9, 1], variant: "x", variants: ["u", "z", "m", "n"], mobileOnly: true, englishOnly: true, atb: true, active: false, trap: true, stickyAtbVariant: true, displayBrowserName: "Safari", filter: function(a) { return (a.device.isSafari && a.device.isEnglish && a.device.isIOS8p && !a.device.isIPad) } }, msh2exp: { variants: ["a", "b"], versions: ["v234-7", "v235-1", "v235-2", "v235-3", "v235-4", "v235-5", "v235-6"], pixelId: "msh2exp", appsOnly: true, mobileAppVariants: { sc: "a", se: "b" }, filter: function(a) { return a.device && a.device.isMobile } }, extension_fingerprint_protection_control: { allocation: [0.8, 0.9], variant: "c", variants: ["k"], active: true, atb: true, canInstallExtension: true }, extension_fingerprint_protection_exp: { allocation: [0.9, 1], variant: "f", variants: ["k"], active: true, atb: true, canInstallExtension: true }, default_region_toggle: { pixelId: "drt", versions: ["v236-2", "v236-3", "v236-4", "v236-5", "v236-6", "v236-7", "v237-1", "v237-2", "v237-3", "v237-4", "v237-5", "v237-6", "v238-7"], variants: ["a", "b"], countries: ["AU", "AT", "DK", "FI", "FR", "DE", "IT", "IE", "NZ", "NO", "ES", "SE", "GB"] } }; DDG.Data.Onboarding = { _: {}, a: { description: "UrbanDictionary campaign 1", variant: "z", urbanDictionaryLandingPage: true }, b: {}, c: { description: "UrbanDictionary campaign 2", variant: "z", urbanDictionaryLandingPage: true }, d: { description: "UrbanDictionary campaign 3", variant: "z", urbanDictionaryLandingPage: true }, e: { description: "UrbanDictionary campaign 4", variant: "z", urbanDictionaryLandingPage: true }, f: {}, g: {}, h: {}, i: {}, j: {}, k: { description: "UrbanDictionary campaign 7", variant: "z", urbanDictionaryLandingPage: true }, l: { description: "UrbanDictionary campaign 8", variant: "z", urbanDictionaryLandingPage: true }, m: { description: "UrbanDictionary campaign 9", variant: "z", urbanDictionaryLandingPage: true }, n: { description: "UrbanDictionary campaign 10", variant: "z", urbanDictionaryLandingPage: true }, o: { description: "UrbanDictionary campaign 11", variant: "z", urbanDictionaryLandingPage: true }, p: { description: "UrbanDictionary campaign 12", variant: "z", urbanDictionaryLandingPage: true }, q: { description: "UrbanDictionary campaign 13", variant: "z", urbanDictionaryLandingPage: true }, r: { description: "UrbanDictionary campaign 14", variant: "z", urbanDictionaryLandingPage: true }, s: { description: "UrbanDictionary campaign 15", variant: "z", urbanDictionaryLandingPage: true }, t: {}, u: { description: "PortableApps One Button Modal", modalButtons: 1 }, v: { description: "Youtube Video Campaign" }, w: {}, x: { description: "Youtube Video Campaign" }, y: {}, z: { description: "Pagefair 2", variant: "y", urbanDictionaryLandingPage: true } }; DDG.Data.Apps = { isIPhone: "https://itunes.apple.com/us/app/id663592361?mt=8", isAndroid: "market://details?id=com.duckduckgo.mobile.android" }; ! function(a) { a.Data.Homepage = { queries: [{ href: "/?q=tilt+shift+images&ia=images", label: "tilt shift images" }, { href: "/?q=thailand+beach+images&ia=images", label: "thailand beach images" }, { href: "/?q=gopro+videos&ia=videos", label: "gopro videos" }, { href: "/?q=jimmy+fallon+videos&ia=videos", label: "jimmy fallon videos" }, { href: "/?q=weather+in+encinitas&ia=weather", label: "weather in encinitas" }, { href: "/?q=weather+in+paris&ia=weather", label: "weather in paris" }, { href: "/?q=sorbet+recipes&ia=recipes", label: "sorbet recipes" }, { href: "/?q=tilapia+recipes&ia=recipes", label: "tilapia recipes" }, { href: "/?q=thai+food+in+San+Francisco&ia=places", label: "thai food in San Francisco" }, { href: "/?q=bars+near+me", label: "bars near me" }, { href: "/?q=katz%27s+deli+new+york&ia=places", label: "katz's deli new york" }, { href: "/?q=orange&ia=meanings", label: "orange" }, { href: "/?q=daft+punk+soundcloud&ia=soundcloud", label: "daft punk soundcloud" }, { href: "/?q=8oz+to+grams&ia=answer", label: "8oz to grams" }, { href: "/?q=define+superlative&ia=definition", label: "define superlative" }, { href: "/?q=people+in+space&ia=answer", label: "people in space" }] } }(DDG); DDG.Data.StaticIAs = [{ id: "images", name: "Images", type: "static", answerType: "Images", meta: { idField: "image", itemType: l("Images"), linkPrimaryText: 1, autoExpand: 0, developer: [{ name: "DDG Team" }], signal_from: "images" }, parameters: [{ key: "size", values: [{ id: "", name: lp("size", "All Sizes") }, { id: "Small", name: lp("size", "Small") }, { id: "Medium", name: lp("size", "Medium") }, { id: "Large", name: lp("size", "Large") }, { id: "Wallpaper", name: lp("size", "Wallpaper") }] }, { key: "type", values: [{ id: "", name: lp("image-type", "All Types") }, { id: "photo", name: lp("image-type", "Photograph") }, { id: "clipart", name: lp("image-type", "Clipart") }, { id: "gif", name: lp("image-type", "Animated GIF") }, { id: "transparent", name: lp("image-type", "Transparent") }] }, { key: "layout", values: [{ id: "", name: lp("image-layout", "All Layouts") }, { id: "Square", name: lp("image-layout", "Square") }, { id: "Tall", name: lp("image-layout", "Tall") }, { id: "Wide", name: lp("image-layout", "Wide") }] }, { key: "color", values: [{ id: "", name: lp("image-color", "All Colors") }, { id: "color", name: lp("image-color", "Color Only") }, { id: "Monochrome", name: lp("image-color", "Black and White") }, { id: "Red", name: lp("color", "Red") }, { id: "Orange", name: lp("color", "Orange") }, { id: "Yellow", name: lp("color", "Yellow") }, { id: "Green", name: lp("color", "Green") }, { id: "Blue", name: lp("color", "Blue") }, { id: "Purple", name: lp("color", "Purple") }, { id: "Pink", name: lp("color", "Pink") }, { id: "Brown", name: lp("color", "Brown") }, { id: "Black", name: lp("color", "Black") }, { id: "Gray", name: lp("color", "Gray") }, { id: "Teal", name: lp("color", "Teal") }, { id: "White", name: lp("color", "White") }] }], sources: [{ id: "ddg", name: "DuckDuckGo", requeryURL: "/i.js?l=" + window.rl + "&o=json&q=" }], region: true, safeSearch: true, templates: DDG.Data.templates.groups.images, deferredURL: "/i.js?l=" + window.rl + "&o=json&q=", allowModuleIA: true, isFullPage: true, supportsInfiniteScroll: true }, { id: "videos", name: "Videos", model: "Video", type: "static", parameters: [{ key: "publishedAfter", values: [{ id: "", name: l("Any Time") }, { id: "d", name: l("Past Day") }, { id: "w", name: l("Past Week") }, { id: "m", name: l("Past Month") }] }, { key: "videoDefinition", values: [{ id: "", name: lp("video-resolution", "Any Resolution") }, { id: "high", name: lp("video-resolution", "High Definition") }, { id: "standard", name: lp("video-resolution", "Standard Definition") }] }, { key: "videoDuration", showDescriptions: true, values: [{ id: "", name: lp("video-duration", "Any Duration"), description: lp("video-duration", "Show videos of any length") }, { id: "short", name: lp("video-duration", "Short"), description: lp("video-duration", "Less than 4 minutes") }, { id: "medium", name: lp("video-duration", "Medium"), description: lp("video-duration", "Between 4 and 20 minutes") }, { id: "long", name: lp("video-duration", "Long"), description: lp("video-duration", "More than 20 minutes") }] }, { key: "videoLicense", values: [{ id: "", name: lp("video-license", "Any License") }, { id: "creativeCommon", name: lp("video-license", "Creative Commons") }, { id: "youtube", name: lp("video-license", "YouTube Standard") }] }], sources: [{ id: "ddg", name: "DuckDuckGo", requeryURL: "/v.js?l=" + window.rl + "&o=json&sr=1&q=" }], region: true, safeSearch: true, meta: { idField: "id", itemType: l("Videos"), developer: [{ name: "DDG Team" }], signal_from: "videos", linkPrimaryText: 1, autoExpand: 0, detailOverlay: "VideoDetailOverlay", primaryText: l("Videos") }, templates: DDG.Data.templates.groups.videos, deferredURL: "/v.js?l=" + window.rl + "&o=json&sr=1&q=", allowModuleIA: true, moreText: l("More Videos"), isFullPage: true, supportsInfiniteScroll: true }, { id: "news", name: "News", answerType: "News", moreText: l("More News"), type: "static", meta: { developer: [{ name: "DDG Team" }], signal_from: "news", itemType: l("News Articles"), rerender: ["image"], primaryText: l("Recent News") }, safeSearch: true, region: true, date: true, allowVertical: true, isFullPage: true, templates: { item: "news_item" }, deferredURL: function() { return "/news.js?l=" + window.rl + "&o=json&noamp=" + (DDG.device.isDesktop ? 1 : 0) + "&q=" }, experimentalDeferredURL: "/news.js?l=" + window.rl + "&o=json&exp=1&q=" }]; ! function(a) { a.Data.HiddenFields = { DATE_FILTER: "df", DATE_SORT: "ds", IA_REQUERY: "iar" } }(DDG); ! function(a) { var b = a.Models; b.Base = function(c) { this.setMaxListeners(500); $.extend(this, c) }; b.Base.prototype = $.extend({}, EventEmitter2.prototype, a.Utils.Events, { set: function(c, i, f) { if (typeof c === "object") { for (var e in c) { this.set(e, c[e], i) } } f = f || {}; var h = this[c], g = h !== i; this[c] = i; !f.silent && g && this._emitChange(c, h) }, clear: function(c, e) { this.set(c, null, e) }, UUID: function() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(g) { var f = Math.random() * 16 | 0, e = g == "x" ? f : (f & 3 | 8); return e.toString(16) }) }, getInstance: function(c) { if (!this["_" + c]) { this["_" + c] = a[c] } return this["_" + c] }, _emitChange: function(c, e) { var f = this[c]; this.emit("change:" + c, f, e); this.emit("change", c, f, e) } }) }(DDG); ! function(m) { var b = m.Models.Base, c, p = 1440, o = 1079, n = 864, g = 590, j = 425, i = [{ id: "xl", width: p }, { id: "l", width: o }, { id: "m", width: n }, { id: "s", width: g }, { id: "xs", width: j }], f = { xl: 94, l: 94, m: 58, s: 0, xs: 0 }, e = j, a = g, h = Math.ceil(g * 1.25); m.Models.Device = c = function(y) { b.call(this, y); this.isEnglish = window.locale && window.locale.substring(0, 2) === "en"; var q = this.ua, z = y.host || window.location.host; this.isEdge = !!/edge\//.test(q); this.isEdgeChromium = !!/edg\//.test(q); this.isEdgeMobile = !!/(edgios|edga)/.test(q); if (!(this.isEdge || this.isEdgeChromium)) { this.isIE = !!document.all; this.isIE9 = !!/msie 9/.test(q); this.isIE10p = !!/msie 1[0123456789]/.test(q); this.isIE11p = !!(/trident\/[789]/.test(q) || /edge\/[0123456789]/.test(q)); if (this.isIE10p || this.isIE11p) { this.isIE = true } } this.isWindowsPhone = !!/windows phone/.test(q); this.isSafari = !!(!this.isWindowsPhone && !this.isEdgeMobile && /\([windows|macintosh|ipad|iphone].* version.* safari/.test(q)); this.safariVersion = -1; if (this.isSafari) { var s = q.match(/version\/([0-9][0-9]?\.[0-9])/); this.safariVersion = (s) ? parseFloat(s[1]) : -1 } this.isWebkit = !!/webkit/.test(q); this.isYandex = !!/yabrowser/.test(q); this.isBeakerBrowser = !!/beakerbrowser/.test(q); this.isVivaldi = !!/vivaldi/.test(q); this.isBrave = !!navigator.brave && typeof navigator.brave.isBrave === "function" || (this.isIOS8p && this.isFirefox && /(\d{2}\.){3}\d{2}/.test(q)) || /brave chrome/.test(q); this.isChromiumBased = !!(/chrome(?!frame)|crios/.test(q) && !this.isIE && !this.isEdge); this.isChrome = !!(this.isChromiumBased && !this.isVivaldi && !this.isYandex && !/opr\/[0-9][0-9]?/.test(q) && !this.isBeakerBrowser && !this.isEdgeMobile && !this.isEdgeChromium && !this.isBrave); this.isFirefox = !!/firefox|fxios/.test(q); this.firefoxVersion = -1; if (this.isFirefox) { var x = q.match(/(firefox|fxios)\/([0-9]+\.[0-9]+)/); this.firefoxVersion = (x) ? parseFloat(x[2]) : -1 } this.isFirefox38AndUp = this.firefoxVersion > 37; this.isFirefox51AndUp = this.firefoxVersion > 50; this.isFirefoxLessThan57 = this.isFirefox && this.firefoxVersion < 57; this.isFirefoxLessThan67 = this.isFirefox && this.firefoxVersion < 67; this.isFirefox67 = this.isFirefox && (Math.floor(this.firefoxVersion) === 67); this.isFirefox68AndUp = this.isFirefox && this.firefoxVersion >= 68; this.isFirefoxFocus = !!/focus/.test(q); this.operaVersion = -1; this.isOpera = !!/opera/.test(q); if (this.isOpera) { var t = q.match(/version\/([0-9.]+)/); if (t) { this.operaVersion = parseFloat(t[1], 10) } } else { if (/opr\/[0-9][0-9]?/.test(q)) { this.operaVersion = parseInt(q.match(/opr\/([0-9][0-9]?)/)[1], 10) } } this.isOperaMini = !!/opera mini|opios/.test(q); this.isOperaMobile = !!/opera mobi/.test(q); this.isOSX = !!/mac os x [0-9]/.test(q); this.isOSXMavericksAndUp = !!/mac os x 10(_|\.)(1\d|9)/.test(q) || !!/mac os x 11(_|\.)[0-9]{1,2}/.test(q); this.isOSXCatalinaAndUp = !!/mac os x 10(_|\.)(1[5-9])/.test(q) || !!/mac os x 11(_|\.)[0-9]{1,2}/.test(q); this.isIPod = !!/ipod/.test(q); this.isIPadOS = (this.isOSX && navigator.maxTouchPoints); this.isIPad = !!(this.isIPadOS || /ipad/.test(q)); this.isIPhone = !!(!this.isWindowsPhone && /iphone/.test(q)); this.isIDevice = (this.isIPad || this.isIPhone || /\Wios\W/.test(q)); this.isIOS8p = !!((this.isIDevice && (this.isIPadOS || /os (8|9|[1-9][0-9])|os 10_10/.test(q)))); this.isIOS8pSafari = !!((this.isIOS8p && !this.isChrome && !this.isOperaMini && !this.isFirefox)); this.isAndroid = !!(!this.isWindowsPhone && /android/.test(q)); this.isLegacyAndroid = this.isAndroid && /android ([1-3](\..+)?|4(\.[0-2].*)?)(;|$)/.test(q); this.isAndroid4_3AndUp = this.isAndroid && !this.isLegacyAndroid; this.isBlackberry = !!/blackberry/.test(q); this.chromeVersion = -1; if (this.isChromiumBased) { var v = q.match(/(chrome|crios)\/([0-9][0-9]?)/); this.chromeVersion = (v) ? parseInt(v[2], 10) : -1 } this.isChrome31AndUpOnAndroid = !!(this.isAndroid && this.isChrome && this.chromeVersion > 30); this.isChrome48AndUp = !!(this.isChrome && this.chromeVersion > 47); this.isAndroidChromeNoOpenSearch = !!(this.isAndroid && this.isChrome && this.chromeVersion > 31 && this.chromeVersion < 57); this.isSilk = !!/silk/.test(q); this.isKonqueror = !!/konqueror/.test(q); this.isWindows = !!/windows/.test(q); this.isWindows10 = !!/windows nt 10/.test(q); this.isLinux = !!(!this.isAndroid && /linux/.test(q)); this.isOnion = !!z.match(/\.onion$/i); this.isDDGIgnore = !!/ddgignore/.test(q); this.isDDGTest = !!/ddgtest/.test(q); this.isSamsung = !!/samsungbrowser/.test(q); this.isDDGApp = !!(y.qs && y.qs.match(/(\&|\?)t\=(ddg_ios|ddg_android)/)) || /DuckDuckGo\/[57]$/i.test(q); this.isUCBrowser = !!/(ucbrowser)/.test(q); this.isUCBrowserIOS = this.isUCBrowser && this.isIPhone; this.isRetina = is_retina = this.dpr > 1; this.is2x = m.is2x = this.dpr > 1; this.is3x = m.is3x = this.dpr > 2; this.hasFixedHeaderSupport = !this.isIDevice; this.isAppleDevice = this.isIDevice || this.isOSX; if (this.isIDevice) { if (this.isChrome) { this.hasFixedHeaderSupport = this.chromeVersion >= 57 } else { if (this.isFirefox) { this.hasFixedHeaderSupport = this.firefoxVersion >= 7.2 } else { if (this.isUCBrowserIOS) { this.hasFixedHeaderSupport = false } else { this.hasFixedHeaderSupport = this.isIOS8pSafari } } } } var u = "Browser"; if (this.isDDGIgnore) { u = "Ignore" } else { if (/seamonkey/.test(q)) { u = "SeaMonkey" } else { if (/iceape/.test(q)) { u = "Iceape" } else { if (/palemoon/.test(q)) { u = "PaleMoon" } else { if (this.isBrave) { u = "Brave" } else { if (this.isSamsung) { u = "Samsung Internet" } else { if (this.isFirefox) { u = "Firefox" } else { if (/opr\//.test(q) || ((this.isAndroid || this.isIDevice) && (this.isOperaMobile || this.isOperaMini || this.operaVersion !== -1))) { u = "Opera" } else { if (this.isFirefoxFocus) { u = "Focus" } else { if (this.isUCBrowser) { u = "UC Browser" } else { if (this.isEdge || this.isEdgeChromium || this.isEdgeMobile) { u = "Edge" } else { if (this.isAndroid) { u = "Android" } else { if (/xbox/.test(q)) { u = "xBox" } else { if (/midori/.test(q)) { u = "Midori" } else { if (/maxthon/.test(q)) { u = "Maxthon" } else { if (this.isYandex) { u = "Yandex" } else { if (/vivaldi/.test(q)) { u = "Vivaldi" } else { if (this.isChrome) { u = "Chrome" } else { if (/fennec/.test(q)) { u = "Fennec" } else { if (/epiphany/.test(q)) { u = "Epiphany" } else { if (this.isFirefox) { u = "Firefox" } else { if (/uzbl/.test(q)) { u = "Uzbl" } else { if (this.isIE && navigator.platform === "Win64" && !k() && Modernizr.touch && document.documentElement.clientWidth == screen.width) { u = "IEMetro" } else { if (this.isIE) { u = "IE" } else { if (this.isOpera) { u = "Opera" } else { if (this.isIPad) { u = "iPad" } else { if (this.isIPhone) { u = "iPhone" } else { if (/arora/.test(q)) { u = "Arora" } else { if (this.isSafari) { u = "Safari" } else { if (this.isKonqueror) { u = "Konqueror" } else { if (this.isBlackberry) { u = "Blackberry" } else { if (/phantomjs/.test(q)) { u = "PhantomJS" } else { if (this.isIDevice) { u = "iOS" } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } if (this.isDDGApp) { u = "DDG " + u } this.browserName = m.browserName = u; this.pixelBrowserName = (this.isUCBrowser) ? "ucbrowser" : u.toLowerCase(); this.pixelPlatformName = this._getPixelPlatformName(); this.pixelBrowserVersion = this._getPixelBrowserVersion(); this.displayBrowserName = this.browserName; if (u === "IEMetro") { this.displayBrowserName = "IE" } else { if (u === "iPhone" || u === "iPad") { this.displayBrowserName = "Safari" } else { if (u === "Android") { this.displayBrowserName = "Chrome" } } } this._updateScreenSize(); this._updateIsMobileDevice(); this.isSafariWithNativeDDG = this._isSafariWithNativeDDG(); this.isFirefoxWithNativeDDG = this._isFirefoxWithNativeDDG(); if ((this.isIPhone && !this.isIPod) || (/mac os x 10[_.]1\d/.test(this.ua)) || (this.isAndroid && /mobile/.test(this.ua) && (this.isChrome || this.isFirefox || this.isEdgeMobile || this.isUCBrowser)) || this.isWindowsPhone || this.isBlackberry) { this.canMakePhoneCalls = true } else { this.canMakePhoneCalls = false } if (this.isMobileDevice && this.browserName === "Firefox") { if (screen.width && screen.width < this.width) { this.width = viewport_width = screen.width } if (screen.height && screen.height < this.height) { this.height = viewport_height = screen.height } this._updateIsMobileDevice() } var r = (this.width < 600 || (this.width < 800 && this.height < 500)) ? 1 : 0; if (r !== this.isMobile) { this.isMobile = is_mobile = r; this.emit("changed:mobile") } this.isDesktop = !this.isMobile && !this.isMobileDevice; this.hasMetaReferrerSupport = !!((this.chromeVersion > 20 && !this.isMobileDevice) || (this.chromeVersion >= 50) || (this.safariVersion > 7 && !this.isWindows && !this.isMobileDevice) || (this.isIOS8pSafari || (this.safariVersion >= 8 && this.isIDevice)) || (this.operaVersion > 14 && !this.isMobileDevice) || this.isFirefox38AndUp || (this.isIOS8p && this.isFirefox) || this.isBrave || this.isUCBrowser); this.$scrollDoc = $("html,body"); this.pixelId = (this.isMobile || this.isMobileDevice) ? "m" : "d"; if (this.isMobileDevice) { this._wasPortrait = this.isMobilePortrait() } window.onresize = $.throttle(200, this._onResize.bind(this)); window.onscroll = this._onScroll.bind(this); if (typeof document.hidden !== "undefined") { this._visibilityChange = "visibilitychange"; this._visibilityState = "visibilityState" } else { if (typeof document.mozHidden !== "undefined") { this._visibilityChange = "mozvisibilitychange"; this._visibilityState = "mozVisibilityState" } } if (this._visibilityChange) { d.addEventListener(this._visibilityChange, this._onVisibilityChange.bind(this), false) } }; c.prototype = $.extend({}, b.prototype, { scrollTop: function(s, r, q) { if (typeof s === "undefined") { if (typeof this._scrollTop !== "undefined") { return this._scrollTop } return this._scrollTop = m.$doc.scrollTop() } if (s === this.scrollTop()) { if (q) { q() } return this._scrollTop = s } if (r && !$.isNumeric(r)) { r = m.animation_speed } if (!r) { this.$scrollDoc.scrollTop(s); if (q) { q() } } else { this.$scrollDoc.animate({ scrollTop: s }, r, q) } return this._scrollTop = s }, getBrowserMoreURL: function() { var q = "https://help.duckduckgo.com/desktop/"; if (this.isChrome) { return q + "chrome" } else { if (this.isOpera) { return q + "opera" } else { if (this.isSafari && !this.isSafariWithNativeDDG) { return q + "safari" } else { if (this.browserName === "SeaMonkey") { return "https://addons.mozilla.org/seamonkey/addon/duckduckgo-ssl/" } else { if (this.isFirefox) { return q + "firefox" } } } } } }, canAddToBrowser: function() { var q = this.getAddToBrowserDirections(); return q.useForSearch || q.setAsHomepage }, getAddToBrowserDirections: function() { if (this._addToBrowserDirections) { return this._addToBrowserDirections } var q = this.browserName, s, r; if (!this._hasInstallationInstructions()) { return this._addToBrowserDirections = {} } if (q === "IE") { r = "ie" } else { if (q === "SeaMonkey") { r = "seamonkey" } else { if (q === "PaleMoon") { r = "palemoon" } else { if (m.addToBrowser.canAddToBraveIOS()) { r = "brave_ios" } else { if (m.addToBrowser.canAddToMobileFirefox() && this.isAndroid) { r = "firefox_android" } else { if (m.addToBrowser.canAddToMobileFirefox() && this.isIDevice) { r = "firefox_ios" } else { if (this.isFirefoxWithNativeDDG) { r = "firefox" } else { if (q === "Firefox") { r = "firefox_old" } else { if (m.device.isUCBrowser && (this.isAndroid || this.isIDevice)) { r = "uc_browser_mobile" } else { if (m.addToBrowser.canAddToChromeMobile() && this.isAndroid) { r = "chrome_android_default" } else { if (m.addToBrowser.canAddToChromeMobile() && this.isIDevice) { r = "chrome_ios_default" } else { if (this.isEdgeMobile && this.isAndroid) { r = "edge_android_default" } else { if (this.isEdgeMobile && this.isIDevice) { r = "edge_ios_default" } else { if (m.addToBrowser.canAddToBraveAndroid()) { r = "chrome_android_default" } else { if (this.isChrome && this.isAndroid) { r = "chrome_android" } else { if (q === "Chrome") { r = "chrome" } else { if (q === "Maxthon" && !this.isOSX) { r = "maxthon" } else { if (this.isSafariWithNativeDDG) { r = "safari" } else { if (this.isIOS8p && this.isSafari) { r = "ios8" } else { if (q === "Safari" && window.postMessage && this.isOSX) { r = "safari_old" } else { if (q === "Safari" && window.postMessage) { r = "safari_windows" } else { if (q === "Opera") { r = "opera" } else { if (q === "Vivaldi") { r = "vivaldi" } else { if (q === "Edge") { r = "edge" } else { if (q === "Brave") { r = "brave" } } } } } } } } } } } } } } } } } } } } } } } } } if (q === "IE") { s = "ie" } else { if (q.match(/^Firefox|PaleMoon|SeaMonkey$/)) { s = "firefox" } else { if (q === "Maxthon") { s = "maxthon" } else { if (q === "Chrome") { s = "chrome" } else { if (q === "Safari") { s = "safari" } else { if (q === "Opera") { s = "opera" } else { if (q === "Vivaldi") { s = "vivaldi" } else { if (q === "Edge") { s = "edge" } } } } } } } } return this._addToBrowserDirections = { useForSearch: r && ("use_for_search_" + r), setAsHomepage: s && ("set_as_homepage_" + s) } }, DDGisBrowserDefault: function() { return this.ua.match(/palemoon|porteus|qupzilla|lxle/gi) }, isTeapot: function() { return this.width >= a && this.height <= h }, isMobileLandscape: function() { return this.isMobile && this.width > this.height && (this.isAndroid && this.width >= e) }, isMobilePortrait: function() { return this.isMobile && !this.isMobileLandscape() }, widthBreakpoint: function() { var q = i.length; while (--q) { var r = i[q]; if (this.width < r.width) { return r.id } } return i[0].id }, gutterSize: function() { return f[this.widthBreakpoint()] }, isPrv: function() { var s = "prv", r = w.sessionStorage; try { r.setItem(s, "1"); r.removeItem(s) } catch (q) { if (q.code === DOMException.QUOTA_EXCEEDED_ERR && r.length === 0) { return true } } return false }, getCountry: function(q) { if (this.countryCode) { return q && q(null, this.countryCode) } $.ajax({ url: "/country.json", success: function(r) { this.countryCode = r && r.country; return q && q(null, this.countryCode) }.bind(this), error: function(r) { return q && q(r) } }) }, getLang: function() { var r = "en", q = m.settings.get(m.settings.LANGUAGE_KEY); if (q && q !== "wt_WT") { r = q.slice(0, 2) } else { if (w.locale) { r = w.locale.slice(0, 2) } } return r }, getLocale: function() { var q = m.settings.get(m.settings.LANGUAGE_KEY); if (q && q !== "wt_WT") { return q } else { if (w.locale) { return w.locale } } return "en_US" }, getColorScheme: function() { var r = window.matchMedia("(prefers-color-scheme: dark)"), q = window.matchMedia("(prefers-color-scheme: light)"); if (r.matches) { return "dark" } else { if (q.matches) { return "light" } } }, _updateScreenSize: function() { var q, r, s = document.documentElement; q = Math.max(s.clientWidth, window.innerWidth || 0); r = Math.max(s.clientHeight, window.innerHeight || 0); if (q !== this.width || r !== this.height) { this.width = viewport_width = q; this.height = viewport_height = r; return true } return false }, _updateIsMobileDevice: function() { var q = /mobile/.test(this.ua) ? 1 : 0; if (this.isOperaMobile || this.isOperaMini || this.isIDevice || this.isAndroid || this.isSilk || (this.width < 600 && this.height < 400)) { q = 1 } this.isMobileDevice = is_mobile_device = q }, _isSafariWithNativeDDG: function() { if (this.browserName !== "Safari" || this.isMobileDevice) { return false } var q = new RegExp("version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*safari/").exec(this.ua); if (!q || !q.length) { return false } q.shift(); q = q.map(function(r) { return r || 0 }).join(""); return q && q > 706 }, _isFirefoxWithNativeDDG: function() { if (this.browserName !== "Firefox") { return false } return navigator.buildID && parseInt(navigator.buildID, 10) >= 20141028112145 }, _getPixelBrowserVersion: function() { var q = 0; if (this.isChrome) { q = this.chromeVersion } else { if (this.isFirefox) { q = this.firefoxVersion } else { if (this.isSafari) { q = this.safariVersion } else { if (this.operaVersion !== -1) { q = this.operaVersion } else { if (this.isIE11p) { q = 11 } else { if (this.isIE10p) { q = 10 } else { if (this.isIE9) { q = 9 } } } } } } } return q }, _getPixelPlatformName: function() { var q = "other"; if (this.isAndroid) { q = "android" } else { if (this.isIPod) { q = "ipod" } else { if (this.isIPad) { q = "ipad" } else { if (this.isIPhone) { q = "iphone" } else { if (this.isWindowsPhone) { q = "winphone" } else { if (this.isWindows) { q = "windows" } else { if (this.isLinux) { q = "linux" } else { if (this.isBlackberry) { q = "blackberry" } else { if (this.isOSX) { q = "mac" } else { if (this.browserName === "DDG iOS") { q = "ios" } } } } } } } } } } return q }, _hasInstallationInstructions: function() { if (this.isSilk) { return false } var q = true; if (this.isMobileDevice || this.isMobile) { q = m.addToBrowser.canAddToMobileBrowser() || this.isAndroidChromeNoOpenSearch } return q }, _onResize: function(q) { if (this._updateScreenSize()) { q.isRotation = this.isMobileDevice && this._wasPortrait != this.isMobilePortrait(); this._wasPortrait = this.isMobilePortrait(); this.emit("resize", q) } }, _onScroll: function(q) { delete this._scrollTop; this.emit("scroll", q) }, _onVisibilityChange: function(q) { this.emit("visibilitychange", d[this._visibilityState]) } }); function k() { var q; try { q = !!new ActiveXObject("htmlfile") } catch (r) {} return q } }(DDG); ! function(c) { var a = c.Models.Base, e = 500, b = { 13: "enter", 27: "escape", 32: "space", 37: "left", 38: "up", 39: "right", 40: "down", 16: "shift", 17: "ctrl", 18: "alt", 91: "cmd", 74: "k", 75: "j" }; c.Models.Keyboard = function(f) { a.call(this, f); if (!c.device.isMobileDevice) { $(document).on("keydown", this._onKeydown.bind(this)) } }; c.Models.Keyboard.prototype = $.extend({}, a.prototype, { namespaced: function(f) { if (!f) { return !!this.namespace } return this.namespace && this.namespace.match(f) }, focusedOnInput: function() { var f = document.activeElement; return f && (f.nodeName === "INPUT" || f.nodeName === "TEXTAREA" || f.localName === "button") }, keyCodeIsOneOf: function(h, g) { var f = b[h]; return (f && g.indexOf(f) > -1) }, _onKeydown: function(h) { var g = h.keyCode; clearTimeout(this._activeTimeout); this.set("active", 1); if (!fq && (!kk || kk == "1") && !h.ctrlKey && !h.metaKey && !this.focusedOnInput() && c.duckbar && c.duckbar.areOrganicsShowing) { if (this.enableSERPShortcuts) { this._onSERPKeydown(h) } if (g == 13) { nke() } if (g == 84) { nkt() } } var f = b[g]; if (f && !h.altKey && !h.shiftKey) { if (this.namespace) { this.emit(f + "." + this.namespace, h) } this.emit(f, h) } this._activeTimeout = setTimeout(function() { clearTimeout(this._activeTimeout); this.set("active") }.bind(this), e) }, _onSERPKeydown: function(g) { var f = g.keyCode; if (f == 40 || f == 74) { if (this.nativeUpDown) { return } g.preventDefault(); nkda() } if (f == 38 || f == 75) { if (this.nativeUpDown) { return } g.preventDefault(); nkua() } if (f == 191) { if (c.device.isFirefox) { g.preventDefault() } nks() } if (f == 79 || f == 76) { nko() } if (f == 222 || f == 86) { nkn() } if (f == 111 || f == 72) { nks() } if (f == 32) { nksb() } if (f == 77) { nkm() } if (f == 68) { nkd(g) } } }) }(DDG); ! function(c) { var b = c.Models, a = b.Base; b.SelectList = function(e) { a.call(this, e); this.select(e.selectedId || this.values[0].id) }; b.SelectList.prototype = $.extend({}, a.prototype, { select: function(e) { var f; this.values.forEach(function(g) { if (g.id === e) { g.selected = true; f = g } else { g.selected = false } }); if (!f) { this.select(this.values[0].id) } else { this.set("selected", f) } } }) }(DDG); ! function(f) { var e = f.Models, c = e.Base, b = "d", a = 10; e.Deep = function(h) { this._backData = h.backData; this._device = h.device; this._page = h.page; this._pixel = h.pixel; this._settings = h.settings; this._adFeed = h.adFeed; this.hideRelated = window.iqa; this.results = {}; this.resultDomains = {}; var g = this.getInstance("adFeed"); g.on("change:ads", function() { if (this.results.a && this.results.a.length) { this.getInstance("pixel").fire("sad", { b: 1, r: "ad" }); return } if (this._heldOrganics) { this.nrnWrapper("d", this._heldOrganics); delete this._heldOrganics } }.bind(this)); g.on("change:lateAds", function() { if (g.lateAds.length) { nrn("a", g.lateAds, 1) } }) }; e.Deep.prototype = $.extend({}, c.prototype, { isLastResult: false, isOutOfResults: false, pageNumber: 1, started: 0, finished: 0, _currentPageItems: { a: [], d: [] }, timeSinceStarted: function() { return this.started ? new Date().getTime() - this.started : 0 }, timeSinceFinished: function() { return this.finished ? new Date().getTime() - this.finished : 0 }, getResultCount: function() { return r1c }, getFirstSource: function() { return this.results && this.results.d && this.results.d[0] && this.results.d[0].s }, getAttributionSource: function() { if (!this.results || !this.results.d || this.results.d.length <= 5) { return "" } var g = this.getFirstSource(); if (g === "yandexru" || g === "yandextr") { return "yandex" } return "" }, canShowAttribution: function() { return !this.showedAttribution && !!this.getAttributionSource() }, getNewsItems: function(h) { if (!this.results.d || !this.results.d.length) { return } var g = []; for (var k = 0; k < this.results.d.length; k++) { var m = this.results.d[k], j = m.da && m.da.split(","); if (j && j.indexOf("news") > -1) { var n = m.d.split("/")[0]; g.push({ title: m.t, excerpt: m.a, url: m.u, source: n, fetch_image: f.Data.NewsImageDomains.indexOf(n) > -1, rank: k }) } } if (h && g.length === 1 && g[0].rank < 5) { return [] } return g }, addResults: function(h, g) { if (!this.results[h]) { this.results[h] = g } else { this.results[h] = this.results[h].concat(g) } this._emitChange("results") }, _checkBackClickFromSecondPage: function() { if (!this.getInstance("settings").autoloadDisabled() || this._hasShownFirstPage) { return } var h = this.getInstance("backData").getId(), g = h && h.match(/r([1a])-([0-9]*)/); if (g) { this._hasShownFirstPage = (g[1] === "1" && parseInt(g[2], 10) > 8) || (g[1] === "a" && parseInt(g[2], 10) > 0) } }, nrnWrapper: function(o, j) { var n = this.getInstance("page").ads, k = this.getInstance("adFeed"), h = this.getInstance("settings").autoloadDisabled() && o === b; if (o === "d" && !this._hasShownFirstPage) { for (var m = 0; m < j.length; m++) { if (j[m].k) { k.setDefaultAds([j[m]], n.adxExperiment); break } } var g = k.getAds(); if (k.yjsFeedActive) { if (k.loading) { this._heldOrganics = j; k.organicsLoaded(); return } else { if (g.length) { this.nrnWrapper("a", g) } } } else { if (!(this.results.a && this.results.a.length) && g.length) { this.nrnWrapper("a", g) } } } this._checkBackClickFromSecondPage(); if (h && !this._hasShownFirstPage) { this._currentPageItems[o] = j.slice(0, a); this._pendingOrganics = j.slice(a); this._hasShownFirstPage = true; j = this._currentPageItems[o] } else { this._currentPageItems[o] = j } this.addResults(o, j); if (o === "a" && !n.isBlocked() && j.length) { this._sendAdImpressions(j) } if (o === "a" && this.pageNumber === 1) { n.setAds(j) } if (this._currentPageItems.a.length && this._currentPageItems.d.length) { this._splitNrnResults() } else { if (o === "d") { nrn(o, j, true, true); this._setFirstPageRendered(); this._currentPageItemsReset() } } }, pageNumberIncrement: function() { return ++this.pageNumber }, pageNumberDecrement: function() { return --this.pageNumber }, hasPendingResults: function() { return this._pendingOrganics && this._pendingOrganics.length }, showPendingResults: function() { if (this.hasPendingResults()) { var g = this._pendingOrganics; this._pendingOrganics = null; this.nrnWrapper("d", g); f.ImageLoader.registerAll($(".js-lazyload-icons"), "scrollY") } }, hasMoreResultsToLoad: function() { var h = this.results.d ? this.results.d.length : 0; var i = this.hasPendingResults(); var g = ""; if (i) { g = this._pendingOrganics[i - 1].n } else { if (h) { g = this.results.d[h - 1].n } } return !!g }, _currentPageItemsReset: function() { this._currentPageItems.a = []; this._currentPageItems.d = [] }, _sendAdImpressions: function(j) { var h = {}, k = this.getInstance("page"), i = false; h.n = j.length; h.rl = window.rl; j.forEach(function(q, p) { q.adn = j.length; if (q.l && q.l.indexOf("sponsored__sitelink-description") > -1) { i = true } if (this.pageNumber === 1) { q.adf = 1 } }.bind(this)); h.sld = i ? 1 : 0; var o = j[0].d; o = o.split("/"); o = o.shift(); if (o) { h.d = o } var n = k.ads.adx; if (n && n !== "ctl") { h.adx = n } if (window.sourceTag) { h.st = window.sourceTag } if (k.ads.adxExperiment) { h.adx_name = k.ads.adxExperiment } try { var g = j.map(function(p) { return p.d }).join(","); h.ds = g } catch (m) {} this.getInstance("pixel").fire("ad", j[0].s || "default", h) }, _canShowSouthAds: function() { return this.pageNumber === 1 && f.settings.isDefault("kav") && f.settings.isDefault("k1") && !this.getInstance("adFeed").isUsingDefaultAds() }, _splitNrnResults: function() { var m = true, h = false, k, g, i = this.getInstance("page").ads, j = this.getInstance("device").isMobile ? 1 : 2; if (this.getInstance("settings").autoloadDisabled() && !this._hasRenderedFirstPage) { this._blockResultSplit = true; if (this._currentPageItems.d.length < 10) { this._blockResultSplit = false } } if (this._currentPageItems.a.length > j && !this._blockResultSplit) { nrn("a", this._currentPageItems.a.slice(0, j), m); nrn("d", this._currentPageItems.d.slice(0, 15), m, h); this.pageNumber++; this.emit("add-separator"); nrn("a", this._currentPageItems.a.slice(j, this._currentPageItems.a.length), m); h = true; nrn("d", this._currentPageItems.d.slice(15, this._currentPageItems.d.length), m, h) } else { if (this._currentPageItems.a.length && i.adx !== "rel2" && this._canShowSouthAds()) { k = i.getNorthAds(this._currentPageItems.a); nrn("a", k, m, h); g = i.getSouthAds(this._currentPageItems.a); h = g.length === 0; nrn("d", this._currentPageItems.d, m, h); if (g.length) { h = true; nrn("a", g, m, h) } } else { if (this._currentPageItems.a.length) { nrn("a", this._currentPageItems.a, m, h); h = true; nrn("d", this._currentPageItems.d, m, h) } } } this._currentPageItemsReset(); this._setFirstPageRendered() }, _setFirstPageRendered: function() { if (!this.finished) { this.set("finished", new Date().getTime()) } this.emit("rendered"); if (this.getInstance("settings").autoloadDisabled()) { this._hasRenderedFirstPage = true; this._blockResultSplit = false } } }) }(DDG); ! function(c) { var b = c.Models, a = b.Base, f = [{ name: l("Any Time"), id: "" }, { name: l("Past Day"), id: "d" }, { name: l("Past Week"), id: "w" }, { name: l("Past Month"), id: "m" }, { name: l("Past Year"), id: "y" }], e = 4; b.Search = function(g) { this.dateFilterId = window[c.Data.HiddenFields.DATE_FILTER]; this.deepAnswerIAs = {}; this.isAdultQuery = window.iqa; this.isMinusQuery = window.iqm; this.isQuoteQuery = window.iqq; this.isDomainQuery = window.iqd; this.isVertical = false; this.isSiteQuery = window.rq && window.rq.indexOf("site%3A") !== -1; a.call(this, g); this.on("change:dateFilterId", this._setDateFilter.bind(this)); this.on("change:isVertical", this._changedVertical.bind(this)); this._setDateFilter() }; b.Search.prototype = $.extend({}, a.prototype, { _dateFilters: f, requery: function() { this.emit("requery") }, addBangToSiteInQuery: function(g, h) { return h.replace(new RegExp("(^|\\s)(" + g + ")($|\\s)", "i"), "$1!$2$3") }, isLatLonQuery: function() { return !!c.get_query().match(/latitude|longitude/gi) }, getDateFilterName: function() { return this._dateFilterName }, getResultCount: function() { return window.r1c || 0 }, _changedVertical: function() { if (this.isVertical && this.dateFilterId === f[e].id) { this._hadPastYear = true; this.set("dateFilterId", "") } else { if (!this.isVertical && this._hadPastYear) { this.set("dateFilterId", f[e].id) } } }, _setDateFilter: function() { this._dateFilters.forEach(function(g) { if (g.id === this.dateFilterId) { g.selected = 1; this._dateFilterName = g.name } else { g.selected = 0 } }.bind(this)) }, getDateFilters: function() { if (this.isVertical) { return this._dateFilters.slice(0, e) } return this._dateFilters }, getSiteQuery: function(q) { if (!q) { return false } q = decodeURIComponentSafe(q); q = c.strip_html(q); var h, g, t = false, n, s = [], o, r = q, p = []; n = q.match(/((NOT )?SITE:)([^\s]+)/); if (n) { t = !!n[2]; p = n[3].split(","); r = q.substring(0, n.index - 1); for (var m = 0; m < p.length; m++) { if (!p[m]) { continue } h = []; for (var k = 0; k < p.length; k++) { if (k !== m) { h.push(p[k]) } } o = (t) ? " NOT SITE:" : " SITE:"; g = (h.length) ? o + h.join(",") : ""; s.push({ site: p[m], clearQuery: encodeURIComponent(r + g) }) } } if (!this.isYhsSource() && t && (s.length > 1 || rqd.toLowerCase().indexOf("not site:") !== -1)) { s = [] } return { str: q, query: r, sites: s, isExcluding: t } }, isYhsSource: function() { return this.src === "yhs" }, isQuotedQuery: function() { return c.get_query().match(/(\'.+\')|(\".+\")/) } }) }(DDG); ! function(b) { var a = b.Models.Base; b.Models.Search.Spelling = function(c) { a.call(this, c); this.type = this.type.toLowerCase(); this.query = decodeURIComponentSafe(c.link); this.recourseQuery = decodeURIComponentSafe(c.recourseLink); this.parsedQuery = c.suggestion && c.suggestion.replace(/<\/?[^>]+(>|$)/g, ""); if (this.type === "nmrc") { this.parsedQuery = window.rq } }; b.Models.Search.Spelling.prototype = $.extend({}, a.prototype, { isValidType: function() { return (this.type && this.type.match(/irf|dym|nmrc/)) }, makeSpellingURL: function(f, e, c) { if (c) { f += "&iar=" + c + "&ia=" + c } var g = b.searchExperiments ? b.searchExperiments.getExperimentGroup("rspexp2") : null; return "/?q=" + f + (e ? "&norw=1" : "") + (w.rv ? "&v=" + w.rv : "") + (w.kurl ? w.kurl : "") + (g ? "&rspexp=" + g : "") } }) }(DDG); var d = document; var w = window; var cd, dz, da, fk, fb, fs, fm, fe, fl, fo, fa, fn, fq, fz, ie, io, ir, is, ga, gd, rc, rd, rs, rsd, rdc, rsc, rtc, rii, rin, rir, rl, rp, reb, rebc, sx, sy, tl, tlz, tac, tr, ts, tn, tsl, tz, nir, kurl, is_mobile, dow, iosx; fb = irl = il = dz = da = dam = daiq = daia = fz = tl = tlz = sx = sy = fl = fo = fa = fn = rdc = rtc = rsc = rii = rin = rebc = tsl = tac = tn = tz = fe = fmx = fmy = ieof = iad = iad2 = iad3 = iadt = 0; kurl = ""; rpc = fk = fs = 1; tr = new Array(); ts = new Array(); rsd = new Array(); reb = new Array(); ! function(c) { var b = c.Models, a = b.Base; b.Hidden = function(f) { a.call(this, f); this._vals = {}; for (var g in c.Data.HiddenFields) { var e = c.Data.HiddenFields[g]; if (window[e]) { this.set(e, window[e]) } } }; b.Hidden.prototype = $.extend({}, a.prototype, { set: function(e, f) { this._vals[e] = f; this.emit("change") }, get: function(e) { return this._vals[e] }, clear: function(e) { delete this._vals[e]; this.emit("change") }, toJSON: function() { return $.extend({}, this._vals) } }) }(DDG); ! function(c) { var a = c.Models.Base, b = { Firefox: { canInstall: function() { return !this.device.isMobileDevice && this.device.isFirefox && !this.device.isFirefoxLessThan57 }, url: "https://addons.mozilla.org/firefox/downloads/latest/duckduckgo-for-firefox/addon-385621-latest.xpi", reviewsUrl: "https://addons.mozilla.org/firefox/addon/duckduckgo-for-firefox/reviews/", watchCSSForSuccess: true }, Chrome: { canInstall: function() { return !this.device.isMobileDevice && this.device.isChrome && ((this.device.isWindows && this.device.chromeVersion >= 36) || (this.device.isOSX && this.device.chromeVersion >= 56)) }, url: "https://chrome.google.com/webstore/detail/bkdgflcldnnnapblkhphbgpggdiikppg" }, Edge: { canInstall: function() { if (c.device.isEnglish) { return false } return !this.device.isMobileDevice && this.device.isEdgeChromium && ((this.device.isWindows && this.device.chromeVersion >= 36) || (this.device.isOSX && this.device.chromeVersion >= 56)) }, url: "https://chrome.google.com/webstore/detail/bkdgflcldnnnapblkhphbgpggdiikppg" }, Brave: { canInstall: function() { return !this.device.isMobileDevice && this.device.isBrave && ((this.device.isWindows && this.device.chromeVersion >= 36) || (this.device.isOSX && this.device.chromeVersion >= 56)) }, url: "https://chrome.google.com/webstore/detail/bkdgflcldnnnapblkhphbgpggdiikppg" }, Vivaldi: { canInstall: function() { return false }, url: "https://chrome.google.com/webstore/detail/bkdgflcldnnnapblkhphbgpggdiikppg" }, Safari: { canInstall: function() { return !this.device.isMobileDevice && this.device.isOSX && this.device.isOSXCatalinaAndUp && !this.device.isIPadOS && this.device.isSafari && this.device.safariVersion >= 13 && document.location.pathname.indexOf("/app") === 0 }, url: "https://apps.apple.com/app/duckduckgo-privacy-essentials/id1482920575", watchCSSForSuccess: true } }; c.Models.Extension = function(e) { a.call(this, e); this.device = (e && e.device) || c.device; $.extend(this, b[this.device.browserName] || {}) }; c.Models.Extension.prototype = $.extend({}, a.prototype, { canInstall: function() { return false }, isInstalled: function(f) { if (typeof this._isInstalled !== "undefined" && !(f && f.nocache)) { return this._isInstalled } var e = $('
'); $("body").append(e); this._isInstalled = e.is(":hidden") && !c.device.isDDGApp; e.remove(); return this._isInstalled } }) }(DDG); ! function(c) { var b = c.Models.Base, a = "kos"; c.Models.Onboarding = function(f) { b.call(this, f); var e = this.getLastRecordedStep(); this.set("step", e >= 2 && !c.extension.isInstalled({ nocache: true }) ? 1 : e) }; c.Models.Onboarding.prototype = $.extend({}, b.prototype, { setStep: function(e) { switch (e) { case 0: if (!this.hasBeenExposed()) { c.settings.set(a, "0") } this.set("step", e); break; case 1: if (this.getLastRecordedStep() < 1) { c.settings.set(a, "1") } this.set("step", e); break; case 2: if (this.getLastRecordedStep() !== 2) { c.settings.set(a, "2") } this.set("step", e); break; case 3: if (this.getLastRecordedStep() < 3) { c.settings.set(a, "3") } this.set("step", e); break } }, getStep: function() { return this.step }, getLastRecordedStep: function() { var e = parseInt(c.settings.get(a), 10); return e > 0 ? e : 0 }, hasBeenExposed: function() { return !c.settings.isDefault(a) }, hasStarted: function() { return this.step > 0 }, hasCompleted: function() { return this.step === 3 && c.extension.isInstalled({ nocache: true }) }, isResumable: function() { return this.step > 0 }, hasCompletedStep1: function() { return c.extension.isInstalled({ nocache: true }) || this.step >= 2 } }) }(DDG); ! function(h) { var b = h.Models.Base, k = 3, e = "cppm-s-v2", j = "cppm-i-v2", g = "cppm-d-v2"; h.Models.MobileOnboarding = function(m) { b.call(this, m); var p, s, q; this.hasStorage = true; this.wasExposedToV1 = false; try { if (window.localStorage) { for (var o = 0; o < window.localStorage.length; o++) { var n = window.localStorage.key(o); if (n && /^cppm-.*-v[12]$/.test(n)) { window.localStorage.removeItem(n) } } if (this.useLocalStorage) { p = window.localStorage.getItem(e); s = window.localStorage.getItem(j); q = window.localStorage.getItem(g) } } else { this.hasStorage = false } } catch (r) { this.hasStorage = false } this.set("statuses", i(p)); this.set("impressions", a(s)); this.set("isDirty", String(q) === "true"); this.set("openStatuses", i()) }; h.Models.MobileOnboarding.prototype = $.extend({}, b.prototype, { completeStep: function(n) { this.set("statuses", this.statuses.map(function(q, p) { if (p === n) { return "completed" } return q })); if (this.useLocalStorage) { var m = c(this.statuses); try { if (window.localStorage) { window.localStorage.setItem(e, m) } } catch (o) {} } }, trackRenderedStep: function(n) { this.set("impressions", this.impressions.map(function(q, p) { if (p === n) { return true } return q })); if (this.useLocalStorage) { var m = f(this.impressions); try { if (window.localStorage) { window.localStorage.setItem(j, m) } } catch (o) {} } }, markDirty: function() { if (!this.isResumable()) { this.set("isDirty", true); if (this.useLocalStorage) { try { if (window.localStorage) { window.localStorage.setItem(g, "true") } } catch (m) {} } } }, setOpenStatuses: function() { this.set("openStatuses", this.getStatuses()) }, isResumable: function() { return this.isDirty || this.statuses.some(function(m) { return m === "completed" }) }, hasBeenExposed: function() { return this.getImpressions().some(function(m) { return m }) }, hasCompletedAllSteps: function() { return this.statuses.every(function(m) { return m === "completed" }) }, hasDdgAsDefault: function() { return this.statuses[0] === "completed" }, hasDdgApp: function() { return this.statuses[1] === "completed" }, hasDdgExtension: function() { return this.statuses[2] === "completed" }, getStatuses: function() { return this.statuses.slice() }, getOpenStatuses: function() { return this.openStatuses.slice() }, getImpressions: function() { return this.impressions.slice() }, getPixelStatuses: function(m) { m = m || this.getStatuses(); return (c(m).replace("0", this.createPixelStep(0)).replace("1", this.createPixelStep(1)).replace("2", this.createPixelStep(2)).replace("3", this.createPixelStep(3)) + "n") }, createPixelStep: function(m) { switch (m) { case 0: return "d"; case 1: return "a"; case 2: return "e"; case 3: return "c"; default: return "" } }, getPixelOpenStatuses: function() { return this.getPixelStatuses(this.getOpenStatuses()) }, getPixelImpressionStatuses: function() { return (f(this.getImpressions()).replace("0", this.createPixelStep(0)).replace("1", this.createPixelStep(1)).replace("2", this.createPixelStep(2)).replace("3", this.createPixelStep(3)) + "n") }, getStatus: function(m) { return this.statuses[m] }, getResumeStep: function(m) { m = m || 0; var o = m; for (var n = m; n < this.statuses.length; n++) { if (this.statuses[n] !== "completed") { o = n; break } } return this.statuses[o] === "completed" ? this.statuses.length : o }, getProgressValue: function() { return this.statuses.filter(function(m) { return m === "completed" }).length } }); function i(o) { var m, n = []; if (!o) { for (m = 0; m < k; m++) { n.push("pending") } } else { var p = o.split("-"); for (m = 0; m < k; m++) { n.push(p.indexOf(m.toString()) === -1 ? "pending" : "completed") } } return n } function c(o) { var m = []; for (var n = 0; n < o.length; n++) { if (o[n] === "completed") { m.push(n) } } return m.join("-") } function a(n) { var m, o = []; if (!n) { for (m = 0; m < (k + 1); m++) { o.push(false) } } else { var p = n.split("-"); for (m = 0; m < (k + 1); m++) { o.push(p.indexOf(m.toString()) !== -1) } } return o } function f(o) { var m = []; for (var n = 0; n < o.length; n++) { if (o[n]) { m.push(n) } } return m.join("-") } }(DDG); ! function(c) { var a = c.Models.Base, b = 700, e = 2500; c.Models.AdFeed = function(f) { this._pixel = f.pixel; a.call(this, f); this.ads = []; this.defaultAds = [] }; c.Models.AdFeed.prototype = $.extend({}, a.prototype, { setDefaultAds: function(f, h) { var g = DDG.searchExperiments.v7exp && DDG.searchExperiments.v7exp.activeGroup === "a"; if (this.ads.length || !f || !f.length || g) { return } this.set("defaultAds", f.map(function(j) { var i = this._makeAffiliateAd(j, h); return { a: j.a.substring(0, 75) + (j.a.length > 75 ? "..." : ""), d: j.d, m: 0, s: i.s, p: 1, c: i.c, u: i.u, h: 0, k: 0, i: j.i, t: j.t.substring(0, 60) + (j.t.length > 60 ? "..." : ""), "IE fix": 1 } }.bind(this))) }, getAds: function() { var f = []; if (this.ads && this.ads.length) { f = this.ads } else { if (this.defaultAds && this.defaultAds.length) { f = this.defaultAds } } return f }, setAds: function(g) { var f = this.getInstance("pixel"); if (this.blockReallyLateAds) { f.fire("sad", { b: 1, r: "late" }); return } else { if (!this.loading) { if (g && g.length) { g.forEach(function(h) { h.late = true; delete h.l }) } f.fire("sad", { b: 0, r: "late" }); this.set("lateAds", g || []); return } } clearTimeout(this._fallbackToDefaultTimeout); delete this._fallbackToDefaultTimeout; this.set("loading", false); this.set("ads", g || []) }, isUsingDefaultAds: function() { return !this.ads.length && this.defaultAds.length }, load: function(g) { if (this.loading) { return } var f = nrj(g); f.addEventListener("error", function() { this.setAds([]) }.bind(this)); this.set("yjsFeedActive", true); this.set("loading", true) }, organicsLoaded: function() { this._fallbackToDefaultTimeout = setTimeout(function() { this.set("loading"); this.set("ads", []) }.bind(this), b); this._blockAdsCompletelyTimeout = setTimeout(function() { this.set("blockReallyLateAds", true) }.bind(this), e) }, _makeAffiliateAd: function(g, h) { var f = h ? "&adx_name=" + h : ""; return { c: "/y.js?u2=" + encodeURIComponent(g.c) + f + (window.ra ? "&a=" + window.ra : "") + ("&vqd=" + window.vqd), u: "/y.js?u2=" + encodeURIComponent(g.u) + f + (window.ra ? "&a=" + window.ra : "") + ("&vqd=" + window.vqd), s: g.k } } }) }(DDG); ! function(c) { var a = c.Models.Base, b = { ctl: { rightRailSecond: true }, def: { rightRailSecond: true }, nav: { rightRailSecond: true }, tasb: { siteLinksBothAds: true }, tas1: { siteLinksFirstAdOnly: true }, tas2: { siteLinksSecondAdOnly: true }, oag: { rightRailSecond: true, siteLinksFirstAdOnly: true }, rel2: { rightRailBoth: true }, none: { rightRailSecond: false, rightRailBoth: false, smallFirst: false, smallSecond: false, siteLinksFirstAdOnly: false, siteLinksSecondAdOnly: false, siteLinksBothAds: false } }; c.Models.Ads = function(e) { this._deep = e.deep; this._device = e.device; this._settings = e.settings; a.call(this, e); this.ads = []; this.setBucket("def"); this.on("change:ads", this._updateLayout.bind(this)) }; c.Models.Ads.prototype = $.extend({}, a.prototype, { block: function() { this.set("blocked", 1) }, isBlocked: function() { return !!(this.blocked || !this.getInstance("settings").isDefault("k1")) }, setAds: function(e) { if (this.isBlocked() || !e || !e.length) { return } this.set("ads", e) }, getAds: function() { return this.ads }, getNorthAds: function(f) { return f; var e = 2; if (this.rightRailSecond) { e = 1 } else { if (this.rightRailBoth) { e = 0 } } e = Math.min(f.length, e); if (!this.canShowRightRailAds()) { return f.slice(0, e) } return f.slice(0, e + 1) }, getSouthAds: function(h) { return []; var e, g = (h.length > 1) ? this.numTopAds : 0, f = h.length; if (g - f === 0) { g = 0; f = 1 } if (f - g > 1) { g = f - 1 } e = h.slice(g, f); e.forEach(function(i) { delete i.l }); return e }, hasAds: function() { var e = this.getAds(); return !!e.length }, getNumberOfTopAds: function() { return this.numTopAds }, hasGoodAds: function() { return true; return (this.adx === "tas" || this.adx === "tasb" || this.adx === "tas1" || this.adx === "tas2" || this.adx === "oag") }, canShowGoodAdsLayout: function() { return (!this.getInstance("device").isMobile && this.hasGoodAds() && (this.getInstance("deep").pageNumber === 1)) }, canShowEnhancedSiteLinks: function(e) { if (!this.canShowGoodAdsLayout()) { return false } return (this.siteLinksSecondAdOnly && e > 0) || (this.siteLinksFirstAdOnly && e === 0) || this.siteLinksBothAds }, setBucket: function(f, e) { f = "tas1"; if (this._firstBatchShown) { return } if (this.getInstance("device").isMobile) { f = "none" } if (b[f]) { this.adx = f } var g = c.backData.getData(); this.adxExperiment = g.adx_name || e || "none" }, _updateLayout: function() { var e = this.ads.length; $.extend(this, b.none); if (this.adx !== "none") { $.extend(this, b[this.adx]) } if (e < 2) { this.rightRailSecond = false } if (this.rightRailSecond) { this.smallSecond = true } else { if (this.rightRailBoth) { this.smallFirst = true; this.smallSecond = true } } if (!this.canShowRightRailAds()) { this.rightRailBoth = false; this.rightRailSecond = false } }, setFirstBatchShown: function() { if (this._firstBatchShown) { return } this._firstBatchShown = true; var e = 2; if (this.rightRailSecond) { e = 1 } else { if (this.rightRailBoth) { e = 0 } } if (DDG.pageLayout.isSlottingExperiment()) { e = 10 } this.numTopAds = Math.min(this.getAds().length, e); this.smallFirst = false; this.smallSecond = false; this.rightRailSecond = false; this.rightRailBoth = false }, canShowRightRailAds: function() { var f = this.getInstance("device"), e = this.getInstance("settings"); return !f.isMobileDevice && e.isDefault("kw") && e.isDefault("km") }, hasRightRailAds: function() { if (!this.canShowRightRailAds()) { return false } var e = this.getAds().length; if (e && (e > 2 || this.rightRailBoth || this.rightRailSecond || this.rightRailFirst)) { return true } return false }, canShowAdExtensions: function(f, e) { return !this.getInstance("device").isMobile && f === 0 && this.adx !== "rel2" && e === 1 } }) }(DDG); ! function(b) { var a = b.Models.Base; b.Models.AdSitelinks = function(c) { a.call(this, c); this.hasSitelinkDescriptions = c.sitelinksMarkup && c.sitelinksMarkup.indexOf("sponsored__sitelink-description") > -1; if (c.isShowingLargeSitelinks) { this.hasSitelinkDescriptions = false; this.showEnhancedSiteLinks = false } if (/ebay\.co\.uk|amazon\.co\.uk/i.test(this.domain)) { this.hasSitelinkDescriptions = false; this.showEnhancedSiteLinks = false } }; b.Models.AdSitelinks.prototype = $.extend({}, a.prototype, { canShowLargeSitelinks: function() { if (this.isShowingLargeSitelinks || !this.hasSitelinkDescriptions || !this.isFirstPageOfAds) { return false } return this.canShowGoodAdsLayout || this.layoutName === "def" }, getSitelinkHtml: function() { return this._getSitelinkHtml(this.sitelinksMarkup, this.showEnhancedSiteLinks, this.canShowGoodAdsLayout) }, _getSitelinkHtml: function(g, j, e) { if (!g) { return "" } var c = this._splitSitelinks(g, j || this.canShowLargeSitelinks()); var h = (j && g.indexOf("sponsored__sitelink-description") > -1); var i; var f = "result__sitelinks"; if (this.canShowLargeSitelinks()) { c = c.slice(0, 4); f += " result__sitelinks--large"; i = this._getLargeAdSitelinks(c) } else { if (e && h) { c = c.slice(0, 3); i = this._getGoodAdSitelinks(c) } else { if (e && !h) { f += " result__sitelinks--nodesc"; c = c.slice(0, 6); i = c.join(',') } else { c = c.slice(0, 3); i = c.join(',') } } } this.tid = this._matchTids(this.tid, c.length); if (this.canShowLargeSitelinks()) { return '