1import g from"./D0rIMvHL.js";import p from"./1O2Ij95w.js";import w from"./CI4xBK7j.js";import{o as M,a9 as s,a6 as l,cI as h,a7 as u,bp as y,a8 as r,cH as m,bq as _,aR as k,bQ as C,bz as a,ai as i,c8 as b,c9 as L}from"./BPlt5jNJ.js";import{u as E}from"./vsr-mS5a.js";import{t as S}from"./ByBHOlDa.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new n.Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="e078f60b-6d7c-4b15-bf3a-68d3fcd313b1",n._sentryDebugIdIdentifier="sentry-dbid-e078f60b-6d7c-4b15-bf3a-68d3fcd313b1")}catch{}{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n._sentryModuleMetadata=n._sentryModuleMetadata||{},n._sentryModuleMetadata[new n.Error().stack]=Object.assign({},n._sentryModuleMetadata[new n.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}const B={name:"Excerpt",components:{EditableText:g,EditableButton:w,Overlay:p},props:{module:{type:Object,default:()=>{}},editable:{type:Boolean,default:!1},theme:{type:Object,default:()=>{}},headingOffset:{type:Number,default:0}},emits:["show-panel","tracking"],setup(n){const{h1LevelTag:e,h1LevelStyleClass:t}=E(L(n,"headingOffset"));return{h1LevelTag:e,h1LevelStyleClass:t}},computed:{creditText(){return this.$t("credit",{title:this.module.content.preview.title,authorNames:this.module.content.preview.authorNames})},truncatedText(){return S(this.module.content.text.html,{TruncateBy:"words",TruncateLength:this.module.content.text.meta.truncateLength,StripHTML:!1,Strict:!1,Suffix:"..."})},readMoreText(){return(this.module.content.text.meta.showMore?this.$t("read-less"):this.$t("read-more"))+"..."},showTruncatedText(){return!this.isPublic&&!this.module.content.text.meta.truncateActive||this.isPublic&&!this.module.content.text.meta.truncateActive||this.isPublic&&this.module.content.text.meta.truncateActive&&this.module.content.text.meta.showMore},moduleComputedCssClass(){return{[`@sm:px-8 @md:px-${this.module.content.padding.x}`]:!!(this.module.content.padding.x&&this.module.content.margin===!0),[`@sm:px-14 @md:px-${this.module.content.padding.x+8}`]:!!(this.module.content.padding.x&&this.module.content.margin===!1),[`border-solid border-${this.module.content.border?.width}`]:!!this.module.content.border?.width,[`pt-${this.module.content.padding.t}`]:!!this.module.content.padding.t,[`pb-${this.module.content.padding.b}`]:!!this.module.content.padding.b}},readMoreClasses(){return{[this.module.content.button.fontFamily]:!!this.module.content.button.fontFamily,["font-weight-"+this.module.content.button.fontWeight]:!!this.module.content.button.fontWeight,["font-size-"+this.module.content.button.fontSize+"px"]:!!this.module.content.button.fontSize}},isPublic(){return this.$store.getters.isPublic},excerptStyle(){return{"--module-border-color":this.module.content.border?.color,"--module-text-color":this.module.content.text?.color}}},methods:{readMoreClick(){if(this.isPublic&&(this.module.content.text.meta.showMore=!this.module.content.text.meta.showMore,this.module.content.text.meta.showMore&&this.module.content.analyticsMeta)){const n={event_type:"read_excerpt",...k(this.module.content.analyticsMeta)};this.$emit("tracking",n)}}}},V={class:"module_inner"},P={key:0},H=["id"],O=["innerHTML"],D=["innerHTML"],I={class:"sr-only"},z=["innerHTML"];function A(n,e,t,f,N,o){const x=g,T=p,v=w,c=C("panel");return a(),s("div",{class:y(["module px-4 py-8",o.moduleComputedCssClass]),style:_([t.module.content.background.style,o.excerptStyle]),"data-type":"excerpt"},[l("div",V,[t.module.content.header.meta.display?(a(),s("div",P,[h((a(),u(x,{key:t.module.content.isbn+t.module.content.text.meta.type,modelValue:t.module.content.header.html,"onUpdate:modelValue":e[0]||(e[0]=d=>t.module.content.header.html=d),editable:t.editable,tag:f.h1LevelTag,class:y(["w-full mb-4 mt-0",f.h1LevelStyleClass]),"data-test":"excerpt-header"},null,8,["modelValue","editable","tag","class"])),[[c]])])):r("",!0),l("div",{id:`expand-text-${t.module.id}`,class:"relative","aria-live":"polite"},[!o.isPublic&&t.module.content.text.meta.truncateActive?(a(),u(T,{key:0,module:t.module,"close-button":"",onShowPanel:e[2]||(e[2]=d=>n.$emit("show-panel",d))},{header:m(()=>[l("h1",null,[i(" This "+b(t.module.component)+" text is now in ",1),e[5]||(e[5]=l("span",{class:"whitespace-nowrap"},"Read-only",-1)),e[6]||(e[6]=i(" mode. ",-1))])]),body:m(()=>[l("p",null,[e[7]||(e[7]=i("To resume normal editing of the excerpt as Live Text, open the ",-1)),l("strong",{class:"underline hover:text-gray-800 cursor-pointer",onClick:e[1]||(e[1]=d=>n.$emit("show-panel",{open:!0,panel_type:t.module.component,module_id:t.module.id}))},"Excerpt Module panel"),e[8]||(e[8]=i(" and toggle off the âRead more...â feature under ",-1)),e[9]||(e[9]=l("strong",null,"Content Settings",-1)),e[10]||(e[10]=i(" until youâre done.",-1))])]),buttonText:m(()=>[...e[11]||(e[11]=[i(" Open settings ",-1)])]),_:1},8,["module"])):r("",!0),o.showTruncatedText?h((a(),u(x,{key:t.module.content.isbn+t.module.content.text.meta.type,modelValue:t.module.content.text.html,"onUpdate:modelValue":e[3]||(e[3]=d=>t.module.content.text.html=d),editable:t.editable,tag:"div","data-test":"excerpt-text"},null,8,["modelValue","editable"])),[[c]]):(a(),s("div",{key:2,"data-test":"excerpt-truncated-text",innerHTML:o.truncatedText},null,8,O))],8,H),t.module.content.text.meta.truncateActive?h((a(),u(v,{key:1,modelValue:t.module.content.button,"onUpdate:modelValue":e[4]||(e[4]=d=>t.module.content.button=d),type:"link","data-test":"module-read-more","aria-expanded":o.showTruncatedText,"aria-controls":`expand-text-${t.module.id}`,editable:t.editable,theme:{meta:{button:t.module.content.button}},onEditableButtonClick:o.readMoreClick},{default:m(()=>[l("span",{innerHTML:o.readMoreText},null,8,D),l("span",I,b(n.$t("about"))+" "+b(t.module.content?.preview?.title||"excerpt"),1)]),_:1},8,["modelValue","aria-expanded","aria-controls","editable","theme","onEditableButtonClick"])),[[c,{component:"ButtonStyle",context:"ReadMore"}]]):r("",!0),t.module.content.prhApiIdentifier&&t.module.content.text.meta.type==="excerpt"?(a(),s("div",{key:2,class:"mt-8 font-family font-size-15px leading-normal","data-test":"excerpt-credit-text",innerHTML:o.creditText},null,8,z)):r("",!0)])],6)}const G=Object.assign(M(B,[["render",A],["__scopeId","data-v-01ac6e4e"]]),{__name:"Excerpt"});export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.